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
nevrenato/HetsAlloy
CommonLogic/Parse_CLIF.hs
gpl-2.0
boundlist :: CharParser st [Either (NAME_OR_SEQMARK, TERM) NAME_OR_SEQMARK] boundlist = many (do nos <- intNameOrSeqMark return $ Right nos <|> parens (do nos <- intNameOrSeqMark t <- term return $ Left (nos, t) ) )
243
boundlist :: CharParser st [Either (NAME_OR_SEQMARK, TERM) NAME_OR_SEQMARK] boundlist = many (do nos <- intNameOrSeqMark return $ Right nos <|> parens (do nos <- intNameOrSeqMark t <- term return $ Left (nos, t) ) )
243
boundlist = many (do nos <- intNameOrSeqMark return $ Right nos <|> parens (do nos <- intNameOrSeqMark t <- term return $ Left (nos, t) ) )
167
false
true
0
14
62
93
45
48
null
null
Gabriel439/suns-search
src/Indices.hs
gpl-3.0
secondaryIndex :: Size -> FilePath -> MotifGraphs -> IO SecondaryIndex secondaryIndex size pdbDir parsers = do v <- runVector $ runEffect $ hoist lift ( filesToPageServer size pdbDir >-> progress >-> (for cat (yield . f . second (tokenize parsers))) ...
449
secondaryIndex :: Size -> FilePath -> MotifGraphs -> IO SecondaryIndex secondaryIndex size pdbDir parsers = do v <- runVector $ runEffect $ hoist lift ( filesToPageServer size pdbDir >-> progress >-> (for cat (yield . f . second (tokenize parsers))) ...
449
secondaryIndex size pdbDir parsers = do v <- runVector $ runEffect $ hoist lift ( filesToPageServer size pdbDir >-> progress >-> (for cat (yield . f . second (tokenize parsers))) ) >-> foldVector putStrLn "" return (S...
374
false
true
0
19
169
157
76
81
null
null
mettekou/ghc
compiler/nativeGen/PPC/Ppr.hs
bsd-3-clause
pprInstr (DIVW reg1 reg2 reg3) = pprLogic (sLit "divw") reg1 reg2 (RIReg reg3)
78
pprInstr (DIVW reg1 reg2 reg3) = pprLogic (sLit "divw") reg1 reg2 (RIReg reg3)
78
pprInstr (DIVW reg1 reg2 reg3) = pprLogic (sLit "divw") reg1 reg2 (RIReg reg3)
78
false
false
0
7
12
41
19
22
null
null
gridaphobe/ghc
compiler/typecheck/TcRnTypes.hs
bsd-3-clause
pprSkolInfo (ClsSkol cls) = text "the class declaration for" <+> quotes (ppr cls)
85
pprSkolInfo (ClsSkol cls) = text "the class declaration for" <+> quotes (ppr cls)
85
pprSkolInfo (ClsSkol cls) = text "the class declaration for" <+> quotes (ppr cls)
85
false
false
0
8
16
32
14
18
null
null
amosr/limp
src/Numeric/Limp/Solve/Simplex/Maps.hs
mit
single_simplex :: (Ord z, Ord r, Rep c) => Standard z r c -> Maybe (Standard z r c) single_simplex s = case simplex1 s of Done -> Just s Progress s' -> single_simplex s' Stuck -> Nothing -- | Two phase: -- first, find a satisfying solution. -- then, solve simplex as normal.
317
single_simplex :: (Ord z, Ord r, Rep c) => Standard z r c -> Maybe (Standard z r c) single_simplex s = case simplex1 s of Done -> Just s Progress s' -> single_simplex s' Stuck -> Nothing -- | Two phase: -- first, find a satisfying solution. -- then, solve simplex as normal.
317
single_simplex s = case simplex1 s of Done -> Just s Progress s' -> single_simplex s' Stuck -> Nothing -- | Two phase: -- first, find a satisfying solution. -- then, solve simplex as normal.
225
false
true
4
9
96
94
47
47
null
null
GaloisInc/HaNS
src/Hans/Nat/State.hs
bsd-3-clause
expireEntries :: UTCTime -> NatTable -> IO () expireEntries now NatTable { .. } = atomicModifyIORef' natTable go where now' = addUTCTime (negate fourMinutes) now -- remove entries that are older than four minutes go q = case Q.minView q of Just (k,p,a,q') | p < now' -> go (Q.delete (fmap r...
461
expireEntries :: UTCTime -> NatTable -> IO () expireEntries now NatTable { .. } = atomicModifyIORef' natTable go where now' = addUTCTime (negate fourMinutes) now -- remove entries that are older than four minutes go q = case Q.minView q of Just (k,p,a,q') | p < now' -> go (Q.delete (fmap r...
461
expireEntries now NatTable { .. } = atomicModifyIORef' natTable go where now' = addUTCTime (negate fourMinutes) now -- remove entries that are older than four minutes go q = case Q.minView q of Just (k,p,a,q') | p < now' -> go (Q.delete (fmap riSource (otherSide k a)) q') | otherwi...
415
false
true
0
17
121
170
86
84
null
null
qpliu/esolang
blo/hs/Parse.hs
gpl-3.0
stmtSourcePos (StmtReturn pos _) = pos
38
stmtSourcePos (StmtReturn pos _) = pos
38
stmtSourcePos (StmtReturn pos _) = pos
38
false
false
0
6
5
18
8
10
null
null
johan1a/haskell-go
src/Eval.hs
gpl-2.0
pRetOrFail funcName Nothing = error "Could not find function" funcName
70
pRetOrFail funcName Nothing = error "Could not find function" funcName
70
pRetOrFail funcName Nothing = error "Could not find function" funcName
70
false
false
0
5
9
17
7
10
null
null
urbanslug/ghc
compiler/types/Kind.hs
bsd-3-clause
isUnliftedTypeKindCon tc = tyConUnique tc == unliftedTypeKindTyConKey
69
isUnliftedTypeKindCon tc = tyConUnique tc == unliftedTypeKindTyConKey
69
isUnliftedTypeKindCon tc = tyConUnique tc == unliftedTypeKindTyConKey
69
false
false
0
6
6
16
7
9
null
null
wxwxwwxxx/ghc
testsuite/tests/perf/should_run/T3736.hs
bsd-3-clause
dl :: Phase dl = (0.01008, 0.01003, 0.00990)
44
dl :: Phase dl = (0.01008, 0.01003, 0.00990)
44
dl = (0.01008, 0.01003, 0.00990)
32
false
true
0
6
7
27
13
14
null
null
pegartillo95/CaseGenerator
src/UUTReaderUtilities.hs
bsd-3-clause
--------------generators for auxiliar prueba functions------------------------- prec_f_aux $(tupleP uutNargs) = $(appsE ((varE 'uutPrec):(map varE (listVar uutNargs))))
168
prec_f_aux $(tupleP uutNargs) = $(appsE ((varE 'uutPrec):(map varE (listVar uutNargs))))
88
prec_f_aux $(tupleP uutNargs) = $(appsE ((varE 'uutPrec):(map varE (listVar uutNargs))))
88
true
false
0
13
14
53
26
27
null
null
tjhunter/karps
haskell/src/Spark/Core/InternalStd/Aggregation.hs
apache-2.0
maxABuilder :: AggSQLBuilder maxABuilder = AggSQLBuilder "max" $ \dt -> do -- This could be dropped eventually, all types are comparable. checkNumber dt return (dt, Nothing)
179
maxABuilder :: AggSQLBuilder maxABuilder = AggSQLBuilder "max" $ \dt -> do -- This could be dropped eventually, all types are comparable. checkNumber dt return (dt, Nothing)
179
maxABuilder = AggSQLBuilder "max" $ \dt -> do -- This could be dropped eventually, all types are comparable. checkNumber dt return (dt, Nothing)
150
false
true
0
10
31
42
21
21
null
null
sgillespie/ghc
compiler/types/InstEnv.hs
bsd-3-clause
lookupInstEnv :: Bool -- Check Safe Haskell overlap restrictions -> InstEnvs -- External and home package inst-env -> Class -> [Type] -- What we are looking for -> ClsInstLookupResult -- ^ See Note [Rules for instance lookup] -- ^ See Note [Safe Haskell ...
3,352
lookupInstEnv :: Bool -- Check Safe Haskell overlap restrictions -> InstEnvs -- External and home package inst-env -> Class -> [Type] -- What we are looking for -> ClsInstLookupResult lookupInstEnv check_overlap_safe (InstEnvs { ie_global =...
3,165
lookupInstEnv check_overlap_safe (InstEnvs { ie_global = pkg_ie , ie_local = home_ie , ie_visible = vis_mods }) cls tys = -- pprTrace "lookupInstEnv" (ppr cls <+> ppr tys $$ ppr home_ie) $ (final_matches, final_unifs, unsafe...
2,915
true
true
9
16
1,110
482
273
209
null
null
JacquesCarette/literate-scientific-software
code/drasil-printers/Language/Drasil/Printing/Import.hs
bsd-2-clause
spec sm (Ch PluralTerm s) = spec sm $ lookupP (sm ^. ckdb) s
62
spec sm (Ch PluralTerm s) = spec sm $ lookupP (sm ^. ckdb) s
62
spec sm (Ch PluralTerm s) = spec sm $ lookupP (sm ^. ckdb) s
62
false
false
0
8
15
40
18
22
null
null
csabahruska/q3demo
src/Q3Demo/Loader/BSP.hs
bsd-3-clause
getLeaves = getItems 48 $ Leaf <$> getInt <*> getInt <*> getVec3i <*> getVec3i <*> getInt <*> getInt <*> getInt <*> getInt
135
getLeaves = getItems 48 $ Leaf <$> getInt <*> getInt <*> getVec3i <*> getVec3i <*> getInt <*> getInt <*> getInt <*> getInt
135
getLeaves = getItems 48 $ Leaf <$> getInt <*> getInt <*> getVec3i <*> getVec3i <*> getInt <*> getInt <*> getInt <*> getInt
135
false
false
0
14
34
45
22
23
null
null
anchor/ceilometer-common
tests/SampleData.hs
bsd-3-clause
flavorPR0, flavorPR1, flavorPR2 :: Word64 flavorPR0 = 1 + (0 `shift` 8) + (0 `shift` 16) + (fromIntegral flavorSP0 `shift` 32)
127
flavorPR0, flavorPR1, flavorPR2 :: Word64 flavorPR0 = 1 + (0 `shift` 8) + (0 `shift` 16) + (fromIntegral flavorSP0 `shift` 32)
127
flavorPR0 = 1 + (0 `shift` 8) + (0 `shift` 16) + (fromIntegral flavorSP0 `shift` 32)
85
false
true
8
9
21
74
36
38
null
null
nandotorterolo/Tactics
src/Main.hs
bsd-3-clause
fila :: Char -> Fil fila x = if (x > '0') && ( x < '9') then [F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8]!!(ord x -49) else error "fila no válida "
148
fila :: Char -> Fil fila x = if (x > '0') && ( x < '9') then [F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8]!!(ord x -49) else error "fila no válida "
148
fila x = if (x > '0') && ( x < '9') then [F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8]!!(ord x -49) else error "fila no válida "
128
false
true
0
9
46
85
48
37
null
null
pxqr/language-cl-c
Data/Scope.hs
mit
-- | 'begin' is special marker which might sign /beginning/ of the scope. begin :: Scope r Begin begin = return Begin
117
begin :: Scope r Begin begin = return Begin
43
begin = return Begin
20
true
true
0
6
21
26
11
15
null
null
frt/happyscheduler
test/TestImport.hs
mit
withApp :: SpecWith (TestApp App) -> Spec withApp = before $ do settings <- loadYamlSettings ["config/test-settings.yml", "config/settings.yml"] [] useEnv foundation <- makeFoundation settings wipeDB foundation logWare <- liftIO $ makeLogWare foundation return (foundation, lo...
491
withApp :: SpecWith (TestApp App) -> Spec withApp = before $ do settings <- loadYamlSettings ["config/test-settings.yml", "config/settings.yml"] [] useEnv foundation <- makeFoundation settings wipeDB foundation logWare <- liftIO $ makeLogWare foundation return (foundation, lo...
491
withApp = before $ do settings <- loadYamlSettings ["config/test-settings.yml", "config/settings.yml"] [] useEnv foundation <- makeFoundation settings wipeDB foundation logWare <- liftIO $ makeLogWare foundation return (foundation, logWare) -- This function will truncate all...
449
false
true
2
10
108
103
47
56
null
null
cocreature/leksah
src/IDE/Pane/Errors.hs
gpl-2.0
errorsSelect :: IDERef -> ListStore ErrColumn -> TreePath -> TreeViewColumn -> IO () errorsSelect ideR store [index] _ = do ref <- listStoreGetValue store index reflectIDE (setCurrentError (Just (logRef ref))) ideR
286
errorsSelect :: IDERef -> ListStore ErrColumn -> TreePath -> TreeViewColumn -> IO () errorsSelect ideR store [index] _ = do ref <- listStoreGetValue store index reflectIDE (setCurrentError (Just (logRef ref))) ideR
286
errorsSelect ideR store [index] _ = do ref <- listStoreGetValue store index reflectIDE (setCurrentError (Just (logRef ref))) ideR
137
false
true
0
14
102
90
41
49
null
null
IreneKnapp/direct-crypto-socket
Network/Protocol/SSH/Internal.hs
mit
packBinaryString :: ByteString -> ByteString packBinaryString bytestring = BS.concat [packWord32 $ fromIntegral $ BS.length bytestring, bytestring]
162
packBinaryString :: ByteString -> ByteString packBinaryString bytestring = BS.concat [packWord32 $ fromIntegral $ BS.length bytestring, bytestring]
162
packBinaryString bytestring = BS.concat [packWord32 $ fromIntegral $ BS.length bytestring, bytestring]
117
false
true
0
9
30
42
21
21
null
null
greatest-ape/hs-bt-tracker
src/Web/BitTorrent/Tracker/Handlers/Scrape.hs
gpl-3.0
handleScrapeRequest :: ScrapeRequestInner -> AppM Response handleScrapeRequest innerRequest = do let transactionID = _transactionID (innerRequest :: ScrapeRequestInner) infoHashes = _infoHashes (innerRequest :: ScrapeRequestInner) peerLists <- getPeerLists infoHashes return $ ScrapeResponse ...
448
handleScrapeRequest :: ScrapeRequestInner -> AppM Response handleScrapeRequest innerRequest = do let transactionID = _transactionID (innerRequest :: ScrapeRequestInner) infoHashes = _infoHashes (innerRequest :: ScrapeRequestInner) peerLists <- getPeerLists infoHashes return $ ScrapeResponse ...
448
handleScrapeRequest innerRequest = do let transactionID = _transactionID (innerRequest :: ScrapeRequestInner) infoHashes = _infoHashes (innerRequest :: ScrapeRequestInner) peerLists <- getPeerLists infoHashes return $ ScrapeResponse $ ScrapeResponseInner { _transactionID = transa...
389
false
true
0
11
93
93
47
46
null
null
svalaskevicius/hob
test/Hob/Command/SaveCurrentTabSpec.hs
gpl-3.0
spec :: Spec spec = describe "save current tab command" $ do it "saves the currently active file" $ do (mockedWriter, mockReader) <- mockedFileWriter sc <- HSC.defaultStyleContext "app-data" fc <- HFC.defaultFileContext stubbedFileLoader mockedWriter emptyFileTree ctx <- launchFileInContex...
2,313
spec :: Spec spec = describe "save current tab command" $ do it "saves the currently active file" $ do (mockedWriter, mockReader) <- mockedFileWriter sc <- HSC.defaultStyleContext "app-data" fc <- HFC.defaultFileContext stubbedFileLoader mockedWriter emptyFileTree ctx <- launchFileInContex...
2,313
spec = describe "save current tab command" $ do it "saves the currently active file" $ do (mockedWriter, mockReader) <- mockedFileWriter sc <- HSC.defaultStyleContext "app-data" fc <- HFC.defaultFileContext stubbedFileLoader mockedWriter emptyFileTree ctx <- launchFileInContext fc sc "/xxx...
2,300
false
true
0
14
463
516
226
290
null
null
wavewave/lhc-analysis-collection
analysis/XQLD_sqsg_ATLAS0L2to6JMET_8TeV.hs
gpl-3.0
mainCount str = do -- let str = "2sq_nn_2l2j2x" r <- runEitherT (countEvent str) case r of Left err -> putStrLn err Right _ -> return ()
154
mainCount str = do -- let str = "2sq_nn_2l2j2x" r <- runEitherT (countEvent str) case r of Left err -> putStrLn err Right _ -> return ()
154
mainCount str = do -- let str = "2sq_nn_2l2j2x" r <- runEitherT (countEvent str) case r of Left err -> putStrLn err Right _ -> return ()
154
false
false
1
12
44
63
26
37
null
null
ruiting/opencog
opencog/nlp/lojban/HaskellLib/src/OpenCog/Lojban/Syntax.hs
agpl-3.0
selbriUI :: SyntaxReader (State (Tagged Selbri)) selbriUI = collapsState . first ((merge . first (second handleSOS) ||| id) . reorder) <$> withSeedState (selbriP <&> optState _SOS) where reorder = Iso (Just . f) (Just . g) where f ((((tv,p),t),Just ui),i) = Left ((tv,((ui,p),i)),t) ...
674
selbriUI :: SyntaxReader (State (Tagged Selbri)) selbriUI = collapsState . first ((merge . first (second handleSOS) ||| id) . reorder) <$> withSeedState (selbriP <&> optState _SOS) where reorder = Iso (Just . f) (Just . g) where f ((((tv,p),t),Just ui),i) = Left ((tv,((ui,p),i)),t) ...
674
selbriUI = collapsState . first ((merge . first (second handleSOS) ||| id) . reorder) <$> withSeedState (selbriP <&> optState _SOS) where reorder = Iso (Just . f) (Just . g) where f ((((tv,p),t),Just ui),i) = Left ((tv,((ui,p),i)),t) f ((p,Nothing),i) = Righ...
625
false
true
7
12
237
435
238
197
null
null
lihlcnkr/codejam
backup/src/CodeWars/BraceExpansion.hs
apache-2.0
foldExpand :: [String] -> [String] -> [String] foldExpand ys xs = do x <- xs y <- ys return (x ++ y)
106
foldExpand :: [String] -> [String] -> [String] foldExpand ys xs = do x <- xs y <- ys return (x ++ y)
106
foldExpand ys xs = do x <- xs y <- ys return (x ++ y)
59
false
true
0
9
27
60
30
30
null
null
spacekitteh/smcghc
compiler/main/DynFlags.hs
bsd-3-clause
-- All dynamic flags, minus package flags, present in GHC. flagsDynamic :: [Flag (CmdLineP DynFlags)] flagsDynamic = dynamic_flags
130
flagsDynamic :: [Flag (CmdLineP DynFlags)] flagsDynamic = dynamic_flags
71
flagsDynamic = dynamic_flags
28
true
true
0
8
17
24
13
11
null
null
nushio3/ghc
compiler/typecheck/TcType.hs
bsd-3-clause
isSigMaybe (ForSigCtxt n) = Just n
36
isSigMaybe (ForSigCtxt n) = Just n
36
isSigMaybe (ForSigCtxt n) = Just n
36
false
false
0
7
7
18
8
10
null
null
tokiwoousaka/egison4
hs-src/Language/Egison/Parser.hs
mit
keywordDefine = reserved "define"
37
keywordDefine = reserved "define"
37
keywordDefine = reserved "define"
37
false
false
0
5
7
9
4
5
null
null
siddhanathan/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
left_RDR, right_RDR :: RdrName left_RDR = nameRdrName leftDataConName
84
left_RDR, right_RDR :: RdrName left_RDR = nameRdrName leftDataConName
84
left_RDR = nameRdrName leftDataConName
53
false
true
0
5
22
16
9
7
null
null
literate-unitb/literate-unitb
src/Document/Pipeline.hs
mit
item :: String -> a -> OnFunctor InputMapBuilder a item n x = OnFunctor $ InputMapBuilder $ pure (n,pure x)
112
item :: String -> a -> OnFunctor InputMapBuilder a item n x = OnFunctor $ InputMapBuilder $ pure (n,pure x)
112
item n x = OnFunctor $ InputMapBuilder $ pure (n,pure x)
56
false
true
2
8
24
54
25
29
null
null
kadena-io/pact
src-ghc/Pact/Main.hs
bsd-3-clause
echoBuiltins :: IO () echoBuiltins = do defs <- view (eeRefStore.rsNatives) <$> (initPureEvalEnv Nothing) forM_ (sort $ HM.keys defs) print
143
echoBuiltins :: IO () echoBuiltins = do defs <- view (eeRefStore.rsNatives) <$> (initPureEvalEnv Nothing) forM_ (sort $ HM.keys defs) print
143
echoBuiltins = do defs <- view (eeRefStore.rsNatives) <$> (initPureEvalEnv Nothing) forM_ (sort $ HM.keys defs) print
121
false
true
0
12
23
67
30
37
null
null
flyingleafe/parser-gen
src/GrammarProcessing.hs
bsd-3-clause
removeUnreachable ∷ ParserGrammar → ParserGrammar removeUnreachable grammar = M.filterWithKey (\k _ → k ∈ reachable) grammar where reachable = reach [] "start" reach reached nt = foldl' markReached ([nt] ∪ reached) $ concatMap takeNonterminals $ getRules grammar nt markReached reached nt = if nt...
365
removeUnreachable ∷ ParserGrammar → ParserGrammar removeUnreachable grammar = M.filterWithKey (\k _ → k ∈ reachable) grammar where reachable = reach [] "start" reach reached nt = foldl' markReached ([nt] ∪ reached) $ concatMap takeNonterminals $ getRules grammar nt markReached reached nt = if nt...
365
removeUnreachable grammar = M.filterWithKey (\k _ → k ∈ reachable) grammar where reachable = reach [] "start" reach reached nt = foldl' markReached ([nt] ∪ reached) $ concatMap takeNonterminals $ getRules grammar nt markReached reached nt = if nt ∈ reached then reached else reach reached nt
315
false
true
2
10
75
121
61
60
null
null
wavewave/ghcjs-vdom
src/GHCJS/VDOM/QQ.hs
mit
-- example: [props|a:1, b: null, c: x, d: y |] -- every value is either a literal or a variable referring to a convertible Haskell name -- fixme, this does not have a proper parser props :: QuasiQuoter props = QuasiQuoter { quoteExp = quoteProps }
247
props :: QuasiQuoter props = QuasiQuoter { quoteExp = quoteProps }
66
props = QuasiQuoter { quoteExp = quoteProps }
45
true
true
0
6
45
22
14
8
null
null
HIPERFIT/futhark
src/Futhark/Internalise/Exps.hs
isc
internalisePat' :: [E.SizeBinder VName] -> E.Pat -> [I.SubExp] -> E.Exp -> (E.Exp -> InternaliseM a) -> InternaliseM a internalisePat' sizes p ses body m = do ses_ts <- mapM subExpType ses stmPat p ses_ts $ \pat_names -> do bindExtSizes (AppRes (E.patternType p) (map E.sizeName sizes)) ses forM_...
414
internalisePat' :: [E.SizeBinder VName] -> E.Pat -> [I.SubExp] -> E.Exp -> (E.Exp -> InternaliseM a) -> InternaliseM a internalisePat' sizes p ses body m = do ses_ts <- mapM subExpType ses stmPat p ses_ts $ \pat_names -> do bindExtSizes (AppRes (E.patternType p) (map E.sizeName sizes)) ses forM_...
414
internalisePat' sizes p ses body m = do ses_ts <- mapM subExpType ses stmPat p ses_ts $ \pat_names -> do bindExtSizes (AppRes (E.patternType p) (map E.sizeName sizes)) ses forM_ (zip pat_names ses) $ \(v, se) -> letBindNames [v] $ I.BasicOp $ I.SubExp se m body
283
false
true
0
16
96
193
93
100
null
null
imalsogreg/reffit
src/Reffit/Handlers/HandleNewDocClass.hs
gpl-3.0
newDocClassView :: View H.Html -> H.Html newDocClassView view = do errorList "docClass" view label "docClass" view "Document Class Name: " inputSelect "docClass" view ------------------------------------------------------------------------------ -- | Handles Document Class submission
299
newDocClassView :: View H.Html -> H.Html newDocClassView view = do errorList "docClass" view label "docClass" view "Document Class Name: " inputSelect "docClass" view ------------------------------------------------------------------------------ -- | Handles Document Class submission
299
newDocClassView view = do errorList "docClass" view label "docClass" view "Document Class Name: " inputSelect "docClass" view ------------------------------------------------------------------------------ -- | Handles Document Class submission
258
false
true
0
7
44
53
24
29
null
null
conal/lambda-ccc
src/LambdaCCC/Lambda.hs
bsd-3-clause
letvP# :: forall a b. Addr# -> EP a -> EP b -> EP b letvP# = letv#
66
letvP# :: forall a b. Addr# -> EP a -> EP b -> EP b letvP# = letv#
66
letvP# = letv#
14
false
true
0
10
17
44
20
24
null
null
pparkkin/eta
compiler/ETA/DeSugar/Coverage.hs
bsd-3-clause
shouldTickPatBind :: TickDensity -> Bool -> Bool shouldTickPatBind density top_lev = case density of TickForBreakPoints -> False TickAllFunctions -> True TickTopFunctions -> top_lev TickExportedFunctions -> False TickForCoverage -> False TickCallSites -> ...
435
shouldTickPatBind :: TickDensity -> Bool -> Bool shouldTickPatBind density top_lev = case density of TickForBreakPoints -> False TickAllFunctions -> True TickTopFunctions -> top_lev TickExportedFunctions -> False TickForCoverage -> False TickCallSites -> ...
435
shouldTickPatBind density top_lev = case density of TickForBreakPoints -> False TickAllFunctions -> True TickTopFunctions -> top_lev TickExportedFunctions -> False TickForCoverage -> False TickCallSites -> False -- ---------------------------------------...
386
false
true
0
8
104
72
35
37
null
null
Fuuzetsu/cabal2nix
src/Distribution/Nixpkgs/Haskell/FromCabal/Name.hs
bsd-3-clause
-- in stdenv libNixName "magic" = return "file"
76
libNixName "magic" = return "file"
63
libNixName "magic" = return "file"
63
true
false
0
5
36
13
6
7
null
null
scvalex/daemons
src/System/Posix/Daemon.hs
gpl-3.0
-- | Kill a process and wait for it to release its pidfile killAndWait :: FilePath -> IO () killAndWait pidFile = do signalProcessByFilePath sigQUIT pidFile fd <- openFd pidFile ReadWrite Nothing defaultFileFlags waitToSetLock fd (WriteLock, AbsoluteSeek, 0, 0) closeFd fd -- | Send 'sigKILL' to the pro...
389
killAndWait :: FilePath -> IO () killAndWait pidFile = do signalProcessByFilePath sigQUIT pidFile fd <- openFd pidFile ReadWrite Nothing defaultFileFlags waitToSetLock fd (WriteLock, AbsoluteSeek, 0, 0) closeFd fd -- | Send 'sigKILL' to the process recorded in the pidfile. This -- immediately kills th...
330
killAndWait pidFile = do signalProcessByFilePath sigQUIT pidFile fd <- openFd pidFile ReadWrite Nothing defaultFileFlags waitToSetLock fd (WriteLock, AbsoluteSeek, 0, 0) closeFd fd -- | Send 'sigKILL' to the process recorded in the pidfile. This -- immediately kills the process.
297
true
true
0
9
75
80
38
42
null
null
xu-hao/QueryArrow
QueryArrow-ffi-genquery/src/QueryArrow/FFI/GenQuery/Translate.hs
bsd-3-clause
addAccessControlTicket :: Formula -> Formula addAccessControlTicket form = form .*. "TICKET_USER_ID" @@ [VarExpr (toVariable "TICKET_ID"), VarExpr (toVariable "USER_ID")]
174
addAccessControlTicket :: Formula -> Formula addAccessControlTicket form = form .*. "TICKET_USER_ID" @@ [VarExpr (toVariable "TICKET_ID"), VarExpr (toVariable "USER_ID")]
174
addAccessControlTicket form = form .*. "TICKET_USER_ID" @@ [VarExpr (toVariable "TICKET_ID"), VarExpr (toVariable "USER_ID")]
129
false
true
0
9
21
50
25
25
null
null
tlaitinen/mailchimp
Web/Mailchimp/Lists.hs
bsd-3-clause
staticSegmentAdd :: ListId -- ^ List -> Text -- ^ New static segment name -> MailchimpT m SegmentId staticSegmentAdd listId name = fmap ssarId $ query "lists" "static-segment-add" [ "id" .= listId , ...
387
staticSegmentAdd :: ListId -- ^ List -> Text -- ^ New static segment name -> MailchimpT m SegmentId staticSegmentAdd listId name = fmap ssarId $ query "lists" "static-segment-add" [ "id" .= listId , ...
387
staticSegmentAdd listId name = fmap ssarId $ query "lists" "static-segment-add" [ "id" .= listId , "name" .= name ]
219
false
true
2
8
208
66
31
35
null
null
matonix/pfds
src/PFDS/Sec9/SparseByWeight.hs
bsd-3-clause
borrow w ws@(w' : ws') = if w == w' then ws' else w : borrow (2 * w) ws
74
borrow w ws@(w' : ws') = if w == w' then ws' else w : borrow (2 * w) ws
74
borrow w ws@(w' : ws') = if w == w' then ws' else w : borrow (2 * w) ws
74
false
false
0
9
22
49
26
23
null
null
banacorn/tredis
src/Database/Edis/Command/Key.hs
mit
exists :: ByteString -> Edis xs xs (Either Reply Bool) exists key = Edis $ Redis.exists key
91
exists :: ByteString -> Edis xs xs (Either Reply Bool) exists key = Edis $ Redis.exists key
91
exists key = Edis $ Redis.exists key
36
false
true
0
8
16
42
20
22
null
null
lynnard/cocos2d-hs
src/Graphics/UI/Cocos2d/Widget.hs
bsd-3-clause
layout_getLayoutType :: (LayoutValue arg'1) => arg'1 -> HoppyP.IO LayoutType layout_getLayoutType arg'1 = withLayoutPtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' -> HoppyP.fmap (HoppyP.toEnum . HoppyFHR.coerceIntegral) (layout_getLayoutType' arg'1')
263
layout_getLayoutType :: (LayoutValue arg'1) => arg'1 -> HoppyP.IO LayoutType layout_getLayoutType arg'1 = withLayoutPtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' -> HoppyP.fmap (HoppyP.toEnum . HoppyFHR.coerceIntegral) (layout_getLayoutType' arg'1')
263
layout_getLayoutType arg'1 = withLayoutPtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' -> HoppyP.fmap (HoppyP.toEnum . HoppyFHR.coerceIntegral) (layout_getLayoutType' arg'1')
186
false
true
0
10
31
80
39
41
null
null
josefs/autosar
oldARSim/ABS.hs
bsd-3-clause
a3 = deriv v3
13
a3 = deriv v3
13
a3 = deriv v3
13
false
false
1
5
3
13
4
9
null
null
sdiehl/ghc
libraries/base/Foreign/Concurrent.hs
bsd-3-clause
addForeignPtrFinalizer :: ForeignPtr a -> IO () -> IO () -- ^This function adds a finalizer to the given 'ForeignPtr'. The -- finalizer will run /before/ all other finalizers for the same -- object which have already been registered. -- -- This is a variant of 'Foreign.ForeignPtr.addForeignPtrFinalizer', -- where the ...
874
addForeignPtrFinalizer :: ForeignPtr a -> IO () -> IO () addForeignPtrFinalizer = GHC.ForeignPtr.addForeignPtrConcFinalizer
123
addForeignPtrFinalizer = GHC.ForeignPtr.addForeignPtrConcFinalizer
66
true
true
0
8
131
50
32
18
null
null
rudymatela/llcheck
src/Test/LeanCheck/Core.hs
bsd-3-clause
-- | Resets any delays in a list-of 'tiers'. -- Conceptually this function makes a constructor "weightless", -- assuring the first tier is non-empty. -- -- > reset [[], [], ..., xs, ys, zs, ...] = [xs, ys, zs, ...] -- -- > reset [[], xs, ys, zs, ...] = [xs, ys, zs, ...] -- -- > reset [[], [], ..., [x], [y], [z], .....
783
reset :: [[a]] -> [[a]] reset = dropWhile null
48
reset = dropWhile null
24
true
true
0
9
174
57
38
19
null
null
GaloisInc/stack
src/Stack/Docker.hs
bsd-3-clause
execWithRequiredContainer :: M env m => Maybe (Path Abs Dir) -> IO (FilePath,[String],Config -> Config) -> m () execWithRequiredContainer mprojectRoot getCmdArgs = do config <- asks getConfig unless (dockerEnable (configDocker config)) (throwM DockerMustBeEnabledException) (cmd_,ar...
454
execWithRequiredContainer :: M env m => Maybe (Path Abs Dir) -> IO (FilePath,[String],Config -> Config) -> m () execWithRequiredContainer mprojectRoot getCmdArgs = do config <- asks getConfig unless (dockerEnable (configDocker config)) (throwM DockerMustBeEnabledException) (cmd_,ar...
454
execWithRequiredContainer mprojectRoot getCmdArgs = do config <- asks getConfig unless (dockerEnable (configDocker config)) (throwM DockerMustBeEnabledException) (cmd_,args,modConfig) <- liftIO getCmdArgs runContainerAndExit modConfig mprojectRoot cmd_ args [] -- | Error if running in a cont...
326
false
true
0
12
94
145
69
76
null
null
snapframework/snap-core
src/Snap/Internal/Util/FileUploads.hs
bsd-3-clause
captureVariableOrReadFile :: Int64 -- ^ maximum size of form input -> PartFold a -- ^ file reading code -> PartInfo -> InputStream ByteString -> a -> IO (Capture a) captureVariableOrReadFile maxSize fileHandler partInfo stream acc = ...
1,166
captureVariableOrReadFile :: Int64 -- ^ maximum size of form input -> PartFold a -- ^ file reading code -> PartInfo -> InputStream ByteString -> a -> IO (Capture a) captureVariableOrReadFile maxSize fileHandler partInfo stream acc = ...
1,166
captureVariableOrReadFile maxSize fileHandler partInfo stream acc = if isFile then liftM File $ fileHandler partInfo stream acc else variable `catch` handler where isFile = isJust (partFileName partInfo) || partDisposition partInfo == DispositionFile variable = do !x <- ...
915
false
true
0
13
408
229
113
116
null
null
AM636E/Statistics
src/Stats.hs
bsd-3-clause
createHistogram = groupSelection
32
createHistogram = groupSelection
32
createHistogram = groupSelection
32
false
false
0
4
2
6
3
3
null
null
ezyang/ghc
compiler/main/HscTypes.hs
bsd-3-clause
-- | extendInteractiveContext is called with new TyThings recently defined to update the -- InteractiveContext to include them. Ids are easily removed when shadowed, -- but Classes and TyCons are not. Some work could be done to determine -- whether they are entirely shadowed, but as you could still have references --...
1,802
extendInteractiveContext :: InteractiveContext -> [TyThing] -> [ClsInst] -> [FamInst] -> Maybe [Type] -> FixityEnv -> InteractiveContext extendInteractiveContext ictxt new_tythings new_cls_insts ...
1,336
extendInteractiveContext ictxt new_tythings new_cls_insts new_fam_insts defaults fix_env = ictxt { ic_mod_index = ic_mod_index ictxt + 1 -- Always bump this; even instances should create -- a new mod_index (Trac #9426) , ic_tythings = new_tythings +...
1,074
true
true
1
11
572
197
114
83
null
null
dimara/ganeti
src/Ganeti/Constants.hs
bsd-2-clause
-- | The number of retries when trying to @fork@ a new job. -- Due to a bug in GHC, this can fail even though we synchronize all forks -- and restrain from other @IO@ operations in the thread. luxidRetryForkCount :: Int luxidRetryForkCount = 5
243
luxidRetryForkCount :: Int luxidRetryForkCount = 5
50
luxidRetryForkCount = 5
23
true
true
0
6
44
21
10
11
null
null
mgmeier/extra
src/Data/List/Extra.hs
bsd-3-clause
memberRB :: (a -> a -> Ordering) -> a -> RB a -> Bool memberRB cmp x E = False
78
memberRB :: (a -> a -> Ordering) -> a -> RB a -> Bool memberRB cmp x E = False
78
memberRB cmp x E = False
24
false
true
0
9
19
50
23
27
null
null
gbwey/persistent
persistent-sqlite/Database/Sqlite.hs
mit
step :: Statement -> IO StepResult step statement = do error <- stepError statement case error of ErrorRow -> return Row ErrorDone -> return Done _ -> sqlError Nothing "step" error -- | Execute a database statement. This function uses the 'Connection' passed to it to give better error messages than 'st...
343
step :: Statement -> IO StepResult step statement = do error <- stepError statement case error of ErrorRow -> return Row ErrorDone -> return Done _ -> sqlError Nothing "step" error -- | Execute a database statement. This function uses the 'Connection' passed to it to give better error messages than 'st...
343
step statement = do error <- stepError statement case error of ErrorRow -> return Row ErrorDone -> return Done _ -> sqlError Nothing "step" error -- | Execute a database statement. This function uses the 'Connection' passed to it to give better error messages than 'step'. -- -- @since 2.6.4
308
false
true
0
11
72
77
35
42
null
null
unisonweb/platform
unison-core/src/Unison/Hashable.hs
mit
accumulate' :: (Accumulate h, Hashable t) => t -> h accumulate' = accumulate . tokens
85
accumulate' :: (Accumulate h, Hashable t) => t -> h accumulate' = accumulate . tokens
85
accumulate' = accumulate . tokens
33
false
true
0
8
14
41
19
22
null
null
mpwillson/mal
haskell/step8_macros.hs
mpl-2.0
eval_ast ast@(MalVector lst m) env = do new_lst <- mapM (\x -> (eval x env)) lst return $ MalVector new_lst m
117
eval_ast ast@(MalVector lst m) env = do new_lst <- mapM (\x -> (eval x env)) lst return $ MalVector new_lst m
117
eval_ast ast@(MalVector lst m) env = do new_lst <- mapM (\x -> (eval x env)) lst return $ MalVector new_lst m
117
false
false
0
12
28
62
30
32
null
null
lihuanglx/disjoint-intersection
src/Target/TypeCheck.hs
bsd-3-clause
step (IntV _) = done
20
step (IntV _) = done
20
step (IntV _) = done
20
false
false
0
7
4
15
7
8
null
null
vikraman/ghc
compiler/prelude/THNames.hs
bsd-3-clause
defaultSigDName = libFun (fsLit "defaultSigD") defaultSigDIdKey
74
defaultSigDName = libFun (fsLit "defaultSigD") defaultSigDIdKey
74
defaultSigDName = libFun (fsLit "defaultSigD") defaultSigDIdKey
74
false
false
0
7
16
17
8
9
null
null
olsner/ghc
compiler/simplCore/OccurAnal.hs
bsd-3-clause
nodeScore :: Id -- Binder has old occ-info (just for loop-breaker-ness) -> Id -- Binder with new occ-info -> CoreExpr -- RHS -> VarSet -- Loop-breaker dependencies -> NodeScore nodeScore old_bndr new_bndr bind_rhs lb_deps | not (isId old_bndr) -- A type or...
3,594
nodeScore :: Id -- Binder has old occ-info (just for loop-breaker-ness) -> Id -- Binder with new occ-info -> CoreExpr -- RHS -> VarSet -- Loop-breaker dependencies -> NodeScore nodeScore old_bndr new_bndr bind_rhs lb_deps | not (isId old_bndr) -- A type or...
3,594
nodeScore old_bndr new_bndr bind_rhs lb_deps | not (isId old_bndr) -- A type or cercion variable is never a loop breaker = (100, 0, False) | old_bndr `elemVarSet` lb_deps -- Self-recursive things are great loop breakers = (0, 0, True) -- See Note [Self-recursion and loop breakers] | o...
3,359
false
true
11
16
1,219
531
287
244
null
null
nevrenato/Hets_Fork
CASL/Kif2CASL.hs
gpl-2.0
nonEmpty :: Annoted (BASIC_ITEMS () () ()) -> Bool nonEmpty bi = case item bi of Sig_items (Sort_items _ l _) -> not (null l) Sig_items (Op_items l _) -> not (null l) Sig_items (Pred_items l _) -> not (null l) Var_items l _ -> not (null l) Axiom_items l _ -> not (null l) _ -> True -- | main translation fun...
325
nonEmpty :: Annoted (BASIC_ITEMS () () ()) -> Bool nonEmpty bi = case item bi of Sig_items (Sort_items _ l _) -> not (null l) Sig_items (Op_items l _) -> not (null l) Sig_items (Pred_items l _) -> not (null l) Var_items l _ -> not (null l) Axiom_items l _ -> not (null l) _ -> True -- | main translation fun...
325
nonEmpty bi = case item bi of Sig_items (Sort_items _ l _) -> not (null l) Sig_items (Op_items l _) -> not (null l) Sig_items (Pred_items l _) -> not (null l) Var_items l _ -> not (null l) Axiom_items l _ -> not (null l) _ -> True -- | main translation function
274
false
true
0
10
75
171
80
91
null
null
alexander-at-github/eta
compiler/ETA/BasicTypes/DataCon.hs
bsd-3-clause
{- Note [Unpack equality predicates] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If we have a GADT with a contructor C :: (a~[b]) => b -> T a we definitely want that equality predicate *unboxed* so that it takes no space at all. This is easily done: just give it an UNPACK pragma. The rest of the unpack/repack code does the heav...
572
dataConName :: DataCon -> Name dataConName = dcName
51
dataConName = dcName
20
true
true
0
5
100
17
10
7
null
null
ghorn/rawesome
examples/carousel/plotter/Main.hs
lgpl-3.0
withContext = ZMQ.withContext
29
withContext = ZMQ.withContext
29
withContext = ZMQ.withContext
29
false
false
0
5
2
8
4
4
null
null
zerobuzz/servant
servant/src/Servant/API/ContentTypes.hs
bsd-3-clause
canHandleAcceptH :: AllMime list => Proxy list -> AcceptHeader -> Bool canHandleAcceptH p (AcceptHeader h ) = isJust $ M.matchAccept (allMime p) h
146
canHandleAcceptH :: AllMime list => Proxy list -> AcceptHeader -> Bool canHandleAcceptH p (AcceptHeader h ) = isJust $ M.matchAccept (allMime p) h
146
canHandleAcceptH p (AcceptHeader h ) = isJust $ M.matchAccept (allMime p) h
75
false
true
0
8
22
61
28
33
null
null
florianpilz/autotool
src/Baum/Draw.hs
gpl-2.0
------------------------------------------------------------------------- test = putStrLn $ compact $ f 5
106
test = putStrLn $ compact $ f 5
31
test = putStrLn $ compact $ f 5
31
true
false
1
6
9
21
9
12
null
null
alexander-at-github/eta
compiler/ETA/HsSyn/HsTypes.hs
bsd-3-clause
hsLTyVarLocName :: LHsTyVarBndr name -> Located name hsLTyVarLocName = fmap hsTyVarName
87
hsLTyVarLocName :: LHsTyVarBndr name -> Located name hsLTyVarLocName = fmap hsTyVarName
87
hsLTyVarLocName = fmap hsTyVarName
34
false
true
0
7
10
29
12
17
null
null
d0kt0r0/InnerEar
src/InnerEar/Database/Events.hs
gpl-3.0
recordFromRow _ _ _ _ _ _ = Nothing
35
recordFromRow _ _ _ _ _ _ = Nothing
35
recordFromRow _ _ _ _ _ _ = Nothing
35
false
false
1
5
8
17
8
9
null
null
mukeshtiwari/formalized-voting
paper-code/schulze-voting/app/Main.hs
mit
createCand :: IO () createCand = do let t = (P.replicate 4 "ABCD") P.++ (P.replicate 3 "BCAD") P.++ (P.replicate 2 "CABD") P.++ (P.replicate 1 "ACBD") v <- shuffleM t writeFile ("votes_customized.txt") (P.unlines v)
221
createCand :: IO () createCand = do let t = (P.replicate 4 "ABCD") P.++ (P.replicate 3 "BCAD") P.++ (P.replicate 2 "CABD") P.++ (P.replicate 1 "ACBD") v <- shuffleM t writeFile ("votes_customized.txt") (P.unlines v)
221
createCand = do let t = (P.replicate 4 "ABCD") P.++ (P.replicate 3 "BCAD") P.++ (P.replicate 2 "CABD") P.++ (P.replicate 1 "ACBD") v <- shuffleM t writeFile ("votes_customized.txt") (P.unlines v)
201
false
true
0
15
38
112
54
58
null
null
hsavit1/structures
benchmarks/inserts.hs
bsd-2-clause
buildT :: Int -> T.Map Int Int buildT n = F.foldl' (flip (join T.insert)) T.empty $ take n $ randoms (mkStdGen 1)
113
buildT :: Int -> T.Map Int Int buildT n = F.foldl' (flip (join T.insert)) T.empty $ take n $ randoms (mkStdGen 1)
113
buildT n = F.foldl' (flip (join T.insert)) T.empty $ take n $ randoms (mkStdGen 1)
82
false
true
0
12
21
72
33
39
null
null
TomMD/cryptol
src/Cryptol/ModuleSystem/Base.hs
bsd-3-clause
-- | Add the prelude to the import list if it's not already mentioned. addPrelude :: P.Module -> P.Module addPrelude m | preludeName == P.thing (P.mName m) = m | preludeName `elem` importedMods = m | otherwise = m { mImports = importPrelude : mImports m } where importedMods = map ...
609
addPrelude :: P.Module -> P.Module addPrelude m | preludeName == P.thing (P.mName m) = m | preludeName `elem` importedMods = m | otherwise = m { mImports = importPrelude : mImports m } where importedMods = map (P.iModule . P.thing) (P.mImports m) importPrelude = P.Located { ...
538
addPrelude m | preludeName == P.thing (P.mName m) = m | preludeName `elem` importedMods = m | otherwise = m { mImports = importPrelude : mImports m } where importedMods = map (P.iModule . P.thing) (P.mImports m) importPrelude = P.Located { P.srcRange = emptyRange , P.thi...
503
true
true
2
12
187
164
88
76
null
null
fpco/cabal
Cabal/Distribution/Simple/Build.hs
bsd-3-clause
replExe :: Verbosity -> PackageDescription -> LocalBuildInfo -> Executable -> ComponentLocalBuildInfo -> IO () replExe verbosity pkg_descr lbi exe clbi = case compilerFlavor (compiler lbi) of GHC -> GHC.replExe verbosity NoFlag pkg_descr lbi exe clbi _ -> die "A REPL is not su...
347
replExe :: Verbosity -> PackageDescription -> LocalBuildInfo -> Executable -> ComponentLocalBuildInfo -> IO () replExe verbosity pkg_descr lbi exe clbi = case compilerFlavor (compiler lbi) of GHC -> GHC.replExe verbosity NoFlag pkg_descr lbi exe clbi _ -> die "A REPL is not su...
347
replExe verbosity pkg_descr lbi exe clbi = case compilerFlavor (compiler lbi) of GHC -> GHC.replExe verbosity NoFlag pkg_descr lbi exe clbi _ -> die "A REPL is not supported for this compiler."
207
false
true
0
12
88
94
44
50
null
null
bgamari/haskell-platform
hptool/src/Main.hs
bsd-3-clause
whatIsIncluded :: Release -> [String] whatIsIncluded = map concat . map includeToString . relIncludes where includeToString (IncGHC, p) = "GHC: " : [show p] includeToString (IncGHCLib, p) = "GHCLib: " : [show p] includeToString (IncLib, p) = "LIB: " : [show p] includeToString (IncTool,...
663
whatIsIncluded :: Release -> [String] whatIsIncluded = map concat . map includeToString . relIncludes where includeToString (IncGHC, p) = "GHC: " : [show p] includeToString (IncGHCLib, p) = "GHCLib: " : [show p] includeToString (IncLib, p) = "LIB: " : [show p] includeToString (IncTool,...
663
whatIsIncluded = map concat . map includeToString . relIncludes where includeToString (IncGHC, p) = "GHC: " : [show p] includeToString (IncGHCLib, p) = "GHCLib: " : [show p] includeToString (IncLib, p) = "LIB: " : [show p] includeToString (IncTool, p) = "TOOL: " : [show p] in...
625
false
true
0
9
215
214
114
100
null
null
brendanhay/gogol
gogol-compute/gen/Network/Google/Resource/Compute/Images/SetIAMPolicy.hs
mpl-2.0
-- | Project ID for this request. isiampProject :: Lens' ImagesSetIAMPolicy Text isiampProject = lens _isiampProject (\ s a -> s{_isiampProject = a})
157
isiampProject :: Lens' ImagesSetIAMPolicy Text isiampProject = lens _isiampProject (\ s a -> s{_isiampProject = a})
123
isiampProject = lens _isiampProject (\ s a -> s{_isiampProject = a})
76
true
true
0
9
30
42
22
20
null
null
nickbart1980/pandoc
src/Text/Pandoc/Readers/LaTeX.hs
gpl-2.0
-- | Replace "include" commands with file contents. handleIncludes :: String -> IO String handleIncludes s = do res <- runParserT includeParser' [] "input" s case res of Right s' -> return s' Left e -> error $ show e
242
handleIncludes :: String -> IO String handleIncludes s = do res <- runParserT includeParser' [] "input" s case res of Right s' -> return s' Left e -> error $ show e
190
handleIncludes s = do res <- runParserT includeParser' [] "input" s case res of Right s' -> return s' Left e -> error $ show e
152
true
true
0
11
65
75
34
41
null
null
ivanperez-keera/Yampa
yampa/src/FRP/Yampa/InternalCore.hs
bsd-3-clause
arrEPrim :: (Event a -> b) -> SF (Event a) b arrEPrim f = SF {sfTF = \a -> (sfArrE f (f NoEvent), f a)}
103
arrEPrim :: (Event a -> b) -> SF (Event a) b arrEPrim f = SF {sfTF = \a -> (sfArrE f (f NoEvent), f a)}
103
arrEPrim f = SF {sfTF = \a -> (sfArrE f (f NoEvent), f a)}
58
false
true
0
11
24
72
37
35
null
null
plaprade/haskoin
haskoin-core/test/Network/Haskoin/Crypto/Mnemonic/Units.hs
unlicense
invalidMss :: [Mnemonic] invalidMss = [ "abandon abandon abandon abandon abandon abandon abandon abandon abandon\ \ abandon abandon abandon" , "legal winner thank year wave sausage worth useful legal winner thank\ \ thank" , "letter advice cage absurd amount doctor acoustic avoid letter advice\ ...
3,206
invalidMss :: [Mnemonic] invalidMss = [ "abandon abandon abandon abandon abandon abandon abandon abandon abandon\ \ abandon abandon abandon" , "legal winner thank year wave sausage worth useful legal winner thank\ \ thank" , "letter advice cage absurd amount doctor acoustic avoid letter advice\ ...
3,206
invalidMss = [ "abandon abandon abandon abandon abandon abandon abandon abandon abandon\ \ abandon abandon abandon" , "legal winner thank year wave sausage worth useful legal winner thank\ \ thank" , "letter advice cage absurd amount doctor acoustic avoid letter advice\ \ cage sausage" ...
3,181
false
true
0
5
764
86
56
30
null
null
shlevy/ghc
compiler/prelude/THNames.hs
bsd-3-clause
fieldExpTyConKey = mkPreludeTyConUnique 216
50
fieldExpTyConKey = mkPreludeTyConUnique 216
50
fieldExpTyConKey = mkPreludeTyConUnique 216
50
false
false
0
5
10
9
4
5
null
null
da-x/buildsome
src/Lib/FSHook.hs
gpl-2.0
getLdPreloadPath Nothing = do installedFilePath <- BS8.pack <$> (getDataFileName . BS8.unpack) fileName installedExists <- FilePath.exists installedFilePath if installedExists then return installedFilePath else do argv0 <- getArgv0 let nearExecPath = takeDirectory argv0 </> fileName asse...
426
getLdPreloadPath Nothing = do installedFilePath <- BS8.pack <$> (getDataFileName . BS8.unpack) fileName installedExists <- FilePath.exists installedFilePath if installedExists then return installedFilePath else do argv0 <- getArgv0 let nearExecPath = takeDirectory argv0 </> fileName asse...
426
getLdPreloadPath Nothing = do installedFilePath <- BS8.pack <$> (getDataFileName . BS8.unpack) fileName installedExists <- FilePath.exists installedFilePath if installedExists then return installedFilePath else do argv0 <- getArgv0 let nearExecPath = takeDirectory argv0 </> fileName asse...
426
false
false
0
14
84
103
46
57
null
null
mit-plv/riscv-semantics
src/Spec/CSRGetSet.hs
bsd-3-clause
getCSR MHPMCounter26 = undefined
32
getCSR MHPMCounter26 = undefined
32
getCSR MHPMCounter26 = undefined
32
false
false
0
5
3
9
4
5
null
null
rimmington/cabal
Cabal/Distribution/Simple/PreProcess.hs
bsd-3-clause
ppGhcCpp :: Program -> (Version -> Bool) -> [String] -> BuildInfo -> LocalBuildInfo -> PreProcessor ppGhcCpp program xHs extraArgs _bi lbi = PreProcessor { platformIndependent = False, runPreProcessor = mkSimplePreProcessor $ \inFile outFile verbosity -> do (prog, version, _) <- requireProgramV...
951
ppGhcCpp :: Program -> (Version -> Bool) -> [String] -> BuildInfo -> LocalBuildInfo -> PreProcessor ppGhcCpp program xHs extraArgs _bi lbi = PreProcessor { platformIndependent = False, runPreProcessor = mkSimplePreProcessor $ \inFile outFile verbosity -> do (prog, version, _) <- requireProgramV...
951
ppGhcCpp program xHs extraArgs _bi lbi = PreProcessor { platformIndependent = False, runPreProcessor = mkSimplePreProcessor $ \inFile outFile verbosity -> do (prog, version, _) <- requireProgramVersion verbosity program anyVersion (withPrograms lbi) rawSystemProgram v...
842
false
true
0
18
275
200
111
89
null
null
JacquesCarette/literate-scientific-software
code/drasil-example/Drasil/NoPCM/Body.hs
bsd-2-clause
printSetting :: PrintingInformation printSetting = PI symbMap Equational defaultConfiguration
93
printSetting :: PrintingInformation printSetting = PI symbMap Equational defaultConfiguration
93
printSetting = PI symbMap Equational defaultConfiguration
57
false
true
0
5
8
18
9
9
null
null
sol/hexpat
Text/XML/Expat/Tree.hs
bsd-3-clause
parseTree' enc = parse' (ParseOptions enc Nothing)
50
parseTree' enc = parse' (ParseOptions enc Nothing)
50
parseTree' enc = parse' (ParseOptions enc Nothing)
50
false
false
1
6
6
23
9
14
null
null
iu-parfunc/criterion
Criterion/Types.hs
bsd-2-clause
impure :: (a -> b) -> IO a -> Benchmarkable impure strategy a = Benchmarkable go where go n | n <= 0 = return () | otherwise = a >>= (evaluate . strategy) >> go (n-1)
192
impure :: (a -> b) -> IO a -> Benchmarkable impure strategy a = Benchmarkable go where go n | n <= 0 = return () | otherwise = a >>= (evaluate . strategy) >> go (n-1)
192
impure strategy a = Benchmarkable go where go n | n <= 0 = return () | otherwise = a >>= (evaluate . strategy) >> go (n-1)
148
false
true
0
9
62
107
49
58
null
null
funktionale-programmierung/haskell-for-beginners
src/Tail.hs
bsd-3-clause
printTail :: Int -> FilePath -> IO () printTail lines file = if file == "-" then doWork stdin else withFile file ReadMode doWork where doWork :: Handle -> IO () doWork h = do list <- collectLines lines h mapM_ printLine list printLine bs = do BS.hPut st...
392
printTail :: Int -> FilePath -> IO () printTail lines file = if file == "-" then doWork stdin else withFile file ReadMode doWork where doWork :: Handle -> IO () doWork h = do list <- collectLines lines h mapM_ printLine list printLine bs = do BS.hPut st...
392
printTail lines file = if file == "-" then doWork stdin else withFile file ReadMode doWork where doWork :: Handle -> IO () doWork h = do list <- collectLines lines h mapM_ printLine list printLine bs = do BS.hPut stdout bs BS.hPut stdout ne...
354
false
true
4
9
142
137
64
73
null
null
GregorySchwartz/fasta
src/Data/Fasta/String/Parse.hs
gpl-3.0
eoe :: Parsec String u () eoe = do lookAhead (void $ char '>') <|> eof
75
eoe :: Parsec String u () eoe = do lookAhead (void $ char '>') <|> eof
75
eoe = do lookAhead (void $ char '>') <|> eof
49
false
true
1
11
20
44
19
25
null
null
serokell/time-warp
test/Test/Control/TimeWarp/Timed/ExceptionSpec.hs
mit
exceptionShouldAbortExecution :: NonNegative Microsecond -> Property exceptionShouldAbortExecution (getNonNegative -> t) = (const (monadicIO $ pure ())) t
162
exceptionShouldAbortExecution :: NonNegative Microsecond -> Property exceptionShouldAbortExecution (getNonNegative -> t) = (const (monadicIO $ pure ())) t
162
exceptionShouldAbortExecution (getNonNegative -> t) = (const (monadicIO $ pure ())) t
85
false
true
0
11
24
54
25
29
null
null
maximilianhuber/softwareProjekt
src/GalFld/Sandbox/SerializeSandbox.hs
bsd-3-clause
testSerializeWrite = writeFile "/tmp/serialize" (encode testPoly)
65
testSerializeWrite = writeFile "/tmp/serialize" (encode testPoly)
65
testSerializeWrite = writeFile "/tmp/serialize" (encode testPoly)
65
false
false
1
7
5
20
8
12
null
null
tsahyt/lmrbot
src/Commands/Wolfram.hs
agpl-3.0
baseUrl :: BaseUrl baseUrl = BaseUrl Http "api.wolframalpha.com" 80 ""
70
baseUrl :: BaseUrl baseUrl = BaseUrl Http "api.wolframalpha.com" 80 ""
70
baseUrl = BaseUrl Http "api.wolframalpha.com" 80 ""
51
false
true
0
5
9
20
10
10
null
null
jtojnar/haste-compiler
libraries/ghc-7.10/ghc-prim/GHC/PrimopWrappers.hs
bsd-3-clause
minusFloat# :: Float# -> Float# -> Float# minusFloat# a1 a2 = (GHC.Prim.minusFloat#) a1 a2
90
minusFloat# :: Float# -> Float# -> Float# minusFloat# a1 a2 = (GHC.Prim.minusFloat#) a1 a2
90
minusFloat# a1 a2 = (GHC.Prim.minusFloat#) a1 a2
48
false
true
0
7
13
39
19
20
null
null
arnizamani/occam
occam.hs
mit
generateFuncs :: HsMatch -> Int -> [HsMatch] generateFuncs m len | len < 1 = []
79
generateFuncs :: HsMatch -> Int -> [HsMatch] generateFuncs m len | len < 1 = []
79
generateFuncs m len | len < 1 = []
34
false
true
0
8
15
39
19
20
null
null
OpenXT/idl
rpcgen/Backend/C.hs
gpl-2.0
gtypeFromDBusType D.DBusString = "char*"
44
gtypeFromDBusType D.DBusString = "char*"
44
gtypeFromDBusType D.DBusString = "char*"
44
false
false
0
6
7
11
5
6
null
null
sol/pandoc
src/Text/Pandoc/Writers/Docx.hs
gpl-2.0
mkLvl :: ListMarker -> Int -> Element mkLvl marker lvl = mknode "w:lvl" [("w:ilvl",show lvl)] $ [ mknode "w:start" [("w:val",start)] () | marker /= NoMarker && marker /= BulletMarker ] ++ [ mknode "w:numFmt" [("w:val",fmt)] () , mknode "w:lvlText" [("w:val",lvltxt)] () , mknode "w:lvlJc" [("w:va...
1,950
mkLvl :: ListMarker -> Int -> Element mkLvl marker lvl = mknode "w:lvl" [("w:ilvl",show lvl)] $ [ mknode "w:start" [("w:val",start)] () | marker /= NoMarker && marker /= BulletMarker ] ++ [ mknode "w:numFmt" [("w:val",fmt)] () , mknode "w:lvlText" [("w:val",lvltxt)] () , mknode "w:lvlJc" [("w:va...
1,950
mkLvl marker lvl = mknode "w:lvl" [("w:ilvl",show lvl)] $ [ mknode "w:start" [("w:val",start)] () | marker /= NoMarker && marker /= BulletMarker ] ++ [ mknode "w:numFmt" [("w:val",fmt)] () , mknode "w:lvlText" [("w:val",lvltxt)] () , mknode "w:lvlJc" [("w:val","left")] () , mknode "w:pPr" []...
1,912
false
true
0
16
705
594
314
280
null
null
beni55/haste-compiler
libraries/ghc-7.8/base/GHC/Event/IntMap.hs
bsd-3-clause
bin p m l r = Bin p m l r
27
bin p m l r = Bin p m l r
27
bin p m l r = Bin p m l r
27
false
false
0
5
12
26
11
15
null
null
feliposz/learning-stuff
haskell/c9lectures-ch12.hs
mit
sumWith' v (x:xs) = (sumWith' $! (v+x)) xs
42
sumWith' v (x:xs) = (sumWith' $! (v+x)) xs
42
sumWith' v (x:xs) = (sumWith' $! (v+x)) xs
42
false
false
0
9
7
35
18
17
null
null
laanwj/Purecoin
Purecoin/Core/Script.hs
mit
execScriptMonad :: MakeHash -> ScriptMonad () -> Maybe () execScriptMonad mkHash (ScriptMonad sm) = do (top:_) <- MS.execStateT (MR.runReaderT sm mkHash) [] guard (asBool top)
179
execScriptMonad :: MakeHash -> ScriptMonad () -> Maybe () execScriptMonad mkHash (ScriptMonad sm) = do (top:_) <- MS.execStateT (MR.runReaderT sm mkHash) [] guard (asBool top)
179
execScriptMonad mkHash (ScriptMonad sm) = do (top:_) <- MS.execStateT (MR.runReaderT sm mkHash) [] guard (asBool top)
121
false
true
0
11
28
85
40
45
null
null
jyp/ling
Ling/Skel.hs
bsd-3-clause
transName :: Name -> Result transName x = case x of Name string -> failure x
78
transName :: Name -> Result transName x = case x of Name string -> failure x
78
transName x = case x of Name string -> failure x
50
false
true
0
8
17
39
17
22
null
null
hiratara/hs-rtb-bidder
src/Web/RTBBidder/Protocol/Adx/BidRequest/AdSlot/IFramingDepth.hs
bsd-3-clause
toMaybe'Enum :: Prelude'.Int -> P'.Maybe IFramingDepth toMaybe'Enum 0 = Prelude'.Just UNKNOWN_IFRAME_DEPTH
106
toMaybe'Enum :: Prelude'.Int -> P'.Maybe IFramingDepth toMaybe'Enum 0 = Prelude'.Just UNKNOWN_IFRAME_DEPTH
106
toMaybe'Enum 0 = Prelude'.Just UNKNOWN_IFRAME_DEPTH
51
false
true
0
7
10
30
14
16
null
null
alexbiehl/hoop
hadoop-protos/src/Hadoop/Protos/YarnProtos/NodeStateProto.hs
mit
toMaybe'Enum 3 = Prelude'.Just NS_UNHEALTHY
43
toMaybe'Enum 3 = Prelude'.Just NS_UNHEALTHY
43
toMaybe'Enum 3 = Prelude'.Just NS_UNHEALTHY
43
false
false
0
6
4
14
6
8
null
null
mrakgr/futhark
src/Futhark/Optimise/Simplifier/Engine.hs
bsd-3-clause
asserted (Var name) = do se <- ST.lookupExp name <$> getVtable case se of Just (PrimOp (CmpOp CmpEq{} x y)) -> do case x of Var xvar -> tellNeed $ Need [] $ UT.equalToUsage xvar y _ -> return () case y of Va...
495
asserted (Var name) = do se <- ST.lookupExp name <$> getVtable case se of Just (PrimOp (CmpOp CmpEq{} x y)) -> do case x of Var xvar -> tellNeed $ Need [] $ UT.equalToUsage xvar y _ -> return () case y of Va...
495
asserted (Var name) = do se <- ST.lookupExp name <$> getVtable case se of Just (PrimOp (CmpOp CmpEq{} x y)) -> do case x of Var xvar -> tellNeed $ Need [] $ UT.equalToUsage xvar y _ -> return () case y of Va...
495
false
false
0
18
266
172
78
94
null
null
markus1189/xmonad-contrib-710
XMonad/Hooks/DebugEvents.hs
bsd-3-clause
dumpEnum :: [String] -> Decoder Bool dumpEnum ss = dumpEnum' ss cARDINAL
76
dumpEnum :: [String] -> Decoder Bool dumpEnum ss = dumpEnum' ss cARDINAL
76
dumpEnum ss = dumpEnum' ss cARDINAL
36
false
true
0
6
15
29
14
15
null
null