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
corajr/adventofcode2015
20/src/Gifts.hs
mit
houses = [1..]
14
houses = [1..]
14
houses = [1..]
14
false
false
0
5
2
9
5
4
null
null
beni55/fay
src/Fay/Compiler/FFI.hs
bsd-3-clause
expandApp (TyApp _ op arg) = arg : expandApp op
47
expandApp (TyApp _ op arg) = arg : expandApp op
47
expandApp (TyApp _ op arg) = arg : expandApp op
47
false
false
0
7
9
26
12
14
null
null
aarneranta/china
penn/Translate.hs
bsd-2-clause
runC :: FilePath -> String -> FilePath -> IO () runC pgf source input = do s <- readFile input writeFile tmpLex $ unlines $ map lexText $ sentences s let cmd = unwords ["pgf-translate",pgf,"Phrase",source,source,"ParseEngAbs3.probs", "<", tmpLex, ">", tmpOutput] system cmd putStrLn cmd return ()
309
runC :: FilePath -> String -> FilePath -> IO () runC pgf source input = do s <- readFile input writeFile tmpLex $ unlines $ map lexText $ sentences s let cmd = unwords ["pgf-translate",pgf,"Phrase",source,source,"ParseEngAbs3.probs", "<", tmpLex, ">", tmpOutput] system cmd putStrLn cmd return ()
309
runC pgf source input = do s <- readFile input writeFile tmpLex $ unlines $ map lexText $ sentences s let cmd = unwords ["pgf-translate",pgf,"Phrase",source,source,"ParseEngAbs3.probs", "<", tmpLex, ">", tmpOutput] system cmd putStrLn cmd return ()
261
false
true
0
11
57
131
63
68
null
null
ethercrow/y
src/Y/String.hs
bsd-3-clause
lineSize (LongLine _chunks size) = size
39
lineSize (LongLine _chunks size) = size
39
lineSize (LongLine _chunks size) = size
39
false
false
0
7
5
17
8
9
null
null
JoeyEremondi/haskelm
src/Parse/Helpers.hs
bsd-3-clause
freshLine :: IParser [[String]] freshLine = try (many1 newline >> many space_nl) <|> try (many1 space_nl) <?> "" where space_nl = try $ spaces >> many1 newline
163
freshLine :: IParser [[String]] freshLine = try (many1 newline >> many space_nl) <|> try (many1 space_nl) <?> "" where space_nl = try $ spaces >> many1 newline
163
freshLine = try (many1 newline >> many space_nl) <|> try (many1 space_nl) <?> "" where space_nl = try $ spaces >> many1 newline
131
false
true
3
9
30
81
36
45
null
null
manasij7479/hasnake
main.hs
gpl-3.0
dePair :: Integer -> Int -> Int -> (Int, Int) dePair z i j= let w :: Int w = fromIntegral $ floor $ sqrt $ fromIntegral $ ((8*z+1) `div` 2 ) t :: Int t = (w*w+w) `div` 2 y = fromIntegral z - t x = w - y in (x `mod` i, ...
330
dePair :: Integer -> Int -> Int -> (Int, Int) dePair z i j= let w :: Int w = fromIntegral $ floor $ sqrt $ fromIntegral $ ((8*z+1) `div` 2 ) t :: Int t = (w*w+w) `div` 2 y = fromIntegral z - t x = w - y in (x `mod` i, ...
330
dePair z i j= let w :: Int w = fromIntegral $ floor $ sqrt $ fromIntegral $ ((8*z+1) `div` 2 ) t :: Int t = (w*w+w) `div` 2 y = fromIntegral z - t x = w - y in (x `mod` i, y `mod` j)
284
false
true
0
14
159
160
87
73
null
null
dmuneras/LambdaMethods
src/Semantica.hs
gpl-2.0
abs' (FCsc a) = FConst (abs (1/cos (sacarNum (a))))
53
abs' (FCsc a) = FConst (abs (1/cos (sacarNum (a))))
53
abs' (FCsc a) = FConst (abs (1/cos (sacarNum (a))))
53
false
false
0
13
10
44
21
23
null
null
tamarin-prover/tamarin-prover
lib/theory/src/Theory/Constraint/System/Dot.hs
gpl-3.0
dotOnce :: Ord k => (DotState :-> M.Map k D.NodeId) -- ^ Accessor to map storing this type of actions. -> k -- ^ Action index. -> SeDot D.NodeId -- ^ Action to execute only once. -> SeDot D.NodeId dotOnce mapL k dot = do i <- join $ (may...
407
dotOnce :: Ord k => (DotState :-> M.Map k D.NodeId) -- ^ Accessor to map storing this type of actions. -> k -- ^ Action index. -> SeDot D.NodeId -- ^ Action to execute only once. -> SeDot D.NodeId dotOnce mapL k dot = do i <- join $ (may...
407
dotOnce mapL k dot = do i <- join $ (maybe dot return . M.lookup k) `liftM` getM mapL modM mapL (M.insert k i) return i
131
false
true
0
14
155
132
62
70
null
null
yaxu/volca-tidal
beats.hs
gpl-3.0
ctrlN (Speed Crash v) = (53, v)
34
ctrlN (Speed Crash v) = (53, v)
34
ctrlN (Speed Crash v) = (53, v)
34
false
false
0
6
9
24
12
12
null
null
ony/hledger
hledger/Hledger/Cli/Commands/Balance.hs
gpl-3.0
tests_balanceReportAsText = [ "balanceReportAsText" ~: do -- "unicode in balance layout" ~: do j <- readJournal' "2009/01/01 * медвежья шкура\n расходы:покупки 100\n актив:наличные\n" let opts = defreportopts balanceReportAsText opts (balanceReport opts (queryFromOpts (parsedate "2008/11/26") o...
510
tests_balanceReportAsText = [ "balanceReportAsText" ~: do -- "unicode in balance layout" ~: do j <- readJournal' "2009/01/01 * медвежья шкура\n расходы:покупки 100\n актив:наличные\n" let opts = defreportopts balanceReportAsText opts (balanceReport opts (queryFromOpts (parsedate "2008/11/26") o...
510
tests_balanceReportAsText = [ "balanceReportAsText" ~: do -- "unicode in balance layout" ~: do j <- readJournal' "2009/01/01 * медвежья шкура\n расходы:покупки 100\n актив:наличные\n" let opts = defreportopts balanceReportAsText opts (balanceReport opts (queryFromOpts (parsedate "2008/11/26") o...
510
false
false
0
16
161
86
44
42
null
null
meimisaki/Rin
src/Core/Prelude.hs
mit
isArith (EAp (EAp (EVar v) _) _) = elem v operators
51
isArith (EAp (EAp (EVar v) _) _) = elem v operators
51
isArith (EAp (EAp (EVar v) _) _) = elem v operators
51
false
false
0
10
10
37
17
20
null
null
dbp/hworker
src/Data/Aeson/Helpers.hs
isc
-- NOTE(dbp 2015-06-14): Taken from Data.Aeson.Parser.Internal decodeWith :: Parser Value -> (Value -> Result a) -> L.ByteString -> Maybe a decodeWith p to s = case L.parse p s of L.Done _ v -> case to v of Success a -> Just a _ -> Nothing _ -...
330
decodeWith :: Parser Value -> (Value -> Result a) -> L.ByteString -> Maybe a decodeWith p to s = case L.parse p s of L.Done _ v -> case to v of Success a -> Just a _ -> Nothing _ -> Nothing
267
decodeWith p to s = case L.parse p s of L.Done _ v -> case to v of Success a -> Just a _ -> Nothing _ -> Nothing
190
true
true
0
11
126
104
49
55
null
null
randen/cabal
Cabal/Distribution/Simple/LocalBuildInfo.hs
bsd-3-clause
localCompatPackageKey :: LocalBuildInfo -> ComponentId localCompatPackageKey lbi = foldr go (ComponentId (display (package (localPkgDescr lbi)))) (componentsConfigs lbi) where go (_, clbi, _) old_pk = case clbi of LibComponentLocalBuildInfo { componentCompatPackageKey = pk } -> pk _ -> old...
474
localCompatPackageKey :: LocalBuildInfo -> ComponentId localCompatPackageKey lbi = foldr go (ComponentId (display (package (localPkgDescr lbi)))) (componentsConfigs lbi) where go (_, clbi, _) old_pk = case clbi of LibComponentLocalBuildInfo { componentCompatPackageKey = pk } -> pk _ -> old...
474
localCompatPackageKey lbi = foldr go (ComponentId (display (package (localPkgDescr lbi)))) (componentsConfigs lbi) where go (_, clbi, _) old_pk = case clbi of LibComponentLocalBuildInfo { componentCompatPackageKey = pk } -> pk _ -> old_pk -- | External package dependencies for the package...
419
false
true
0
13
92
103
54
49
null
null
swift-nav/ecstatic
Development/Ecstatic.hs
bsd-2-clause
main :: IO () main = do -- ast <- parseFile "test.c" ast <- parseFile "test2.c" --ast <- parseFile "../../SwiftNav/piksi_firmware/libswiftnav/src/amb_kf.c" (globals, funcs) <- checkResult "[Analysis]" . runTrav [] $ withExtDeclHandler (analyseAST ast) extractFuncs --print "GLOBALS:\n" --print $ pretty g...
374
main :: IO () main = do -- ast <- parseFile "test.c" ast <- parseFile "test2.c" --ast <- parseFile "../../SwiftNav/piksi_firmware/libswiftnav/src/amb_kf.c" (globals, funcs) <- checkResult "[Analysis]" . runTrav [] $ withExtDeclHandler (analyseAST ast) extractFuncs --print "GLOBALS:\n" --print $ pretty g...
374
main = do -- ast <- parseFile "test.c" ast <- parseFile "test2.c" --ast <- parseFile "../../SwiftNav/piksi_firmware/libswiftnav/src/amb_kf.c" (globals, funcs) <- checkResult "[Analysis]" . runTrav [] $ withExtDeclHandler (analyseAST ast) extractFuncs --print "GLOBALS:\n" --print $ pretty globals mapM_...
360
false
true
0
11
62
89
43
46
null
null
keera-studios/hsQt
Qtc/Enums/Gui/QStyleOptionTab.hs
bsd-2-clause
ifCornerWidgets :: Int -> CornerWidgets ifCornerWidgets x = QFlags (CCornerWidgets x)
85
ifCornerWidgets :: Int -> CornerWidgets ifCornerWidgets x = QFlags (CCornerWidgets x)
85
ifCornerWidgets x = QFlags (CCornerWidgets x)
45
false
true
0
7
10
32
14
18
null
null
VCTLabs/cbmc-reporter
src/ParseXML.hs
bsd-3-clause
parseResXML :: String -> Maybe (Result Failure) parseResXML out = do cproverElem <- getCproverElems out status <- findChildElem "cprover-status" cproverElem getStatus cproverElem status where getStatus :: X.Element -> X.Element -> Maybe (Result Failure) getStatus cproverElem status = case X.strCon...
621
parseResXML :: String -> Maybe (Result Failure) parseResXML out = do cproverElem <- getCproverElems out status <- findChildElem "cprover-status" cproverElem getStatus cproverElem status where getStatus :: X.Element -> X.Element -> Maybe (Result Failure) getStatus cproverElem status = case X.strCon...
621
parseResXML out = do cproverElem <- getCproverElems out status <- findChildElem "cprover-status" cproverElem getStatus cproverElem status where getStatus :: X.Element -> X.Element -> Maybe (Result Failure) getStatus cproverElem status = case X.strContent status of "FAILURE" -> do failureElem...
573
false
true
0
11
162
177
84
93
null
null
siddhanathan/yi
yi-keymap-vim/src/Yi/Keymap/Vim/EventUtils.hs
gpl-2.0
normalizeCount :: EventString -> EventString normalizeCount s = if T.null countedObject then s else Ev $ showT (operatorCount * objectCount) <> operator <> object where (operatorCount, Ev rest1) = splitCountedCommand s (operator, countedObject) = T.break isDigit rest1 (objectCount, Ev obje...
364
normalizeCount :: EventString -> EventString normalizeCount s = if T.null countedObject then s else Ev $ showT (operatorCount * objectCount) <> operator <> object where (operatorCount, Ev rest1) = splitCountedCommand s (operator, countedObject) = T.break isDigit rest1 (objectCount, Ev obje...
364
normalizeCount s = if T.null countedObject then s else Ev $ showT (operatorCount * objectCount) <> operator <> object where (operatorCount, Ev rest1) = splitCountedCommand s (operator, countedObject) = T.break isDigit rest1 (objectCount, Ev object) = splitCountedCommand (Ev countedObject)
319
false
true
2
11
73
114
59
55
null
null
BlackBrane/ansigraph
src/System/Console/Ansigraph/Examples.hs
mit
-- | Shows an animation of an example time-dependent matrix formed from Pauli matrices, called -- 'unitary'. Specifically, it is the tensor product of σz and σx exponentiated with different -- frequencies. matDemoComplex :: IO () matDemoComplex = animate $ unitary <$> slowDeltas
283
matDemoComplex :: IO () matDemoComplex = animate $ unitary <$> slowDeltas
73
matDemoComplex = animate $ unitary <$> slowDeltas
49
true
true
0
6
46
27
15
12
null
null
nilthehuman/H-99
Tests.hs
unlicense
fact n = n * fact (pred n)
26
fact n = n * fact (pred n)
26
fact n = n * fact (pred n)
26
false
false
2
7
7
27
10
17
null
null
mrmonday/Idris-dev
src/Idris/ParseHelpers.hs
bsd-3-clause
operatorLetter :: MonadicParsing m => m Char operatorLetter = oneOf opChars
75
operatorLetter :: MonadicParsing m => m Char operatorLetter = oneOf opChars
75
operatorLetter = oneOf opChars
30
false
true
0
6
10
24
11
13
null
null
oforero/DiG
src/Main.hs
mit
routesForDocSet :: DocSet -> Snap () routesForDocSet (DocSet n r ps d i pos) = route $ map prefixedTagBuilder ps where prefixedTagBuilder p = (n </> p </> ":suffix" </> ":file", prefixedTagHandler r p d i pos) --allRoutes :: MonadSnap m => [DocSet] -> m a --allRoutes = undefined
296
routesForDocSet :: DocSet -> Snap () routesForDocSet (DocSet n r ps d i pos) = route $ map prefixedTagBuilder ps where prefixedTagBuilder p = (n </> p </> ":suffix" </> ":file", prefixedTagHandler r p d i pos) --allRoutes :: MonadSnap m => [DocSet] -> m a --allRoutes = undefined
295
routesForDocSet (DocSet n r ps d i pos) = route $ map prefixedTagBuilder ps where prefixedTagBuilder p = (n </> p </> ":suffix" </> ":file", prefixedTagHandler r p d i pos) --allRoutes :: MonadSnap m => [DocSet] -> m a --allRoutes = undefined
258
false
true
0
9
65
95
46
49
null
null
tolysz/hs-tls
core/Network/TLS/Struct.hs
bsd-3-clause
packetType (Alert _) = ProtocolType_Alert
48
packetType (Alert _) = ProtocolType_Alert
48
packetType (Alert _) = ProtocolType_Alert
48
false
false
0
7
11
15
7
8
null
null
databrary/databrary
src/Controller/Ingest.hs
agpl-3.0
viewIngest :: ActionRoute (Id Volume) viewIngest = action GET (pathId </< "ingest") $ \vi -> withAuth $ do checkMemberADMIN s <- focusIO getIngestStatus v <- getVolume PermissionEDIT vi peeks $ blankForm . htmlIngestForm v s
232
viewIngest :: ActionRoute (Id Volume) viewIngest = action GET (pathId </< "ingest") $ \vi -> withAuth $ do checkMemberADMIN s <- focusIO getIngestStatus v <- getVolume PermissionEDIT vi peeks $ blankForm . htmlIngestForm v s
232
viewIngest = action GET (pathId </< "ingest") $ \vi -> withAuth $ do checkMemberADMIN s <- focusIO getIngestStatus v <- getVolume PermissionEDIT vi peeks $ blankForm . htmlIngestForm v s
194
false
true
0
11
42
86
40
46
null
null
jbracker/supermonad-plugin
examples/monad/hmtc/supermonad/TypeChecker.hs
bsd-3-clause
wellinit l (ExpAry {eaElts = es}) = mapM_ (wellinit l) es
57
wellinit l (ExpAry {eaElts = es}) = mapM_ (wellinit l) es
57
wellinit l (ExpAry {eaElts = es}) = mapM_ (wellinit l) es
57
false
false
0
9
10
34
17
17
null
null
bitemyapp/hdph-rs
src/Control/Parallel/HdpH/Internal/Threadpool.hs
bsd-3-clause
putThreads :: [Thread m] -> ThreadM m () putThreads threads = do all_pools@(my_pool:_) <- getPools liftIO $ mapM_ (pushFrontIO $ snd my_pool) threads liftSparkM $ wakeupSched (min (length all_pools) (length threads))
222
putThreads :: [Thread m] -> ThreadM m () putThreads threads = do all_pools@(my_pool:_) <- getPools liftIO $ mapM_ (pushFrontIO $ snd my_pool) threads liftSparkM $ wakeupSched (min (length all_pools) (length threads))
222
putThreads threads = do all_pools@(my_pool:_) <- getPools liftIO $ mapM_ (pushFrontIO $ snd my_pool) threads liftSparkM $ wakeupSched (min (length all_pools) (length threads))
181
false
true
0
12
36
100
48
52
null
null
SimSaladin/animu-watch
src/Core.hs
bsd-3-clause
getFiltersDB :: DB (SqlExpr (Entity LibraryEntry) -> SqlExpr (Entity Anime) -> [SqlExpr (Value Bool)]) getFiltersDB = do (tf, wf, ma, ig) <- lift $ lift getFilters return $ \entry anime -> maybe [] (\x -> [ entry ^. LibraryEntryStatus `in_` valList (map tshow x) ]) wf ++ maybe [] (\x -> [ ani...
528
getFiltersDB :: DB (SqlExpr (Entity LibraryEntry) -> SqlExpr (Entity Anime) -> [SqlExpr (Value Bool)]) getFiltersDB = do (tf, wf, ma, ig) <- lift $ lift getFilters return $ \entry anime -> maybe [] (\x -> [ entry ^. LibraryEntryStatus `in_` valList (map tshow x) ]) wf ++ maybe [] (\x -> [ ani...
528
getFiltersDB = do (tf, wf, ma, ig) <- lift $ lift getFilters return $ \entry anime -> maybe [] (\x -> [ entry ^. LibraryEntryStatus `in_` valList (map tshow x) ]) wf ++ maybe [] (\x -> [ anime ^. AnimeStatus `in_` valList (map tshow x) ]) tf ++ maybe [] (\x -> [ anime ^. AnimeT...
425
false
true
0
19
148
253
134
119
null
null
minad/console-style
src/System/Console/Style.hs
mit
color16ToANSI 14 = Cyan
23
color16ToANSI 14 = Cyan
23
color16ToANSI 14 = Cyan
23
false
false
0
5
3
9
4
5
null
null
kawamuray/ganeti
test/hs/Test/Ganeti/Query/Aliases.hs
gpl-2.0
-- | Check that instance alias targets exist case_instanceAliasesTargetsExist :: Assertion case_instanceAliasesTargetsExist = checkTargets "Instance" I.instanceFields I.instanceAliases
186
case_instanceAliasesTargetsExist :: Assertion case_instanceAliasesTargetsExist = checkTargets "Instance" I.instanceFields I.instanceAliases
141
case_instanceAliasesTargetsExist = checkTargets "Instance" I.instanceFields I.instanceAliases
95
true
true
0
6
18
23
12
11
null
null
keera-studios/hsQt
Qtc/Gui/QItemDelegate.hs
bsd-2-clause
itemEditorFactory :: QItemDelegate a -> (()) -> IO (QItemEditorFactory ()) itemEditorFactory x0 () = withObjectRefResult $ withObjectPtr x0 $ \cobj_x0 -> qtc_QItemDelegate_itemEditorFactory cobj_x0
207
itemEditorFactory :: QItemDelegate a -> (()) -> IO (QItemEditorFactory ()) itemEditorFactory x0 () = withObjectRefResult $ withObjectPtr x0 $ \cobj_x0 -> qtc_QItemDelegate_itemEditorFactory cobj_x0
207
itemEditorFactory x0 () = withObjectRefResult $ withObjectPtr x0 $ \cobj_x0 -> qtc_QItemDelegate_itemEditorFactory cobj_x0
132
false
true
0
10
32
64
31
33
null
null
Mikolaj/haskell-linux-perf
ghc-events-perf/ghc-events-perf.hs
bsd-3-clause
command ["convert", program_name, out_file, perf_file, eventlog_file] = do let sync_eventlog_file = program_name ++ ".perf.eventlog" syncArgs = [ program_name , perf_file , sync_eventlog_file ] putStrLn "Translating and synchronizing..." syncHandle <- runPr...
710
command ["convert", program_name, out_file, perf_file, eventlog_file] = do let sync_eventlog_file = program_name ++ ".perf.eventlog" syncArgs = [ program_name , perf_file , sync_eventlog_file ] putStrLn "Translating and synchronizing..." syncHandle <- runPr...
710
command ["convert", program_name, out_file, perf_file, eventlog_file] = do let sync_eventlog_file = program_name ++ ".perf.eventlog" syncArgs = [ program_name , perf_file , sync_eventlog_file ] putStrLn "Translating and synchronizing..." syncHandle <- runPr...
710
false
false
0
10
233
129
64
65
null
null
bredelings/BAli-Phy
haskell/SModel.hs
gpl-2.0
branch_transition_p (SingleBranchLengthModel tree smodel@(MixtureModel cs )) b = [qExp $ scale (branch_length tree b/r) component | (_,component) <- cs] where r = rate smodel
195
branch_transition_p (SingleBranchLengthModel tree smodel@(MixtureModel cs )) b = [qExp $ scale (branch_length tree b/r) component | (_,component) <- cs] where r = rate smodel
195
branch_transition_p (SingleBranchLengthModel tree smodel@(MixtureModel cs )) b = [qExp $ scale (branch_length tree b/r) component | (_,component) <- cs] where r = rate smodel
195
false
false
1
10
44
81
39
42
null
null
tjakway/ghcjvm
compiler/basicTypes/Id.hs
bsd-3-clause
-- | Make a global 'Id' without any extra information at all mkVanillaGlobal :: Name -> Type -> Id mkVanillaGlobal name ty = mkVanillaGlobalWithInfo name ty vanillaIdInfo
170
mkVanillaGlobal :: Name -> Type -> Id mkVanillaGlobal name ty = mkVanillaGlobalWithInfo name ty vanillaIdInfo
109
mkVanillaGlobal name ty = mkVanillaGlobalWithInfo name ty vanillaIdInfo
71
true
true
0
8
26
37
17
20
null
null
kishoredbn/barrelfish
tools/flounder/CAbsSyntax.hs
mit
pp_stmt (If e sl []) = [ "if (" ++ (pp_expr e) ++ ") {" ] ++ (indent_stmts sl) ++ ["}"]
91
pp_stmt (If e sl []) = [ "if (" ++ (pp_expr e) ++ ") {" ] ++ (indent_stmts sl) ++ ["}"]
91
pp_stmt (If e sl []) = [ "if (" ++ (pp_expr e) ++ ") {" ] ++ (indent_stmts sl) ++ ["}"]
91
false
false
0
11
24
55
28
27
null
null
bno1/adventofcode_2016
d21/main.hs
mit
-- those are straight forward too reverseOp (op@(Reverse _ _):os) s = reverseOp os $ applyOp s op
97
reverseOp (op@(Reverse _ _):os) s = reverseOp os $ applyOp s op
63
reverseOp (op@(Reverse _ _):os) s = reverseOp os $ applyOp s op
63
true
false
1
9
17
42
21
21
null
null
phylake/avm3
llvm/passes/abct.hs
mit
abcT1 {- 0x26 -} i u d s m (br, Abc.PushTrue) = (br, [PushTrue])
64
abcT1 {- 0x26 -} i u d s m (br, Abc.PushTrue) = (br, [PushTrue])
64
abcT1 {- 0x26 -} i u d s m (br, Abc.PushTrue) = (br, [PushTrue])
64
false
false
0
7
13
38
21
17
null
null
pparkkin/eta
compiler/ETA/HsSyn/HsExpr.hs
bsd-3-clause
matchContextErrString (StmtCtxt GhciStmtCtxt) = ptext (sLit "interactive GHCi command")
92
matchContextErrString (StmtCtxt GhciStmtCtxt) = ptext (sLit "interactive GHCi command")
92
matchContextErrString (StmtCtxt GhciStmtCtxt) = ptext (sLit "interactive GHCi command")
92
false
false
0
7
13
24
11
13
null
null
kadena-io/pact
src/Pact/Types/Term.hs
bsd-3-clause
toBindPairs :: BindPair n -> (Arg n,n) toBindPairs (BindPair a v) = (a,v)
73
toBindPairs :: BindPair n -> (Arg n,n) toBindPairs (BindPair a v) = (a,v)
73
toBindPairs (BindPair a v) = (a,v)
34
false
true
0
7
12
44
23
21
null
null
swift-nav/plover
src/Language/Plover/CodeGen.hs
mit
liftLoc ty loc (bnd:bnds) = lloc where lloc = CmLoc { apIndex = \idx -> return $ liftLoc ty loc bnds , store = error "Cannot store into liftLoc" , asRValue = error "Cannot get liftLoc asRValue" , asArgument = defaultAsArgument lloc ...
567
liftLoc ty loc (bnd:bnds) = lloc where lloc = CmLoc { apIndex = \idx -> return $ liftLoc ty loc bnds , store = error "Cannot store into liftLoc" , asRValue = error "Cannot get liftLoc asRValue" , asArgument = defaultAsArgument lloc ...
567
liftLoc ty loc (bnd:bnds) = lloc where lloc = CmLoc { apIndex = \idx -> return $ liftLoc ty loc bnds , store = error "Cannot store into liftLoc" , asRValue = error "Cannot get liftLoc asRValue" , asArgument = defaultAsArgument lloc ...
567
false
false
1
13
232
147
73
74
null
null
aelve/hslibs
src/Guide/Utils.hs
bsd-3-clause
---------------------------------------------------------------------------- -- Lists ---------------------------------------------------------------------------- -- | Move the -1st element that satisfies the predicate- up. moveUp :: (a -> Bool) -> [a] -> [a] moveUp p (x:y:xs) = if p y then y : x : xs else x : moveUp ...
328
moveUp :: (a -> Bool) -> [a] -> [a] moveUp p (x:y:xs) = if p y then y : x : xs else x : moveUp p (y:xs)
103
moveUp p (x:y:xs) = if p y then y : x : xs else x : moveUp p (y:xs)
67
true
true
0
9
43
92
49
43
null
null
jgm/css-text
Text/CSS/Parse.hs
bsd-2-clause
skipWS :: Parser () skipWS = (string "/*" >> endComment >> skipWS) <|> (skip isSpace >> skipWhile isSpace >> skipWS) <|> return () where endComment = do skipWhile (/= '*') (do _ <- char '*' (char '/' >> return ()) <|> endComment ) <|> fail "Missing end...
329
skipWS :: Parser () skipWS = (string "/*" >> endComment >> skipWS) <|> (skip isSpace >> skipWhile isSpace >> skipWS) <|> return () where endComment = do skipWhile (/= '*') (do _ <- char '*' (char '/' >> return ()) <|> endComment ) <|> fail "Missing end...
329
skipWS = (string "/*" >> endComment >> skipWS) <|> (skip isSpace >> skipWhile isSpace >> skipWS) <|> return () where endComment = do skipWhile (/= '*') (do _ <- char '*' (char '/' >> return ()) <|> endComment ) <|> fail "Missing end comment"
309
false
true
0
15
115
123
58
65
null
null
shlevy/ghc
compiler/simplCore/SetLevels.hs
bsd-3-clause
-- Going all the way to top level ---------------------------------------------------- -- Three help functions for the type-abstraction case lvlRhs :: LevelEnv -> RecFlag -> Bool -- Is this a bottoming function -> Maybe JoinArity -> CoreExprWithFVs -> LvlM LevelledExp...
459
lvlRhs :: LevelEnv -> RecFlag -> Bool -- Is this a bottoming function -> Maybe JoinArity -> CoreExprWithFVs -> LvlM LevelledExpr lvlRhs env rec_flag is_bot mb_join_arity expr = lvlFloatRhs [] (le_ctxt_lvl env) env rec_flag is_bot mb_join_arity expr
315
lvlRhs env rec_flag is_bot mb_join_arity expr = lvlFloatRhs [] (le_ctxt_lvl env) env rec_flag is_bot mb_join_arity expr
137
true
true
0
10
123
75
38
37
null
null
rueshyna/gogol
gogol-slides/gen/Network/Google/Slides/Types/Product.hs
mpl-2.0
-- | Creates a value of 'UpdateImagePropertiesRequest' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'uiprObjectId' -- -- * 'uiprImageProperties' -- -- * 'uiprFields' updateImagePropertiesRequest :: UpdateImagePropertiesRequest u...
484
updateImagePropertiesRequest :: UpdateImagePropertiesRequest updateImagePropertiesRequest = UpdateImagePropertiesRequest' { _uiprObjectId = Nothing , _uiprImageProperties = Nothing , _uiprFields = Nothing }
230
updateImagePropertiesRequest = UpdateImagePropertiesRequest' { _uiprObjectId = Nothing , _uiprImageProperties = Nothing , _uiprFields = Nothing }
165
true
true
0
6
84
40
28
12
null
null
mfine/ghc
compiler/main/DynFlags.hs
bsd-3-clause
splitPathList :: String -> [String] splitPathList s = filter notNull (splitUp s) -- empty paths are ignored: there might be a trailing -- ':' in the initial list, for example. Empty paths can -- cause confusion when they are translated into -I options -- ...
2,212
splitPathList :: String -> [String] splitPathList s = filter notNull (splitUp s) -- empty paths are ignored: there might be a trailing -- ':' in the initial list, for example. Empty paths can -- cause confusion when they are translated into -I options -- ...
2,212
splitPathList s = filter notNull (splitUp s) -- empty paths are ignored: there might be a trailing -- ':' in the initial list, for example. Empty paths can -- cause confusion when they are translated into -I options -- for passing to gcc. where #ifndef ...
2,176
false
true
1
8
710
66
33
33
null
null
CBMM/petersonfaces
petersonfaces-frontend/src/FaceFeatures.hs
bsd-3-clause
faceWidget :: forall t m.MonadWidget t m => BoundingBox -> ScaledImage t -> T.Text -> m (FaceAttributes t) faceWidget bb@(BoundingBox (Coord bX0 bY0) (Coord bX1 bY1)) outsideImg imgSrc = mdo pb <- getPostBuild let topScale = ((200 /) . fI . fst) <$> siNaturalSize outsideImg img <- scaledImage def { sicInitialSour...
1,234
faceWidget :: forall t m.MonadWidget t m => BoundingBox -> ScaledImage t -> T.Text -> m (FaceAttributes t) faceWidget bb@(BoundingBox (Coord bX0 bY0) (Coord bX1 bY1)) outsideImg imgSrc = mdo pb <- getPostBuild let topScale = ((200 /) . fI . fst) <$> siNaturalSize outsideImg img <- scaledImage def { sicInitialSour...
1,234
faceWidget bb@(BoundingBox (Coord bX0 bY0) (Coord bX1 bY1)) outsideImg imgSrc = mdo pb <- getPostBuild let topScale = ((200 /) . fI . fst) <$> siNaturalSize outsideImg img <- scaledImage def { sicInitialSource = imgSrc , sicTopLevelScale = topScale } let (wid,he...
1,127
false
true
0
17
345
408
220
188
null
null
phischu/fragnix
tests/packages/scotty/Data.Text.Lazy.hs
bsd-3-clause
tails ts@(Chunk t ts') | T.length t == 1 = ts : tails ts' | otherwise = ts : tails (Chunk (T.unsafeTail t) ts')
121
tails ts@(Chunk t ts') | T.length t == 1 = ts : tails ts' | otherwise = ts : tails (Chunk (T.unsafeTail t) ts')
121
tails ts@(Chunk t ts') | T.length t == 1 = ts : tails ts' | otherwise = ts : tails (Chunk (T.unsafeTail t) ts')
121
false
false
4
10
33
84
36
48
null
null
elfeck/elfeckcom
src/Web/BetterMdParser.hs
mit
-- Tag the lines as List, Enum or Raw (= normal) prL3P :: [Line] -> [Line] -> [Line] prL3P [] acc = reverse acc
111
prL3P :: [Line] -> [Line] -> [Line] prL3P [] acc = reverse acc
62
prL3P [] acc = reverse acc
26
true
true
0
7
23
39
21
18
null
null
mindriot101/pandoc
src/Text/Pandoc/Readers/TWiki.hs
gpl-2.0
tableColumnContent :: Show a => TWParser a -> TWParser B.Blocks tableColumnContent end = manyTill content (lookAhead $ try end) >>= return . B.plain . mconcat where content = continuation <|> inline continuation = try $ char '\\' >> newline >> return mempty
267
tableColumnContent :: Show a => TWParser a -> TWParser B.Blocks tableColumnContent end = manyTill content (lookAhead $ try end) >>= return . B.plain . mconcat where content = continuation <|> inline continuation = try $ char '\\' >> newline >> return mempty
267
tableColumnContent end = manyTill content (lookAhead $ try end) >>= return . B.plain . mconcat where content = continuation <|> inline continuation = try $ char '\\' >> newline >> return mempty
203
false
true
0
11
51
97
46
51
null
null
iblumenfeld/cryptol
src/Cryptol/TypeCheck/Monad.hs
bsd-3-clause
inRangeMb :: Maybe Range -> InferM a -> InferM a inRangeMb Nothing m = m
73
inRangeMb :: Maybe Range -> InferM a -> InferM a inRangeMb Nothing m = m
73
inRangeMb Nothing m = m
24
false
true
0
7
15
33
15
18
null
null
chrisdone/hl
src/HL/V/Template.hs
bsd-3-clause
-- | Footer across the whole site. footer :: (Route App -> AttributeValue) -> Maybe (Route App) -> Html footer url r = div !class_ "footer" $ (div !class_ "container" $ (p (do case r of Just (WikiR page) -> wikiLicense (Just page) Just (WikiHomeR{}) -> wikiLice...
1,777
footer :: (Route App -> AttributeValue) -> Maybe (Route App) -> Html footer url r = div !class_ "footer" $ (div !class_ "container" $ (p (do case r of Just (WikiR page) -> wikiLicense (Just page) Just (WikiHomeR{}) -> wikiLicense (Nothing :: Maybe Text) ...
1,742
footer url r = div !class_ "footer" $ (div !class_ "container" $ (p (do case r of Just (WikiR page) -> wikiLicense (Just page) Just (WikiHomeR{}) -> wikiLicense (Nothing :: Maybe Text) _ -> hlCopy ""))) where hlCopy =...
1,673
true
true
1
20
792
400
186
214
null
null
futtetennista/IntroductionToFunctionalProgramming
itfp/src/Chapter4.hs
mit
above :: [[a]] -> [[a]] -> [[a]] above p q | width p == width q = p ++ q
80
above :: [[a]] -> [[a]] -> [[a]] above p q | width p == width q = p ++ q
80
above p q | width p == width q = p ++ q
47
false
true
0
9
27
62
32
30
null
null
MichaelXavier/Seraph
test/Seraph/ProcessSpec.hs
bsd-2-clause
------------------------------------------------------------------------------- pushoverPid :: ProcessID pushoverPid = 123
122
pushoverPid :: ProcessID pushoverPid = 123
42
pushoverPid = 123
17
true
true
0
4
6
12
7
5
null
null
pikajude/melvin
src/Melvin/Options.hs
mit
levelParser x = Left $ "Unknown log level " ++ x
48
levelParser x = Left $ "Unknown log level " ++ x
48
levelParser x = Left $ "Unknown log level " ++ x
48
false
false
0
6
10
17
8
9
null
null
mbg/system-f-with-kind-polymorphism
KindCheck.hs
mit
errFunArg :: String errFunArg = "\n\tFound a type function expecting a type argument of kind `%s',\n\tbut it is applied to a type of kind `%s'.\n"
147
errFunArg :: String errFunArg = "\n\tFound a type function expecting a type argument of kind `%s',\n\tbut it is applied to a type of kind `%s'.\n"
146
errFunArg = "\n\tFound a type function expecting a type argument of kind `%s',\n\tbut it is applied to a type of kind `%s'.\n"
126
false
true
0
4
25
11
6
5
null
null
brendanhay/gogol
gogol-appengine/gen/Network/Google/AppEngine/Types/Product.hs
mpl-2.0
-- | An optional string description of this rule. This field has a maximum -- length of 100 characters. frDescription :: Lens' FirewallRule (Maybe Text) frDescription = lens _frDescription (\ s a -> s{_frDescription = a})
229
frDescription :: Lens' FirewallRule (Maybe Text) frDescription = lens _frDescription (\ s a -> s{_frDescription = a})
125
frDescription = lens _frDescription (\ s a -> s{_frDescription = a})
76
true
true
1
9
43
53
26
27
null
null
plaimi/tempuhs
src/Tempuhs/Functions.hs
agpl-3.0
linRange :: Double -> Double -> ProperTime -> TimeRange -- | 'linRange' gives a 'TimeRange' from a value with linear uncertainty. linRange val uncertainty unit = let f o = unit * (val `o` uncertainty) in (f (-), f (+))
220
linRange :: Double -> Double -> ProperTime -> TimeRange linRange val uncertainty unit = let f o = unit * (val `o` uncertainty) in (f (-), f (+))
146
linRange val uncertainty unit = let f o = unit * (val `o` uncertainty) in (f (-), f (+))
90
true
true
0
11
41
80
41
39
null
null
mariefarrell/Hets
Syntax/Parse_AS_Structured.hs
gpl-2.0
parseHiding :: LogicGraph -> AParser st ([G_hiding], [Token]) parseHiding = parseMapOrHide "along" G_logic_projection G_symb_list parseItemsList
146
parseHiding :: LogicGraph -> AParser st ([G_hiding], [Token]) parseHiding = parseMapOrHide "along" G_logic_projection G_symb_list parseItemsList
146
parseHiding = parseMapOrHide "along" G_logic_projection G_symb_list parseItemsList
84
false
true
0
8
16
41
22
19
null
null
BartAdv/clientsession
tests/runtests.hs
bsd-2-clause
propAES :: MyKey -> MyIV -> S.ByteString -> Bool propAES (MyKey key) (MyIV iv) bs = decrypt key (encrypt key iv bs) == Just bs
126
propAES :: MyKey -> MyIV -> S.ByteString -> Bool propAES (MyKey key) (MyIV iv) bs = decrypt key (encrypt key iv bs) == Just bs
126
propAES (MyKey key) (MyIV iv) bs = decrypt key (encrypt key iv bs) == Just bs
77
false
true
0
8
24
66
32
34
null
null
ecaustin/haskhol-deductive
src/HaskHOL/Lib/Classic.hs
bsd-2-clause
thmEXISTS :: ClassicCtxt thry => HOL cls thry HOLThm thmEXISTS = Base.thmEXISTS
79
thmEXISTS :: ClassicCtxt thry => HOL cls thry HOLThm thmEXISTS = Base.thmEXISTS
79
thmEXISTS = Base.thmEXISTS
26
false
true
0
6
11
27
13
14
null
null
kvelicka/frag
src/BSP.hs
gpl-2.0
toBools :: [Word8] -> [Bool] toBools list = [ y | x<-list, y <- map (testBit x) [0..7]]
92
toBools :: [Word8] -> [Bool] toBools list = [ y | x<-list, y <- map (testBit x) [0..7]]
91
toBools list = [ y | x<-list, y <- map (testBit x) [0..7]]
62
false
true
0
11
22
65
32
33
null
null
rahulmutt/ghcvm
compiler/Eta/CodeGen/Monad.hs
bsd-3-clause
newIdLoc :: NonVoid Id -> CodeGen CgLoc newIdLoc (NonVoid id) = newTemp (isGcPtrRep rep) (primRepFieldType rep) where rep = idPrimRep id
138
newIdLoc :: NonVoid Id -> CodeGen CgLoc newIdLoc (NonVoid id) = newTemp (isGcPtrRep rep) (primRepFieldType rep) where rep = idPrimRep id
138
newIdLoc (NonVoid id) = newTemp (isGcPtrRep rep) (primRepFieldType rep) where rep = idPrimRep id
98
false
true
0
7
22
58
27
31
null
null
guoy34/ampersand
src/Database/Design/Ampersand/FSpec/Crud.hs
gpl-3.0
getCrudObjectsForInterface :: CrudInfo -> Interface -> [(A_Concept,Bool,Bool,Bool,Bool)] getCrudObjectsForInterface crudInfo ifc = case lookup ifc $ crudObjsPerInterface crudInfo of Nothing -> fatal 33 $ "NO CRUD objects for interface " ++ show (name ifc) Just crudObjs -> crudObjs
298
getCrudObjectsForInterface :: CrudInfo -> Interface -> [(A_Concept,Bool,Bool,Bool,Bool)] getCrudObjectsForInterface crudInfo ifc = case lookup ifc $ crudObjsPerInterface crudInfo of Nothing -> fatal 33 $ "NO CRUD objects for interface " ++ show (name ifc) Just crudObjs -> crudObjs
298
getCrudObjectsForInterface crudInfo ifc = case lookup ifc $ crudObjsPerInterface crudInfo of Nothing -> fatal 33 $ "NO CRUD objects for interface " ++ show (name ifc) Just crudObjs -> crudObjs
209
false
true
0
11
53
91
46
45
null
null
redelmann/haskell-distribution
Data/Distribution/Sample.hs
apache-2.0
sample :: RandomGen g => Generator a -> g -> (a, g) sample g k = (values g ! i, k'') where n = capacity g (j, k') = randomR (0, n - 1) k (u, k'') = random k' i = if u < probabilities g ! j then j else indexes g ! j
256
sample :: RandomGen g => Generator a -> g -> (a, g) sample g k = (values g ! i, k'') where n = capacity g (j, k') = randomR (0, n - 1) k (u, k'') = random k' i = if u < probabilities g ! j then j else indexes g ! j
256
sample g k = (values g ! i, k'') where n = capacity g (j, k') = randomR (0, n - 1) k (u, k'') = random k' i = if u < probabilities g ! j then j else indexes g ! j
204
false
true
0
8
97
137
71
66
null
null
kyclark/group-with
GroupWithTest.hs
apache-2.0
multimapEq :: (Ord a, Ord b, Eq a, Eq b) => Map a [b] -> Map a [b] -> Bool multimapEq x y = multimapListEq (Map.toList x) (Map.toList y)
140
multimapEq :: (Ord a, Ord b, Eq a, Eq b) => Map a [b] -> Map a [b] -> Bool multimapEq x y = multimapListEq (Map.toList x) (Map.toList y)
140
multimapEq x y = multimapListEq (Map.toList x) (Map.toList y)
65
false
true
0
9
32
88
44
44
null
null
purcell/adventofcode2016
src/Day11.hs
bsd-3-clause
exampleBuilding :: Building exampleBuilding = Building 0 [ (Item Microchip Hydrogen, 0) , (Item Microchip Lithium, 0) , (Item Generator Hydrogen, 1) , (Item Generator Lithium, 2) ]
206
exampleBuilding :: Building exampleBuilding = Building 0 [ (Item Microchip Hydrogen, 0) , (Item Microchip Lithium, 0) , (Item Generator Hydrogen, 1) , (Item Generator Lithium, 2) ]
206
exampleBuilding = Building 0 [ (Item Microchip Hydrogen, 0) , (Item Microchip Lithium, 0) , (Item Generator Hydrogen, 1) , (Item Generator Lithium, 2) ]
178
false
true
0
8
53
72
40
32
null
null
fffej/haskellprojects
fluidDynamics/Main.hs
bsd-2-clause
setButton :: State -> Key -> IO () setButton s (MouseButton LeftButton) = leftDown s $~ not
91
setButton :: State -> Key -> IO () setButton s (MouseButton LeftButton) = leftDown s $~ not
91
setButton s (MouseButton LeftButton) = leftDown s $~ not
56
false
true
0
10
16
47
21
26
null
null
Alexander-Ignatyev/astro
src/Data/Astro/Time/Conv.hs
bsd-3-clause
lctToZonedTime :: LocalCivilTime -> ZonedTime lctToZonedTime lct = ZonedTime { zonedTimeToLocalTime = lt, zonedTimeZone = tz } where tz = dhToTimeZone $ lctTimeZone lct (y, m, d, hours, mins, secs) = lctToYMDHMS lct day = fromGregorian y m d time = TimeOfDay hours mins (realToFrac secs) ...
378
lctToZonedTime :: LocalCivilTime -> ZonedTime lctToZonedTime lct = ZonedTime { zonedTimeToLocalTime = lt, zonedTimeZone = tz } where tz = dhToTimeZone $ lctTimeZone lct (y, m, d, hours, mins, secs) = lctToYMDHMS lct day = fromGregorian y m d time = TimeOfDay hours mins (realToFrac secs) ...
378
lctToZonedTime lct = ZonedTime { zonedTimeToLocalTime = lt, zonedTimeZone = tz } where tz = dhToTimeZone $ lctTimeZone lct (y, m, d, hours, mins, secs) = lctToYMDHMS lct day = fromGregorian y m d time = TimeOfDay hours mins (realToFrac secs) lt = LocalTime { localDay = day, localTimeOf...
332
false
true
4
8
90
123
68
55
null
null
ghcjs/jsaddle-dom
src/JSDOM/Generated/WheelEvent.hs
mit
-- | <https://developer.mozilla.org/en-US/docs/Web/API/WheelEvent.initWebKitWheelEvent Mozilla WheelEvent.initWebKitWheelEvent documentation> initWebKitWheelEvent :: (MonadDOM m) => WheelEvent -> Maybe Int -> Maybe Int -> ...
987
initWebKitWheelEvent :: (MonadDOM m) => WheelEvent -> Maybe Int -> Maybe Int -> Maybe Window -> Maybe Int -> Maybe Int -> ...
844
initWebKitWheelEvent self wheelDeltaX wheelDeltaY view screenX screenY clientX clientY ctrlKey altKey shiftKey metaKey = liftDOM (void (self ^. jsf "initWebKitWheelEvent" [toJSVal wheelDeltaX, toJSVal wheelDeltaY, toJSVal view, toJSVal screenX, toJSVal screenY, toJSVal client...
435
true
true
0
19
380
209
100
109
null
null
Jon0/status
src/Util.hs
gpl-3.0
-- filters out Nothing values concatMaybe :: [Maybe a] -> [a] concatMaybe (x:xs) = case x of Just a -> a : (concatMaybe xs) Nothing -> (concatMaybe xs) -- add a prefix to each element
193
concatMaybe :: [Maybe a] -> [a] concatMaybe (x:xs) = case x of Just a -> a : (concatMaybe xs) Nothing -> (concatMaybe xs) -- add a prefix to each element
163
concatMaybe (x:xs) = case x of Just a -> a : (concatMaybe xs) Nothing -> (concatMaybe xs) -- add a prefix to each element
131
true
true
0
10
44
77
38
39
null
null
genos/online_problems
exercism/haskell/diamond/src/Diamond.hs
mit
diamond :: Char -> [String] diamond c | 'A' <= c && c <= 'Z' = lines ++ (drop 1 . reverse $ lines) | otherwise = error "Bad character; should be in [A, Z]" where lines :: [String] lines = fmap (mkLine n) . zip [0 ..] $ chars n :: Int n = length chars chars :: String chars = enumFromTo ...
555
diamond :: Char -> [String] diamond c | 'A' <= c && c <= 'Z' = lines ++ (drop 1 . reverse $ lines) | otherwise = error "Bad character; should be in [A, Z]" where lines :: [String] lines = fmap (mkLine n) . zip [0 ..] $ chars n :: Int n = length chars chars :: String chars = enumFromTo ...
555
diamond c | 'A' <= c && c <= 'Z' = lines ++ (drop 1 . reverse $ lines) | otherwise = error "Bad character; should be in [A, Z]" where lines :: [String] lines = fmap (mkLine n) . zip [0 ..] $ chars n :: Int n = length chars chars :: String chars = enumFromTo 'A' c mkLine :: Int -> (In...
527
false
true
0
10
177
284
149
135
null
null
prowdsponsor/fb
src/Facebook/TestUsers.hs
bsd-3-clause
makeFriendConn _ (TestUser { tuAccessToken = Nothing }) = E.throw $ FbLibraryException "The test user passed on the second argument doesn't have\ \ a token. Both users must have a token."
210
makeFriendConn _ (TestUser { tuAccessToken = Nothing }) = E.throw $ FbLibraryException "The test user passed on the second argument doesn't have\ \ a token. Both users must have a token."
210
makeFriendConn _ (TestUser { tuAccessToken = Nothing }) = E.throw $ FbLibraryException "The test user passed on the second argument doesn't have\ \ a token. Both users must have a token."
210
false
false
1
8
53
35
16
19
null
null
beni55/texmath
src/Text/TeXMath/Shared.hs
gpl-2.0
getDiacriticalCommand :: Position -> String -> Maybe String getDiacriticalCommand pos symbol = do command <- M.lookup symbol diaMap guard (not $ command `elem` unavailable) let below = command `elem` under case pos of Under -> if below then Just command else Nothing Over -> if not below then Just comma...
399
getDiacriticalCommand :: Position -> String -> Maybe String getDiacriticalCommand pos symbol = do command <- M.lookup symbol diaMap guard (not $ command `elem` unavailable) let below = command `elem` under case pos of Under -> if below then Just command else Nothing Over -> if not below then Just comma...
399
getDiacriticalCommand pos symbol = do command <- M.lookup symbol diaMap guard (not $ command `elem` unavailable) let below = command `elem` under case pos of Under -> if below then Just command else Nothing Over -> if not below then Just command else Nothing where diaMap = M.fromList diacriticals ...
338
false
true
0
11
83
133
66
67
null
null
nomeata/ghc
compiler/cmm/CmmBuildInfoTables.hs
bsd-3-clause
procpointSRT top_srt top_table entries = do (top, srt) <- bitmap `seq` to_SRT top_srt offset len bitmap return (top, srt) where ints = map (expectJust "constructSRT" . flip Map.lookup top_table) entries sorted_ints = sort ints offset = head sorted_ints bitmap_entries = map (subtract offset) sorte...
407
procpointSRT top_srt top_table entries = do (top, srt) <- bitmap `seq` to_SRT top_srt offset len bitmap return (top, srt) where ints = map (expectJust "constructSRT" . flip Map.lookup top_table) entries sorted_ints = sort ints offset = head sorted_ints bitmap_entries = map (subtract offset) sorte...
407
procpointSRT top_srt top_table entries = do (top, srt) <- bitmap `seq` to_SRT top_srt offset len bitmap return (top, srt) where ints = map (expectJust "constructSRT" . flip Map.lookup top_table) entries sorted_ints = sort ints offset = head sorted_ints bitmap_entries = map (subtract offset) sorte...
407
false
false
0
9
85
139
69
70
null
null
xmonad/xmonad
src/XMonad/Main.hs
bsd-3-clause
launch :: (LayoutClass l Window, Read (l Window)) => XConfig l -> Directories -> IO () launch initxmc drs = do -- setup locale information from environment setLocale LC_ALL (Just "") -- ignore SIGPIPE and SIGCHLD installSignalHandlers -- First, wrap the layout in an existential, to keep things prett...
4,533
launch :: (LayoutClass l Window, Read (l Window)) => XConfig l -> Directories -> IO () launch initxmc drs = do -- setup locale information from environment setLocale LC_ALL (Just "") -- ignore SIGPIPE and SIGCHLD installSignalHandlers -- First, wrap the layout in an existential, to keep things prett...
4,533
launch initxmc drs = do -- setup locale information from environment setLocale LC_ALL (Just "") -- ignore SIGPIPE and SIGCHLD installSignalHandlers -- First, wrap the layout in an existential, to keep things pretty: let xmc = initxmc { layoutHook = Layout $ layoutHook initxmc } dpy <- open...
4,446
false
true
0
20
1,607
985
485
500
null
null
hy-zhang/parser
experimental/FullUntyped3.hs
bsd-3-clause
l = [(3, False), (4, False), (5, False), (1, False), (6, False), (7, True), (8, False), (2, False), (9, False), (10, False)]
124
l = [(3, False), (4, False), (5, False), (1, False), (6, False), (7, True), (8, False), (2, False), (9, False), (10, False)]
124
l = [(3, False), (4, False), (5, False), (1, False), (6, False), (7, True), (8, False), (2, False), (9, False), (10, False)]
124
false
false
1
6
21
99
63
36
null
null
Teaspot-Studio/gpipe-test
.stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/autogen/Paths_gpipe_test.hs
bsd-3-clause
getDataFileName :: FilePath -> IO FilePath getDataFileName name = do dir <- getDataDir return (dir ++ "/" ++ name)
118
getDataFileName :: FilePath -> IO FilePath getDataFileName name = do dir <- getDataDir return (dir ++ "/" ++ name)
118
getDataFileName name = do dir <- getDataDir return (dir ++ "/" ++ name)
75
false
true
0
10
22
45
21
24
null
null
luisgepeto/HaskellLearning
08 Own Types/04_derived_instances.hs
mit
demo19 = Saturday == Sunday
27
demo19 = Saturday == Sunday
27
demo19 = Saturday == Sunday
27
false
false
1
5
4
13
5
8
null
null
bringert/haskell-tar
Codec/Archive/Tar/Write.hs
bsd-3-clause
putTarEntry :: TarEntry -> Put putTarEntry (TarEntry hdr cnt) = do putTarHeader hdr putContent cnt flush -- | Puts a lazy ByteString and nul-pads to a multiple of 512 bytes.
193
putTarEntry :: TarEntry -> Put putTarEntry (TarEntry hdr cnt) = do putTarHeader hdr putContent cnt flush -- | Puts a lazy ByteString and nul-pads to a multiple of 512 bytes.
193
putTarEntry (TarEntry hdr cnt) = do putTarHeader hdr putContent cnt flush -- | Puts a lazy ByteString and nul-pads to a multiple of 512 bytes.
162
false
true
0
9
49
48
20
28
null
null
trxeste/wrk
haskell/write-yourself-a-brainfck/src/main.hs
bsd-3-clause
main :: IO () main = readFile "helloworld.bf" >>= runBrainfuck . parseBrainfuck
79
main :: IO () main = readFile "helloworld.bf" >>= runBrainfuck . parseBrainfuck
79
main = readFile "helloworld.bf" >>= runBrainfuck . parseBrainfuck
65
false
true
0
7
11
27
13
14
null
null
manyoo/ghcjs
src/Gen2/Compactor.hs
mit
identsS f (UOpStat op e) = UOpStat op <$> identsE f e
60
identsS f (UOpStat op e) = UOpStat op <$> identsE f e
60
identsS f (UOpStat op e) = UOpStat op <$> identsE f e
60
false
false
0
7
18
31
14
17
null
null
DanielWaterworth/Idris-dev
src/Idris/ParseOps.hs
bsd-3-clause
{- | Parses an operator in function position i.e. enclosed by `()', with an optional namespace @ OperatorFront ::= '(' '=' ')' | (Identifier_t '.')? '(' Operator_t ')' ; @ -} operatorFront :: IdrisParser Name operatorFront = try ((lchar '(' *> reservedOp "=" <* lchar ')') >> (return eqTy)) ...
382
operatorFront :: IdrisParser Name operatorFront = try ((lchar '(' *> reservedOp "=" <* lchar ')') >> (return eqTy)) <|> maybeWithNS (lchar '(' *> operator <* lchar ')') False []
190
operatorFront = try ((lchar '(' *> reservedOp "=" <* lchar ')') >> (return eqTy)) <|> maybeWithNS (lchar '(' *> operator <* lchar ')') False []
156
true
true
0
12
89
81
39
42
null
null
cies/htoml
src/Text/Toml/Parser.hs
bsd-3-clause
headerValue :: Parser [Text] headerValue = ((pack <$> many1 keyChar) <|> anyStr') `sepBy1` (char '.') where keyChar = alphaNum <|> char '_' <|> char '-' -- | Parses a key-value assignment.
195
headerValue :: Parser [Text] headerValue = ((pack <$> many1 keyChar) <|> anyStr') `sepBy1` (char '.') where keyChar = alphaNum <|> char '_' <|> char '-' -- | Parses a key-value assignment.
195
headerValue = ((pack <$> many1 keyChar) <|> anyStr') `sepBy1` (char '.') where keyChar = alphaNum <|> char '_' <|> char '-' -- | Parses a key-value assignment.
166
false
true
0
10
37
69
36
33
null
null
danchoi/ghb
Ghb/prettyjson.hs
mit
main = do putStrLn "hello" s <- readFile "test.json" let res = either show (show . pp_value) $ runGetJSON readJSTopType s putStrLn $ res
152
main = do putStrLn "hello" s <- readFile "test.json" let res = either show (show . pp_value) $ runGetJSON readJSTopType s putStrLn $ res
152
main = do putStrLn "hello" s <- readFile "test.json" let res = either show (show . pp_value) $ runGetJSON readJSTopType s putStrLn $ res
152
false
false
1
13
39
63
26
37
null
null
green-haskell/ghc
compiler/ghci/ByteCodeItbls.hs
bsd-3-clause
byte5 w = fromIntegral (w `shiftR` 40)
38
byte5 w = fromIntegral (w `shiftR` 40)
38
byte5 w = fromIntegral (w `shiftR` 40)
38
false
false
0
7
6
21
11
10
null
null
olorin/amazonka
amazonka-cloudfront/gen/Network/AWS/CloudFront/CreateInvalidation.hs
mpl-2.0
-- | The distribution\'s id. ciDistributionId :: Lens' CreateInvalidation Text ciDistributionId = lens _ciDistributionId (\ s a -> s{_ciDistributionId = a})
156
ciDistributionId :: Lens' CreateInvalidation Text ciDistributionId = lens _ciDistributionId (\ s a -> s{_ciDistributionId = a})
127
ciDistributionId = lens _ciDistributionId (\ s a -> s{_ciDistributionId = a})
77
true
true
0
9
20
40
22
18
null
null
rueshyna/gogol
gogol-appengine/gen/Network/Google/Resource/AppEngine/Apps/Patch.hs
mpl-2.0
-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). apUploadType :: Lens' AppsPatch (Maybe Text) apUploadType = lens _apUploadType (\ s a -> s{_apUploadType = a})
183
apUploadType :: Lens' AppsPatch (Maybe Text) apUploadType = lens _apUploadType (\ s a -> s{_apUploadType = a})
112
apUploadType = lens _apUploadType (\ s a -> s{_apUploadType = a})
67
true
true
0
9
28
48
25
23
null
null
tomjaguarpaw/postgresql-simple
test/Main.hs
bsd-3-clause
testArray :: TestEnv -> Assertion testArray TestEnv{..} = do xs <- query_ conn "SELECT '{1,2,3,4}'::_int4" xs @?= [Only (V.fromList [1,2,3,4 :: Int])] xs <- query_ conn "SELECT '{{1,2},{3,4}}'::_int4" xs @?= [Only (V.fromList [V.fromList [1,2], V.fromList [3,4 :: Int]])] ...
478
testArray :: TestEnv -> Assertion testArray TestEnv{..} = do xs <- query_ conn "SELECT '{1,2,3,4}'::_int4" xs @?= [Only (V.fromList [1,2,3,4 :: Int])] xs <- query_ conn "SELECT '{{1,2},{3,4}}'::_int4" xs @?= [Only (V.fromList [V.fromList [1,2], V.fromList [3,4 :: Int]])] ...
478
testArray TestEnv{..} = do xs <- query_ conn "SELECT '{1,2,3,4}'::_int4" xs @?= [Only (V.fromList [1,2,3,4 :: Int])] xs <- query_ conn "SELECT '{{1,2},{3,4}}'::_int4" xs @?= [Only (V.fromList [V.fromList [1,2], V.fromList [3,4 :: Int]])] queryFailure conn "SELECT '{1,2,...
444
false
true
0
15
107
183
91
92
null
null
xmonad/xmonad-contrib
XMonad/Layout/Maximize.hs
bsd-3-clause
maximize :: LayoutClass l Window => l Window -> ModifiedLayout Maximize l Window maximize = ModifiedLayout $ Maximize 25 Nothing
128
maximize :: LayoutClass l Window => l Window -> ModifiedLayout Maximize l Window maximize = ModifiedLayout $ Maximize 25 Nothing
128
maximize = ModifiedLayout $ Maximize 25 Nothing
47
false
true
0
7
19
43
20
23
null
null
marcellussiegburg/autotool
collection/src/Up/Type.hs
gpl-2.0
prop_read_write ( _ :: t) = it "read-write" $ property $ \ e -> read_write (e::t)
83
prop_read_write ( _ :: t) = it "read-write" $ property $ \ e -> read_write (e::t)
83
prop_read_write ( _ :: t) = it "read-write" $ property $ \ e -> read_write (e::t)
83
false
false
4
7
17
44
21
23
null
null
eyeinsky/ho
Main.hs
bsd-3-clause
mkIntervals n li = let min = toRational $ minimum li max = toRational $ maximum li step = (max - min) / fromIntegral n points = takeWhile (<= max) $ iterate (+step) min intervals = points `zip` tail points in takeWhile ((<= max) . snd) intervals
267
mkIntervals n li = let min = toRational $ minimum li max = toRational $ maximum li step = (max - min) / fromIntegral n points = takeWhile (<= max) $ iterate (+step) min intervals = points `zip` tail points in takeWhile ((<= max) . snd) intervals
267
mkIntervals n li = let min = toRational $ minimum li max = toRational $ maximum li step = (max - min) / fromIntegral n points = takeWhile (<= max) $ iterate (+step) min intervals = points `zip` tail points in takeWhile ((<= max) . snd) intervals
267
false
false
0
11
68
115
60
55
null
null
tolysz/prepare-ghcjs
spec-lts8/cabal/Cabal/Distribution/Simple/Program/HcPkg.hs
bsd-3-clause
writeRegistrationFileDirectly _ _ _ = -- We don't know here what the dir for the global or user dbs are, -- if that's needed it'll require a bit more plumbing to support. die $ "HcPkg.writeRegistrationFileDirectly: only supports SpecificPackageDB for now"
267
writeRegistrationFileDirectly _ _ _ = -- We don't know here what the dir for the global or user dbs are, -- if that's needed it'll require a bit more plumbing to support. die $ "HcPkg.writeRegistrationFileDirectly: only supports SpecificPackageDB for now"
267
writeRegistrationFileDirectly _ _ _ = -- We don't know here what the dir for the global or user dbs are, -- if that's needed it'll require a bit more plumbing to support. die $ "HcPkg.writeRegistrationFileDirectly: only supports SpecificPackageDB for now"
267
false
false
0
5
51
19
10
9
null
null
moonKimura/conduit-1.0.8
Data/Conduit.hs
mit
-- | Send a value downstream to the next component to consume. If the -- downstream component terminates, this call will never return control. If you -- would like to register a cleanup function, please use 'yieldOr' instead. -- -- Since 0.5.0 yield :: Monad m => o -- ^ output value -> ConduitM i o m () yie...
344
yield :: Monad m => o -- ^ output value -> ConduitM i o m () yield = ConduitM . CI.yield
100
yield = ConduitM . CI.yield
27
true
true
0
8
74
45
25
20
null
null
carlohamalainen/imagetrove-uploader
src/Network/MyTardis/API.hs
bsd-2-clause
getExperimentParameterSet :: URI -> ReaderT MyTardisConfig IO (Result RestExperimentParameterSet) getExperimentParameterSet = getResource
137
getExperimentParameterSet :: URI -> ReaderT MyTardisConfig IO (Result RestExperimentParameterSet) getExperimentParameterSet = getResource
137
getExperimentParameterSet = getResource
39
false
true
0
9
11
34
15
19
null
null
prasmussen/glot-www
Glot/Language.hs
mit
readLanguages :: IO [Language] readLanguages = do langConfigs <- Dhall.input Dhall.auto "./config/languages.dhall" eitherLanguages <- mapM fromConfigIO langConfigs let (errors, languages) = Either.partitionEithers eitherLanguages mapM_ (\err -> TextIO.putStrLn $ "WARNING: " <> err) (map formatConfigErro...
348
readLanguages :: IO [Language] readLanguages = do langConfigs <- Dhall.input Dhall.auto "./config/languages.dhall" eitherLanguages <- mapM fromConfigIO langConfigs let (errors, languages) = Either.partitionEithers eitherLanguages mapM_ (\err -> TextIO.putStrLn $ "WARNING: " <> err) (map formatConfigErro...
348
readLanguages = do langConfigs <- Dhall.input Dhall.auto "./config/languages.dhall" eitherLanguages <- mapM fromConfigIO langConfigs let (errors, languages) = Either.partitionEithers eitherLanguages mapM_ (\err -> TextIO.putStrLn $ "WARNING: " <> err) (map formatConfigError errors) pure languages
317
false
true
0
13
56
112
51
61
null
null
hausdorff/pyli
src/Parser.hs
mit
-- corresponds to `star_expr` in grammar -- matches optional star before the expression, eg `myfunc(*cows)` starExpr :: Parser String starExpr = maybeHasStar <~> expr ==> emitStarExpr where star = ter "*" noStar = eps "" maybeHasStar = noStar <|> star -- corresponds to `expr` in grammar
320
starExpr :: Parser String starExpr = maybeHasStar <~> expr ==> emitStarExpr where star = ter "*" noStar = eps "" maybeHasStar = noStar <|> star -- corresponds to `expr` in grammar
212
starExpr = maybeHasStar <~> expr ==> emitStarExpr where star = ter "*" noStar = eps "" maybeHasStar = noStar <|> star -- corresponds to `expr` in grammar
186
true
true
2
6
78
63
29
34
null
null
pshendry/dsgen
src/Dsgen/GUIState.hs
gpl-3.0
cardListAppend :: ListStore CardListRow -> Card -> IO () cardListAppend lst c = do listStoreAppend lst $ CardListRow { col1 = cardName c, col2 = displayAmount (cardCost c), col3 = show (cardSource c) } return ()
251
cardListAppend :: ListStore CardListRow -> Card -> IO () cardListAppend lst c = do listStoreAppend lst $ CardListRow { col1 = cardName c, col2 = displayAmount (cardCost c), col3 = show (cardSource c) } return ()
251
cardListAppend lst c = do listStoreAppend lst $ CardListRow { col1 = cardName c, col2 = displayAmount (cardCost c), col3 = show (cardSource c) } return ()
194
false
true
0
12
75
91
44
47
null
null
tjakway/ghcjvm
compiler/prelude/PrelNames.hs
bsd-3-clause
typeConKey = mkPreludeTyConUnique 72
65
typeConKey = mkPreludeTyConUnique 72
65
typeConKey = mkPreludeTyConUnique 72
65
false
false
0
5
32
9
4
5
null
null
wfleming/advent-of-code-2016
2017/KnotHash/src/Data/Digest/Knot.hs
bsd-3-clause
runRound s = runRound $ step s
30
runRound s = runRound $ step s
30
runRound s = runRound $ step s
30
false
false
0
6
6
16
7
9
null
null
chadbrewbaker/shellcheck
ShellCheck/Parser.hs
gpl-3.0
prop_readCondition5b= isOk readCondition "[[ $c =~ f( ($var ]]) )* ]]"
70
prop_readCondition5b= isOk readCondition "[[ $c =~ f( ($var ]]) )* ]]"
70
prop_readCondition5b= isOk readCondition "[[ $c =~ f( ($var ]]) )* ]]"
70
false
false
1
5
10
15
5
10
null
null
forked-upstream-packages-for-ghcjs/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
eqReprPrimTyConKey = mkPreludeTyConUnique 54
65
eqReprPrimTyConKey = mkPreludeTyConUnique 54
65
eqReprPrimTyConKey = mkPreludeTyConUnique 54
65
false
false
0
5
24
9
4
5
null
null
tdietert/nanocoin
src/Nanocoin/Network/Node.hs
apache-2.0
runNodeT :: NodeEnv -> NodeT m a -> m a runNodeT nodeEnv = flip runReaderT nodeEnv . unNodeT
92
runNodeT :: NodeEnv -> NodeT m a -> m a runNodeT nodeEnv = flip runReaderT nodeEnv . unNodeT
92
runNodeT nodeEnv = flip runReaderT nodeEnv . unNodeT
52
false
true
0
7
17
39
18
21
null
null