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
gridaphobe/ghc
compiler/types/Coercion.hs
bsd-3-clause
isReflCo _ = False
26
isReflCo _ = False
26
isReflCo _ = False
26
false
false
0
5
11
9
4
5
null
null
copton/ocram
ocram/src/Ocram/Intermediate/Representation.hs
gpl-2.0
fvarParameter :: Variable -> FunctionVariable fvarParameter var = FunctionVariable var VarAutomatic True True
109
fvarParameter :: Variable -> FunctionVariable fvarParameter var = FunctionVariable var VarAutomatic True True
109
fvarParameter var = FunctionVariable var VarAutomatic True True
63
false
true
0
5
12
27
13
14
null
null
leohahn/scheme-interpreter
src/Lib.hs
bsd-3-clause
showVal (Number contents) = show contents
41
showVal (Number contents) = show contents
41
showVal (Number contents) = show contents
41
false
false
0
7
5
18
8
10
null
null
guoy34/ampersand
src/Database/Design/Ampersand/Core/AbstractSyntaxTree.hs
gpl-3.0
l .:. r = if source r/=target l then fatal 440 ("Cannot compose (with operator \";\") expression l of type "++show (sign l)++"\n "++show l++"\n with expression r of type "++show (sign r)++"\n "++show r++".") else ECps (l,r)
241
l .:. r = if source r/=target l then fatal 440 ("Cannot compose (with operator \";\") expression l of type "++show (sign l)++"\n "++show l++"\n with expression r of type "++show (sign r)++"\n "++show r++".") else ECps (l,r)
241
l .:. r = if source r/=target l then fatal 440 ("Cannot compose (with operator \";\") expression l of type "++show (sign l)++"\n "++show l++"\n with expression r of type "++show (sign r)++"\n "++show r++".") else ECps (l,r)
241
false
false
2
18
55
103
50
53
null
null
mightymoose/liquidhaskell
benchmarks/esop2013-submission/Toy.hs
bsd-3-clause
{-@ maxEvens2 :: [Int] -> {v:Int | v mod 2 = 0 } @-} maxEvens2 xs = maximumPoly (0 : xs') where xs' = [ x | x <- xs, isEven x] ------------------------------------------------------------------------- -- | Induction over Int Ranges ------------------------------------------ -----------------------------------------...
550
maxEvens2 xs = maximumPoly (0 : xs') where xs' = [ x | x <- xs, isEven x] ------------------------------------------------------------------------- -- | Induction over Int Ranges ------------------------------------------ ------------------------------------------------------------------------- {-@ foldN :: forall...
497
maxEvens2 xs = maximumPoly (0 : xs') where xs' = [ x | x <- xs, isEven x] ------------------------------------------------------------------------- -- | Induction over Int Ranges ------------------------------------------ ------------------------------------------------------------------------- {-@ foldN :: forall...
497
true
false
0
7
143
50
27
23
null
null
DavidAlphaFox/darcs
src/Darcs/Util/ByteString.hs
gpl-2.0
-- | Encode a String to a ByteString with char8 encoding (i.e., the values of the -- characters become the values of the bytes; if a character value is greater -- than 255, its byte becomes the character value modulo 256) encodeChar8 :: String -> B.ByteString encodeChar8 = B.pack . map (fromIntegral . ord)
307
encodeChar8 :: String -> B.ByteString encodeChar8 = B.pack . map (fromIntegral . ord)
85
encodeChar8 = B.pack . map (fromIntegral . ord)
47
true
true
0
8
53
36
20
16
null
null
ezyang/ghc
compiler/simplCore/OccurAnal.hs
bsd-3-clause
decideJoinPointHood NotTopLevel usage bndrs | isJoinId (head bndrs) = WARN(not all_ok, text "OccurAnal failed to rediscover join point(s):" <+> ppr bndrs) all_ok | otherwise = all_ok where -- See Note [Invariants on join points]; invariants cited by number below. -- Invarian...
1,082
decideJoinPointHood NotTopLevel usage bndrs | isJoinId (head bndrs) = WARN(not all_ok, text "OccurAnal failed to rediscover join point(s):" <+> ppr bndrs) all_ok | otherwise = all_ok where -- See Note [Invariants on join points]; invariants cited by number below. -- Invarian...
1,082
decideJoinPointHood NotTopLevel usage bndrs | isJoinId (head bndrs) = WARN(not all_ok, text "OccurAnal failed to rediscover join point(s):" <+> ppr bndrs) all_ok | otherwise = all_ok where -- See Note [Invariants on join points]; invariants cited by number below. -- Invarian...
1,082
false
false
11
10
300
193
100
93
null
null
ayron/AoC
2016/Day 7/solution.hs
gpl-3.0
is_aba a b c = a == c && a /= b
31
is_aba a b c = a == c && a /= b
31
is_aba a b c = a == c && a /= b
31
false
false
0
7
11
25
12
13
null
null
gennady-em/haskel
src/D_Tree.hs
gpl-2.0
replaceAndMin m (l:^:r) = (rl :^: rr, ml `min` mr) where (rl,ml) = replaceAndMin m l (rr,mr) = replaceAndMin m r
173
replaceAndMin m (l:^:r) = (rl :^: rr, ml `min` mr) where (rl,ml) = replaceAndMin m l (rr,mr) = replaceAndMin m r
173
replaceAndMin m (l:^:r) = (rl :^: rr, ml `min` mr) where (rl,ml) = replaceAndMin m l (rr,mr) = replaceAndMin m r
173
false
false
0
6
81
73
38
35
null
null
michalkonecny/aern
aern-real/src/Numeric/AERN/RealArithmetic/RefinementOrderRounding/Elementary.hs
bsd-3-clause
testsInOutExp (name, sample) = testGroup (name ++ " exp in/out") $ [ testProperty "e^a * e^(-a) ⊑/⊒ 1" (propExpOfNegRecip sample) , testProperty "e^(a + b) = e^a * e^b" (propExpOfAddToMult sample) ]
250
testsInOutExp (name, sample) = testGroup (name ++ " exp in/out") $ [ testProperty "e^a * e^(-a) ⊑/⊒ 1" (propExpOfNegRecip sample) , testProperty "e^(a + b) = e^a * e^b" (propExpOfAddToMult sample) ]
250
testsInOutExp (name, sample) = testGroup (name ++ " exp in/out") $ [ testProperty "e^a * e^(-a) ⊑/⊒ 1" (propExpOfNegRecip sample) , testProperty "e^(a + b) = e^a * e^b" (propExpOfAddToMult sample) ]
250
false
false
0
9
83
57
29
28
null
null
jdreaver/iris
src/Iris/Visuals/Text.hs
mit
drawText :: TextItem -> DrawFunc drawText (TextItem images) dd = mapM_ (`drawImage` dd) images
94
drawText :: TextItem -> DrawFunc drawText (TextItem images) dd = mapM_ (`drawImage` dd) images
94
drawText (TextItem images) dd = mapM_ (`drawImage` dd) images
61
false
true
0
7
13
37
20
17
null
null
iu-parfunc/containers
tests/intmap-strictness.hs
bsd-3-clause
pAdjustKeyStrict :: (Int -> Int) -> IntMap Int -> Bool pAdjustKeyStrict f m = isBottom $ M.adjust f bottom m
108
pAdjustKeyStrict :: (Int -> Int) -> IntMap Int -> Bool pAdjustKeyStrict f m = isBottom $ M.adjust f bottom m
108
pAdjustKeyStrict f m = isBottom $ M.adjust f bottom m
53
false
true
0
7
19
47
23
24
null
null
lihlcnkr/codejam
src/QR/Prime.hs
apache-2.0
convertToStr :: Int -> (String, Int) convertToStr a = (show a, a+1)
67
convertToStr :: Int -> (String, Int) convertToStr a = (show a, a+1)
67
convertToStr a = (show a, a+1)
30
false
true
0
8
11
43
21
22
null
null
MihaiVisu/HaskellStuff
tutorial8 week10/tutorial8.hs
mit
dm1 :: FSM [Int] dm1 = ([[],[0],[1,2],[3],[3,4],[4]], ['a','b'], [0], [[3,4],[4]], [([], 'a',[]), ([], 'b',[]), ([0], 'a',[1,2]), ([0], 'b',[1,2]), ([1,2],'a',[3]), ([1,2],'b',[3,4]), ([3], 'a',[]), ([3], 'b',[4]), ...
424
dm1 :: FSM [Int] dm1 = ([[],[0],[1,2],[3],[3,4],[4]], ['a','b'], [0], [[3,4],[4]], [([], 'a',[]), ([], 'b',[]), ([0], 'a',[1,2]), ([0], 'b',[1,2]), ([1,2],'a',[3]), ([1,2],'b',[3,4]), ([3], 'a',[]), ([3], 'b',[4]), ...
423
dm1 = ([[],[0],[1,2],[3],[3,4],[4]], ['a','b'], [0], [[3,4],[4]], [([], 'a',[]), ([], 'b',[]), ([0], 'a',[1,2]), ([0], 'b',[1,2]), ([1,2],'a',[3]), ([1,2],'b',[3,4]), ([3], 'a',[]), ([3], 'b',[4]), ([3,4],'a...
406
false
true
0
8
172
329
215
114
null
null
nh2/WashNGo
WASH/HTML/HTMLMonad.hs
bsd-3-clause
area_T = mkEmpty_T "area"
25
area_T = mkEmpty_T "area"
25
area_T = mkEmpty_T "area"
25
false
false
0
5
3
9
4
5
null
null
relrod/ms
tests/test.hs
bsd-2-clause
genTestGroup :: (Num b, Ord b, Show a, Arbitrary a, Eq a) => TestName -> MetricSpace a b -> TestTree genTestGroup name metric = testGroup name [ QC.testProperty "nonnegative" $ \a b -> nonnegative metric a b , QC.testProperty "indisc" $ \a -> indisc metric a , QC.testProperty "symmetry" $ \...
611
genTestGroup :: (Num b, Ord b, Show a, Arbitrary a, Eq a) => TestName -> MetricSpace a b -> TestTree genTestGroup name metric = testGroup name [ QC.testProperty "nonnegative" $ \a b -> nonnegative metric a b , QC.testProperty "indisc" $ \a -> indisc metric a , QC.testProperty "symmetry" $ \...
611
genTestGroup name metric = testGroup name [ QC.testProperty "nonnegative" $ \a b -> nonnegative metric a b , QC.testProperty "indisc" $ \a -> indisc metric a , QC.testProperty "symmetry" $ \a b -> symmetry metric a b , QC.testProperty "triangle" $ \a b -> triangle metric a b , QC.testP...
503
false
true
0
12
157
264
128
136
null
null
eval-so/cruncher
src/Evalso/Cruncher/Language/Perl.hs
bsd-3-clause
perl :: Language perl = Language { _codeFilename = "program.pl" , _compileCommand = Nothing , _compileTimeout = Nothing , _runCommand = ["perl", "program.pl"] , _runTimeout = 5 , _codemirror = "perl" , _rpm = "perl" , _displayName = "Perl" }
259
perl :: Language perl = Language { _codeFilename = "program.pl" , _compileCommand = Nothing , _compileTimeout = Nothing , _runCommand = ["perl", "program.pl"] , _runTimeout = 5 , _codemirror = "perl" , _rpm = "perl" , _displayName = "Perl" }
259
perl = Language { _codeFilename = "program.pl" , _compileCommand = Nothing , _compileTimeout = Nothing , _runCommand = ["perl", "program.pl"] , _runTimeout = 5 , _codemirror = "perl" , _rpm = "perl" , _displayName = "Perl" }
242
false
true
0
8
57
77
45
32
null
null
MfesGA/Smtlib
Smtlib/Parsers/CommandsParsers.hs
mit
parseName :: ParsecT String u Identity InfoFlags parseName = string ":name" *> return Name
90
parseName :: ParsecT String u Identity InfoFlags parseName = string ":name" *> return Name
90
parseName = string ":name" *> return Name
41
false
true
1
6
13
34
14
20
null
null
rueshyna/gogol
gogol-translate/gen/Network/Google/Translate/Types/Product.hs
mpl-2.0
-- | A detections contains detection results of several text dlrDetections :: Lens' DetectionsListResponse [[DetectionsResourceItem]] dlrDetections = lens _dlrDetections (\ s a -> s{_dlrDetections = a}) . _Default . _Coerce
243
dlrDetections :: Lens' DetectionsListResponse [[DetectionsResourceItem]] dlrDetections = lens _dlrDetections (\ s a -> s{_dlrDetections = a}) . _Default . _Coerce
182
dlrDetections = lens _dlrDetections (\ s a -> s{_dlrDetections = a}) . _Default . _Coerce
109
true
true
2
8
49
60
30
30
null
null
weissi/diplomarbeit
lib/Data/LinearExpression.hs
gpl-3.0
evaluate :: Field el => VarMapping el -> LinearExpr el -> Maybe el evaluate varMap le = case le of ConstLinearExpr cle -> Just cle LinearExpr s v i -> do vVal <- M.lookup v varMap return $ s * vVal + i -- | Rename the variable.
267
evaluate :: Field el => VarMapping el -> LinearExpr el -> Maybe el evaluate varMap le = case le of ConstLinearExpr cle -> Just cle LinearExpr s v i -> do vVal <- M.lookup v varMap return $ s * vVal + i -- | Rename the variable.
267
evaluate varMap le = case le of ConstLinearExpr cle -> Just cle LinearExpr s v i -> do vVal <- M.lookup v varMap return $ s * vVal + i -- | Rename the variable.
200
false
true
0
12
87
104
46
58
null
null
wamaral/slaskellbot
src/Parser.hs
bsd-3-clause
commandParser :: Parser Command commandParser = Command <$> cmdTokenP <*> cmdP <*> argsP
88
commandParser :: Parser Command commandParser = Command <$> cmdTokenP <*> cmdP <*> argsP
88
commandParser = Command <$> cmdTokenP <*> cmdP <*> argsP
56
false
true
1
7
12
30
13
17
null
null
thalerjonathan/phd
thesis/code/concurrent/sugarscape/SugarScapeSTMTVar/src/Common.hs
gpl-3.0
bestCellFunc :: BestCellMeasureFunc bestCellFunc = bestMeasureSugarLevel
73
bestCellFunc :: BestCellMeasureFunc bestCellFunc = bestMeasureSugarLevel
72
bestCellFunc = bestMeasureSugarLevel
36
false
true
0
4
6
11
6
5
null
null
JoeyEremondi/haskelm-old
src/Language/Elm/TH/Json.hs
bsd-3-clause
toJsonName :: Name -> Name toJsonName name = mkName $ "toJson_" ++ nameToString name
84
toJsonName :: Name -> Name toJsonName name = mkName $ "toJson_" ++ nameToString name
84
toJsonName name = mkName $ "toJson_" ++ nameToString name
57
false
true
0
6
13
29
14
15
null
null
nuttycom/haskoin
tests/Network/Haskoin/Crypto/ECDSA/Tests.hs
unlicense
tests :: [Test] tests = [ testGroup "ECDSA signatures" [ testProperty "Verify signature" testVerifySig , testProperty "verify deterministic signature" testVerifyDetSig , testProperty "S component <= order/2" $ \(ArbitrarySignature _ _ _ sig) -> halfOrderSig sig , testPr...
761
tests :: [Test] tests = [ testGroup "ECDSA signatures" [ testProperty "Verify signature" testVerifySig , testProperty "verify deterministic signature" testVerifyDetSig , testProperty "S component <= order/2" $ \(ArbitrarySignature _ _ _ sig) -> halfOrderSig sig , testPr...
761
tests = [ testGroup "ECDSA signatures" [ testProperty "Verify signature" testVerifySig , testProperty "verify deterministic signature" testVerifyDetSig , testProperty "S component <= order/2" $ \(ArbitrarySignature _ _ _ sig) -> halfOrderSig sig , testProperty "S compon...
745
false
true
0
11
217
162
82
80
null
null
kmels/tersus
Tersus/Debug.hs
bsd-2-clause
debugM :: String -> IO () debugM = putStrLn
43
debugM :: String -> IO () debugM = putStrLn
43
debugM = putStrLn
17
false
true
0
8
8
26
11
15
null
null
joelburget/graphreduction
src/Machine/Internal/Pretty.hs
bsd-3-clause
showStkNode :: Heap -> Node -> Doc showStkNode heap (NAp funAddr argAddr) = hcat [ text "NAp " , showFWAddr funAddr , text " " , showFWAddr argAddr , text " (" , showNode $ heap^.to (U.lookup argAddr) , text ")" ]
245
showStkNode :: Heap -> Node -> Doc showStkNode heap (NAp funAddr argAddr) = hcat [ text "NAp " , showFWAddr funAddr , text " " , showFWAddr argAddr , text " (" , showNode $ heap^.to (U.lookup argAddr) , text ")" ]
245
showStkNode heap (NAp funAddr argAddr) = hcat [ text "NAp " , showFWAddr funAddr , text " " , showFWAddr argAddr , text " (" , showNode $ heap^.to (U.lookup argAddr) , text ")" ]
210
false
true
0
11
73
98
47
51
null
null
bemusic/bms-clipboarder
src/Unmatch.hs
mit
unmatch objects = let bgms = filter isBGM objects sourceColumns = sort $ nub $ map bgmChannelIndex bgms destColumns = take (Data.List.length sourceColumns) [1, 2, 3, 4, 5, 6, 7, 0] columnMapping = zip sourceColumns destColumns updateNote :: BMSObject -> Maybe BMSObject updateNote object = let ...
625
unmatch objects = let bgms = filter isBGM objects sourceColumns = sort $ nub $ map bgmChannelIndex bgms destColumns = take (Data.List.length sourceColumns) [1, 2, 3, 4, 5, 6, 7, 0] columnMapping = zip sourceColumns destColumns updateNote :: BMSObject -> Maybe BMSObject updateNote object = let ...
625
unmatch objects = let bgms = filter isBGM objects sourceColumns = sort $ nub $ map bgmChannelIndex bgms destColumns = take (Data.List.length sourceColumns) [1, 2, 3, 4, 5, 6, 7, 0] columnMapping = zip sourceColumns destColumns updateNote :: BMSObject -> Maybe BMSObject updateNote object = let ...
625
false
false
0
18
135
206
107
99
null
null
tamarin-prover/tamarin-prover
lib/term/src/Term/Maude/Process.hs
gpl-3.0
unifyCmd eqs = "unify in MSG : " <> seqs <> " .\n" where ppEq (Equal t1 t2) = ppMaude t1 <> " =? " <> ppMaude t2 seqs = B.intercalate " /\\ " $ map ppEq eqs -- | @unifyViaMaude hnd eqs@ computes all AC unifiers of @eqs@ using the -- Maude process @hnd@.
271
unifyCmd eqs = "unify in MSG : " <> seqs <> " .\n" where ppEq (Equal t1 t2) = ppMaude t1 <> " =? " <> ppMaude t2 seqs = B.intercalate " /\\ " $ map ppEq eqs -- | @unifyViaMaude hnd eqs@ computes all AC unifiers of @eqs@ using the -- Maude process @hnd@.
271
unifyCmd eqs = "unify in MSG : " <> seqs <> " .\n" where ppEq (Equal t1 t2) = ppMaude t1 <> " =? " <> ppMaude t2 seqs = B.intercalate " /\\ " $ map ppEq eqs -- | @unifyViaMaude hnd eqs@ computes all AC unifiers of @eqs@ using the -- Maude process @hnd@.
271
false
false
10
6
72
83
34
49
null
null
yesodweb/yesod
yesod-form/Yesod/Form/I18n/Portuguese.hs
mit
portugueseFormMessage (MsgInvalidEntry t) = "Entrada inválida: " `mappend` t
76
portugueseFormMessage (MsgInvalidEntry t) = "Entrada inválida: " `mappend` t
76
portugueseFormMessage (MsgInvalidEntry t) = "Entrada inválida: " `mappend` t
76
false
false
0
7
8
21
11
10
null
null
mcschroeder/welshy
Web/Welshy/Response.hs
mit
html' :: Text -> Action () html' t = do header hContentType "text/html" _builder $ fromByteString $ T.encodeUtf8 t -- | Set the response body to the JSON encoding of the given value -- and the content-type to @application/json@.
237
html' :: Text -> Action () html' t = do header hContentType "text/html" _builder $ fromByteString $ T.encodeUtf8 t -- | Set the response body to the JSON encoding of the given value -- and the content-type to @application/json@.
237
html' t = do header hContentType "text/html" _builder $ fromByteString $ T.encodeUtf8 t -- | Set the response body to the JSON encoding of the given value -- and the content-type to @application/json@.
210
false
true
0
9
47
49
23
26
null
null
dehun/bce
src/Bce/P2p.hs
mit
isend :: P2pState -> PeerAddress -> P2pMessage -> IO () isend p2p peer msg = do logDebug $ "p2p queuing send towards peer=" ++ show peer atomically $ writeTChan (p2pSendChan p2p) (PeerSend msg $ Just peer)
214
isend :: P2pState -> PeerAddress -> P2pMessage -> IO () isend p2p peer msg = do logDebug $ "p2p queuing send towards peer=" ++ show peer atomically $ writeTChan (p2pSendChan p2p) (PeerSend msg $ Just peer)
214
isend p2p peer msg = do logDebug $ "p2p queuing send towards peer=" ++ show peer atomically $ writeTChan (p2pSendChan p2p) (PeerSend msg $ Just peer)
158
false
true
0
11
44
80
37
43
null
null
robx/puzzle-draw
src/Data/Compose.hs
mit
handle f TapaCave = f R.tapa D.tapa
35
handle f TapaCave = f R.tapa D.tapa
35
handle f TapaCave = f R.tapa D.tapa
35
false
false
0
6
6
21
9
12
null
null
schell/hdevtools
src/CommandArgs.hs
mit
cabalVersion :: String cabalVersion = #ifdef ENABLE_CABAL "cabal-" ++ VERSION_Cabal
87
cabalVersion :: String cabalVersion = #ifdef ENABLE_CABAL "cabal-" ++ VERSION_Cabal
87
cabalVersion = #ifdef ENABLE_CABAL "cabal-" ++ VERSION_Cabal
64
false
true
2
6
13
24
10
14
null
null
haroldcarr/learn-haskell-coq-ml-etc
haskell/playpen/hcpn/src/NetAux.hs
unlicense
arcLabelColour = darkgrey
27
arcLabelColour = darkgrey
27
arcLabelColour = darkgrey
27
false
false
0
4
4
6
3
3
null
null
actframework/FrameworkBenchmarks
frameworks/Haskell/yesod/yesod-mysql-mongo/src/yesod.hs
bsd-3-clause
getFortunesR :: Handler () getFortunesR = do es <- runMySQL $ My.selectList [] [] sendWaiResponse $ responseBuilder status200 [("Content-type", typeHtml)] $ fortuneTemplate (messages es) where messages es = sortBy (compare `on` snd) ((0, "Additional fortune added at request time.")...
438
getFortunesR :: Handler () getFortunesR = do es <- runMySQL $ My.selectList [] [] sendWaiResponse $ responseBuilder status200 [("Content-type", typeHtml)] $ fortuneTemplate (messages es) where messages es = sortBy (compare `on` snd) ((0, "Additional fortune added at request time.")...
438
getFortunesR = do es <- runMySQL $ My.selectList [] [] sendWaiResponse $ responseBuilder status200 [("Content-type", typeHtml)] $ fortuneTemplate (messages es) where messages es = sortBy (compare `on` snd) ((0, "Additional fortune added at request time.") : map stripEntity es) ...
411
false
true
0
11
103
152
77
75
null
null
ichistmeinname/holumbus
src/Holumbus/Index/Common/Occurences.hs
mit
unionPos :: Positions -> Positions -> Positions unionPos = IS.union
97
unionPos :: Positions -> Positions -> Positions unionPos = IS.union
97
unionPos = IS.union
34
false
true
0
6
39
21
11
10
null
null
ekmett/ghc
compiler/nativeGen/PPC/CodeGen.hs
bsd-3-clause
- for 32-bit architectuers, support some 64 -> 32 bit conversions: -- TO_W_(x), TO_W_(x >> 32) getRegister' dflags (CmmMachOp (MO_UU_Conv W64 W32) [CmmMachOp (MO_U_Shr W64) [x,CmmLit (CmmInt 32 _)]]) | target32Bit (targetPlatform dflags) = do ChildCode64 code rlo <- iselExpr64 x return $ ...
358
getRegister' dflags (CmmMachOp (MO_UU_Conv W64 W32) [CmmMachOp (MO_U_Shr W64) [x,CmmLit (CmmInt 32 _)]]) | target32Bit (targetPlatform dflags) = do ChildCode64 code rlo <- iselExpr64 x return $ Fixed II32 (getHiVRegFromLo rlo) code
257
getRegister' dflags (CmmMachOp (MO_UU_Conv W64 W32) [CmmMachOp (MO_U_Shr W64) [x,CmmLit (CmmInt 32 _)]]) | target32Bit (targetPlatform dflags) = do ChildCode64 code rlo <- iselExpr64 x return $ Fixed II32 (getHiVRegFromLo rlo) code
257
true
false
1
13
79
138
64
74
null
null
forked-upstream-packages-for-ghcjs/ghc
compiler/utils/UniqFM.hs
bsd-3-clause
eltsUFM (UFM m) = M.elems m
27
eltsUFM (UFM m) = M.elems m
27
eltsUFM (UFM m) = M.elems m
27
false
false
0
7
5
20
9
11
null
null
mike-burns/trajectory
Trajectory/Private/Config.hs
bsd-3-clause
readConfigFrom :: String -> IO (Maybe BS.ByteString) readConfigFrom configFileName = (BS.readFile configFileName >>= return . Just) `catch` (const $ return Nothing)
166
readConfigFrom :: String -> IO (Maybe BS.ByteString) readConfigFrom configFileName = (BS.readFile configFileName >>= return . Just) `catch` (const $ return Nothing)
166
readConfigFrom configFileName = (BS.readFile configFileName >>= return . Just) `catch` (const $ return Nothing)
113
false
true
0
10
22
61
31
30
null
null
ckirkendall/hlisp
Eval.hs
gpl-2.0
eval (Number x) env = return (Number x, env)
44
eval (Number x) env = return (Number x, env)
44
eval (Number x) env = return (Number x, env)
44
false
false
1
6
8
33
14
19
null
null
harendra-kumar/unicode-transforms
test/NormalizationTest.hs
bsd-3-clause
main :: IO () main = do testNormalize "unicode-data/ucd/NormalizationTest.txt" -- Additional test cases not in the unicode standard suite testNormalize "unicode-data/extra/NormalizationTest.txt"
206
main :: IO () main = do testNormalize "unicode-data/ucd/NormalizationTest.txt" -- Additional test cases not in the unicode standard suite testNormalize "unicode-data/extra/NormalizationTest.txt"
206
main = do testNormalize "unicode-data/ucd/NormalizationTest.txt" -- Additional test cases not in the unicode standard suite testNormalize "unicode-data/extra/NormalizationTest.txt"
192
false
true
0
7
32
29
13
16
null
null
8l/beri
cherilibs/trunk/tools/debug/CheriCTL.hs
apache-2.0
runTestIO :: TestIO a -> IO (Either String a) runTestIO tmx = runErrorT tmx
75
runTestIO :: TestIO a -> IO (Either String a) runTestIO tmx = runErrorT tmx
75
runTestIO tmx = runErrorT tmx
29
false
true
0
9
13
39
17
22
null
null
sinelaw/lamdu
Lamdu/Sugar/AddNames.hs
gpl-3.0
p1WithEnv :: (P1Env -> P1Env) -> Pass1M a -> Pass1M a p1WithEnv f (Pass1M act) = Pass1M $ Reader.local f act
108
p1WithEnv :: (P1Env -> P1Env) -> Pass1M a -> Pass1M a p1WithEnv f (Pass1M act) = Pass1M $ Reader.local f act
108
p1WithEnv f (Pass1M act) = Pass1M $ Reader.local f act
54
false
true
2
10
20
59
27
32
null
null
DaMSL/K3
src/Language/K3/Codegen/Haskell.hs
apache-2.0
typ' (tag -> TString) = return [ty| String |]
50
typ' (tag -> TString) = return [ty| String |]
50
typ' (tag -> TString) = return [ty| String |]
50
false
false
0
6
13
24
13
11
null
null
mcschroeder/ghc
compiler/main/DynFlags.hs
bsd-3-clause
setGenDeriving False = return ()
32
setGenDeriving False = return ()
32
setGenDeriving False = return ()
32
false
false
1
6
4
17
6
11
null
null
lukexi/ghc-7.8-arm64
compiler/utils/ExtsCompat46.hs
bsd-3-clause
neFloat# :: Float# -> Float# -> Bool neFloat# a b = isTrue# (a `E.neFloat#` b)
78
neFloat# :: Float# -> Float# -> Bool neFloat# a b = isTrue# (a `E.neFloat#` b)
78
neFloat# a b = isTrue# (a `E.neFloat#` b)
41
false
true
0
8
14
43
21
22
null
null
cfredric/arithmoi
test-suite/Math/NumberTheory/Recurrencies/BilinearTests.hs
mit
bernoulliProperty1 :: NonNegative Int -> Bool bernoulliProperty1 (NonNegative m) = case signum (bernoulli !! m) of 1 -> m == 0 || m `mod` 4 == 2 0 -> m /= 1 && odd m -1 -> m == 1 || (m /= 0 && m `mod` 4 == 0) _ -> False
240
bernoulliProperty1 :: NonNegative Int -> Bool bernoulliProperty1 (NonNegative m) = case signum (bernoulli !! m) of 1 -> m == 0 || m `mod` 4 == 2 0 -> m /= 1 && odd m -1 -> m == 1 || (m /= 0 && m `mod` 4 == 0) _ -> False
240
bernoulliProperty1 (NonNegative m) = case signum (bernoulli !! m) of 1 -> m == 0 || m `mod` 4 == 2 0 -> m /= 1 && odd m -1 -> m == 1 || (m /= 0 && m `mod` 4 == 0) _ -> False
194
false
true
0
13
73
125
64
61
null
null
brendanhay/gogol
gogol-dfareporting/gen/Network/Google/DFAReporting/Types/Product.hs
mpl-2.0
-- | ID of this platform type. ptId :: Lens' PlatformType (Maybe Int64) ptId = lens _ptId (\ s a -> s{_ptId = a}) . mapping _Coerce
139
ptId :: Lens' PlatformType (Maybe Int64) ptId = lens _ptId (\ s a -> s{_ptId = a}) . mapping _Coerce
108
ptId = lens _ptId (\ s a -> s{_ptId = a}) . mapping _Coerce
67
true
true
1
9
34
59
28
31
null
null
xunilrj/sandbox
sources/haskell/papers/reactive.hs
apache-2.0
showE :: (Show a) => E a -> String showE (Ok a) = "OK " ++ (show a)
71
showE :: (Show a) => E a -> String showE (Ok a) = "OK " ++ (show a)
67
showE (Ok a) = "OK " ++ (show a)
32
false
true
2
10
21
53
24
29
null
null
np/hlatex
Language/LaTeX/Builder/Beamer.hs
bsd-3-clause
showDocClassOption T = "t"
34
showDocClassOption T = "t"
34
showDocClassOption T = "t"
34
false
false
1
5
11
13
4
9
null
null
agrafix/legoDSL
NXT/Core.hs
bsd-3-clause
-- | Define an external literal. Don't forget to add a type signature mkLit :: (Typeable a) => Int -> V a mkLit lit = pack $ Lit lit
132
mkLit :: (Typeable a) => Int -> V a mkLit lit = pack $ Lit lit
62
mkLit lit = pack $ Lit lit
26
true
true
2
8
28
43
20
23
null
null
k16shikano/wikipepub
QNDA/Toc.hs
mit
ocNode :: (ArrowList a, ArrowXml a) => HeaderText -> FilePath -> InTocText -> Int -> a b XmlTree mkTocNode headertext filename chapsec number = (eelem "li" += (eelem "a" += (sattr "href" $ filename++"#"++"name"++(show $ hash headertext)) += (txt $ chapsec) += (txt $ drop 2 headertext)))
314
mkTocNode :: (ArrowList a, ArrowXml a) => HeaderText -> FilePath -> InTocText -> Int -> a b XmlTree mkTocNode headertext filename chapsec number = (eelem "li" += (eelem "a" += (sattr "href" $ filename++"#"++"name"++(show $ hash headertext)) += (txt $ chapsec) += (txt $ drop 2 headertext)))
316
mkTocNode headertext filename chapsec number = (eelem "li" += (eelem "a" += (sattr "href" $ filename++"#"++"name"++(show $ hash headertext)) += (txt $ chapsec) += (txt $ drop 2 headertext)))
216
false
true
0
16
73
135
68
67
null
null
phadej/range-set-list
tests/Map.hs
mit
toRSet (AInsert a set) = RSet.insert a $ toRSet set
56
toRSet (AInsert a set) = RSet.insert a $ toRSet set
56
toRSet (AInsert a set) = RSet.insert a $ toRSet set
56
false
false
0
7
14
30
13
17
null
null
micknelso/language-c
src/Language/CFamily/C/Analysis/TypeCheck.hs
bsd-3-clause
pType :: Type -> String pType = render . pretty
47
pType :: Type -> String pType = render . pretty
47
pType = render . pretty
23
false
true
0
5
9
19
10
9
null
null
rueshyna/gogol
gogol-blogger/gen/Network/Google/Blogger/Types/Product.hs
mpl-2.0
-- | Location name. plName :: Lens' PostLocation (Maybe Text) plName = lens _plName (\ s a -> s{_plName = a})
109
plName :: Lens' PostLocation (Maybe Text) plName = lens _plName (\ s a -> s{_plName = a})
89
plName = lens _plName (\ s a -> s{_plName = a})
47
true
true
1
9
20
52
25
27
null
null
iteloo/tsuru-sample
iteratee-0.8.9.6/src/Data/Iteratee/IO.hs
bsd-3-clause
-- |Process a file using the given Iteratee. This function wraps -- enumFdRandom as a convenience. fileDriverRandom :: (MonadIO m, MonadMask m, NullPoint s, ReadableChunk s el) => Iteratee s m a -> FilePath -> m a fileDriverRandom = FD.fileDriverRandomFd defaultBufSize
287
fileDriverRandom :: (MonadIO m, MonadMask m, NullPoint s, ReadableChunk s el) => Iteratee s m a -> FilePath -> m a fileDriverRandom = FD.fileDriverRandomFd defaultBufSize
187
fileDriverRandom = FD.fileDriverRandomFd defaultBufSize
55
true
true
0
9
58
70
34
36
null
null
hazel-el/hazel
test/Hazel/TestCases.hs
gpl-3.0
a :: Concept a = Name "A"
25
a :: Concept a = Name "A"
25
a = Name "A"
12
false
true
0
6
6
20
8
12
null
null
andorp/bead
src/Bead/Controller/Pages.hs
bsd-3-clause
isCreateGroup (Modify (CreateGroup _)) = True
45
isCreateGroup (Modify (CreateGroup _)) = True
45
isCreateGroup (Modify (CreateGroup _)) = True
45
false
false
0
8
5
22
10
12
null
null
kulshrax/haskml
src/ParseHtml.hs
mit
commentBody :: Parser T.Text commentBody = T.pack <$> manyTill anyChar (lookAhead (string "-->"))
97
commentBody :: Parser T.Text commentBody = T.pack <$> manyTill anyChar (lookAhead (string "-->"))
97
commentBody = T.pack <$> manyTill anyChar (lookAhead (string "-->"))
68
false
true
0
10
12
39
19
20
null
null
semaj/hademlia
src/RoutingData.hs
bsd-3-clause
closestKBucket (Branch _ o) ('1':restID) = closestKBucket o restID
66
closestKBucket (Branch _ o) ('1':restID) = closestKBucket o restID
66
closestKBucket (Branch _ o) ('1':restID) = closestKBucket o restID
66
false
false
0
7
8
34
16
18
null
null
snowleopard/alga
src/Algebra/Graph.hs
mit
-- | The number of vertices in a graph. -- Complexity: /O(s * log(n))/ time. -- -- Good consumer. -- -- @ -- vertexCount 'empty' == 0 -- vertexCount ('vertex' x) == 1 -- vertexCount == 'length' . 'vertexList' -- vertexCount x \< vertexCount y ==> x \< y -- @ vertexCount :: Ord a ...
372
vertexCount :: Ord a => Graph a -> Int vertexCount = Set.size . vertexSet
73
vertexCount = Set.size . vertexSet
34
true
true
0
7
104
42
26
16
null
null
yxm4109/pandoc
src/Text/Pandoc/Readers/LaTeX.hs
gpl-2.0
-- | Parse LaTeX from string and return 'Pandoc' document. readLaTeX :: ParserState -- ^ Parser state, including options for parser -> String -- ^ String to parse (assumes @'\n'@ line endings) -> Pandoc readLaTeX = readWith parseLaTeX
263
readLaTeX :: ParserState -- ^ Parser state, including options for parser -> String -- ^ String to parse (assumes @'\n'@ line endings) -> Pandoc readLaTeX = readWith parseLaTeX
204
readLaTeX = readWith parseLaTeX
31
true
true
0
8
66
32
15
17
null
null
cchantep/dhek
Dhek/Mode/Effect/Magnetic.hs
gpl-3.0
-------------------------------------------------------------------------------- magneticResize :: Rect -> Area -> Vector2D -> Magnetic magneticResize r a v = MagneticResize r a v
179
magneticResize :: Rect -> Area -> Vector2D -> Magnetic magneticResize r a v = MagneticResize r a v
98
magneticResize r a v = MagneticResize r a v
43
true
true
0
9
18
43
20
23
null
null
r-raymond/purple-muon
src/Server/Network.hs
gpl-3.0
endGameState :: (MonadReader STY.Resources m, MonadIO m) => PPT.PhysicalObjects -> DIS.IntMap PGT.GameObject -> STY.ClientConnection -> m () sendGameState pos gos cc = sequence_ $ DIS.mapWithKey (\k o -> sendGameObject cc pos (PTY.Key k, o)) gos
306
sendGameState :: (MonadReader STY.Resources m, MonadIO m) => PPT.PhysicalObjects -> DIS.IntMap PGT.GameObject -> STY.ClientConnection -> m () sendGameState pos gos cc = sequence_ $ DIS.mapWithKey (\k o -> sendGameObject cc pos (PTY.Key k, o)) gos
306
sendGameState pos gos cc = sequence_ $ DIS.mapWithKey (\k o -> sendGameObject cc pos (PTY.Key k, o)) gos
108
false
true
0
12
95
104
52
52
null
null
hdb3/FP-Router
ParseConfig.hs
apache-2.0
isRouter (RouterConfig _ _ _ _ _) = True
40
isRouter (RouterConfig _ _ _ _ _) = True
40
isRouter (RouterConfig _ _ _ _ _) = True
40
false
false
0
7
8
23
11
12
null
null
snoyberg/ghc
compiler/rename/RnBinds.hs
bsd-3-clause
defaultSigErr :: Sig RdrName -> SDoc defaultSigErr sig = vcat [ hang (text "Unexpected default signature:") 2 (ppr sig) , text "Use DefaultSignatures to enable default signatures" ]
236
defaultSigErr :: Sig RdrName -> SDoc defaultSigErr sig = vcat [ hang (text "Unexpected default signature:") 2 (ppr sig) , text "Use DefaultSignatures to enable default signatures" ]
236
defaultSigErr sig = vcat [ hang (text "Unexpected default signature:") 2 (ppr sig) , text "Use DefaultSignatures to enable default signatures" ]
199
false
true
0
9
82
52
25
27
null
null
bos/math-functions
Numeric/MathFunctions/Constants.hs
bsd-2-clause
---------------------------------------------------------------- -- Mathematical constants ---------------------------------------------------------------- -- | @sqrt 2@ m_sqrt_2 :: Double m_sqrt_2 = 1.4142135623730950488016887242096980785696718753769480731766
261
m_sqrt_2 :: Double m_sqrt_2 = 1.4142135623730950488016887242096980785696718753769480731766
90
m_sqrt_2 = 1.4142135623730950488016887242096980785696718753769480731766
71
true
true
0
4
15
15
10
5
null
null
planrich/abstractmachines
src/Interpretor.hs
bsd-3-clause
subs (CondExpr old_if old_then old_else) old new = do new_if <- (subs old_if old new) new_then <- (subs old_then old new) new_else <- (subs old_else old new) return $ CondExpr new_if new_then new_else {- OPT (subs old_if old new) >>= (\new_if -> (subs old_then old new) >>= (\new_then -> (su...
426
subs (CondExpr old_if old_then old_else) old new = do new_if <- (subs old_if old new) new_then <- (subs old_then old new) new_else <- (subs old_else old new) return $ CondExpr new_if new_then new_else {- OPT (subs old_if old new) >>= (\new_if -> (subs old_then old new) >>= (\new_then -> (su...
426
subs (CondExpr old_if old_then old_else) old new = do new_if <- (subs old_if old new) new_then <- (subs old_then old new) new_else <- (subs old_else old new) return $ CondExpr new_if new_then new_else {- OPT (subs old_if old new) >>= (\new_if -> (subs old_then old new) >>= (\new_then -> (su...
426
false
false
0
9
111
89
42
47
null
null
rleshchinskiy/vector
Data/Vector/Generic.hs
bsd-3-clause
zip = zipWith (,)
17
zip = zipWith (,)
17
zip = zipWith (,)
17
false
false
0
6
3
12
6
6
null
null
ekmett/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxTEXT_ATTR_BULLET_STYLE_LETTERS_UPPER :: Int wxTEXT_ATTR_BULLET_STYLE_LETTERS_UPPER = 0x00000002
101
wxTEXT_ATTR_BULLET_STYLE_LETTERS_UPPER :: Int wxTEXT_ATTR_BULLET_STYLE_LETTERS_UPPER = 0x00000002
101
wxTEXT_ATTR_BULLET_STYLE_LETTERS_UPPER = 0x00000002
53
false
true
0
4
9
11
6
5
null
null
khibino/haskell-data-handle
System/Handle/Enumerator.hs
bsd-3-clause
numAll :: MonadIO m => Handle -> Enumerator ByteString m b enumAll = concatEnums . readLoop where readLoop :: MonadIO m => Handle -> [Enumerator ByteString m b] readLoop fh = enumHandle chunkSize fh : readLoop fh {- | Get a binary-enumerator and a writable handle. This binary-enumerator is constructed ...
355
enumAll :: MonadIO m => Handle -> Enumerator ByteString m b enumAll = concatEnums . readLoop where readLoop :: MonadIO m => Handle -> [Enumerator ByteString m b] readLoop fh = enumHandle chunkSize fh : readLoop fh {- | Get a binary-enumerator and a writable handle. This binary-enumerator is constructed...
355
enumAll = concatEnums . readLoop where readLoop :: MonadIO m => Handle -> [Enumerator ByteString m b] readLoop fh = enumHandle chunkSize fh : readLoop fh {- | Get a binary-enumerator and a writable handle. This binary-enumerator is constructed by written data to this handle. -}
295
false
true
1
10
74
94
42
52
null
null
aaronc/Idris-dev
src/Idris/ElabDecls.hs
bsd-3-clause
-- | Return the elaborated term which calls 'main' elabMain :: Idris Term elabMain = do (m, _) <- elabVal recinfo ERHS (PApp fc (PRef fc [] (sUN "run__IO")) [pexp $ PRef fc [] (sNS (sUN "main") ["Main"])]) return m where fc = fileFC "toplevel" ...
345
elabMain :: Idris Term elabMain = do (m, _) <- elabVal recinfo ERHS (PApp fc (PRef fc [] (sUN "run__IO")) [pexp $ PRef fc [] (sNS (sUN "main") ["Main"])]) return m where fc = fileFC "toplevel" -- | Elaborate primitives
294
elabMain = do (m, _) <- elabVal recinfo ERHS (PApp fc (PRef fc [] (sUN "run__IO")) [pexp $ PRef fc [] (sNS (sUN "main") ["Main"])]) return m where fc = fileFC "toplevel" -- | Elaborate primitives
271
true
true
0
17
124
114
57
57
null
null
chrisdone/lists
src/Data/Lists.hs
bsd-3-clause
hasAny :: Eq a => [a] -- ^ List of elements to look for -> [a] -- ^ List to search -> Bool -- ^ Result hasAny [] _ = False
181
hasAny :: Eq a => [a] -- ^ List of elements to look for -> [a] -- ^ List to search -> Bool hasAny [] _ = False
152
hasAny [] _ = False
19
true
true
0
8
89
42
23
19
null
null
thelostt/climbu
src/Parser.hs
mit
tokenize ('(':'*':rest) = let subtokenize [] = [] subtokenize ('*':')':rest2) = tokenize rest2 subtokenize (_:rest2) = subtokenize rest2 in subtokenize rest
203
tokenize ('(':'*':rest) = let subtokenize [] = [] subtokenize ('*':')':rest2) = tokenize rest2 subtokenize (_:rest2) = subtokenize rest2 in subtokenize rest
203
tokenize ('(':'*':rest) = let subtokenize [] = [] subtokenize ('*':')':rest2) = tokenize rest2 subtokenize (_:rest2) = subtokenize rest2 in subtokenize rest
203
false
false
0
12
67
82
39
43
null
null
juhp/leksah
src/IDE/Metainfo/Provider.hs
gpl-2.0
injectSourceInMod (Just bp) md = case mdMbSourcePath md of Just sp -> md{mdMbSourcePath = Just (bp </> sp)} Nothing -> md -- -- | Loads the infos for the given module --
190
injectSourceInMod (Just bp) md = case mdMbSourcePath md of Just sp -> md{mdMbSourcePath = Just (bp </> sp)} Nothing -> md -- -- | Loads the infos for the given module --
190
injectSourceInMod (Just bp) md = case mdMbSourcePath md of Just sp -> md{mdMbSourcePath = Just (bp </> sp)} Nothing -> md -- -- | Loads the infos for the given module --
190
false
false
1
12
52
65
31
34
null
null
kairuku/stack
src/Stack/Types/Config.hs
bsd-3-clause
ghcVariantSuffix v = "-" ++ ghcVariantName v
44
ghcVariantSuffix v = "-" ++ ghcVariantName v
44
ghcVariantSuffix v = "-" ++ ghcVariantName v
44
false
false
1
6
6
19
7
12
null
null
cchalmers/optical
src/Optical/Coerce.hs
bsd-3-clause
joinCoercion :: forall f g a. (Coercible1 f, Coercible f g) => Coercion (f (f a) -> f a) (g (g a) -> g a) joinCoercion = contratrans (Coercion . (coercion1 :: Coercion (f (f a)) (f (g a)))) . coercion1
201
joinCoercion :: forall f g a. (Coercible1 f, Coercible f g) => Coercion (f (f a) -> f a) (g (g a) -> g a) joinCoercion = contratrans (Coercion . (coercion1 :: Coercion (f (f a)) (f (g a)))) . coercion1
201
joinCoercion = contratrans (Coercion . (coercion1 :: Coercion (f (f a)) (f (g a)))) . coercion1
95
false
true
0
14
40
127
65
62
null
null
olsner/ghc
compiler/main/HscMain.hs
bsd-3-clause
showModuleIndex :: (Int, Int) -> String showModuleIndex (i,n) = "[" ++ padded ++ " of " ++ n_str ++ "] " where n_str = show n i_str = show i padded = replicate (length n_str - length i_str) ' ' ++ i_str
216
showModuleIndex :: (Int, Int) -> String showModuleIndex (i,n) = "[" ++ padded ++ " of " ++ n_str ++ "] " where n_str = show n i_str = show i padded = replicate (length n_str - length i_str) ' ' ++ i_str
216
showModuleIndex (i,n) = "[" ++ padded ++ " of " ++ n_str ++ "] " where n_str = show n i_str = show i padded = replicate (length n_str - length i_str) ' ' ++ i_str
176
false
true
2
9
55
98
47
51
null
null
GallagherCommaJack/scheming-machine
ParserEvaluator.hs
gpl-3.0
converter :: String -> [LispVal] -> ThrowsError LispVal converter op (x:_) = typeConverter op x
95
converter :: String -> [LispVal] -> ThrowsError LispVal converter op (x:_) = typeConverter op x
95
converter op (x:_) = typeConverter op x
39
false
true
0
10
14
46
22
24
null
null
ryzhyk/cocoon
cocoon/Boogie/Boogie.hs
apache-2.0
havocVarName :: Expr -> String havocVarName e = "havoc_" ++ (sanitize $ show e)
79
havocVarName :: Expr -> String havocVarName e = "havoc_" ++ (sanitize $ show e)
79
havocVarName e = "havoc_" ++ (sanitize $ show e)
48
false
true
0
8
13
32
16
16
null
null
JoshuaGross/haskell-learning-log
Code/Haskellbook/Record.hs
mit
allProgrammingLanguages :: [ProgrammingLanguage] allProgrammingLanguages = [Haskell ..]
87
allProgrammingLanguages :: [ProgrammingLanguage] allProgrammingLanguages = [Haskell ..]
87
allProgrammingLanguages = [Haskell ..]
38
false
true
0
5
6
18
11
7
null
null
Athas/Sindre
Sindre/Sindre.hs
mit
zipper :: (([a], a, [a]) -> ([a], a, [a])) -> [a] -> [a] zipper f = zipper' [] where zipper' a (x:xs) = let (a', x', xs') = f (a, x, xs) in zipper' (x':a') xs' zipper' a [] = reverse a -- | @splitHoriz rect dims@ splits @rect@ horizontally into a number -- of non-overlapping ...
615
zipper :: (([a], a, [a]) -> ([a], a, [a])) -> [a] -> [a] zipper f = zipper' [] where zipper' a (x:xs) = let (a', x', xs') = f (a, x, xs) in zipper' (x':a') xs' zipper' a [] = reverse a -- | @splitHoriz rect dims@ splits @rect@ horizontally into a number -- of non-overlapping ...
615
zipper f = zipper' [] where zipper' a (x:xs) = let (a', x', xs') = f (a, x, xs) in zipper' (x':a') xs' zipper' a [] = reverse a -- | @splitHoriz rect dims@ splits @rect@ horizontally into a number -- of non-overlapping equal-width rectangles stacked on top of each -- other. ...
558
false
true
0
12
154
155
88
67
null
null
opqdonut/riot
Ginsu/GenUtil.hs
gpl-2.0
oldlM _ v [] = return v
24
foldlM _ v [] = return v
24
foldlM _ v [] = return v
24
false
false
1
6
7
20
8
12
null
null
m00nlight/99-problems
haskell/p-47.hs
bsd-3-clause
nor a b = not (or' a b)
24
nor a b = not (or' a b)
24
nor a b = not (or' a b)
24
false
false
0
7
8
23
10
13
null
null
revnull/fixfile
tests/TestTree23.hs
lgpl-3.0
test23 = testGroup "Tree23" [ testGroup "Set" [ testProperty "Set Insert" prop_SetInsert ,testProperty "Set Delete" prop_SetDelete ,testProperty "Set Delete All" prop_SetDeleteAll ,testProperty "Set Partition" prop_SetPartition ,testProperty "S...
916
test23 = testGroup "Tree23" [ testGroup "Set" [ testProperty "Set Insert" prop_SetInsert ,testProperty "Set Delete" prop_SetDelete ,testProperty "Set Delete All" prop_SetDeleteAll ,testProperty "Set Partition" prop_SetPartition ,testProperty "S...
916
test23 = testGroup "Tree23" [ testGroup "Set" [ testProperty "Set Insert" prop_SetInsert ,testProperty "Set Delete" prop_SetDelete ,testProperty "Set Delete All" prop_SetDeleteAll ,testProperty "Set Partition" prop_SetPartition ,testProperty "S...
916
false
false
1
9
280
144
69
75
null
null
capn-freako/lambda-ccc
src/LambdaCCC/Unused/CoerceEncode.hs
bsd-3-clause
standardizeAlt _ _ = error "standardizeAlt: non-DataAlt"
56
standardizeAlt _ _ = error "standardizeAlt: non-DataAlt"
56
standardizeAlt _ _ = error "standardizeAlt: non-DataAlt"
56
false
false
1
5
6
15
6
9
null
null
AlexanderPankiv/ghc
compiler/stgSyn/StgSyn.hs
bsd-3-clause
rhsHasCafRefs (StgRhsCon _ _ args) = any stgArgHasCafRefs args
64
rhsHasCafRefs (StgRhsCon _ _ args) = any stgArgHasCafRefs args
64
rhsHasCafRefs (StgRhsCon _ _ args) = any stgArgHasCafRefs args
64
false
false
0
6
10
26
11
15
null
null
Paow/encore
src/parser/Parser/Parser.hs
bsd-3-clause
patternParamDecl :: EncParser (Expr, Type) patternParamDecl = do x <- expr colon ty <- typ return (x, ty)
113
patternParamDecl :: EncParser (Expr, Type) patternParamDecl = do x <- expr colon ty <- typ return (x, ty)
113
patternParamDecl = do x <- expr colon ty <- typ return (x, ty)
70
false
true
0
8
25
49
24
25
null
null
joelburget/material-ui-hs
src/React/MaterialUI/Attrs.hs
mit
defaultValueStr :: Text -> AttrOrHandler signal defaultValueStr = mkStaticAttr "defaultValue"
93
defaultValueStr :: Text -> AttrOrHandler signal defaultValueStr = mkStaticAttr "defaultValue"
93
defaultValueStr = mkStaticAttr "defaultValue"
45
false
true
0
7
9
26
11
15
null
null
grnet/snf-ganeti
src/Ganeti/Monitoring/Server.hs
bsd-2-clause
catFromName "hypervisor" = BT.Ok $ Just DCHypervisor
52
catFromName "hypervisor" = BT.Ok $ Just DCHypervisor
52
catFromName "hypervisor" = BT.Ok $ Just DCHypervisor
52
false
false
0
6
6
18
8
10
null
null
thierr26/thierr26_xmonad_config_and_dot_files
.xmonad/xmonad.hs
unlicense
popupColor = "#7ec0ee"
22
popupColor = "#7ec0ee"
22
popupColor = "#7ec0ee"
22
false
false
0
4
2
6
3
3
null
null
jasonzoladz/persistent
experimental/couchDB/Database/Persist/CouchDB.hs
mit
viewName :: [String] -> String viewName [] = "default"
54
viewName :: [String] -> String viewName [] = "default"
54
viewName [] = "default"
23
false
true
0
8
8
29
13
16
null
null
farrellm/dependent-rbtree
src/Page3.hs
bsd-3-clause
findLeafB u (Black4Zip v l r c) | u < v = findLeafR u . toRedZip l $ BlackCrumb v (Left r) c | otherwise = findLeafR u $ toRedZip r $ BlackCrumb v (Left r) c
165
findLeafB u (Black4Zip v l r c) | u < v = findLeafR u . toRedZip l $ BlackCrumb v (Left r) c | otherwise = findLeafR u $ toRedZip r $ BlackCrumb v (Left r) c
165
findLeafB u (Black4Zip v l r c) | u < v = findLeafR u . toRedZip l $ BlackCrumb v (Left r) c | otherwise = findLeafR u $ toRedZip r $ BlackCrumb v (Left r) c
165
false
false
1
9
44
94
43
51
null
null
nicoan/miniLogo
src/Parser.hs
gpl-3.0
whiteSpace' = whiteSpace logoTokens
35
whiteSpace' = whiteSpace logoTokens
35
whiteSpace' = whiteSpace logoTokens
35
false
false
0
5
3
9
4
5
null
null
andyarvanitis/Idris-dev
src/Idris/Core/TT.hs
bsd-3-clause
constIsType (B32V _) = False
28
constIsType (B32V _) = False
28
constIsType (B32V _) = False
28
false
false
0
6
4
16
7
9
null
null
nevrenato/HetsAlloy
Maude/Morphism.hs
gpl-2.0
-- | the composition of two 'Morphism's compose :: Morphism -> Morphism -> Result Morphism compose f g | target f /= source g = fail "target of the first and source of the second morphism are different" | otherwise = let {- Take SymbolMap |mp| of each Morphism. Convert each SymbolMap to ...
1,633
compose :: Morphism -> Morphism -> Result Morphism compose f g | target f /= source g = fail "target of the first and source of the second morphism are different" | otherwise = let {- Take SymbolMap |mp| of each Morphism. Convert each SymbolMap to a function. Compose those functi...
1,593
compose f g | target f /= source g = fail "target of the first and source of the second morphism are different" | otherwise = let {- Take SymbolMap |mp| of each Morphism. Convert each SymbolMap to a function. Compose those functions. -} map'map :: Extraction -> Symbol -> ...
1,542
true
true
2
14
511
325
160
165
null
null
beni55/ghcjs
src/Gen2/Prim.hs
mit
genPrim _ _ IndexByteArrayOp_Double [r] [a,i] = PrimInline [j| `r` = `a`.f6[`i`]; |]
84
genPrim _ _ IndexByteArrayOp_Double [r] [a,i] = PrimInline [j| `r` = `a`.f6[`i`]; |]
84
genPrim _ _ IndexByteArrayOp_Double [r] [a,i] = PrimInline [j| `r` = `a`.f6[`i`]; |]
84
false
false
0
6
12
33
19
14
null
null
bitemyapp/ganeti
src/Ganeti/Constants.hs
bsd-2-clause
-- | 1GB maxWipeChunk :: Int maxWipeChunk = 1024
48
maxWipeChunk :: Int maxWipeChunk = 1024
39
maxWipeChunk = 1024
19
true
true
0
6
8
19
8
11
null
null
dysinger/amazonka
amazonka-directconnect/gen/Network/AWS/DirectConnect/DeleteVirtualInterface.hs
mpl-2.0
-- | 'DeleteVirtualInterface' constructor. -- -- The fields accessible through corresponding lenses are: -- -- * 'dvi1VirtualInterfaceId' @::@ 'Text' -- deleteVirtualInterface :: Text -- ^ 'dvi1VirtualInterfaceId' -> DeleteVirtualInterface deleteVirtualInterface p1 = DeleteVirtualInterface { ...
354
deleteVirtualInterface :: Text -- ^ 'dvi1VirtualInterfaceId' -> DeleteVirtualInterface deleteVirtualInterface p1 = DeleteVirtualInterface { _dvi1VirtualInterfaceId = p1 }
201
deleteVirtualInterface p1 = DeleteVirtualInterface { _dvi1VirtualInterfaceId = p1 }
91
true
true
0
7
67
42
23
19
null
null
ddssff/rdf4h
src/Data/RDF/Query.hs
bsd-3-clause
-- |Determine whether two triples have equal subjects. -- Note that it doesn't perform namespace expansion! equalSubjects :: Triple -> Triple -> Bool equalSubjects (Triple s1 _ _) (Triple s2 _ _) = s1 == s2
206
equalSubjects :: Triple -> Triple -> Bool equalSubjects (Triple s1 _ _) (Triple s2 _ _) = s1 == s2
98
equalSubjects (Triple s1 _ _) (Triple s2 _ _) = s1 == s2
56
true
true
0
7
35
50
26
24
null
null