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
DaMSL/K3
src/Language/K3/Analysis/SEffects/Inference.hs
apache-2.0
noWritesOn _ env i u e = either (Left . T.unpack) Right $ do symcat <- categorizeExprEffects e noWritesOnBinding env i u symcat {- Pattern synonyms for inference -}
170
noWritesOn _ env i u e = either (Left . T.unpack) Right $ do symcat <- categorizeExprEffects e noWritesOnBinding env i u symcat {- Pattern synonyms for inference -}
170
noWritesOn _ env i u e = either (Left . T.unpack) Right $ do symcat <- categorizeExprEffects e noWritesOnBinding env i u symcat {- Pattern synonyms for inference -}
170
false
false
0
9
34
58
27
31
null
null
joelburget/haste-compiler
src/Haste/CodeGen.hs
bsd-3-clause
typeHasRep :: Type -> Bool typeHasRep t = case splitTyConApp_maybe t of Just (tc, _) -> tc /= statePrimTyCon _ -> True
139
typeHasRep :: Type -> Bool typeHasRep t = case splitTyConApp_maybe t of Just (tc, _) -> tc /= statePrimTyCon _ -> True
139
typeHasRep t = case splitTyConApp_maybe t of Just (tc, _) -> tc /= statePrimTyCon _ -> True
112
false
true
0
9
42
56
26
30
null
null
GaloisInc/saw-script
heapster-saw/src/Verifier/SAW/Heapster/archival/CrucibleTranslation.hs
bsd-3-clause
getTypedEntryID :: TypedEntry ext blocks ret args -> SomeTypedEntryID blocks getTypedEntryID (TypedEntry i _ _ _) = SomeTypedEntryID i
134
getTypedEntryID :: TypedEntry ext blocks ret args -> SomeTypedEntryID blocks getTypedEntryID (TypedEntry i _ _ _) = SomeTypedEntryID i
134
getTypedEntryID (TypedEntry i _ _ _) = SomeTypedEntryID i
57
false
true
0
7
18
45
21
24
null
null
mpickering/hackage-server
Distribution/Server/Features/Core/Backup.hs
bsd-3-clause
versionListToCSV :: [UploadInfo] -> CSV versionListToCSV infos = [showVersion versionCSVVer]:versionCSVKey: map (\(index, (time, user)) -> [ show (index :: Int) , formatUTCTime time , display user]) (zip [0..] infos) where versionCSVVer = V...
394
versionListToCSV :: [UploadInfo] -> CSV versionListToCSV infos = [showVersion versionCSVVer]:versionCSVKey: map (\(index, (time, user)) -> [ show (index :: Int) , formatUTCTime time , display user]) (zip [0..] infos) where versionCSVVer = V...
394
versionListToCSV infos = [showVersion versionCSVVer]:versionCSVKey: map (\(index, (time, user)) -> [ show (index :: Int) , formatUTCTime time , display user]) (zip [0..] infos) where versionCSVVer = Version [0,1] ["unstable"] versionCSV...
354
false
true
0
10
123
132
73
59
null
null
yangjueji/hblas
tests/UnitBLAS/Level3.hs
bsd-3-clause
matmatTest1SSYMM:: IO () matmatTest1SSYMM = do left <- Matrix.generateMutableUpperTriangular (Matrix.SRow) (2,2) (const (1.0 :: Float)) right <- Matrix.generateMutableDenseMatrix (Matrix.SRow) (2,2) (const (1.0 :: Float)) res <- Matrix.generateMutableDenseMatrix (Matrix.SRow) (2,2) (const (0.0 :: Floa...
484
matmatTest1SSYMM:: IO () matmatTest1SSYMM = do left <- Matrix.generateMutableUpperTriangular (Matrix.SRow) (2,2) (const (1.0 :: Float)) right <- Matrix.generateMutableDenseMatrix (Matrix.SRow) (2,2) (const (1.0 :: Float)) res <- Matrix.generateMutableDenseMatrix (Matrix.SRow) (2,2) (const (0.0 :: Floa...
484
matmatTest1SSYMM = do left <- Matrix.generateMutableUpperTriangular (Matrix.SRow) (2,2) (const (1.0 :: Float)) right <- Matrix.generateMutableDenseMatrix (Matrix.SRow) (2,2) (const (1.0 :: Float)) res <- Matrix.generateMutableDenseMatrix (Matrix.SRow) (2,2) (const (0.0 :: Float)) BLAS.ssymm Matrix...
459
false
true
0
11
79
192
100
92
null
null
ekmett/tables
tests/Data/TableSpec.hs
bsd-3-clause
tableE' = fromList [Foo {_k = "a", _v = "Y"}, Foo {_k = "b", _v = "hello"}]
75
tableE' = fromList [Foo {_k = "a", _v = "Y"}, Foo {_k = "b", _v = "hello"}]
75
tableE' = fromList [Foo {_k = "a", _v = "Y"}, Foo {_k = "b", _v = "hello"}]
75
false
false
1
7
16
46
26
20
null
null
stevezhee/ed
app/Main.hs
bsd-3-clause
{----------------------------------------------------------------------------- Main ------------------------------------------------------------------------------} main :: IO () main = do startGUI defaultConfig setup
222
main :: IO () main = do startGUI defaultConfig setup
54
main = do startGUI defaultConfig setup
40
true
true
0
7
18
25
12
13
null
null
pminten/xhaskell
pig-latin/pig-latin_test.hs
mit
exitProperly :: IO Counts -> IO () exitProperly m = do counts <- m exitWith $ if failures counts /= 0 || errors counts /= 0 then ExitFailure 1 else ExitSuccess
163
exitProperly :: IO Counts -> IO () exitProperly m = do counts <- m exitWith $ if failures counts /= 0 || errors counts /= 0 then ExitFailure 1 else ExitSuccess
163
exitProperly m = do counts <- m exitWith $ if failures counts /= 0 || errors counts /= 0 then ExitFailure 1 else ExitSuccess
128
false
true
0
12
34
69
32
37
null
null
nickbart1980/pandoc
src/Text/Pandoc/Writers/Textile.hs
gpl-2.0
inlineToTextile _ (LineBreak) = return "\n"
43
inlineToTextile _ (LineBreak) = return "\n"
43
inlineToTextile _ (LineBreak) = return "\n"
43
false
false
1
5
5
19
8
11
null
null
lpeterse/koka
src/Kind/InferMonad.hs
apache-2.0
extendKSub :: KSub -> KInfer () extendKSub sub = KInfer (\env -> \st -> KResult () [] [] st{ ksub = sub @@ ksub st })
121
extendKSub :: KSub -> KInfer () extendKSub sub = KInfer (\env -> \st -> KResult () [] [] st{ ksub = sub @@ ksub st })
120
extendKSub sub = KInfer (\env -> \st -> KResult () [] [] st{ ksub = sub @@ ksub st })
88
false
true
0
13
29
69
35
34
null
null
Evan-Zhao/FastCanvas
src/Settings/Exception/Prettify/HttpException.hs
bsd-3-clause
extractor iuEx@(InvalidUrlException _ _) = show iuEx
52
extractor iuEx@(InvalidUrlException _ _) = show iuEx
52
extractor iuEx@(InvalidUrlException _ _) = show iuEx
52
false
false
0
8
6
23
11
12
null
null
sdiehl/ghc
hadrian/src/Settings/Parser.hs
bsd-3-clause
-- | This implements a parser that supports @key = val@, @key = "val"@, -- @key += val@, @key += "val"@ style syntax, where there can be 0 or more -- spaces between the key and the operator, and the operator and the value. parseKeyVal :: Parsec.Parsec String () KeyVal parseKeyVal = do k <- parseKey skipSpaces ...
579
parseKeyVal :: Parsec.Parsec String () KeyVal parseKeyVal = do k <- parseKey skipSpaces op <- parseOp skipSpaces v <- parseValue return (KeyVal k op v) where skipSpaces = Parsec.optional (Parsec.many1 (Parsec.oneOf " \t")) -- | Parse a dot-separated list of alpha-numerical words that can contain -- da...
352
parseKeyVal = do k <- parseKey skipSpaces op <- parseOp skipSpaces v <- parseValue return (KeyVal k op v) where skipSpaces = Parsec.optional (Parsec.many1 (Parsec.oneOf " \t")) -- | Parse a dot-separated list of alpha-numerical words that can contain -- dashes, just not at the beginning.
306
true
true
1
10
117
102
48
54
null
null
oshyshko/adventofcode
src/Y15/D04.hs
bsd-3-clause
solve2 :: String -> Int solve2 = solve $ \bs -> 0 == B.index bs 0 && 0 == B.index bs 1 && 0 == B.index bs 2
122
solve2 :: String -> Int solve2 = solve $ \bs -> 0 == B.index bs 0 && 0 == B.index bs 1 && 0 == B.index bs 2
122
solve2 = solve $ \bs -> 0 == B.index bs 0 && 0 == B.index bs 1 && 0 == B.index bs 2
98
false
true
0
13
42
65
32
33
null
null
sandervenema/rabocsv2qif
ListUtils.hs
gpl-3.0
takeWhileIndex :: (Eq a) => [Int] -> [a] -> [a] takeWhileIndex indices list = nub $ filter isIndex list where isIndex e = let curIndex = fromJust (elemIndex e list) in curIndex `elem` indices
217
takeWhileIndex :: (Eq a) => [Int] -> [a] -> [a] takeWhileIndex indices list = nub $ filter isIndex list where isIndex e = let curIndex = fromJust (elemIndex e list) in curIndex `elem` indices
217
takeWhileIndex indices list = nub $ filter isIndex list where isIndex e = let curIndex = fromJust (elemIndex e list) in curIndex `elem` indices
169
false
true
0
11
59
95
47
48
null
null
tuura/concepts
src/Tuura/Concept/Circuit/Derived.hs
bsd-3-clause
dualInitialValue x = x
22
dualInitialValue x = x
22
dualInitialValue x = x
22
false
false
0
5
3
9
4
5
null
null
garetxe/cabal
Cabal/Distribution/PackageDescription.hs
bsd-3-clause
cNot c = CNot c
22
cNot c = CNot c
22
cNot c = CNot c
22
false
false
0
5
11
12
5
7
null
null
yliu120/K3
src/Language/K3/Metaprogram/MetaHK3.hs
apache-2.0
spliceQuotesGuardedRhs :: SpliceContext -> GuardedRhs -> GuardedRhs spliceQuotesGuardedRhs sctxt (GuardedRhs l stmtL e) = GuardedRhs l (map rcrs stmtL) $ rcre e where rcre = spliceQuotesExp sctxt rcrs = spliceQuotesStmt sctxt {- Expressions -}
256
spliceQuotesGuardedRhs :: SpliceContext -> GuardedRhs -> GuardedRhs spliceQuotesGuardedRhs sctxt (GuardedRhs l stmtL e) = GuardedRhs l (map rcrs stmtL) $ rcre e where rcre = spliceQuotesExp sctxt rcrs = spliceQuotesStmt sctxt {- Expressions -}
256
spliceQuotesGuardedRhs sctxt (GuardedRhs l stmtL e) = GuardedRhs l (map rcrs stmtL) $ rcre e where rcre = spliceQuotesExp sctxt rcrs = spliceQuotesStmt sctxt {- Expressions -}
188
false
true
1
8
46
74
36
38
null
null
homam/fsm-conversational-ui
src/HLib61.hs
bsd-3-clause
-- woo = maybe (return $ EOD 0) id (execNode () <$> Just askForANumber) -- woo' :: IO (Target Int) -- woo' :: (Executable (Node [Int] [Int]) () o, Executable (Node () Int) () o) => Target o woo' key s = do r <- getLine return $ woo key s r
243
woo' key s = do r <- getLine return $ woo key s r
53
woo' key s = do r <- getLine return $ woo key s r
53
true
false
0
8
55
35
17
18
null
null
dmalikov/lambdabot
Plugin/System.hs
mit
doSystem :: Message.Message a => a -> Message.Nick -> [Char] -> [Char] -> ModuleLB (ClockTime, TimeDiff) doSystem msg _ cmd rest = get >>= \s -> case cmd of "listchans" -> return [pprKeys (ircChannels s)] "listmodules" -> return [pprKeys (ircModules s) ] "listservers" -> return [pprKeys (ircServerMap s)] "lis...
2,684
doSystem :: Message.Message a => a -> Message.Nick -> [Char] -> [Char] -> ModuleLB (ClockTime, TimeDiff) doSystem msg _ cmd rest = get >>= \s -> case cmd of "listchans" -> return [pprKeys (ircChannels s)] "listmodules" -> return [pprKeys (ircModules s) ] "listservers" -> return [pprKeys (ircServerMap s)] "lis...
2,684
doSystem msg _ cmd rest = get >>= \s -> case cmd of "listchans" -> return [pprKeys (ircChannels s)] "listmodules" -> return [pprKeys (ircModules s) ] "listservers" -> return [pprKeys (ircServerMap s)] "listall" -> lift listAll "list"| null rest -> return ["http://code.haskell.org/lambdabot/COMMANDS"] ...
2,579
false
true
0
18
875
891
431
460
null
null
brendanhay/gogol
gogol-pubsub/gen/Network/Google/PubSub/Types/Product.hs
mpl-2.0
-- | Creates a value of 'SetIAMPolicyRequest' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'siprPolicy' setIAMPolicyRequest :: SetIAMPolicyRequest setIAMPolicyRequest = SetIAMPolicyRequest' {_siprPolicy = Nothing}
305
setIAMPolicyRequest :: SetIAMPolicyRequest setIAMPolicyRequest = SetIAMPolicyRequest' {_siprPolicy = Nothing}
113
setIAMPolicyRequest = SetIAMPolicyRequest' {_siprPolicy = Nothing}
66
true
true
0
6
46
24
16
8
null
null
green-haskell/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
eqIntegerPrimName = varQual gHC_INTEGER_TYPE (fsLit "eqInteger#") eqIntegerPrimIdKey
95
eqIntegerPrimName = varQual gHC_INTEGER_TYPE (fsLit "eqInteger#") eqIntegerPrimIdKey
95
eqIntegerPrimName = varQual gHC_INTEGER_TYPE (fsLit "eqInteger#") eqIntegerPrimIdKey
95
false
false
0
7
17
19
9
10
null
null
urbanslug/ghc
compiler/typecheck/TcRnTypes.hs
bsd-3-clause
pprPECategory NoDataKinds = ptext (sLit "Data constructor")
60
pprPECategory NoDataKinds = ptext (sLit "Data constructor")
60
pprPECategory NoDataKinds = ptext (sLit "Data constructor")
60
false
false
0
7
7
18
8
10
null
null
dorchard/camfort
src/Camfort/Specification/Units/InferenceBackend.hs
apache-2.0
genUnitAssignments' :: SortFn -> [Constraint] -> [([UnitInfo], UnitInfo)] genUnitAssignments' _ [] = []
103
genUnitAssignments' :: SortFn -> [Constraint] -> [([UnitInfo], UnitInfo)] genUnitAssignments' _ [] = []
103
genUnitAssignments' _ [] = []
29
false
true
0
9
12
43
24
19
null
null
alexander-at-github/eta
compiler/ETA/Iface/BuildTyCl.hs
bsd-3-clause
totallyAbstractTyConRhs = AbstractTyCon False
46
totallyAbstractTyConRhs = AbstractTyCon False
46
totallyAbstractTyConRhs = AbstractTyCon False
46
false
false
0
5
4
9
4
5
null
null
ublubu/shapes
shapes/src/Utils/Utils.hs
mit
maybeChange :: a -> (a -> Maybe a) -> a maybeChange x f = fromMaybe x (f x)
75
maybeChange :: a -> (a -> Maybe a) -> a maybeChange x f = fromMaybe x (f x)
75
maybeChange x f = fromMaybe x (f x)
35
false
true
0
9
17
45
22
23
null
null
Potregon/while
src/Interface/TAC.hs
gpl-3.0
isGoto _ = False
34
isGoto _ = False
34
isGoto _ = False
34
false
false
0
5
21
9
4
5
null
null
brendanhay/gogol
gogol-android-publisher/gen/Network/Google/Resource/AndroidPublisher/Edits/Listings/Update.hs
mpl-2.0
-- | Multipart request metadata. eluPayload :: Lens' EditsListingsUpdate Listing eluPayload = lens _eluPayload (\ s a -> s{_eluPayload = a})
142
eluPayload :: Lens' EditsListingsUpdate Listing eluPayload = lens _eluPayload (\ s a -> s{_eluPayload = a})
109
eluPayload = lens _eluPayload (\ s a -> s{_eluPayload = a})
61
true
true
1
9
22
46
22
24
null
null
danr/hipspec
testsuite/prod/zeno_version/PropT36.hs
gpl-3.0
(x:xs) ++ ys = x : (xs ++ ys)
29
(x:xs) ++ ys = x : (xs ++ ys)
29
(x:xs) ++ ys = x : (xs ++ ys)
29
false
false
2
7
8
32
15
17
null
null
da-x/buildsome-tst
src/Lib/Makefile/Parser.hs
bsd-3-clause
runInclude :: MonadMakefileParser m => IncludePath -> Parser m () runInclude rawIncludedPath = do includedPath <- computeIncludePath eFileContent <- lift $ MakefileMonad.tryReadFile includedPath case eFileContent of Left e@E.SomeException {} -> fail $ "Failed to read include file: " ++ show e Right fileCo...
859
runInclude :: MonadMakefileParser m => IncludePath -> Parser m () runInclude rawIncludedPath = do includedPath <- computeIncludePath eFileContent <- lift $ MakefileMonad.tryReadFile includedPath case eFileContent of Left e@E.SomeException {} -> fail $ "Failed to read include file: " ++ show e Right fileCo...
859
runInclude rawIncludedPath = do includedPath <- computeIncludePath eFileContent <- lift $ MakefileMonad.tryReadFile includedPath case eFileContent of Left e@E.SomeException {} -> fail $ "Failed to read include file: " ++ show e Right fileContent -> void $ P.updateParserState $ \(Prim.State input pos...
793
false
true
0
18
193
262
125
137
null
null
PrattFall/Snek
app/Main.hs
bsd-3-clause
main :: IO () main = do gen <- newStdGen let ms = MapSize 16 8 let snek = Snake E [Point 8 4] let fud = getRandomNonSnakePoint gen ms snek gameLoop ms snek fud
183
main :: IO () main = do gen <- newStdGen let ms = MapSize 16 8 let snek = Snake E [Point 8 4] let fud = getRandomNonSnakePoint gen ms snek gameLoop ms snek fud
183
main = do gen <- newStdGen let ms = MapSize 16 8 let snek = Snake E [Point 8 4] let fud = getRandomNonSnakePoint gen ms snek gameLoop ms snek fud
169
false
true
0
13
58
91
39
52
null
null
jgm/pandoc-citeproc
tests/test-citeproc.hs
bsd-3-clause
adjustSpans (Link _ ils _) = ils
32
adjustSpans (Link _ ils _) = ils
32
adjustSpans (Link _ ils _) = ils
32
false
false
0
6
6
20
9
11
null
null
utsav2601/cmpe295A
tools/flounder/UMP_IPI.hs
mit
ump_ipi_register_recv :: String -> [C.Stmt] ump_ipi_register_recv ifn = [ C.If (C.Call "capref_is_null" [notifyvar `C.FieldOf` "my_notify_cap"]) [ C.Ex $ C.Assignment errvar $ C.Call "ump_chan_register_recv" [C.AddressOf $ my_bindvar `C.DerefField` "ump_state" `C.FieldOf` "chan", bindvar `C.D...
727
ump_ipi_register_recv :: String -> [C.Stmt] ump_ipi_register_recv ifn = [ C.If (C.Call "capref_is_null" [notifyvar `C.FieldOf` "my_notify_cap"]) [ C.Ex $ C.Assignment errvar $ C.Call "ump_chan_register_recv" [C.AddressOf $ my_bindvar `C.DerefField` "ump_state" `C.FieldOf` "chan", bindvar `C.D...
727
ump_ipi_register_recv ifn = [ C.If (C.Call "capref_is_null" [notifyvar `C.FieldOf` "my_notify_cap"]) [ C.Ex $ C.Assignment errvar $ C.Call "ump_chan_register_recv" [C.AddressOf $ my_bindvar `C.DerefField` "ump_state" `C.FieldOf` "chan", bindvar `C.DerefField` "waitset", C.StructConstant "even...
683
false
true
0
15
151
234
129
105
null
null
ezyang/ghc
compiler/basicTypes/SrcLoc.hs
bsd-3-clause
srcSpanFileName_maybe (UnhelpfulSpan _) = Nothing
49
srcSpanFileName_maybe (UnhelpfulSpan _) = Nothing
49
srcSpanFileName_maybe (UnhelpfulSpan _) = Nothing
49
false
false
0
6
4
16
7
9
null
null
atemerev/icfpc2013
src/sexp-select/sexp-select.hs
apache-2.0
-- Only call this on records recFields (List [Atom recordName, List fields]) = fields
85
recFields (List [Atom recordName, List fields]) = fields
56
recFields (List [Atom recordName, List fields]) = fields
56
true
false
0
8
13
29
14
15
null
null
alexander-at-github/eta
compiler/ETA/Prelude/PrimOp.hs
bsd-3-clause
tagOf_PrimOp AddCFinalizerToWeakOp = _ILIT(366)
47
tagOf_PrimOp AddCFinalizerToWeakOp = _ILIT(366)
47
tagOf_PrimOp AddCFinalizerToWeakOp = _ILIT(366)
47
false
false
0
6
3
15
7
8
null
null
myuon/Chimera
Chimera/Engine/Scripts.hs
mit
effs :: [Effect] -> LookAt c Field () effs es = zoom _2 $ effects %= \s -> foldr insertIM s es
94
effs :: [Effect] -> LookAt c Field () effs es = zoom _2 $ effects %= \s -> foldr insertIM s es
94
effs es = zoom _2 $ effects %= \s -> foldr insertIM s es
56
false
true
0
7
21
53
26
27
null
null
rethab/h-gpgme
test/KeyTest.hs
mit
tests :: [TestTree] tests = [ testCase "get_alice_pub_from_alice" get_alice_pub_from_alice , testCase "get_bob_pub_from_alice" get_bob_pub_from_alice , testCase "alice_list_pub_keys" alice_list_pub_keys , testCase "alice_list_secret_keys" alice_list_secret_keys , testCase "get_inexistent...
574
tests :: [TestTree] tests = [ testCase "get_alice_pub_from_alice" get_alice_pub_from_alice , testCase "get_bob_pub_from_alice" get_bob_pub_from_alice , testCase "alice_list_pub_keys" alice_list_pub_keys , testCase "alice_list_secret_keys" alice_list_secret_keys , testCase "get_inexistent...
574
tests = [ testCase "get_alice_pub_from_alice" get_alice_pub_from_alice , testCase "get_bob_pub_from_alice" get_bob_pub_from_alice , testCase "alice_list_pub_keys" alice_list_pub_keys , testCase "alice_list_secret_keys" alice_list_secret_keys , testCase "get_inexistent_from_alice" get_ine...
554
false
true
0
7
101
85
41
44
null
null
plumlife/cabal
Cabal/Distribution/Simple/LocalBuildInfo.hs
bsd-3-clause
lookupComponent pkg (CTestName name) = fmap CTest $ find ((name ==) . testName) (testSuites pkg)
100
lookupComponent pkg (CTestName name) = fmap CTest $ find ((name ==) . testName) (testSuites pkg)
100
lookupComponent pkg (CTestName name) = fmap CTest $ find ((name ==) . testName) (testSuites pkg)
100
false
false
2
7
18
51
23
28
null
null
shlevy/ghc
ghc/Main.hs
bsd-3-clause
-- isInterpretiveMode: byte-code compiler involved isInterpretiveMode :: PostLoadMode -> Bool isInterpretiveMode DoInteractive = True
133
isInterpretiveMode :: PostLoadMode -> Bool isInterpretiveMode DoInteractive = True
82
isInterpretiveMode DoInteractive = True
39
true
true
0
5
13
19
10
9
null
null
viktorasl/tictactoe-bot
src/Tictactoe/HTTPHelper.hs
mit
strBoard :: Board -> TictactoeCType -> String strBoard board cType = case cType of BencodeDict -> BencodeDict.stringifyBoard board BencodeList -> BencodeList.stringifyBoard board
188
strBoard :: Board -> TictactoeCType -> String strBoard board cType = case cType of BencodeDict -> BencodeDict.stringifyBoard board BencodeList -> BencodeList.stringifyBoard board
188
strBoard board cType = case cType of BencodeDict -> BencodeDict.stringifyBoard board BencodeList -> BencodeList.stringifyBoard board
142
false
true
0
9
31
55
25
30
null
null
aquatir/remember_java_api
code-sample-haskell/hello_world/basics/stuff.hs
mit
take' n (x:xs) = x : take' (n-1) xs
35
take' n (x:xs) = x : take' (n-1) xs
35
take' n (x:xs) = x : take' (n-1) xs
35
false
false
2
7
8
37
17
20
null
null
kim/amazonka
amazonka-glacier/gen/Network/AWS/Glacier/ListMultipartUploads.hs
mpl-2.0
-- | A list of in-progress multipart uploads. lmurUploadsList :: Lens' ListMultipartUploadsResponse [UploadListElement] lmurUploadsList = lens _lmurUploadsList (\s a -> s { _lmurUploadsList = a }) . _List
204
lmurUploadsList :: Lens' ListMultipartUploadsResponse [UploadListElement] lmurUploadsList = lens _lmurUploadsList (\s a -> s { _lmurUploadsList = a }) . _List
158
lmurUploadsList = lens _lmurUploadsList (\s a -> s { _lmurUploadsList = a }) . _List
84
true
true
1
10
27
51
26
25
null
null
MateVM/harpy
Harpy/X86CodeGen.hs
gpl-2.0
-- | Mapping from condition code to negated condition code. x86_cc_negate :: [(Int, Int)] x86_cc_negate = [ (x86_cc_eq, x86_cc_ne), -- eq (x86_cc_ne, x86_cc_eq), -- ne (x86_cc_lt, x86_cc_ge), -- lt (x86_cc_le, x86_cc_gt), -- le (x86_cc_gt, x86_cc_le), -- gt (x86_cc_ge...
575
x86_cc_negate :: [(Int, Int)] x86_cc_negate = [ (x86_cc_eq, x86_cc_ne), -- eq (x86_cc_ne, x86_cc_eq), -- ne (x86_cc_lt, x86_cc_ge), -- lt (x86_cc_le, x86_cc_gt), -- le (x86_cc_gt, x86_cc_le), -- gt (x86_cc_ge, x86_cc_lt), -- ge (x86_cc_lz, x86_cc_gez), -- lz ...
515
x86_cc_negate = [ (x86_cc_eq, x86_cc_ne), -- eq (x86_cc_ne, x86_cc_eq), -- ne (x86_cc_lt, x86_cc_ge), -- lt (x86_cc_le, x86_cc_gt), -- le (x86_cc_gt, x86_cc_le), -- gt (x86_cc_ge, x86_cc_lt), -- ge (x86_cc_lz, x86_cc_gez), -- lz (x86_cc_gez, x86_cc_l...
485
true
true
0
6
175
141
97
44
null
null
choener/BiobaseVienna
Biobase/Vienna/Export.hs
gpl-3.0
printLine xs = concatMap printVal xs ++ " " ++ showKey xs ++ printf "\n"
76
printLine xs = concatMap printVal xs ++ " " ++ showKey xs ++ printf "\n"
76
printLine xs = concatMap printVal xs ++ " " ++ showKey xs ++ printf "\n"
76
false
false
0
8
18
32
14
18
null
null
hsyl20/HViperVM
lib/ViperVM/Runtime/Scheduling/RoundRobin.hs
lgpl-3.0
initRoundRobinScheduler :: SharedObjectManager -> KernelManager -> TChan SchedMsg -> IO () initRoundRobinScheduler som km ch = void $ forkIO (roundRobinThread som km ch)
169
initRoundRobinScheduler :: SharedObjectManager -> KernelManager -> TChan SchedMsg -> IO () initRoundRobinScheduler som km ch = void $ forkIO (roundRobinThread som km ch)
169
initRoundRobinScheduler som km ch = void $ forkIO (roundRobinThread som km ch)
78
false
true
0
9
22
55
26
29
null
null
siddhanathan/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
-- plugins pLUGINS :: Module pLUGINS = mkThisGhcModule (fsLit "Plugins")
72
pLUGINS :: Module pLUGINS = mkThisGhcModule (fsLit "Plugins")
61
pLUGINS = mkThisGhcModule (fsLit "Plugins")
43
true
true
0
7
9
21
11
10
null
null
GaloisInc/mistral
src/Mistral/Schedule/Interp.hs
bsd-3-clause
-- | Generate an environment from a collection of modules. modulesEnv :: [Module] -> Env modulesEnv ms = finalEnv where finalEnv = foldl addModule mempty ms addModule env m = moduleEnv finalEnv m `mappend` env -- | Generate the environment for a single module, in the context of others.
300
modulesEnv :: [Module] -> Env modulesEnv ms = finalEnv where finalEnv = foldl addModule mempty ms addModule env m = moduleEnv finalEnv m `mappend` env -- | Generate the environment for a single module, in the context of others.
241
modulesEnv ms = finalEnv where finalEnv = foldl addModule mempty ms addModule env m = moduleEnv finalEnv m `mappend` env -- | Generate the environment for a single module, in the context of others.
211
true
true
0
6
62
59
31
28
null
null
hspec/hspec-wai
src/Test/Hspec/Wai/Matcher.hs
mit
(<:>) :: HeaderName -> ByteString -> MatchHeader name <:> value = MatchHeader $ \headers _body -> guard (header `notElem` headers) >> (Just . unlines) [ "missing header:" , formatHeader header ] where header = (name, value)
237
(<:>) :: HeaderName -> ByteString -> MatchHeader name <:> value = MatchHeader $ \headers _body -> guard (header `notElem` headers) >> (Just . unlines) [ "missing header:" , formatHeader header ] where header = (name, value)
237
name <:> value = MatchHeader $ \headers _body -> guard (header `notElem` headers) >> (Just . unlines) [ "missing header:" , formatHeader header ] where header = (name, value)
188
false
true
0
10
49
87
47
40
null
null
mettekou/ghc
compiler/prelude/THNames.hs
bsd-3-clause
doublePrimLName = libFun (fsLit "doublePrimL") doublePrimLIdKey
63
doublePrimLName = libFun (fsLit "doublePrimL") doublePrimLIdKey
63
doublePrimLName = libFun (fsLit "doublePrimL") doublePrimLIdKey
63
false
false
0
7
5
17
8
9
null
null
plaimi/tempuhs-server
test/Tempuhs/Tests/Requests/Role.hs
agpl-3.0
patchSpec :: Spec patchSpec = describe "PATCH /roles" $ do it "modifies an existing role's name" $ do initRole patch "/roles" "role=1&name=Lulle" >>= assertJSONOK (jsonKey 1) it "modifies an existing role's namespace" $ do initRole patch "/users" "user=2&name=Joe" >>= assertJSONOK (jso...
398
patchSpec :: Spec patchSpec = describe "PATCH /roles" $ do it "modifies an existing role's name" $ do initRole patch "/roles" "role=1&name=Lulle" >>= assertJSONOK (jsonKey 1) it "modifies an existing role's namespace" $ do initRole patch "/users" "user=2&name=Joe" >>= assertJSONOK (jso...
398
patchSpec = describe "PATCH /roles" $ do it "modifies an existing role's name" $ do initRole patch "/roles" "role=1&name=Lulle" >>= assertJSONOK (jsonKey 1) it "modifies an existing role's namespace" $ do initRole patch "/users" "user=2&name=Joe" >>= assertJSONOK (jsonKey 2) patc...
380
false
true
0
14
88
107
46
61
null
null
dmgolubovsky/capri
Main.hs
bsd-3-clause
ghcpkgCommand :: CommandUI () ghcpkgCommand = CommandUI { commandName = "ghc-pkg" ,commandSynopsis = "Invoke the ghc-pkg program to run arbitrary action on private packages" ,commandUsage = (++ " ghc-pkg -- <ghc-pkg command options>") ,commandNotes = Nothing ,commandDescription = Just ...
647
ghcpkgCommand :: CommandUI () ghcpkgCommand = CommandUI { commandName = "ghc-pkg" ,commandSynopsis = "Invoke the ghc-pkg program to run arbitrary action on private packages" ,commandUsage = (++ " ghc-pkg -- <ghc-pkg command options>") ,commandNotes = Nothing ,commandDescription = Just $...
646
ghcpkgCommand = CommandUI { commandName = "ghc-pkg" ,commandSynopsis = "Invoke the ghc-pkg program to run arbitrary action on private packages" ,commandUsage = (++ " ghc-pkg -- <ghc-pkg command options>") ,commandNotes = Nothing ,commandDescription = Just $ \pname -> "Use this comm...
616
false
true
0
12
146
96
56
40
null
null
brendanhay/gogol
gogol-servicenetworking/gen/Network/Google/ServiceNetworking/Types/Product.hs
mpl-2.0
-- | Properties of the object. Contains field \'type with type URL. sdiAddtional :: Lens' StatusDetailsItem (HashMap Text JSONValue) sdiAddtional = lens _sdiAddtional (\ s a -> s{_sdiAddtional = a}) . _Coerce
216
sdiAddtional :: Lens' StatusDetailsItem (HashMap Text JSONValue) sdiAddtional = lens _sdiAddtional (\ s a -> s{_sdiAddtional = a}) . _Coerce
148
sdiAddtional = lens _sdiAddtional (\ s a -> s{_sdiAddtional = a}) . _Coerce
83
true
true
0
10
39
54
28
26
null
null
itchyny/mackerel-client-hs
src/Web/Mackerel/Api/Organization.hs
mit
getOrganization :: Client -> IO (Either ApiError Organization) getOrganization client = request client GET "/api/v0/org" [] emptyBody (createHandler id)
152
getOrganization :: Client -> IO (Either ApiError Organization) getOrganization client = request client GET "/api/v0/org" [] emptyBody (createHandler id)
152
getOrganization client = request client GET "/api/v0/org" [] emptyBody (createHandler id)
89
false
true
0
8
18
50
24
26
null
null
ezyang/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
kindRepFunDataConKey = mkPreludeDataConUnique 103
54
kindRepFunDataConKey = mkPreludeDataConUnique 103
54
kindRepFunDataConKey = mkPreludeDataConUnique 103
54
false
false
1
5
8
12
4
8
null
null
NotBrianZach/postgrest
src/PostgREST/OpenAPI.hs
mit
isQueryValid :: URI -> Bool isQueryValid URI {uriQuery = ""} = True
67
isQueryValid :: URI -> Bool isQueryValid URI {uriQuery = ""} = True
67
isQueryValid URI {uriQuery = ""} = True
39
false
true
0
8
11
27
14
13
null
null
pyr/himpy
System/Himpy/Recipes/Utils.hs
mit
snmp_get_num :: String -> String -> Snmp.RawOID -> IO (Double) snmp_get_num host comm oid = do v <- Snmp.snmpGet Snmp.snmp_version_2c (B.pack host) (B.pack comm) oid let out = case v of (Right (Snmp.SnmpResult oid value)) -> snmp_num value return out
256
snmp_get_num :: String -> String -> Snmp.RawOID -> IO (Double) snmp_get_num host comm oid = do v <- Snmp.snmpGet Snmp.snmp_version_2c (B.pack host) (B.pack comm) oid let out = case v of (Right (Snmp.SnmpResult oid value)) -> snmp_num value return out
256
snmp_get_num host comm oid = do v <- Snmp.snmpGet Snmp.snmp_version_2c (B.pack host) (B.pack comm) oid let out = case v of (Right (Snmp.SnmpResult oid value)) -> snmp_num value return out
193
false
true
0
17
45
118
56
62
null
null
yogsototh/muraine
src/Main.hs
mit
-- | Getting events return the next CallInfo for the next call getEvents :: CallInfo -> IO CallInfo getEvents callInfo = do -- Call /events on github (req_time, response) <- time (httpGHEvents (_user callInfo) (_pass callInfo) ...
602
getEvents :: CallInfo -> IO CallInfo getEvents callInfo = do -- Call /events on github (req_time, response) <- time (httpGHEvents (_user callInfo) (_pass callInfo) (_etag callInfo) ...
539
getEvents callInfo = do -- Call /events on github (req_time, response) <- time (httpGHEvents (_user callInfo) (_pass callInfo) (_etag callInfo) (_page callInfo)) newCallInfo <- ge...
502
true
true
0
12
209
108
52
56
null
null
brendanhay/gogol
gogol-shopping-content/gen/Network/Google/ShoppingContent/Types/Product.hs
mpl-2.0
-- | The ID of the managing account. prorMerchantId :: Lens' ProductsCustomBatchRequestEntry (Maybe Word64) prorMerchantId = lens _prorMerchantId (\ s a -> s{_prorMerchantId = a}) . mapping _Coerce
211
prorMerchantId :: Lens' ProductsCustomBatchRequestEntry (Maybe Word64) prorMerchantId = lens _prorMerchantId (\ s a -> s{_prorMerchantId = a}) . mapping _Coerce
174
prorMerchantId = lens _prorMerchantId (\ s a -> s{_prorMerchantId = a}) . mapping _Coerce
103
true
true
0
10
41
55
28
27
null
null
tolysz/prepare-ghcjs
spec-lts8/cabal/cabal-install/Distribution/Client/Dependency/Modular/ConfiguredConversion.hs
bsd-3-clause
-- | Converts from the solver specific result @CP QPN@ into -- a 'ResolverPackage', which can then be converted into -- the install plan. convCP :: SI.InstalledPackageIndex -> CI.PackageIndex SourcePackage -> CP QPN -> ResolverPackage convCP iidx sidx (CP qpi fa es ds) = case convPI qpi of Lef...
675
convCP :: SI.InstalledPackageIndex -> CI.PackageIndex SourcePackage -> CP QPN -> ResolverPackage convCP iidx sidx (CP qpi fa es ds) = case convPI qpi of Left pi -> PreExisting (fromJust $ SI.lookupUnitId iidx pi) Right pi -> Configured $ ConfiguredPackage ...
537
convCP iidx sidx (CP qpi fa es ds) = case convPI qpi of Left pi -> PreExisting (fromJust $ SI.lookupUnitId iidx pi) Right pi -> Configured $ ConfiguredPackage srcpkg fa es ds' where Just srcpkg = CI.lookup...
420
true
true
1
12
229
165
77
88
null
null
GaloisInc/halvm-ghc
utils/genapply/Main.hs
bsd-3-clause
stackCheck :: RegStatus -- Registerised status -> [ArgRep] -> Bool -- args in regs? -> Doc -- fun_info_label -> StackUsage -> Doc stackCheck regstatus args args_in_regs fun_info_label (prof_sp, norm_sp) = let (reg_locs, leftovers, sp_offset) = assignRegs regstatus 1 args cmp...
974
stackCheck :: RegStatus -- Registerised status -> [ArgRep] -> Bool -- args in regs? -> Doc -- fun_info_label -> StackUsage -> Doc stackCheck regstatus args args_in_regs fun_info_label (prof_sp, norm_sp) = let (reg_locs, leftovers, sp_offset) = assignRegs regstatus 1 args cmp...
974
stackCheck regstatus args args_in_regs fun_info_label (prof_sp, norm_sp) = let (reg_locs, leftovers, sp_offset) = assignRegs regstatus 1 args cmp_sp n | n > 0 = text "if (Sp - WDS(" <> int n <> text ") < SpLim) {" $$ nest 4 (vcat [ if args_in_regs then ...
812
false
true
0
24
385
274
134
140
null
null
rueshyna/gogol
gogol-admin-directory/gen/Network/Google/Directory/Types/Product.hs
mpl-2.0
-- | The obfuscated ID of the service this privilege is for. priServiceId :: Lens' Privilege (Maybe Text) priServiceId = lens _priServiceId (\ s a -> s{_priServiceId = a})
173
priServiceId :: Lens' Privilege (Maybe Text) priServiceId = lens _priServiceId (\ s a -> s{_priServiceId = a})
112
priServiceId = lens _priServiceId (\ s a -> s{_priServiceId = a})
67
true
true
0
9
30
48
25
23
null
null
thoughtpolice/binary-serialise-cbor
tests/ReferenceImpl.hs
bsd-3-clause
decodeAdditionalInfo :: Word -> Decoder AdditionalInformation decodeAdditionalInfo = dec where dec n | n < 24 = return (AiValue (UIntSmall n)) dec 24 = do w <- getByte return (AiValue (UInt8 w)) dec 25 = do [w1,w0] <- getBytes (2 :: Int) let w = word16...
832
decodeAdditionalInfo :: Word -> Decoder AdditionalInformation decodeAdditionalInfo = dec where dec n | n < 24 = return (AiValue (UIntSmall n)) dec 24 = do w <- getByte return (AiValue (UInt8 w)) dec 25 = do [w1,w0] <- getBytes (2 :: Int) let w = word16...
832
decodeAdditionalInfo = dec where dec n | n < 24 = return (AiValue (UIntSmall n)) dec 24 = do w <- getByte return (AiValue (UInt8 w)) dec 25 = do [w1,w0] <- getBytes (2 :: Int) let w = word16FromNet w1 w0 return (AiValue (UInt16 w)) ...
770
false
true
0
11
330
362
176
186
null
null
andorp/hs-bluesnap
src/Bluesnap/API/Response.hs
gpl-3.0
elementIban :: XMLParser Xsd.XsdString elementIban = parseSchemaType "iban"
75
elementIban :: XMLParser Xsd.XsdString elementIban = parseSchemaType "iban"
75
elementIban = parseSchemaType "iban"
36
false
true
0
6
7
19
9
10
null
null
tjakway/ghcjvm
compiler/prelude/PrelNames.hs
bsd-3-clause
shiftRIntegerIdKey = mkPreludeMiscIdUnique 96
56
shiftRIntegerIdKey = mkPreludeMiscIdUnique 96
56
shiftRIntegerIdKey = mkPreludeMiscIdUnique 96
56
false
false
0
5
14
9
4
5
null
null
markflorisson/hpack
testrepo/bytestring-0.10.2.0/tests/builder/Data/ByteString/Builder/Prim/TestUtils.hs
bsd-3-clause
coerceDoubleToWord64 :: Double -> Word64 coerceDoubleToWord64 = (.&. maxBound) . unsafeCoerce
93
coerceDoubleToWord64 :: Double -> Word64 coerceDoubleToWord64 = (.&. maxBound) . unsafeCoerce
93
coerceDoubleToWord64 = (.&. maxBound) . unsafeCoerce
52
false
true
0
6
10
23
13
10
null
null
alexander-at-github/eta
compiler/ETA/Utils/UniqFM.hs
bsd-3-clause
lookupWithDefaultUFM_Directly (UFM m) v u = M.findWithDefault v (getKey u) m
76
lookupWithDefaultUFM_Directly (UFM m) v u = M.findWithDefault v (getKey u) m
76
lookupWithDefaultUFM_Directly (UFM m) v u = M.findWithDefault v (getKey u) m
76
false
false
0
7
10
34
16
18
null
null
ShellShoccar-jpn/Open-usp-Tukubai
COMMANDS.HS/join2.hs
mit
maxLengths (vsr:vsl:vss) = maxLengths (a:vss) where zs = zip vsr vsl a = [ if (fst z) > (snd z) then fst z else snd z | z <- zs]
192
maxLengths (vsr:vsl:vss) = maxLengths (a:vss) where zs = zip vsr vsl a = [ if (fst z) > (snd z) then fst z else snd z | z <- zs]
192
maxLengths (vsr:vsl:vss) = maxLengths (a:vss) where zs = zip vsr vsl a = [ if (fst z) > (snd z) then fst z else snd z | z <- zs]
192
false
false
0
11
93
88
45
43
null
null
isomorphism/webgl
src/Graphics/Rendering/WebGL/Constants.hs
mit
gl_READ_ONLY :: GLenum gl_READ_ONLY = 0x88B8
44
gl_READ_ONLY :: GLenum gl_READ_ONLY = 0x88B8
44
gl_READ_ONLY = 0x88B8
21
false
true
0
4
5
11
6
5
null
null
RoboNickBot/interactive-tree-demos
src/Hyper/Trees.hs
bsd-2-clause
findX :: QualTree a -> Int findX qt = case qt of (BiNode l _ r, Top) -> let lsubtree = (fst . qtLeft) qt initXIndex = 0 in nextX initXIndex lsubtree (BiNode l _ r, L _ _ _) -> let rsubtree = (fst . qtRight) qt ...
867
findX :: QualTree a -> Int findX qt = case qt of (BiNode l _ r, Top) -> let lsubtree = (fst . qtLeft) qt initXIndex = 0 in nextX initXIndex lsubtree (BiNode l _ r, L _ _ _) -> let rsubtree = (fst . qtRight) qt ...
867
findX qt = case qt of (BiNode l _ r, Top) -> let lsubtree = (fst . qtLeft) qt initXIndex = 0 in nextX initXIndex lsubtree (BiNode l _ r, L _ _ _) -> let rsubtree = (fst . qtRight) qt initXIndex = 0 ...
840
false
true
3
14
396
345
162
183
null
null
liyanchang/scheme-in-haskell
src/chp7.hs
mit
unpackNum notNum = throwError $ TypeMismatch "number" notNum
60
unpackNum notNum = throwError $ TypeMismatch "number" notNum
60
unpackNum notNum = throwError $ TypeMismatch "number" notNum
60
false
false
0
6
7
18
8
10
null
null
gaoyuan/CodeThief
src/Git.hs
bsd-3-clause
execAndWait :: String -> IO () execAndWait cmd = do (_, _, _, handle) <- createProcess $ shell cmd waitForProcess handle return ()
136
execAndWait :: String -> IO () execAndWait cmd = do (_, _, _, handle) <- createProcess $ shell cmd waitForProcess handle return ()
136
execAndWait cmd = do (_, _, _, handle) <- createProcess $ shell cmd waitForProcess handle return ()
105
false
true
0
9
28
63
30
33
null
null
ernestasju/nadeko
src/Navision.hs
unlicense
parseSection :: Parser a -> Parser a parseSection = between (lexeme $ char '{') (lexeme $ char '}')
99
parseSection :: Parser a -> Parser a parseSection = between (lexeme $ char '{') (lexeme $ char '}')
99
parseSection = between (lexeme $ char '{') (lexeme $ char '}')
62
false
true
0
8
17
46
22
24
null
null
rueshyna/gogol
gogol-partners/gen/Network/Google/Partners/Types/Product.hs
mpl-2.0
-- | The 3-letter currency code defined in ISO 4217. mCurrencyCode :: Lens' Money (Maybe Text) mCurrencyCode = lens _mCurrencyCode (\ s a -> s{_mCurrencyCode = a})
171
mCurrencyCode :: Lens' Money (Maybe Text) mCurrencyCode = lens _mCurrencyCode (\ s a -> s{_mCurrencyCode = a})
118
mCurrencyCode = lens _mCurrencyCode (\ s a -> s{_mCurrencyCode = a})
76
true
true
1
9
34
52
25
27
null
null
master-q/carettah
src/Carettah/Config.hs
gpl-3.0
updateSpeechMinutes :: MonadIO m => (Double -> Double) -> m () updateSpeechMinutes fn = updateCarettahState (\s -> s { speechMinutes = fn $ speechMinutes s })
160
updateSpeechMinutes :: MonadIO m => (Double -> Double) -> m () updateSpeechMinutes fn = updateCarettahState (\s -> s { speechMinutes = fn $ speechMinutes s })
160
updateSpeechMinutes fn = updateCarettahState (\s -> s { speechMinutes = fn $ speechMinutes s })
97
false
true
0
11
27
63
32
31
null
null
kisp/ksquant2
DurCalcTest.hs
gpl-3.0
prop_exp2_double :: Integer -> Bool prop_exp2_double n = 2 * DC.exp2 n == DC.exp2 (n+1)
87
prop_exp2_double :: Integer -> Bool prop_exp2_double n = 2 * DC.exp2 n == DC.exp2 (n+1)
87
prop_exp2_double n = 2 * DC.exp2 n == DC.exp2 (n+1)
51
false
true
0
8
14
43
21
22
null
null
d16-processor/Haskell-C-
src/Tree.hs
mit
isPowerOf2 n = ((.&.) n (n-1)) == 0
35
isPowerOf2 n = ((.&.) n (n-1)) == 0
35
isPowerOf2 n = ((.&.) n (n-1)) == 0
35
false
false
0
9
7
30
16
14
null
null
ryuichiueda/ProbabilisticRaspiMouse
pfc/offline_calculation/state_transition/gen_state_trans.hs
mit
stateId :: (Int,Int,Int) -> String stateId (y,x,t) = show (t + x*72 + y*72*36)
78
stateId :: (Int,Int,Int) -> String stateId (y,x,t) = show (t + x*72 + y*72*36)
78
stateId (y,x,t) = show (t + x*72 + y*72*36)
43
false
true
0
11
13
62
34
28
null
null
swift-nav/plover
src/Language/Plover/CodeGen.hs
mit
runCM :: CM a -> a runCM m = evalState m (CodeGenState { bindings = M.empty , bindingReference = M.empty , usedNames = [] , genCode = [] , inhibitGenCode = False , genRetLoc = Nothin...
389
runCM :: CM a -> a runCM m = evalState m (CodeGenState { bindings = M.empty , bindingReference = M.empty , usedNames = [] , genCode = [] , inhibitGenCode = False , genRetLoc = Nothin...
389
runCM m = evalState m (CodeGenState { bindings = M.empty , bindingReference = M.empty , usedNames = [] , genCode = [] , inhibitGenCode = False , genRetLoc = Nothing ...
370
false
true
0
9
224
83
48
35
null
null
arne-schroppe/dash
test/Language/Dash/Parser/ParserSpec.hs
mit
spec :: Spec spec = do describe "Parser" $ do it "parses a symbol" $ do parseString ":dash" `shouldBeRight` LitSymbol "dash" [] it "parses nothing" $ do parseString "" `shouldBeRight` LitSymbol "ok" [] it "parses a single binding" $ do parseString "a = 1" `shouldBeRight` (Loca...
6,883
spec :: Spec spec = do describe "Parser" $ do it "parses a symbol" $ do parseString ":dash" `shouldBeRight` LitSymbol "dash" [] it "parses nothing" $ do parseString "" `shouldBeRight` LitSymbol "ok" [] it "parses a single binding" $ do parseString "a = 1" `shouldBeRight` (Loca...
6,883
spec = do describe "Parser" $ do it "parses a symbol" $ do parseString ":dash" `shouldBeRight` LitSymbol "dash" [] it "parses nothing" $ do parseString "" `shouldBeRight` LitSymbol "ok" [] it "parses a single binding" $ do parseString "a = 1" `shouldBeRight` (LocalBinding (Bin...
6,870
false
true
0
30
3,191
1,745
834
911
null
null
onponomarev/ganeti
src/Ganeti/Constants.hs
bsd-2-clause
tagNodegroup :: String tagNodegroup = Types.tagKindToRaw TagKindGroup
69
tagNodegroup :: String tagNodegroup = Types.tagKindToRaw TagKindGroup
69
tagNodegroup = Types.tagKindToRaw TagKindGroup
46
false
true
0
6
6
22
9
13
null
null
AlexeyRaga/eta
compiler/ETA/TypeCheck/TcType.hs
bsd-3-clause
isTauTy (ForAllTy {}) = False
33
isTauTy (ForAllTy {}) = False
33
isTauTy (ForAllTy {}) = False
33
false
false
0
6
8
17
8
9
null
null
timtylin/scholdoc
src/Text/Pandoc/Readers/Markdown.hs
gpl-2.0
scholarlyAbstract :: MarkdownParser (F Blocks) scholarlyAbstract = try $ do ensureScholarlyMarkdown many1 (char '#') notFollowedBy $ guardEnabled Ext_fancy_lists >> (char '.' <|> char ')') -- this would be a list skipSpaces string "Abstract:" >> blanklines abstract <- para let meta' = do...
509
scholarlyAbstract :: MarkdownParser (F Blocks) scholarlyAbstract = try $ do ensureScholarlyMarkdown many1 (char '#') notFollowedBy $ guardEnabled Ext_fancy_lists >> (char '.' <|> char ')') -- this would be a list skipSpaces string "Abstract:" >> blanklines abstract <- para let meta' = do...
509
scholarlyAbstract = try $ do ensureScholarlyMarkdown many1 (char '#') notFollowedBy $ guardEnabled Ext_fancy_lists >> (char '.' <|> char ')') -- this would be a list skipSpaces string "Abstract:" >> blanklines abstract <- para let meta' = do abstract' <- abstract ...
462
false
true
0
15
130
156
71
85
null
null
francesquini/itau-lib
src/Itau.hs
bsd-3-clause
geraParcelas :: [(ItauTransaction, [String])] -> [ItauTransaction] geraParcelas xs = concatMap geraTransacoesPara $ Map.elems txs where -- O map é para deduplicar os lancamentos txs = Map.fromList [ ((txData tx, T.strip $ T.pack desc), (read pn :: Integer, r...
852
geraParcelas :: [(ItauTransaction, [String])] -> [ItauTransaction] geraParcelas xs = concatMap geraTransacoesPara $ Map.elems txs where -- O map é para deduplicar os lancamentos txs = Map.fromList [ ((txData tx, T.strip $ T.pack desc), (read pn :: Integer, r...
852
geraParcelas xs = concatMap geraTransacoesPara $ Map.elems txs where -- O map é para deduplicar os lancamentos txs = Map.fromList [ ((txData tx, T.strip $ T.pack desc), (read pn :: Integer, read ptot :: Integer, T.strip $ T.pack desc, tx)) | (tx...
785
false
true
3
15
300
312
164
148
null
null
input-output-hk/pos-haskell-prototype
wallet/src/Cardano/Wallet/Kernel/DB/Util/Zoomable.hs
mit
-- | Like 'zoomMaybe', but run a fallback if the smaller context is missing zoomDef :: (Zoomable f, Monad (f st)) => f st a -- ^ When not found -> Lens' st (Maybe st') -> f st' a -- ^ When found -> f st a zoomDef def l k = zoomMaybe l k `catchNothing` def
289
zoomDef :: (Zoomable f, Monad (f st)) => f st a -- ^ When not found -> Lens' st (Maybe st') -> f st' a -- ^ When found -> f st a zoomDef def l k = zoomMaybe l k `catchNothing` def
213
zoomDef def l k = zoomMaybe l k `catchNothing` def
50
true
true
0
10
90
91
46
45
null
null
maciej-bendkowski/boltzmann-brain
Data/Boltzmann/Compiler/Haskell/Helpers.hs
bsd-3-clause
exportType :: String -> ExportSpec () exportType s = EThingWith () (NoWildcard ()) (unname s) []
96
exportType :: String -> ExportSpec () exportType s = EThingWith () (NoWildcard ()) (unname s) []
96
exportType s = EThingWith () (NoWildcard ()) (unname s) []
58
false
true
0
8
15
54
25
29
null
null
Teaspot-Studio/arhelk-core
src/Arhelk/Core/Rule.hs
bsd-3-clause
imply :: Setter a a' b (Maybe b') -> b' -> RuleM a [a'] () imply field v = do a <- ask tell [set field (Just v) a] -- | Generates new hypothesis by placing base value into set of hypothesises. -- -- >>> implyNothing -- { fieldA = Nothing, fieldB = Nothing, ... }
267
imply :: Setter a a' b (Maybe b') -> b' -> RuleM a [a'] () imply field v = do a <- ask tell [set field (Just v) a] -- | Generates new hypothesis by placing base value into set of hypothesises. -- -- >>> implyNothing -- { fieldA = Nothing, fieldB = Nothing, ... }
267
imply field v = do a <- ask tell [set field (Just v) a] -- | Generates new hypothesis by placing base value into set of hypothesises. -- -- >>> implyNothing -- { fieldA = Nothing, fieldB = Nothing, ... }
208
false
true
0
12
60
89
43
46
null
null
grnet/snf-ganeti
src/Ganeti/OpParams.hs
bsd-2-clause
pExportTargetNodeUuid :: Field pExportTargetNodeUuid = withDoc "Target node UUID (if local export)" . renameField "ExportTargetNodeUuid" . optionalField $ simpleField "target_node_uuid" [t| NonEmptyString |]
213
pExportTargetNodeUuid :: Field pExportTargetNodeUuid = withDoc "Target node UUID (if local export)" . renameField "ExportTargetNodeUuid" . optionalField $ simpleField "target_node_uuid" [t| NonEmptyString |]
213
pExportTargetNodeUuid = withDoc "Target node UUID (if local export)" . renameField "ExportTargetNodeUuid" . optionalField $ simpleField "target_node_uuid" [t| NonEmptyString |]
182
false
true
0
8
28
38
20
18
null
null
julianespinel/trainning
hackerrank/2DArray.hs
mit
main = do matrix <- getIntSquareMatrix squareSide let coordinates = getAllCoordinates squareSide hourGlasses = getHourGlasses matrix coordinates sums = sumHourGlasses hourGlasses print $ fromJust(maximum sums)
227
main = do matrix <- getIntSquareMatrix squareSide let coordinates = getAllCoordinates squareSide hourGlasses = getHourGlasses matrix coordinates sums = sumHourGlasses hourGlasses print $ fromJust(maximum sums)
227
main = do matrix <- getIntSquareMatrix squareSide let coordinates = getAllCoordinates squareSide hourGlasses = getHourGlasses matrix coordinates sums = sumHourGlasses hourGlasses print $ fromJust(maximum sums)
227
false
false
0
10
42
62
28
34
null
null
josefs/autosar
oldARSim/ARSim.hs
bsd-3-clause
say (CALL _ _ res) (RInst a n c ex (Call o _ cont)) = [RInst a n c ex (cont res)]
89
say (CALL _ _ res) (RInst a n c ex (Call o _ cont)) = [RInst a n c ex (cont res)]
89
say (CALL _ _ res) (RInst a n c ex (Call o _ cont)) = [RInst a n c ex (cont res)]
89
false
false
0
9
29
69
33
36
null
null
icyfork/shellcheck
ShellCheck/Analytics.hs
gpl-3.0
prop_checkUnused1 = verifyTree checkUnusedAssignments "var=foo; echo $bar"
74
prop_checkUnused1 = verifyTree checkUnusedAssignments "var=foo; echo $bar"
74
prop_checkUnused1 = verifyTree checkUnusedAssignments "var=foo; echo $bar"
74
false
false
1
5
6
14
5
9
null
null
roelvandijk/ftdi
System/FTDI/Internal.hs
bsd-3-clause
reqSetBitMode = 0x0B
25
reqSetBitMode = 0x0B
25
reqSetBitMode = 0x0B
25
false
false
1
5
7
10
3
7
null
null
urbanslug/ghc
testsuite/tests/programs/andy_cherry/GenUtils.hs
bsd-3-clause
mergeWith le (x:xs) (y:ys) | x `le` y = x : mergeWith le xs (y:ys) | otherwise = y : mergeWith le (x:xs) ys
122
mergeWith le (x:xs) (y:ys) | x `le` y = x : mergeWith le xs (y:ys) | otherwise = y : mergeWith le (x:xs) ys
122
mergeWith le (x:xs) (y:ys) | x `le` y = x : mergeWith le xs (y:ys) | otherwise = y : mergeWith le (x:xs) ys
122
false
false
0
9
38
89
43
46
null
null
markus-git/co-feldspar
src/Feldspar/Software/Verify/Command.hs
bsd-3-clause
addComment :: ControlCMD [[SomeLiteral]] Imp.:<: instr => String -> FO.Sequence instr (Param2 exp pred) a -> FO.Sequence instr (Param2 exp pred) a addComment msg prog = flip (FO.Seq ()) prog (Oper.inj (Comment msg :: ControlCMD [[SomeLiteral]] (Param3 (FO.Sequence prg fs) exp pred) ()))
296
addComment :: ControlCMD [[SomeLiteral]] Imp.:<: instr => String -> FO.Sequence instr (Param2 exp pred) a -> FO.Sequence instr (Param2 exp pred) a addComment msg prog = flip (FO.Seq ()) prog (Oper.inj (Comment msg :: ControlCMD [[SomeLiteral]] (Param3 (FO.Sequence prg fs) exp pred) ()))
296
addComment msg prog = flip (FO.Seq ()) prog (Oper.inj (Comment msg :: ControlCMD [[SomeLiteral]] (Param3 (FO.Sequence prg fs) exp pred) ()))
142
false
true
4
14
51
110
58
52
null
null
deech/stack
src/main/Main.hs
bsd-3-clause
main :: IO () main = do -- Line buffer the output by default, particularly for non-terminal runs. -- See https://github.com/commercialhaskell/stack/pull/360 hSetBuffering stdout LineBuffering hSetBuffering stdin LineBuffering hSetBuffering stderr LineBuffering hSetTranslit stdout hSetTranslit stderr ar...
1,834
main :: IO () main = do -- Line buffer the output by default, particularly for non-terminal runs. -- See https://github.com/commercialhaskell/stack/pull/360 hSetBuffering stdout LineBuffering hSetBuffering stdin LineBuffering hSetBuffering stderr LineBuffering hSetTranslit stdout hSetTranslit stderr ar...
1,834
main = do -- Line buffer the output by default, particularly for non-terminal runs. -- See https://github.com/commercialhaskell/stack/pull/360 hSetBuffering stdout LineBuffering hSetBuffering stdin LineBuffering hSetBuffering stderr LineBuffering hSetTranslit stdout hSetTranslit stderr args <- getArgs ...
1,820
false
true
1
24
512
384
174
210
null
null
nevrenato/Hets_Fork
CSL/Morphism.hs
gpl-2.0
printMorphism :: Morphism -> Doc printMorphism m = pretty (source m) <> text "-->" <> pretty (target m) <> vcat (map ( \ (x, y) -> lparen <> pretty x <> text "," <> pretty y <> rparen) $ Map.assocs $ operatorMap m)
218
printMorphism :: Morphism -> Doc printMorphism m = pretty (source m) <> text "-->" <> pretty (target m) <> vcat (map ( \ (x, y) -> lparen <> pretty x <> text "," <> pretty y <> rparen) $ Map.assocs $ operatorMap m)
218
printMorphism m = pretty (source m) <> text "-->" <> pretty (target m) <> vcat (map ( \ (x, y) -> lparen <> pretty x <> text "," <> pretty y <> rparen) $ Map.assocs $ operatorMap m)
185
false
true
2
16
46
113
54
59
null
null
JeffHeard/Hieroglyph
Graphics/Rendering/Hieroglyph/OpenGL/Compile.hs
bsd-2-clause
arcFn x y r (t:ts) = (x + r * cos t) : (y + r * sin t) : arcFn x y r ts
71
arcFn x y r (t:ts) = (x + r * cos t) : (y + r * sin t) : arcFn x y r ts
71
arcFn x y r (t:ts) = (x + r * cos t) : (y + r * sin t) : arcFn x y r ts
71
false
false
0
9
24
67
33
34
null
null
grandpascorpion/canon
Math/NumberTheory/Canon.hs
gpl-3.0
-- For cToGCR combine the bases or partial bases that match on a gcm (say with the other term) in cTryToCanonize cHyOpLvlOutOfRange :: Canon -> Bool cHyOpLvlOutOfRange h | h < cMultOpLevel || h > maxHyperOpDelveLevel = True | otherwise = False
300
cHyOpLvlOutOfRange :: Canon -> Bool cHyOpLvlOutOfRange h | h < cMultOpLevel || h > maxHyperOpDelveLevel = True | otherwise = False
186
cHyOpLvlOutOfRange h | h < cMultOpLevel || h > maxHyperOpDelveLevel = True | otherwise = False
150
true
true
0
10
98
46
22
24
null
null
AshyIsMe/osxmonad
OSXMonad/Core.hs
bsd-3-clause
osxWindows :: (XM.WindowSet -> XM.WindowSet) -> XM.X () osxWindows f = do XM.XState { C.windowset = old } <- XM.get let ws = f old XM.modify (\s -> s { C.windowset = ws })
177
osxWindows :: (XM.WindowSet -> XM.WindowSet) -> XM.X () osxWindows f = do XM.XState { C.windowset = old } <- XM.get let ws = f old XM.modify (\s -> s { C.windowset = ws })
177
osxWindows f = do XM.XState { C.windowset = old } <- XM.get let ws = f old XM.modify (\s -> s { C.windowset = ws })
121
false
true
0
12
39
101
49
52
null
null
brendanhay/gogol
gogol-firebase-dynamiclinks/gen/Network/Google/FirebaseDynamicLinks/Types/Product.hs
mpl-2.0
-- | Google Play Campaign Measurements. aiGooglePlayAnalytics :: Lens' AnalyticsInfo (Maybe GooglePlayAnalytics) aiGooglePlayAnalytics = lens _aiGooglePlayAnalytics (\ s a -> s{_aiGooglePlayAnalytics = a})
213
aiGooglePlayAnalytics :: Lens' AnalyticsInfo (Maybe GooglePlayAnalytics) aiGooglePlayAnalytics = lens _aiGooglePlayAnalytics (\ s a -> s{_aiGooglePlayAnalytics = a})
173
aiGooglePlayAnalytics = lens _aiGooglePlayAnalytics (\ s a -> s{_aiGooglePlayAnalytics = a})
100
true
true
0
9
30
48
25
23
null
null
oldmanmike/ghc
compiler/cmm/PprC.hs
bsd-3-clause
mkFN_ i = text "FN_" <> parens i
34
mkFN_ i = text "FN_" <> parens i
34
mkFN_ i = text "FN_" <> parens i
34
false
false
0
6
9
19
8
11
null
null