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
GaloisInc/halvm-ghc
compiler/hsSyn/HsPat.hs
bsd-3-clause
pprPat (ConPatOut { pat_con = con, pat_tvs = tvs, pat_dicts = dicts, pat_binds = binds, pat_args = details }) = sdocWithDynFlags $ \dflags -> -- Tiresome; in TcBinds.tcRhs we print out a -- typechecked Pat in an error message, -- and we want to make sure it prints nicely i...
562
pprPat (ConPatOut { pat_con = con, pat_tvs = tvs, pat_dicts = dicts, pat_binds = binds, pat_args = details }) = sdocWithDynFlags $ \dflags -> -- Tiresome; in TcBinds.tcRhs we print out a -- typechecked Pat in an error message, -- and we want to make sure it prints nicely i...
562
pprPat (ConPatOut { pat_con = con, pat_tvs = tvs, pat_dicts = dicts, pat_binds = binds, pat_args = details }) = sdocWithDynFlags $ \dflags -> -- Tiresome; in TcBinds.tcRhs we print out a -- typechecked Pat in an error message, -- and we want to make sure it prints nicely i...
562
false
false
0
18
180
132
71
61
null
null
mpickering/pandoc-lit
src/Text/Pandoc/Lit.hs
bsd-3-clause
readFileUTF8 :: FilePath -> IO String readFileUTF8 name = do handle <- openFile name ReadMode hSetEncoding handle utf8 hSetNewlineMode handle universalNewlineMode hGetContents handle
190
readFileUTF8 :: FilePath -> IO String readFileUTF8 name = do handle <- openFile name ReadMode hSetEncoding handle utf8 hSetNewlineMode handle universalNewlineMode hGetContents handle
190
readFileUTF8 name = do handle <- openFile name ReadMode hSetEncoding handle utf8 hSetNewlineMode handle universalNewlineMode hGetContents handle
152
false
true
0
8
30
55
23
32
null
null
christiaanb/ghc
testsuite/tests/typecheck/should_fail/T10351.hs
bsd-3-clause
f x = op [x]
12
f x = op [x]
12
f x = op [x]
12
false
false
1
6
4
18
7
11
null
null
BartAdv/Idris-dev
src/Idris/Primitives.hs
bsd-3-clause
toInt (ITFixed IT32) x = B32 (fromIntegral x)
49
toInt (ITFixed IT32) x = B32 (fromIntegral x)
49
toInt (ITFixed IT32) x = B32 (fromIntegral x)
49
false
false
1
7
11
31
12
19
null
null
snoyberg/ghc
compiler/hsSyn/HsExpr.hs
bsd-3-clause
pprGRHS :: (OutputableBndrId idR, Outputable body) => HsMatchContext idL -> GRHS idR body -> SDoc pprGRHS ctxt (GRHS [] body) = pp_rhs ctxt body
154
pprGRHS :: (OutputableBndrId idR, Outputable body) => HsMatchContext idL -> GRHS idR body -> SDoc pprGRHS ctxt (GRHS [] body) = pp_rhs ctxt body
154
pprGRHS ctxt (GRHS [] body) = pp_rhs ctxt body
48
false
true
0
8
33
67
31
36
null
null
vikraman/ghc
compiler/prelude/THNames.hs
bsd-3-clause
decTyConName = thTc (fsLit "Dec") decTyConKey
61
decTyConName = thTc (fsLit "Dec") decTyConKey
61
decTyConName = thTc (fsLit "Dec") decTyConKey
61
false
false
0
7
21
17
8
9
null
null
spinda/liquidhaskell
src/Language/Haskell/Liquid/Pipeline/Annotate.hs
bsd-3-clause
cinfoErr e = case pos e of RealSrcSpan l -> Just (srcSpanStartLoc l, srcSpanEndLoc l, showpp e) _ -> Nothing -- cinfoErr (Ci (RealSrcSpan l) e) = -- cinfoErr _ = Nothing -- mkAnnMapTyp :: (RefTypable a c tv r, RefTypable a c tv (), PPrint tv, PPrint a) =...
388
cinfoErr e = case pos e of RealSrcSpan l -> Just (srcSpanStartLoc l, srcSpanEndLoc l, showpp e) _ -> Nothing -- cinfoErr (Ci (RealSrcSpan l) e) = -- cinfoErr _ = Nothing -- mkAnnMapTyp :: (RefTypable a c tv r, RefTypable a c tv (), PPrint tv, PPrint a) =...
388
cinfoErr e = case pos e of RealSrcSpan l -> Just (srcSpanStartLoc l, srcSpanEndLoc l, showpp e) _ -> Nothing -- cinfoErr (Ci (RealSrcSpan l) e) = -- cinfoErr _ = Nothing -- mkAnnMapTyp :: (RefTypable a c tv r, RefTypable a c tv (), PPrint tv, PPrint a) =...
388
false
false
0
10
126
55
27
28
null
null
travitch/dalvik
src/Dalvik/SSA/Internal/BasicBlocks.hs
bsd-3-clause
-- | Get the block number for an instruction instructionBlockNumber :: BasicBlocks -> Int -> Maybe BlockNumber instructionBlockNumber bbs ix = case IM.containing (bbFromInstruction bbs) ix of [(_, bnum)] -> Just bnum _ -> Nothing -- | Get the basic block ID for the instruction at the given index.
308
instructionBlockNumber :: BasicBlocks -> Int -> Maybe BlockNumber instructionBlockNumber bbs ix = case IM.containing (bbFromInstruction bbs) ix of [(_, bnum)] -> Just bnum _ -> Nothing -- | Get the basic block ID for the instruction at the given index.
263
instructionBlockNumber bbs ix = case IM.containing (bbFromInstruction bbs) ix of [(_, bnum)] -> Just bnum _ -> Nothing -- | Get the basic block ID for the instruction at the given index.
197
true
true
2
8
59
63
35
28
null
null
facebookincubator/duckling
Duckling/Email/Corpus.hs
bsd-3-clause
negativeCorpus :: NegativeCorpus negativeCorpus = (testContext, testOptions, examples) where examples = [ "hey@6" , "hey@you" ]
151
negativeCorpus :: NegativeCorpus negativeCorpus = (testContext, testOptions, examples) where examples = [ "hey@6" , "hey@you" ]
151
negativeCorpus = (testContext, testOptions, examples) where examples = [ "hey@6" , "hey@you" ]
118
false
true
0
5
39
34
20
14
null
null
formrre/yi
yi-core/src/Yi/Buffer/Implementation.hs
gpl-2.0
focusAst :: M.Map WindowRef Region -> BufferImpl syntax -> BufferImpl syntax focusAst r b@FBufferData {hlCache = HLState s@(SynHL {hlFocus = foc}) cache} = b {hlCache = HLState s (foc r cache)}
194
focusAst :: M.Map WindowRef Region -> BufferImpl syntax -> BufferImpl syntax focusAst r b@FBufferData {hlCache = HLState s@(SynHL {hlFocus = foc}) cache} = b {hlCache = HLState s (foc r cache)}
194
focusAst r b@FBufferData {hlCache = HLState s@(SynHL {hlFocus = foc}) cache} = b {hlCache = HLState s (foc r cache)}
116
false
true
7
10
31
94
46
48
null
null
rueshyna/gogol
gogol-compute/gen/Network/Google/Resource/Compute/RegionOperations/Get.hs
mpl-2.0
-- | Name of the Operations resource to return. rogOperation :: Lens' RegionOperationsGet Text rogOperation = lens _rogOperation (\ s a -> s{_rogOperation = a})
162
rogOperation :: Lens' RegionOperationsGet Text rogOperation = lens _rogOperation (\ s a -> s{_rogOperation = a})
114
rogOperation = lens _rogOperation (\ s a -> s{_rogOperation = a})
67
true
true
0
9
26
42
22
20
null
null
adinapoli/memento
src/Memento/HipChat.hs
mit
-- | Simple HipChat notifier module for Memento. -------------------------------------------------------------------------------- apiToken_ :: Memento T.Text apiToken_ = requireEnv "memento.hipchat.apiToken"
208
apiToken_ :: Memento T.Text apiToken_ = requireEnv "memento.hipchat.apiToken"
77
apiToken_ = requireEnv "memento.hipchat.apiToken"
49
true
true
0
6
17
21
11
10
null
null
elieux/ghc
compiler/hsSyn/HsPat.hs
bsd-3-clause
hsPatNeedsParens (SigPatOut {}) = True
43
hsPatNeedsParens (SigPatOut {}) = True
43
hsPatNeedsParens (SigPatOut {}) = True
43
false
false
0
7
9
16
8
8
null
null
ierton/yteratee
src/Data/Yteratee/IO.hs
bsd-3-clause
enumFile :: (MonadCatchIO m, ReadableChunk s el) => Int -> FilePath -> YEnumerator s m a enumFile = FD.enumFile
128
enumFile :: (MonadCatchIO m, ReadableChunk s el) => Int -> FilePath -> YEnumerator s m a enumFile = FD.enumFile
128
enumFile = FD.enumFile
22
false
true
0
8
35
49
24
25
null
null
unclechu/haskell-qm-interpolated-string
src/Text/InterpolatedString/QM/Internal/Parsers.hs
unlicense
-- With interpolation blocks (line breaks are kept, indentation is ignored) qmb :: String -> TH.ExpQ qmb = makeExpr . parseQMB "" . clearFirstQXXLineBreak . clearIndentAtStart
187
qmb :: String -> TH.ExpQ qmb = makeExpr . parseQMB "" . clearFirstQXXLineBreak . clearIndentAtStart
111
qmb = makeExpr . parseQMB "" . clearFirstQXXLineBreak . clearIndentAtStart
86
true
true
3
8
37
43
18
25
null
null
ambiata/highlighting-kate
Text/Highlighting/Kate/Syntax/Vhdl.hs
gpl-2.0
parseRules ("VHDL","packagefunction") = (((pRegExpr regex_'28'5cb'29'5cb'28'3f'21'28'3f'3aprocess'7cconstant'7csignal'7cvariable'29'29'28'5bA'2dZa'2dz'5f'5d'5bA'2dZa'2dz0'2d9'5f'5d'2a'29'5cb'5cb >>= withAttribute KeywordTok) >>~ (popContext)) <|> (currentContext >>= \x -> guard (x == ("VHDL","packagefunction"))...
362
parseRules ("VHDL","packagefunction") = (((pRegExpr regex_'28'5cb'29'5cb'28'3f'21'28'3f'3aprocess'7cconstant'7csignal'7cvariable'29'29'28'5bA'2dZa'2dz'5f'5d'5bA'2dZa'2dz0'2d9'5f'5d'2a'29'5cb'5cb >>= withAttribute KeywordTok) >>~ (popContext)) <|> (currentContext >>= \x -> guard (x == ("VHDL","packagefunction"))...
362
parseRules ("VHDL","packagefunction") = (((pRegExpr regex_'28'5cb'29'5cb'28'3f'21'28'3f'3aprocess'7cconstant'7csignal'7cvariable'29'29'28'5bA'2dZa'2dz'5f'5d'5bA'2dZa'2dz0'2d9'5f'5d'2a'29'5cb'5cb >>= withAttribute KeywordTok) >>~ (popContext)) <|> (currentContext >>= \x -> guard (x == ("VHDL","packagefunction"))...
362
false
false
0
15
31
85
45
40
null
null
573/leksah
src/IDE/Command/VCS/SVN.hs
gpl-2.0
--HELPERS createSVNActionFromContext :: (Either GUISvn.Handler (Maybe Text) -> Wrapper.Ctx()) -> Types.VCSAction () createSVNActionFromContext action = do (mergeInfo, mbPw) <- Types.readIDE' vcsData ide <- Types.askIDERef case mbPw of ...
966
createSVNActionFromContext :: (Either GUISvn.Handler (Maybe Text) -> Wrapper.Ctx()) -> Types.VCSAction () createSVNActionFromContext action = do (mergeInfo, mbPw) <- Types.readIDE' vcsData ide <- Types.askIDERef case mbPw of Nothing -> ...
955
createSVNActionFromContext action = do (mergeInfo, mbPw) <- Types.readIDE' vcsData ide <- Types.askIDERef case mbPw of Nothing -> Helper.createActionFromContext $ action $ Left $ passwordHandler ide mergeInfo Just mb -> Helper.createActionFromContext $ action $ Right mb where --...
790
true
true
1
16
340
250
124
126
null
null
achirkin/fgeom
src/Geometry/Space/Approximate.hs
bsd-3-clause
-- | Get tolerance of the approximation getEps :: Approximately eps eps getEps = Approximately id
97
getEps :: Approximately eps eps getEps = Approximately id
57
getEps = Approximately id
25
true
true
0
5
15
20
10
10
null
null
pscollins/cmsc-22311-lab-2
Suck.hs
gpl-2.0
extractBody :: String -> String extractBody = filter isAscii . innerText . flattenTree . searchTree (treeHasAttribute ("id", "body")) . tagTree . parseTags
169
extractBody :: String -> String extractBody = filter isAscii . innerText . flattenTree . searchTree (treeHasAttribute ("id", "body")) . tagTree . parseTags
169
extractBody = filter isAscii . innerText . flattenTree . searchTree (treeHasAttribute ("id", "body")) . tagTree . parseTags
137
false
true
0
11
35
53
27
26
null
null
rueshyna/gogol
gogol-compute/gen/Network/Google/Resource/Compute/Routers/List.hs
mpl-2.0
-- | Specifies a page token to use. Set pageToken to the nextPageToken -- returned by a previous list request to get the next page of results. rlPageToken :: Lens' RoutersList (Maybe Text) rlPageToken = lens _rlPageToken (\ s a -> s{_rlPageToken = a})
253
rlPageToken :: Lens' RoutersList (Maybe Text) rlPageToken = lens _rlPageToken (\ s a -> s{_rlPageToken = a})
110
rlPageToken = lens _rlPageToken (\ s a -> s{_rlPageToken = a})
64
true
true
1
9
45
51
26
25
null
null
pradyuman/haskell
recursion.hs
mit
filter' p (x:xs) | p x = x : filter' p xs | otherwise = filter' p xs
78
filter' p (x:xs) | p x = x : filter' p xs | otherwise = filter' p xs
78
filter' p (x:xs) | p x = x : filter' p xs | otherwise = filter' p xs
78
false
false
1
8
27
48
22
26
null
null
UBMLtonGroup/timberc
src/Desugar2.hs
bsd-3-clause
dsDecls (d@(DKSig _ _) : ds) = liftM (d :) (dsDecls ds)
58
dsDecls (d@(DKSig _ _) : ds) = liftM (d :) (dsDecls ds)
58
dsDecls (d@(DKSig _ _) : ds) = liftM (d :) (dsDecls ds)
58
false
false
0
10
14
42
22
20
null
null
Proclivis/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxLANGUAGE_ASSAMESE :: Int wxLANGUAGE_ASSAMESE = 26
51
wxLANGUAGE_ASSAMESE :: Int wxLANGUAGE_ASSAMESE = 26
51
wxLANGUAGE_ASSAMESE = 26
24
false
true
0
4
5
11
6
5
null
null
ku-fpg/kansas-amber
System/Hardware/Haskino/Protocol.hs
bsd-3-clause
parseQueryResult (SerialReadList _) (SerialReadListReply ws) = Just ws
70
parseQueryResult (SerialReadList _) (SerialReadListReply ws) = Just ws
70
parseQueryResult (SerialReadList _) (SerialReadListReply ws) = Just ws
70
false
false
0
7
7
26
12
14
null
null
glguy/irc-core
src/Client/State/Window.hs
isc
unpackUTCTime :: PackedTime -> UTCTime unpackUTCTime = zonedTimeToUTC . unpackZonedTime
87
unpackUTCTime :: PackedTime -> UTCTime unpackUTCTime = zonedTimeToUTC . unpackZonedTime
87
unpackUTCTime = zonedTimeToUTC . unpackZonedTime
48
false
true
0
7
9
26
11
15
null
null
brendanhay/gogol
gogol-proximitybeacon/gen/Network/Google/Resource/ProximityBeacon/Beacons/Get.hs
mpl-2.0
-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). bgUploadProtocol :: Lens' BeaconsGet (Maybe Text) bgUploadProtocol = lens _bgUploadProtocol (\ s a -> s{_bgUploadProtocol = a})
197
bgUploadProtocol :: Lens' BeaconsGet (Maybe Text) bgUploadProtocol = lens _bgUploadProtocol (\ s a -> s{_bgUploadProtocol = a})
135
bgUploadProtocol = lens _bgUploadProtocol (\ s a -> s{_bgUploadProtocol = a})
85
true
true
1
9
33
52
25
27
null
null
kazu-yamamoto/concurrent-dns-cache
Network/DNS/Cache.hs
bsd-3-clause
---------------------------------------------------------------- -- | A basic function to create DNS cache. -- Domains should be resolved in the function of the second argument. withDNSCache :: (MonadBaseControl IO m, MonadIO m) => DNSCacheConf -> (DNSCache -> m a) -> m a withDNSCache conf func = do ...
859
withDNSCache :: (MonadBaseControl IO m, MonadIO m) => DNSCacheConf -> (DNSCache -> m a) -> m a withDNSCache conf func = do seeds <- mapM (liftIO . makeResolvSeed) (resolvConfs conf) let n = length seeds cacheref <- liftIO newCacheRef activeref <- liftIO S.newActiveRef lvar <- liftIO S.n...
678
withDNSCache conf func = do seeds <- mapM (liftIO . makeResolvSeed) (resolvConfs conf) let n = length seeds cacheref <- liftIO newCacheRef activeref <- liftIO S.newActiveRef lvar <- liftIO S.newConcVar let cache = DNSCache seeds n cacheref activeref lvar maxcon minttl maxttl negttl bracket (...
570
true
true
0
10
174
226
108
118
null
null
markus-git/co-feldspar
src/Feldspar/Hardware/Optimize.hs
bsd-3-clause
freeVar :: Name -> Opt () freeVar v = tell (Set.singleton v, mempty)
68
freeVar :: Name -> Opt () freeVar v = tell (Set.singleton v, mempty)
68
freeVar v = tell (Set.singleton v, mempty)
42
false
true
0
8
12
37
18
19
null
null
kkspeed/SICP-Practise
Interpreter/code/Eval.hs
lgpl-3.0
defineVar :: Env -> String -> LispVal -> IOThrowsError LispVal defineVar envRef var value = do alreadyDefined <- liftIO $ isBound envRef var if alreadyDefined then setVar envRef var value >> return value else liftIO $ do ...
558
defineVar :: Env -> String -> LispVal -> IOThrowsError LispVal defineVar envRef var value = do alreadyDefined <- liftIO $ isBound envRef var if alreadyDefined then setVar envRef var value >> return value else liftIO $ do ...
558
defineVar envRef var value = do alreadyDefined <- liftIO $ isBound envRef var if alreadyDefined then setVar envRef var value >> return value else liftIO $ do valueRef <- newIORef value ...
495
false
true
0
14
284
125
58
67
null
null
markwright/antlrc-examples
src/tapl/fulluntyped/Semantic.hs
bsd-3-clause
termSubstTop :: Term Info -> Term Info -> Term Info termSubstTop s t = termShift (-1) (termSubst 0 (termShift 1 s) t)
117
termSubstTop :: Term Info -> Term Info -> Term Info termSubstTop s t = termShift (-1) (termSubst 0 (termShift 1 s) t)
117
termSubstTop s t = termShift (-1) (termSubst 0 (termShift 1 s) t)
65
false
true
0
9
21
61
29
32
null
null
thoughtpolice/binary-serialise-cbor
bench/Real/Load.hs
bsd-3-clause
readPkgIndex :: BS.ByteString -> Either String [GenericPackageDescription] readPkgIndex = fmap extractCabalFiles . readTarIndex where extractCabalFiles entries = [ pkgDesc | Tar.Entry { Tar.entryContent = Tar.NormalFile cabalFile _ } <- entries , let ParseOk _ pkgDesc = parsePa...
1,043
readPkgIndex :: BS.ByteString -> Either String [GenericPackageDescription] readPkgIndex = fmap extractCabalFiles . readTarIndex where extractCabalFiles entries = [ pkgDesc | Tar.Entry { Tar.entryContent = Tar.NormalFile cabalFile _ } <- entries , let ParseOk _ pkgDesc = parsePa...
1,043
readPkgIndex = fmap extractCabalFiles . readTarIndex where extractCabalFiles entries = [ pkgDesc | Tar.Entry { Tar.entryContent = Tar.NormalFile cabalFile _ } <- entries , let ParseOk _ pkgDesc = parsePackageDescription . fromUTF8 . BS.unpack $ cabalFile ] readTarIndex :: ...
968
false
true
15
13
342
316
161
155
null
null
RossMeikleham/GB-Assembler
BinGen.hs
mit
genLd16 :: Ld16Stmt -> B.ByteString genLd16 (LdCombinedRegIm reg16 w16) = B.pack $ [ins] ++ (splitW16 w16) where ins = case reg16 of BC -> 0x01 DE -> 0x11 HL -> 0x21 SP -> 0x31
210
genLd16 :: Ld16Stmt -> B.ByteString genLd16 (LdCombinedRegIm reg16 w16) = B.pack $ [ins] ++ (splitW16 w16) where ins = case reg16 of BC -> 0x01 DE -> 0x11 HL -> 0x21 SP -> 0x31
210
genLd16 (LdCombinedRegIm reg16 w16) = B.pack $ [ins] ++ (splitW16 w16) where ins = case reg16 of BC -> 0x01 DE -> 0x11 HL -> 0x21 SP -> 0x31
174
false
true
0
7
67
83
42
41
null
null
vikraman/ghc
compiler/cmm/CLabel.hs
bsd-3-clause
labelType (PlainModuleInitLabel _) = CodeLabel
59
labelType (PlainModuleInitLabel _) = CodeLabel
59
labelType (PlainModuleInitLabel _) = CodeLabel
59
false
false
0
6
17
16
7
9
null
null
ndmitchell/nsis
src/Development/NSIS/Plugins/WinMessages.hs
bsd-3-clause
-- Window Messages -- wm_ACTIVATE = 0x0006
62
wm_ACTIVATE = 0x0006
40
wm_ACTIVATE = 0x0006
40
true
false
0
4
26
7
4
3
null
null
sethfowler/pygmalion
src/Pygmalion/Database/IO.hs
bsd-3-clause
getLastMTime :: DBHandle -> SourceFileHash -> IO (Maybe Time) getLastMTime h sfHash = do v <- execSingleRowQuery h getLastMTimeStmt (Only sfHash) case v of Just (Only t) -> return $ Just t Nothing -> return Nothing
232
getLastMTime :: DBHandle -> SourceFileHash -> IO (Maybe Time) getLastMTime h sfHash = do v <- execSingleRowQuery h getLastMTimeStmt (Only sfHash) case v of Just (Only t) -> return $ Just t Nothing -> return Nothing
232
getLastMTime h sfHash = do v <- execSingleRowQuery h getLastMTimeStmt (Only sfHash) case v of Just (Only t) -> return $ Just t Nothing -> return Nothing
170
false
true
0
12
53
91
42
49
null
null
lisphacker/codewars
FindingAnAppointment.hs
bsd-2-clause
timeMax = 599
13
timeMax = 599
13
timeMax = 599
13
false
false
1
5
2
10
3
7
null
null
maffh92/AFP-ANT
src/Abstractions.hs
bsd-3-clause
-------------------------------------------------------------------------------- -- Other combinators -- | Try to move, if fail do something else move_ :: (MonadFix m, Label l) => AntT m l () -- ^ Failure -> AntT m l () move_ = move (return ())
259
move_ :: (MonadFix m, Label l) => AntT m l () -- ^ Failure -> AntT m l () move_ = move (return ())
110
move_ = move (return ())
24
true
true
0
8
52
63
33
30
null
null
themoritz/cabal
Cabal/Distribution/Types/BuildInfo.hs
bsd-3-clause
-- | The 'Extension's that are used somewhere by this component -- allExtensions :: BuildInfo -> [Extension] allExtensions bi = usedExtensions bi ++ otherExtensions bi
183
allExtensions :: BuildInfo -> [Extension] allExtensions bi = usedExtensions bi ++ otherExtensions bi
116
allExtensions bi = usedExtensions bi ++ otherExtensions bi
74
true
true
0
6
40
33
17
16
null
null
f1u77y/xmonad-contrib
XMonad/Layout/BinarySpacePartition.hs
bsd-3-clause
removeNth :: BinarySpacePartition a -> BinarySpacePartition a removeNth (BinarySpacePartition _ _ _ Nothing) = emptyBSP
119
removeNth :: BinarySpacePartition a -> BinarySpacePartition a removeNth (BinarySpacePartition _ _ _ Nothing) = emptyBSP
119
removeNth (BinarySpacePartition _ _ _ Nothing) = emptyBSP
57
false
true
0
7
14
36
17
19
null
null
zhiyuanshi/include
Include.hs
mit
-- | A LaTeX preprocessor. latexP :: Processor latexP = emit . parse . lines
76
latexP :: Processor latexP = emit . parse . lines
49
latexP = emit . parse . lines
29
true
true
2
6
14
29
12
17
null
null
pjones/xmonad-test
vendor/xmonad-contrib/XMonad/Layout/MosaicAlt.hs
bsd-2-clause
makeTree :: [Window] -> Params -> Tree makeTree wins params = case wins of [] -> None [x] -> Leaf x _ -> Node (aArea, makeTree aWins params) (bArea, makeTree bWins params) where ((aWins, aArea), (bWins, bArea)) = areaSplit params wins -- Split a list of windows in half by area.
299
makeTree :: [Window] -> Params -> Tree makeTree wins params = case wins of [] -> None [x] -> Leaf x _ -> Node (aArea, makeTree aWins params) (bArea, makeTree bWins params) where ((aWins, aArea), (bWins, bArea)) = areaSplit params wins -- Split a list of windows in half by area.
299
makeTree wins params = case wins of [] -> None [x] -> Leaf x _ -> Node (aArea, makeTree aWins params) (bArea, makeTree bWins params) where ((aWins, aArea), (bWins, bArea)) = areaSplit params wins -- Split a list of windows in half by area.
260
false
true
2
7
71
105
60
45
null
null
mettekou/ghc
compiler/deSugar/DsArrows.hs
bsd-3-clause
dsCmd ids local_vars stack_ty res_ty (HsCmdDo (L _ stmts) _) env_ids = do (core_stmts, env_ids') <- dsCmdDo ids local_vars res_ty stmts env_ids let env_ty = mkBigCoreVarTupTy env_ids core_fst <- mkFstExpr env_ty stack_ty return (do_premap ids (mkCorePairTy env_ty stack_ty) ...
640
dsCmd ids local_vars stack_ty res_ty (HsCmdDo (L _ stmts) _) env_ids = do (core_stmts, env_ids') <- dsCmdDo ids local_vars res_ty stmts env_ids let env_ty = mkBigCoreVarTupTy env_ids core_fst <- mkFstExpr env_ty stack_ty return (do_premap ids (mkCorePairTy env_ty stack_ty) ...
640
dsCmd ids local_vars stack_ty res_ty (HsCmdDo (L _ stmts) _) env_ids = do (core_stmts, env_ids') <- dsCmdDo ids local_vars res_ty stmts env_ids let env_ty = mkBigCoreVarTupTy env_ids core_fst <- mkFstExpr env_ty stack_ty return (do_premap ids (mkCorePairTy env_ty stack_ty) ...
640
false
false
0
11
201
120
59
61
null
null
Alex-Diez/haskell-tdd-kata
old-katas/test/SubListKata/Day4Spec.hs
bsd-3-clause
spec :: Spec spec = do it "empty equals empty" $ do sublist "" "" `shouldBe` Equal it "empty is sublinst of anything" $ do sublist "" "anything" `shouldBe` Sublist it "anything is superlist of empty" $ do sublist "anything" "" `shouldBe` Superlist ...
686
spec :: Spec spec = do it "empty equals empty" $ do sublist "" "" `shouldBe` Equal it "empty is sublinst of anything" $ do sublist "" "anything" `shouldBe` Sublist it "anything is superlist of empty" $ do sublist "anything" "" `shouldBe` Superlist i...
682
spec = do it "empty equals empty" $ do sublist "" "" `shouldBe` Equal it "empty is sublinst of anything" $ do sublist "" "anything" `shouldBe` Sublist it "anything is superlist of empty" $ do sublist "anything" "" `shouldBe` Superlist it "1 does not...
669
false
true
0
11
243
186
84
102
null
null
kyoungrok0517/linguist
samples/Haskell/Sudoku.hs
mit
solve :: Sudoku -> Maybe Sudoku solve sudoku | isSolved sudoku = Just sudoku | otherwise = do index <- elemIndex 0 sudoku let sudokus = [nextTest sudoku index i | i <- [1..9], checkRow (nextTest sudoku index i) index, checkColumn (nextTest ...
1,303
solve :: Sudoku -> Maybe Sudoku solve sudoku | isSolved sudoku = Just sudoku | otherwise = do index <- elemIndex 0 sudoku let sudokus = [nextTest sudoku index i | i <- [1..9], checkRow (nextTest sudoku index i) index, checkColumn (nextTest ...
1,303
solve sudoku | isSolved sudoku = Just sudoku | otherwise = do index <- elemIndex 0 sudoku let sudokus = [nextTest sudoku index i | i <- [1..9], checkRow (nextTest sudoku index i) index, checkColumn (nextTest sudoku index i) index, ...
1,271
false
true
1
14
435
515
250
265
null
null
shouya/thinking-dumps
wys48h/code/Parser.hs
mit
parseQuoted :: Parser LispVal parseQuoted = do char '\'' x <- parseExpr return $ List [Identifier "quote", x]
127
parseQuoted :: Parser LispVal parseQuoted = do char '\'' x <- parseExpr return $ List [Identifier "quote", x]
127
parseQuoted = do char '\'' x <- parseExpr return $ List [Identifier "quote", x]
97
false
true
0
11
35
52
22
30
null
null
josefs/sbv
Data/SBV/Core/Model.hs
bsd-3-clause
mkSymOpSC :: (SW -> SW -> Maybe SW) -> Op -> State -> Kind -> SW -> SW -> IO SW mkSymOpSC shortCut op st k a b = maybe (newExpr st k (SBVApp op [a, b])) return (shortCut a b)
174
mkSymOpSC :: (SW -> SW -> Maybe SW) -> Op -> State -> Kind -> SW -> SW -> IO SW mkSymOpSC shortCut op st k a b = maybe (newExpr st k (SBVApp op [a, b])) return (shortCut a b)
174
mkSymOpSC shortCut op st k a b = maybe (newExpr st k (SBVApp op [a, b])) return (shortCut a b)
94
false
true
0
11
40
104
52
52
null
null
stepcut/plugins
src/System/Eval/Haskell.hs
lgpl-2.1
unsafeEval :: String -> [Import] -> IO (Maybe a) unsafeEval src mods = do pwd <- getCurrentDirectory tmpf <- mkUniqueWith wrap src mods status <- make tmpf [] m_rsrc <- case status of MakeSuccess _ obj -> do m_v <- load obj [pwd] [] symbol case m_v of LoadFailure _ ...
734
unsafeEval :: String -> [Import] -> IO (Maybe a) unsafeEval src mods = do pwd <- getCurrentDirectory tmpf <- mkUniqueWith wrap src mods status <- make tmpf [] m_rsrc <- case status of MakeSuccess _ obj -> do m_v <- load obj [pwd] [] symbol case m_v of LoadFailure _ ...
734
unsafeEval src mods = do pwd <- getCurrentDirectory tmpf <- mkUniqueWith wrap src mods status <- make tmpf [] m_rsrc <- case status of MakeSuccess _ obj -> do m_v <- load obj [pwd] [] symbol case m_v of LoadFailure _ -> return Nothing LoadS...
685
false
true
0
18
210
195
89
106
null
null
edsko/cabal
Cabal/src/Distribution/Simple.hs
bsd-3-clause
configureAction :: UserHooks -> ConfigFlags -> Args -> IO LocalBuildInfo configureAction hooks flags args = do distPref <- findDistPrefOrDefault (configDistPref flags) let flags' = flags { configDistPref = toFlag distPref } pbi <- preConf hooks args flags' (mb_pd_file, pkg_descr0) <- confPkgDescr ...
1,505
configureAction :: UserHooks -> ConfigFlags -> Args -> IO LocalBuildInfo configureAction hooks flags args = do distPref <- findDistPrefOrDefault (configDistPref flags) let flags' = flags { configDistPref = toFlag distPref } pbi <- preConf hooks args flags' (mb_pd_file, pkg_descr0) <- confPkgDescr ...
1,505
configureAction hooks flags args = do distPref <- findDistPrefOrDefault (configDistPref flags) let flags' = flags { configDistPref = toFlag distPref } pbi <- preConf hooks args flags' (mb_pd_file, pkg_descr0) <- confPkgDescr --get_pkg_descr (configVerbosity flags') --let pkg_descr = updatePack...
1,432
false
true
0
14
405
311
150
161
null
null
wouwouwou/2017_module_8
src/haskell/PP-project-2017/Checker.hs
apache-2.0
checker2 (ASTVar str _) check = ASTVar str check
52
checker2 (ASTVar str _) check = ASTVar str check
52
checker2 (ASTVar str _) check = ASTVar str check
52
false
false
1
7
12
30
11
19
null
null
HJvT/hdirect
src/Parser.hs
bsd-3-clause
action_2 (19#) = happyGoto action_12
36
action_2 (19#) = happyGoto action_12
36
action_2 (19#) = happyGoto action_12
36
false
false
0
6
4
15
7
8
null
null
yairchu/ad
src/Numeric/AD/Internal/Combinators.hs
bsd-3-clause
-- | Zip a @'Foldable' f@ with a @'Traversable' g@ assuming @f@, using a default value after @f@ is exhausted. zipWithDefaultT :: (Foldable f, Traversable g) => a -> (a -> b -> c) -> f a -> g b -> g c zipWithDefaultT z f as = zipWithT f (toList as ++ repeat z)
260
zipWithDefaultT :: (Foldable f, Traversable g) => a -> (a -> b -> c) -> f a -> g b -> g c zipWithDefaultT z f as = zipWithT f (toList as ++ repeat z)
149
zipWithDefaultT z f as = zipWithT f (toList as ++ repeat z)
59
true
true
0
10
54
88
43
45
null
null
ssaavedra/liquidhaskell
benchmarks/icfp15/pos/DataBase.hs
bsd-3-clause
filter f (x:xs) | f x = x : filter f xs | otherwise = filter f xs
75
filter f (x:xs) | f x = x : filter f xs | otherwise = filter f xs
75
filter f (x:xs) | f x = x : filter f xs | otherwise = filter f xs
75
false
false
1
8
27
49
22
27
null
null
jtojnar/haste-compiler
libraries/ghc-7.10/ghc-prim/GHC/PrimopWrappers.hs
bsd-3-clause
readWord32Array# :: MutableByteArray# s -> Int# -> State# s -> (# State# s,Word# #) readWord32Array# a1 a2 a3 = (GHC.Prim.readWord32Array#) a1 a2 a3
148
readWord32Array# :: MutableByteArray# s -> Int# -> State# s -> (# State# s,Word# #) readWord32Array# a1 a2 a3 = (GHC.Prim.readWord32Array#) a1 a2 a3
148
readWord32Array# a1 a2 a3 = (GHC.Prim.readWord32Array#) a1 a2 a3
64
false
true
0
9
22
57
28
29
null
null
mbrock/HBEAM
src/Language/Erlang/BEAM/Opcodes.hs
gpl-3.0
opcodeInfo 37 = ("int_bsr", 4)
30
opcodeInfo 37 = ("int_bsr", 4)
30
opcodeInfo 37 = ("int_bsr", 4)
30
false
false
0
5
4
15
8
7
null
null
andrey013/pluginstest
Plugins/Gallery/Gallery/Manual48.hs
mit
example = no <> image "static/phone.png" 1.5 1.5
48
example = no <> image "static/phone.png" 1.5 1.5
48
example = no <> image "static/phone.png" 1.5 1.5
48
false
false
0
6
7
17
8
9
null
null
Kheldar/hw-koans
solution/Koan/Simple.hs
bsd-3-clause
takeWhile _ _ = []
23
takeWhile _ _ = []
23
takeWhile _ _ = []
23
false
false
1
6
9
14
6
8
null
null
AndreasPK/stack
src/Stack/Types/Config.hs
bsd-3-clause
configMonoidConnectionCountName :: Text configMonoidConnectionCountName = "connection-count"
92
configMonoidConnectionCountName :: Text configMonoidConnectionCountName = "connection-count"
92
configMonoidConnectionCountName = "connection-count"
52
false
true
0
4
5
11
6
5
null
null
individkid/sidegeo
src/AffTopo/Naive.hs
gpl-3.0
-- all possible regions powerSpace :: [Boundary] -> Place powerSpace b = let count = length b regions = indices (shift 1 count) boundaries = indices count in map (\(x,y) -> (y, [powerSpaceF x regions 0, powerSpaceF x regions 1])) (zip boundaries b)
252
powerSpace :: [Boundary] -> Place powerSpace b = let count = length b regions = indices (shift 1 count) boundaries = indices count in map (\(x,y) -> (y, [powerSpaceF x regions 0, powerSpaceF x regions 1])) (zip boundaries b)
228
powerSpace b = let count = length b regions = indices (shift 1 count) boundaries = indices count in map (\(x,y) -> (y, [powerSpaceF x regions 0, powerSpaceF x regions 1])) (zip boundaries b)
194
true
true
0
12
46
113
59
54
null
null
23Skidoo/xmlhtml
test/suite/Text/XmlHtml/Tests.hs
bsd-3-clause
------------------------------------------------------------------------------ -- XML Parsing Tests --------------------------------------------------------- ------------------------------------------------------------------------------ xmlParsingTests :: [Test] xmlParsingTests = [ testCase "byteOrderMark ...
1,490
xmlParsingTests :: [Test] xmlParsingTests = [ testCase "byteOrderMark " byteOrderMark, testIt "emptyDocument " emptyDocument, testIt "publicDocType " publicDocType, testIt "systemDocType " systemDocType, testIt "emptyDocType " emptyDocType, t...
1,252
xmlParsingTests = [ testCase "byteOrderMark " byteOrderMark, testIt "emptyDocument " emptyDocument, testIt "publicDocType " publicDocType, testIt "systemDocType " systemDocType, testIt "emptyDocType " emptyDocType, testCase "dtdInternalScan ...
1,226
true
true
0
6
489
201
103
98
null
null
sgillespie/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
-- >>> firstAIdKey = mkPreludeMiscIdUnique 182
50
firstAIdKey = mkPreludeMiscIdUnique 182
43
firstAIdKey = mkPreludeMiscIdUnique 182
43
true
false
0
5
9
10
5
5
null
null
lfritz/python-type-inference
python-type-inference/src/Language/Python/TypeInference/CFG/ToFragment.hs
bsd-3-clause
-- | Convert a binary operator. toBinaryOperator :: AST.Op SrcSpan -> TypeInferenceMonad BinaryOperator toBinaryOperator (AST.And _) = return BooleanAnd
166
toBinaryOperator :: AST.Op SrcSpan -> TypeInferenceMonad BinaryOperator toBinaryOperator (AST.And _) = return BooleanAnd
134
toBinaryOperator (AST.And _) = return BooleanAnd
62
true
true
0
8
32
38
18
20
null
null
mreid/papersite
src/exec/scrape.hs
mit
isPDF = isLinkType "pdf"
24
isPDF = isLinkType "pdf"
24
isPDF = isLinkType "pdf"
24
false
false
1
5
3
12
4
8
null
null
asakamirai/kazura-queue
bench/Main.hs
bsd-3-clause
main :: IO () main = do CR.defaultMainWith configSpeed [ CR.bgroup "KazuraQueue" $ testcases $ testSpeed_ testKZRQueue -- , CR.bgroup "UnagiChan" $ testcases $ testSpeed_ testUChan , CR.bgroup "Chan" $ testcases $ testSpeed_ testChan , CR.bgroup "TQueue" $ tes...
1,366
main :: IO () main = do CR.defaultMainWith configSpeed [ CR.bgroup "KazuraQueue" $ testcases $ testSpeed_ testKZRQueue -- , CR.bgroup "UnagiChan" $ testcases $ testSpeed_ testUChan , CR.bgroup "Chan" $ testcases $ testSpeed_ testChan , CR.bgroup "TQueue" $ tes...
1,366
main = do CR.defaultMainWith configSpeed [ CR.bgroup "KazuraQueue" $ testcases $ testSpeed_ testKZRQueue -- , CR.bgroup "UnagiChan" $ testcases $ testSpeed_ testUChan , CR.bgroup "Chan" $ testcases $ testSpeed_ testChan , CR.bgroup "TQueue" $ testcases $ testS...
1,352
false
true
8
12
477
375
168
207
null
null
dysinger/amazonka
amazonka-ec2/gen/Network/AWS/EC2/Types.hs
mpl-2.0
-- | The AWS account ID of the Amazon EBS snapshot owner. sOwnerId :: Lens' Snapshot Text sOwnerId = lens _sOwnerId (\s a -> s { _sOwnerId = a })
145
sOwnerId :: Lens' Snapshot Text sOwnerId = lens _sOwnerId (\s a -> s { _sOwnerId = a })
87
sOwnerId = lens _sOwnerId (\s a -> s { _sOwnerId = a })
55
true
true
0
9
29
40
22
18
null
null
AndrewRademacher/stack
src/Stack/Types/Version.hs
bsd-3-clause
-- | Check if a version is within a version range. withinRange :: Version -> Cabal.VersionRange -> Bool withinRange v r = toCabalVersion v `Cabal.withinRange` r
160
withinRange :: Version -> Cabal.VersionRange -> Bool withinRange v r = toCabalVersion v `Cabal.withinRange` r
109
withinRange v r = toCabalVersion v `Cabal.withinRange` r
56
true
true
0
7
25
38
20
18
null
null
anton-dessiatov/stack
src/Stack/Coverage.hs
bsd-3-clause
readTixOrLog :: HasLogFunc env => Path b File -> RIO env (Maybe Tix) readTixOrLog path = do mtix <- liftIO (readTix (toFilePath path)) `catchAny` \errorCall -> do logError $ "Error while reading tix: " <> T.pack (show errorCall) return Nothing when (isNothing mtix) $ logError $ "Failed t...
489
readTixOrLog :: HasLogFunc env => Path b File -> RIO env (Maybe Tix) readTixOrLog path = do mtix <- liftIO (readTix (toFilePath path)) `catchAny` \errorCall -> do logError $ "Error while reading tix: " <> T.pack (show errorCall) return Nothing when (isNothing mtix) $ logError $ "Failed t...
489
readTixOrLog path = do mtix <- liftIO (readTix (toFilePath path)) `catchAny` \errorCall -> do logError $ "Error while reading tix: " <> T.pack (show errorCall) return Nothing when (isNothing mtix) $ logError $ "Failed to read tix file " <> T.pack (toFilePath path) return mtix -- | M...
420
false
true
0
15
114
145
68
77
null
null
bitemyapp/MiniKanrenT
example.hs
mit
exampleMothers :: IO () exampleMothers = mapM_ print $ nub $ runAll $ do m <- fresh c <- fresh mother m c return m -- Prints out a list of all the fathers
163
exampleMothers :: IO () exampleMothers = mapM_ print $ nub $ runAll $ do m <- fresh c <- fresh mother m c return m -- Prints out a list of all the fathers
163
exampleMothers = mapM_ print $ nub $ runAll $ do m <- fresh c <- fresh mother m c return m -- Prints out a list of all the fathers
139
false
true
0
9
42
66
28
38
null
null
ambiata/tatooine-cli
src/Ambiata/Cli/Incoming.hs
apache-2.0
hashFileOf :: IncomingDir -> IncomingFile -> FilePath hashFileOf dir f = (toWorkingPath dir Hashfiles) </> (T.unpack $ unIncomingFile f)
138
hashFileOf :: IncomingDir -> IncomingFile -> FilePath hashFileOf dir f = (toWorkingPath dir Hashfiles) </> (T.unpack $ unIncomingFile f)
138
hashFileOf dir f = (toWorkingPath dir Hashfiles) </> (T.unpack $ unIncomingFile f)
84
false
true
2
8
20
55
25
30
null
null
opentower/carnap
Carnap-Server/Handler/Info.hs
gpl-3.0
comprehensionTheorem = [st| Show EXAx(F(x)/\G(x)<->X(x)) Show Ax(F(x)/\G(x)<->\y[F(y)/\G(y)](x)) Show F(c)/\G(c)->\y[F(y)/\G(y)](c) F(c)/\G(c):AS \y[F(y)/\G(y)](c):ABS 4 :CD 5 Show \y[F(y)/\G(y)](c)->F(c)/\G(c) \y[F(y)/\G(y)](c):AS F(c)/\G(c):APP 8...
429
comprehensionTheorem = [st| Show EXAx(F(x)/\G(x)<->X(x)) Show Ax(F(x)/\G(x)<->\y[F(y)/\G(y)](x)) Show F(c)/\G(c)->\y[F(y)/\G(y)](c) F(c)/\G(c):AS \y[F(y)/\G(y)](c):ABS 4 :CD 5 Show \y[F(y)/\G(y)](c)->F(c)/\G(c) \y[F(y)/\G(y)](c):AS F(c)/\G(c):APP 8...
429
comprehensionTheorem = [st| Show EXAx(F(x)/\G(x)<->X(x)) Show Ax(F(x)/\G(x)<->\y[F(y)/\G(y)](x)) Show F(c)/\G(c)->\y[F(y)/\G(y)](c) F(c)/\G(c):AS \y[F(y)/\G(y)](c):ABS 4 :CD 5 Show \y[F(y)/\G(y)](c)->F(c)/\G(c) \y[F(y)/\G(y)](c):AS F(c)/\G(c):APP 8...
429
false
false
0
4
121
10
7
3
null
null
mydaum/cabal
cabal-install/Distribution/Client/SetupWrapper.hs
bsd-3-clause
getExternalSetupMethod :: Verbosity -> SetupScriptOptions -> PackageDescription -> BuildType -> IO (Version, SetupMethod, SetupScriptOptions) getExternalSetupMethod verbosity options pkg bt = do debug verbosity $ "Using external setup method with build-type " ++ show bt debug verbosity $ "Using explicit depende...
17,663
getExternalSetupMethod :: Verbosity -> SetupScriptOptions -> PackageDescription -> BuildType -> IO (Version, SetupMethod, SetupScriptOptions) getExternalSetupMethod verbosity options pkg bt = do debug verbosity $ "Using external setup method with build-type " ++ show bt debug verbosity $ "Using explicit depende...
17,663
getExternalSetupMethod verbosity options pkg bt = do debug verbosity $ "Using external setup method with build-type " ++ show bt debug verbosity $ "Using explicit dependencies: " ++ show (useDependenciesExclusive options) createDirectoryIfMissingVerbose verbosity True setupDir (cabalLibVersion, mCabalLibIns...
17,517
false
true
31
21
5,488
3,150
1,545
1,605
null
null
nevrenato/Hets_Fork
Taxonomy/OntoParser.hs
gpl-2.0
nameDeflOpt :: GenParser Char st (String, String, Maybe String) nameDeflOpt = do (s1, s2) <- nameDefl s3 <- option "" $ braced idParser return (s1, s2, if null s3 then Nothing else Just s3)
195
nameDeflOpt :: GenParser Char st (String, String, Maybe String) nameDeflOpt = do (s1, s2) <- nameDefl s3 <- option "" $ braced idParser return (s1, s2, if null s3 then Nothing else Just s3)
195
nameDeflOpt = do (s1, s2) <- nameDefl s3 <- option "" $ braced idParser return (s1, s2, if null s3 then Nothing else Just s3)
131
false
true
2
11
39
98
45
53
null
null
yi-editor/yi
yi-dynamic-configuration/src/Yi/Main.hs
gpl-2.0
-- | List of editors for which we provide an emulation. editors :: [(String,Config -> Config)] editors = []
107
editors :: [(String,Config -> Config)] editors = []
51
editors = []
12
true
true
0
9
18
34
17
17
null
null
yliu120/K3
src/Language/K3/Core/Declaration.hs
apache-2.0
isAnyDInferredEffectAnn :: Annotation Declaration -> Bool isAnyDInferredEffectAnn a = isDInferredProvenance a || isDInferredEffect a
132
isAnyDInferredEffectAnn :: Annotation Declaration -> Bool isAnyDInferredEffectAnn a = isDInferredProvenance a || isDInferredEffect a
132
isAnyDInferredEffectAnn a = isDInferredProvenance a || isDInferredEffect a
74
false
true
0
7
13
36
15
21
null
null
snoyberg/ghc
compiler/llvmGen/Llvm/PpLlvm.hs
bsd-3-clause
ppMetaStatement :: [MetaAnnot] -> LlvmStatement -> SDoc ppMetaStatement meta stmt = ppLlvmStatement stmt <> ppMetaAnnots meta
125
ppMetaStatement :: [MetaAnnot] -> LlvmStatement -> SDoc ppMetaStatement meta stmt = ppLlvmStatement stmt <> ppMetaAnnots meta
125
ppMetaStatement meta stmt = ppLlvmStatement stmt <> ppMetaAnnots meta
69
false
true
0
6
15
37
18
19
null
null
garetxe/cabal
cabal-install/Distribution/Client/Sandbox.hs
bsd-3-clause
getSandboxConfigFilePath :: GlobalFlags -> IO FilePath getSandboxConfigFilePath globalFlags = do let sandboxConfigFileFlag = globalSandboxConfigFile globalFlags case sandboxConfigFileFlag of NoFlag -> do pkgEnvDir <- getCurrentDirectory return (pkgEnvDir </> sandboxPackageEnvironmentFile) F...
610
getSandboxConfigFilePath :: GlobalFlags -> IO FilePath getSandboxConfigFilePath globalFlags = do let sandboxConfigFileFlag = globalSandboxConfigFile globalFlags case sandboxConfigFileFlag of NoFlag -> do pkgEnvDir <- getCurrentDirectory return (pkgEnvDir </> sandboxPackageEnvironmentFile) F...
610
getSandboxConfigFilePath globalFlags = do let sandboxConfigFileFlag = globalSandboxConfigFile globalFlags case sandboxConfigFileFlag of NoFlag -> do pkgEnvDir <- getCurrentDirectory return (pkgEnvDir </> sandboxPackageEnvironmentFile) Flag path -> return path -- | Load the @cabal.sandbox.c...
555
false
true
0
14
104
82
39
43
null
null
jleahred/katas
concurrency/haskell3/app/Main.hs
gpl-3.0
main :: IO () main = do let (a, b) = paral2 a b
60
main :: IO () main = do let (a, b) = paral2 a b
60
main = do let (a, b) = paral2 a b
46
false
true
0
10
26
38
18
20
null
null
blitzcode/rust-exp
hs-src/GLHelpers.hs
mit
disableVAOAndShaders :: IO () disableVAOAndShaders = do GL.bindVertexArrayObject GL.$= Nothing GL.currentProgram GL.$= Nothing
141
disableVAOAndShaders :: IO () disableVAOAndShaders = do GL.bindVertexArrayObject GL.$= Nothing GL.currentProgram GL.$= Nothing
141
disableVAOAndShaders = do GL.bindVertexArrayObject GL.$= Nothing GL.currentProgram GL.$= Nothing
111
false
true
0
8
27
38
18
20
null
null
michalrus/kornel
src/Kornel/Common.hs
apache-2.0
decodeHtmlEntities :: Text -> Text decodeHtmlEntities = TL.toStrict . TLB.toLazyText . htmlEncodedText
102
decodeHtmlEntities :: Text -> Text decodeHtmlEntities = TL.toStrict . TLB.toLazyText . htmlEncodedText
102
decodeHtmlEntities = TL.toStrict . TLB.toLazyText . htmlEncodedText
67
false
true
0
7
11
27
14
13
null
null
chreekat/yesod
yesod-core/Yesod/Request.hs
bsd-2-clause
-- | Lookup for GET parameters. lookupGetParams :: Text -> GHandler s m [Text] lookupGetParams pn = do rr <- getRequest return $ lookup' pn $ reqGetParams rr -- | Lookup for GET parameters.
198
lookupGetParams :: Text -> GHandler s m [Text] lookupGetParams pn = do rr <- getRequest return $ lookup' pn $ reqGetParams rr -- | Lookup for GET parameters.
166
lookupGetParams pn = do rr <- getRequest return $ lookup' pn $ reqGetParams rr -- | Lookup for GET parameters.
119
true
true
0
10
42
58
27
31
null
null
sashabu/libcspm
src/CSPM/Evaluator/PatBind.hs
bsd-3-clause
bindAll :: [TCPat] -> AnalyserMonad ([Value] -> Maybe [(Name, Value)]) bindAll ps = let accumulate [] [] bs = Just bs accumulate (p:ps) (x:xs) bs = case p x of Just bs' -> accumulate ps xs (bs' ++ bs) Nothing -> Nothing in do binders <- mapM bi...
375
bindAll :: [TCPat] -> AnalyserMonad ([Value] -> Maybe [(Name, Value)]) bindAll ps = let accumulate [] [] bs = Just bs accumulate (p:ps) (x:xs) bs = case p x of Just bs' -> accumulate ps xs (bs' ++ bs) Nothing -> Nothing in do binders <- mapM bi...
375
bindAll ps = let accumulate [] [] bs = Just bs accumulate (p:ps) (x:xs) bs = case p x of Just bs' -> accumulate ps xs (bs' ++ bs) Nothing -> Nothing in do binders <- mapM bind ps return $! \vs -> accumulate binders vs []
304
false
true
0
14
140
166
82
84
null
null
nfjinjing/bench-euler
src/BenchEuler.hs
bsd-3-clause
main = bench 1 euler
20
main = bench 1 euler
20
main = bench 1 euler
20
false
false
1
5
4
16
5
11
null
null
GaloisInc/saw-script
heapster-saw/src/Verifier/SAW/Heapster/archival/Parser.hs
bsd-3-clause
parseExpr env tp@(StructRepr fld_tps) = spaces >> ((string "struct" >> parseInParens (PExpr_Struct fld_tps <$> parseStructFields env fld_tps)) <|> (PExpr_Var <$> parseVarOfType env tp))
196
parseExpr env tp@(StructRepr fld_tps) = spaces >> ((string "struct" >> parseInParens (PExpr_Struct fld_tps <$> parseStructFields env fld_tps)) <|> (PExpr_Var <$> parseVarOfType env tp))
196
parseExpr env tp@(StructRepr fld_tps) = spaces >> ((string "struct" >> parseInParens (PExpr_Struct fld_tps <$> parseStructFields env fld_tps)) <|> (PExpr_Var <$> parseVarOfType env tp))
196
false
false
3
13
33
79
35
44
null
null
peterokagey/haskellOEIS
src/Poset/A334144.hs
apache-2.0
a334144 :: Integer -> Int a334144 = maximum . map Set.size . wichitaRanks
73
a334144 :: Integer -> Int a334144 = maximum . map Set.size . wichitaRanks
73
a334144 = maximum . map Set.size . wichitaRanks
47
false
true
0
8
12
35
15
20
null
null
christiaanb/Idris-dev
src/Idris/DSL.hs
bsd-3-clause
expandDo dsl (PGoal fc r n sc) = PGoal fc (expandDo dsl r) n (expandDo dsl sc)
82
expandDo dsl (PGoal fc r n sc) = PGoal fc (expandDo dsl r) n (expandDo dsl sc)
82
expandDo dsl (PGoal fc r n sc) = PGoal fc (expandDo dsl r) n (expandDo dsl sc)
82
false
false
0
6
20
53
23
30
null
null
ivanmoore/seedy
lib/Pelias.hs
gpl-3.0
tokeniseChars' _ acc [] = ([], acc)
52
tokeniseChars' _ acc [] = ([], acc)
52
tokeniseChars' _ acc [] = ([], acc)
52
false
false
1
7
23
27
12
15
null
null
phischu/fragnix
tests/packages/scotty/Network.Wai.Handler.Warp.HTTP2.Types.hs
bsd-3-clause
outputMaybeTBQueue :: Output -> Maybe (TBQueue Sequence) outputMaybeTBQueue (Output _ (RspnStreaming _ _ tbq) _ _ _ _) = Just tbq
129
outputMaybeTBQueue :: Output -> Maybe (TBQueue Sequence) outputMaybeTBQueue (Output _ (RspnStreaming _ _ tbq) _ _ _ _) = Just tbq
129
outputMaybeTBQueue (Output _ (RspnStreaming _ _ tbq) _ _ _ _) = Just tbq
72
false
true
0
8
20
60
28
32
null
null
piyush-kurur/shakespeare
hamlet/Text/Hamlet/Parse.hs
bsd-2-clause
compressDoc (DocCase d cs:rest) = DocCase d (map (second compressDoc) cs) : compressDoc rest
96
compressDoc (DocCase d cs:rest) = DocCase d (map (second compressDoc) cs) : compressDoc rest
96
compressDoc (DocCase d cs:rest) = DocCase d (map (second compressDoc) cs) : compressDoc rest
96
false
false
0
10
17
47
22
25
null
null
input-output-hk/cardano-sl
lib/bench/Bench/Pos/Criterion/FollowTheSatoshiBench.hs
apache-2.0
-- [CSL-192]: make a trick and use special unsafe arbitrary instances -- for generation of such things arbitraryUtxoOfSize :: UtxoSize -> Gen [(StakeholderId, Coin)] arbitraryUtxoOfSize n = take n <$> infiniteListOf arbitraryUnsafe
231
arbitraryUtxoOfSize :: UtxoSize -> Gen [(StakeholderId, Coin)] arbitraryUtxoOfSize n = take n <$> infiniteListOf arbitraryUnsafe
128
arbitraryUtxoOfSize n = take n <$> infiniteListOf arbitraryUnsafe
65
true
true
0
8
31
42
22
20
null
null
jcristovao/persistent
persistent-mongoDB/Database/Persist/MongoDB.hs
mit
createPipe :: HostName -> PortID -> IO DB.Pipe createPipe hostname port = DB.connect (DB.Host hostname port)
108
createPipe :: HostName -> PortID -> IO DB.Pipe createPipe hostname port = DB.connect (DB.Host hostname port)
108
createPipe hostname port = DB.connect (DB.Host hostname port)
61
false
true
0
9
15
48
22
26
null
null
gdetrez/haskell-wot
tests/Codec/Archive/ArSpec.hs
gpl-3.0
spec :: Spec spec = do describe "magitAsciiStr" $ do it "succeed with the correct string" $ do let myData = "abc" runGetOrFail (magicAsciiStr "abc") myData `shouldBe` Right ("", 3, ()) it "fails if the input is too short" $ do let myData = "a" runGetOrFail (magicAsciiStr "abc"...
2,342
spec :: Spec spec = do describe "magitAsciiStr" $ do it "succeed with the correct string" $ do let myData = "abc" runGetOrFail (magicAsciiStr "abc") myData `shouldBe` Right ("", 3, ()) it "fails if the input is too short" $ do let myData = "a" runGetOrFail (magicAsciiStr "abc"...
2,342
spec = do describe "magitAsciiStr" $ do it "succeed with the correct string" $ do let myData = "abc" runGetOrFail (magicAsciiStr "abc") myData `shouldBe` Right ("", 3, ()) it "fails if the input is too short" $ do let myData = "a" runGetOrFail (magicAsciiStr "abc") myData ...
2,329
false
true
0
37
699
716
336
380
null
null
anton-dessiatov/ghc
compiler/basicTypes/MkId.hs
bsd-3-clause
magicDictId :: Id -- See Note [magicDictId magic] magicDictId = pcMiscPrelId magicDictName ty info where info = noCafIdInfo `setInlinePragInfo` neverInlinePragma ty = mkForAllTys [alphaTyVar] alphaTy --------------------------------------------------------------------------------
290
magicDictId :: Id magicDictId = pcMiscPrelId magicDictName ty info where info = noCafIdInfo `setInlinePragInfo` neverInlinePragma ty = mkForAllTys [alphaTyVar] alphaTy --------------------------------------------------------------------------------
257
magicDictId = pcMiscPrelId magicDictName ty info where info = noCafIdInfo `setInlinePragInfo` neverInlinePragma ty = mkForAllTys [alphaTyVar] alphaTy --------------------------------------------------------------------------------
239
true
true
0
6
35
47
26
21
null
null
glguy/cereal
src/Data/Serialize/Put.hs
bsd-3-clause
-- Containers ------------------------------------------------------------------ encodeListOf :: (a -> Builder) -> [a] -> Builder encodeListOf f = -- allow inlining with just a single argument \xs -> execPut (putWord64be (fromIntegral $ length xs)) `M.mappend` F.foldMap f xs
293
encodeListOf :: (a -> Builder) -> [a] -> Builder encodeListOf f = -- allow inlining with just a single argument \xs -> execPut (putWord64be (fromIntegral $ length xs)) `M.mappend` F.foldMap f xs
211
encodeListOf f = -- allow inlining with just a single argument \xs -> execPut (putWord64be (fromIntegral $ length xs)) `M.mappend` F.foldMap f xs
162
true
true
0
12
52
73
39
34
null
null
phischu/fragnix
tests/packages/scotty/Data.IP.Op.hs
bsd-3-clause
addrRangePair :: Addr a => AddrRange a -> (a, Int) addrRangePair (AddrRange adr _ len) = (adr, len)
99
addrRangePair :: Addr a => AddrRange a -> (a, Int) addrRangePair (AddrRange adr _ len) = (adr, len)
99
addrRangePair (AddrRange adr _ len) = (adr, len)
48
false
true
0
7
17
54
27
27
null
null
sdiehl/ghc
testsuite/tests/perf/compiler/T16473.hs
bsd-3-clause
put :: s -> Semantic '[State s] () put !s = Semantic $ \k -> k $ Union $! Put s ()
82
put :: s -> Semantic '[State s] () put !s = Semantic $ \k -> k $ Union $! Put s ()
82
put !s = Semantic $ \k -> k $ Union $! Put s ()
47
false
true
2
11
21
64
30
34
null
null
ghc-android/ghc
libraries/base/GHC/Conc/Sync.hs
bsd-3-clause
disableAllocationLimit :: IO () disableAllocationLimit = do ThreadId t <- myThreadId rts_disableThreadAllocationLimit t -- We cannot do these operations safely on another thread, because on -- a 32-bit machine we cannot do atomic operations on a 64-bit value. -- Therefore, we only expose APIs that allow getting an...
365
disableAllocationLimit :: IO () disableAllocationLimit = do ThreadId t <- myThreadId rts_disableThreadAllocationLimit t -- We cannot do these operations safely on another thread, because on -- a 32-bit machine we cannot do atomic operations on a 64-bit value. -- Therefore, we only expose APIs that allow getting an...
365
disableAllocationLimit = do ThreadId t <- myThreadId rts_disableThreadAllocationLimit t -- We cannot do these operations safely on another thread, because on -- a 32-bit machine we cannot do atomic operations on a 64-bit value. -- Therefore, we only expose APIs that allow getting and setting the -- limit of the cu...
333
false
true
0
8
60
36
18
18
null
null
codemac/yi-editor
src/Yi/Mode/Haskell.hs
gpl-2.0
tokCol = posnCol . tokPosn
26
tokCol = posnCol . tokPosn
26
tokCol = posnCol . tokPosn
26
false
false
0
5
4
10
5
5
null
null
binesiyu/ifl
ifpt-master/ParserTest.hs
mit
l2 = pNum ["1"]
15
l2 = pNum ["1"]
15
l2 = pNum ["1"]
15
false
false
1
6
3
15
6
9
null
null
felipeZ/Dynamics
src/copiaMolcas.hs
bsd-3-clause
isAuto :: MolBlock -> Bool isAuto (ModuleAuto _n _s _modules) = True
68
isAuto :: MolBlock -> Bool isAuto (ModuleAuto _n _s _modules) = True
68
isAuto (ModuleAuto _n _s _modules) = True
41
false
true
0
7
11
28
14
14
null
null
jgm/pandoc-citeproc
src/Text/CSL/Eval/Date.hs
bsd-3-clause
formatDate :: EvalMode -> Text -> [CslTerm] -> [DatePart] -> [RefDate] -> [Output] formatDate em k tm dp date | [d] <- date = concatMap (formatDatePart d) dp | (a:b:_) <- date = addODate . concat $ doRange a b | otherwise = [] where addODate [] = [] addODate xs = [ODate xs] s...
4,391
formatDate :: EvalMode -> Text -> [CslTerm] -> [DatePart] -> [RefDate] -> [Output] formatDate em k tm dp date | [d] <- date = concatMap (formatDatePart d) dp | (a:b:_) <- date = addODate . concat $ doRange a b | otherwise = [] where addODate [] = [] addODate xs = [ODate xs] s...
4,391
formatDate em k tm dp date | [d] <- date = concatMap (formatDatePart d) dp | (a:b:_) <- date = addODate . concat $ doRange a b | otherwise = [] where addODate [] = [] addODate xs = [ODate xs] splitDate a b = case split (onSublist $ diff a b dp) dp of [...
4,308
false
true
23
16
2,043
1,725
828
897
null
null
Proclivis/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxLANGUAGE_UIGHUR :: Int wxLANGUAGE_UIGHUR = 213
48
wxLANGUAGE_UIGHUR :: Int wxLANGUAGE_UIGHUR = 213
48
wxLANGUAGE_UIGHUR = 213
23
false
true
0
4
5
11
6
5
null
null