Search is not available for this dataset
repo_name
string
path
string
license
string
full_code
string
full_size
int64
uncommented_code
string
uncommented_size
int64
function_only_code
string
function_only_size
int64
is_commented
bool
is_signatured
bool
n_ast_errors
int64
ast_max_depth
int64
n_whitespaces
int64
n_ast_nodes
int64
n_ast_terminals
int64
n_ast_nonterminals
int64
loc
int64
cycloplexity
int64
kmate/raw-feldspar-mcs
examples/ZeldsparVector.hs
bsd-3-clause
vector :: Multicore () vector = runParZ ((vecInc `on` 0) |>>chanSize>>| (vecInc' `on` 1) |>>chanSize>>| (vecInc'' `on` 2) |>>chanSize>>| (vecTwice >>> vecRev) `on` 3) readInput chanSize writeOutput chanSize where vecSize = 5 chanSize = 5 readInput :: Host (DPull Int32, Data Bool) readInput = liftHost $ do input <- newArr $ value vecSize for (0, 1, Excl $ value vecSize) $ \i -> do v <- fget stdin setArr input i v vec <- unsafeFreezeVec input return (vec, true) writeOutput :: DPull Int32 -> Host (Data Bool) writeOutput o = do for (0, 1, Excl $ value vecSize) $ \i -> printf "> %d\n" (o ! i) return true ------------------------------------------------------------
802
vector :: Multicore () vector = runParZ ((vecInc `on` 0) |>>chanSize>>| (vecInc' `on` 1) |>>chanSize>>| (vecInc'' `on` 2) |>>chanSize>>| (vecTwice >>> vecRev) `on` 3) readInput chanSize writeOutput chanSize where vecSize = 5 chanSize = 5 readInput :: Host (DPull Int32, Data Bool) readInput = liftHost $ do input <- newArr $ value vecSize for (0, 1, Excl $ value vecSize) $ \i -> do v <- fget stdin setArr input i v vec <- unsafeFreezeVec input return (vec, true) writeOutput :: DPull Int32 -> Host (Data Bool) writeOutput o = do for (0, 1, Excl $ value vecSize) $ \i -> printf "> %d\n" (o ! i) return true ------------------------------------------------------------
802
vector = runParZ ((vecInc `on` 0) |>>chanSize>>| (vecInc' `on` 1) |>>chanSize>>| (vecInc'' `on` 2) |>>chanSize>>| (vecTwice >>> vecRev) `on` 3) readInput chanSize writeOutput chanSize where vecSize = 5 chanSize = 5 readInput :: Host (DPull Int32, Data Bool) readInput = liftHost $ do input <- newArr $ value vecSize for (0, 1, Excl $ value vecSize) $ \i -> do v <- fget stdin setArr input i v vec <- unsafeFreezeVec input return (vec, true) writeOutput :: DPull Int32 -> Host (Data Bool) writeOutput o = do for (0, 1, Excl $ value vecSize) $ \i -> printf "> %d\n" (o ! i) return true ------------------------------------------------------------
779
false
true
6
14
244
329
156
173
null
null
tolysz/prepare-ghcjs
spec-lts8/cabal/cabal-install/Distribution/Client/Install.hs
bsd-3-clause
symlinkBinaries :: Verbosity -> Platform -> Compiler -> ConfigFlags -> InstallFlags -> InstallPlan -> IO () symlinkBinaries verbosity platform comp configFlags installFlags plan = do failed <- InstallSymlink.symlinkBinaries platform comp configFlags installFlags plan case failed of [] -> return () [(_, exe, path)] -> warn verbosity $ "could not create a symlink in " ++ bindir ++ " for " ++ exe ++ " because the file exists there already but is not " ++ "managed by cabal. You can create a symlink for this executable " ++ "manually if you wish. The executable file has been installed at " ++ path exes -> warn verbosity $ "could not create symlinks in " ++ bindir ++ " for " ++ intercalate ", " [ exe | (_, exe, _) <- exes ] ++ " because the files exist there already and are not " ++ "managed by cabal. You can create symlinks for these executables " ++ "manually if you wish. The executable files have been installed at " ++ intercalate ", " [ path | (_, _, path) <- exes ] where bindir = fromFlag (installSymlinkBinDir installFlags)
1,332
symlinkBinaries :: Verbosity -> Platform -> Compiler -> ConfigFlags -> InstallFlags -> InstallPlan -> IO () symlinkBinaries verbosity platform comp configFlags installFlags plan = do failed <- InstallSymlink.symlinkBinaries platform comp configFlags installFlags plan case failed of [] -> return () [(_, exe, path)] -> warn verbosity $ "could not create a symlink in " ++ bindir ++ " for " ++ exe ++ " because the file exists there already but is not " ++ "managed by cabal. You can create a symlink for this executable " ++ "manually if you wish. The executable file has been installed at " ++ path exes -> warn verbosity $ "could not create symlinks in " ++ bindir ++ " for " ++ intercalate ", " [ exe | (_, exe, _) <- exes ] ++ " because the files exist there already and are not " ++ "managed by cabal. You can create symlinks for these executables " ++ "manually if you wish. The executable files have been installed at " ++ intercalate ", " [ path | (_, _, path) <- exes ] where bindir = fromFlag (installSymlinkBinDir installFlags)
1,332
symlinkBinaries verbosity platform comp configFlags installFlags plan = do failed <- InstallSymlink.symlinkBinaries platform comp configFlags installFlags plan case failed of [] -> return () [(_, exe, path)] -> warn verbosity $ "could not create a symlink in " ++ bindir ++ " for " ++ exe ++ " because the file exists there already but is not " ++ "managed by cabal. You can create a symlink for this executable " ++ "manually if you wish. The executable file has been installed at " ++ path exes -> warn verbosity $ "could not create symlinks in " ++ bindir ++ " for " ++ intercalate ", " [ exe | (_, exe, _) <- exes ] ++ " because the files exist there already and are not " ++ "managed by cabal. You can create symlinks for these executables " ++ "manually if you wish. The executable files have been installed at " ++ intercalate ", " [ path | (_, _, path) <- exes ] where bindir = fromFlag (installSymlinkBinDir installFlags)
1,144
false
true
0
19
481
254
128
126
null
null
int-index/singletons
tests/compile-and-dump/Singletons/CaseExpressions.hs
bsd-3-clause
foo1a :: Proxy (Foo1 Int (Just Char)) foo1a = Proxy
51
foo1a :: Proxy (Foo1 Int (Just Char)) foo1a = Proxy
51
foo1a = Proxy
13
false
true
2
8
9
35
14
21
null
null
KenetJervet/mapensee
haskell/algorithms/OneOneToTwoOh/OneOneToTwoOh.hs
gpl-3.0
selectRandomRange :: (MonadRandom m, FiniteBits dtype) => dtype -> m (Int, Int) selectRandomRange d = do [left, right] <- sort <$> (take 2 <$> getRandomRs (0, finiteBitSize d -1)) return (left, right)
204
selectRandomRange :: (MonadRandom m, FiniteBits dtype) => dtype -> m (Int, Int) selectRandomRange d = do [left, right] <- sort <$> (take 2 <$> getRandomRs (0, finiteBitSize d -1)) return (left, right)
204
selectRandomRange d = do [left, right] <- sort <$> (take 2 <$> getRandomRs (0, finiteBitSize d -1)) return (left, right)
124
false
true
0
14
35
97
50
47
null
null
cies/gelatin
gelatin-core/src/Gelatin/Core/Bezier.hs
bsd-3-clause
ellipse :: RealFloat a => a -> a -> [CubicBezier (V2 a)] ellipse xr yr = arc xr yr 0 (2*pi)
91
ellipse :: RealFloat a => a -> a -> [CubicBezier (V2 a)] ellipse xr yr = arc xr yr 0 (2*pi)
91
ellipse xr yr = arc xr yr 0 (2*pi)
34
false
true
0
13
20
64
30
34
null
null
omittones/haskell-test
src/Excersises_01.hs
mit
--concatenate two lists cat :: [a] -> [a] -> [a] cat (a:at) b = a : cat at b
76
cat :: [a] -> [a] -> [a] cat (a:at) b = a : cat at b
52
cat (a:at) b = a : cat at b
27
true
true
2
10
18
58
28
30
null
null
olsner/ghc
compiler/ghci/ByteCodeGen.hs
bsd-3-clause
findPushSeq _ = panic "ByteCodeGen.findPushSeq"
49
findPushSeq _ = panic "ByteCodeGen.findPushSeq"
49
findPushSeq _ = panic "ByteCodeGen.findPushSeq"
49
false
false
0
5
6
12
5
7
null
null
mfpi/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/NV/PathRendering.hs
bsd-3-clause
gl_RELATIVE_LINE_TO_NV :: GLubyte gl_RELATIVE_LINE_TO_NV = 0x05
63
gl_RELATIVE_LINE_TO_NV :: GLubyte gl_RELATIVE_LINE_TO_NV = 0x05
63
gl_RELATIVE_LINE_TO_NV = 0x05
29
false
true
0
4
5
11
6
5
null
null
Philonous/pontarius-xmpp
source/Network/Xmpp/Concurrent/Monad.hs
bsd-3-clause
-- TODO: Wait for presence error? -- | Run an XmppConMonad action in isolation. Reader and writer workers will be -- temporarily stopped and resumed with the new session details once the action -- returns. The action will run in the calling thread. Any uncaught exceptions -- will be interpreted as connection failure. -- withConnection :: XmppConMonad a -> Context -> IO (Either StreamError a) withConnection :: (Stream -> IO (b, Stream)) -> Session -> IO (Either XmppFailure b) withConnection a session = do wait <- newEmptyTMVarIO Ex.mask_ $ do -- Suspends the reader until the lock (wait) is released (set to `()'). throwTo (readerThread session) $ Interrupt wait -- We acquire the write and stateRef locks, to make sure that this is -- the only thread that can write to the stream and to perform a -- withConnection calculation. Afterwards, we release the lock and -- fetch an updated state. s <- Ex.catch (atomically $ do _ <- takeTMVar (writeSemaphore session) s <- takeTMVar (streamRef session) putTMVar wait () return s ) -- If we catch an exception, we have failed to take the MVars above. (\e -> atomically (putTMVar wait ()) >> Ex.throwIO (e :: Ex.SomeException) ) -- Run the XmppMonad action, save the (possibly updated) states, release -- the locks, and return the result. Ex.catches (do (res, s') <- a s wl <- withStream' (gets $ streamSend . streamHandle) s' atomically $ do putTMVar (writeSemaphore session) wl putTMVar (streamRef session) s' return $ Right res ) -- TODO: DO we have to replace the MVars in case of ane exception? -- We treat all Exceptions as fatal. If we catch a StreamError, we -- return it. Otherwise, we throw an exception. [ Ex.Handler $ \e -> return $ Left (e :: XmppFailure) , Ex.Handler $ \e -> killStream s >> Ex.throwIO (e :: Ex.SomeException) ] -- | Executes a function to update the event handlers.
2,327
withConnection :: (Stream -> IO (b, Stream)) -> Session -> IO (Either XmppFailure b) withConnection a session = do wait <- newEmptyTMVarIO Ex.mask_ $ do -- Suspends the reader until the lock (wait) is released (set to `()'). throwTo (readerThread session) $ Interrupt wait -- We acquire the write and stateRef locks, to make sure that this is -- the only thread that can write to the stream and to perform a -- withConnection calculation. Afterwards, we release the lock and -- fetch an updated state. s <- Ex.catch (atomically $ do _ <- takeTMVar (writeSemaphore session) s <- takeTMVar (streamRef session) putTMVar wait () return s ) -- If we catch an exception, we have failed to take the MVars above. (\e -> atomically (putTMVar wait ()) >> Ex.throwIO (e :: Ex.SomeException) ) -- Run the XmppMonad action, save the (possibly updated) states, release -- the locks, and return the result. Ex.catches (do (res, s') <- a s wl <- withStream' (gets $ streamSend . streamHandle) s' atomically $ do putTMVar (writeSemaphore session) wl putTMVar (streamRef session) s' return $ Right res ) -- TODO: DO we have to replace the MVars in case of ane exception? -- We treat all Exceptions as fatal. If we catch a StreamError, we -- return it. Otherwise, we throw an exception. [ Ex.Handler $ \e -> return $ Left (e :: XmppFailure) , Ex.Handler $ \e -> killStream s >> Ex.throwIO (e :: Ex.SomeException) ] -- | Executes a function to update the event handlers.
1,931
withConnection a session = do wait <- newEmptyTMVarIO Ex.mask_ $ do -- Suspends the reader until the lock (wait) is released (set to `()'). throwTo (readerThread session) $ Interrupt wait -- We acquire the write and stateRef locks, to make sure that this is -- the only thread that can write to the stream and to perform a -- withConnection calculation. Afterwards, we release the lock and -- fetch an updated state. s <- Ex.catch (atomically $ do _ <- takeTMVar (writeSemaphore session) s <- takeTMVar (streamRef session) putTMVar wait () return s ) -- If we catch an exception, we have failed to take the MVars above. (\e -> atomically (putTMVar wait ()) >> Ex.throwIO (e :: Ex.SomeException) ) -- Run the XmppMonad action, save the (possibly updated) states, release -- the locks, and return the result. Ex.catches (do (res, s') <- a s wl <- withStream' (gets $ streamSend . streamHandle) s' atomically $ do putTMVar (writeSemaphore session) wl putTMVar (streamRef session) s' return $ Right res ) -- TODO: DO we have to replace the MVars in case of ane exception? -- We treat all Exceptions as fatal. If we catch a StreamError, we -- return it. Otherwise, we throw an exception. [ Ex.Handler $ \e -> return $ Left (e :: XmppFailure) , Ex.Handler $ \e -> killStream s >> Ex.throwIO (e :: Ex.SomeException) ] -- | Executes a function to update the event handlers.
1,816
true
true
0
21
799
375
187
188
null
null
frantisekfarka/ghc-dsi
testsuite/tests/lib/integer/IntegerConversionRules.hs
bsd-3-clause
f3 :: Int -> Int f3 = fi
24
f3 :: Int -> Int f3 = fi
24
f3 = fi
7
false
true
0
5
7
15
8
7
null
null
Jinxit/mcts
Main.hs
mit
initialState :: State initialState = State ((V.replicate (8 * 8) Nothing) // [(to1D (3, 3), Just White), (to1D (4, 4), Just White), (to1D (3, 4), Just Black), (to1D (4, 3), Just Black)]) Black
253
initialState :: State initialState = State ((V.replicate (8 * 8) Nothing) // [(to1D (3, 3), Just White), (to1D (4, 4), Just White), (to1D (3, 4), Just Black), (to1D (4, 3), Just Black)]) Black
253
initialState = State ((V.replicate (8 * 8) Nothing) // [(to1D (3, 3), Just White), (to1D (4, 4), Just White), (to1D (3, 4), Just Black), (to1D (4, 3), Just Black)]) Black
231
false
true
0
11
93
124
69
55
null
null
Helkafen/cabal
cabal-install/Distribution/Client/Dependency/Modular/Preference.hs
bsd-3-clause
processPackageConstraintP c i (PackageConstraintInstalled _) r | instI i = r | otherwise = Fail c GlobalConstraintInstalled
144
processPackageConstraintP c i (PackageConstraintInstalled _) r | instI i = r | otherwise = Fail c GlobalConstraintInstalled
144
processPackageConstraintP c i (PackageConstraintInstalled _) r | instI i = r | otherwise = Fail c GlobalConstraintInstalled
144
false
false
1
8
37
42
19
23
null
null
rueshyna/gogol
gogol-dataproc/gen/Network/Google/Dataproc/Types/Product.hs
mpl-2.0
-- | [Output-only] A cluster UUID (Unique Universal Identifier). Cloud -- Dataproc generates this value when it creates the cluster. cClusterUuid :: Lens' Cluster (Maybe Text) cClusterUuid = lens _cClusterUuid (\ s a -> s{_cClusterUuid = a})
243
cClusterUuid :: Lens' Cluster (Maybe Text) cClusterUuid = lens _cClusterUuid (\ s a -> s{_cClusterUuid = a})
110
cClusterUuid = lens _cClusterUuid (\ s a -> s{_cClusterUuid = a})
67
true
true
0
9
38
49
26
23
null
null
GaloisInc/saw-script
saw-core-coq/src/Verifier/SAW/Translation/Coq/Term.hs
bsd-3-clause
runTermTranslationMonad :: TranslationConfiguration -> TranslationReader -> [String] -> [Coq.Ident] -> (forall m. TermTranslationMonad m => m a) -> Either (TranslationError Term) (a, TranslationState) runTermTranslationMonad configuration r globalDecls localEnv = runTranslationMonad configuration r (TranslationState { _globalDeclarations = globalDecls , _topLevelDeclarations = [] , _localEnvironment = localEnv , _unavailableIdents = Set.union reservedIdents (Set.fromList localEnv) , _sharedNames = IntMap.empty , _nextSharedName = "var__0" })
698
runTermTranslationMonad :: TranslationConfiguration -> TranslationReader -> [String] -> [Coq.Ident] -> (forall m. TermTranslationMonad m => m a) -> Either (TranslationError Term) (a, TranslationState) runTermTranslationMonad configuration r globalDecls localEnv = runTranslationMonad configuration r (TranslationState { _globalDeclarations = globalDecls , _topLevelDeclarations = [] , _localEnvironment = localEnv , _unavailableIdents = Set.union reservedIdents (Set.fromList localEnv) , _sharedNames = IntMap.empty , _nextSharedName = "var__0" })
698
runTermTranslationMonad configuration r globalDecls localEnv = runTranslationMonad configuration r (TranslationState { _globalDeclarations = globalDecls , _topLevelDeclarations = [] , _localEnvironment = localEnv , _unavailableIdents = Set.union reservedIdents (Set.fromList localEnv) , _sharedNames = IntMap.empty , _nextSharedName = "var__0" })
485
false
true
0
14
211
153
82
71
null
null
rueshyna/gogol
gogol-admin-directory/gen/Network/Google/Resource/Directory/RoleAssignments/List.hs
mpl-2.0
-- | Creates a value of 'RoleAssignmentsList' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'ralRoleId' -- -- * 'ralCustomer' -- -- * 'ralPageToken' -- -- * 'ralUserKey' -- -- * 'ralMaxResults' roleAssignmentsList :: Text -- ^ 'ralCustomer' -> RoleAssignmentsList roleAssignmentsList pRalCustomer_ = RoleAssignmentsList' { _ralRoleId = Nothing , _ralCustomer = pRalCustomer_ , _ralPageToken = Nothing , _ralUserKey = Nothing , _ralMaxResults = Nothing }
576
roleAssignmentsList :: Text -- ^ 'ralCustomer' -> RoleAssignmentsList roleAssignmentsList pRalCustomer_ = RoleAssignmentsList' { _ralRoleId = Nothing , _ralCustomer = pRalCustomer_ , _ralPageToken = Nothing , _ralUserKey = Nothing , _ralMaxResults = Nothing }
295
roleAssignmentsList pRalCustomer_ = RoleAssignmentsList' { _ralRoleId = Nothing , _ralCustomer = pRalCustomer_ , _ralPageToken = Nothing , _ralUserKey = Nothing , _ralMaxResults = Nothing }
217
true
true
0
7
118
73
46
27
null
null
kfish/vacuum
src/GHC/Vacuum/Q.hs
lgpl-3.0
drainQ :: Q a -> IO [a] drainQ q = do a <- tryTakeQ q case a of Nothing -> return [] Just a -> do as <- unsafeInterleaveIO (drainQ q) return (a:as)
176
drainQ :: Q a -> IO [a] drainQ q = do a <- tryTakeQ q case a of Nothing -> return [] Just a -> do as <- unsafeInterleaveIO (drainQ q) return (a:as)
176
drainQ q = do a <- tryTakeQ q case a of Nothing -> return [] Just a -> do as <- unsafeInterleaveIO (drainQ q) return (a:as)
152
false
true
0
15
61
93
42
51
null
null
LightAndLight/pl0-haskell
src/PL0/StaticChecker.hs
bsd-3-clause
checkBlock :: (Expression e, MonadChecker s m) => Block e -> m (Block TypedExp) checkBlock (Block decs statement) = Block <$> traverse checkDeclaration decs <*> checkStatement statement
189
checkBlock :: (Expression e, MonadChecker s m) => Block e -> m (Block TypedExp) checkBlock (Block decs statement) = Block <$> traverse checkDeclaration decs <*> checkStatement statement
189
checkBlock (Block decs statement) = Block <$> traverse checkDeclaration decs <*> checkStatement statement
109
false
true
5
9
30
75
36
39
null
null
prl-tokyo/bigul-configuration-adaptation
Transformations/src/BiFlux/DTD/Type.hs
mit
gshow Float float = show float
51
gshow Float float = show float
51
gshow Float float = show float
51
false
false
0
5
26
14
6
8
null
null
IvanIvanov/haskell-lisp-interpreter
src/Evaluator.hs
mit
eval environment procedure@(Lambda parameters body) = (environment, procedure)
80
eval environment procedure@(Lambda parameters body) = (environment, procedure)
80
eval environment procedure@(Lambda parameters body) = (environment, procedure)
80
false
false
0
8
9
28
15
13
null
null
lordxist/uroboro
src/Uroboro/Token.hs
mit
-- | Parse something. parse :: Parser a -> FilePath -> String -> Either Error a parse parser fname input = left convertError $ Parsec.parse parser fname input
158
parse :: Parser a -> FilePath -> String -> Either Error a parse parser fname input = left convertError $ Parsec.parse parser fname input
136
parse parser fname input = left convertError $ Parsec.parse parser fname input
78
true
true
0
8
27
55
26
29
null
null
samscott89/tamarin-prover
lib/theory/src/Theory.hs
gpl-3.0
removeLemma :: String -> Theory sig c r p -> Maybe (Theory sig c r p) removeLemma lemmaName thy = do _ <- lookupLemma lemmaName thy return $ modify thyItems (concatMap fItem) thy where fItem = foldTheoryItem (return . RuleItem) (return . AxiomItem) check (return . TextItem) check l = do guard (L.get lName l /= lemmaName); return (LemmaItem l) -- | Remove a lemma by name. Fails, if the lemma does not exist.
517
removeLemma :: String -> Theory sig c r p -> Maybe (Theory sig c r p) removeLemma lemmaName thy = do _ <- lookupLemma lemmaName thy return $ modify thyItems (concatMap fItem) thy where fItem = foldTheoryItem (return . RuleItem) (return . AxiomItem) check (return . TextItem) check l = do guard (L.get lName l /= lemmaName); return (LemmaItem l) -- | Remove a lemma by name. Fails, if the lemma does not exist.
517
removeLemma lemmaName thy = do _ <- lookupLemma lemmaName thy return $ modify thyItems (concatMap fItem) thy where fItem = foldTheoryItem (return . RuleItem) (return . AxiomItem) check (return . TextItem) check l = do guard (L.get lName l /= lemmaName); return (LemmaItem l) -- | Remove a lemma by name. Fails, if the lemma does not exist.
447
false
true
0
11
181
160
77
83
null
null
jdublu10/toy_lang
src/Lang.hs
mit
substBinding :: Binding -> Expr -> Expr substBinding (Bind n e) = execSubst n e
79
substBinding :: Binding -> Expr -> Expr substBinding (Bind n e) = execSubst n e
79
substBinding (Bind n e) = execSubst n e
39
false
true
0
10
14
40
18
22
null
null
mbrock/HBEAM
src/Language/Erlang/BEAM/Loader.hs
gpl-3.0
parseLiteralChunk :: ChunkData -> [External] parseLiteralChunk x = readListChunk (parseLiteral <$> (getInt32 >>= getLazyByteString)) y where y = Zlib.decompress $ B.drop 4 x
179
parseLiteralChunk :: ChunkData -> [External] parseLiteralChunk x = readListChunk (parseLiteral <$> (getInt32 >>= getLazyByteString)) y where y = Zlib.decompress $ B.drop 4 x
179
parseLiteralChunk x = readListChunk (parseLiteral <$> (getInt32 >>= getLazyByteString)) y where y = Zlib.decompress $ B.drop 4 x
134
false
true
0
9
28
61
31
30
null
null
rfranek/duckling
Duckling/Time/NB/Rules.hs
bsd-3-clause
ruleOrdinalCycleAfterTime :: Rule ruleOrdinalCycleAfterTime = Rule { name = "<ordinal> <cycle> after <time>" , pattern = [ dimension Ordinal , dimension TimeGrain , regex "etter" , dimension Time ] , prod = \tokens -> case tokens of (Token Ordinal od:Token TimeGrain grain:_:Token Time td:_) -> tt $ cycleNthAfter True grain (TOrdinal.value od - 1) td _ -> Nothing }
414
ruleOrdinalCycleAfterTime :: Rule ruleOrdinalCycleAfterTime = Rule { name = "<ordinal> <cycle> after <time>" , pattern = [ dimension Ordinal , dimension TimeGrain , regex "etter" , dimension Time ] , prod = \tokens -> case tokens of (Token Ordinal od:Token TimeGrain grain:_:Token Time td:_) -> tt $ cycleNthAfter True grain (TOrdinal.value od - 1) td _ -> Nothing }
414
ruleOrdinalCycleAfterTime = Rule { name = "<ordinal> <cycle> after <time>" , pattern = [ dimension Ordinal , dimension TimeGrain , regex "etter" , dimension Time ] , prod = \tokens -> case tokens of (Token Ordinal od:Token TimeGrain grain:_:Token Time td:_) -> tt $ cycleNthAfter True grain (TOrdinal.value od - 1) td _ -> Nothing }
380
false
true
0
17
106
139
71
68
null
null
sunakshi2/sqlVisualiser
ReadnSend.hs
gpl-2.0
drawlow (l:ls) i = do upd l pointsl i (x + (fromIntegral i*0.4)) yd --drawlines $ getlinepts i $ add i $ head' pointsl drawArrow$ getlinepts i $ add i $ head' pointsl drawlow ls (i+1) -- | This function calculates new points for drawing box graphics and calls 'draw' function
466
drawlow (l:ls) i = do upd l pointsl i (x + (fromIntegral i*0.4)) yd --drawlines $ getlinepts i $ add i $ head' pointsl drawArrow$ getlinepts i $ add i $ head' pointsl drawlow ls (i+1) -- | This function calculates new points for drawing box graphics and calls 'draw' function
466
drawlow (l:ls) i = do upd l pointsl i (x + (fromIntegral i*0.4)) yd --drawlines $ getlinepts i $ add i $ head' pointsl drawArrow$ getlinepts i $ add i $ head' pointsl drawlow ls (i+1) -- | This function calculates new points for drawing box graphics and calls 'draw' function
466
false
false
1
13
241
95
43
52
null
null
facebookincubator/duckling
Duckling/Time/HE/Rules.hs
bsd-3-clause
ruleNamedday :: Rule ruleNamedday = Rule { name = "ב <named-day>" , pattern = [ regex "ב" , Predicate isADayOfWeek ] , prod = \tokens -> case tokens of (_:x:_) -> Just x _ -> Nothing }
216
ruleNamedday :: Rule ruleNamedday = Rule { name = "ב <named-day>" , pattern = [ regex "ב" , Predicate isADayOfWeek ] , prod = \tokens -> case tokens of (_:x:_) -> Just x _ -> Nothing }
216
ruleNamedday = Rule { name = "ב <named-day>" , pattern = [ regex "ב" , Predicate isADayOfWeek ] , prod = \tokens -> case tokens of (_:x:_) -> Just x _ -> Nothing }
195
false
true
0
14
68
82
44
38
null
null
flocc-net/flocc
v0.1/Compiler/Types/Solver.hs
apache-2.0
processCons :: Monad m => Cons -> IdxMonad m (Cons, Subs) processCons cons = do -- simplify terms res <- mapMCons applyDimGens cons -- extract simplified constraints, new constrs and substitutions from result let cons' = map (\((t1,_,_) :=: (t2,_,_)) -> t1 :=: t2) res let newCons = concat $ map (\((_,c1,_) :=: (_,c2,_)) -> c1 ++ c2) res let subsLst = concat $ map (\((_,_,s1) :=: (_,_,s2)) -> s1 ++ s2) res let subs = fromDisjointList subsLst return (cons' ++ newCons, subs) -- |For terms a, b returns True iff a occurs somewhere in b
556
processCons :: Monad m => Cons -> IdxMonad m (Cons, Subs) processCons cons = do -- simplify terms res <- mapMCons applyDimGens cons -- extract simplified constraints, new constrs and substitutions from result let cons' = map (\((t1,_,_) :=: (t2,_,_)) -> t1 :=: t2) res let newCons = concat $ map (\((_,c1,_) :=: (_,c2,_)) -> c1 ++ c2) res let subsLst = concat $ map (\((_,_,s1) :=: (_,_,s2)) -> s1 ++ s2) res let subs = fromDisjointList subsLst return (cons' ++ newCons, subs) -- |For terms a, b returns True iff a occurs somewhere in b
556
processCons cons = do -- simplify terms res <- mapMCons applyDimGens cons -- extract simplified constraints, new constrs and substitutions from result let cons' = map (\((t1,_,_) :=: (t2,_,_)) -> t1 :=: t2) res let newCons = concat $ map (\((_,c1,_) :=: (_,c2,_)) -> c1 ++ c2) res let subsLst = concat $ map (\((_,_,s1) :=: (_,_,s2)) -> s1 ++ s2) res let subs = fromDisjointList subsLst return (cons' ++ newCons, subs) -- |For terms a, b returns True iff a occurs somewhere in b
498
false
true
4
12
115
233
130
103
null
null
LouisJenkinsCS/Minimal-JVM
MateVMRuntime/MockBlockAllocation.hs
bsd-3-clause
test1 :: ((Ptr b, GcState), AllocM) test1 = let x = runStateT (allocGen0 GC.mkGen0 12) gcState1 y = runStateT x emptyAllocM in runIdentity y
161
test1 :: ((Ptr b, GcState), AllocM) test1 = let x = runStateT (allocGen0 GC.mkGen0 12) gcState1 y = runStateT x emptyAllocM in runIdentity y
161
test1 = let x = runStateT (allocGen0 GC.mkGen0 12) gcState1 y = runStateT x emptyAllocM in runIdentity y
124
false
true
0
12
44
65
33
32
null
null
ku-fpg/sunroof-compiler
Language/Sunroof/JavaScript.hs
bsd-3-clause
-- | Create a anonymous function to scope all effects -- in the given block of statement. scopeForEffect :: [Stmt] -> Expr scopeForEffect stmts = Apply (ExprE $ Function [] stmts) []
184
scopeForEffect :: [Stmt] -> Expr scopeForEffect stmts = Apply (ExprE $ Function [] stmts) []
92
scopeForEffect stmts = Apply (ExprE $ Function [] stmts) []
59
true
true
0
9
33
44
23
21
null
null
gibiansky/IHaskell
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Layout/Common.hs
mit
justifyItemsProps = ["flex-start", "flex-end", "center"] ++ cssProps
68
justifyItemsProps = ["flex-start", "flex-end", "center"] ++ cssProps
68
justifyItemsProps = ["flex-start", "flex-end", "center"] ++ cssProps
68
false
false
0
6
6
19
11
8
null
null
meiersi/scyther-proof
src/Scyther/Equalities.hs
gpl-3.0
substArbMsgEq :: Equalities -> ArbMsgEq -> MsgEq substArbMsgEq eqs = substAMID eqs *** substMsg eqs
99
substArbMsgEq :: Equalities -> ArbMsgEq -> MsgEq substArbMsgEq eqs = substAMID eqs *** substMsg eqs
99
substArbMsgEq eqs = substAMID eqs *** substMsg eqs
50
false
true
0
6
14
32
15
17
null
null
vehk/Indoril
src/Indoril.hs
bsd-3-clause
readIdent :: FilePath -> IO String readIdent s = do i <- try (readFile s) :: IO (Either IOException String) case i of Left a -> unless (null s) (putStrLn "Warning: could not read ident file.") >> return "" Right b -> return b -- |Bracket function around Bot. Create a Bot with the given options, -- connect to the IRC socket, run the bot and - finally - close the socket -- on death.
425
readIdent :: FilePath -> IO String readIdent s = do i <- try (readFile s) :: IO (Either IOException String) case i of Left a -> unless (null s) (putStrLn "Warning: could not read ident file.") >> return "" Right b -> return b -- |Bracket function around Bot. Create a Bot with the given options, -- connect to the IRC socket, run the bot and - finally - close the socket -- on death.
425
readIdent s = do i <- try (readFile s) :: IO (Either IOException String) case i of Left a -> unless (null s) (putStrLn "Warning: could not read ident file.") >> return "" Right b -> return b -- |Bracket function around Bot. Create a Bot with the given options, -- connect to the IRC socket, run the bot and - finally - close the socket -- on death.
390
false
true
0
13
116
106
50
56
null
null
lightquake/sym
src/Parser/RPN.hs
bsd-3-clause
binary :: (AST -> AST -> AST) -> RPNParser () binary f = do stack <- getState case stack of (x:y:xs) -> setState $ f y x:xs _ -> fail "stack underflow on binary op"
188
binary :: (AST -> AST -> AST) -> RPNParser () binary f = do stack <- getState case stack of (x:y:xs) -> setState $ f y x:xs _ -> fail "stack underflow on binary op"
188
binary f = do stack <- getState case stack of (x:y:xs) -> setState $ f y x:xs _ -> fail "stack underflow on binary op"
142
false
true
0
13
58
92
43
49
null
null
bergmark/fclabels
test/TestSuite.hs
bsd-3-clause
record11 = Record 11 Nothing newtype0 (Left 1)
46
record11 = Record 11 Nothing newtype0 (Left 1)
46
record11 = Record 11 Nothing newtype0 (Left 1)
46
false
false
0
7
7
21
10
11
null
null
jaspervdj/dcpu16-hs
src/Assembler/Parser.hs
bsd-3-clause
label :: Parser Label label = P.char ':' *> until1 isSpace
58
label :: Parser Label label = P.char ':' *> until1 isSpace
58
label = P.char ':' *> until1 isSpace
36
false
true
0
7
10
26
12
14
null
null
kawu/factorized-tag-parser
src/NLP/Partage/AStar/HeuristicNew.hs
bsd-2-clause
subCost :: (Ord n, Ord t, Num w) => D.DAG (O.Node n (Maybe t)) w -- ^ Grammar DAG -> D.DID -- ^ ID of the DAG node -> (Bag t, w) subCost dag = cost where cost = Memo.wrap D.DID D.unDID Memo.integral cost' cost' i = case labelValue i dag of Nothing -> error "subCost: incorrect ID" Just (x, v) -> case x of O.Term (Just t) -> (pocket t, v) _ -> L.foldl' add2 (bagEmpty, v) [ Arr.second (+w) (cost j) | (j, w) <- D.edges i dag ] -------------------------------- -- Heuristic: Super Tree Cost -------------------------------- -- | Compute the bags of terminals and the corresponding (minimal) weights -- for the individual super-trees surrounding the given DAG node.
777
subCost :: (Ord n, Ord t, Num w) => D.DAG (O.Node n (Maybe t)) w -- ^ Grammar DAG -> D.DID -- ^ ID of the DAG node -> (Bag t, w) subCost dag = cost where cost = Memo.wrap D.DID D.unDID Memo.integral cost' cost' i = case labelValue i dag of Nothing -> error "subCost: incorrect ID" Just (x, v) -> case x of O.Term (Just t) -> (pocket t, v) _ -> L.foldl' add2 (bagEmpty, v) [ Arr.second (+w) (cost j) | (j, w) <- D.edges i dag ] -------------------------------- -- Heuristic: Super Tree Cost -------------------------------- -- | Compute the bags of terminals and the corresponding (minimal) weights -- for the individual super-trees surrounding the given DAG node.
777
subCost dag = cost where cost = Memo.wrap D.DID D.unDID Memo.integral cost' cost' i = case labelValue i dag of Nothing -> error "subCost: incorrect ID" Just (x, v) -> case x of O.Term (Just t) -> (pocket t, v) _ -> L.foldl' add2 (bagEmpty, v) [ Arr.second (+w) (cost j) | (j, w) <- D.edges i dag ] -------------------------------- -- Heuristic: Super Tree Cost -------------------------------- -- | Compute the bags of terminals and the corresponding (minimal) weights -- for the individual super-trees surrounding the given DAG node.
601
false
true
2
16
233
256
127
129
null
null
piyush-kurur/shakespeare
shakespeare-text/test/ShakespeareTextTest.hs
bsd-2-clause
render (Sub SubUrl) qs = pack "suburl" `mappend` showParams qs
62
render (Sub SubUrl) qs = pack "suburl" `mappend` showParams qs
62
render (Sub SubUrl) qs = pack "suburl" `mappend` showParams qs
62
false
false
0
7
9
29
14
15
null
null
raventid/coursera_learning
haskell/will_kurt/24.4_strict_io.hs
mit
countsText :: (Int, Int, Int) -> T.Text countsText (cc, wc, lc) = T.pack $ unwords [ "chars:" , show cc , "words:" , show wc , "lines:" , show lc ]
405
countsText :: (Int, Int, Int) -> T.Text countsText (cc, wc, lc) = T.pack $ unwords [ "chars:" , show cc , "words:" , show wc , "lines:" , show lc ]
405
countsText (cc, wc, lc) = T.pack $ unwords [ "chars:" , show cc , "words:" , show wc , "lines:" , show lc ]
365
false
true
0
8
288
74
41
33
null
null
forgit/Rosalind
pdst.hs
gpl-2.0
printM = mapM_ (putStrLn . unwords . map show)
46
printM = mapM_ (putStrLn . unwords . map show)
46
printM = mapM_ (putStrLn . unwords . map show)
46
false
false
1
8
8
27
11
16
null
null
lihuanglx/disjoint-intersection
src/Target/TypeCheck.hs
bsd-3-clause
step (Project e i) = case e of (Pair e1 e2) -> return $ if i == 1 then e1 else e2 _ -> do e' <- step e return $ Project e' i
146
step (Project e i) = case e of (Pair e1 e2) -> return $ if i == 1 then e1 else e2 _ -> do e' <- step e return $ Project e' i
146
step (Project e i) = case e of (Pair e1 e2) -> return $ if i == 1 then e1 else e2 _ -> do e' <- step e return $ Project e' i
146
false
false
0
11
55
79
38
41
null
null
brodyberg/Notes
csv/csv1/src/Prettify.hs
mit
simpleEscapes :: [(Char, String)] simpleEscapes = zipWith ch "\b\n\f\r\t\\\"/" "bnfrt\\\"/" where ch a b = (a, ['\\',b])
124
simpleEscapes :: [(Char, String)] simpleEscapes = zipWith ch "\b\n\f\r\t\\\"/" "bnfrt\\\"/" where ch a b = (a, ['\\',b])
124
simpleEscapes = zipWith ch "\b\n\f\r\t\\\"/" "bnfrt\\\"/" where ch a b = (a, ['\\',b])
90
false
true
0
6
20
51
29
22
null
null
siddhanathan/ghc
compiler/utils/Outputable.hs
bsd-3-clause
alwaysQualifyPackages :: QueryQualifyPackage alwaysQualifyPackages _ = True
75
alwaysQualifyPackages :: QueryQualifyPackage alwaysQualifyPackages _ = True
75
alwaysQualifyPackages _ = True
30
false
true
0
5
6
14
7
7
null
null
olorin/amazonka
amazonka-redshift/gen/Network/AWS/Redshift/Types/Product.hs
mpl-2.0
-- | Creates a value of 'ReservedNode' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'rnState' -- -- * 'rnCurrencyCode' -- -- * 'rnStartTime' -- -- * 'rnNodeCount' -- -- * 'rnReservedNodeId' -- -- * 'rnReservedNodeOfferingId' -- -- * 'rnRecurringCharges' -- -- * 'rnOfferingType' -- -- * 'rnUsagePrice' -- -- * 'rnNodeType' -- -- * 'rnFixedPrice' -- -- * 'rnDuration' reservedNode :: ReservedNode reservedNode = ReservedNode' { _rnState = Nothing , _rnCurrencyCode = Nothing , _rnStartTime = Nothing , _rnNodeCount = Nothing , _rnReservedNodeId = Nothing , _rnReservedNodeOfferingId = Nothing , _rnRecurringCharges = Nothing , _rnOfferingType = Nothing , _rnUsagePrice = Nothing , _rnNodeType = Nothing , _rnFixedPrice = Nothing , _rnDuration = Nothing }
901
reservedNode :: ReservedNode reservedNode = ReservedNode' { _rnState = Nothing , _rnCurrencyCode = Nothing , _rnStartTime = Nothing , _rnNodeCount = Nothing , _rnReservedNodeId = Nothing , _rnReservedNodeOfferingId = Nothing , _rnRecurringCharges = Nothing , _rnOfferingType = Nothing , _rnUsagePrice = Nothing , _rnNodeType = Nothing , _rnFixedPrice = Nothing , _rnDuration = Nothing }
446
reservedNode = ReservedNode' { _rnState = Nothing , _rnCurrencyCode = Nothing , _rnStartTime = Nothing , _rnNodeCount = Nothing , _rnReservedNodeId = Nothing , _rnReservedNodeOfferingId = Nothing , _rnRecurringCharges = Nothing , _rnOfferingType = Nothing , _rnUsagePrice = Nothing , _rnNodeType = Nothing , _rnFixedPrice = Nothing , _rnDuration = Nothing }
413
true
true
1
7
192
119
83
36
null
null
danr/hipspec
testsuite/prod/zeno_version/PropT22.hs
gpl-3.0
_ && _ = False
17
_ && _ = False
17
_ && _ = False
17
false
false
0
5
7
12
5
7
null
null
mzini/termlib
Termlib/Rule.hs
gpl-3.0
rewriteAnyRhs :: [Rule] -> [Rule] -> Maybe (Rule, Rule) rewriteAnyRhs ss rs = Maybe.listToMaybe $ Maybe.mapMaybe (flip rewriteRhsAnyRule rs) ss
143
rewriteAnyRhs :: [Rule] -> [Rule] -> Maybe (Rule, Rule) rewriteAnyRhs ss rs = Maybe.listToMaybe $ Maybe.mapMaybe (flip rewriteRhsAnyRule rs) ss
143
rewriteAnyRhs ss rs = Maybe.listToMaybe $ Maybe.mapMaybe (flip rewriteRhsAnyRule rs) ss
87
false
true
0
8
19
60
31
29
null
null
philopon/memcached-binary
src/Database/Memcached/Binary/Common.hs
mit
- | get value/change expiry. getAndTouch_ :: Expiry -> Key -> I.Connection -> IO (HasReturn Value) getAndTouch_ e k = I.useConnection $ I.touch (\_ v -> successHasReturn v) failureHasReturn opGAT k e
205
getAndTouch_ :: Expiry -> Key -> I.Connection -> IO (HasReturn Value) getAndTouch_ e k = I.useConnection $ I.touch (\_ v -> successHasReturn v) failureHasReturn opGAT k e
174
getAndTouch_ e k = I.useConnection $ I.touch (\_ v -> successHasReturn v) failureHasReturn opGAT k e
104
true
true
1
10
37
73
38
35
null
null
elieux/ghc
compiler/hsSyn/HsImpExp.hs
bsd-3-clause
pprImpExp :: (HasOccName name, OutputableBndr name) => name -> SDoc pprImpExp name = type_pref <+> pprPrefixOcc name where occ = occName name type_pref | isTcOcc occ && isSymOcc occ = ptext (sLit "type") | otherwise = empty
267
pprImpExp :: (HasOccName name, OutputableBndr name) => name -> SDoc pprImpExp name = type_pref <+> pprPrefixOcc name where occ = occName name type_pref | isTcOcc occ && isSymOcc occ = ptext (sLit "type") | otherwise = empty
267
pprImpExp name = type_pref <+> pprPrefixOcc name where occ = occName name type_pref | isTcOcc occ && isSymOcc occ = ptext (sLit "type") | otherwise = empty
199
false
true
2
9
80
100
44
56
null
null
phischu/fragnix
builtins/base/Foreign.C.Error.hs
bsd-3-clause
eSHUTDOWN = Errno (108)
29
eSHUTDOWN = Errno (108)
29
eSHUTDOWN = Errno (108)
29
false
false
0
6
9
12
6
6
null
null
csrhodes/pandoc
pandoc.hs
gpl-2.0
-- | Defaults for command-line options. defaultOpts :: Opt defaultOpts = Opt { optTabStop = 4 , optPreserveTabs = False , optStandalone = False , optReader = "" -- null for default reader , optWriter = "" -- null for default writer , optParseRaw = False , optTableOfContents = False , optTransforms = [] , optTemplate = Nothing , optVariables = [] , optMetadata = M.empty , optOutputFile = "-" -- "-" means stdout , optNumberSections = False , optNumberOffset = [0,0,0,0,0,0] , optSectionDivs = False , optIncremental = False , optSelfContained = False , optSmart = False , optOldDashes = False , optHtml5 = False , optHtmlQTags = False , optHighlight = True , optHighlightStyle = pygments , optChapters = False , optHTMLMathMethod = PlainMath , optReferenceODT = Nothing , optReferenceDocx = Nothing , optEpubStylesheet = Nothing , optEpubMetadata = "" , optEpubFonts = [] , optEpubChapterLevel = 1 , optTOCDepth = 3 , optDumpArgs = False , optIgnoreArgs = False , optVerbose = False , optReferenceLinks = False , optWrapText = True , optColumns = 72 , optFilters = [] , optEmailObfuscation = JavascriptObfuscation , optIdentifierPrefix = "" , optIndentedCodeClasses = [] , optDataDir = Nothing , optCiteMethod = Citeproc , optListings = False , optLaTeXEngine = "pdflatex" , optLaTeXEngineArgs = [] , optSlideLevel = Nothing , optSetextHeaders = True , optAscii = False , optTeXLigatures = True , optDefaultImageExtension = "" , optExtractMedia = Nothing , optTrace = False , optTrackChanges = AcceptChanges , optKaTeXStylesheet = Nothing , optKaTeXJS = Nothing }
2,401
defaultOpts :: Opt defaultOpts = Opt { optTabStop = 4 , optPreserveTabs = False , optStandalone = False , optReader = "" -- null for default reader , optWriter = "" -- null for default writer , optParseRaw = False , optTableOfContents = False , optTransforms = [] , optTemplate = Nothing , optVariables = [] , optMetadata = M.empty , optOutputFile = "-" -- "-" means stdout , optNumberSections = False , optNumberOffset = [0,0,0,0,0,0] , optSectionDivs = False , optIncremental = False , optSelfContained = False , optSmart = False , optOldDashes = False , optHtml5 = False , optHtmlQTags = False , optHighlight = True , optHighlightStyle = pygments , optChapters = False , optHTMLMathMethod = PlainMath , optReferenceODT = Nothing , optReferenceDocx = Nothing , optEpubStylesheet = Nothing , optEpubMetadata = "" , optEpubFonts = [] , optEpubChapterLevel = 1 , optTOCDepth = 3 , optDumpArgs = False , optIgnoreArgs = False , optVerbose = False , optReferenceLinks = False , optWrapText = True , optColumns = 72 , optFilters = [] , optEmailObfuscation = JavascriptObfuscation , optIdentifierPrefix = "" , optIndentedCodeClasses = [] , optDataDir = Nothing , optCiteMethod = Citeproc , optListings = False , optLaTeXEngine = "pdflatex" , optLaTeXEngineArgs = [] , optSlideLevel = Nothing , optSetextHeaders = True , optAscii = False , optTeXLigatures = True , optDefaultImageExtension = "" , optExtractMedia = Nothing , optTrace = False , optTrackChanges = AcceptChanges , optKaTeXStylesheet = Nothing , optKaTeXJS = Nothing }
2,361
defaultOpts = Opt { optTabStop = 4 , optPreserveTabs = False , optStandalone = False , optReader = "" -- null for default reader , optWriter = "" -- null for default writer , optParseRaw = False , optTableOfContents = False , optTransforms = [] , optTemplate = Nothing , optVariables = [] , optMetadata = M.empty , optOutputFile = "-" -- "-" means stdout , optNumberSections = False , optNumberOffset = [0,0,0,0,0,0] , optSectionDivs = False , optIncremental = False , optSelfContained = False , optSmart = False , optOldDashes = False , optHtml5 = False , optHtmlQTags = False , optHighlight = True , optHighlightStyle = pygments , optChapters = False , optHTMLMathMethod = PlainMath , optReferenceODT = Nothing , optReferenceDocx = Nothing , optEpubStylesheet = Nothing , optEpubMetadata = "" , optEpubFonts = [] , optEpubChapterLevel = 1 , optTOCDepth = 3 , optDumpArgs = False , optIgnoreArgs = False , optVerbose = False , optReferenceLinks = False , optWrapText = True , optColumns = 72 , optFilters = [] , optEmailObfuscation = JavascriptObfuscation , optIdentifierPrefix = "" , optIndentedCodeClasses = [] , optDataDir = Nothing , optCiteMethod = Citeproc , optListings = False , optLaTeXEngine = "pdflatex" , optLaTeXEngineArgs = [] , optSlideLevel = Nothing , optSetextHeaders = True , optAscii = False , optTeXLigatures = True , optDefaultImageExtension = "" , optExtractMedia = Nothing , optTrace = False , optTrackChanges = AcceptChanges , optKaTeXStylesheet = Nothing , optKaTeXJS = Nothing }
2,342
true
true
0
8
1,090
395
259
136
null
null
mcschroeder/ghc
compiler/hsSyn/HsPat.hs
bsd-3-clause
hsPatNeedsParens (SigPatOut {}) = True
43
hsPatNeedsParens (SigPatOut {}) = True
43
hsPatNeedsParens (SigPatOut {}) = True
43
false
false
0
7
9
16
8
8
null
null
hyPiRion/swearjure
src/Swearjure/AST.hs
gpl-3.0
typeName' (EChar _) = "Char"
28
typeName' (EChar _) = "Char"
28
typeName' (EChar _) = "Char"
28
false
false
0
6
4
16
7
9
null
null
aaronc/Idris-dev
src/Idris/AbsSyntaxTree.hs
bsd-3-clause
{-! dg instance Binary PTerm deriving instance NFData PTerm !-} mapPT :: (PTerm -> PTerm) -> PTerm -> PTerm mapPT f t = f (mpt t) where mpt (PLam fc n nfc t s) = PLam fc n nfc (mapPT f t) (mapPT f s) mpt (PPi p n nfc t s) = PPi p n nfc (mapPT f t) (mapPT f s) mpt (PLet fc n nfc ty v s) = PLet fc n nfc (mapPT f ty) (mapPT f v) (mapPT f s) mpt (PRewrite fc t s g) = PRewrite fc (mapPT f t) (mapPT f s) (fmap (mapPT f) g) mpt (PApp fc t as) = PApp fc (mapPT f t) (map (fmap (mapPT f)) as) mpt (PAppBind fc t as) = PAppBind fc (mapPT f t) (map (fmap (mapPT f)) as) mpt (PCase fc c os) = PCase fc (mapPT f c) (map (pmap (mapPT f)) os) mpt (PIfThenElse fc c t e) = PIfThenElse fc (mapPT f c) (mapPT f t) (mapPT f e) mpt (PTyped l r) = PTyped (mapPT f l) (mapPT f r) mpt (PPair fc hls p l r) = PPair fc hls p (mapPT f l) (mapPT f r) mpt (PDPair fc hls p l t r) = PDPair fc hls p (mapPT f l) (mapPT f t) (mapPT f r) mpt (PAlternative ns a as) = PAlternative ns a (map (mapPT f) as) mpt (PHidden t) = PHidden (mapPT f t) mpt (PDoBlock ds) = PDoBlock (map (fmap (mapPT f)) ds) mpt (PProof ts) = PProof (map (fmap (mapPT f)) ts) mpt (PTactics ts) = PTactics (map (fmap (mapPT f)) ts) mpt (PUnifyLog tm) = PUnifyLog (mapPT f tm) mpt (PDisamb ns tm) = PDisamb ns (mapPT f tm) mpt (PNoImplicits tm) = PNoImplicits (mapPT f tm) mpt (PGoal fc r n sc) = PGoal fc (mapPT f r) n (mapPT f sc) mpt x = x
1,460
mapPT :: (PTerm -> PTerm) -> PTerm -> PTerm mapPT f t = f (mpt t) where mpt (PLam fc n nfc t s) = PLam fc n nfc (mapPT f t) (mapPT f s) mpt (PPi p n nfc t s) = PPi p n nfc (mapPT f t) (mapPT f s) mpt (PLet fc n nfc ty v s) = PLet fc n nfc (mapPT f ty) (mapPT f v) (mapPT f s) mpt (PRewrite fc t s g) = PRewrite fc (mapPT f t) (mapPT f s) (fmap (mapPT f) g) mpt (PApp fc t as) = PApp fc (mapPT f t) (map (fmap (mapPT f)) as) mpt (PAppBind fc t as) = PAppBind fc (mapPT f t) (map (fmap (mapPT f)) as) mpt (PCase fc c os) = PCase fc (mapPT f c) (map (pmap (mapPT f)) os) mpt (PIfThenElse fc c t e) = PIfThenElse fc (mapPT f c) (mapPT f t) (mapPT f e) mpt (PTyped l r) = PTyped (mapPT f l) (mapPT f r) mpt (PPair fc hls p l r) = PPair fc hls p (mapPT f l) (mapPT f r) mpt (PDPair fc hls p l t r) = PDPair fc hls p (mapPT f l) (mapPT f t) (mapPT f r) mpt (PAlternative ns a as) = PAlternative ns a (map (mapPT f) as) mpt (PHidden t) = PHidden (mapPT f t) mpt (PDoBlock ds) = PDoBlock (map (fmap (mapPT f)) ds) mpt (PProof ts) = PProof (map (fmap (mapPT f)) ts) mpt (PTactics ts) = PTactics (map (fmap (mapPT f)) ts) mpt (PUnifyLog tm) = PUnifyLog (mapPT f tm) mpt (PDisamb ns tm) = PDisamb ns (mapPT f tm) mpt (PNoImplicits tm) = PNoImplicits (mapPT f tm) mpt (PGoal fc r n sc) = PGoal fc (mapPT f r) n (mapPT f sc) mpt x = x
1,395
mapPT f t = f (mpt t) where mpt (PLam fc n nfc t s) = PLam fc n nfc (mapPT f t) (mapPT f s) mpt (PPi p n nfc t s) = PPi p n nfc (mapPT f t) (mapPT f s) mpt (PLet fc n nfc ty v s) = PLet fc n nfc (mapPT f ty) (mapPT f v) (mapPT f s) mpt (PRewrite fc t s g) = PRewrite fc (mapPT f t) (mapPT f s) (fmap (mapPT f) g) mpt (PApp fc t as) = PApp fc (mapPT f t) (map (fmap (mapPT f)) as) mpt (PAppBind fc t as) = PAppBind fc (mapPT f t) (map (fmap (mapPT f)) as) mpt (PCase fc c os) = PCase fc (mapPT f c) (map (pmap (mapPT f)) os) mpt (PIfThenElse fc c t e) = PIfThenElse fc (mapPT f c) (mapPT f t) (mapPT f e) mpt (PTyped l r) = PTyped (mapPT f l) (mapPT f r) mpt (PPair fc hls p l r) = PPair fc hls p (mapPT f l) (mapPT f r) mpt (PDPair fc hls p l t r) = PDPair fc hls p (mapPT f l) (mapPT f t) (mapPT f r) mpt (PAlternative ns a as) = PAlternative ns a (map (mapPT f) as) mpt (PHidden t) = PHidden (mapPT f t) mpt (PDoBlock ds) = PDoBlock (map (fmap (mapPT f)) ds) mpt (PProof ts) = PProof (map (fmap (mapPT f)) ts) mpt (PTactics ts) = PTactics (map (fmap (mapPT f)) ts) mpt (PUnifyLog tm) = PUnifyLog (mapPT f tm) mpt (PDisamb ns tm) = PDisamb ns (mapPT f tm) mpt (PNoImplicits tm) = PNoImplicits (mapPT f tm) mpt (PGoal fc r n sc) = PGoal fc (mapPT f r) n (mapPT f sc) mpt x = x
1,351
true
true
0
13
394
927
454
473
null
null
Verites/verigraph
tests/Category/TypedGraph/CocompleteSpec.hs
apache-2.0
tg :: TypeGraph tg = makeTypeGraph ["N"] [("E", "N", "N")]
58
tg :: TypeGraph tg = makeTypeGraph ["N"] [("E", "N", "N")]
58
tg = makeTypeGraph ["N"] [("E", "N", "N")]
42
false
true
0
7
9
31
18
13
null
null
bixuanzju/SCore
src/Template.hs
gpl-3.0
showNode (NSupercomb name _ _) = iStr ("NSupercomb " ++ name)
61
showNode (NSupercomb name _ _) = iStr ("NSupercomb " ++ name)
61
showNode (NSupercomb name _ _) = iStr ("NSupercomb " ++ name)
61
false
false
0
7
10
29
14
15
null
null
capitanbatata/sandbox
pw-lenses/src/CompositionalZooming.hs
gpl-3.0
liftMaybe :: Biapplicative p => (st -> p a st) -> Maybe st -> p (Maybe a) (Maybe st) liftMaybe _ Nothing = bipure Nothing Nothing
135
liftMaybe :: Biapplicative p => (st -> p a st) -> Maybe st -> p (Maybe a) (Maybe st) liftMaybe _ Nothing = bipure Nothing Nothing
135
liftMaybe _ Nothing = bipure Nothing Nothing
46
false
true
0
10
31
71
33
38
null
null
keera-studios/hsQt
extra-pkgs/Glome/Qt/Glome/Solid.hs
bsd-2-clause
nearest_packetresult :: PacketResult -> PacketResult -> PacketResult nearest_packetresult !(PacketResult a1 a2 a3 a4) !(PacketResult b1 b2 b3 b4) = PacketResult (nearest a1 b1) (nearest a2 b2) (nearest a3 b3) (nearest a4 b4)
267
nearest_packetresult :: PacketResult -> PacketResult -> PacketResult nearest_packetresult !(PacketResult a1 a2 a3 a4) !(PacketResult b1 b2 b3 b4) = PacketResult (nearest a1 b1) (nearest a2 b2) (nearest a3 b3) (nearest a4 b4)
267
nearest_packetresult !(PacketResult a1 a2 a3 a4) !(PacketResult b1 b2 b3 b4) = PacketResult (nearest a1 b1) (nearest a2 b2) (nearest a3 b3) (nearest a4 b4)
198
false
true
0
11
74
102
47
55
null
null
svenkeidel/sdl2
src/SDL/Exception.hs
bsd-3-clause
throwIf :: MonadIO m => (a -> Bool) -> Text -> Text -> m a -> m a throwIf f caller funName m = do a <- m liftIO $ when (f a) $ (SDLCallFailed caller funName <$> getError) >>= throwIO return a
201
throwIf :: MonadIO m => (a -> Bool) -> Text -> Text -> m a -> m a throwIf f caller funName m = do a <- m liftIO $ when (f a) $ (SDLCallFailed caller funName <$> getError) >>= throwIO return a
201
throwIf f caller funName m = do a <- m liftIO $ when (f a) $ (SDLCallFailed caller funName <$> getError) >>= throwIO return a
135
false
true
0
13
52
110
50
60
null
null
rumblesan/improviz
src/Language/Interpreter.hs
bsd-3-clause
assignApplicationArgs :: [FuncArg] -> [Value] -> Maybe Lambda -> InterpreterProcess Value assignApplicationArgs funcArgs argValues mbLmb = do zipWithM_ (assignArg mbLmb) funcArgs (argValues ++ repeat Null) setVariable "args" $ VList argValues return Null where assignArg _ (VarArg name defaultValue) v = case v of Null -> setVariable name defaultValue _ -> setVariable name v assignArg ml (BlockArg name) _ = setVariable name $ maybe Null LambdaRef ml
475
assignApplicationArgs :: [FuncArg] -> [Value] -> Maybe Lambda -> InterpreterProcess Value assignApplicationArgs funcArgs argValues mbLmb = do zipWithM_ (assignArg mbLmb) funcArgs (argValues ++ repeat Null) setVariable "args" $ VList argValues return Null where assignArg _ (VarArg name defaultValue) v = case v of Null -> setVariable name defaultValue _ -> setVariable name v assignArg ml (BlockArg name) _ = setVariable name $ maybe Null LambdaRef ml
475
assignApplicationArgs funcArgs argValues mbLmb = do zipWithM_ (assignArg mbLmb) funcArgs (argValues ++ repeat Null) setVariable "args" $ VList argValues return Null where assignArg _ (VarArg name defaultValue) v = case v of Null -> setVariable name defaultValue _ -> setVariable name v assignArg ml (BlockArg name) _ = setVariable name $ maybe Null LambdaRef ml
383
false
true
0
10
89
171
79
92
null
null
tonyday567/mvc-todo
src/Todo/Controllers.hs
bsd-3-clause
ctlNewItem :: Output Action -> Element -> JSVal -> IO () ctlNewItem o el ev = do code <- keyCode ev value <- getValue el if toKeys code == Enter && value /= mempty then (sendAction (NewItem value) o) else pure ()
226
ctlNewItem :: Output Action -> Element -> JSVal -> IO () ctlNewItem o el ev = do code <- keyCode ev value <- getValue el if toKeys code == Enter && value /= mempty then (sendAction (NewItem value) o) else pure ()
226
ctlNewItem o el ev = do code <- keyCode ev value <- getValue el if toKeys code == Enter && value /= mempty then (sendAction (NewItem value) o) else pure ()
169
false
true
0
12
55
108
49
59
null
null
erochest/popvox-scrape
CleanDime.hs
apache-2.0
clean30233412 :: T.Text -> T.Text clean30233412 = T.replace "\"I\",\"F\"" "\"I\",\"F\",\"\"" . T.replace "\"NY\",\"12\",0," "\"NY\",\"12\"," . T.replace "\"\",\"\"j" "\",\"j" . T.replace "\"C003700072012\"," "" . recipComm . federa'
302
clean30233412 :: T.Text -> T.Text clean30233412 = T.replace "\"I\",\"F\"" "\"I\",\"F\",\"\"" . T.replace "\"NY\",\"12\",0," "\"NY\",\"12\"," . T.replace "\"\",\"\"j" "\",\"j" . T.replace "\"C003700072012\"," "" . recipComm . federa'
302
clean30233412 = T.replace "\"I\",\"F\"" "\"I\",\"F\",\"\"" . T.replace "\"NY\",\"12\",0," "\"NY\",\"12\"," . T.replace "\"\",\"\"j" "\",\"j" . T.replace "\"C003700072012\"," "" . recipComm . federa'
268
false
true
5
8
95
79
33
46
null
null
ghcjs/jsaddle-dom
src/JSDOM/Generated/Window.hs
mit
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Window.defaultstatus Mozilla Window.defaultstatus documentation> getDefaultstatus :: (MonadDOM m, FromJSString result) => Window -> m result getDefaultstatus self = liftDOM ((self ^. js "defaultstatus") >>= fromJSValUnchecked)
301
getDefaultstatus :: (MonadDOM m, FromJSString result) => Window -> m result getDefaultstatus self = liftDOM ((self ^. js "defaultstatus") >>= fromJSValUnchecked)
180
getDefaultstatus self = liftDOM ((self ^. js "defaultstatus") >>= fromJSValUnchecked)
87
true
true
0
10
46
57
29
28
null
null
rfranek/duckling
Duckling/Numeral/MY/Rules.hs
bsd-3-clause
ruleInteger :: Rule ruleInteger = Rule { name = "integer 0" , pattern = [ regex "\x101e\x102f\x1036\x100a|\x1019\x101b\x103e\x102d" ] , prod = \_ -> integer 0 }
176
ruleInteger :: Rule ruleInteger = Rule { name = "integer 0" , pattern = [ regex "\x101e\x102f\x1036\x100a|\x1019\x101b\x103e\x102d" ] , prod = \_ -> integer 0 }
176
ruleInteger = Rule { name = "integer 0" , pattern = [ regex "\x101e\x102f\x1036\x100a|\x1019\x101b\x103e\x102d" ] , prod = \_ -> integer 0 }
156
false
true
0
9
41
49
27
22
null
null
kmate/HaRe
old/refactorer/RefacFunDef.hs
bsd-3-clause
checkInWhere (wh@(Dec (HsPatBind _ (Pat (HsPId (HsVar (PNT (PN (UnQual i) _ ) _ _ ) ) ) ) _ rest)):ws) (exp1@(Exp (HsId (HsVar (PNT (PN (UnQual i2) _ ) _ _ ))))::HsExpP) = i == i2
769
checkInWhere (wh@(Dec (HsPatBind _ (Pat (HsPId (HsVar (PNT (PN (UnQual i) _ ) _ _ ) ) ) ) _ rest)):ws) (exp1@(Exp (HsId (HsVar (PNT (PN (UnQual i2) _ ) _ _ ))))::HsExpP) = i == i2
769
checkInWhere (wh@(Dec (HsPatBind _ (Pat (HsPId (HsVar (PNT (PN (UnQual i) _ ) _ _ ) ) ) ) _ rest)):ws) (exp1@(Exp (HsId (HsVar (PNT (PN (UnQual i2) _ ) _ _ ))))::HsExpP) = i == i2
769
false
false
1
24
626
141
71
70
null
null
yiannist/ganeti
src/Ganeti/DataCollectors.hs
bsd-2-clause
-- | The list of available builtin data collectors. collectors :: [DataCollector] collectors = [ cpuLoadCollector , xenCpuLoadCollector , diskStatsCollector , drdbCollector , instStatusCollector , lvCollector ] where f .&&. g = \x y -> f x y && g x y xenHypervisor = flip elem [XenPvm, XenHvm] xenCluster _ cfg = any xenHypervisor . clusterEnabledHypervisors $ configCluster cfg collectorConfig name cfg = let config = fromContainer . clusterDataCollectors $ configCluster cfg in findWithDefault mempty (UTF8.fromString name) config updateInterval name cfg = dataCollectorInterval $ collectorConfig name cfg activeConfig name cfg = dataCollectorActive $ collectorConfig name cfg diskStatsCollector = DataCollector Diskstats.dcName Diskstats.dcCategory Diskstats.dcKind (StatelessR Diskstats.dcReport) Nothing activeConfig updateInterval drdbCollector = DataCollector Drbd.dcName Drbd.dcCategory Drbd.dcKind (StatelessR Drbd.dcReport) Nothing activeConfig updateInterval instStatusCollector = DataCollector InstStatus.dcName InstStatus.dcCategory InstStatus.dcKind (StatelessR InstStatus.dcReport) Nothing (xenCluster .&&. activeConfig) updateInterval lvCollector = DataCollector Lv.dcName Lv.dcCategory Lv.dcKind (StatelessR Lv.dcReport) Nothing activeConfig updateInterval cpuLoadCollector = DataCollector CPUload.dcName CPUload.dcCategory CPUload.dcKind (StatefulR CPUload.dcReport) (Just CPUload.dcUpdate) activeConfig updateInterval xenCpuLoadCollector = DataCollector XenCpuLoad.dcName XenCpuLoad.dcCategory XenCpuLoad.dcKind (StatefulR XenCpuLoad.dcReport) (Just XenCpuLoad.dcUpdate) activeConfig updateInterval
1,817
collectors :: [DataCollector] collectors = [ cpuLoadCollector , xenCpuLoadCollector , diskStatsCollector , drdbCollector , instStatusCollector , lvCollector ] where f .&&. g = \x y -> f x y && g x y xenHypervisor = flip elem [XenPvm, XenHvm] xenCluster _ cfg = any xenHypervisor . clusterEnabledHypervisors $ configCluster cfg collectorConfig name cfg = let config = fromContainer . clusterDataCollectors $ configCluster cfg in findWithDefault mempty (UTF8.fromString name) config updateInterval name cfg = dataCollectorInterval $ collectorConfig name cfg activeConfig name cfg = dataCollectorActive $ collectorConfig name cfg diskStatsCollector = DataCollector Diskstats.dcName Diskstats.dcCategory Diskstats.dcKind (StatelessR Diskstats.dcReport) Nothing activeConfig updateInterval drdbCollector = DataCollector Drbd.dcName Drbd.dcCategory Drbd.dcKind (StatelessR Drbd.dcReport) Nothing activeConfig updateInterval instStatusCollector = DataCollector InstStatus.dcName InstStatus.dcCategory InstStatus.dcKind (StatelessR InstStatus.dcReport) Nothing (xenCluster .&&. activeConfig) updateInterval lvCollector = DataCollector Lv.dcName Lv.dcCategory Lv.dcKind (StatelessR Lv.dcReport) Nothing activeConfig updateInterval cpuLoadCollector = DataCollector CPUload.dcName CPUload.dcCategory CPUload.dcKind (StatefulR CPUload.dcReport) (Just CPUload.dcUpdate) activeConfig updateInterval xenCpuLoadCollector = DataCollector XenCpuLoad.dcName XenCpuLoad.dcCategory XenCpuLoad.dcKind (StatefulR XenCpuLoad.dcReport) (Just XenCpuLoad.dcUpdate) activeConfig updateInterval
1,765
collectors = [ cpuLoadCollector , xenCpuLoadCollector , diskStatsCollector , drdbCollector , instStatusCollector , lvCollector ] where f .&&. g = \x y -> f x y && g x y xenHypervisor = flip elem [XenPvm, XenHvm] xenCluster _ cfg = any xenHypervisor . clusterEnabledHypervisors $ configCluster cfg collectorConfig name cfg = let config = fromContainer . clusterDataCollectors $ configCluster cfg in findWithDefault mempty (UTF8.fromString name) config updateInterval name cfg = dataCollectorInterval $ collectorConfig name cfg activeConfig name cfg = dataCollectorActive $ collectorConfig name cfg diskStatsCollector = DataCollector Diskstats.dcName Diskstats.dcCategory Diskstats.dcKind (StatelessR Diskstats.dcReport) Nothing activeConfig updateInterval drdbCollector = DataCollector Drbd.dcName Drbd.dcCategory Drbd.dcKind (StatelessR Drbd.dcReport) Nothing activeConfig updateInterval instStatusCollector = DataCollector InstStatus.dcName InstStatus.dcCategory InstStatus.dcKind (StatelessR InstStatus.dcReport) Nothing (xenCluster .&&. activeConfig) updateInterval lvCollector = DataCollector Lv.dcName Lv.dcCategory Lv.dcKind (StatelessR Lv.dcReport) Nothing activeConfig updateInterval cpuLoadCollector = DataCollector CPUload.dcName CPUload.dcCategory CPUload.dcKind (StatefulR CPUload.dcReport) (Just CPUload.dcUpdate) activeConfig updateInterval xenCpuLoadCollector = DataCollector XenCpuLoad.dcName XenCpuLoad.dcCategory XenCpuLoad.dcKind (StatefulR XenCpuLoad.dcReport) (Just XenCpuLoad.dcUpdate) activeConfig updateInterval
1,735
true
true
5
10
365
451
213
238
null
null
anttisalonen/cgen
src/HaskellGen.hs
bsd-3-clause
paramNames :: Int -> [String] paramNames n = map ('p':) (map show [1..n])
73
paramNames :: Int -> [String] paramNames n = map ('p':) (map show [1..n])
73
paramNames n = map ('p':) (map show [1..n])
43
false
true
0
8
12
49
24
25
null
null
dbushenko/biblio
src/Lib.hs
bsd-3-clause
server' :: ConnectionPool -> String -> Server API' server' pool salt = server pool salt :<|> serveDirectory "static"
131
server' :: ConnectionPool -> String -> Server API' server' pool salt = server pool salt :<|> serveDirectory "static"
131
server' pool salt = server pool salt :<|> serveDirectory "static"
80
false
true
0
7
32
39
18
21
null
null
MnO2/hindley-milner
src/HM/Parser.hs
bsd-3-clause
lit :: Parser Term lit = do { i <- integer; return (Lit (fromInteger i)) }
74
lit :: Parser Term lit = do { i <- integer; return (Lit (fromInteger i)) }
74
lit = do { i <- integer; return (Lit (fromInteger i)) }
55
false
true
0
11
15
42
21
21
null
null
ezyang/ghc
testsuite/tests/arityanal/f12.hs
bsd-3-clause
f12 = let f g x = g x h = (+) in f h 4 5
56
f12 = let f g x = g x h = (+) in f h 4 5
56
f12 = let f g x = g x h = (+) in f h 4 5
56
false
false
0
9
32
39
19
20
null
null
WraithM/haskell-opaleye
src/Opaleye/Internal/PrimQuery.hs
bsd-3-clause
notExists :: PrimQuery -> PrimQuery -> PrimQuery notExists = Exists False
73
notExists :: PrimQuery -> PrimQuery -> PrimQuery notExists = Exists False
73
notExists = Exists False
24
false
true
0
6
10
22
11
11
null
null
kairuku/stack
src/Stack/BuildPlan.hs
bsd-3-clause
shadowMiniBuildPlan :: MiniBuildPlan -> Set PackageName -> (MiniBuildPlan, Map PackageName MiniPackageInfo) shadowMiniBuildPlan (MiniBuildPlan cv pkgs0) shadowed = (MiniBuildPlan cv $ Map.fromList met, Map.fromList unmet) where pkgs1 = Map.difference pkgs0 $ Map.fromSet (\_ -> ()) shadowed depsMet = flip execState Map.empty $ mapM_ (check Set.empty) (Map.keys pkgs1) check visited name | name `Set.member` visited = error $ "shadowMiniBuildPlan: cycle detected, your MiniBuildPlan is broken: " ++ show (visited, name) | otherwise = do m <- get case Map.lookup name m of Just x -> return x Nothing -> case Map.lookup name pkgs1 of Nothing | name `Set.member` shadowed -> return False -- In this case, we have to assume that we're -- constructing a build plan on a different OS or -- architecture, and therefore different packages -- are being chosen. The common example of this is -- the Win32 package. | otherwise -> return True Just mpi -> do let visited' = Set.insert name visited ress <- mapM (check visited') (Set.toList $ mpiPackageDeps mpi) let res = and ress modify $ \m' -> Map.insert name res m' return res (met, unmet) = partitionEithers $ map toEither $ Map.toList pkgs1 toEither pair@(name, _) = wrapper pair where wrapper = case Map.lookup name depsMet of Just True -> Left Just False -> Right Nothing -> assert False Right
1,979
shadowMiniBuildPlan :: MiniBuildPlan -> Set PackageName -> (MiniBuildPlan, Map PackageName MiniPackageInfo) shadowMiniBuildPlan (MiniBuildPlan cv pkgs0) shadowed = (MiniBuildPlan cv $ Map.fromList met, Map.fromList unmet) where pkgs1 = Map.difference pkgs0 $ Map.fromSet (\_ -> ()) shadowed depsMet = flip execState Map.empty $ mapM_ (check Set.empty) (Map.keys pkgs1) check visited name | name `Set.member` visited = error $ "shadowMiniBuildPlan: cycle detected, your MiniBuildPlan is broken: " ++ show (visited, name) | otherwise = do m <- get case Map.lookup name m of Just x -> return x Nothing -> case Map.lookup name pkgs1 of Nothing | name `Set.member` shadowed -> return False -- In this case, we have to assume that we're -- constructing a build plan on a different OS or -- architecture, and therefore different packages -- are being chosen. The common example of this is -- the Win32 package. | otherwise -> return True Just mpi -> do let visited' = Set.insert name visited ress <- mapM (check visited') (Set.toList $ mpiPackageDeps mpi) let res = and ress modify $ \m' -> Map.insert name res m' return res (met, unmet) = partitionEithers $ map toEither $ Map.toList pkgs1 toEither pair@(name, _) = wrapper pair where wrapper = case Map.lookup name depsMet of Just True -> Left Just False -> Right Nothing -> assert False Right
1,979
shadowMiniBuildPlan (MiniBuildPlan cv pkgs0) shadowed = (MiniBuildPlan cv $ Map.fromList met, Map.fromList unmet) where pkgs1 = Map.difference pkgs0 $ Map.fromSet (\_ -> ()) shadowed depsMet = flip execState Map.empty $ mapM_ (check Set.empty) (Map.keys pkgs1) check visited name | name `Set.member` visited = error $ "shadowMiniBuildPlan: cycle detected, your MiniBuildPlan is broken: " ++ show (visited, name) | otherwise = do m <- get case Map.lookup name m of Just x -> return x Nothing -> case Map.lookup name pkgs1 of Nothing | name `Set.member` shadowed -> return False -- In this case, we have to assume that we're -- constructing a build plan on a different OS or -- architecture, and therefore different packages -- are being chosen. The common example of this is -- the Win32 package. | otherwise -> return True Just mpi -> do let visited' = Set.insert name visited ress <- mapM (check visited') (Set.toList $ mpiPackageDeps mpi) let res = and ress modify $ \m' -> Map.insert name res m' return res (met, unmet) = partitionEithers $ map toEither $ Map.toList pkgs1 toEither pair@(name, _) = wrapper pair where wrapper = case Map.lookup name depsMet of Just True -> Left Just False -> Right Nothing -> assert False Right
1,831
false
true
7
23
856
467
226
241
null
null
spechub/Hets
Isabelle/IsaParse.hs
gpl-2.0
thmrefs :: Parser [Token] thmrefs = flat $ many1 (single thmref <|> fmap (const []) (bracketsP attributes))
109
thmrefs :: Parser [Token] thmrefs = flat $ many1 (single thmref <|> fmap (const []) (bracketsP attributes))
109
thmrefs = flat $ many1 (single thmref <|> fmap (const []) (bracketsP attributes))
83
false
true
2
11
18
54
26
28
null
null
ykst/MetaC
Language/Meta/C99/Parser.hs
mit
-- data ArrayDeclarator = -- ArrayDeclarator [TypeQualifier] (Maybe AssignmentExp) -- | StaticArrayDeclarator [TypeQualifier] AssignmentExp -- | PostStaticArrayDeclarator [TypeQualifier] AssignmentExp -- | VariableArrayDeclarator [TypeQualifier] arrayDeclaratorP :: TheParser ArrayDeclarator arrayDeclaratorP = symbol "[" >> ( {-ArrayDeclarator [] Nothing <$ symbol "]" <|> -} arrayDeclaratorP' <* symbol "]") where arrayDeclaratorP' :: TheParser ArrayDeclarator arrayDeclaratorP' = StaticArrayDeclarator <$> (keyword "static" >> many typeQualifierP) <*> assignmentExpP <|> (many typeQualifierP >>= \qualifiers -> PostStaticArrayDeclarator qualifiers <$> (keyword "static" >> assignmentExpP) <|> VariableArrayDeclarator qualifiers <$ keyword "*" <|> ArrayDeclarator qualifiers <$> optionMaybe assignmentExpP) -- data Pointer = -- Pointer (NonEmptyList [TypeQualifier])
1,008
arrayDeclaratorP :: TheParser ArrayDeclarator arrayDeclaratorP = symbol "[" >> ( {-ArrayDeclarator [] Nothing <$ symbol "]" <|> -} arrayDeclaratorP' <* symbol "]") where arrayDeclaratorP' :: TheParser ArrayDeclarator arrayDeclaratorP' = StaticArrayDeclarator <$> (keyword "static" >> many typeQualifierP) <*> assignmentExpP <|> (many typeQualifierP >>= \qualifiers -> PostStaticArrayDeclarator qualifiers <$> (keyword "static" >> assignmentExpP) <|> VariableArrayDeclarator qualifiers <$ keyword "*" <|> ArrayDeclarator qualifiers <$> optionMaybe assignmentExpP) -- data Pointer = -- Pointer (NonEmptyList [TypeQualifier])
746
arrayDeclaratorP = symbol "[" >> ( {-ArrayDeclarator [] Nothing <$ symbol "]" <|> -} arrayDeclaratorP' <* symbol "]") where arrayDeclaratorP' :: TheParser ArrayDeclarator arrayDeclaratorP' = StaticArrayDeclarator <$> (keyword "static" >> many typeQualifierP) <*> assignmentExpP <|> (many typeQualifierP >>= \qualifiers -> PostStaticArrayDeclarator qualifiers <$> (keyword "static" >> assignmentExpP) <|> VariableArrayDeclarator qualifiers <$ keyword "*" <|> ArrayDeclarator qualifiers <$> optionMaybe assignmentExpP) -- data Pointer = -- Pointer (NonEmptyList [TypeQualifier])
700
true
true
0
16
233
140
71
69
null
null
emptylambda/BLT
src/Boogie/AST.hs
gpl-3.0
-- | Type of a value valueType :: Value -> Type valueType (IntValue _) = IntType
80
valueType :: Value -> Type valueType (IntValue _) = IntType
59
valueType (IntValue _) = IntType
32
true
true
0
7
15
25
13
12
null
null
mitochon/hoosalind
src/problems/lgis.hs
mit
putInProgress [] = Nothing
26
putInProgress [] = Nothing
26
putInProgress [] = Nothing
26
false
false
0
6
3
11
5
6
null
null
GregorySchwartz/lineage
src/Main.hs
gpl-2.0
main :: IO () main = execParser opts >>= sharedTree where opts = info (helper <*> options) ( fullDesc <> progDesc "Create the lineage tree from a fasta file using shared\ \ mutations" <> header "lineage, Gregory W. Schwartz" )
265
main :: IO () main = execParser opts >>= sharedTree where opts = info (helper <*> options) ( fullDesc <> progDesc "Create the lineage tree from a fasta file using shared\ \ mutations" <> header "lineage, Gregory W. Schwartz" )
265
main = execParser opts >>= sharedTree where opts = info (helper <*> options) ( fullDesc <> progDesc "Create the lineage tree from a fasta file using shared\ \ mutations" <> header "lineage, Gregory W. Schwartz" )
251
false
true
1
9
78
65
29
36
null
null
tjakway/ghcjvm
compiler/basicTypes/Literal.hs
bsd-3-clause
litIsLifted _ = False
35
litIsLifted _ = False
35
litIsLifted _ = False
35
false
false
0
5
17
9
4
5
null
null
urbanslug/ghc
testsuite/tests/indexed-types/should_compile/T3208a.hs
bsd-3-clause
fce' f = fce . apply $ f
24
fce' f = fce . apply $ f
24
fce' f = fce . apply $ f
24
false
false
0
6
7
17
8
9
null
null
spacekitteh/smcghc
compiler/main/DynFlags.hs
bsd-3-clause
wayOptl _ WayDyn = []
28
wayOptl _ WayDyn = []
28
wayOptl _ WayDyn = []
28
false
false
1
6
11
15
6
9
null
null
bergmark/mmdoc
src/Parser.hs
bsd-3-clause
p_import _ = throwErr $ ExpectedTok [T.Import]
46
p_import _ = throwErr $ ExpectedTok [T.Import]
46
p_import _ = throwErr $ ExpectedTok [T.Import]
46
false
false
2
7
6
23
10
13
null
null
urbanslug/ghc
libraries/template-haskell/Language/Haskell/TH/Ppr.hs
bsd-3-clause
pprExp i (DoE ss_) = parensIf (i > noPrec) $ text "do" <+> pprStms ss_ where pprStms [] = empty pprStms [s] = ppr s pprStms ss = braces $ sep $ punctuate semi $ map ppr ss
187
pprExp i (DoE ss_) = parensIf (i > noPrec) $ text "do" <+> pprStms ss_ where pprStms [] = empty pprStms [s] = ppr s pprStms ss = braces $ sep $ punctuate semi $ map ppr ss
187
pprExp i (DoE ss_) = parensIf (i > noPrec) $ text "do" <+> pprStms ss_ where pprStms [] = empty pprStms [s] = ppr s pprStms ss = braces $ sep $ punctuate semi $ map ppr ss
187
false
false
0
9
53
96
45
51
null
null
ml9951/ghc
compiler/coreSyn/CoreFVs.hs
bsd-3-clause
exprOrphNames :: CoreExpr -> NameSet -- There's no need to delete local binders, because they will all -- be /internal/ names. exprOrphNames e = go e where go (Var v) | isExternalName n = unitNameSet n | otherwise = emptyNameSet where n = idName v go (Lit _) = emptyNameSet go (Type ty) = orphNamesOfType ty -- Don't need free tyvars go (Coercion co) = orphNamesOfCo co go (App e1 e2) = go e1 `unionNameSet` go e2 go (Lam v e) = go e `delFromNameSet` idName v go (Tick _ e) = go e go (Cast e co) = go e `unionNameSet` orphNamesOfCo co go (Let (NonRec _ r) e) = go e `unionNameSet` go r go (Let (Rec prs) e) = exprsOrphNames (map snd prs) `unionNameSet` go e go (Case e _ ty as) = go e `unionNameSet` orphNamesOfType ty `unionNameSet` unionNameSets (map go_alt as) go_alt (_,_,r) = go r -- | Finds the free /external/ names of several expressions: see 'exprOrphNames' for details
1,077
exprOrphNames :: CoreExpr -> NameSet exprOrphNames e = go e where go (Var v) | isExternalName n = unitNameSet n | otherwise = emptyNameSet where n = idName v go (Lit _) = emptyNameSet go (Type ty) = orphNamesOfType ty -- Don't need free tyvars go (Coercion co) = orphNamesOfCo co go (App e1 e2) = go e1 `unionNameSet` go e2 go (Lam v e) = go e `delFromNameSet` idName v go (Tick _ e) = go e go (Cast e co) = go e `unionNameSet` orphNamesOfCo co go (Let (NonRec _ r) e) = go e `unionNameSet` go r go (Let (Rec prs) e) = exprsOrphNames (map snd prs) `unionNameSet` go e go (Case e _ ty as) = go e `unionNameSet` orphNamesOfType ty `unionNameSet` unionNameSets (map go_alt as) go_alt (_,_,r) = go r -- | Finds the free /external/ names of several expressions: see 'exprOrphNames' for details
987
exprOrphNames e = go e where go (Var v) | isExternalName n = unitNameSet n | otherwise = emptyNameSet where n = idName v go (Lit _) = emptyNameSet go (Type ty) = orphNamesOfType ty -- Don't need free tyvars go (Coercion co) = orphNamesOfCo co go (App e1 e2) = go e1 `unionNameSet` go e2 go (Lam v e) = go e `delFromNameSet` idName v go (Tick _ e) = go e go (Cast e co) = go e `unionNameSet` orphNamesOfCo co go (Let (NonRec _ r) e) = go e `unionNameSet` go r go (Let (Rec prs) e) = exprsOrphNames (map snd prs) `unionNameSet` go e go (Case e _ ty as) = go e `unionNameSet` orphNamesOfType ty `unionNameSet` unionNameSets (map go_alt as) go_alt (_,_,r) = go r -- | Finds the free /external/ names of several expressions: see 'exprOrphNames' for details
950
true
true
0
9
363
371
184
187
null
null
zmthy/snaplet-rest
src/Snap/Snaplet/Rest/Failure.hs
mit
------------------------------------------------------------------------------ -- | Serves a 404 error and runs the handler specified in the configuration. lookupFailure :: MonadSnap m => ResourceConfig m -> m a lookupFailure = failure 404 . onLookupFailure
257
lookupFailure :: MonadSnap m => ResourceConfig m -> m a lookupFailure = failure 404 . onLookupFailure
101
lookupFailure = failure 404 . onLookupFailure
45
true
true
0
7
30
37
18
19
null
null
ptitfred/ftv-vods
src/GoogleAPIsClient/Client.hs
bsd-3-clause
waitOAuth :: Port -> Client String waitOAuth port = getOAuthUrl port >>= awaitCallback port
91
waitOAuth :: Port -> Client String waitOAuth port = getOAuthUrl port >>= awaitCallback port
91
waitOAuth port = getOAuthUrl port >>= awaitCallback port
56
false
true
0
6
13
31
14
17
null
null
katydid/nwe
src/Deriv.hs
bsd-3-clause
derivReturns refs input (e:tailes, ns) = let (de, tailns) = derivReturn refs input e ns se = simplify refs de in se:derivReturns refs input (tailes, tailns)
173
derivReturns refs input (e:tailes, ns) = let (de, tailns) = derivReturn refs input e ns se = simplify refs de in se:derivReturns refs input (tailes, tailns)
173
derivReturns refs input (e:tailes, ns) = let (de, tailns) = derivReturn refs input e ns se = simplify refs de in se:derivReturns refs input (tailes, tailns)
173
false
false
0
9
42
77
39
38
null
null
mjdwitt/a-scheme
src/Scheme/Parser.hs
mit
-- Next, we'll define the rules for making identifiers in our language. lang = emptyDef{ identStart = noneOf " \t\r\n\f\v()" , identLetter = noneOf " \t\r\n\f\v()" , reservedNames = ["lambda"] , caseSensitive = True }
277
lang = emptyDef{ identStart = noneOf " \t\r\n\f\v()" , identLetter = noneOf " \t\r\n\f\v()" , reservedNames = ["lambda"] , caseSensitive = True }
205
lang = emptyDef{ identStart = noneOf " \t\r\n\f\v()" , identLetter = noneOf " \t\r\n\f\v()" , reservedNames = ["lambda"] , caseSensitive = True }
205
true
false
0
7
94
42
25
17
null
null
frenetic-lang/netcore-1.0
src/Frenetic/NettleEx.hs
bsd-3-clause
ethVLANId (EthernetHeader {}) = Nothing
39
ethVLANId (EthernetHeader {}) = Nothing
39
ethVLANId (EthernetHeader {}) = Nothing
39
false
false
0
7
4
16
8
8
null
null
lrassaby/harmlang
src/HarmLang/InitialBasis.hs
mit
interpretNamedInterval "d5th" = Interval 6
42
interpretNamedInterval "d5th" = Interval 6
42
interpretNamedInterval "d5th" = Interval 6
42
false
false
0
5
4
12
5
7
null
null
ekmett/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcTypes.hs
lgpl-2.1
withRefDateTime :: (Ptr (TDateTime a) -> IO ()) -> IO (DateTime a) withRefDateTime f = withManagedDateTimeResult $ assignRefPtr wxDateTime_Create f
150
withRefDateTime :: (Ptr (TDateTime a) -> IO ()) -> IO (DateTime a) withRefDateTime f = withManagedDateTimeResult $ assignRefPtr wxDateTime_Create f
150
withRefDateTime f = withManagedDateTimeResult $ assignRefPtr wxDateTime_Create f
83
false
true
0
11
22
61
28
33
null
null
capitanbatata/sandbox
pw-lenses/src/WalletDB.hs
gpl-3.0
w1 :: Wallet w1 = Map.fromList []
35
w1 :: Wallet w1 = Map.fromList []
35
w1 = Map.fromList []
22
false
true
0
6
8
25
10
15
null
null
pparkkin/eta
compiler/ETA/Main/SysTools.hs
bsd-3-clause
askCc :: DynFlags -> [Option] -> IO String askCc dflags args = do let (p,args0) = pgm_c dflags args1 = map Option (getOpts dflags opt_c) args2 = args0 ++ args1 ++ args mb_env <- getGccEnv args2 runSomethingWith dflags "gcc" p args2 $ \real_args -> readCreateProcessWithExitCode' (proc p real_args){ env = mb_env } -- Similar to System.Process.readCreateProcessWithExitCode, but stderr is -- inherited from the parent process, and output to stderr is not captured.
486
askCc :: DynFlags -> [Option] -> IO String askCc dflags args = do let (p,args0) = pgm_c dflags args1 = map Option (getOpts dflags opt_c) args2 = args0 ++ args1 ++ args mb_env <- getGccEnv args2 runSomethingWith dflags "gcc" p args2 $ \real_args -> readCreateProcessWithExitCode' (proc p real_args){ env = mb_env } -- Similar to System.Process.readCreateProcessWithExitCode, but stderr is -- inherited from the parent process, and output to stderr is not captured.
486
askCc dflags args = do let (p,args0) = pgm_c dflags args1 = map Option (getOpts dflags opt_c) args2 = args0 ++ args1 ++ args mb_env <- getGccEnv args2 runSomethingWith dflags "gcc" p args2 $ \real_args -> readCreateProcessWithExitCode' (proc p real_args){ env = mb_env } -- Similar to System.Process.readCreateProcessWithExitCode, but stderr is -- inherited from the parent process, and output to stderr is not captured.
443
false
true
0
12
94
132
66
66
null
null
tjakway/ghcjvm
compiler/prelude/THNames.hs
bsd-3-clause
unboxedTupleTName = libFun (fsLit "unboxedTupleT") unboxedTupleTIdKey
72
unboxedTupleTName = libFun (fsLit "unboxedTupleT") unboxedTupleTIdKey
72
unboxedTupleTName = libFun (fsLit "unboxedTupleT") unboxedTupleTIdKey
72
false
false
0
7
8
17
8
9
null
null
massysett/penny
penny/lib/Penny/Troika.hs
bsd-3-clause
-- | Convert a 'Troiload' to a 'Trio'. troiloadToTrio :: Commodity -> Troiload -> Trio.Trio troiloadToTrio cy tl = case tl of QC rar ar -> Trio.QC rar cy ar Q rar -> Trio.Q rar SC dnz -> Trio.SC (Lens.view poleDecNonZero dnz) cy S dnz -> Trio.S (Lens.view poleDecNonZero dnz) UC brim _ ar -> Trio.UC brim cy ar NC nil ar -> Trio.NC nil cy ar US brim _ -> Trio.US brim UU nil -> Trio.UU nil C _ -> Trio.C cy E _ -> Trio.E -- | Convert a 'Troika' to a 'Trio.Trio'.
483
troiloadToTrio :: Commodity -> Troiload -> Trio.Trio troiloadToTrio cy tl = case tl of QC rar ar -> Trio.QC rar cy ar Q rar -> Trio.Q rar SC dnz -> Trio.SC (Lens.view poleDecNonZero dnz) cy S dnz -> Trio.S (Lens.view poleDecNonZero dnz) UC brim _ ar -> Trio.UC brim cy ar NC nil ar -> Trio.NC nil cy ar US brim _ -> Trio.US brim UU nil -> Trio.UU nil C _ -> Trio.C cy E _ -> Trio.E -- | Convert a 'Troika' to a 'Trio.Trio'.
444
troiloadToTrio cy tl = case tl of QC rar ar -> Trio.QC rar cy ar Q rar -> Trio.Q rar SC dnz -> Trio.SC (Lens.view poleDecNonZero dnz) cy S dnz -> Trio.S (Lens.view poleDecNonZero dnz) UC brim _ ar -> Trio.UC brim cy ar NC nil ar -> Trio.NC nil cy ar US brim _ -> Trio.US brim UU nil -> Trio.UU nil C _ -> Trio.C cy E _ -> Trio.E -- | Convert a 'Troika' to a 'Trio.Trio'.
391
true
true
13
9
115
197
98
99
null
null
raptros/chatless-hs
client/Chatless/Client/Session.hs
bsd-3-clause
authModRequest NoAuthentication r = return r
44
authModRequest NoAuthentication r = return r
44
authModRequest NoAuthentication r = return r
44
false
false
0
5
5
14
6
8
null
null
teleshoes/taffybar
src/System/Taffybar/Information/X11DesktopInfo.hs
bsd-3-clause
doLowerWindow :: X11Window -> X11Property () doLowerWindow window = asks contextDisplay >>= lift . flip lowerWindow window
124
doLowerWindow :: X11Window -> X11Property () doLowerWindow window = asks contextDisplay >>= lift . flip lowerWindow window
124
doLowerWindow window = asks contextDisplay >>= lift . flip lowerWindow window
79
false
true
2
8
18
45
20
25
null
null
balangs/eTeak
src/Context.hs
bsd-3-clause
contextToPosArray :: BindingValue value => Context value -> Maybe PosArray contextToPosArray context | null poss = Nothing | otherwise = Just $ PosArray $ array (fst (head poss), fst (last poss)) poss where poss = sortBy compareFst $ mapMaybe findPos (range (contextIndexRange context)) findPos i | bindingNamespace binding == PosNamespace = Just (i, valuePos $ bindingValue binding) | otherwise = Nothing where binding = (contextBindings context) ! i -- rebaseContextIndices: renumber the elements of the given context by adding `adjustment' -- Does no recursive descend into values
696
contextToPosArray :: BindingValue value => Context value -> Maybe PosArray contextToPosArray context | null poss = Nothing | otherwise = Just $ PosArray $ array (fst (head poss), fst (last poss)) poss where poss = sortBy compareFst $ mapMaybe findPos (range (contextIndexRange context)) findPos i | bindingNamespace binding == PosNamespace = Just (i, valuePos $ bindingValue binding) | otherwise = Nothing where binding = (contextBindings context) ! i -- rebaseContextIndices: renumber the elements of the given context by adding `adjustment' -- Does no recursive descend into values
692
contextToPosArray context | null poss = Nothing | otherwise = Just $ PosArray $ array (fst (head poss), fst (last poss)) poss where poss = sortBy compareFst $ mapMaybe findPos (range (contextIndexRange context)) findPos i | bindingNamespace binding == PosNamespace = Just (i, valuePos $ bindingValue binding) | otherwise = Nothing where binding = (contextBindings context) ! i -- rebaseContextIndices: renumber the elements of the given context by adding `adjustment' -- Does no recursive descend into values
617
false
true
4
12
199
180
86
94
null
null
phischu/fragnix
tests/packages/scotty/Data.Vector.hs
bsd-3-clause
sum = G.sum
11
sum = G.sum
11
sum = G.sum
11
false
false
1
6
2
12
4
8
null
null
brendanhay/gogol
gogol-cloudsearch/gen/Network/Google/CloudSearch/Types/Product.hs
mpl-2.0
-- | This property indicates the freshness level of the object in the index. -- If set, this property must be a top-level property within the property -- definitions and it must be a timestamp type or date type. Otherwise, the -- Indexing API uses updateTime as the freshness indicator. The maximum -- length is 256 characters. When a property is used to calculate -- freshness, the value defaults to 2 years from the current time. foFreshnessProperty :: Lens' FreshnessOptions (Maybe Text) foFreshnessProperty = lens _foFreshnessProperty (\ s a -> s{_foFreshnessProperty = a})
585
foFreshnessProperty :: Lens' FreshnessOptions (Maybe Text) foFreshnessProperty = lens _foFreshnessProperty (\ s a -> s{_foFreshnessProperty = a})
153
foFreshnessProperty = lens _foFreshnessProperty (\ s a -> s{_foFreshnessProperty = a})
94
true
true
1
9
100
56
30
26
null
null
balez/ag-a-la-carte
Language/Grammars/AGalacarte/Examples/Repmin.hs
gpl-3.0
repmin, newRepmin :: TreeT -> TreeT repmin t = fromWTree $ Ntree! run Repmin repminF t
86
repmin, newRepmin :: TreeT -> TreeT repmin t = fromWTree $ Ntree! run Repmin repminF t
86
repmin t = fromWTree $ Ntree! run Repmin repminF t
50
false
true
6
7
15
47
19
28
null
null
brendanhay/gogol
gogol-logging/gen/Network/Google/Logging/Types/Product.hs
mpl-2.0
-- | The delay of data points caused by ingestion. Data points older than -- this age are guaranteed to be ingested and available to be read, -- excluding data loss due to errors. mdmIngestDelay :: Lens' MetricDescriptorMetadata (Maybe Scientific) mdmIngestDelay = lens _mdmIngestDelay (\ s a -> s{_mdmIngestDelay = a}) . mapping _GDuration
354
mdmIngestDelay :: Lens' MetricDescriptorMetadata (Maybe Scientific) mdmIngestDelay = lens _mdmIngestDelay (\ s a -> s{_mdmIngestDelay = a}) . mapping _GDuration
174
mdmIngestDelay = lens _mdmIngestDelay (\ s a -> s{_mdmIngestDelay = a}) . mapping _GDuration
106
true
true
0
10
67
57
30
27
null
null
kmate/HaRe
test/TestUtils.hs
bsd-3-clause
-- --------------------------------------------------------------------- defaultTestSettings :: RefactSettings defaultTestSettings = defaultSettings { rsetVerboseLevel = Normal }
179
defaultTestSettings :: RefactSettings defaultTestSettings = defaultSettings { rsetVerboseLevel = Normal }
105
defaultTestSettings = defaultSettings { rsetVerboseLevel = Normal }
67
true
true
0
6
13
20
12
8
null
null