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
salamansar/GA-cube
src/Individual.hs
mit
populationRate :: Individual i => [i] -> [(Int, i)] populationRate population = let evaluates = map fitnesse population in zip evaluates population
157
populationRate :: Individual i => [i] -> [(Int, i)] populationRate population = let evaluates = map fitnesse population in zip evaluates population
156
populationRate population = let evaluates = map fitnesse population in zip evaluates population
104
false
true
0
9
31
58
29
29
null
null
alexbaluta/courseography
dependencies/HaXml-1.25.3/src/Text/XML/HaXml/Html/ParseLazy.hs
gpl-3.0
processinginstruction :: HParser ProcessingInstruction processinginstruction = do tok TokPIOpen commit $ do n <- string `onFail` failP "processing instruction has no target" f <- freetext (tok TokPIClose `onFail` tok TokAnyClose) `onFail` failP "missing ?> or >" return (n, f)
309
processinginstruction :: HParser ProcessingInstruction processinginstruction = do tok TokPIOpen commit $ do n <- string `onFail` failP "processing instruction has no target" f <- freetext (tok TokPIClose `onFail` tok TokAnyClose) `onFail` failP "missing ?> or >" return (n, f)
309
processinginstruction = do tok TokPIOpen commit $ do n <- string `onFail` failP "processing instruction has no target" f <- freetext (tok TokPIClose `onFail` tok TokAnyClose) `onFail` failP "missing ?> or >" return (n, f)
254
false
true
0
13
71
89
43
46
null
null
rolph-recto/liquidhaskell
FaultLocal.hs
bsd-3-clause
tryBinding :: Config -> FInfo Cinfo -> [BindId] -> IO (Result Cinfo) tryBinding cfg finfo idlist = do let env = bs finfo let map = getBindMap finfo let map' = foldr eraseRefinement map idlist let finfo' = finfo { bs = env { beBinds = map' } } solve cfg finfo'
270
tryBinding :: Config -> FInfo Cinfo -> [BindId] -> IO (Result Cinfo) tryBinding cfg finfo idlist = do let env = bs finfo let map = getBindMap finfo let map' = foldr eraseRefinement map idlist let finfo' = finfo { bs = env { beBinds = map' } } solve cfg finfo'
270
tryBinding cfg finfo idlist = do let env = bs finfo let map = getBindMap finfo let map' = foldr eraseRefinement map idlist let finfo' = finfo { bs = env { beBinds = map' } } solve cfg finfo'
201
false
true
0
14
62
123
57
66
null
null
c0c0n3/audidoza
tests/app/Html/DiffJstPage.hs
gpl-3.0
render JstCss _ = "jstree-dist/themes/default/style.min.css"
60
render JstCss _ = "jstree-dist/themes/default/style.min.css"
60
render JstCss _ = "jstree-dist/themes/default/style.min.css"
60
false
false
0
5
4
13
5
8
null
null
bergmark/mmdoc
src/Doc.hs
bsd-3-clause
generate :: [AST] -> String generate = concatMap generate'
58
generate :: [AST] -> String generate = concatMap generate'
58
generate = concatMap generate'
30
false
true
0
6
8
21
11
10
null
null
EdisonAlgorithms/HackerRank
practice/fp/ds/lists-and-gcd/lists-and-gcd.hs
mit
solve :: [[Int]] -> [(Int, Int)] solve ([q] : rest) = foldl1 merge facts where facts = map getFactors rest
126
solve :: [[Int]] -> [(Int, Int)] solve ([q] : rest) = foldl1 merge facts where facts = map getFactors rest
126
solve ([q] : rest) = foldl1 merge facts where facts = map getFactors rest
93
false
true
0
7
39
64
34
30
null
null
othercriteria/blaze
RAE.hs
mit
getProbs :: State -> State getProbs = getTA ["probs"]
53
getProbs :: State -> State getProbs = getTA ["probs"]
53
getProbs = getTA ["probs"]
26
false
true
0
6
8
21
11
10
null
null
wolftune/hoogle
src/Query.hs
bsd-3-clause
-- | Find and extract the scope annotations. -- -- > +package -- > +module -- > name.bar -- > name.++ name.(++) (name.++) -- > +foo -foo -- > +scope:foo -scope:foo scope:foo scope_ :: [String] -> ([Query], [String]) scope_ xs = case xs of (readPM -> Just pm):(readCat -> Just cat):":":(readMod -> Just (mod,rest)) ->...
2,215
scope_ :: [String] -> ([Query], [String]) scope_ xs = case xs of (readPM -> Just pm):(readCat -> Just cat):":":(readMod -> Just (mod,rest)) -> add pm cat mod rest (readPM -> Just pm):(readCat -> Just cat):":-":(readMod -> Just (mod,rest)) -> add False cat mod rest (readPM -> Just pm):(readMod -> Just (mod,r...
2,041
scope_ xs = case xs of (readPM -> Just pm):(readCat -> Just cat):":":(readMod -> Just (mod,rest)) -> add pm cat mod rest (readPM -> Just pm):(readCat -> Just cat):":-":(readMod -> Just (mod,rest)) -> add False cat mod rest (readPM -> Just pm):(readMod -> Just (mod,rest)) -> add_ pm mod rest (readCat -> ...
1,999
true
true
0
15
624
1,153
595
558
null
null
keera-studios/hsQt
Qtc/Enums/Core/QAbstractFileEngine.hs
bsd-2-clause
eExeGroupPerm :: FileFlag eExeGroupPerm = ieFileFlag $ 16
59
eExeGroupPerm :: FileFlag eExeGroupPerm = ieFileFlag $ 16
59
eExeGroupPerm = ieFileFlag $ 16
33
false
true
0
6
9
18
8
10
null
null
kim/amazonka
amazonka-ec2/gen/Network/AWS/EC2/Waiters.hs
mpl-2.0
customerGatewayAvailable :: Wait DescribeCustomerGateways customerGatewayAvailable = Wait { _waitName = "CustomerGatewayAvailable" , _waitAttempts = 40 , _waitDelay = 15 , _waitAcceptors = [ matchAll "available" AcceptSuccess (folding (concatOf dcgrCustomerGateways) . cgSta...
554
customerGatewayAvailable :: Wait DescribeCustomerGateways customerGatewayAvailable = Wait { _waitName = "CustomerGatewayAvailable" , _waitAttempts = 40 , _waitDelay = 15 , _waitAcceptors = [ matchAll "available" AcceptSuccess (folding (concatOf dcgrCustomerGateways) . cgSta...
554
customerGatewayAvailable = Wait { _waitName = "CustomerGatewayAvailable" , _waitAttempts = 40 , _waitDelay = 15 , _waitAcceptors = [ matchAll "available" AcceptSuccess (folding (concatOf dcgrCustomerGateways) . cgState) , matchAny "deleted" AcceptFailure ...
496
false
true
0
14
148
122
64
58
null
null
Alasdair/Mella
Lang/Term.hs
bsd-3-clause
assignVars' ctx xs (Named x) = case elemIndex x (xs ++ map (toText . fst) (unnamed ctx)) of Nothing -> Named x Just n -> Unnamed (DB n x)
153
assignVars' ctx xs (Named x) = case elemIndex x (xs ++ map (toText . fst) (unnamed ctx)) of Nothing -> Named x Just n -> Unnamed (DB n x)
153
assignVars' ctx xs (Named x) = case elemIndex x (xs ++ map (toText . fst) (unnamed ctx)) of Nothing -> Named x Just n -> Unnamed (DB n x)
153
false
false
0
11
44
82
39
43
null
null
k0001/network-simple
src/Network/Simple/TCP.hs
bsd-3-clause
sendLazy sock = \lbs -> liftIO (NSBL.sendAll sock lbs)
54
sendLazy sock = \lbs -> liftIO (NSBL.sendAll sock lbs)
54
sendLazy sock = \lbs -> liftIO (NSBL.sendAll sock lbs)
54
false
false
0
9
8
27
13
14
null
null
robeverest/accelerate
Data/Array/Accelerate/Pretty/Print.hs
bsd-3-clause
prettyPreAcc pp alvl wrap (Stencil sten bndy acc) = wrap $ prettyArrOp "stencil" [parens (prettyPreFun pp alvl sten), prettyBoundary acc bndy, pp alvl parens acc]
220
prettyPreAcc pp alvl wrap (Stencil sten bndy acc) = wrap $ prettyArrOp "stencil" [parens (prettyPreFun pp alvl sten), prettyBoundary acc bndy, pp alvl parens acc]
220
prettyPreAcc pp alvl wrap (Stencil sten bndy acc) = wrap $ prettyArrOp "stencil" [parens (prettyPreFun pp alvl sten), prettyBoundary acc bndy, pp alvl parens acc]
220
false
false
2
9
82
69
33
36
null
null
gridaphobe/ghc
testsuite/tests/typecheck/should_fail/tcfail067.hs
bsd-3-clause
numSubRangeNegate :: (Ord a, Show a, Num a) => SubRange a -> SubRange a numSubRangeNegate (SubRange (lower, upper) value) = checkRange (SubRange (lower, upper) (-value))
171
numSubRangeNegate :: (Ord a, Show a, Num a) => SubRange a -> SubRange a numSubRangeNegate (SubRange (lower, upper) value) = checkRange (SubRange (lower, upper) (-value))
171
numSubRangeNegate (SubRange (lower, upper) value) = checkRange (SubRange (lower, upper) (-value))
99
false
true
0
9
26
81
42
39
null
null
ktvoelker/cookie-jar
test/Path.hs
gpl-3.0
test5 = sessionTest "Deeper path given; trailing slash" $ do recv (time 0) (e path1) "x=y; path=/path1/a/" noSend (time 0) (e pathRoot) noSend (time 0) (e path1) noSend (time 0) (e path1a) noSend (time 0) (e path1b) noSend (time 0) (e path2) noSend (time 0) (e path2a) noSend (time 0) (e path2b)
311
test5 = sessionTest "Deeper path given; trailing slash" $ do recv (time 0) (e path1) "x=y; path=/path1/a/" noSend (time 0) (e pathRoot) noSend (time 0) (e path1) noSend (time 0) (e path1a) noSend (time 0) (e path1b) noSend (time 0) (e path2) noSend (time 0) (e path2a) noSend (time 0) (e path2b)
311
test5 = sessionTest "Deeper path given; trailing slash" $ do recv (time 0) (e path1) "x=y; path=/path1/a/" noSend (time 0) (e pathRoot) noSend (time 0) (e path1) noSend (time 0) (e path1a) noSend (time 0) (e path1b) noSend (time 0) (e path2) noSend (time 0) (e path2a) noSend (time 0) (e path2b)
311
false
false
1
11
67
179
79
100
null
null
spechub/Hets
PGIP/GraphQL/Resolver/DGraph.hs
gpl-2.0
resolveDocumentLinks :: MonadIO m => LocIdBaseId -> EntityField DatabaseSchema.DocumentLink LocIdBaseId -> DBMonad m [GraphQLResultDocumentLink.DocumentLink] resolveDocumentLinks documentKey column = do documentLinksL <- select $ from $ \ (document_li...
781
resolveDocumentLinks :: MonadIO m => LocIdBaseId -> EntityField DatabaseSchema.DocumentLink LocIdBaseId -> DBMonad m [GraphQLResultDocumentLink.DocumentLink] resolveDocumentLinks documentKey column = do documentLinksL <- select $ from $ \ (document_li...
781
resolveDocumentLinks documentKey column = do documentLinksL <- select $ from $ \ (document_links `InnerJoin` loc_id_basesSource `InnerJoin` loc_id_basesTarget) -> do on (document_links ^. DocumentLinkTargetId ==. loc_id_basesTarget ^. LocIdBaseId) on (document_lin...
560
false
true
0
17
197
180
87
93
null
null
purebred-mua/purebred
src/Purebred/UI/Keybindings.hs
agpl-3.0
eventHandlerConfirm :: EventHandler 'ComposeView 'ConfirmDialog eventHandlerConfirm = EventHandler (asConfig . confComposeView . cvConfirmKeybindings) (\s -> Brick.continue <=< Brick.handleEventLensed s (asCompose . cKeepDraft) handleDialogEvent)
250
eventHandlerConfirm :: EventHandler 'ComposeView 'ConfirmDialog eventHandlerConfirm = EventHandler (asConfig . confComposeView . cvConfirmKeybindings) (\s -> Brick.continue <=< Brick.handleEventLensed s (asCompose . cKeepDraft) handleDialogEvent)
250
eventHandlerConfirm = EventHandler (asConfig . confComposeView . cvConfirmKeybindings) (\s -> Brick.continue <=< Brick.handleEventLensed s (asCompose . cKeepDraft) handleDialogEvent)
186
false
true
0
11
26
73
35
38
null
null
snoyberg/hebrew-time
src/Data/Time/Calendar/Hebrew/Internal.hs
mit
monthsTilTishrei :: Years -> Months monthsTilTishrei (Years i) = Months $ (235 * i - 234) `div` 19
98
monthsTilTishrei :: Years -> Months monthsTilTishrei (Years i) = Months $ (235 * i - 234) `div` 19
98
monthsTilTishrei (Years i) = Months $ (235 * i - 234) `div` 19
62
false
true
0
9
17
51
25
26
null
null
gridaphobe/target
src/Test/Target/Monad.hs
mit
whenVerbose :: Target () -> Target () whenVerbose x = do v <- asks verbose when v x
92
whenVerbose :: Target () -> Target () whenVerbose x = do v <- asks verbose when v x
92
whenVerbose x = do v <- asks verbose when v x
54
false
true
0
8
26
46
20
26
null
null
susoDominguez/eNominalTerms-Alpha
MatchingX.hs
unlicense
--returns the whole term when no atoms in the set cap atms atm@(AtmTrm a) = S.insert atm atms
95
cap atms atm@(AtmTrm a) = S.insert atm atms
45
cap atms atm@(AtmTrm a) = S.insert atm atms
45
true
false
1
7
19
36
14
22
null
null
GaloisInc/saw-script
saw-core-what4/src/Verifier/SAW/Simulator/What4/FirstOrder.hs
bsd-3-clause
groundToFOV BaseIntegerRepr i = pure $ FOVInt i
55
groundToFOV BaseIntegerRepr i = pure $ FOVInt i
55
groundToFOV BaseIntegerRepr i = pure $ FOVInt i
55
false
false
0
6
15
18
8
10
null
null
micknelso/language-c
src/Language/CFamily/Constants.hs
bsd-3-clause
litStringType' (_ ) = LitStringOrdinary
46
litStringType' (_ ) = LitStringOrdinary
46
litStringType' (_ ) = LitStringOrdinary
46
false
false
0
6
11
12
6
6
null
null
brendanhay/gogol
gogol-cloudsearch/gen/Network/Google/CloudSearch/Types/Product.hs
mpl-2.0
-- | The count of search sessions on the day sassSearchSessionsCount :: Lens' SearchApplicationSessionStats (Maybe Int64) sassSearchSessionsCount = lens _sassSearchSessionsCount (\ s a -> s{_sassSearchSessionsCount = a}) . mapping _Coerce
252
sassSearchSessionsCount :: Lens' SearchApplicationSessionStats (Maybe Int64) sassSearchSessionsCount = lens _sassSearchSessionsCount (\ s a -> s{_sassSearchSessionsCount = a}) . mapping _Coerce
207
sassSearchSessionsCount = lens _sassSearchSessionsCount (\ s a -> s{_sassSearchSessionsCount = a}) . mapping _Coerce
130
true
true
2
8
43
59
28
31
null
null
olsner/ghc
compiler/simplCore/CSE.hs
bsd-3-clause
cseCase :: CSEnv -> InExpr -> InId -> InType -> [InAlt] -> OutExpr cseCase env scrut bndr ty alts = Case scrut2 bndr3 ty (map cse_alt alts) where scrut1 = tryForCSE env scrut bndr1 = zapIdOccInfo bndr -- Zapping the OccInfo is needed because the extendCSEnv -- in cse_alt may mean that a dead ca...
1,770
cseCase :: CSEnv -> InExpr -> InId -> InType -> [InAlt] -> OutExpr cseCase env scrut bndr ty alts = Case scrut2 bndr3 ty (map cse_alt alts) where scrut1 = tryForCSE env scrut bndr1 = zapIdOccInfo bndr -- Zapping the OccInfo is needed because the extendCSEnv -- in cse_alt may mean that a dead ca...
1,770
cseCase env scrut bndr ty alts = Case scrut2 bndr3 ty (map cse_alt alts) where scrut1 = tryForCSE env scrut bndr1 = zapIdOccInfo bndr -- Zapping the OccInfo is needed because the extendCSEnv -- in cse_alt may mean that a dead case binder -- becomes alive, and Lint rejects that (env1, ...
1,703
false
true
0
10
616
325
174
151
null
null
ngzax/urbit
pkg/hs/urbit-king/lib/Urbit/Vere/Dawn.hs
mit
clanFromShip :: Ship -> Ob.Class clanFromShip = Ob.clan . Ob.patp . fromIntegral
80
clanFromShip :: Ship -> Ob.Class clanFromShip = Ob.clan . Ob.patp . fromIntegral
80
clanFromShip = Ob.clan . Ob.patp . fromIntegral
47
false
true
1
8
11
37
16
21
null
null
olsner/ghc
compiler/types/Type.hs
bsd-3-clause
isStrLitTy (LitTy (StrTyLit s)) = Just s
40
isStrLitTy (LitTy (StrTyLit s)) = Just s
40
isStrLitTy (LitTy (StrTyLit s)) = Just s
40
false
false
0
9
6
24
11
13
null
null
rubik/stack
src/Stack/Types/Package.hs
bsd-3-clause
exeComponents :: Set NamedComponent -> Set Text exeComponents = Set.fromList . mapMaybe mExeName . Set.toList where mExeName (CExe name) = Just name mExeName _ = Nothing
179
exeComponents :: Set NamedComponent -> Set Text exeComponents = Set.fromList . mapMaybe mExeName . Set.toList where mExeName (CExe name) = Just name mExeName _ = Nothing
179
exeComponents = Set.fromList . mapMaybe mExeName . Set.toList where mExeName (CExe name) = Just name mExeName _ = Nothing
131
false
true
0
7
35
64
30
34
null
null
danstiner/transpiler
src/Batch/Transformer.hs
mit
expressionWithInput c e = trace ("On: " ++ show e ++ ", " ++ show c) $ assert False undefined
93
expressionWithInput c e = trace ("On: " ++ show e ++ ", " ++ show c) $ assert False undefined
93
expressionWithInput c e = trace ("On: " ++ show e ++ ", " ++ show c) $ assert False undefined
93
false
false
1
11
19
48
20
28
null
null
nushio3/ghc
compiler/main/TidyPgm.hs
bsd-3-clause
cafRefsE _ (Type _) = False
38
cafRefsE _ (Type _) = False
38
cafRefsE _ (Type _) = False
38
false
false
1
6
16
20
8
12
null
null
fpinsight/hocilib
src/Database/Ocilib/Bindings.hs
bsd-2-clause
-- | Check if the current value of the binded variable is marked as NULL. ociBindIsNull :: Ptr OCI_Bind -> IO Bool ociBindIsNull b = fmap toBool [C.exp| int { OCI_BindIsNull($(OCI_Bind *b)) } |]
194
ociBindIsNull :: Ptr OCI_Bind -> IO Bool ociBindIsNull b = fmap toBool [C.exp| int { OCI_BindIsNull($(OCI_Bind *b)) } |]
120
ociBindIsNull b = fmap toBool [C.exp| int { OCI_BindIsNull($(OCI_Bind *b)) } |]
79
true
true
0
6
33
36
19
17
null
null
eryx67/haskell-libtorrent
src/Network/Libtorrent/TorrentHandle.hs
bsd-3-clause
-- void prioritize_pieces (std::vector<std::pair<int, int> > const& pieces) const; filePriority :: MonadIO m => TorrentHandle -> C.CInt -> m C.CInt filePriority ho idx = liftIO . withPtr ho $ \hoPtr -> C.withPtr_ $ \ptr -> checkError [except| { *$(int * ptr) = $(torrent_handle * hoPtr)->file_priority($(int i...
330
filePriority :: MonadIO m => TorrentHandle -> C.CInt -> m C.CInt filePriority ho idx = liftIO . withPtr ho $ \hoPtr -> C.withPtr_ $ \ptr -> checkError [except| { *$(int * ptr) = $(torrent_handle * hoPtr)->file_priority($(int idx)); } |]
243
filePriority ho idx = liftIO . withPtr ho $ \hoPtr -> C.withPtr_ $ \ptr -> checkError [except| { *$(int * ptr) = $(torrent_handle * hoPtr)->file_priority($(int idx)); } |]
177
true
true
0
9
58
73
38
35
null
null
spacekitteh/libgrin
src/Extensible.hs
bsd-3-clause
separateRowExtensions :: [Con] -> [(Name,String,[BangType])] separateRowExtensions = \case [] -> [] c : cs -> (case getConBangTypes c of (_, AppT (ConT n) (LitT (StrTyLit s))) : ts | n `eqName` 'Extends -> ((head (getConNames c), s, ts) : ) _ -> id) (separateRowExt...
331
separateRowExtensions :: [Con] -> [(Name,String,[BangType])] separateRowExtensions = \case [] -> [] c : cs -> (case getConBangTypes c of (_, AppT (ConT n) (LitT (StrTyLit s))) : ts | n `eqName` 'Extends -> ((head (getConNames c), s, ts) : ) _ -> id) (separateRowExt...
331
separateRowExtensions = \case [] -> [] c : cs -> (case getConBangTypes c of (_, AppT (ConT n) (LitT (StrTyLit s))) : ts | n `eqName` 'Extends -> ((head (getConNames c), s, ts) : ) _ -> id) (separateRowExtensions cs)
270
false
true
0
20
99
161
84
77
null
null
uduki/hsQt
Qtc/Gui/QTextCursor.hs
bsd-2-clause
hasComplexSelection :: QTextCursor a -> (()) -> IO (Bool) hasComplexSelection x0 () = withBoolResult $ withObjectPtr x0 $ \cobj_x0 -> qtc_QTextCursor_hasComplexSelection cobj_x0
187
hasComplexSelection :: QTextCursor a -> (()) -> IO (Bool) hasComplexSelection x0 () = withBoolResult $ withObjectPtr x0 $ \cobj_x0 -> qtc_QTextCursor_hasComplexSelection cobj_x0
187
hasComplexSelection x0 () = withBoolResult $ withObjectPtr x0 $ \cobj_x0 -> qtc_QTextCursor_hasComplexSelection cobj_x0
129
false
true
4
9
31
66
30
36
null
null
google-research/dex-lang
src/lib/LiveOutput.hs
bsd-3-clause
oneResult :: NodeId -> Result -> RFragment oneResult k r = RFragment mempty mempty (M.singleton k r)
100
oneResult :: NodeId -> Result -> RFragment oneResult k r = RFragment mempty mempty (M.singleton k r)
100
oneResult k r = RFragment mempty mempty (M.singleton k r)
57
false
true
0
8
16
46
21
25
null
null
keera-studios/gtk-helpers
gtk3/src/Graphics/UI/Gtk/Helpers/Multiline/TextBuffer.hs
bsd-3-clause
textBufferGetAllText :: TextBuffer -> Bool -> IO String textBufferGetAllText bf hidden = do si <- textBufferGetStartIter bf ei <- textBufferGetEndIter bf textBufferGetText bf si ei hidden
190
textBufferGetAllText :: TextBuffer -> Bool -> IO String textBufferGetAllText bf hidden = do si <- textBufferGetStartIter bf ei <- textBufferGetEndIter bf textBufferGetText bf si ei hidden
190
textBufferGetAllText bf hidden = do si <- textBufferGetStartIter bf ei <- textBufferGetEndIter bf textBufferGetText bf si ei hidden
134
false
true
0
8
28
59
26
33
null
null
hvr/jhc
regress/tests/1_typecheck/2_pass/ghc/tc089.hs
mit
s_2_0 (v0,v1) = v0
20
s_2_0 (v0,v1) = v0
20
s_2_0 (v0,v1) = v0
20
false
false
0
6
5
15
8
7
null
null
rueshyna/gogol
gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Users/SetAvailableProductSet.hs
mpl-2.0
-- | The ID of the user. usapsUserId :: Lens' UsersSetAvailableProductSet Text usapsUserId = lens _usapsUserId (\ s a -> s{_usapsUserId = a})
143
usapsUserId :: Lens' UsersSetAvailableProductSet Text usapsUserId = lens _usapsUserId (\ s a -> s{_usapsUserId = a})
118
usapsUserId = lens _usapsUserId (\ s a -> s{_usapsUserId = a})
64
true
true
0
9
24
42
22
20
null
null
vikraman/ghc
compiler/main/DynFlags.hs
bsd-3-clause
nop :: TurnOnFlag -> DynP () nop _ = return ()
46
nop :: TurnOnFlag -> DynP () nop _ = return ()
46
nop _ = return ()
17
false
true
0
7
10
32
14
18
null
null
Lysxia/breadcrumbs
Data/Breadcrumbs/Internal.hs
mit
-- | Get elements lazily. bufferLazy :: Buffer a -> [a] bufferLazy = lazyStream . streamBuffer
94
bufferLazy :: Buffer a -> [a] bufferLazy = lazyStream . streamBuffer
68
bufferLazy = lazyStream . streamBuffer
38
true
true
0
6
15
26
14
12
null
null
seereason/cabal
Cabal/Distribution/PackageDescription.hs
bsd-3-clause
stdParse :: Text ver => (ver -> String -> res) -> Parse.ReadP r res stdParse f = do cs <- Parse.sepBy1 component (Parse.char '-') _ <- Parse.char '-' ver <- parse let name = intercalate "-" cs return $! f ver (lowercase name) where component = do cs <- Parse.munch1 Char.isAlphaNum if a...
517
stdParse :: Text ver => (ver -> String -> res) -> Parse.ReadP r res stdParse f = do cs <- Parse.sepBy1 component (Parse.char '-') _ <- Parse.char '-' ver <- parse let name = intercalate "-" cs return $! f ver (lowercase name) where component = do cs <- Parse.munch1 Char.isAlphaNum if a...
517
stdParse f = do cs <- Parse.sepBy1 component (Parse.char '-') _ <- Parse.char '-' ver <- parse let name = intercalate "-" cs return $! f ver (lowercase name) where component = do cs <- Parse.munch1 Char.isAlphaNum if all Char.isDigit cs then Parse.pfail else return cs -- each com...
449
false
true
0
11
127
163
76
87
null
null
dorchard/camfort
src/Camfort/Transformation/CommonBlockElim.hs
apache-2.0
mkModuleFile :: F.MetaInfo -> Directory -> TLCommon A -> (String, F.ProgramFile A) mkModuleFile meta dir (_, (_, (name, varTys))) = (r, F.pfSetFilename path $ F.ProgramFile meta [mod]) where modname = commonName name path = dir ++ modname ++ ".f90" r = "Creating module " ++ modname ++ " at " ++ path...
370
mkModuleFile :: F.MetaInfo -> Directory -> TLCommon A -> (String, F.ProgramFile A) mkModuleFile meta dir (_, (_, (name, varTys))) = (r, F.pfSetFilename path $ F.ProgramFile meta [mod]) where modname = commonName name path = dir ++ modname ++ ".f90" r = "Creating module " ++ modname ++ " at " ++ path...
370
mkModuleFile meta dir (_, (_, (name, varTys))) = (r, F.pfSetFilename path $ F.ProgramFile meta [mod]) where modname = commonName name path = dir ++ modname ++ ".f90" r = "Creating module " ++ modname ++ " at " ++ path ++ "\n" mod = mkModule modname varTys modname
285
false
true
3
12
83
159
78
81
null
null
axch/dysvunctional-language
haskell-fol/FOL/Compiler/JavaScript/Syntax.hs
agpl-3.0
newline, questionMark :: Doc newline = char '\n'
53
newline, questionMark :: Doc newline = char '\n'
53
newline = char '\n'
24
false
true
2
6
12
23
9
14
null
null
alexvong1995/pandoc
src/Text/Pandoc/Readers/LaTeX.hs
gpl-2.0
grave :: Char -> String grave 'A' = "À"
39
grave :: Char -> String grave 'A' = "À"
39
grave 'A' = "À"
15
false
true
0
5
8
22
10
12
null
null
jmitchell/Idris-dev
src/Idris/AbsSyntaxTree.hs
bsd-3-clause
piBindp :: Plicity -> [(Name, PTerm)] -> PTerm -> PTerm piBindp p [] t = t
74
piBindp :: Plicity -> [(Name, PTerm)] -> PTerm -> PTerm piBindp p [] t = t
74
piBindp p [] t = t
18
false
true
0
8
15
46
23
23
null
null
brendanhay/gogol
gogol-blogger/gen/Network/Google/Resource/Blogger/Posts/Patch.hs
mpl-2.0
posoFetchBody :: Lens' PostsPatch Bool posoFetchBody = lens _posoFetchBody (\ s a -> s{_posoFetchBody = a})
115
posoFetchBody :: Lens' PostsPatch Bool posoFetchBody = lens _posoFetchBody (\ s a -> s{_posoFetchBody = a})
115
posoFetchBody = lens _posoFetchBody (\ s a -> s{_posoFetchBody = a})
76
false
true
0
9
23
41
21
20
null
null
d0kt0r0/InnerEar
src/InnerEar/Types/Utility.hs
gpl-3.0
-- | lastWithPredicate is useful when processing batches of responses that arrive -- "simultaneously" to the client from the server. lastWithPredicate :: (a -> Bool) -> [a] -> Maybe a lastWithPredicate p = find p . reverse
222
lastWithPredicate :: (a -> Bool) -> [a] -> Maybe a lastWithPredicate p = find p . reverse
89
lastWithPredicate p = find p . reverse
38
true
true
0
7
36
44
23
21
null
null
kazu-yamamoto/wai
auto-update/Control/Reaper.hs
mit
mkListAction :: (item -> IO (Maybe item')) -> [item] -> IO ([item'] -> [item']) mkListAction f = go id where go !front [] = return front go !front (x:xs) = do my <- f x let front' = case my of Nothing -> front ...
4,048
mkListAction :: (item -> IO (Maybe item')) -> [item] -> IO ([item'] -> [item']) mkListAction f = go id where go !front [] = return front go !front (x:xs) = do my <- f x let front' = case my of Nothing -> front ...
4,048
mkListAction f = go id where go !front [] = return front go !front (x:xs) = do my <- f x let front' = case my of Nothing -> front Just y -> front . (y:) go front' xs -- $example1 -- In this example code, we use a 'Data.Map.S...
3,942
false
true
0
14
837
228
150
78
null
null
forked-upstream-packages-for-ghcjs/ghc
compiler/types/TypeRep.hs
bsd-3-clause
ppr_sigma_type :: Bool -> Bool -> Type -> SDoc -- First Bool <=> Show the foralls unconditionally -- Second Bool <=> Show an extra-constraints wildcard ppr_sigma_type show_foralls_unconditionally extra_cts ty = sep [ if show_foralls_unconditionally then pprForAll tvs else pprUserForAll tvs ...
751
ppr_sigma_type :: Bool -> Bool -> Type -> SDoc ppr_sigma_type show_foralls_unconditionally extra_cts ty = sep [ if show_foralls_unconditionally then pprForAll tvs else pprUserForAll tvs , if extra_cts then pprThetaArrowTyExtra ctxt else pprThetaArrowTy ctxt , ...
646
ppr_sigma_type show_foralls_unconditionally extra_cts ty = sep [ if show_foralls_unconditionally then pprForAll tvs else pprUserForAll tvs , if extra_cts then pprThetaArrowTyExtra ctxt else pprThetaArrowTy ctxt , pprType tau ] where (tvs, rho) = split1 ...
599
true
true
0
8
233
235
116
119
null
null
haskell-distributed/distributed-process
src/Control/Distributed/Process/Internal/Primitives.hs
bsd-3-clause
uforward :: Message -> ProcessId -> Process () uforward msg them = do proc <- ask let node = processNode proc us = processId proc nid = localNodeId node destNode = (processNodeId them) in do liftIO $ traceEvent (localEventBus node) (MxSent them us msg) if destNode == nid the...
1,039
uforward :: Message -> ProcessId -> Process () uforward msg them = do proc <- ask let node = processNode proc us = processId proc nid = localNodeId node destNode = (processNodeId them) in do liftIO $ traceEvent (localEventBus node) (MxSent them us msg) if destNode == nid the...
1,039
uforward msg them = do proc <- ask let node = processNode proc us = processId proc nid = localNodeId node destNode = (processNodeId them) in do liftIO $ traceEvent (localEventBus node) (MxSent them us msg) if destNode == nid then sendCtrlMsg Nothing (LocalSend them msg) ...
992
false
true
0
15
227
174
90
84
null
null
chadbrewbaker/shellcheck
ShellCheck/Analytics.hs
gpl-3.0
prop_checkUnused13= verifyNotTree checkUnusedAssignments "x=(1); (( x[0] ))"
76
prop_checkUnused13= verifyNotTree checkUnusedAssignments "x=(1); (( x[0] ))"
76
prop_checkUnused13= verifyNotTree checkUnusedAssignments "x=(1); (( x[0] ))"
76
false
false
0
5
6
11
5
6
null
null
brianshourd/adventOfCode2016
src/Day11.hs
mit
minPathLength :: Location a => (a, a) -> Int minPathLength (l, l') = minPathLength' (newSearchZone l, newSearchZone l') 0 where newSearchZone location = let set = Set.singleton location in SearchZone set set minPathLength' :: Location a => (SearchZone a, SearchZone a) -> Int -> Int minPathLength' (sz, sz...
809
minPathLength :: Location a => (a, a) -> Int minPathLength (l, l') = minPathLength' (newSearchZone l, newSearchZone l') 0 where newSearchZone location = let set = Set.singleton location in SearchZone set set minPathLength' :: Location a => (SearchZone a, SearchZone a) -> Int -> Int minPathLength' (sz, sz...
809
minPathLength (l, l') = minPathLength' (newSearchZone l, newSearchZone l') 0 where newSearchZone location = let set = Set.singleton location in SearchZone set set minPathLength' :: Location a => (SearchZone a, SearchZone a) -> Int -> Int minPathLength' (sz, sz') n | zonesIntersect sz sz' = n ...
764
false
true
1
11
186
268
127
141
null
null
Fuuzetsu/osz-loader
test/Game/Osu/OszLoader/OsuParser/GeneralSpec.hs
gpl-3.0
generalSample ∷ Text generalSample = Data.Text.concat [ "[General]\n" , "AudioFilename: Mami Kawada - Hishoku no Sora.mp3\n" , "AudioLeadIn: 0\n" , "PreviewTime: 62962\n" , "Countdown: 0\n" , "SampleSet: Soft\n" , "StackLeniency: 0.5\n" , "Mode: 0\n" , "LetterboxInBreaks: 1\n" ]
299
generalSample ∷ Text generalSample = Data.Text.concat [ "[General]\n" , "AudioFilename: Mami Kawada - Hishoku no Sora.mp3\n" , "AudioLeadIn: 0\n" , "PreviewTime: 62962\n" , "Countdown: 0\n" , "SampleSet: Soft\n" , "StackLeniency: 0.5\n" , "Mode: 0\n" , "LetterboxInBreaks: 1\n" ]
299
generalSample = Data.Text.concat [ "[General]\n" , "AudioFilename: Mami Kawada - Hishoku no Sora.mp3\n" , "AudioLeadIn: 0\n" , "PreviewTime: 62962\n" , "Countdown: 0\n" , "SampleSet: Soft\n" , "StackLeniency: 0.5\n" , "Mode: 0\n" , "LetterboxInBreaks: 1\n" ]
278
false
true
0
5
57
44
27
17
null
null
fmapfmapfmap/amazonka
amazonka-elasticache/gen/Network/AWS/ElastiCache/AddTagsToResource.hs
mpl-2.0
-- | Creates a value of 'AddTagsToResource' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'attrResourceName' -- -- * 'attrTags' addTagsToResource :: Text -- ^ 'attrResourceName' -> AddTagsToResource addTagsToResource pResourc...
423
addTagsToResource :: Text -- ^ 'attrResourceName' -> AddTagsToResource addTagsToResource pResourceName_ = AddTagsToResource' { _attrResourceName = pResourceName_ , _attrTags = mempty }
208
addTagsToResource pResourceName_ = AddTagsToResource' { _attrResourceName = pResourceName_ , _attrTags = mempty }
129
true
true
0
7
82
49
28
21
null
null
diminishedprime/.org
programmey_stuff/write_yourself_a_scheme/ch_04/hello.hs
mit
showVal (Ratio a) = show (numerator a) ++ "/" ++ show (denominator a)
109
showVal (Ratio a) = show (numerator a) ++ "/" ++ show (denominator a)
109
showVal (Ratio a) = show (numerator a) ++ "/" ++ show (denominator a)
109
false
false
0
9
52
41
19
22
null
null
tittoassini/flat
test/Test/Data/Values.hs
bsd-3-clause
t33T =("Tuple of Tuple",t33)
28
t33T =("Tuple of Tuple",t33)
28
t33T =("Tuple of Tuple",t33)
28
false
false
0
5
3
12
7
5
null
null
orchid-hybrid/bee
BeeParserParsec.hs
gpl-3.0
parseNumber = do n <- many1 (oneOf ['0'..'9']) return (BeeNum (read n :: Int))
86
parseNumber = do n <- many1 (oneOf ['0'..'9']) return (BeeNum (read n :: Int))
86
parseNumber = do n <- many1 (oneOf ['0'..'9']) return (BeeNum (read n :: Int))
86
false
false
1
12
21
52
23
29
null
null
louispan/glazier
src/Glazier/Logger.hs
bsd-3-clause
prettyCallSite' :: (Semigroup str, IsString str) => (String, SrcLoc) -> str prettyCallSite' (f, loc) = fromString f <> "@" <> prettySrcLoc' loc
143
prettyCallSite' :: (Semigroup str, IsString str) => (String, SrcLoc) -> str prettyCallSite' (f, loc) = fromString f <> "@" <> prettySrcLoc' loc
143
prettyCallSite' (f, loc) = fromString f <> "@" <> prettySrcLoc' loc
67
false
true
0
7
21
59
31
28
null
null
gleachkr/Carnap
Carnap/src/Carnap/Core/ModelChecking/ModelFinder.hs
gpl-3.0
(.&.) :: MLang nm -> MLang nm -> MLang nm (.&.) = land
54
(.&.) :: MLang nm -> MLang nm -> MLang nm (.&.) = land
54
(.&.) = land
12
false
true
0
7
12
32
17
15
null
null
begriffs/postgrest
src/PostgREST/Auth.hs
mit
{-| Receives the JWT secret and audience (from config) and a JWT and returns a map of JWT claims. -} jwtClaims :: Maybe JWKSet -> Maybe StringOrURI -> LByteString -> UTCTime -> Maybe JSPath -> IO JWTAttempt jwtClaims _ _ "" _ _ = return $ JWTClaims M.empty
260
jwtClaims :: Maybe JWKSet -> Maybe StringOrURI -> LByteString -> UTCTime -> Maybe JSPath -> IO JWTAttempt jwtClaims _ _ "" _ _ = return $ JWTClaims M.empty
155
jwtClaims _ _ "" _ _ = return $ JWTClaims M.empty
49
true
true
0
10
51
64
30
34
null
null
dimsmol/websave
src/Websave/Web/Errors.hs
bsd-3-clause
decodeErrorTag :: Text decodeErrorTag = addErrorTagPrefix "DecodeError"
71
decodeErrorTag :: Text decodeErrorTag = addErrorTagPrefix "DecodeError"
71
decodeErrorTag = addErrorTagPrefix "DecodeError"
48
false
true
0
5
6
14
7
7
null
null
AlexanderPankiv/ghc
compiler/basicTypes/Id.hs
bsd-3-clause
setIdInfo :: Id -> IdInfo -> Id setIdInfo id info = info `seq` (lazySetIdInfo id info)
86
setIdInfo :: Id -> IdInfo -> Id setIdInfo id info = info `seq` (lazySetIdInfo id info)
86
setIdInfo id info = info `seq` (lazySetIdInfo id info)
54
false
true
0
7
15
38
20
18
null
null
jystic/QuickSpec
qs1/Equations.hs
bsd-3-clause
condVars Always = []
20
condVars Always = []
20
condVars Always = []
20
false
false
1
6
3
15
5
10
null
null
nuttycom/haskoin
Network/Haskoin/Crypto/Hash.hs
unlicense
-- | Computes SHA-256 and returns the result as a bytestring. hash256BS :: BS.ByteString -> BS.ByteString hash256BS bs = run256 bs
130
hash256BS :: BS.ByteString -> BS.ByteString hash256BS bs = run256 bs
68
hash256BS bs = run256 bs
24
true
true
0
8
20
31
14
17
null
null
dysinger/amazonka
amazonka-opsworks/gen/Network/AWS/OpsWorks/Types.hs
mpl-2.0
-- | The volume ID. vVolumeId :: Lens' Volume (Maybe Text) vVolumeId = lens _vVolumeId (\s a -> s { _vVolumeId = a })
117
vVolumeId :: Lens' Volume (Maybe Text) vVolumeId = lens _vVolumeId (\s a -> s { _vVolumeId = a })
97
vVolumeId = lens _vVolumeId (\s a -> s { _vVolumeId = a })
58
true
true
0
9
23
46
25
21
null
null
mhwombat/numeral-wains
test/WainSGMComparison.hs
bsd-3-clause
readSamples :: FilePath -> IO [Object Action (ResponseTweaker Action)] readSamples dir = do files <- readDirAndShuffle dir mapM readOneSample files
151
readSamples :: FilePath -> IO [Object Action (ResponseTweaker Action)] readSamples dir = do files <- readDirAndShuffle dir mapM readOneSample files
151
readSamples dir = do files <- readDirAndShuffle dir mapM readOneSample files
80
false
true
0
10
23
53
24
29
null
null
bendycode/desktop-cleaner
src/MediaType.hs
mit
mediaType :: FilePath -> MediaType mediaType fpath = case extension fpath of (Just ext) -> M.findWithDefault Other ext fileExtMap _ -> Other
159
mediaType :: FilePath -> MediaType mediaType fpath = case extension fpath of (Just ext) -> M.findWithDefault Other ext fileExtMap _ -> Other
159
mediaType fpath = case extension fpath of (Just ext) -> M.findWithDefault Other ext fileExtMap _ -> Other
124
false
true
0
9
40
56
26
30
null
null
danstiner/hfmt
src/Language/Haskell/Format.hs
mit
hlint :: Settings -> IO Formatter hlint _ = HLint.suggester <$> HLint.autoSettings
82
hlint :: Settings -> IO Formatter hlint _ = HLint.suggester <$> HLint.autoSettings
82
hlint _ = HLint.suggester <$> HLint.autoSettings
48
false
true
0
6
11
33
15
18
null
null
tokiwoousaka/ttask
src/Data/TTask/Types/Lens.hs
bsd-3-clause
isRunning :: IsStatus s => Getter s Bool isRunning = to $ status2Running
72
isRunning :: IsStatus s => Getter s Bool isRunning = to $ status2Running
72
isRunning = to $ status2Running
31
false
true
0
6
12
27
13
14
null
null
joshrule/poplog
src/Poplog/Evaluator.hs
mit
resolve (Structure "," [o1,o2]) goals env = (resolve o1 goals env) >>- (resolve o2 goals)
89
resolve (Structure "," [o1,o2]) goals env = (resolve o1 goals env) >>- (resolve o2 goals)
89
resolve (Structure "," [o1,o2]) goals env = (resolve o1 goals env) >>- (resolve o2 goals)
89
false
false
0
8
14
49
25
24
null
null
gnn/Hets
OWL2/AS.hs
gpl-2.0
-- | Extracts Id from IRI uriToId :: IRI -> Id uriToId = simpleIdToId . uriToTok
80
uriToId :: IRI -> Id uriToId = simpleIdToId . uriToTok
54
uriToId = simpleIdToId . uriToTok
33
true
true
1
7
15
28
12
16
null
null
CindyLinz/Haskell.js
trans/src/Desugar/LambdaCase.hs
mit
deLambdaCaseStmt :: Stmt l -> Stmt l deLambdaCaseStmt (Generator l pat exp) = Generator (id l) (deLambdaCasePat pat) (deLambdaCaseExp exp)
138
deLambdaCaseStmt :: Stmt l -> Stmt l deLambdaCaseStmt (Generator l pat exp) = Generator (id l) (deLambdaCasePat pat) (deLambdaCaseExp exp)
138
deLambdaCaseStmt (Generator l pat exp) = Generator (id l) (deLambdaCasePat pat) (deLambdaCaseExp exp)
101
false
true
0
7
19
59
28
31
null
null
expipiplus1/vulkan
utils/src/Vulkan/Utils/FromGL.hs
bsd-3-clause
-- | Convert an OpenGL format enum into a 'Vk.Format' -- -- >>> internalFormat GL_RGB8 -- Just FORMAT_R8G8B8_UNORM internalFormat :: (Eq a, Num a) => a -> Maybe Vk.Format internalFormat = \case GL_R8 -> Just Vk.FORMAT_R8_UNORM -- 1-component, 8-bit unsigned normalized GL_RG8 -> Just Vk.FORMAT_R8G8_UNORM ...
19,759
internalFormat :: (Eq a, Num a) => a -> Maybe Vk.Format internalFormat = \case GL_R8 -> Just Vk.FORMAT_R8_UNORM -- 1-component, 8-bit unsigned normalized GL_RG8 -> Just Vk.FORMAT_R8G8_UNORM -- 2-component, 8-bit unsigned normalized GL_RGB8 -> Just Vk.FORMAT_R8G8B8_UNORM -- 3-component, 8-bit uns...
19,644
internalFormat = \case GL_R8 -> Just Vk.FORMAT_R8_UNORM -- 1-component, 8-bit unsigned normalized GL_RG8 -> Just Vk.FORMAT_R8G8_UNORM -- 2-component, 8-bit unsigned normalized GL_RGB8 -> Just Vk.FORMAT_R8G8B8_UNORM -- 3-component, 8-bit unsigned normalized GL_RGBA8 -> Just Vk.FORMAT_R8G8B8A8_U...
19,588
true
true
184
8
3,297
2,262
1,052
1,210
null
null
sgillespie/ca-disease-simulator
simulator-cli/Main.hs
mit
maybePrintUsageAndExit _ _ = return ()
43
maybePrintUsageAndExit _ _ = return ()
43
maybePrintUsageAndExit _ _ = return ()
43
false
false
0
6
10
16
7
9
null
null
keera-studios/hsQt
Qtc/Enums/Gui/QSizePolicy.hs
bsd-2-clause
fTabWidget :: ControlTypes fTabWidget = ifControlTypes $ 8192
63
fTabWidget :: ControlTypes fTabWidget = ifControlTypes $ 8192
63
fTabWidget = ifControlTypes $ 8192
36
false
true
2
6
9
23
9
14
null
null
PipocaQuemada/ermine
tests/unit-tests/LoaderTests.hs
bsd-2-clause
main = TestGroup "LoaderTests" [ testCase "loads a file" loadsAFile , testCase "recognizes bad names" recognizesBadNames , testCase "recognizes missing files" recognizesMissingFiles , testCase "caches when cacheable" cachesWhenCacheable ]
248
main = TestGroup "LoaderTests" [ testCase "loads a file" loadsAFile , testCase "recognizes bad names" recognizesBadNames , testCase "recognizes missing files" recognizesMissingFiles , testCase "caches when cacheable" cachesWhenCacheable ]
248
main = TestGroup "LoaderTests" [ testCase "loads a file" loadsAFile , testCase "recognizes bad names" recognizesBadNames , testCase "recognizes missing files" recognizesMissingFiles , testCase "caches when cacheable" cachesWhenCacheable ]
248
false
false
1
7
38
48
21
27
null
null
haroldcarr/learn-haskell-coq-ml-etc
haskell/playpen/aeson/src/AesonAST.hs
unlicense
-- fromList [("bar",2),("foo",1)] ------------------------------------------------------------------------------ -- Decoding a mixed-type object -- above not work for mixed-type objects -- instead -- when object contains JSON objects: mixo = MB.fromJust $ A.decode "{\"name\":\"Dave\",\"age\":2}" :: A.Object
311
mixo = MB.fromJust $ A.decode "{\"name\":\"Dave\",\"age\":2}" :: A.Object
73
mixo = MB.fromJust $ A.decode "{\"name\":\"Dave\",\"age\":2}" :: A.Object
73
true
false
0
7
34
28
17
11
null
null
AlexanderPankiv/ghc
compiler/ghci/ByteCodeGen.hs
bsd-3-clause
schemeER_wrk :: Word -> BCEnv -> AnnExpr' Id VarSet -> BcM BCInstrList schemeER_wrk d p rhs | AnnTick (Breakpoint tick_no fvs) (_annot, newRhs) <- rhs = do code <- schemeE (fromIntegral d) 0 p newRhs arr <- getBreakArray this_mod <- getCurrentModule let idOffSets = getVarOffSets d p fvs ...
850
schemeER_wrk :: Word -> BCEnv -> AnnExpr' Id VarSet -> BcM BCInstrList schemeER_wrk d p rhs | AnnTick (Breakpoint tick_no fvs) (_annot, newRhs) <- rhs = do code <- schemeE (fromIntegral d) 0 p newRhs arr <- getBreakArray this_mod <- getCurrentModule let idOffSets = getVarOffSets d p fvs ...
850
schemeER_wrk d p rhs | AnnTick (Breakpoint tick_no fvs) (_annot, newRhs) <- rhs = do code <- schemeE (fromIntegral d) 0 p newRhs arr <- getBreakArray this_mod <- getCurrentModule let idOffSets = getVarOffSets d p fvs let breakInfo = BreakInfo { breakInfo_modu...
779
false
true
0
17
328
242
116
126
null
null
lancelet/cheesegrater
tests/Graphics/CheeseGrater/TestVecMath.hs
apache-2.0
------------------------------------------------------------ unitTests :: TestTree unitTests = testGroup "VecMath" [ testAddSubVec , testDot , testAddSubPoint , testAddSubPointV , testVMul , testVLength , testVAngle , testIntersect...
375
unitTests :: TestTree unitTests = testGroup "VecMath" [ testAddSubVec , testDot , testAddSubPoint , testAddSubPointV , testVMul , testVLength , testVAngle , testIntersectLines , testIntersectLinesQuick ]
313
unitTests = testGroup "VecMath" [ testAddSubVec , testDot , testAddSubPoint , testAddSubPointV , testVMul , testVLength , testVAngle , testIntersectLines , testIntersectLinesQuick ]
291
true
true
0
6
137
51
28
23
null
null
Concomitant/LambdaHack
GameDefinition/Content/ItemKindOrgan.hs
bsd-3-clause
speedGland10 = speedGland 10
28
speedGland10 = speedGland 10
28
speedGland10 = speedGland 10
28
false
false
0
5
3
9
4
5
null
null
silky/ImplicitCAD
programs/extopenscad.hs
gpl-2.0
run :: ExtOpenScadOpts -> IO() run args = do writeIORef xmlErrorOn (xmlError args) putStrLn $ "Loading File." content <- readFile (inputFile args) let format = case () of _ | Just fmt <- outputFormat args -> Just $ fmt _ | Just file <- outputFile args -> Ju...
2,223
run :: ExtOpenScadOpts -> IO() run args = do writeIORef xmlErrorOn (xmlError args) putStrLn $ "Loading File." content <- readFile (inputFile args) let format = case () of _ | Just fmt <- outputFormat args -> Just $ fmt _ | Just file <- outputFile args -> Ju...
2,223
run args = do writeIORef xmlErrorOn (xmlError args) putStrLn $ "Loading File." content <- readFile (inputFile args) let format = case () of _ | Just fmt <- outputFormat args -> Just $ fmt _ | Just file <- outputFile args -> Just $ guessOutputFormat file ...
2,192
false
true
0
25
982
579
269
310
null
null
strager/b
B/Oracle/InMemory/Pure.hs
bsd-3-clause
get :: (Question q, m ~ AnswerMonad q) => q -> State m -> Maybe (Answer q) get q s = findJust getAnswer (questionAnswers s) where getAnswer (QuestionAnswer q' a) | cast q == Just q' = cast a getAnswer _ = Nothing
226
get :: (Question q, m ~ AnswerMonad q) => q -> State m -> Maybe (Answer q) get q s = findJust getAnswer (questionAnswers s) where getAnswer (QuestionAnswer q' a) | cast q == Just q' = cast a getAnswer _ = Nothing
226
get q s = findJust getAnswer (questionAnswers s) where getAnswer (QuestionAnswer q' a) | cast q == Just q' = cast a getAnswer _ = Nothing
147
false
true
0
10
56
118
53
65
null
null
pdmurray/haskell-book-ex
src/ch9/PoemLines.hs
bsd-3-clause
-- What we want 'myLines sentences' to equal shouldEqual = [ "Tyger Tyger, burning bright" , "In the forests of the night" , "What immortal hand or eye" , "Could frame thy fearful symmetry?" ]
208
shouldEqual = [ "Tyger Tyger, burning bright" , "In the forests of the night" , "What immortal hand or eye" , "Could frame thy fearful symmetry?" ]
163
shouldEqual = [ "Tyger Tyger, burning bright" , "In the forests of the night" , "What immortal hand or eye" , "Could frame thy fearful symmetry?" ]
163
true
false
0
5
50
19
12
7
null
null
netogallo/XHints
src/XMonad/Actions/XHints/Translate.hs
bsd-3-clause
translateHint :: ClientId -> ClientSecret -> BingLanguage -> BingLanguage -> Text -> XHint Translator BingContext (Either Text Text) translateHint clientId clientSecret from to text = do s <- get res <- B.runExceptT $ do token <- case s of Nothing -> getAccessToken clientId clientSecret Just ctx ->...
602
translateHint :: ClientId -> ClientSecret -> BingLanguage -> BingLanguage -> Text -> XHint Translator BingContext (Either Text Text) translateHint clientId clientSecret from to text = do s <- get res <- B.runExceptT $ do token <- case s of Nothing -> getAccessToken clientId clientSecret Just ctx ->...
602
translateHint clientId clientSecret from to text = do s <- get res <- B.runExceptT $ do token <- case s of Nothing -> getAccessToken clientId clientSecret Just ctx -> return ctx flip B.runBing token $ do trans <- B.translateM text from to ctx <- B.getBingCtx return (trans,ctx...
469
false
true
0
16
145
229
107
122
null
null
ezyang/ghc
compiler/utils/BufWrite.hs
bsd-3-clause
bPutCStringLen :: BufHandle -> CStringLen -> IO () bPutCStringLen b@(BufHandle buf r hdl) cstr@(ptr, len) = do i <- readFastMutInt r if (i + len) >= buf_size then do hPutBuf hdl buf i writeFastMutInt r 0 if (len >= buf_size) then hPutBuf hdl ptr len ...
472
bPutCStringLen :: BufHandle -> CStringLen -> IO () bPutCStringLen b@(BufHandle buf r hdl) cstr@(ptr, len) = do i <- readFastMutInt r if (i + len) >= buf_size then do hPutBuf hdl buf i writeFastMutInt r 0 if (len >= buf_size) then hPutBuf hdl ptr len ...
472
bPutCStringLen b@(BufHandle buf r hdl) cstr@(ptr, len) = do i <- readFastMutInt r if (i + len) >= buf_size then do hPutBuf hdl buf i writeFastMutInt r 0 if (len >= buf_size) then hPutBuf hdl ptr len else bPutCStringLen b cstr el...
421
false
true
0
12
185
165
82
83
null
null
simonmichael/hledger
hledger/Hledger/Cli/Commands/Print.hs
gpl-3.0
-- | Generate one CSV record per posting, duplicating the common transaction fields. -- The txnidx field (transaction index) allows postings to be grouped back into transactions. transactionToCSV :: Transaction -> CSV transactionToCSV t = map (\p -> T.pack (show idx):date:date2:status:code:description:comment:p) (...
581
transactionToCSV :: Transaction -> CSV transactionToCSV t = map (\p -> T.pack (show idx):date:date2:status:code:description:comment:p) (concatMap postingToCSV $ tpostings t) where idx = tindex t description = tdescription t date = showDate (tdate t) date2 = maybe "" showDate $ tdate2 t status...
402
transactionToCSV t = map (\p -> T.pack (show idx):date:date2:status:code:description:comment:p) (concatMap postingToCSV $ tpostings t) where idx = tindex t description = tdescription t date = showDate (tdate t) date2 = maybe "" showDate $ tdate2 t status = T.pack . show $ tstatus t code =...
363
true
true
0
17
120
176
87
89
null
null
frontrowed/stratosphere
library-gen/Stratosphere/Resources/ElastiCacheCacheCluster.hs
mit
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticache-cache-cluster.html#cfn-elasticache-cachecluster-autominorversionupgrade ecccAutoMinorVersionUpgrade :: Lens' ElastiCacheCacheCluster (Maybe (Val Bool)) ecccAutoMinorVersionUpgrade = lens _elastiCacheCacheClusterAutoMinorVersio...
396
ecccAutoMinorVersionUpgrade :: Lens' ElastiCacheCacheCluster (Maybe (Val Bool)) ecccAutoMinorVersionUpgrade = lens _elastiCacheCacheClusterAutoMinorVersionUpgrade (\s a -> s { _elastiCacheCacheClusterAutoMinorVersionUpgrade = a })
230
ecccAutoMinorVersionUpgrade = lens _elastiCacheCacheClusterAutoMinorVersionUpgrade (\s a -> s { _elastiCacheCacheClusterAutoMinorVersionUpgrade = a })
150
true
true
1
9
22
55
28
27
null
null
Fuuzetsu/haddock
haddock-api/src/Haddock/Backends/Xhtml/Utils.hs
bsd-2-clause
punctuate h (d0:ds) = go d0 ds where go d [] = [d] go d (e:es) = (d +++ h) : go e es
145
punctuate h (d0:ds) = go d0 ds where go d [] = [d] go d (e:es) = (d +++ h) : go e es
145
punctuate h (d0:ds) = go d0 ds where go d [] = [d] go d (e:es) = (d +++ h) : go e es
145
false
false
0
9
84
73
37
36
null
null
YoshikuniJujo/shinjukuhs
events/event_004/DaichiSaitoTT/func5.hs
bsd-3-clause
div3 x | x == 3 = x `div` 3 | otherwise = x
59
div3 x | x == 3 = x `div` 3 | otherwise = x
59
div3 x | x == 3 = x `div` 3 | otherwise = x
59
false
false
1
8
29
36
17
19
null
null
frontrowed/stratosphere
library-gen/Stratosphere/Resources/EC2VolumeAttachment.hs
mit
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ebs-volumeattachment.html#cfn-ec2-ebs-volumeattachment-instanceid ecvaInstanceId :: Lens' EC2VolumeAttachment (Val Text) ecvaInstanceId = lens _eC2VolumeAttachmentInstanceId (\s a -> s { _eC2VolumeAttachmentInstanceId = a })
310
ecvaInstanceId :: Lens' EC2VolumeAttachment (Val Text) ecvaInstanceId = lens _eC2VolumeAttachmentInstanceId (\s a -> s { _eC2VolumeAttachmentInstanceId = a })
158
ecvaInstanceId = lens _eC2VolumeAttachmentInstanceId (\s a -> s { _eC2VolumeAttachmentInstanceId = a })
103
true
true
0
9
21
46
25
21
null
null
sergioifg94/Hendoman
test/Parse/TemplateParserTest.hs
bsd-3-clause
testCorrect3 = TestCase (assertEqual "Correct text" (Right [Template "template"]) (parseText "{{template}}"))
109
testCorrect3 = TestCase (assertEqual "Correct text" (Right [Template "template"]) (parseText "{{template}}"))
109
testCorrect3 = TestCase (assertEqual "Correct text" (Right [Template "template"]) (parseText "{{template}}"))
109
false
false
1
11
10
40
18
22
null
null
pranjaltale16/codeworld
codeworld-base/src/Internal/Color.hs
apache-2.0
alpha = fromDouble . CW.alpha . toCWColor
41
alpha = fromDouble . CW.alpha . toCWColor
41
alpha = fromDouble . CW.alpha . toCWColor
41
false
false
2
6
6
21
8
13
null
null
chadbrewbaker/combinat
Math/Combinat/Trees/Nary.hs
bsd-3-clause
sTreeNode_ :: Tree a -> Bool isTreeNode_ (Node x cs) = case cs of { [] -> False ; _ -> True }
96
isTreeNode_ :: Tree a -> Bool isTreeNode_ (Node x cs) = case cs of { [] -> False ; _ -> True }
94
isTreeNode_ (Node x cs) = case cs of { [] -> False ; _ -> True }
64
false
true
0
8
25
50
26
24
null
null
zsedem/haskell-dynamic-hacking
Core.hs
lgpl-3.0
apply f (service:xs) = apply (f `dynApp` service) xs
53
apply f (service:xs) = apply (f `dynApp` service) xs
53
apply f (service:xs) = apply (f `dynApp` service) xs
53
false
false
0
7
9
35
17
18
null
null
tpsinnem/Idris-dev
src/IRTS/CodegenC.hs
bsd-3-clause
cname :: Name -> String cname n = "_idris_" ++ concatMap cchar (showCG n) where cchar x | isAlpha x || isDigit x = [x] | otherwise = "_" ++ show (fromEnum x) ++ "_"
182
cname :: Name -> String cname n = "_idris_" ++ concatMap cchar (showCG n) where cchar x | isAlpha x || isDigit x = [x] | otherwise = "_" ++ show (fromEnum x) ++ "_"
182
cname n = "_idris_" ++ concatMap cchar (showCG n) where cchar x | isAlpha x || isDigit x = [x] | otherwise = "_" ++ show (fromEnum x) ++ "_"
158
false
true
2
10
52
101
44
57
null
null
mcimini/Gradualizer
FinalType.hs
mit
consumer_premise pkg (Var variable) (Hypothetical premise1 premise2) = False
76
consumer_premise pkg (Var variable) (Hypothetical premise1 premise2) = False
76
consumer_premise pkg (Var variable) (Hypothetical premise1 premise2) = False
76
false
false
1
7
8
31
13
18
null
null
rolph-recto/HLisp
src/Language/HLisp/Prelude.hs
mit
hlispPrelude :: LispEnv a hlispPrelude = let pstr = [("random", "[fun [lo hi] [__PRIM__random lo hi]]") , ("+", "[fun [x y] [__PRIM__+ x y]]") , ("-", "[fun [x y] [__PRIM__- x y]]") , ("*", "[fun [x y] [__PRIM__* x y]]") , ("/", "[fun [x y] [__PRIM__/ x y]]") ...
2,522
hlispPrelude :: LispEnv a hlispPrelude = let pstr = [("random", "[fun [lo hi] [__PRIM__random lo hi]]") , ("+", "[fun [x y] [__PRIM__+ x y]]") , ("-", "[fun [x y] [__PRIM__- x y]]") , ("*", "[fun [x y] [__PRIM__* x y]]") , ("/", "[fun [x y] [__PRIM__/ x y]]") ...
2,522
hlispPrelude = let pstr = [("random", "[fun [lo hi] [__PRIM__random lo hi]]") , ("+", "[fun [x y] [__PRIM__+ x y]]") , ("-", "[fun [x y] [__PRIM__- x y]]") , ("*", "[fun [x y] [__PRIM__* x y]]") , ("/", "[fun [x y] [__PRIM__/ x y]]") , ("<", "[fun ...
2,496
false
true
0
20
815
388
231
157
null
null
WawerOS/Chessotron2000
src/DataCollect.hs
mit
showGame ::[(Move,Board)] -> IO () showGame = showZip . listToZip
65
showGame ::[(Move,Board)] -> IO () showGame = showZip . listToZip
65
showGame = showZip . listToZip
30
false
true
0
7
9
33
18
15
null
null
thielema/optparse-applicative
tests/Tests.hs
bsd-3-clause
case_cabal_conf :: Assertion case_cabal_conf = checkHelpText "cabal" Cabal.pinfo ["configure", "--help"]
104
case_cabal_conf :: Assertion case_cabal_conf = checkHelpText "cabal" Cabal.pinfo ["configure", "--help"]
104
case_cabal_conf = checkHelpText "cabal" Cabal.pinfo ["configure", "--help"]
75
false
true
0
6
9
26
14
12
null
null
keent/stack
src/Stack/Docker.hs
bsd-3-clause
reset :: (MonadIO m, MonadReader env m, HasConfig env) => Maybe (Path Abs Dir) -> Bool -> m () reset maybeProjectRoot keepHome = do dockerSandboxDir <- projectDockerSandboxDir projectRoot liftIO (removeDirectoryContents dockerSandboxDir [homeDirName | keepHome] []) where proj...
532
reset :: (MonadIO m, MonadReader env m, HasConfig env) => Maybe (Path Abs Dir) -> Bool -> m () reset maybeProjectRoot keepHome = do dockerSandboxDir <- projectDockerSandboxDir projectRoot liftIO (removeDirectoryContents dockerSandboxDir [homeDirName | keepHome] []) where proj...
532
reset maybeProjectRoot keepHome = do dockerSandboxDir <- projectDockerSandboxDir projectRoot liftIO (removeDirectoryContents dockerSandboxDir [homeDirName | keepHome] []) where projectRoot = fromMaybeProjectRoot maybeProjectRoot -- | The Docker container "entrypoint": special ...
435
false
true
0
11
108
111
54
57
null
null
xenophobia/Egison-Quote
Language/Egison/Quote.hs
mit
childExpr (LetRecExpr bs c) = c:map snd bs
42
childExpr (LetRecExpr bs c) = c:map snd bs
42
childExpr (LetRecExpr bs c) = c:map snd bs
42
false
false
0
6
7
27
12
15
null
null