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
IAlexKnight/Code
learn_and_pra/Haskell/Pra1.hs
apache-2.0
the_tail = tail cons_string
27
the_tail = tail cons_string
27
the_tail = tail cons_string
27
false
false
1
5
3
13
4
9
null
null
tpsinnem/Idris-dev
src/Idris/CaseSplit.hs
bsd-3-clause
replaceVar :: Context -> Name -> PTerm -> PTerm -> PTerm replaceVar ctxt n t (PApp fc f pats) = PApp fc f (map substArg pats) where subst :: PTerm -> PTerm subst orig@(PPatvar _ v) | v == n = t | otherwise = Placeholder subst orig@(PRef _ _ v) | v == n = t ...
651
replaceVar :: Context -> Name -> PTerm -> PTerm -> PTerm replaceVar ctxt n t (PApp fc f pats) = PApp fc f (map substArg pats) where subst :: PTerm -> PTerm subst orig@(PPatvar _ v) | v == n = t | otherwise = Placeholder subst orig@(PRef _ _ v) | v == n = t ...
651
replaceVar ctxt n t (PApp fc f pats) = PApp fc f (map substArg pats) where subst :: PTerm -> PTerm subst orig@(PPatvar _ v) | v == n = t | otherwise = Placeholder subst orig@(PRef _ _ v) | v == n = t | isDConName v ctxt = orig su...
594
false
true
6
11
249
281
136
145
null
null
m15k/hs-nexpose-client
nexpose/src/replTest.hs
mit
lr = LoginRequest Nothing "nxadmin" "Hu77icane" Nothing
55
lr = LoginRequest Nothing "nxadmin" "Hu77icane" Nothing
55
lr = LoginRequest Nothing "nxadmin" "Hu77icane" Nothing
55
false
false
0
5
6
15
7
8
null
null
projectorhq/haskell-liquid
test/Text/Liquid/ParserTests.hs
bsd-3-clause
case_output4 = parseOnly output "{{\'a\'| toUpper | toLower }}" @?= Right (Output (Filter (QuoteString "a") [FilterCell "toUpper" [], FilterCell "toLower" []]))
164
case_output4 = parseOnly output "{{\'a\'| toUpper | toLower }}" @?= Right (Output (Filter (QuoteString "a") [FilterCell "toUpper" [], FilterCell "toLower" []]))
164
case_output4 = parseOnly output "{{\'a\'| toUpper | toLower }}" @?= Right (Output (Filter (QuoteString "a") [FilterCell "toUpper" [], FilterCell "toLower" []]))
164
false
false
1
11
24
62
28
34
null
null
rahulmutt/ghcvm
compiler/Eta/CodeGen/Prim.hs
bsd-3-clause
simpleOp XorOp = Just $ normalOp ixor
37
simpleOp XorOp = Just $ normalOp ixor
37
simpleOp XorOp = Just $ normalOp ixor
37
false
false
0
6
6
16
7
9
null
null
beni55/haste-compiler
libraries/ghc-7.8/base/GHC/IO/Handle.hs
bsd-3-clause
ioe_dupHandlesNotCompatible :: Handle -> IO a ioe_dupHandlesNotCompatible h = ioException (IOError (Just h) IllegalOperation "hDuplicateTo" "handles are incompatible" Nothing Nothing)
203
ioe_dupHandlesNotCompatible :: Handle -> IO a ioe_dupHandlesNotCompatible h = ioException (IOError (Just h) IllegalOperation "hDuplicateTo" "handles are incompatible" Nothing Nothing)
203
ioe_dupHandlesNotCompatible h = ioException (IOError (Just h) IllegalOperation "hDuplicateTo" "handles are incompatible" Nothing Nothing)
157
false
true
0
8
39
46
22
24
null
null
bergmark/transliterate
src/Translit/Fay.hs
bsd-3-clause
matchI :: Text -> Text -> Maybe [Text] matchI reg txt = fromNullable ((ffi "%2.match(%1,'i')" :: Text -> Text -> Nullable [Text]) reg txt)
138
matchI :: Text -> Text -> Maybe [Text] matchI reg txt = fromNullable ((ffi "%2.match(%1,'i')" :: Text -> Text -> Nullable [Text]) reg txt)
138
matchI reg txt = fromNullable ((ffi "%2.match(%1,'i')" :: Text -> Text -> Nullable [Text]) reg txt)
99
false
true
0
12
23
68
33
35
null
null
denumerate/raven
src/Raven/Data/Table.Test.hs
bsd-3-clause
table4 = buildTable (V.fromList ["4"]) (V.fromList [V.fromList [6,7]])
72
table4 = buildTable (V.fromList ["4"]) (V.fromList [V.fromList [6,7]])
72
table4 = buildTable (V.fromList ["4"]) (V.fromList [V.fromList [6,7]])
72
false
false
0
9
9
45
23
22
null
null
siddhanathan/ghc
testsuite/tests/module/T1074a.hs
bsd-3-clause
fromTarPathToWindowsPath (TarPath name prefix) = FilePath.Windows.joinPath $ FilePath.Posix.splitDirectories prefix ++ FilePath.Posix.splitDirectories name
186
fromTarPathToWindowsPath (TarPath name prefix) = FilePath.Windows.joinPath $ FilePath.Posix.splitDirectories prefix ++ FilePath.Posix.splitDirectories name
186
fromTarPathToWindowsPath (TarPath name prefix) = FilePath.Windows.joinPath $ FilePath.Posix.splitDirectories prefix ++ FilePath.Posix.splitDirectories name
186
false
false
0
8
42
40
20
20
null
null
tomjaguarpaw/postgresql-simple
src/Database/PostgreSQL/Simple/TypeInfo/Static.hs
bsd-3-clause
array_textOid :: Oid array_textOid = Oid 1009
45
array_textOid :: Oid array_textOid = Oid 1009
45
array_textOid = Oid 1009
24
false
true
0
5
6
14
7
7
null
null
aaronc/Idris-dev
src/Idris/AbsSyntaxTree.hs
bsd-3-clause
unitCon = sUN "MkUnit"
23
unitCon = sUN "MkUnit"
23
unitCon = sUN "MkUnit"
23
false
false
0
5
4
9
4
5
null
null
DimaSamoz/mezzo
src/Mezzo/Compose/Templates.hs
mit
mkDoubledTConvs :: DecsQ mkDoubledTConvs = do triTyNames <- filter (\n -> nameBase n /= "DoubledD") <$> getDataCons ''TriadType let declareFun choTy = do let choStr = tail (choTyFormatter choTy) valName1 = mkName $ choStr ++ "D'" valName2 = mkName $ choStr ++ "D" ...
1,060
mkDoubledTConvs :: DecsQ mkDoubledTConvs = do triTyNames <- filter (\n -> nameBase n /= "DoubledD") <$> getDataCons ''TriadType let declareFun choTy = do let choStr = tail (choTyFormatter choTy) valName1 = mkName $ choStr ++ "D'" valName2 = mkName $ choStr ++ "D" ...
1,060
mkDoubledTConvs = do triTyNames <- filter (\n -> nameBase n /= "DoubledD") <$> getDataCons ''TriadType let declareFun choTy = do let choStr = tail (choTyFormatter choTy) valName1 = mkName $ choStr ++ "D'" valName2 = mkName $ choStr ++ "D" tySig1 <- sigD va...
1,035
false
true
0
18
286
208
107
101
null
null
Gurmeet-Singh/Zeno
src/Zeno/HaskellParser.hs
mit
convertExpr (Hs.Lit lit) = return Err
37
convertExpr (Hs.Lit lit) = return Err
37
convertExpr (Hs.Lit lit) = return Err
37
false
false
0
7
5
21
9
12
null
null
megantti/rtorrent-rpc
Network/RTorrent/File.hs
mit
-- | Get the offset of a file in a torrent, -- when chunks are interpreted as continuous data. getFileOffset :: FileId -> FileAction Int getFileOffset = simpleAction "f.offset" []
179
getFileOffset :: FileId -> FileAction Int getFileOffset = simpleAction "f.offset" []
84
getFileOffset = simpleAction "f.offset" []
42
true
true
0
6
29
27
14
13
null
null
vaibhav276/scheme-compiler
src/Parser.hs
mit
unpackNum (List [n]) = unpackNum n
34
unpackNum (List [n]) = unpackNum n
34
unpackNum (List [n]) = unpackNum n
34
false
false
0
8
5
21
10
11
null
null
sseefried/funky-foto
Settings.hs
bsd-2-clause
-- Location of image files to use for effect preivews. -- previewImage :: FilePath previewImage = "original.jpg"
112
previewImage :: FilePath previewImage = "original.jpg"
54
previewImage = "original.jpg"
29
true
true
0
6
16
20
9
11
null
null
oforero/datasciencecoursera
Capstone/splitFiles.hs
unlicense
test a = head a
15
test a = head a
15
test a = head a
15
false
false
0
5
4
12
5
7
null
null
toonn/wyah
src/PolyParser.hs
bsd-2-clause
letrecin :: Parser Expr letrecin = do reserved "let" reserved "rec" letbody
81
letrecin :: Parser Expr letrecin = do reserved "let" reserved "rec" letbody
81
letrecin = do reserved "let" reserved "rec" letbody
57
false
true
0
7
17
35
13
22
null
null
koba-e964/tigress
test/ParserTest.hs
bsd-3-clause
checkInvalidExpr :: String -> String -> TF.Test checkInvalidExpr name str = TFH.testCase name $ TH.assertBool "failure expected" $ let toks = TL.alexScanTokens str exprOrErr = TP.tparse toks in case exprOrErr of Right _ -> False Left _ -> True
262
checkInvalidExpr :: String -> String -> TF.Test checkInvalidExpr name str = TFH.testCase name $ TH.assertBool "failure expected" $ let toks = TL.alexScanTokens str exprOrErr = TP.tparse toks in case exprOrErr of Right _ -> False Left _ -> True
262
checkInvalidExpr name str = TFH.testCase name $ TH.assertBool "failure expected" $ let toks = TL.alexScanTokens str exprOrErr = TP.tparse toks in case exprOrErr of Right _ -> False Left _ -> True
214
false
true
0
11
57
92
43
49
null
null
sol/pandoc
src/Text/Pandoc/Readers/Markdown.hs
gpl-2.0
indentedLine :: GenParser Char ParserState [Char] indentedLine = indentSpaces >> manyTill anyChar newline >>= return . (++ "\n")
128
indentedLine :: GenParser Char ParserState [Char] indentedLine = indentSpaces >> manyTill anyChar newline >>= return . (++ "\n")
128
indentedLine = indentSpaces >> manyTill anyChar newline >>= return . (++ "\n")
78
false
true
0
8
17
42
22
20
null
null
josuf107/Adverb
Adverb/Common.hs
gpl-3.0
ponderingly = id
16
ponderingly = id
16
ponderingly = id
16
false
false
0
4
2
6
3
3
null
null
pxqr/intset
src/Data/IntervalSet/Internal.hs
bsd-3-clause
binI :: Prefix -> Mask -> IntSet -> IntSet -> IntSet -- DONE convert full Tip to Fin, then we can avoid this pattern matching --binI _ _ (Tip p1 bm1) (Tip p2 bm2) -- | isFull bm1 && isFull bm2 && xor p1 p2 == WORD_SIZE_IN_BITS -- = Fin p1 128 binI p m (Fin _ m1) (Fin _ m2) | m1 == m && m2 == m -- TODO can we sim...
361
binI :: Prefix -> Mask -> IntSet -> IntSet -> IntSet binI p m (Fin _ m1) (Fin _ m2) | m1 == m && m2 == m -- TODO can we simplify this? | m1 == m2 = Fin p (m * 2)
168
binI p m (Fin _ m1) (Fin _ m2) | m1 == m && m2 == m -- TODO can we simplify this? | m1 == m2 = Fin p (m * 2)
115
true
true
0
10
94
91
46
45
null
null
transient-haskell/transient-universe
src/Transient/Move/Services.hs
mit
ndStatusToMonitor status= loggedc $ do local $ onException $ \(e:: ConnectionError) -> continue >> startMonitor -- !> ("EXCEPTIOOOOOOOOOOON",e) nod <- local getMyNode callService' monitorNode (nodePort nod, status) -- <|> return() #else sendStatusToMonitor status= local $ return () ...
389
sendStatusToMonitor status= loggedc $ do local $ onException $ \(e:: ConnectionError) -> continue >> startMonitor -- !> ("EXCEPTIOOOOOOOOOOON",e) nod <- local getMyNode callService' monitorNode (nodePort nod, status) -- <|> return() #else sendStatusToMonitor status= local $ return () ...
389
sendStatusToMonitor status= loggedc $ do local $ onException $ \(e:: ConnectionError) -> continue >> startMonitor -- !> ("EXCEPTIOOOOOOOOOOON",e) nod <- local getMyNode callService' monitorNode (nodePort nod, status) -- <|> return() #else sendStatusToMonitor status= local $ return () ...
389
false
false
0
11
84
71
36
35
null
null
marcelosousa/poet
src/Exploration/SUNF/API.hs
gpl-2.0
inc_evs_per_name :: EventName -> UnfolderOp () inc_evs_per_name name = do s@UnfolderState{..} <- get let info = nr_evs_per_name stats n_evs_per_name = case MA.lookup name info of Nothing -> MA.insert name 1 info Just n -> MA.insert name (n+1) info stats' = stats { nr_e...
464
inc_evs_per_name :: EventName -> UnfolderOp () inc_evs_per_name name = do s@UnfolderState{..} <- get let info = nr_evs_per_name stats n_evs_per_name = case MA.lookup name info of Nothing -> MA.insert name 1 info Just n -> MA.insert name (n+1) info stats' = stats { nr_e...
464
inc_evs_per_name name = do s@UnfolderState{..} <- get let info = nr_evs_per_name stats n_evs_per_name = case MA.lookup name info of Nothing -> MA.insert name 1 info Just n -> MA.insert name (n+1) info stats' = stats { nr_evs_per_name = n_evs_per_name } put s{ stats =...
417
false
true
0
15
124
136
68
68
null
null
purebred-mua/purebred
src/Purebred/Config.hs
agpl-3.0
helpKeybindingAttr :: A.AttrName helpKeybindingAttr = helpAttr <> "keybinding"
78
helpKeybindingAttr :: A.AttrName helpKeybindingAttr = helpAttr <> "keybinding"
78
helpKeybindingAttr = helpAttr <> "keybinding"
45
false
true
0
5
7
17
9
8
null
null
kaisellgren/ankka
Examples/Example.hs
mit
adjustWindow :: Demo () adjustWindow = do state <- get let width = stateWindowWidth state height = stateWindowHeight state zDist = stateZDist state let pos = GL.Position 0 0 size = GL.Size (fromIntegral width) (fromIntegral height) h = fromIntegral height / ...
1,013
adjustWindow :: Demo () adjustWindow = do state <- get let width = stateWindowWidth state height = stateWindowHeight state zDist = stateZDist state let pos = GL.Position 0 0 size = GL.Size (fromIntegral width) (fromIntegral height) h = fromIntegral height / ...
1,013
adjustWindow = do state <- get let width = stateWindowWidth state height = stateWindowHeight state zDist = stateZDist state let pos = GL.Position 0 0 size = GL.Size (fromIntegral width) (fromIntegral height) h = fromIntegral height / fromIntegral width :: Do...
989
false
true
0
15
384
315
154
161
null
null
scslab/iterIO
Examples/reliable/NetSim.hs
bsd-3-clause
leqtime :: ClockTime -> ClockTime -> Bool leqtime (TOD as aps) (TOD bs bps) = as < bs || as == bs && aps <= bps
115
leqtime :: ClockTime -> ClockTime -> Bool leqtime (TOD as aps) (TOD bs bps) = as < bs || as == bs && aps <= bps
115
leqtime (TOD as aps) (TOD bs bps) = as < bs || as == bs && aps <= bps
73
false
true
0
9
29
60
30
30
null
null
quickdudley/phaser
Codec/Phaser/Common.hs
bsd-3-clause
countChar = count (Position 0 1)
32
countChar = count (Position 0 1)
32
countChar = count (Position 0 1)
32
false
false
1
6
5
20
8
12
null
null
rfranek/duckling
Duckling/Time/DA/Rules.hs
bsd-3-clause
ruleAfterTimeofday :: Rule ruleAfterTimeofday = Rule { name = "after <time-of-day>" , pattern = [ regex "(engang )?efter" , dimension Time ] , prod = \tokens -> case tokens of (_:Token Time td:_) -> tt $ withDirection TTime.After td _ -> Nothing }
287
ruleAfterTimeofday :: Rule ruleAfterTimeofday = Rule { name = "after <time-of-day>" , pattern = [ regex "(engang )?efter" , dimension Time ] , prod = \tokens -> case tokens of (_:Token Time td:_) -> tt $ withDirection TTime.After td _ -> Nothing }
287
ruleAfterTimeofday = Rule { name = "after <time-of-day>" , pattern = [ regex "(engang )?efter" , dimension Time ] , prod = \tokens -> case tokens of (_:Token Time td:_) -> tt $ withDirection TTime.After td _ -> Nothing }
260
false
true
0
15
82
101
51
50
null
null
d0kt0r0/Tidal
src/Sound/Tidal/old/Parse.hs
gpl-3.0
symbol :: String -> Parser String symbol = P.symbol lexer
58
symbol :: String -> Parser String symbol = P.symbol lexer
58
symbol = P.symbol lexer
24
false
true
0
6
10
23
11
12
null
null
bennofs/ghc-server
src/Server/Main.hs
bsd-3-clause
handleRequest (Multiple rs) | null rs = return $ Right Success | otherwise = fmap last . sequence <$> mapM handleRequest rs
127
handleRequest (Multiple rs) | null rs = return $ Right Success | otherwise = fmap last . sequence <$> mapM handleRequest rs
127
handleRequest (Multiple rs) | null rs = return $ Right Success | otherwise = fmap last . sequence <$> mapM handleRequest rs
127
false
false
2
8
25
58
24
34
null
null
pqwy/google-web-apis
Web/Google/GCal.hs
bsd-3-clause
qFields flds = [("fields", Just flds)]
38
qFields flds = [("fields", Just flds)]
38
qFields flds = [("fields", Just flds)]
38
false
false
0
7
5
21
11
10
null
null
CloudI/CloudI
src/api/haskell/external/binary-0.8.7.0/src/Data/Binary/Get/Internal.hs
mit
pushFront :: B.ByteString -> Get () pushFront bs = C $ \ inp ks -> ks (B.append bs inp) ()
90
pushFront :: B.ByteString -> Get () pushFront bs = C $ \ inp ks -> ks (B.append bs inp) ()
90
pushFront bs = C $ \ inp ks -> ks (B.append bs inp) ()
54
false
true
2
8
19
59
27
32
null
null
jmikkola/Athena
src/test-FirstPass.hs
mit
tests = [ test "empty fn body" testCheckReturns1 , test "unreachable statement" testCheckReturns2 , test "building struct constructor" testBuildStructConstructor , test "building enum constructor" testBuildEnumConstructor ]
233
tests = [ test "empty fn body" testCheckReturns1 , test "unreachable statement" testCheckReturns2 , test "building struct constructor" testBuildStructConstructor , test "building enum constructor" testBuildEnumConstructor ]
233
tests = [ test "empty fn body" testCheckReturns1 , test "unreachable statement" testCheckReturns2 , test "building struct constructor" testBuildStructConstructor , test "building enum constructor" testBuildEnumConstructor ]
233
false
false
1
7
35
42
19
23
null
null
epsilonhalbe/rendezvous
src/Handler/Dashboard.hs
mit
rdv1 :: Html rdv1 = div ! class_ "panel panel-default panel-primary" $ do div ! class_ "panel-heading" $ a ! dataToggle "collapse" ! href "#collapseOne" $ h3 ! class_ "panel-title" $ do toMarkup PENDING text " " ...
1,643
rdv1 :: Html rdv1 = div ! class_ "panel panel-default panel-primary" $ do div ! class_ "panel-heading" $ a ! dataToggle "collapse" ! href "#collapseOne" $ h3 ! class_ "panel-title" $ do toMarkup PENDING text " " ...
1,643
rdv1 = div ! class_ "panel panel-default panel-primary" $ do div ! class_ "panel-heading" $ a ! dataToggle "collapse" ! href "#collapseOne" $ h3 ! class_ "panel-title" $ do toMarkup PENDING text " " ...
1,630
false
true
0
16
793
353
146
207
null
null
sgillespie/ghc
compiler/basicTypes/Module.hs
bsd-3-clause
stringToUnitId :: String -> UnitId stringToUnitId = fsToUnitId . mkFastString
77
stringToUnitId :: String -> UnitId stringToUnitId = fsToUnitId . mkFastString
77
stringToUnitId = fsToUnitId . mkFastString
42
false
true
0
5
9
19
10
9
null
null
forked-upstream-packages-for-ghcjs/ghc
compiler/deSugar/Check.hs
bsd-3-clause
construct_matrix :: Pat Id -> [(EqnNo, EquationInfo)] -> ([ExhaustivePat],EqnSet) construct_matrix con qs = (map (make_con con) pats,indexs) where (pats,indexs) = (check' (remove_first_column con qs)) {- Here remove first column is more difficult that with literals due to the fact that constructors can have ...
482
construct_matrix :: Pat Id -> [(EqnNo, EquationInfo)] -> ([ExhaustivePat],EqnSet) construct_matrix con qs = (map (make_con con) pats,indexs) where (pats,indexs) = (check' (remove_first_column con qs)) {- Here remove first column is more difficult that with literals due to the fact that constructors can have ...
482
construct_matrix con qs = (map (make_con con) pats,indexs) where (pats,indexs) = (check' (remove_first_column con qs)) {- Here remove first column is more difficult that with literals due to the fact that constructors can have arguments. For instance, the matrix \begin{verbatim} (: x xs) y z y \end...
400
false
true
0
9
91
97
51
46
null
null
ryzhyk/cocoon
cocoon/Parse.hs
apache-2.0
sassume = SAssume nopos <$ reserved "assume" <*> expr
53
sassume = SAssume nopos <$ reserved "assume" <*> expr
53
sassume = SAssume nopos <$ reserved "assume" <*> expr
53
false
false
1
7
8
24
9
15
null
null
apyrgio/snf-ganeti
src/Ganeti/Constants.hs
bsd-2-clause
-- * Monitoring daemon -- | Mond's variable for periodical data collection mondTimeInterval :: Int mondTimeInterval = 5
120
mondTimeInterval :: Int mondTimeInterval = 5
44
mondTimeInterval = 5
20
true
true
0
4
18
13
8
5
null
null
psibi/yesod
yesod-form/Yesod/Form/I18n/German.hs
mit
germanFormMessage (MsgInvalidNumber t) = "Ungültige Zahl: " `mappend` t
71
germanFormMessage (MsgInvalidNumber t) = "Ungültige Zahl: " `mappend` t
71
germanFormMessage (MsgInvalidNumber t) = "Ungültige Zahl: " `mappend` t
71
false
false
0
6
8
22
11
11
null
null
olsner/ghc
compiler/basicTypes/DataCon.hs
bsd-3-clause
isBanged (HsStrict {}) = True
29
isBanged (HsStrict {}) = True
29
isBanged (HsStrict {}) = True
29
false
false
0
7
4
16
8
8
null
null
ekmett/ghc
utils/genprimopcode/Main.hs
bsd-3-clause
ppType (TyApp (TyCon "TVar#") [x,y]) = "mkTVarPrimTy " ++ ppType x ++ " " ++ ppType y
133
ppType (TyApp (TyCon "TVar#") [x,y]) = "mkTVarPrimTy " ++ ppType x ++ " " ++ ppType y
133
ppType (TyApp (TyCon "TVar#") [x,y]) = "mkTVarPrimTy " ++ ppType x ++ " " ++ ppType y
133
false
false
0
8
64
48
23
25
null
null
Frefreak/Gideon
src/SDEDrill.hs
bsd-3-clause
genNPCCorpTradeList :: CorpIDType -> IO () genNPCCorpTradeList corpID = do fp <- (</>) ("NPCCorpTradeList-" ++ showSci corpID ++ ".txt") <$> sdeExtractionPath tls <- getNPCCorpTradeList corpID saveListToFile fp tls
238
genNPCCorpTradeList :: CorpIDType -> IO () genNPCCorpTradeList corpID = do fp <- (</>) ("NPCCorpTradeList-" ++ showSci corpID ++ ".txt") <$> sdeExtractionPath tls <- getNPCCorpTradeList corpID saveListToFile fp tls
238
genNPCCorpTradeList corpID = do fp <- (</>) ("NPCCorpTradeList-" ++ showSci corpID ++ ".txt") <$> sdeExtractionPath tls <- getNPCCorpTradeList corpID saveListToFile fp tls
195
false
true
0
13
51
71
33
38
null
null
mattrrichard/darwin
src/PolygonImage.hs
bsd-3-clause
genPolygonImage :: Int -> Image PixelRGBA8 -> RVar PolygonImage genPolygonImage polygonCount sourceImg@(Image w h _) = PolygonImage sourceImg <$> replicateM polygonCount (genPolygon w h)
188
genPolygonImage :: Int -> Image PixelRGBA8 -> RVar PolygonImage genPolygonImage polygonCount sourceImg@(Image w h _) = PolygonImage sourceImg <$> replicateM polygonCount (genPolygon w h)
188
genPolygonImage polygonCount sourceImg@(Image w h _) = PolygonImage sourceImg <$> replicateM polygonCount (genPolygon w h)
124
false
true
0
8
25
63
30
33
null
null
jaiyalas/sdl2-image
src/SDL/Image/Raw/Loading.hs
mit
-- imgLoadRW :: MonadIO m => Ptr RowType.RWops -> Bool -> m (Ptr RowType.Surface) imgLoadRW p autoFree = liftIO $ imgLoadRW_FFI p (fromBool autoFree)
172
imgLoadRW :: MonadIO m => Ptr RowType.RWops -> Bool -> m (Ptr RowType.Surface) imgLoadRW p autoFree = liftIO $ imgLoadRW_FFI p (fromBool autoFree)
169
imgLoadRW p autoFree = liftIO $ imgLoadRW_FFI p (fromBool autoFree)
70
true
true
0
11
46
63
30
33
null
null
rwbarton/rw
Crawl/Explore.hs
bsd-3-clause
kill :: LevelInfo -> Coord -> Player -> Maybe Move kill info loc _player = case pathfind (HS.fromList $ H.keys $ H.filter isFoe (_levelMonsters info)) info loc False of Just [loc'] -> Just (attackTo loc loc') Just (loc' : _) -> Just (moveTo loc loc') _ -> Nothing where isFoe ty = _monsterAttitude ty == ATT_HOST...
605
kill :: LevelInfo -> Coord -> Player -> Maybe Move kill info loc _player = case pathfind (HS.fromList $ H.keys $ H.filter isFoe (_levelMonsters info)) info loc False of Just [loc'] -> Just (attackTo loc loc') Just (loc' : _) -> Just (moveTo loc loc') _ -> Nothing where isFoe ty = _monsterAttitude ty == ATT_HOST...
605
kill info loc _player = case pathfind (HS.fromList $ H.keys $ H.filter isFoe (_levelMonsters info)) info loc False of Just [loc'] -> Just (attackTo loc loc') Just (loc' : _) -> Just (moveTo loc loc') _ -> Nothing where isFoe ty = _monsterAttitude ty == ATT_HOSTILE && isRealMonster ty isRealMonster ty = ...
554
false
true
1
11
165
215
101
114
null
null
Mathnerd314/atomo
src/Atomo/Method.hs
bsd-3-clause
toMethods :: [(Message Pattern, Value)] -> MethodMap toMethods = foldl (\ss (p, v) -> addMethod (Slot p v) ss) emptyMap
119
toMethods :: [(Message Pattern, Value)] -> MethodMap toMethods = foldl (\ss (p, v) -> addMethod (Slot p v) ss) emptyMap
119
toMethods = foldl (\ss (p, v) -> addMethod (Slot p v) ss) emptyMap
66
false
true
0
10
19
61
33
28
null
null
danieldietrich/llrbtree
bench/insert/Bench.hs
bsd-3-clause
seed :: Int seed = 54321
24
seed :: Int seed = 54321
24
seed = 54321
12
false
true
0
4
5
11
6
5
null
null
sourcegraph/srclib-haskell
src/Haddock.hs
mit
sgReferences ∷ H.SymGraph → [(H.FileLoc,(Either Bind H.GlobalBinding))] sgReferences gr = map f $ H.sgReferences gr where f (loc,Left l) = (loc,Left $ mkBind l) f (loc,Right r) = (loc,Right r) isExported l = not $ L.null $ flip L.filter (H.sgExports gr) $ theSame l theSame (H.Local _ uniq1 _ _...
498
sgReferences ∷ H.SymGraph → [(H.FileLoc,(Either Bind H.GlobalBinding))] sgReferences gr = map f $ H.sgReferences gr where f (loc,Left l) = (loc,Left $ mkBind l) f (loc,Right r) = (loc,Right r) isExported l = not $ L.null $ flip L.filter (H.sgExports gr) $ theSame l theSame (H.Local _ uniq1 _ _...
498
sgReferences gr = map f $ H.sgReferences gr where f (loc,Left l) = (loc,Left $ mkBind l) f (loc,Right r) = (loc,Right r) isExported l = not $ L.null $ flip L.filter (H.sgExports gr) $ theSame l theSame (H.Local _ uniq1 _ _) (H.Local _ uniq2 _ _) = uniq1 ≡ uniq2 mkBind ∷ H.LocalBinding ...
426
false
true
7
12
130
257
129
128
null
null
bitemyapp/blacktip
src/Database/Blacktip.hs
apache-2.0
initWriter :: FPC.FilePath -> IO () initWriter path = do ms <- getUnixMillis stateTime <- readTimestamp path _ <- when (ms <= stateTime) (arrowOfTimeError ms stateTime) _ <- MV.putMVar serverState (ServerState ms 0) _ <- writeTimestamp serverState path return ()
277
initWriter :: FPC.FilePath -> IO () initWriter path = do ms <- getUnixMillis stateTime <- readTimestamp path _ <- when (ms <= stateTime) (arrowOfTimeError ms stateTime) _ <- MV.putMVar serverState (ServerState ms 0) _ <- writeTimestamp serverState path return ()
277
initWriter path = do ms <- getUnixMillis stateTime <- readTimestamp path _ <- when (ms <= stateTime) (arrowOfTimeError ms stateTime) _ <- MV.putMVar serverState (ServerState ms 0) _ <- writeTimestamp serverState path return ()
241
false
true
0
10
54
111
50
61
null
null
werbitt/ip-to-file
src/Iptf/Hosts/Internal.hs
mit
remove :: Hostname -> Hosts -> Hosts remove n (Hosts hs) = Hosts $ Map.mapMaybe prune hs where prune ns = maybeSet $ S.delete n ns maybeSet s = if S.null s then Nothing else Just s
191
remove :: Hostname -> Hosts -> Hosts remove n (Hosts hs) = Hosts $ Map.mapMaybe prune hs where prune ns = maybeSet $ S.delete n ns maybeSet s = if S.null s then Nothing else Just s
191
remove n (Hosts hs) = Hosts $ Map.mapMaybe prune hs where prune ns = maybeSet $ S.delete n ns maybeSet s = if S.null s then Nothing else Just s
154
false
true
0
7
47
87
42
45
null
null
PuZZleDucK/Hls
Hls.hs
gpl-3.0
getFileTypes :: FileStatus -> IO [Maybe FileType] getFileTypes status = do return [ if (isNamedPipe status) then Just FifoType else Nothing , if (isCharacterDevice status) then Just CharDevType else Nothing , if (isD...
810
getFileTypes :: FileStatus -> IO [Maybe FileType] getFileTypes status = do return [ if (isNamedPipe status) then Just FifoType else Nothing , if (isCharacterDevice status) then Just CharDevType else Nothing , if (isD...
810
getFileTypes status = do return [ if (isNamedPipe status) then Just FifoType else Nothing , if (isCharacterDevice status) then Just CharDevType else Nothing , if (isDirectory status) then Just DirectoryType else Noth...
760
false
true
0
12
364
178
93
85
null
null
osa1/Idris-dev
src/Idris/WhoCalls.hs
bsd-3-clause
namesDef (TyDecl _ ty) = names ty
33
namesDef (TyDecl _ ty) = names ty
33
namesDef (TyDecl _ ty) = names ty
33
false
false
0
7
6
20
9
11
null
null
frontrowed/stratosphere
library-gen/Stratosphere/Resources/CloudFormationStack.hs
mit
cloudFormationStack :: Val Text -- ^ 'cfsTemplateURL' -> CloudFormationStack cloudFormationStack templateURLarg = CloudFormationStack { _cloudFormationStackNotificationARNs = Nothing , _cloudFormationStackParameters = Nothing , _cloudFormationStackTags = Nothing , _cloudFormationStackTemplateURL = templat...
382
cloudFormationStack :: Val Text -- ^ 'cfsTemplateURL' -> CloudFormationStack cloudFormationStack templateURLarg = CloudFormationStack { _cloudFormationStackNotificationARNs = Nothing , _cloudFormationStackParameters = Nothing , _cloudFormationStackTags = Nothing , _cloudFormationStackTemplateURL = templat...
382
cloudFormationStack templateURLarg = CloudFormationStack { _cloudFormationStackNotificationARNs = Nothing , _cloudFormationStackParameters = Nothing , _cloudFormationStackTags = Nothing , _cloudFormationStackTemplateURL = templateURLarg , _cloudFormationStackTimeoutInMinutes = Nothing }
301
false
true
0
7
51
63
34
29
null
null
frontrowed/stratosphere
library-gen/Stratosphere/Resources/SESConfigurationSet.hs
mit
sesConfigurationSet :: SESConfigurationSet sesConfigurationSet = SESConfigurationSet { _sESConfigurationSetName = Nothing }
132
sesConfigurationSet :: SESConfigurationSet sesConfigurationSet = SESConfigurationSet { _sESConfigurationSetName = Nothing }
132
sesConfigurationSet = SESConfigurationSet { _sESConfigurationSetName = Nothing }
87
false
true
0
6
19
28
13
15
null
null
infotroph/pandoc
src/Text/Pandoc/Writers/OpenDocument.hs
gpl-2.0
tableRowToOpenDocument :: WriterOptions -> String -> [String] -> [[Block]] -> State WriterState Doc tableRowToOpenDocument o tn ns cs = inTagsIndented "table:table-row" . vcat <$> mapM (tableItemToOpenDocument o tn) (zip ns cs)
235
tableRowToOpenDocument :: WriterOptions -> String -> [String] -> [[Block]] -> State WriterState Doc tableRowToOpenDocument o tn ns cs = inTagsIndented "table:table-row" . vcat <$> mapM (tableItemToOpenDocument o tn) (zip ns cs)
235
tableRowToOpenDocument o tn ns cs = inTagsIndented "table:table-row" . vcat <$> mapM (tableItemToOpenDocument o tn) (zip ns cs)
135
false
true
0
10
38
88
42
46
null
null
corngood/cabal
Cabal/Distribution/Simple/SrcDist.hs
bsd-3-clause
filterAutogenModule :: PackageDescription -> PackageDescription filterAutogenModule pkg_descr0 = mapLib filterAutogenModuleLib $ mapAllBuildInfo filterAutogenModuleBI pkg_descr0 where mapLib f pkg = pkg { library = fmap f (library pkg) } filterAutogenModuleLib lib = lib { ...
778
filterAutogenModule :: PackageDescription -> PackageDescription filterAutogenModule pkg_descr0 = mapLib filterAutogenModuleLib $ mapAllBuildInfo filterAutogenModuleBI pkg_descr0 where mapLib f pkg = pkg { library = fmap f (library pkg) } filterAutogenModuleLib lib = lib { ...
778
filterAutogenModule pkg_descr0 = mapLib filterAutogenModuleLib $ mapAllBuildInfo filterAutogenModuleBI pkg_descr0 where mapLib f pkg = pkg { library = fmap f (library pkg) } filterAutogenModuleLib lib = lib { exposedModules = filter (/=autogenModule) (exposedModules lib)...
714
false
true
3
10
166
136
72
64
null
null
GaloisInc/halvm-ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
-- List functions concatName, filterName, zipName :: Name concatName = varQual gHC_LIST (fsLit "concat") concatIdKey
123
concatName, filterName, zipName :: Name concatName = varQual gHC_LIST (fsLit "concat") concatIdKey
105
concatName = varQual gHC_LIST (fsLit "concat") concatIdKey
65
true
true
4
7
21
40
17
23
null
null
robrix/surface
src/REPL.hs
bsd-3-clause
plain :: String plain = "\ESC[0m\STX"
37
plain :: String plain = "\ESC[0m\STX"
37
plain = "\ESC[0m\STX"
21
false
true
0
4
5
11
6
5
null
null
ahodgen/archer-calc
src/Optimize.hs
bsd-2-clause
foldOp _ Lt (CGText a) (CGText b) = CGBool (a < b)
51
foldOp _ Lt (CGText a) (CGText b) = CGBool (a < b)
51
foldOp _ Lt (CGText a) (CGText b) = CGBool (a < b)
51
false
false
2
7
12
39
18
21
null
null
Min-/fourseq
src/utils/Translate.hs
bsd-3-clause
lastUC r = T.last r == 'U' || T.last r == 'C'
45
lastUC r = T.last r == 'U' || T.last r == 'C'
45
lastUC r = T.last r == 'U' || T.last r == 'C'
45
false
false
0
9
11
31
14
17
null
null
mrehayden1/lji
src/LJI/Music/Composer.hs
bsd-3-clause
rootProgression = fmap ((,) <$> chdRoot <*> chdDur) . chrtStaff
63
rootProgression = fmap ((,) <$> chdRoot <*> chdDur) . chrtStaff
63
rootProgression = fmap ((,) <$> chdRoot <*> chdDur) . chrtStaff
63
false
false
0
10
9
27
14
13
null
null
bergmark/clay
src/Clay/Text.hs
bsd-3-clause
closeQuote = Content "close-quote"
36
closeQuote = Content "close-quote"
36
closeQuote = Content "close-quote"
36
false
false
0
5
5
9
4
5
null
null
mgrebenets/hackerrank
alg/warmup/sherlock-and-squares.hs
mit
intSqrt x = (floor . sqrt) (fromIntegral x :: Double)
53
intSqrt x = (floor . sqrt) (fromIntegral x :: Double)
53
intSqrt x = (floor . sqrt) (fromIntegral x :: Double)
53
false
false
0
7
9
28
14
14
null
null
ghc-android/ghc
compiler/hsSyn/HsUtils.hs
bsd-3-clause
coToHsWrapper :: TcCoercion -> HsWrapper -- A Nominal coercion coToHsWrapper co | isTcReflCo co = idHsWrapper | otherwise = mkWpCast (mkTcSubCo co)
170
coToHsWrapper :: TcCoercion -> HsWrapper coToHsWrapper co | isTcReflCo co = idHsWrapper | otherwise = mkWpCast (mkTcSubCo co)
146
coToHsWrapper co | isTcReflCo co = idHsWrapper | otherwise = mkWpCast (mkTcSubCo co)
105
true
true
1
8
44
49
22
27
null
null
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/SLASH_1.hs
mit
primPlusNat Zero (Succ y) = Succ y
34
primPlusNat Zero (Succ y) = Succ y
34
primPlusNat Zero (Succ y) = Succ y
34
false
false
0
6
6
22
9
13
null
null
keithshep/txt-sushi
Database/TxtSushi/SQLExecution.hs
bsd-3-clause
allIdentifiers (ColumnExpression col _) = [col]
47
allIdentifiers (ColumnExpression col _) = [col]
47
allIdentifiers (ColumnExpression col _) = [col]
47
false
false
0
7
5
20
10
10
null
null
poiuj/pfcc
src/Codegen.hs
bsd-3-clause
binOp Syntax.Minus = sub
24
binOp Syntax.Minus = sub
24
binOp Syntax.Minus = sub
24
false
false
1
5
3
15
5
10
null
null
rueshyna/gogol
gogol-drive/gen/Network/Google/Drive/Types.hs
mpl-2.0
-- | View the files in your Google Drive driveReadOnlyScope :: Proxy '["https://www.googleapis.com/auth/drive.readonly"] driveReadOnlyScope = Proxy
147
driveReadOnlyScope :: Proxy '["https://www.googleapis.com/auth/drive.readonly"] driveReadOnlyScope = Proxy
106
driveReadOnlyScope = Proxy
26
true
true
0
8
15
26
12
14
null
null
ComputationWithBoundedResources/tct-inttrs
src/Tct/IntTrs.hs
bsd-3-clause
mul = iop Mul
13
mul = iop Mul
13
mul = iop Mul
13
false
false
0
5
3
9
4
5
null
null
jgoerzen/hslogger
src/System/Log/Handler/Simple.hs
bsd-3-clause
streamHandler :: Handle -> Priority -> IO (GenericHandler Handle) streamHandler h pri = do lock <- newMVar () let mywritefunc hdl msg = msg `deepseq` withMVar lock (\_ -> do writeToHandle hdl msg hFlush hdl ) ...
1,425
streamHandler :: Handle -> Priority -> IO (GenericHandler Handle) streamHandler h pri = do lock <- newMVar () let mywritefunc hdl msg = msg `deepseq` withMVar lock (\_ -> do writeToHandle hdl msg hFlush hdl ) ...
1,425
streamHandler h pri = do lock <- newMVar () let mywritefunc hdl msg = msg `deepseq` withMVar lock (\_ -> do writeToHandle hdl msg hFlush hdl ) return (GenericHandler {priority = pri, ...
1,359
false
true
0
16
614
325
159
166
null
null
tjakway/ghcjvm
compiler/basicTypes/RdrName.hs
bsd-3-clause
greOccName gre = nameOccName (gre_name gre)
86
greOccName gre = nameOccName (gre_name gre)
86
greOccName gre = nameOccName (gre_name gre)
86
false
false
0
7
48
18
8
10
null
null
diku-dk/futhark
src/Futhark/Internalise/Monomorphise.hs
isc
substPat :: Bool -> (PatType -> PatType) -> Pat -> Pat substPat entry f pat = case pat of TuplePat pats loc -> TuplePat (map (substPat entry f) pats) loc RecordPat fs loc -> RecordPat (map substField fs) loc where substField (n, p) = (n, substPat entry f p) PatParens p loc -> PatParens (substPat entry f...
735
substPat :: Bool -> (PatType -> PatType) -> Pat -> Pat substPat entry f pat = case pat of TuplePat pats loc -> TuplePat (map (substPat entry f) pats) loc RecordPat fs loc -> RecordPat (map substField fs) loc where substField (n, p) = (n, substPat entry f p) PatParens p loc -> PatParens (substPat entry f...
735
substPat entry f pat = case pat of TuplePat pats loc -> TuplePat (map (substPat entry f) pats) loc RecordPat fs loc -> RecordPat (map substField fs) loc where substField (n, p) = (n, substPat entry f p) PatParens p loc -> PatParens (substPat entry f p) loc PatAttr attr p loc -> PatAttr attr (substPat ...
680
false
true
19
11
179
363
173
190
null
null
mdorman/couch-simple
src/lib/Database/Couch/Explicit/Database.hs
mit
revsDiff :: (FromJSON a, MonadIO m) => DocRevMap -- ^ A 'Database.Couch.Types.DocRevMap' of documents and versions available -> Context -> m (Result a) revsDiff docRevs = standardRequest request where request = do docRevBase docRevs addPath "_revs_diff" {- | <http://docs....
580
revsDiff :: (FromJSON a, MonadIO m) => DocRevMap -- ^ A 'Database.Couch.Types.DocRevMap' of documents and versions available -> Context -> m (Result a) revsDiff docRevs = standardRequest request where request = do docRevBase docRevs addPath "_revs_diff" {- | <http://docs....
580
revsDiff docRevs = standardRequest request where request = do docRevBase docRevs addPath "_revs_diff" {- | <http://docs.couchdb.org/en/1.6.1/api/database/misc.html#get--db-_revs_limit Get the revision limit setting> The return value is a JSON numeric value that can easily be decoded to an 'Int': ...
401
false
true
0
10
121
71
34
37
null
null
guilt/webify
src/TTF.hs
mit
glyphId CmapFormat6{c6GlyphIds = glyphIds, c6FirstCode = firstCode, c6EntryCount = entryCount } n | n >= start && n < end = fromIntegral $ glyphIds !! (n - start) | otherwise = 0 where start = fromIntegral firstCode ...
359
glyphId CmapFormat6{c6GlyphIds = glyphIds, c6FirstCode = firstCode, c6EntryCount = entryCount } n | n >= start && n < end = fromIntegral $ glyphIds !! (n - start) | otherwise = 0 where start = fromIntegral firstCode ...
359
glyphId CmapFormat6{c6GlyphIds = glyphIds, c6FirstCode = firstCode, c6EntryCount = entryCount } n | n >= start && n < end = fromIntegral $ glyphIds !! (n - start) | otherwise = 0 where start = fromIntegral firstCode ...
359
false
false
1
10
148
98
49
49
null
null
DavidAlphaFox/ghc
libraries/Cabal/Cabal/Distribution/PackageDescription/Parse.hs
bsd-3-clause
modify :: Monad m => (s -> s) -> StT s m () modify f = StT $ \s -> return ((),f s)
82
modify :: Monad m => (s -> s) -> StT s m () modify f = StT $ \s -> return ((),f s)
82
modify f = StT $ \s -> return ((),f s)
38
false
true
0
9
22
64
32
32
null
null
brendanhay/gogol
gogol-ml/gen/Network/Google/Resource/Ml/Projects/Jobs/Patch.hs
mpl-2.0
-- | JSONP pjpCallback :: Lens' ProjectsJobsPatch (Maybe Text) pjpCallback = lens _pjpCallback (\ s a -> s{_pjpCallback = a})
127
pjpCallback :: Lens' ProjectsJobsPatch (Maybe Text) pjpCallback = lens _pjpCallback (\ s a -> s{_pjpCallback = a})
116
pjpCallback = lens _pjpCallback (\ s a -> s{_pjpCallback = a})
64
true
true
0
9
21
48
25
23
null
null
mstksg/hledger
hledger/Hledger/Cli/Utils.hs
gpl-3.0
-- | Back up this file with a (incrementing) numbered suffix, or give an error. backUpFile :: FilePath -> IO () backUpFile fp = do fs <- safeGetDirectoryContents $ takeDirectory $ fp let (d,f) = splitFileName fp versions = catMaybes $ map (f `backupNumber`) fs next = maximum (0:versions) + 1 f' = ...
366
backUpFile :: FilePath -> IO () backUpFile fp = do fs <- safeGetDirectoryContents $ takeDirectory $ fp let (d,f) = splitFileName fp versions = catMaybes $ map (f `backupNumber`) fs next = maximum (0:versions) + 1 f' = printf "%s.%d" f next copyFile fp (d </> f')
286
backUpFile fp = do fs <- safeGetDirectoryContents $ takeDirectory $ fp let (d,f) = splitFileName fp versions = catMaybes $ map (f `backupNumber`) fs next = maximum (0:versions) + 1 f' = printf "%s.%d" f next copyFile fp (d </> f')
254
true
true
0
13
85
124
63
61
null
null
brendanhay/gogol
gogol-servicemanagement/gen/Network/Google/ServiceManagement/Types/Product.hs
mpl-2.0
-- | Creates a value of 'TestIAMPermissionsResponse' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'tiamprPermissions' testIAMPermissionsResponse :: TestIAMPermissionsResponse testIAMPermissionsResponse = TestIAMPermissionsResp...
356
testIAMPermissionsResponse :: TestIAMPermissionsResponse testIAMPermissionsResponse = TestIAMPermissionsResponse' {_tiamprPermissions = Nothing}
150
testIAMPermissionsResponse = TestIAMPermissionsResponse' {_tiamprPermissions = Nothing}
89
true
true
1
7
48
28
16
12
null
null
technogeeky/d-A
include/containers-0.5.0.0/Data/Set/Base.hs
gpl-3.0
-- According to benchmarks, this special case increases -- performance up to 30%. It does not help in difference or intersection. hedgeUnion blo bhi (Bin _ x l r) t2 = join x (hedgeUnion blo bmi l (trim blo bmi t2)) (...
413
hedgeUnion blo bhi (Bin _ x l r) t2 = join x (hedgeUnion blo bmi l (trim blo bmi t2)) (hedgeUnion bmi bhi r (trim bmi bhi t2)) where bmi = JustS x #if __GLASGOW_HASKELL__ >= 700
225
hedgeUnion blo bhi (Bin _ x l r) t2 = join x (hedgeUnion blo bmi l (trim blo bmi t2)) (hedgeUnion bmi bhi r (trim bmi bhi t2)) where bmi = JustS x #if __GLASGOW_HASKELL__ >= 700
225
true
false
0
9
163
92
46
46
null
null
pbrisbin/toml-parse
src/Text/Toml/Query.hs
bsd-3-clause
rootPath :: TomlPath rootPath = TomlPath []
43
rootPath :: TomlPath rootPath = TomlPath []
43
rootPath = TomlPath []
22
false
true
0
6
6
16
8
8
null
null
rueshyna/gogol
gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Students/Get.hs
mpl-2.0
-- | Pretty-print response. csgPp :: Lens' CoursesStudentsGet Bool csgPp = lens _csgPp (\ s a -> s{_csgPp = a})
111
csgPp :: Lens' CoursesStudentsGet Bool csgPp = lens _csgPp (\ s a -> s{_csgPp = a})
83
csgPp = lens _csgPp (\ s a -> s{_csgPp = a})
44
true
true
0
9
19
47
23
24
null
null
ghcjs/jsaddle-dom
src/JSDOM/Generated/URL.hs
mit
-- | <https://developer.mozilla.org/en-US/docs/Web/API/URL Mozilla URL documentation> newURL' :: (MonadDOM m, ToJSString url, ToJSString base) => url -> base -> m URL newURL' url base = liftDOM (URL <$> new (jsg "URL") [toJSVal url, toJSVal base])
268
newURL' :: (MonadDOM m, ToJSString url, ToJSString base) => url -> base -> m URL newURL' url base = liftDOM (URL <$> new (jsg "URL") [toJSVal url, toJSVal base])
181
newURL' url base = liftDOM (URL <$> new (jsg "URL") [toJSVal url, toJSVal base])
82
true
true
0
10
55
82
41
41
null
null
themattchan/tandoori
library/Tandoori/Typing/Infer.hs
bsd-3-clause
inferPat (ListPat lpats _ _) = do (ms, τs) <- unzip <$> mapM inferLPat lpats (m, τ) <- unify ms τs m ⊢ tyList τ
123
inferPat (ListPat lpats _ _) = do (ms, τs) <- unzip <$> mapM inferLPat lpats (m, τ) <- unify ms τs m ⊢ tyList τ
123
inferPat (ListPat lpats _ _) = do (ms, τs) <- unzip <$> mapM inferLPat lpats (m, τ) <- unify ms τs m ⊢ tyList τ
123
false
false
0
9
36
70
33
37
null
null
versusvoid/blaise
src/Parser.hs
mit
identifier = Token.identifier lexer
35
identifier = Token.identifier lexer
35
identifier = Token.identifier lexer
35
false
false
0
6
3
11
5
6
null
null
michaelt/remorse
Remorse/Free.hs
bsd-3-clause
exposed :: (Functor f) => Free f r -> Free f (Either r (f (Free f r))) exposed (Free step ks) = case step of Stop x -> case tviewl ks of TAEmptyL -> Free (Stop (Left x)) blank Kleisli f :< ks' -> exposed (extend ks' (f x)) Step f -> Free (Stop (Right (fmap (extend ks) f))) blank
313
exposed :: (Functor f) => Free f r -> Free f (Either r (f (Free f r))) exposed (Free step ks) = case step of Stop x -> case tviewl ks of TAEmptyL -> Free (Stop (Left x)) blank Kleisli f :< ks' -> exposed (extend ks' (f x)) Step f -> Free (Stop (Right (fmap (extend ks) f))) blank
313
exposed (Free step ks) = case step of Stop x -> case tviewl ks of TAEmptyL -> Free (Stop (Left x)) blank Kleisli f :< ks' -> exposed (extend ks' (f x)) Step f -> Free (Stop (Right (fmap (extend ks) f))) blank
242
false
true
3
13
93
176
85
91
null
null
DougBurke/swish
tests/N3FormatterTest.hs
lgpl-2.1
tx123 = arc b2 p1 o3
20
tx123 = arc b2 p1 o3
20
tx123 = arc b2 p1 o3
20
false
false
1
5
5
16
6
10
null
null
calebmer/postgrest
src/PostgREST/PgQuery.hs
mit
countAllF :: T.Text countAllF = "(SELECT pg_catalog.count(1) FROM (SELECT * FROM " <> sourceSubqueryName <> ") a )"
115
countAllF :: T.Text countAllF = "(SELECT pg_catalog.count(1) FROM (SELECT * FROM " <> sourceSubqueryName <> ") a )"
115
countAllF = "(SELECT pg_catalog.count(1) FROM (SELECT * FROM " <> sourceSubqueryName <> ") a )"
95
false
true
0
6
17
21
11
10
null
null
fferreira/hnh
RemoveVarK.hs
gpl-3.0
removeVarK :: KExp -> TransformM KExp removeVarK k = transformOk "removeVarK" (evalState (procK k) [])
102
removeVarK :: KExp -> TransformM KExp removeVarK k = transformOk "removeVarK" (evalState (procK k) [])
102
removeVarK k = transformOk "removeVarK" (evalState (procK k) [])
64
false
true
0
9
14
42
20
22
null
null
mapinguari/SC_HS_Proxy
src/Proxy/Query/Unit.hs
mit
maxHitPoints ProtossAssimilator = 194
37
maxHitPoints ProtossAssimilator = 194
37
maxHitPoints ProtossAssimilator = 194
37
false
false
0
5
3
9
4
5
null
null
fmapfmapfmap/amazonka
amazonka-opsworks/gen/Network/AWS/OpsWorks/Types/Product.hs
mpl-2.0
-- | The instance ID. tbascInstanceId :: Lens' TimeBasedAutoScalingConfiguration (Maybe Text) tbascInstanceId = lens _tbascInstanceId (\ s a -> s{_tbascInstanceId = a})
168
tbascInstanceId :: Lens' TimeBasedAutoScalingConfiguration (Maybe Text) tbascInstanceId = lens _tbascInstanceId (\ s a -> s{_tbascInstanceId = a})
146
tbascInstanceId = lens _tbascInstanceId (\ s a -> s{_tbascInstanceId = a})
74
true
true
0
9
21
46
25
21
null
null
kazu-yamamoto/wai
warp/Network/Wai/Handler/Warp/Settings.hs
mit
-- | Printing an exception to standard error -- if `defaultShouldDisplayException` returns `True`. -- -- Since: 3.1.0 defaultOnException :: Maybe Request -> SomeException -> IO () defaultOnException _ e = when (defaultShouldDisplayException e) $ TIO.hPutStrLn stderr $ T.pack $ show e
298
defaultOnException :: Maybe Request -> SomeException -> IO () defaultOnException _ e = when (defaultShouldDisplayException e) $ TIO.hPutStrLn stderr $ T.pack $ show e
178
defaultOnException _ e = when (defaultShouldDisplayException e) $ TIO.hPutStrLn stderr $ T.pack $ show e
116
true
true
0
10
54
67
33
34
null
null
mbakke/ganeti
src/Ganeti/Query/Filter.hs
bsd-2-clause
requestedNames namefield (EQFilter fld val) = if namefield == fld then Just [val] else Nothing
104
requestedNames namefield (EQFilter fld val) = if namefield == fld then Just [val] else Nothing
104
requestedNames namefield (EQFilter fld val) = if namefield == fld then Just [val] else Nothing
104
false
false
0
7
24
37
19
18
null
null
rgleichman/glance
app/Types.hs
gpl-3.0
mkEmbedder :: a -> Embedder a mkEmbedder = Embedder empty
57
mkEmbedder :: a -> Embedder a mkEmbedder = Embedder empty
57
mkEmbedder = Embedder empty
27
false
true
0
6
9
21
10
11
null
null
wavewave/EventAnalysis
exe/test.hs
bsd-2-clause
-- | endl = "\n"
17
endl = "\n"
11
endl = "\n"
11
true
false
0
4
5
7
4
3
null
null
inct-www-club/Procon2014
src/solver.hs
mit
afterIndex :: Int -> Way -> Maybe Int afterIndex index way | way == U = if afterU >= 0 then Just afterU else Nothing | way == R = if (mod index fieldWidth) + 1 < fieldWidth then Just $ index + 1 else Nothing | way == D = if afterD < fieldLeng...
628
afterIndex :: Int -> Way -> Maybe Int afterIndex index way | way == U = if afterU >= 0 then Just afterU else Nothing | way == R = if (mod index fieldWidth) + 1 < fieldWidth then Just $ index + 1 else Nothing | way == D = if afterD < fieldLeng...
628
afterIndex index way | way == U = if afterU >= 0 then Just afterU else Nothing | way == R = if (mod index fieldWidth) + 1 < fieldWidth then Just $ index + 1 else Nothing | way == D = if afterD < fieldLength then Just afterD ...
590
false
true
5
10
266
222
105
117
null
null
songpp/pcs-cli
src/Util.hs
apache-2.0
decodeRespBody :: FromJSON b => L.ByteString -> b decodeRespBody cont = case eitherDecode cont of Left err -> error $ "parse response error: \n\t" ++ err Right a -> a
174
decodeRespBody :: FromJSON b => L.ByteString -> b decodeRespBody cont = case eitherDecode cont of Left err -> error $ "parse response error: \n\t" ++ err Right a -> a
174
decodeRespBody cont = case eitherDecode cont of Left err -> error $ "parse response error: \n\t" ++ err Right a -> a
124
false
true
0
9
37
60
28
32
null
null
vulgr/vulgr
src/Graph/Project.hs
bsd-3-clause
-------------------------------------------------------------------------------- -- The label for Project roots. projectLabel :: T.Text projectLabel = "Project"
160
projectLabel :: T.Text projectLabel = "Project"
47
projectLabel = "Project"
24
true
true
0
5
12
15
9
6
null
null
tejon/diagrams-contrib
src/Diagrams/TwoD/Path/LSystem.hs
bsd-3-clause
tree2 :: RealFloat n => Int -> TurtleState n tree2 n = lSystem n (1/18 @@ turn) (symbols "F") tree where tree = M.fromList [rule 'F' "F[+>>>F]F[->>>F][>>>F]"] -- > import Diagrams.TwoD.Path.LSystem -- > tree3Ex = rotateBy (1/4) . getTurtleDiagram $ tree3 4 :: Diagram B -- | Tree 3 -- -- <<diagrams/src_Diagram...
380
tree2 :: RealFloat n => Int -> TurtleState n tree2 n = lSystem n (1/18 @@ turn) (symbols "F") tree where tree = M.fromList [rule 'F' "F[+>>>F]F[->>>F][>>>F]"] -- > import Diagrams.TwoD.Path.LSystem -- > tree3Ex = rotateBy (1/4) . getTurtleDiagram $ tree3 4 :: Diagram B -- | Tree 3 -- -- <<diagrams/src_Diagram...
380
tree2 n = lSystem n (1/18 @@ turn) (symbols "F") tree where tree = M.fromList [rule 'F' "F[+>>>F]F[->>>F][>>>F]"] -- > import Diagrams.TwoD.Path.LSystem -- > tree3Ex = rotateBy (1/4) . getTurtleDiagram $ tree3 4 :: Diagram B -- | Tree 3 -- -- <<diagrams/src_Diagrams_TwoD_Path_LSystem_tree3Ex.svg#diagram=tree3...
335
false
true
0
8
61
80
41
39
null
null
ksaveljev/hake-2
src/Sys/Timer.hs
bsd-3-clause
getCurTime :: Quake Int getCurTime = use (globals.gCurTime) >>= io . readIORef
78
getCurTime :: Quake Int getCurTime = use (globals.gCurTime) >>= io . readIORef
78
getCurTime = use (globals.gCurTime) >>= io . readIORef
54
false
true
1
9
11
34
15
19
null
null