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
ndmitchell/qed
v1/Exp.hs
bsd-3-clause
fromName (Symbol x) = x
23
fromName (Symbol x) = x
23
fromName (Symbol x) = x
23
false
false
0
6
4
16
7
9
null
null
amccausl/RDF4H
src/Data/RDF.hs
bsd-3-clause
expandTriples :: (RDF rdf) => rdf -> Triples expandTriples rdf = expandTriples' [] (baseUrl rdf) (prefixMappings rdf) (triplesOf rdf)
133
expandTriples :: (RDF rdf) => rdf -> Triples expandTriples rdf = expandTriples' [] (baseUrl rdf) (prefixMappings rdf) (triplesOf rdf)
133
expandTriples rdf = expandTriples' [] (baseUrl rdf) (prefixMappings rdf) (triplesOf rdf)
88
false
true
0
7
18
56
28
28
null
null
ghcjs/jsaddle-dom
src/JSDOM/EventM.hs
mit
eventPhase :: IsEvent e => EventM t e Word eventPhase = event >>= (lift . Event.getEventPhase)
94
eventPhase :: IsEvent e => EventM t e Word eventPhase = event >>= (lift . Event.getEventPhase)
94
eventPhase = event >>= (lift . Event.getEventPhase)
51
false
true
0
8
15
38
19
19
null
null
nickbart1980/pandoc
src/Text/Pandoc/Writers/OpenDocument.hs
gpl-2.0
addTableStyle :: Doc -> State WriterState () addTableStyle i = modify $ \s -> s { stTableStyles = i : stTableStyles s }
119
addTableStyle :: Doc -> State WriterState () addTableStyle i = modify $ \s -> s { stTableStyles = i : stTableStyles s }
119
addTableStyle i = modify $ \s -> s { stTableStyles = i : stTableStyles s }
74
false
true
0
10
22
49
25
24
null
null
choener/RNAdesign
BioInf/RNAdesign/OptParser.hs
gpl-3.0
arseSingleOp xs = choice $ map mkSingleOp xs
45
parseSingleOp xs = choice $ map mkSingleOp xs
45
parseSingleOp xs = choice $ map mkSingleOp xs
45
false
false
0
6
8
18
8
10
null
null
thomie/vector
Data/Vector/Mutable.hs
bsd-3-clause
set = G.set
11
set = G.set
11
set = G.set
11
false
false
1
6
2
12
4
8
null
null
ppenzin/hs-ports-tools
src/Config/FreeBSD/Package.hs
bsd-2-clause
getOutdatedPackagesPkg :: IO ([String]) getOutdatedPackagesPkg = readProcess "pkg_version" ["-l", "<"] "" >>= return . pkgToNames
150
getOutdatedPackagesPkg :: IO ([String]) getOutdatedPackagesPkg = readProcess "pkg_version" ["-l", "<"] "" >>= return . pkgToNames
150
getOutdatedPackagesPkg = readProcess "pkg_version" ["-l", "<"] "" >>= return . pkgToNames
110
false
true
0
8
35
41
22
19
null
null
tolysz/prepare-ghcjs
spec-lts8/base/Data/Typeable/Internal.hs
bsd-3-clause
typeRepFingerprints :: [KindRep] -> [TypeRep] -> [Fingerprint] -- Builds no thunks typeRepFingerprints kinds types = go1 [] kinds where go1 acc [] = go2 acc types go1 acc (k:ks) = let !fp = typeRepFingerprint k in go1 (fp:acc) ks go2 acc [] = acc go2 acc (t:ts) = let !fp...
456
typeRepFingerprints :: [KindRep] -> [TypeRep] -> [Fingerprint] typeRepFingerprints kinds types = go1 [] kinds where go1 acc [] = go2 acc types go1 acc (k:ks) = let !fp = typeRepFingerprint k in go1 (fp:acc) ks go2 acc [] = acc go2 acc (t:ts) = let !fp = typeRepFingerprin...
436
typeRepFingerprints kinds types = go1 [] kinds where go1 acc [] = go2 acc types go1 acc (k:ks) = let !fp = typeRepFingerprint k in go1 (fp:acc) ks go2 acc [] = acc go2 acc (t:ts) = let !fp = typeRepFingerprint t in go2 (fp:acc) ts -- | Applies a kin...
373
true
true
0
9
139
164
80
84
null
null
np/mbox-tools
FmtComb.hs
bsd-3-clause
mboxMsgF = mkF $ flip C.snoc '\n' . showMboxMessage
57
mboxMsgF = mkF $ flip C.snoc '\n' . showMboxMessage
57
mboxMsgF = mkF $ flip C.snoc '\n' . showMboxMessage
57
false
false
0
8
14
21
10
11
null
null
oldmanmike/ghc
compiler/codeGen/StgCmmPrim.hs
bsd-3-clause
emitPrimOp _ [] PrefetchByteArrayOp2 args = doPrefetchByteArrayOp 2 args
80
emitPrimOp _ [] PrefetchByteArrayOp2 args = doPrefetchByteArrayOp 2 args
80
emitPrimOp _ [] PrefetchByteArrayOp2 args = doPrefetchByteArrayOp 2 args
80
false
false
0
6
16
22
10
12
null
null
Solumin/ScriptNScribe
src/BreveLang.hs
mit
-- This bizarre-looking reversed construct is used to extract the language -- parsers we need from the call to "makeTokenParser". TokenParser { identifier = b_identifier , reserved = b_reserved , reservedOp = b_resop , naturalOrFloat = b_number , symbol = b_symbol ...
545
TokenParser { identifier = b_identifier , reserved = b_reserved , reservedOp = b_resop , naturalOrFloat = b_number , symbol = b_symbol , parens = b_parens , braces = b_braces , brackets = b_brackets , semi = b_semi ...
415
TokenParser { identifier = b_identifier , reserved = b_reserved , reservedOp = b_resop , naturalOrFloat = b_number , symbol = b_symbol , parens = b_parens , braces = b_braces , brackets = b_brackets , semi = b_semi ...
415
true
false
0
7
188
81
51
30
null
null
brendanhay/gogol
gogol-ml/gen/Network/Google/MachineLearning/Types/Product.hs
mpl-2.0
-- | Creates a value of 'GoogleCloudMlV1__ExplainRequest' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'gcmverHTTPBody' googleCloudMlV1__ExplainRequest :: GoogleCloudMlV1__ExplainRequest googleCloudMlV1__ExplainRequest = Googl...
375
googleCloudMlV1__ExplainRequest :: GoogleCloudMlV1__ExplainRequest googleCloudMlV1__ExplainRequest = GoogleCloudMlV1__ExplainRequest' {_gcmverHTTPBody = Nothing}
167
googleCloudMlV1__ExplainRequest = GoogleCloudMlV1__ExplainRequest' {_gcmverHTTPBody = Nothing}
96
true
true
0
6
48
24
16
8
null
null
ghcjs/jsaddle-dom
src/JSDOM/Generated/MutationObserver.hs
mit
-- | <https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver.takeRecords Mozilla MutationObserver.takeRecords documentation> takeRecords :: (MonadDOM m) => MutationObserver -> m [MutationRecord] takeRecords self = liftDOM ((self ^. jsf "takeRecords" ()) >>= fromJSArrayUnchecked)
305
takeRecords :: (MonadDOM m) => MutationObserver -> m [MutationRecord] takeRecords self = liftDOM ((self ^. jsf "takeRecords" ()) >>= fromJSArrayUnchecked)
168
takeRecords self = liftDOM ((self ^. jsf "takeRecords" ()) >>= fromJSArrayUnchecked)
86
true
true
0
11
40
63
31
32
null
null
ekmett/hask
old/src/Hask/Foldable.hs
bsd-3-clause
_WrapMonoidal = dimap runWrapMonoidal WrapMonoidal
50
_WrapMonoidal = dimap runWrapMonoidal WrapMonoidal
50
_WrapMonoidal = dimap runWrapMonoidal WrapMonoidal
50
false
false
0
5
4
11
5
6
null
null
alexander-at-github/eta
compiler/ETA/BasicTypes/BasicTypes.hs
bsd-3-clause
isOneOcc :: OccInfo -> Bool isOneOcc (OneOcc {}) = True
55
isOneOcc :: OccInfo -> Bool isOneOcc (OneOcc {}) = True
55
isOneOcc (OneOcc {}) = True
27
false
true
0
7
9
25
13
12
null
null
mightymoose/liquidhaskell
benchmarks/llrbtree-0.1.1/Data/Set/RBTree-appel.hs
bsd-3-clause
balS l k (Node R (Node B a y b) z c) = Node R (Node B l k a) y (rbal b z (makeRed c))
86
lbalS l k (Node R (Node B a y b) z c) = Node R (Node B l k a) y (rbal b z (makeRed c))
86
lbalS l k (Node R (Node B a y b) z c) = Node R (Node B l k a) y (rbal b z (makeRed c))
86
false
false
0
9
26
74
36
38
null
null
jasonzoladz/persistent
persistent-zookeeper/Database/Persist/Zookeeper/Query.hs
mit
fstIdx :: Ord a => [[(String,a)]] -> [[String]] fstIdx keys = flip map keys $ \ks -> flip map ks $ \k -> fst k
110
fstIdx :: Ord a => [[(String,a)]] -> [[String]] fstIdx keys = flip map keys $ \ks -> flip map ks $ \k -> fst k
110
fstIdx keys = flip map keys $ \ks -> flip map ks $ \k -> fst k
62
false
true
0
10
24
80
40
40
null
null
SavinaRoja/SavinaRoja.github.io
assets/centraldogma_algebraic.hs
mit
charToNuc 'G' = Guanosine
25
charToNuc 'G' = Guanosine
25
charToNuc 'G' = Guanosine
25
false
false
0
5
3
9
4
5
null
null
vikraman/ghc
compiler/basicTypes/SrcLoc.hs
bsd-3-clause
-- | Create a 'SrcSpan' between two points in a file mkRealSrcSpan :: RealSrcLoc -> RealSrcLoc -> RealSrcSpan mkRealSrcSpan loc1 loc2 = RealSrcSpan' file line1 col1 line2 col2 where line1 = srcLocLine loc1 line2 = srcLocLine loc2 col1 = srcLocCol loc1 col2 = srcLocCol loc2 file...
399
mkRealSrcSpan :: RealSrcLoc -> RealSrcLoc -> RealSrcSpan mkRealSrcSpan loc1 loc2 = RealSrcSpan' file line1 col1 line2 col2 where line1 = srcLocLine loc1 line2 = srcLocLine loc2 col1 = srcLocCol loc1 col2 = srcLocCol loc2 file = srcLocFile loc1 -- | 'True' if the span is known ...
346
mkRealSrcSpan loc1 loc2 = RealSrcSpan' file line1 col1 line2 col2 where line1 = srcLocLine loc1 line2 = srcLocLine loc2 col1 = srcLocCol loc1 col2 = srcLocCol loc2 file = srcLocFile loc1 -- | 'True' if the span is known to straddle only one line.
289
true
true
4
6
104
80
40
40
null
null
jmitchell/Idris-dev
src/Idris/Core/TT.hs
bsd-3-clause
tcname (SN (MethodN _)) = True
30
tcname (SN (MethodN _)) = True
30
tcname (SN (MethodN _)) = True
30
false
false
0
8
5
22
10
12
null
null
elblake/hs-php-session
Data/PHPSession/ImplicitConv/PHPTypeCoercion.hs
bsd-3-clause
convArrayListRightSide vars conv = case L.foldl' ontoTuple (Right []) vars of Left str -> Left str Right lst -> Right $ reverse lst where ontoTuple (Left str) _ = Left str ontoTuple (Right lst) (l,r) = case conv r of Left errr -> Left errr Right r'' -> Right $ (l,r''...
327
convArrayListRightSide vars conv = case L.foldl' ontoTuple (Right []) vars of Left str -> Left str Right lst -> Right $ reverse lst where ontoTuple (Left str) _ = Left str ontoTuple (Right lst) (l,r) = case conv r of Left errr -> Left errr Right r'' -> Right $ (l,r''...
327
convArrayListRightSide vars conv = case L.foldl' ontoTuple (Right []) vars of Left str -> Left str Right lst -> Right $ reverse lst where ontoTuple (Left str) _ = Left str ontoTuple (Right lst) (l,r) = case conv r of Left errr -> Left errr Right r'' -> Right $ (l,r''...
327
false
false
1
10
105
155
69
86
null
null
shlevy/ghc
compiler/basicTypes/Literal.hs
bsd-3-clause
isLitValue_maybe (MachWord i) = Just i
42
isLitValue_maybe (MachWord i) = Just i
42
isLitValue_maybe (MachWord i) = Just i
42
false
false
0
7
9
18
8
10
null
null
illis/hbook
test/VCardSpec.hs
bsd-3-clause
spec :: Spec spec = parallel $ do describe "readContentLine" $ it "reads a basic name & value line" $ property $ forAll ((,) <$> upperText <*> upperText) $ \(x, y) -> readContentLine(x <> ":" <> y) `shouldBe` ContentLine { name = x, value = y, param = [] } describe "semi" $ it "picks up a semi colon"...
5,446
spec :: Spec spec = parallel $ do describe "readContentLine" $ it "reads a basic name & value line" $ property $ forAll ((,) <$> upperText <*> upperText) $ \(x, y) -> readContentLine(x <> ":" <> y) `shouldBe` ContentLine { name = x, value = y, param = [] } describe "semi" $ it "picks up a semi colon"...
5,446
spec = parallel $ do describe "readContentLine" $ it "reads a basic name & value line" $ property $ forAll ((,) <$> upperText <*> upperText) $ \(x, y) -> readContentLine(x <> ":" <> y) `shouldBe` ContentLine { name = x, value = y, param = [] } describe "semi" $ it "picks up a semi colon" $ par...
5,433
false
true
0
18
1,019
1,355
731
624
null
null
keera-studios/hsQt
Qtc/Opengl/QGLPixelBuffer.hs
bsd-2-clause
qGLPixelBufferHasOpenGLPbuffers :: (()) -> IO (Bool) qGLPixelBufferHasOpenGLPbuffers () = withBoolResult $ qtc_QGLPixelBuffer_hasOpenGLPbuffers
149
qGLPixelBufferHasOpenGLPbuffers :: (()) -> IO (Bool) qGLPixelBufferHasOpenGLPbuffers () = withBoolResult $ qtc_QGLPixelBuffer_hasOpenGLPbuffers
149
qGLPixelBufferHasOpenGLPbuffers () = withBoolResult $ qtc_QGLPixelBuffer_hasOpenGLPbuffers
96
false
true
0
7
17
35
18
17
null
null
Szuuuken/funk-prog-pruefungs-vorbereitung
prüfung-2014-03-07/Aufgabe2-5.hs
mit
rrt Nil = True
14
rrt Nil = True
14
rrt Nil = True
14
false
false
1
5
3
13
4
9
null
null
green-haskell/ghc
compiler/cmm/MkGraph.hs
bsd-3-clause
lastWithArgsAndExtraStack :: DynFlags -> Transfer -> Area -> Convention -> [CmmActual] -> UpdFrameOffset -> [CmmActual] -> (ByteOff -> [GlobalReg] -> CmmAGraph) -> CmmAGraph lastWithArgsAndExtraStack dflags transfer area conv actuals updfr_off ...
506
lastWithArgsAndExtraStack :: DynFlags -> Transfer -> Area -> Convention -> [CmmActual] -> UpdFrameOffset -> [CmmActual] -> (ByteOff -> [GlobalReg] -> CmmAGraph) -> CmmAGraph lastWithArgsAndExtraStack dflags transfer area conv actuals updfr_off ...
506
lastWithArgsAndExtraStack dflags transfer area conv actuals updfr_off extra_stack last = copies <*> last outArgs regs where (outArgs, regs, copies) = copyOutOflow dflags conv transfer area actuals updfr_off extra_stack
280
false
true
0
16
164
122
63
59
null
null
anr/prog-haskell
chapter-07.hs
mit
-- 2 -- a all' :: (a -> Bool) -> [a] -> Bool all' p = and . map p
67
all' :: (a -> Bool) -> [a] -> Bool all' p = and . map p
55
all' p = and . map p
20
true
true
0
7
21
41
22
19
null
null
firegurafiku/ImplicitEMC
src/Physics/ImplicitEMC/DiscreteSequence.hs
gpl-2.0
regularSequence :: (Float, Float) -> Int -> DiscreteSequence regularSequence (a, b) num | num > 1 = RegularSequence (a, b) num
126
regularSequence :: (Float, Float) -> Int -> DiscreteSequence regularSequence (a, b) num | num > 1 = RegularSequence (a, b) num
126
regularSequence (a, b) num | num > 1 = RegularSequence (a, b) num
65
false
true
0
8
20
57
30
27
null
null
rfranek/duckling
Duckling/AmountOfMoney/Helpers.hs
bsd-3-clause
currencyOnly :: Currency -> AmountOfMoneyData currencyOnly c = AmountOfMoneyData {currency = c, value = Nothing}
112
currencyOnly :: Currency -> AmountOfMoneyData currencyOnly c = AmountOfMoneyData {currency = c, value = Nothing}
112
currencyOnly c = AmountOfMoneyData {currency = c, value = Nothing}
66
false
true
0
7
14
41
20
21
null
null
YLiLarry/db-model
src/DB/Model/Internal/Where.hs
mit
(?<) :: String -> [A.Value] -> Where t query ?< vals = return $ WhereCompiled query vals
88
(?<) :: String -> [A.Value] -> Where t query ?< vals = return $ WhereCompiled query vals
88
query ?< vals = return $ WhereCompiled query vals
49
false
true
2
9
16
48
23
25
null
null
acowley/ghc
compiler/types/OptCoercion.hs
bsd-3-clause
opt_trans_rule is co1 co2@(TyConAppCo r tc cos2) | Just cos1 <- etaTyConAppCo_maybe tc co1 = ASSERT( length cos1 == length cos2 ) fireTransRule "EtaCompR" co1 co2 $ TyConAppCo r tc (opt_transList is cos1 cos2)
221
opt_trans_rule is co1 co2@(TyConAppCo r tc cos2) | Just cos1 <- etaTyConAppCo_maybe tc co1 = ASSERT( length cos1 == length cos2 ) fireTransRule "EtaCompR" co1 co2 $ TyConAppCo r tc (opt_transList is cos1 cos2)
221
opt_trans_rule is co1 co2@(TyConAppCo r tc cos2) | Just cos1 <- etaTyConAppCo_maybe tc co1 = ASSERT( length cos1 == length cos2 ) fireTransRule "EtaCompR" co1 co2 $ TyConAppCo r tc (opt_transList is cos1 cos2)
221
false
false
0
10
45
89
41
48
null
null
diku-dk/futhark
src/Futhark/CodeGen/RTS/C.hs
isc
-- | @rts/c/timing.h@ timingH :: T.Text timingH = $(embedStringFile "rts/c/timing.h")
85
timingH :: T.Text timingH = $(embedStringFile "rts/c/timing.h")
63
timingH = $(embedStringFile "rts/c/timing.h")
45
true
true
0
8
9
28
12
16
null
null
grandpascorpion/canon
Math/NumberTheory/Canon.hs
gpl-3.0
integerShowCutoff :: Integer -- numbers larger than this won't be fully printed by default integerShowCutoff = (10 :: Integer) ^ (1000 :: Integer)
146
integerShowCutoff :: Integer integerShowCutoff = (10 :: Integer) ^ (1000 :: Integer)
84
integerShowCutoff = (10 :: Integer) ^ (1000 :: Integer)
55
true
true
0
7
22
35
18
17
null
null
jeffchao/hedgewars-accessible
gameServer/HWProtoNEState.hs
gpl-2.0
handleCmd_NotEntered ["PASSWORD", passwd] = do (ci, irnc) <- ask let cl = irnc `client` ci if passwd == webPassword cl then return $ JoinLobby : [AnswerClients [sendChan cl] ["ADMIN_ACCESS"] | isAdministrator cl] else return [ByeClient "Authentication failed"]
297
handleCmd_NotEntered ["PASSWORD", passwd] = do (ci, irnc) <- ask let cl = irnc `client` ci if passwd == webPassword cl then return $ JoinLobby : [AnswerClients [sendChan cl] ["ADMIN_ACCESS"] | isAdministrator cl] else return [ByeClient "Authentication failed"]
297
handleCmd_NotEntered ["PASSWORD", passwd] = do (ci, irnc) <- ask let cl = irnc `client` ci if passwd == webPassword cl then return $ JoinLobby : [AnswerClients [sendChan cl] ["ADMIN_ACCESS"] | isAdministrator cl] else return [ByeClient "Authentication failed"]
297
false
false
0
12
73
102
52
50
null
null
alanz/vh-play
src/GhcNet.hs
bsd-3-clause
getMatchGroup (MatchGroup ms _ptc) = map (\m -> getMatch $ unLoc m) ms
70
getMatchGroup (MatchGroup ms _ptc) = map (\m -> getMatch $ unLoc m) ms
70
getMatchGroup (MatchGroup ms _ptc) = map (\m -> getMatch $ unLoc m) ms
70
false
false
0
9
12
37
18
19
null
null
event/spim
MIMEDir.hs
agpl-3.0
takeBeforeCRLF (hchar : strtail) = hchar : takeBeforeCRLF strtail
65
takeBeforeCRLF (hchar : strtail) = hchar : takeBeforeCRLF strtail
65
takeBeforeCRLF (hchar : strtail) = hchar : takeBeforeCRLF strtail
65
false
false
0
6
8
24
11
13
null
null
metabrainz/musicbrainz-data-service
src/MusicBrainz/API/Artist.hs
gpl-2.0
-------------------------------------------------------------------------------- viewRelationships :: Form Text MusicBrainz (Set.Set LinkedRelationship) viewRelationships = Common.viewRelationships artistRevision
212
viewRelationships :: Form Text MusicBrainz (Set.Set LinkedRelationship) viewRelationships = Common.viewRelationships artistRevision
131
viewRelationships = Common.viewRelationships artistRevision
59
true
true
0
8
11
32
16
16
null
null
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/showSigned_3.hs
mit
primNegInt :: MyInt -> MyInt; primNegInt (Pos x) = Neg x
58
primNegInt :: MyInt -> MyInt primNegInt (Pos x) = Neg x
57
primNegInt (Pos x) = Neg x
26
false
true
0
7
12
28
14
14
null
null
brendanhay/gogol
gogol-youtube/gen/Network/Google/YouTube/Types/Product.hs
mpl-2.0
-- | Identifies what kind of resource this is. Value: the fixed string -- \"youtube#comment\". ccKind :: Lens' Comment Text ccKind = lens _ccKind (\ s a -> s{_ccKind = a})
171
ccKind :: Lens' Comment Text ccKind = lens _ccKind (\ s a -> s{_ccKind = a})
76
ccKind = lens _ccKind (\ s a -> s{_ccKind = a})
47
true
true
0
9
30
41
23
18
null
null
FranklinChen/Idris-dev
test/TestRun.hs
bsd-3-clause
main :: IO () main = do nodePath <- findExecutable "node" nodejsPath <- findExecutable "nodejs" let node = nodePath <|> nodejsPath case node of Nothing -> do putStrLn "For running the test suite against Node, node must be installed." exitFailure Just _ -> do defaultMainWithIngredien...
623
main :: IO () main = do nodePath <- findExecutable "node" nodejsPath <- findExecutable "nodejs" let node = nodePath <|> nodejsPath case node of Nothing -> do putStrLn "For running the test suite against Node, node must be installed." exitFailure Just _ -> do defaultMainWithIngredien...
623
main = do nodePath <- findExecutable "node" nodejsPath <- findExecutable "nodejs" let node = nodePath <|> nodejsPath case node of Nothing -> do putStrLn "For running the test suite against Node, node must be installed." exitFailure Just _ -> do defaultMainWithIngredients ingredients...
609
false
true
0
22
215
176
84
92
null
null
bruno-cadorette/AdventOfCode
Day 18/Day18.hs
mit
changeLight :: ConwayBoard -> ((Int, Int), Light) -> ((Int, Int), Light) changeLight board (i, light) = (i, next light (numberLighted i board)) where next _ _ |isStuck i board = On next On 2 = On next On 3 = On next Off 3 = On next _ _ = Off
299
changeLight :: ConwayBoard -> ((Int, Int), Light) -> ((Int, Int), Light) changeLight board (i, light) = (i, next light (numberLighted i board)) where next _ _ |isStuck i board = On next On 2 = On next On 3 = On next Off 3 = On next _ _ = Off
299
changeLight board (i, light) = (i, next light (numberLighted i board)) where next _ _ |isStuck i board = On next On 2 = On next On 3 = On next Off 3 = On next _ _ = Off
226
false
true
4
8
108
137
72
65
null
null
oldmanmike/hs-minecraft-protocol
generate/src/Generator/Printer/Types.hs
bsd-3-clause
docCountType :: Count -> Doc docCountType c = lparen <> string "Count" <+> docFieldType (countType c) <> rparen
165
docCountType :: Count -> Doc docCountType c = lparen <> string "Count" <+> docFieldType (countType c) <> rparen
165
docCountType c = lparen <> string "Count" <+> docFieldType (countType c) <> rparen
136
false
true
0
9
71
42
20
22
null
null
aburnett88/HSat
tests-src/Test/Make/Instances/Common/Clauses.hs
mit
isSolvable :: Clauses -> LiteralSet -> Property isSolvable clauses literalSet = listProperty (\clause -> property (varsEvalToTrue clause (getTrueSet literalSet) >= 1) ) (V.toList . getVectClause $ clauses)
258
isSolvable :: Clauses -> LiteralSet -> Property isSolvable clauses literalSet = listProperty (\clause -> property (varsEvalToTrue clause (getTrueSet literalSet) >= 1) ) (V.toList . getVectClause $ clauses)
258
isSolvable clauses literalSet = listProperty (\clause -> property (varsEvalToTrue clause (getTrueSet literalSet) >= 1) ) (V.toList . getVectClause $ clauses)
191
false
true
0
13
79
73
36
37
null
null
yliu120/K3
src/Language/K3/Analysis/Provenance/Inference.hs
apache-2.0
-- | Computes a single extended provenance tree for an expression. -- This includes an extra child at each PApply indicating the return value provenance -- of the apply. The provenance associated with each subexpression is stored as a -- separate relation in the environment rather than directly attached to each n...
6,820
inferProvenance :: K3 Expression -> PInfM (K3 Provenance) inferProvenance expr = do piseterrtleM $ Just expr mapIn1RebuildTree topdown sideways inferWithRule expr where topdown _ e@(tag -> ELambda i) = piexteM i (pfvar i) >> pushClosure e topdown _ _ = iu sideways p e@(tag -> ELetIn i) = uidOf e >>=...
6,495
inferProvenance expr = do piseterrtleM $ Just expr mapIn1RebuildTree topdown sideways inferWithRule expr where topdown _ e@(tag -> ELambda i) = piexteM i (pfvar i) >> pushClosure e topdown _ _ = iu sideways p e@(tag -> ELetIn i) = uidOf e >>= \u -> return [freshM i u p] sideways p e@(tag -> ECas...
6,437
true
true
240
17
2,021
2,562
1,342
1,220
null
null
mjakob/hgrib
src/Data/Grib.hs
gpl-3.0
-- |Set the values of the GRIB message from floats. setValues :: [Double] -> GribIO () setValues = setGeneric gribSetDoubleArray "values"
137
setValues :: [Double] -> GribIO () setValues = setGeneric gribSetDoubleArray "values"
85
setValues = setGeneric gribSetDoubleArray "values"
50
true
true
0
7
20
29
15
14
null
null
sdiehl/ghc
compiler/nativeGen/PPC/CodeGen.hs
bsd-3-clause
getRegister' _ (CmmMachOp (MO_UU_Conv W8 W32) [CmmLoad mem _]) = do Amode addr addr_code <- getAmode D mem return (Any II32 (\dst -> addr_code `snocOL` LD II8 dst addr))
177
getRegister' _ (CmmMachOp (MO_UU_Conv W8 W32) [CmmLoad mem _]) = do Amode addr addr_code <- getAmode D mem return (Any II32 (\dst -> addr_code `snocOL` LD II8 dst addr))
177
getRegister' _ (CmmMachOp (MO_UU_Conv W8 W32) [CmmLoad mem _]) = do Amode addr addr_code <- getAmode D mem return (Any II32 (\dst -> addr_code `snocOL` LD II8 dst addr))
177
false
false
1
14
36
90
42
48
null
null
olsner/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
smallIntegerName = varQual gHC_INTEGER_TYPE (fsLit "smallInteger") smallIntegerIdKey
94
smallIntegerName = varQual gHC_INTEGER_TYPE (fsLit "smallInteger") smallIntegerIdKey
94
smallIntegerName = varQual gHC_INTEGER_TYPE (fsLit "smallInteger") smallIntegerIdKey
94
false
false
0
7
16
19
9
10
null
null
keera-studios/hsQt
Qtc/Gui/QPen.hs
bsd-2-clause
qPen_delete :: QPen a -> IO () qPen_delete x0 = withObjectPtr x0 $ \cobj_x0 -> qtc_QPen_delete cobj_x0
108
qPen_delete :: QPen a -> IO () qPen_delete x0 = withObjectPtr x0 $ \cobj_x0 -> qtc_QPen_delete cobj_x0
108
qPen_delete x0 = withObjectPtr x0 $ \cobj_x0 -> qtc_QPen_delete cobj_x0
77
false
true
0
7
22
41
19
22
null
null
acowley/ghc
compiler/coreSyn/TrieMap.hs
bsd-3-clause
xtR Phantom f = RM . alterTM 3 f . unRM
48
xtR Phantom f = RM . alterTM 3 f . unRM
48
xtR Phantom f = RM . alterTM 3 f . unRM
48
false
false
1
7
19
29
11
18
null
null
AaronFriel/hs-tls
core/Network/TLS/Crypto.hs
bsd-3-clause
hashBlockSize SHA1_MD5 = 64
27
hashBlockSize SHA1_MD5 = 64
27
hashBlockSize SHA1_MD5 = 64
27
false
false
0
5
3
9
4
5
null
null
oldmanmike/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
metaSelDataConName = dcQual gHC_GENERICS (fsLit "MetaSel") metaSelDataConKey
80
metaSelDataConName = dcQual gHC_GENERICS (fsLit "MetaSel") metaSelDataConKey
80
metaSelDataConName = dcQual gHC_GENERICS (fsLit "MetaSel") metaSelDataConKey
80
false
false
0
7
10
19
9
10
null
null
DanielWaterworth/Idris-dev
src/IRTS/Defunctionalise.hs
bsd-3-clause
toConsA :: [(Name, Int)] -> (Name, Int) -> [(Name, Int, EvalApply DAlt)] toConsA ns (n, i) | Just ar <- lookup n ns -- = (mkFnCon n, i, -- EvalCase (\tlarg -> -- (DConCase (-1) (mkFnCon n) (take i (genArgs 0)) -- (dupdate tlarg -- (DApp False n (map (DV . Gl...
430
toConsA :: [(Name, Int)] -> (Name, Int) -> [(Name, Int, EvalApply DAlt)] toConsA ns (n, i) | Just ar <- lookup n ns -- = (mkFnCon n, i, -- EvalCase (\tlarg -> -- (DConCase (-1) (mkFnCon n) (take i (genArgs 0)) -- (dupdate tlarg -- (DApp False n (map (DV . Gl...
430
toConsA ns (n, i) | Just ar <- lookup n ns -- = (mkFnCon n, i, -- EvalCase (\tlarg -> -- (DConCase (-1) (mkFnCon n) (take i (genArgs 0)) -- (dupdate tlarg -- (DApp False n (map (DV . Glob) (take i (genArgs 0)))))))) = mkApplyCase n ar i | other...
357
false
true
1
9
148
112
61
51
null
null
jmitchell/Idris-dev
src/Idris/AbsSyntaxTree.hs
bsd-3-clause
defined (PNamespace _ _ ds) = concatMap defined ds
72
defined (PNamespace _ _ ds) = concatMap defined ds
72
defined (PNamespace _ _ ds) = concatMap defined ds
72
false
false
0
6
30
25
11
14
null
null
ulricha/dsh
src/Database/DSH/Tests/DSHComprehensions.hs
bsd-3-clause
nj10 :: [Integer] -> [Integer] -> Q [Integer] nj10 njxs njys = [ x + sum [ x * y | y <- toQ njys, x == y ] | x <- toQ njxs ]
124
nj10 :: [Integer] -> [Integer] -> Q [Integer] nj10 njxs njys = [ x + sum [ x * y | y <- toQ njys, x == y ] | x <- toQ njxs ]
124
nj10 njxs njys = [ x + sum [ x * y | y <- toQ njys, x == y ] | x <- toQ njxs ]
78
false
true
0
11
34
83
42
41
null
null
fmapfmapfmap/amazonka
amazonka-redshift/test/Test/AWS/Gen/Redshift.hs
mpl-2.0
testRestoreFromClusterSnapshotResponse :: RestoreFromClusterSnapshotResponse -> TestTree testRestoreFromClusterSnapshotResponse = res "RestoreFromClusterSnapshotResponse" "fixture/RestoreFromClusterSnapshotResponse.proto" redshift (Proxy :: Proxy RestoreFromClusterSnapshot)
290
testRestoreFromClusterSnapshotResponse :: RestoreFromClusterSnapshotResponse -> TestTree testRestoreFromClusterSnapshotResponse = res "RestoreFromClusterSnapshotResponse" "fixture/RestoreFromClusterSnapshotResponse.proto" redshift (Proxy :: Proxy RestoreFromClusterSnapshot)
290
testRestoreFromClusterSnapshotResponse = res "RestoreFromClusterSnapshotResponse" "fixture/RestoreFromClusterSnapshotResponse.proto" redshift (Proxy :: Proxy RestoreFromClusterSnapshot)
201
false
true
0
6
30
36
17
19
null
null
jean-edouard/manager
xenmgr/XenMgr/Expose/HostObject.hs
gpl-2.0
_GetSecondsFromEpoch :: Rpc Int32 _GetSecondsFromEpoch = round . realToFrac <$> liftIO epochTime
96
_GetSecondsFromEpoch :: Rpc Int32 _GetSecondsFromEpoch = round . realToFrac <$> liftIO epochTime
96
_GetSecondsFromEpoch = round . realToFrac <$> liftIO epochTime
62
false
true
0
6
11
25
12
13
null
null
agocorona/tryhplay
examples/examples.hs
gpl-3.0
sumTwo :: Widget () sumTwo = p "This widget sum two numbers and append the result. Using applicative and monadic expressions" ++> (p <<< do r <- (+) <$> fromStr "first number" ++> br ++> inputInt Nothing `fire` OnKeyUp <++ br <*> fromStr "second number " ++> br ...
525
sumTwo :: Widget () sumTwo = p "This widget sum two numbers and append the result. Using applicative and monadic expressions" ++> (p <<< do r <- (+) <$> fromStr "first number" ++> br ++> inputInt Nothing `fire` OnKeyUp <++ br <*> fromStr "second number " ++> br ...
525
sumTwo = p "This widget sum two numbers and append the result. Using applicative and monadic expressions" ++> (p <<< do r <- (+) <$> fromStr "first number" ++> br ++> inputInt Nothing `fire` OnKeyUp <++ br <*> fromStr "second number " ++> br ++> inputInt Not...
505
false
true
0
21
162
164
80
84
null
null
exitmouse/proper
glfw-demo/src/Main.hs
gpl-3.0
windowSizeCallback tc win w h = atomically $ writeTQueue tc $ EventWindowSize win w h
102
windowSizeCallback tc win w h = atomically $ writeTQueue tc $ EventWindowSize win w h
102
windowSizeCallback tc win w h = atomically $ writeTQueue tc $ EventWindowSize win w h
102
false
false
0
7
31
33
15
18
null
null
siddhanathan/ghc
compiler/hsSyn/HsPat.hs
bsd-3-clause
pprParendLPat :: (OutputableBndr name) => LPat name -> SDoc pprParendLPat (L _ p) = pprParendPat p
98
pprParendLPat :: (OutputableBndr name) => LPat name -> SDoc pprParendLPat (L _ p) = pprParendPat p
98
pprParendLPat (L _ p) = pprParendPat p
38
false
true
0
7
15
41
20
21
null
null
mrshannon/trees
src/Logic/Animation.hs
gpl-2.0
animate :: Double -> A.App -> A.App animate dt = animateSun dt
62
animate :: Double -> A.App -> A.App animate dt = animateSun dt
62
animate dt = animateSun dt
26
false
true
0
7
11
29
14
15
null
null
antarestrader/sapphire
Parser.hs
gpl-3.0
super :: Bool -> TParser Exp super p = do keyword "super" (argumentList p >>= (\args-> return $ ESuper $ Just args)) <|> return (ESuper Nothing)
148
super :: Bool -> TParser Exp super p = do keyword "super" (argumentList p >>= (\args-> return $ ESuper $ Just args)) <|> return (ESuper Nothing)
148
super p = do keyword "super" (argumentList p >>= (\args-> return $ ESuper $ Just args)) <|> return (ESuper Nothing)
119
false
true
0
13
29
72
34
38
null
null
sinelaw/buildsome
src/Buildsome/BuildMaps.hs
gpl-2.0
descOfTarget :: Target -> TargetDesc descOfTarget target = TargetDesc (computeTargetRep target) target
102
descOfTarget :: Target -> TargetDesc descOfTarget target = TargetDesc (computeTargetRep target) target
102
descOfTarget target = TargetDesc (computeTargetRep target) target
65
false
true
0
7
11
29
14
15
null
null
geophf/1HaskellADay
exercises/HAD/Y2018/M06/D15/Exercise.hs
mit
sortedArticles :: [Article] -> Map ArticleId [Article] sortedArticles arts = undefined
86
sortedArticles :: [Article] -> Map ArticleId [Article] sortedArticles arts = undefined
86
sortedArticles arts = undefined
31
false
true
0
7
10
29
15
14
null
null
nandotorterolo/Tactics
src/Main.hs
bsd-3-clause
strAFicha :: Char -> Ficha strAFicha 'H' = (Hacha, Blanca)
58
strAFicha :: Char -> Ficha strAFicha 'H' = (Hacha, Blanca)
58
strAFicha 'H' = (Hacha, Blanca)
31
false
true
0
5
9
24
13
11
null
null
keitax/wikirick
spec/AppHandlerSpec.hs
bsd-3-clause
beRendered :: Response' -> (BS.ByteString, Splices (I.Splice AppHandler)) -> Expectation beRendered res (templateName, s) = do res' <- mustBeRight res body <- ST.getResponseBody res' body' <- renderView body `shouldBe` body' where renderView = do res' <- SST.runHandler Nothing (return ()) doRender $...
469
beRendered :: Response' -> (BS.ByteString, Splices (I.Splice AppHandler)) -> Expectation beRendered res (templateName, s) = do res' <- mustBeRight res body <- ST.getResponseBody res' body' <- renderView body `shouldBe` body' where renderView = do res' <- SST.runHandler Nothing (return ()) doRender $...
469
beRendered res (templateName, s) = do res' <- mustBeRight res body <- ST.getResponseBody res' body' <- renderView body `shouldBe` body' where renderView = do res' <- SST.runHandler Nothing (return ()) doRender $ mockedApp repositoryMock res'' <- mustBeRight res' liftIO $ ST.getResponseBo...
380
false
true
0
12
93
160
76
84
null
null
rueshyna/gogol
gogol-analytics/gen/Network/Google/Analytics/Types/Product.hs
mpl-2.0
-- | Desired sampling level mdqSamplingLevel :: Lens' McfDataQuery (Maybe Text) mdqSamplingLevel = lens _mdqSamplingLevel (\ s a -> s{_mdqSamplingLevel = a})
165
mdqSamplingLevel :: Lens' McfDataQuery (Maybe Text) mdqSamplingLevel = lens _mdqSamplingLevel (\ s a -> s{_mdqSamplingLevel = a})
137
mdqSamplingLevel = lens _mdqSamplingLevel (\ s a -> s{_mdqSamplingLevel = a})
85
true
true
0
9
29
48
25
23
null
null
MateVM/harpy
Harpy/X86Assembler.hs
gpl-2.0
popfd = ensureBufferSize x86_max_instruction_bytes >> x86_popfd
64
popfd = ensureBufferSize x86_max_instruction_bytes >> x86_popfd
64
popfd = ensureBufferSize x86_max_instruction_bytes >> x86_popfd
64
false
false
0
6
6
13
6
7
null
null
dimara/ganeti
src/Ganeti/OpParams.hs
bsd-2-clause
pWaitForSyncFalse :: Field pWaitForSyncFalse = withDoc "Whether to wait for the disk to synchronize (defaults to false)" $ defaultField [| False |] pWaitForSync
164
pWaitForSyncFalse :: Field pWaitForSyncFalse = withDoc "Whether to wait for the disk to synchronize (defaults to false)" $ defaultField [| False |] pWaitForSync
164
pWaitForSyncFalse = withDoc "Whether to wait for the disk to synchronize (defaults to false)" $ defaultField [| False |] pWaitForSync
137
false
true
0
6
26
26
14
12
null
null
michalkonecny/aern2
aern2-fun-plot/server/src/AERN2/RealFun/PlotService/App.hs
bsd-3-clause
apiServer :: Functions -> SamplingsStore -> Server Api apiServer fns samplingsStore = listSamplings samplingsStore :<|> postSampling samplingsStore :<|> getSampling samplingsStore :<|> listFunctionIds fns :<|> getFunctionDomain fns :<|> getFunctionValues fns samplingsStore :<|> getFunctionName fns :<|> ...
343
apiServer :: Functions -> SamplingsStore -> Server Api apiServer fns samplingsStore = listSamplings samplingsStore :<|> postSampling samplingsStore :<|> getSampling samplingsStore :<|> listFunctionIds fns :<|> getFunctionDomain fns :<|> getFunctionValues fns samplingsStore :<|> getFunctionName fns :<|> ...
343
apiServer fns samplingsStore = listSamplings samplingsStore :<|> postSampling samplingsStore :<|> getSampling samplingsStore :<|> listFunctionIds fns :<|> getFunctionDomain fns :<|> getFunctionValues fns samplingsStore :<|> getFunctionName fns :<|> getFunctionColour fns
286
false
true
9
8
53
96
43
53
null
null
alexander-at-github/eta
compiler/ETA/Prelude/PrimOp.hs
bsd-3-clause
primOpCanFail WriteByteArrayOp_Word = True
42
primOpCanFail WriteByteArrayOp_Word = True
42
primOpCanFail WriteByteArrayOp_Word = True
42
false
false
0
5
3
9
4
5
null
null
TransformingMusicology/tabcode-haskell
src/TabCode/Serialiser/MEIXML/Elements.hs
gpl-3.0
durSymb Demisemiquaver Compound Dot = pack "T3."
48
durSymb Demisemiquaver Compound Dot = pack "T3."
48
durSymb Demisemiquaver Compound Dot = pack "T3."
48
false
false
0
5
6
19
7
12
null
null
aretoky/egison2
hs-src/Language/Egison/Numerical.hs
mit
singleOp :: (PrimitiveVal a, PrimitiveVal b) => (a -> b) -> [EgisonVal] -> ThrowsError EgisonVal singleOp op [x] = toEgisonVal . op <$> fromEgisonVal x
151
singleOp :: (PrimitiveVal a, PrimitiveVal b) => (a -> b) -> [EgisonVal] -> ThrowsError EgisonVal singleOp op [x] = toEgisonVal . op <$> fromEgisonVal x
151
singleOp op [x] = toEgisonVal . op <$> fromEgisonVal x
54
false
true
0
8
24
66
34
32
null
null
siddhanathan/ghc
compiler/main/DriverPipeline.hs
bsd-3-clause
getHCFilePackages :: FilePath -> IO [UnitId] getHCFilePackages filename = Exception.bracket (openFile filename ReadMode) hClose $ \h -> do l <- hGetLine h case l of '/':'*':' ':'G':'H':'C':'_':'P':'A':'C':'K':'A':'G':'E':'S':rest -> return (map stringToUnitId (words rest)) _other -> ...
916
getHCFilePackages :: FilePath -> IO [UnitId] getHCFilePackages filename = Exception.bracket (openFile filename ReadMode) hClose $ \h -> do l <- hGetLine h case l of '/':'*':' ':'G':'H':'C':'_':'P':'A':'C':'K':'A':'G':'E':'S':rest -> return (map stringToUnitId (words rest)) _other -> ...
916
getHCFilePackages filename = Exception.bracket (openFile filename ReadMode) hClose $ \h -> do l <- hGetLine h case l of '/':'*':' ':'G':'H':'C':'_':'P':'A':'C':'K':'A':'G':'E':'S':rest -> return (map stringToUnitId (words rest)) _other -> return [] ----------------------------...
871
false
true
0
26
170
170
88
82
null
null
blippy/sifi
src/Utils.hs
gpl-3.0
printn n lst = mapM_ print (take n lst)
41
printn n lst = mapM_ print (take n lst)
41
printn n lst = mapM_ print (take n lst)
41
false
false
0
7
10
24
11
13
null
null
peat/hbot
src/Game.hs
bsd-3-clause
applyAdjustment :: Adjustment -> Character applyAdjustment (Adjustment (Character n h) a) = Character n (h + a)
111
applyAdjustment :: Adjustment -> Character applyAdjustment (Adjustment (Character n h) a) = Character n (h + a)
111
applyAdjustment (Adjustment (Character n h) a) = Character n (h + a)
68
false
true
0
9
16
46
23
23
null
null
jamshidh/ethereum-merkle-patricia-db
src/Blockchain/Database/MerklePatricia/Internal.hs
bsd-3-clause
getCommonPrefix::Eq a=>[a]->[a]->([a], [a], [a]) getCommonPrefix (c1:rest1) (c2:rest2) | c1 == c2 = prefixTheCommonPrefix c1 (getCommonPrefix rest1 rest2) where prefixTheCommonPrefix c (p, x, y) = (c:p, x, y)
216
getCommonPrefix::Eq a=>[a]->[a]->([a], [a], [a]) getCommonPrefix (c1:rest1) (c2:rest2) | c1 == c2 = prefixTheCommonPrefix c1 (getCommonPrefix rest1 rest2) where prefixTheCommonPrefix c (p, x, y) = (c:p, x, y)
216
getCommonPrefix (c1:rest1) (c2:rest2) | c1 == c2 = prefixTheCommonPrefix c1 (getCommonPrefix rest1 rest2) where prefixTheCommonPrefix c (p, x, y) = (c:p, x, y)
167
false
true
0
9
34
126
69
57
null
null
egison/egison
hs-src/Language/Egison/MList.hs
mit
mAny p (MCons x xs) = do b <- p x if b then return True else do xs' <- xs mAny p xs'
105
mAny p (MCons x xs) = do b <- p x if b then return True else do xs' <- xs mAny p xs'
105
mAny p (MCons x xs) = do b <- p x if b then return True else do xs' <- xs mAny p xs'
105
false
false
0
10
44
58
26
32
null
null
Yuras/mongodb
Database/MongoDB/Internal/Protocol.hs
apache-2.0
qBit NoCursorTimeout = bit 4
28
qBit NoCursorTimeout = bit 4
28
qBit NoCursorTimeout = bit 4
28
false
false
0
5
4
12
5
7
null
null
psibi/persistent
persistent/Database/Persist/Class/PersistField.hs
mit
fromPersistMap :: PersistField v => [(T.Text, PersistValue)] -> Either T.Text (M.Map T.Text v) fromPersistMap = foldShortLeft fromPersistValue [] where -- a fold that short-circuits on Left. foldShortLeft f = go where go acc [] = Right $ M.fromList acc go acc ...
470
fromPersistMap :: PersistField v => [(T.Text, PersistValue)] -> Either T.Text (M.Map T.Text v) fromPersistMap = foldShortLeft fromPersistValue [] where -- a fold that short-circuits on Left. foldShortLeft f = go where go acc [] = Right $ M.fromList acc go acc ...
470
fromPersistMap = foldShortLeft fromPersistValue [] where -- a fold that short-circuits on Left. foldShortLeft f = go where go acc [] = Right $ M.fromList acc go acc ((k, v):kvs) = case f v of Left e -> Left e Right v' -> go ((k,v'):acc) kvs -- | FIXME A...
345
false
true
0
15
162
168
84
84
null
null
UU-ComputerScience/uulib
src/UU/Parsing/Derived.hs
bsd-3-clause
pList1Sep_gr :: (IsParser p s) => p a1 -> p a -> p [a] pList1Sep_gr s p = pFoldr1Sep_gr list_alg s p
101
pList1Sep_gr :: (IsParser p s) => p a1 -> p a -> p [a] pList1Sep_gr s p = pFoldr1Sep_gr list_alg s p
101
pList1Sep_gr s p = pFoldr1Sep_gr list_alg s p
46
false
true
0
10
22
59
27
32
null
null
hferreiro/replay
compiler/cmm/CmmType.hs
bsd-3-clause
gcWord :: DynFlags -> CmmType gcWord dflags = CmmType GcPtrCat (wordWidth dflags)
81
gcWord :: DynFlags -> CmmType gcWord dflags = CmmType GcPtrCat (wordWidth dflags)
81
gcWord dflags = CmmType GcPtrCat (wordWidth dflags)
51
false
true
0
7
11
35
15
20
null
null
alexander-at-github/eta
compiler/ETA/Prelude/PrimOp.hs
bsd-3-clause
tagOf_PrimOp MkApUpd0_Op = _ILIT(391)
37
tagOf_PrimOp MkApUpd0_Op = _ILIT(391)
37
tagOf_PrimOp MkApUpd0_Op = _ILIT(391)
37
false
false
0
6
3
15
7
8
null
null
google/haskell-indexer
haskell-indexer-backend-ghc/tests/Language/Haskell/Indexer/Backend/Ghc/Test/TestHelper.hs
apache-2.0
-- | Convenience for asserting analysis of testdata-relative files and other -- arguments. The 'extraFiles' get added to the input directory, but don't get -- passed on the GHC command line. assertXRefsFromExtra :: [FilePath] -> [String] -> ReaderT XRef IO () -> ReaderT TestEnv IO () assertXRefsFromExtra extraF...
509
assertXRefsFromExtra :: [FilePath] -> [String] -> ReaderT XRef IO () -> ReaderT TestEnv IO () assertXRefsFromExtra extraFiles args asserts = do xref <- fmap mergeRefs (analyse extraFiles args) liftIO (runReaderT asserts xref) -- | Analyses invocation with given args, relative to the 'data' directory.
318
assertXRefsFromExtra extraFiles args asserts = do xref <- fmap mergeRefs (analyse extraFiles args) liftIO (runReaderT asserts xref) -- | Analyses invocation with given args, relative to the 'data' directory.
216
true
true
0
11
91
97
47
50
null
null
jchitel/ProjectEuler.hs
Problems/Problem0022.hs
mit
problem22Value :: String -> Int problem22Value str = sum $ getNameScores $ sort $ lines str
91
problem22Value :: String -> Int problem22Value str = sum $ getNameScores $ sort $ lines str
91
problem22Value str = sum $ getNameScores $ sort $ lines str
59
false
true
2
7
15
39
17
22
null
null
HJvT/hdirect
src/Parser.hs
bsd-3-clause
action_2 (144#) = happyReduce_344
33
action_2 (144#) = happyReduce_344
33
action_2 (144#) = happyReduce_344
33
false
false
0
6
3
12
6
6
null
null
skywind3000/language
haskell/mtable.hs
mit
main = do print mtable
31
main = do print mtable
31
main = do print mtable
31
false
false
0
7
13
12
5
7
null
null
Solpatium/Haskell-Sudoku
src/SudokuAbstract.hs
bsd-3-clause
isValid :: (SudokuBoard b, SudokuSquare s, SudokuValue v) => b (s v) -> Bool isValid board = all noDuplicates $ concat [ [row i, column i, group i] | i<-[0..8] ] where row = getRow board column = getColumn board group = getGroup board ...
384
isValid :: (SudokuBoard b, SudokuSquare s, SudokuValue v) => b (s v) -> Bool isValid board = all noDuplicates $ concat [ [row i, column i, group i] | i<-[0..8] ] where row = getRow board column = getColumn board group = getGroup board ...
384
isValid board = all noDuplicates $ concat [ [row i, column i, group i] | i<-[0..8] ] where row = getRow board column = getColumn board group = getGroup board noDuplicates list = (length list) == (length $ nub list)
307
false
true
0
10
146
146
73
73
null
null
LambdaHack/LambdaHack
engine-src/Game/LambdaHack/Common/Faction.hs
bsd-3-clause
ppContainer _ CEmbed{} = "embedded nearby"
42
ppContainer _ CEmbed{} = "embedded nearby"
42
ppContainer _ CEmbed{} = "embedded nearby"
42
false
false
1
5
5
15
7
8
null
null
unisonweb/platform
parser-typechecker/src/Unison/Codebase/SqliteCodebase/Conversions.hs
mit
rreferent2to1 :: Applicative m => Hash -> (Hash -> m V1.Reference.Size) -> (V2.Reference -> m CT.ConstructorType) -> V2.ReferentH -> m V1.Referent rreferent2to1 h lookupSize lookupCT = \case V2.Ref r -> V1.Ref <$> rreference2to1 h lookupSize r V2.Con r i -> V1.Con <$> reference2to1 lookupSize r <*> pure (fromIntegr...
340
rreferent2to1 :: Applicative m => Hash -> (Hash -> m V1.Reference.Size) -> (V2.Reference -> m CT.ConstructorType) -> V2.ReferentH -> m V1.Referent rreferent2to1 h lookupSize lookupCT = \case V2.Ref r -> V1.Ref <$> rreference2to1 h lookupSize r V2.Con r i -> V1.Con <$> reference2to1 lookupSize r <*> pure (fromIntegr...
340
rreferent2to1 h lookupSize lookupCT = \case V2.Ref r -> V1.Ref <$> rreference2to1 h lookupSize r V2.Con r i -> V1.Con <$> reference2to1 lookupSize r <*> pure (fromIntegral i) <*> lookupCT r
193
false
true
0
12
55
145
69
76
null
null
geophf/1HaskellADay
exercises/HAD/Y2021/M04/D05/Solution.hs
mit
{-- >>> hey 1 2 3 Vect {sz = 3, vals = [(),(),()]} --} -- also, you get size-adjustments for free, too, right? vappend :: Vector a -> Vector a -> Vector a vappend (Vect n1 v1) (Vect n2 v2) = Vect (n1 + n2) (v1 ++ v2)
219
vappend :: Vector a -> Vector a -> Vector a vappend (Vect n1 v1) (Vect n2 v2) = Vect (n1 + n2) (v1 ++ v2)
105
vappend (Vect n1 v1) (Vect n2 v2) = Vect (n1 + n2) (v1 ++ v2)
61
true
true
0
7
50
70
35
35
null
null
bbangert/hermes-hs
src/Hermes/Protocol/Websocket.hs
mpl-2.0
verifyAuth :: ByteString -> ClientPacket -> Bool verifyAuth secret (ExistingAuth deviceId key) = compareHmac secret key deviceId
128
verifyAuth :: ByteString -> ClientPacket -> Bool verifyAuth secret (ExistingAuth deviceId key) = compareHmac secret key deviceId
128
verifyAuth secret (ExistingAuth deviceId key) = compareHmac secret key deviceId
79
false
true
0
7
16
39
19
20
null
null
databrary/databrary
src/HTTP/Client.hs
agpl-3.0
requestAcceptContent :: BS.ByteString -> HC.Request -> HC.Request requestAcceptContent ct req = req { HC.requestHeaders = (hAccept, ct) : HC.requestHeaders req , HC.checkResponse = checkContentOk ct }
206
requestAcceptContent :: BS.ByteString -> HC.Request -> HC.Request requestAcceptContent ct req = req { HC.requestHeaders = (hAccept, ct) : HC.requestHeaders req , HC.checkResponse = checkContentOk ct }
206
requestAcceptContent ct req = req { HC.requestHeaders = (hAccept, ct) : HC.requestHeaders req , HC.checkResponse = checkContentOk ct }
140
false
true
0
10
31
70
36
34
null
null
mckeankylej/hchess
src/Utils.hs
bsd-3-clause
ps :: (FiniteBits a) => a -> IO () ps = put8 . showWord64
57
ps :: (FiniteBits a) => a -> IO () ps = put8 . showWord64
57
ps = put8 . showWord64
22
false
true
1
9
13
40
18
22
null
null
josuf107/Adverb
Adverb/Common.hs
gpl-3.0
crassly = id
12
crassly = id
12
crassly = id
12
false
false
0
4
2
6
3
3
null
null
aaronc/Idris-dev
src/Idris/Core/TT.hs
bsd-3-clause
-- | Deconstruct an application; returns the function and a list of arguments unApply :: TT n -> (TT n, [TT n]) unApply t = ua [] t where ua args (App _ f a) = ua (a:args) f ua args t = (t, args) -- | Returns a term representing the application of the first argument -- (a function) to every element of ...
340
unApply :: TT n -> (TT n, [TT n]) unApply t = ua [] t where ua args (App _ f a) = ua (a:args) f ua args t = (t, args) -- | Returns a term representing the application of the first argument -- (a function) to every element of the second argument.
262
unApply t = ua [] t where ua args (App _ f a) = ua (a:args) f ua args t = (t, args) -- | Returns a term representing the application of the first argument -- (a function) to every element of the second argument.
228
true
true
1
10
83
110
51
59
null
null
spechub/Hets
CASL/World.hs
gpl-2.0
{- | mixfix identifiers need to be extended by a further place holder. That is, identifiers are renamed, although a wrong number of place holders would allow to use the prefix notation. To avoid a name clashes with existing names the first place holder is preceded by a further place holder and a generated token. -} ad...
507
addPlace :: Id -> Id addPlace i@(Id ts ids ps) | isMixfix i = Id ((\ (x, y) -> x ++ placeTok : genToken "W" : y) (break isPlace ts)) ids ps | otherwise = i
189
addPlace i@(Id ts ids ps) | isMixfix i = Id ((\ (x, y) -> x ++ placeTok : genToken "W" : y) (break isPlace ts)) ids ps | otherwise = i
168
true
true
1
13
126
99
50
49
null
null
peterokagey/haskellOEIS
src/Polynomial/A300002.hs
apache-2.0
a300002_list :: [Integer] a300002_list = polynomialAvoidingSequence (tail . subsequences)
89
a300002_list :: [Integer] a300002_list = polynomialAvoidingSequence (tail . subsequences)
89
a300002_list = polynomialAvoidingSequence (tail . subsequences)
63
false
true
0
7
8
30
14
16
null
null
mcschroeder/todo-example
Main.hs
mit
itemLocation :: ListId -> ItemId -> ByteString itemLocation listId itemId = mconcat [ "/lists/", C.pack (show listId) , "/items/", C.pack (show itemId) ]
190
itemLocation :: ListId -> ItemId -> ByteString itemLocation listId itemId = mconcat [ "/lists/", C.pack (show listId) , "/items/", C.pack (show itemId) ]
190
itemLocation listId itemId = mconcat [ "/lists/", C.pack (show listId) , "/items/", C.pack (show itemId) ]
143
false
true
0
9
59
67
32
35
null
null
juhp/stack
etc/scripts/install-many-stack-releases.hs
bsd-3-clause
readVersion :: String -> Maybe Version readVersion = fmap fst . lastMay . readP_to_S parseVersion
97
readVersion :: String -> Maybe Version readVersion = fmap fst . lastMay . readP_to_S parseVersion
97
readVersion = fmap fst . lastMay . readP_to_S parseVersion
58
false
true
2
7
14
39
16
23
null
null
hpacheco/HAAP
src/HAAP/Code/Analysis/Usage.hs
mit
defUse :: DefUse -> (NameSet,NameSet) -> (NameSet,NameSet) defUse (ds1,us1) (ds2,us2) = (unionNameSet (maybe emptyNameSet id ds1) ds2,unionNameSet us1 us2)
155
defUse :: DefUse -> (NameSet,NameSet) -> (NameSet,NameSet) defUse (ds1,us1) (ds2,us2) = (unionNameSet (maybe emptyNameSet id ds1) ds2,unionNameSet us1 us2)
155
defUse (ds1,us1) (ds2,us2) = (unionNameSet (maybe emptyNameSet id ds1) ds2,unionNameSet us1 us2)
96
false
true
0
8
18
74
41
33
null
null