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
byorgey/Idris-dev
src/Idris/Completion.hs
bsd-3-clause
completeName :: [String] -> String -> Idris [Completion] completeName extra n = do ns <- names return $ completeWith (extra ++ ns) n
158
completeName :: [String] -> String -> Idris [Completion] completeName extra n = do ns <- names return $ completeWith (extra ++ ns) n
158
completeName extra n = do ns <- names return $ completeWith (extra ++ ns) n
101
false
true
0
11
48
64
30
34
null
null
yaxu/hstexture
Texture/UI.hs
gpl-3.0
handleEvent scene (MouseButtonDown x y ButtonLeft) = do scene' <- finishTyping scene mods <- liftIO getModState -- liftIO $ putStrLn $ show mods let word = clicked scene' startEdit = isJust word && ctrlDown mods word' = do w <- word let w' | ctrlDown mods = w {status = Typing} | otherwise = w return $ setMouseOffset xy w' scene'' | startEdit = updateCursor (fromJust word') scene' | otherwise = scene' return $ updateScene scene'' word' where clicked scene = instructionAt (source scene) xy updateScene scene Nothing = scene {cursor = xy} updateScene scene (Just w) = scene {source = updateWord (source scene) w} xy = fromScreen (fromIntegral x, fromIntegral y)
823
handleEvent scene (MouseButtonDown x y ButtonLeft) = do scene' <- finishTyping scene mods <- liftIO getModState -- liftIO $ putStrLn $ show mods let word = clicked scene' startEdit = isJust word && ctrlDown mods word' = do w <- word let w' | ctrlDown mods = w {status = Typing} | otherwise = w return $ setMouseOffset xy w' scene'' | startEdit = updateCursor (fromJust word') scene' | otherwise = scene' return $ updateScene scene'' word' where clicked scene = instructionAt (source scene) xy updateScene scene Nothing = scene {cursor = xy} updateScene scene (Just w) = scene {source = updateWord (source scene) w} xy = fromScreen (fromIntegral x, fromIntegral y)
823
handleEvent scene (MouseButtonDown x y ButtonLeft) = do scene' <- finishTyping scene mods <- liftIO getModState -- liftIO $ putStrLn $ show mods let word = clicked scene' startEdit = isJust word && ctrlDown mods word' = do w <- word let w' | ctrlDown mods = w {status = Typing} | otherwise = w return $ setMouseOffset xy w' scene'' | startEdit = updateCursor (fromJust word') scene' | otherwise = scene' return $ updateScene scene'' word' where clicked scene = instructionAt (source scene) xy updateScene scene Nothing = scene {cursor = xy} updateScene scene (Just w) = scene {source = updateWord (source scene) w} xy = fromScreen (fromIntegral x, fromIntegral y)
823
false
false
3
18
271
265
125
140
null
null
nightscape/platform
node/tests/Unison/Test/Html.hs
mit
main :: IO () main = do codebase <- makeTestCodebase defaultMain (tests' codebase)
86
main :: IO () main = do codebase <- makeTestCodebase defaultMain (tests' codebase)
86
main = do codebase <- makeTestCodebase defaultMain (tests' codebase)
72
false
true
0
9
16
35
16
19
null
null
msiegenthaler/haskell-xbee
test/CommandTest.hs
bsd-3-clause
remoteAtCommandResponseExample = parse [0x97, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFE, 0x4D, 0x59, 0x00, 0x23, 0x12] == Right (RemoteATCommandResponse (frameForId 0x52) broadcastAddress disabledAddress (commandName 'M' 'Y') CmdOK $ pack [0x23, 0x12])
319
remoteAtCommandResponseExample = parse [0x97, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFE, 0x4D, 0x59, 0x00, 0x23, 0x12] == Right (RemoteATCommandResponse (frameForId 0x52) broadcastAddress disabledAddress (commandName 'M' 'Y') CmdOK $ pack [0x23, 0x12])
319
remoteAtCommandResponseExample = parse [0x97, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFE, 0x4D, 0x59, 0x00, 0x23, 0x12] == Right (RemoteATCommandResponse (frameForId 0x52) broadcastAddress disabledAddress (commandName 'M' 'Y') CmdOK $ pack [0x23, 0x12])
319
false
false
1
10
78
112
62
50
null
null
ancientlanguage/haskell-analysis
prepare/src/Prepare/Decompose.hs
mit
decomposeChar '\x1F22' = "\x03B7\x0313\x0300"
45
decomposeChar '\x1F22' = "\x03B7\x0313\x0300"
45
decomposeChar '\x1F22' = "\x03B7\x0313\x0300"
45
false
false
1
5
3
13
4
9
null
null
uduki/hsQt
Qtc/Gui/QPainterPath.hs
bsd-2-clause
controlPointRect :: QPainterPath a -> (()) -> IO (RectF) controlPointRect x0 () = withRectFResult $ \crectf_ret_x crectf_ret_y crectf_ret_w crectf_ret_h -> withObjectPtr x0 $ \cobj_x0 -> qtc_QPainterPath_controlPointRect_qth cobj_x0 crectf_ret_x crectf_ret_y crectf_ret_w crectf_ret_h
294
controlPointRect :: QPainterPath a -> (()) -> IO (RectF) controlPointRect x0 () = withRectFResult $ \crectf_ret_x crectf_ret_y crectf_ret_w crectf_ret_h -> withObjectPtr x0 $ \cobj_x0 -> qtc_QPainterPath_controlPointRect_qth cobj_x0 crectf_ret_x crectf_ret_y crectf_ret_w crectf_ret_h
294
controlPointRect x0 () = withRectFResult $ \crectf_ret_x crectf_ret_y crectf_ret_w crectf_ret_h -> withObjectPtr x0 $ \cobj_x0 -> qtc_QPainterPath_controlPointRect_qth cobj_x0 crectf_ret_x crectf_ret_y crectf_ret_w crectf_ret_h
237
false
true
0
9
40
78
39
39
null
null
markus-git/imperative-edsl-vhdl
src/Language/Embedded/Hardware/Command/Backend/VHDL.hs
bsd-3-clause
traverseSig clk rst is (SArr n m l af) = do i <- newSym n let len = V.sub [lift $ V.literal $ V.number $ show l, lift $ V.literal $ V.number "1"] t <- compTA (Proxy :: Proxy ct) (rangeZero (lift len)) (proxyF af) V.port (ident' i) m t Nothing traverseSig clk rst (i : is) (af (ArrayC i))
309
traverseSig clk rst is (SArr n m l af) = do i <- newSym n let len = V.sub [lift $ V.literal $ V.number $ show l, lift $ V.literal $ V.number "1"] t <- compTA (Proxy :: Proxy ct) (rangeZero (lift len)) (proxyF af) V.port (ident' i) m t Nothing traverseSig clk rst (i : is) (af (ArrayC i))
309
traverseSig clk rst is (SArr n m l af) = do i <- newSym n let len = V.sub [lift $ V.literal $ V.number $ show l, lift $ V.literal $ V.number "1"] t <- compTA (Proxy :: Proxy ct) (rangeZero (lift len)) (proxyF af) V.port (ident' i) m t Nothing traverseSig clk rst (i : is) (af (ArrayC i))
309
false
false
0
15
81
183
87
96
null
null
danplubell/hmp3-phoenix
src/Lexers.hs
gpl-3.0
-- combine two disjunctive continuations -- joinConts :: Cont s t -> Cont s t -> Cont s t joinConts Done c' = c'
114
joinConts :: Cont s t -> Cont s t -> Cont s t joinConts Done c' = c'
70
joinConts Done c' = c'
24
true
true
0
8
25
46
21
25
null
null
dmbarbour/Sirea
src/Sirea/Internal/B0Dynamic.hs
bsd-3-clause
mld_getSt :: MLD a -> Key -> SigSt a mld_getSt mld k = fromMaybe st_zero $ M.lookup k (mld_table mld)
101
mld_getSt :: MLD a -> Key -> SigSt a mld_getSt mld k = fromMaybe st_zero $ M.lookup k (mld_table mld)
101
mld_getSt mld k = fromMaybe st_zero $ M.lookup k (mld_table mld)
64
false
true
0
8
19
50
23
27
null
null
eijian/raytracer
src/Ray/Algebra.hs
bsd-3-clause
rr :: [Double] -> Double -> Double -> Int -> Int rr [] _ _ len = len
68
rr :: [Double] -> Double -> Double -> Int -> Int rr [] _ _ len = len
68
rr [] _ _ len = len
19
false
true
0
8
17
41
21
20
null
null
urbanslug/ghc
testsuite/tests/rename/should_compile/rn032.hs
bsd-3-clause
x :: Int x = 2
14
x :: Int x = 2
14
x = 2
5
false
true
0
6
5
18
7
11
null
null
bermanjosh/bloodhound
src/Database/V1/Bloodhound/Client.hs
bsd-3-clause
deleteIndex :: MonadBH m => IndexName -> m Reply deleteIndex (IndexName indexName) = delete =<< joinPath [indexName]
118
deleteIndex :: MonadBH m => IndexName -> m Reply deleteIndex (IndexName indexName) = delete =<< joinPath [indexName]
118
deleteIndex (IndexName indexName) = delete =<< joinPath [indexName]
69
false
true
0
7
18
44
21
23
null
null
cordawyn/rdf4h-hdbi
test/Data/RDF/PersistenceTest.hs
bsd-3-clause
initStorage :: Connection c => c -> T.Text -> IO () initStorage conn graph = do deleteStorage conn graph createStorage conn graph -- NB: Copied from Persistence.hs, read comments there.
190
initStorage :: Connection c => c -> T.Text -> IO () initStorage conn graph = do deleteStorage conn graph createStorage conn graph -- NB: Copied from Persistence.hs, read comments there.
190
initStorage conn graph = do deleteStorage conn graph createStorage conn graph -- NB: Copied from Persistence.hs, read comments there.
138
false
true
0
9
34
55
25
30
null
null
TomMD/commsec
Network/CommSec.hs
bsd-3-clause
recvBytesPtr s p l = do nr <- recvBuf s p l recvBytesPtr s (p `plusPtr` nr) (l - nr) -- Retry until we have sent exactly the specified number of bytes
167
recvBytesPtr s p l = do nr <- recvBuf s p l recvBytesPtr s (p `plusPtr` nr) (l - nr) -- Retry until we have sent exactly the specified number of bytes
167
recvBytesPtr s p l = do nr <- recvBuf s p l recvBytesPtr s (p `plusPtr` nr) (l - nr) -- Retry until we have sent exactly the specified number of bytes
167
false
false
0
9
48
54
27
27
null
null
BlackBrane/microsoft-translator
src/Microsoft/Translator/Language.hs
mit
toLangCode Maltese = "mt"
36
toLangCode Maltese = "mt"
36
toLangCode Maltese = "mt"
36
false
false
0
5
14
9
4
5
null
null
antarestrader/sapphire
Builtin/Integer.hs
gpl-3.0
lte ((VInt b):[]) = do (VInt a) <- innerValue replyM_ $ mkBool (a<=b)
73
lte ((VInt b):[]) = do (VInt a) <- innerValue replyM_ $ mkBool (a<=b)
73
lte ((VInt b):[]) = do (VInt a) <- innerValue replyM_ $ mkBool (a<=b)
73
false
false
0
10
16
55
26
29
null
null
emwap/feldspar-language
src/Feldspar/Core/Constructs/Tuple.hs
bsd-3-clause
sel4Size Tup5Type{} = $(proj 5 3)
34
sel4Size Tup5Type{} = $(proj 5 3)
34
sel4Size Tup5Type{} = $(proj 5 3)
34
false
false
0
7
6
22
10
12
null
null
juodaspaulius/clafer-old-customBNFC
src/Language/Clafer/Intermediate/Intclafer.hs
mit
iFoldMap f i@(IRPExp (PExp Nothing _ _ iExp)) = f i `mappend` (iFoldMap f $ IRIExp iExp)
90
iFoldMap f i@(IRPExp (PExp Nothing _ _ iExp)) = f i `mappend` (iFoldMap f $ IRIExp iExp)
90
iFoldMap f i@(IRPExp (PExp Nothing _ _ iExp)) = f i `mappend` (iFoldMap f $ IRIExp iExp)
90
false
false
0
10
18
54
27
27
null
null
parsonsmatt/servant-ruby
src/Servant/Ruby.hs
mit
indent :: Ruby -> Ruby indent = init . unlines . map (" " ++) . lines
70
indent :: Ruby -> Ruby indent = init . unlines . map (" " ++) . lines
70
indent = init . unlines . map (" " ++) . lines
47
false
true
0
8
17
34
18
16
null
null
green-haskell/ghc
compiler/typecheck/TcGenGenerics.hs
bsd-3-clause
forgetArgVar :: GenericKind_DC -> GenericKind forgetArgVar Gen0_DC = Gen0
75
forgetArgVar :: GenericKind_DC -> GenericKind forgetArgVar Gen0_DC = Gen0
75
forgetArgVar Gen0_DC = Gen0
29
false
true
0
5
10
18
9
9
null
null
bjorg/HPlug
plug.hs
mit
getPath :: Plug -> String getPath Plug { path = Nothing } = ""
62
getPath :: Plug -> String getPath Plug { path = Nothing } = ""
62
getPath Plug { path = Nothing } = ""
36
false
true
3
6
13
32
15
17
null
null
danr/hipspec
src/HipSpec/Lang/Monomorphise.hs
gpl-3.0
-- | Second pass monomorphisation: remove all type applications and change -- the identifier names instead monoClauses2 :: (Ord a,Ord b) => ([Clause a b],[Clause a b]) -> [Clause (IdInst a b) b] monoClauses2 (cls,sigs) = map (`SortSig` 0) (S.toList sorts) ++ ty_sigs ++ cls' where cls' = [ Clause { cl_name = cl_name cl , cl_ty_triggers = [] , cl_type = cl_type cl , ty_vars = [] , cl_formula = fmMod tyCon apply (cl_formula cl) } | cl <- cls ] tyCon f ts = IdInst f ts apply f ts = Apply (IdInst f ts) [] (sorts1,ty_apps) = clsDeps cls' sig_map = M.fromList [ (f,(tvs,args,res)) | TypeSig f tvs args res <- sigs ] ty_sigs = [ TypeSig f' [] args' res' | f'@(IdInst f ts) <- S.toList ty_apps , Just (tvs,args,res) <- [M.lookup f sig_map] , let su = tyMod tyCon . tySubsts (zip tvs ts) args' = map su args res' = su res ] (sorts2,_) = clsDeps ty_sigs sorts = sorts1 `S.union` sorts2 -- | Monomorphise clauses
1,133
monoClauses2 :: (Ord a,Ord b) => ([Clause a b],[Clause a b]) -> [Clause (IdInst a b) b] monoClauses2 (cls,sigs) = map (`SortSig` 0) (S.toList sorts) ++ ty_sigs ++ cls' where cls' = [ Clause { cl_name = cl_name cl , cl_ty_triggers = [] , cl_type = cl_type cl , ty_vars = [] , cl_formula = fmMod tyCon apply (cl_formula cl) } | cl <- cls ] tyCon f ts = IdInst f ts apply f ts = Apply (IdInst f ts) [] (sorts1,ty_apps) = clsDeps cls' sig_map = M.fromList [ (f,(tvs,args,res)) | TypeSig f tvs args res <- sigs ] ty_sigs = [ TypeSig f' [] args' res' | f'@(IdInst f ts) <- S.toList ty_apps , Just (tvs,args,res) <- [M.lookup f sig_map] , let su = tyMod tyCon . tySubsts (zip tvs ts) args' = map su args res' = su res ] (sorts2,_) = clsDeps ty_sigs sorts = sorts1 `S.union` sorts2 -- | Monomorphise clauses
1,024
monoClauses2 (cls,sigs) = map (`SortSig` 0) (S.toList sorts) ++ ty_sigs ++ cls' where cls' = [ Clause { cl_name = cl_name cl , cl_ty_triggers = [] , cl_type = cl_type cl , ty_vars = [] , cl_formula = fmMod tyCon apply (cl_formula cl) } | cl <- cls ] tyCon f ts = IdInst f ts apply f ts = Apply (IdInst f ts) [] (sorts1,ty_apps) = clsDeps cls' sig_map = M.fromList [ (f,(tvs,args,res)) | TypeSig f tvs args res <- sigs ] ty_sigs = [ TypeSig f' [] args' res' | f'@(IdInst f ts) <- S.toList ty_apps , Just (tvs,args,res) <- [M.lookup f sig_map] , let su = tyMod tyCon . tySubsts (zip tvs ts) args' = map su args res' = su res ] (sorts2,_) = clsDeps ty_sigs sorts = sorts1 `S.union` sorts2 -- | Monomorphise clauses
936
true
true
0
13
398
428
228
200
null
null
adarqui/Darqios
experimental/scripts/mysql-alert-processlist.hs
gpl-3.0
main :: IO () main = do argv <- getArgs case argv of (url:tsThreshold:nqThreshold:[]) -> queryMySQL url tsThreshold nqThreshold _ -> print usage return ()
161
main :: IO () main = do argv <- getArgs case argv of (url:tsThreshold:nqThreshold:[]) -> queryMySQL url tsThreshold nqThreshold _ -> print usage return ()
161
main = do argv <- getArgs case argv of (url:tsThreshold:nqThreshold:[]) -> queryMySQL url tsThreshold nqThreshold _ -> print usage return ()
147
false
true
0
15
31
83
37
46
null
null
thoferon/cric
examples/simple.hs
mit
config :: Cric () config = do chmod 0o777 "/tmp" createUser "dummy" $ duo { groups = ["dummies", "idiots"] } withEnv [("blah", "1")] . inDir "/tmp" . asUser "root" $ do installPackage "ruby" run "whoami" sendFile "examples/file" "/tmp/blah" $ dfto { md5Hash = Just "6a8f5078116f848165228ae0e466ac6d" } result <- exec "ls -la" liftIO $ print result
367
config :: Cric () config = do chmod 0o777 "/tmp" createUser "dummy" $ duo { groups = ["dummies", "idiots"] } withEnv [("blah", "1")] . inDir "/tmp" . asUser "root" $ do installPackage "ruby" run "whoami" sendFile "examples/file" "/tmp/blah" $ dfto { md5Hash = Just "6a8f5078116f848165228ae0e466ac6d" } result <- exec "ls -la" liftIO $ print result
367
config = do chmod 0o777 "/tmp" createUser "dummy" $ duo { groups = ["dummies", "idiots"] } withEnv [("blah", "1")] . inDir "/tmp" . asUser "root" $ do installPackage "ruby" run "whoami" sendFile "examples/file" "/tmp/blah" $ dfto { md5Hash = Just "6a8f5078116f848165228ae0e466ac6d" } result <- exec "ls -la" liftIO $ print result
349
false
true
0
12
74
136
63
73
null
null
tismith/tlisp
src/Primitives.hs
mit
stringSetProc e = throwError $ NumArgs 3 e
42
stringSetProc e = throwError $ NumArgs 3 e
42
stringSetProc e = throwError $ NumArgs 3 e
42
false
false
0
6
7
18
8
10
null
null
mrlovre/super-memory
Pro3/src/FuzzySystems/AccelFuzzySystemMin.hs
gpl-3.0
accelRule8 :: Rule accelRule8 vars = let [v] = getVariables vars ["v"] in makeRule [(v, lvMoreOrLess idle)] topAccel
124
accelRule8 :: Rule accelRule8 vars = let [v] = getVariables vars ["v"] in makeRule [(v, lvMoreOrLess idle)] topAccel
124
accelRule8 vars = let [v] = getVariables vars ["v"] in makeRule [(v, lvMoreOrLess idle)] topAccel
105
false
true
0
10
25
54
27
27
null
null
jstolarek/ghc
compiler/nativeGen/PPC/Ppr.hs
bsd-3-clause
pprUnary :: LitString -> Reg -> Reg -> SDoc pprUnary op reg1 reg2 = hcat [ char '\t', ptext op, char '\t', pprReg reg1, ptext (sLit ", "), pprReg reg2 ]
204
pprUnary :: LitString -> Reg -> Reg -> SDoc pprUnary op reg1 reg2 = hcat [ char '\t', ptext op, char '\t', pprReg reg1, ptext (sLit ", "), pprReg reg2 ]
204
pprUnary op reg1 reg2 = hcat [ char '\t', ptext op, char '\t', pprReg reg1, ptext (sLit ", "), pprReg reg2 ]
160
false
true
0
9
82
80
38
42
null
null
elieux/ghc
compiler/main/DynFlags.hs
bsd-3-clause
showOpt (Option s) = s
23
showOpt (Option s) = s
23
showOpt (Option s) = s
23
false
false
0
7
5
15
7
8
null
null
craynafinal/cs557_functional_languages
hw1/q5.hs
mit
strange xs = head (head (reverse (takeWhile notnull (iterate twirl xs))))
73
strange xs = head (head (reverse (takeWhile notnull (iterate twirl xs))))
73
strange xs = head (head (reverse (takeWhile notnull (iterate twirl xs))))
73
false
false
0
13
10
40
19
21
null
null
agentm/project-m36
test/Relation/Basic.hs
unlicense
testReorderTuple :: Test testReorderTuple = TestCase $ do let tup1 = mkRelationTuple attrs1 (V.fromList [IntAtom 4, TextAtom "test"]) attrs1 = A.attributesFromList [Attribute "a" IntAtomType, Attribute "b" TextAtomType] attrs2 = A.attributesFromList [Attribute "b" TextAtomType, Attribute "a" IntAtomType] actual = reorderTuple attrs2 tup1 expected = mkRelationTuple attrs2 (V.fromList [TextAtom "test", IntAtom 4]) assertEqual "reorderTuple" expected actual
486
testReorderTuple :: Test testReorderTuple = TestCase $ do let tup1 = mkRelationTuple attrs1 (V.fromList [IntAtom 4, TextAtom "test"]) attrs1 = A.attributesFromList [Attribute "a" IntAtomType, Attribute "b" TextAtomType] attrs2 = A.attributesFromList [Attribute "b" TextAtomType, Attribute "a" IntAtomType] actual = reorderTuple attrs2 tup1 expected = mkRelationTuple attrs2 (V.fromList [TextAtom "test", IntAtom 4]) assertEqual "reorderTuple" expected actual
486
testReorderTuple = TestCase $ do let tup1 = mkRelationTuple attrs1 (V.fromList [IntAtom 4, TextAtom "test"]) attrs1 = A.attributesFromList [Attribute "a" IntAtomType, Attribute "b" TextAtomType] attrs2 = A.attributesFromList [Attribute "b" TextAtomType, Attribute "a" IntAtomType] actual = reorderTuple attrs2 tup1 expected = mkRelationTuple attrs2 (V.fromList [TextAtom "test", IntAtom 4]) assertEqual "reorderTuple" expected actual
461
false
true
0
15
81
151
74
77
null
null
LightAndLight/psbt
src/PSBT/SemVer/Version.hs
bsd-3-clause
numericId :: Parser String numericId = try case1 <|> try case2 <|> case3 where case1 = (:) <$> positiveDigit <*> some digitChar case2 = return <$> positiveDigit case3 = return <$> char '0'
207
numericId :: Parser String numericId = try case1 <|> try case2 <|> case3 where case1 = (:) <$> positiveDigit <*> some digitChar case2 = return <$> positiveDigit case3 = return <$> char '0'
206
numericId = try case1 <|> try case2 <|> case3 where case1 = (:) <$> positiveDigit <*> some digitChar case2 = return <$> positiveDigit case3 = return <$> char '0'
179
false
true
0
7
51
70
35
35
null
null
Mathnerd314/atomo
src/Atomo/Environment.hs
bsd-3-clause
setSelf v (Single i n t) = Single i n (setSelf' v t)
56
setSelf v (Single i n t) = Single i n (setSelf' v t)
56
setSelf v (Single i n t) = Single i n (setSelf' v t)
56
false
false
0
6
16
40
17
23
null
null
achirkin/mooc-images
src/Foundation.hs
mit
isAdmin :: Maybe User -> Bool isAdmin Nothing = False
53
isAdmin :: Maybe User -> Bool isAdmin Nothing = False
53
isAdmin Nothing = False
23
false
true
0
6
9
21
10
11
null
null
soupi/haskell-sdl2gl
src/Examples/Example01/Main.hs
mit
-- init World initWorld :: (SDL.Window, SDL.Surface) -> W.World initWorld (window,surface) = W.World window surface
115
initWorld :: (SDL.Window, SDL.Surface) -> W.World initWorld (window,surface) = W.World window surface
101
initWorld (window,surface) = W.World window surface
51
true
true
0
7
14
44
24
20
null
null
janrain/snap-server
test/suite/TestSuite.hs
bsd-3-clause
backends :: Int -> [(Int,Maybe Int,ConfigBackend)] backends sp = zip3 (ports sp) (sslports sp) [ConfigSimpleBackend, ConfigLibEvBackend]
174
backends :: Int -> [(Int,Maybe Int,ConfigBackend)] backends sp = zip3 (ports sp) (sslports sp) [ConfigSimpleBackend, ConfigLibEvBackend]
174
backends sp = zip3 (ports sp) (sslports sp) [ConfigSimpleBackend, ConfigLibEvBackend]
123
false
true
0
10
53
63
32
31
null
null
mmirman/forward-chan
Control/Concurrent/Chan/Forwardable.hs
apache-2.0
getChanContents :: Chan a -> IO [a] getChanContents ch = unsafeInterleaveIO $ do x <- readChan ch xs <- getChanContents ch return $ x:xs -- | Write an entire list of items to a 'Chan'.
192
getChanContents :: Chan a -> IO [a] getChanContents ch = unsafeInterleaveIO $ do x <- readChan ch xs <- getChanContents ch return $ x:xs -- | Write an entire list of items to a 'Chan'.
192
getChanContents ch = unsafeInterleaveIO $ do x <- readChan ch xs <- getChanContents ch return $ x:xs -- | Write an entire list of items to a 'Chan'.
156
false
true
0
9
42
68
30
38
null
null
keithodulaigh/Hets
Comorphisms/Hs2HOLCF.hs
gpl-2.0
getSort :: Continuity -> [HsType] -> PNT -> IsaSort getSort r c t = case c of [] -> case r of IsCont _ -> dom NotCont -> holType (x@(Typ (HsTyApp _ _))) : cs -> let a = getInstType x b = getInstClass x d = getLitName a s = getSort r cs t k = transClass b u = showIsaName d v = showIsaName t in if u == v then k : s else s _ : cs -> getSort r cs t
497
getSort :: Continuity -> [HsType] -> PNT -> IsaSort getSort r c t = case c of [] -> case r of IsCont _ -> dom NotCont -> holType (x@(Typ (HsTyApp _ _))) : cs -> let a = getInstType x b = getInstClass x d = getLitName a s = getSort r cs t k = transClass b u = showIsaName d v = showIsaName t in if u == v then k : s else s _ : cs -> getSort r cs t
497
getSort r c t = case c of [] -> case r of IsCont _ -> dom NotCont -> holType (x@(Typ (HsTyApp _ _))) : cs -> let a = getInstType x b = getInstClass x d = getLitName a s = getSort r cs t k = transClass b u = showIsaName d v = showIsaName t in if u == v then k : s else s _ : cs -> getSort r cs t
445
false
true
0
17
236
194
97
97
null
null
cjhveal/H-99
4.hs
mit
myLength (x:xs) = 1 + length xs
31
myLength (x:xs) = 1 + length xs
31
myLength (x:xs) = 1 + length xs
31
false
false
0
7
6
23
11
12
null
null
eggzilla/ClustalParser
Biobase/Clustal/Import.hs
gpl-3.0
constructAlignmentEntries :: [ClustalAlignmentEntrySlice] -> String -> ClustalAlignmentEntry constructAlignmentEntries slices entryIdentifier= entry where currentSlices = filter (\a -> entrySequenceSliceIdentifier a == entryIdentifier) slices entrySequence = concatMap entryAlignedSliceSequence currentSlices entry = ClustalAlignmentEntry (T.pack entryIdentifier) (T.pack entrySequence)
405
constructAlignmentEntries :: [ClustalAlignmentEntrySlice] -> String -> ClustalAlignmentEntry constructAlignmentEntries slices entryIdentifier= entry where currentSlices = filter (\a -> entrySequenceSliceIdentifier a == entryIdentifier) slices entrySequence = concatMap entryAlignedSliceSequence currentSlices entry = ClustalAlignmentEntry (T.pack entryIdentifier) (T.pack entrySequence)
405
constructAlignmentEntries slices entryIdentifier= entry where currentSlices = filter (\a -> entrySequenceSliceIdentifier a == entryIdentifier) slices entrySequence = concatMap entryAlignedSliceSequence currentSlices entry = ClustalAlignmentEntry (T.pack entryIdentifier) (T.pack entrySequence)
311
false
true
2
9
52
91
46
45
null
null
nickspinale/euler
complete/008.hs
mit
multNext n (x:xs) = x * multNext (n - 1) xs
43
multNext n (x:xs) = x * multNext (n - 1) xs
43
multNext n (x:xs) = x * multNext (n - 1) xs
43
false
false
0
8
10
34
17
17
null
null
rueshyna/gogol
gogol-games/gen/Network/Google/Games/Types/Product.hs
mpl-2.0
-- | Creates a value of 'TurnBasedMatch' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'tbmStatus' -- -- * 'tbmVariant' -- -- * 'tbmResults' -- -- * 'tbmMatchNumber' -- -- * 'tbmKind' -- -- * 'tbmData' -- -- * 'tbmWithParticipantId' -- -- * 'tbmCreationDetails' -- -- * 'tbmInviterId' -- -- * 'tbmLastUpdateDetails' -- -- * 'tbmParticipants' -- -- * 'tbmApplicationId' -- -- * 'tbmAutoMatchingCriteria' -- -- * 'tbmPreviousMatchData' -- -- * 'tbmPendingParticipantId' -- -- * 'tbmUserMatchStatus' -- -- * 'tbmMatchId' -- -- * 'tbmDescription' -- -- * 'tbmRematchId' -- -- * 'tbmMatchVersion' turnBasedMatch :: TurnBasedMatch turnBasedMatch = TurnBasedMatch' { _tbmStatus = Nothing , _tbmVariant = Nothing , _tbmResults = Nothing , _tbmMatchNumber = Nothing , _tbmKind = "games#turnBasedMatch" , _tbmData = Nothing , _tbmWithParticipantId = Nothing , _tbmCreationDetails = Nothing , _tbmInviterId = Nothing , _tbmLastUpdateDetails = Nothing , _tbmParticipants = Nothing , _tbmApplicationId = Nothing , _tbmAutoMatchingCriteria = Nothing , _tbmPreviousMatchData = Nothing , _tbmPendingParticipantId = Nothing , _tbmUserMatchStatus = Nothing , _tbmMatchId = Nothing , _tbmDescription = Nothing , _tbmRematchId = Nothing , _tbmMatchVersion = Nothing }
1,426
turnBasedMatch :: TurnBasedMatch turnBasedMatch = TurnBasedMatch' { _tbmStatus = Nothing , _tbmVariant = Nothing , _tbmResults = Nothing , _tbmMatchNumber = Nothing , _tbmKind = "games#turnBasedMatch" , _tbmData = Nothing , _tbmWithParticipantId = Nothing , _tbmCreationDetails = Nothing , _tbmInviterId = Nothing , _tbmLastUpdateDetails = Nothing , _tbmParticipants = Nothing , _tbmApplicationId = Nothing , _tbmAutoMatchingCriteria = Nothing , _tbmPreviousMatchData = Nothing , _tbmPendingParticipantId = Nothing , _tbmUserMatchStatus = Nothing , _tbmMatchId = Nothing , _tbmDescription = Nothing , _tbmRematchId = Nothing , _tbmMatchVersion = Nothing }
747
turnBasedMatch = TurnBasedMatch' { _tbmStatus = Nothing , _tbmVariant = Nothing , _tbmResults = Nothing , _tbmMatchNumber = Nothing , _tbmKind = "games#turnBasedMatch" , _tbmData = Nothing , _tbmWithParticipantId = Nothing , _tbmCreationDetails = Nothing , _tbmInviterId = Nothing , _tbmLastUpdateDetails = Nothing , _tbmParticipants = Nothing , _tbmApplicationId = Nothing , _tbmAutoMatchingCriteria = Nothing , _tbmPreviousMatchData = Nothing , _tbmPendingParticipantId = Nothing , _tbmUserMatchStatus = Nothing , _tbmMatchId = Nothing , _tbmDescription = Nothing , _tbmRematchId = Nothing , _tbmMatchVersion = Nothing }
710
true
true
1
7
288
183
131
52
null
null
sdiehl/ghc
testsuite/tests/pmcheck/should_compile/T11195.hs
bsd-3-clause
wrapRole :: ReprFlag -> Role -> Coercion -> Coercion wrapRole = undefined
73
wrapRole :: ReprFlag -> Role -> Coercion -> Coercion wrapRole = undefined
73
wrapRole = undefined
20
false
true
0
7
11
23
12
11
null
null
skill-lang/skill
src/main/resources/haskell/Deserialize.hs
bsd-3-clause
-- trivial and inconsequential start value initialize :: FilePath -> IO () initialize filePath = runGet process `fmap` C.readFile filePath >>= writeIORef state
163
initialize :: FilePath -> IO () initialize filePath = runGet process `fmap` C.readFile filePath >>= writeIORef state
116
initialize filePath = runGet process `fmap` C.readFile filePath >>= writeIORef state
84
true
true
0
8
26
45
22
23
null
null
imccoy/babytc
src/Lib.hs
bsd-3-clause
runTypecheck :: Expr -> (Either (Error TyF IntVar) (TypedExpr IntVar), IntBindingState TyF) runTypecheck code = runIdentity $ runIntBindingT $ runEitherT $ typecheck code
170
runTypecheck :: Expr -> (Either (Error TyF IntVar) (TypedExpr IntVar), IntBindingState TyF) runTypecheck code = runIdentity $ runIntBindingT $ runEitherT $ typecheck code
170
runTypecheck code = runIdentity $ runIntBindingT $ runEitherT $ typecheck code
78
false
true
0
11
22
66
31
35
null
null
dysinger/amazonka
amazonka-s3/gen/Network/AWS/S3/Types.hs
mpl-2.0
-- | Size in bytes of the object. ovSize :: Lens' ObjectVersion (Maybe Int) ovSize = lens _ovSize (\s a -> s { _ovSize = a })
125
ovSize :: Lens' ObjectVersion (Maybe Int) ovSize = lens _ovSize (\s a -> s { _ovSize = a })
91
ovSize = lens _ovSize (\s a -> s { _ovSize = a })
49
true
true
1
9
26
52
25
27
null
null
lukexi/ghc
compiler/nativeGen/X86/Ppr.hs
bsd-3-clause
pprInstr g@(GSIN sz l1 l2 src dst) = pprG g (pprTrigOp "fsin" False l1 l2 src dst sz)
88
pprInstr g@(GSIN sz l1 l2 src dst) = pprG g (pprTrigOp "fsin" False l1 l2 src dst sz)
88
pprInstr g@(GSIN sz l1 l2 src dst) = pprG g (pprTrigOp "fsin" False l1 l2 src dst sz)
88
false
false
0
8
20
49
24
25
null
null
apyrgio/snf-ganeti
src/Ganeti/Constants.hs
bsd-2-clause
esScriptGrow :: String esScriptGrow = esActionGrow
50
esScriptGrow :: String esScriptGrow = esActionGrow
50
esScriptGrow = esActionGrow
27
false
true
0
4
5
11
6
5
null
null
dmbarbour/awelon
hsrc_util/ABCGraph.hs
bsd-3-clause
mergeSum' c (Sum aInR aL aR) (Sum bInR bL bR) = let sumInR = Dyn c in boolNot sumInR >>= \ sumInL -> boolAnd sumInL aInR >>= \ inRofA -> boolAnd sumInR bInR >>= \ inRofB -> boolOr inRofA inRofB >>= \ inR -> mergeSum' c aL bL >>= \ rL -> mergeSum' c aR bR >>= \ rR -> return (Sum inR rL rR)
321
mergeSum' c (Sum aInR aL aR) (Sum bInR bL bR) = let sumInR = Dyn c in boolNot sumInR >>= \ sumInL -> boolAnd sumInL aInR >>= \ inRofA -> boolAnd sumInR bInR >>= \ inRofB -> boolOr inRofA inRofB >>= \ inR -> mergeSum' c aL bL >>= \ rL -> mergeSum' c aR bR >>= \ rR -> return (Sum inR rL rR)
321
mergeSum' c (Sum aInR aL aR) (Sum bInR bL bR) = let sumInR = Dyn c in boolNot sumInR >>= \ sumInL -> boolAnd sumInL aInR >>= \ inRofA -> boolAnd sumInR bInR >>= \ inRofB -> boolOr inRofA inRofB >>= \ inR -> mergeSum' c aL bL >>= \ rL -> mergeSum' c aR bR >>= \ rR -> return (Sum inR rL rR)
321
false
false
13
9
96
170
77
93
null
null
input-output-hk/pos-haskell-prototype
faucet/src/Cardano/Faucet.hs
mit
redirectDocs :: Application redirectDocs _ respond = respond $ responseLBS status301 hdrs "Redirecting" where hdrs = [(hContentType, "text/plain"), (hLocation, docs)] docs = "/docs/"
192
redirectDocs :: Application redirectDocs _ respond = respond $ responseLBS status301 hdrs "Redirecting" where hdrs = [(hContentType, "text/plain"), (hLocation, docs)] docs = "/docs/"
192
redirectDocs _ respond = respond $ responseLBS status301 hdrs "Redirecting" where hdrs = [(hContentType, "text/plain"), (hLocation, docs)] docs = "/docs/"
164
false
true
3
6
32
66
33
33
null
null
acharal/hopes
src/frontend/Language/Hopl.hs
gpl-2.0
cons = Rigid $ liftSym "."
26
cons = Rigid $ liftSym "."
26
cons = Rigid $ liftSym "."
26
false
false
3
5
5
17
6
11
null
null
NorfairKing/super-user-spark
src/SuperUserSpark/PreCompiler.hs
mit
cleanDeclaration (Block ds) = mapM_ cleanDeclaration ds
55
cleanDeclaration (Block ds) = mapM_ cleanDeclaration ds
55
cleanDeclaration (Block ds) = mapM_ cleanDeclaration ds
55
false
false
0
7
6
20
9
11
null
null
ditto/ditto
src/Ditto/Pretty.hs
gpl-3.0
end :: Doc end = text "end"
27
end :: Doc end = text "end"
27
end = text "end"
16
false
true
0
5
6
14
7
7
null
null
Lewerow/TestSelector
src/Main.hs
mit
main = do input <- readFile "D:\\Haskell\\TestSelector\\data.txt" let tests = convertToTests input let dyatt = calculate (fromList tests) (worthMerging $ findMin (fromList tests)) let sorted = sortBy (\x y -> grade x x `compare` grade y y) dyatt writeFile "D:\\Haskell\\TestSelector\\results.txt" $ show sorted writeFile "D:\\Haskell\\TestSelector\\pareto.txt" $ show (sortBy (\x y -> grade x x `compare` grade y y) (paretoSet tests)) putStrLn $ show $ take 10 sorted --}
485
main = do input <- readFile "D:\\Haskell\\TestSelector\\data.txt" let tests = convertToTests input let dyatt = calculate (fromList tests) (worthMerging $ findMin (fromList tests)) let sorted = sortBy (\x y -> grade x x `compare` grade y y) dyatt writeFile "D:\\Haskell\\TestSelector\\results.txt" $ show sorted writeFile "D:\\Haskell\\TestSelector\\pareto.txt" $ show (sortBy (\x y -> grade x x `compare` grade y y) (paretoSet tests)) putStrLn $ show $ take 10 sorted --}
485
main = do input <- readFile "D:\\Haskell\\TestSelector\\data.txt" let tests = convertToTests input let dyatt = calculate (fromList tests) (worthMerging $ findMin (fromList tests)) let sorted = sortBy (\x y -> grade x x `compare` grade y y) dyatt writeFile "D:\\Haskell\\TestSelector\\results.txt" $ show sorted writeFile "D:\\Haskell\\TestSelector\\pareto.txt" $ show (sortBy (\x y -> grade x x `compare` grade y y) (paretoSet tests)) putStrLn $ show $ take 10 sorted --}
485
false
false
0
15
81
187
88
99
null
null
Proclivis/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxSTC_B_DEFAULT :: Int wxSTC_B_DEFAULT = 0
42
wxSTC_B_DEFAULT :: Int wxSTC_B_DEFAULT = 0
42
wxSTC_B_DEFAULT = 0
19
false
true
0
4
5
11
6
5
null
null
FreeON/spammpack
src-Haskell/Testing/tests.hs
bsd-3-clause
main = do testReadWrite ; testAdd ; testMultiply
48
main = do testReadWrite ; testAdd ; testMultiply
48
main = do testReadWrite ; testAdd ; testMultiply
48
false
false
1
7
7
21
8
13
null
null
jerhoud/true-real
src/Data/Digits.hs
gpl-3.0
mSqrt d = limit $ go 0 $ D s0 $ D s1 Z where ad = compress $ abs d (read2 -> (d1, d2, read2 -> (d3, d4, ds))) = ad (s0, s1) = carry 1 $ fromIntegral (sgn d) * sqrtInteger (aggregate (aggregate (aggregate d1 d2) d3) d4) go n x = cx : go (n + 1) nx where cx = chop (1 + 2^n) x dx = compress $ compress $ compress $ compress $ Data.Digits.div ad cx nx = zipWithCarry 1 (\a b -> (a + b) `shiftL` (nBits - 1)) cx dx
465
mSqrt d = limit $ go 0 $ D s0 $ D s1 Z where ad = compress $ abs d (read2 -> (d1, d2, read2 -> (d3, d4, ds))) = ad (s0, s1) = carry 1 $ fromIntegral (sgn d) * sqrtInteger (aggregate (aggregate (aggregate d1 d2) d3) d4) go n x = cx : go (n + 1) nx where cx = chop (1 + 2^n) x dx = compress $ compress $ compress $ compress $ Data.Digits.div ad cx nx = zipWithCarry 1 (\a b -> (a + b) `shiftL` (nBits - 1)) cx dx
465
mSqrt d = limit $ go 0 $ D s0 $ D s1 Z where ad = compress $ abs d (read2 -> (d1, d2, read2 -> (d3, d4, ds))) = ad (s0, s1) = carry 1 $ fromIntegral (sgn d) * sqrtInteger (aggregate (aggregate (aggregate d1 d2) d3) d4) go n x = cx : go (n + 1) nx where cx = chop (1 + 2^n) x dx = compress $ compress $ compress $ compress $ Data.Digits.div ad cx nx = zipWithCarry 1 (\a b -> (a + b) `shiftL` (nBits - 1)) cx dx
465
false
false
4
12
152
270
136
134
null
null
jbracker/supermonad-plugin
examples/monad/hmtc/supermonad/PPTAMCode.hs
bsd-3-clause
ppTAMInst (LOADI d) = ppOA "LOADI" (show d)
49
ppTAMInst (LOADI d) = ppOA "LOADI" (show d)
49
ppTAMInst (LOADI d) = ppOA "LOADI" (show d)
49
false
false
0
7
13
26
12
14
null
null
spacekitteh/smcghc
libraries/base/Data/Maybe.hs
bsd-3-clause
-- | The 'listToMaybe' function returns 'Nothing' on an empty list -- or @'Just' a@ where @a@ is the first element of the list. listToMaybe :: [a] -> Maybe a listToMaybe [] = Nothing
200
listToMaybe :: [a] -> Maybe a listToMaybe [] = Nothing
72
listToMaybe [] = Nothing
32
true
true
0
6
51
29
15
14
null
null
facebook/Haxl
Haxl/Core/Memo.hs
bsd-3-clause
memo :: (Typeable a, Typeable k, Hashable k, Eq k) => k -> GenHaxl u w a -> GenHaxl u w a memo key = cachedComputation (MemoKey key)
136
memo :: (Typeable a, Typeable k, Hashable k, Eq k) => k -> GenHaxl u w a -> GenHaxl u w a memo key = cachedComputation (MemoKey key)
136
memo key = cachedComputation (MemoKey key)
42
false
true
0
8
31
75
36
39
null
null
olorin/amazonka
amazonka-ec2/gen/Network/AWS/EC2/Types/Product.hs
mpl-2.0
-- | The size of the volume, in GiB. sVolumeSize :: Lens' Snapshot Int sVolumeSize = lens _sVolumeSize (\ s a -> s{_sVolumeSize = a})
133
sVolumeSize :: Lens' Snapshot Int sVolumeSize = lens _sVolumeSize (\ s a -> s{_sVolumeSize = a})
96
sVolumeSize = lens _sVolumeSize (\ s a -> s{_sVolumeSize = a})
62
true
true
0
9
24
40
22
18
null
null
laszlopandy/elm-compiler
src/Elm/Compiler/Type.hs
bsd-3-clause
fromRawType :: Type.Raw -> Type fromRawType (A.A _ astType) = case astType of Type.RLambda t1 t2 -> Lambda (fromRawType t1) (fromRawType t2) Type.RVar x -> Var x Type.RType var -> Type (Var.toString var) Type.RApp t ts -> App (fromRawType t) (map fromRawType ts) Type.RRecord fields ext -> Record (map (second fromRawType) fields) (fmap fromRawType ext)
441
fromRawType :: Type.Raw -> Type fromRawType (A.A _ astType) = case astType of Type.RLambda t1 t2 -> Lambda (fromRawType t1) (fromRawType t2) Type.RVar x -> Var x Type.RType var -> Type (Var.toString var) Type.RApp t ts -> App (fromRawType t) (map fromRawType ts) Type.RRecord fields ext -> Record (map (second fromRawType) fields) (fmap fromRawType ext)
441
fromRawType (A.A _ astType) = case astType of Type.RLambda t1 t2 -> Lambda (fromRawType t1) (fromRawType t2) Type.RVar x -> Var x Type.RType var -> Type (Var.toString var) Type.RApp t ts -> App (fromRawType t) (map fromRawType ts) Type.RRecord fields ext -> Record (map (second fromRawType) fields) (fmap fromRawType ext)
409
false
true
0
12
142
177
82
95
null
null
codemac/yi-editor
src/Yi/Syntax/Haskell.hs
gpl-2.0
recognizedSometimes = [ReservedOp DoubleDot, Special ',', ReservedOp Pipe, ReservedOp Equal, ReservedOp LeftArrow, ReservedOp RightArrow, ReservedOp DoubleRightArrow, ReservedOp BackSlash, ReservedOp DoubleColon ]
419
recognizedSometimes = [ReservedOp DoubleDot, Special ',', ReservedOp Pipe, ReservedOp Equal, ReservedOp LeftArrow, ReservedOp RightArrow, ReservedOp DoubleRightArrow, ReservedOp BackSlash, ReservedOp DoubleColon ]
419
recognizedSometimes = [ReservedOp DoubleDot, Special ',', ReservedOp Pipe, ReservedOp Equal, ReservedOp LeftArrow, ReservedOp RightArrow, ReservedOp DoubleRightArrow, ReservedOp BackSlash, ReservedOp DoubleColon ]
419
false
false
1
6
226
63
30
33
null
null
vTurbine/ghc
compiler/basicTypes/IdInfo.hs
bsd-3-clause
ruleInfoRules :: RuleInfo -> [CoreRule] ruleInfoRules (RuleInfo rules _) = rules
80
ruleInfoRules :: RuleInfo -> [CoreRule] ruleInfoRules (RuleInfo rules _) = rules
80
ruleInfoRules (RuleInfo rules _) = rules
40
false
true
0
6
10
33
16
17
null
null
alphaHeavy/cabal
Cabal/Distribution/Simple/Register.hs
bsd-3-clause
absoluteInstalledPackageInfo :: PackageDescription -> Library -> LocalBuildInfo -> ComponentLocalBuildInfo -> InstalledPackageInfo absoluteInstalledPackageInfo pkg lib lbi clbi = generalInstalledPackageInfo adjustReativeIncludeDirs pkg lib clbi installDirs where -- For installed packages we install all include files into one dir, -- whereas in the build tree they may live in multiple local dirs. adjustReativeIncludeDirs _ | null (installIncludes bi) = [] | otherwise = [includedir installDirs] bi = libBuildInfo lib installDirs = absoluteInstallDirs pkg lbi NoCopyDest -- ----------------------------------------------------------------------------- -- Unregistration
842
absoluteInstalledPackageInfo :: PackageDescription -> Library -> LocalBuildInfo -> ComponentLocalBuildInfo -> InstalledPackageInfo absoluteInstalledPackageInfo pkg lib lbi clbi = generalInstalledPackageInfo adjustReativeIncludeDirs pkg lib clbi installDirs where -- For installed packages we install all include files into one dir, -- whereas in the build tree they may live in multiple local dirs. adjustReativeIncludeDirs _ | null (installIncludes bi) = [] | otherwise = [includedir installDirs] bi = libBuildInfo lib installDirs = absoluteInstallDirs pkg lbi NoCopyDest -- ----------------------------------------------------------------------------- -- Unregistration
842
absoluteInstalledPackageInfo pkg lib lbi clbi = generalInstalledPackageInfo adjustReativeIncludeDirs pkg lib clbi installDirs where -- For installed packages we install all include files into one dir, -- whereas in the build tree they may live in multiple local dirs. adjustReativeIncludeDirs _ | null (installIncludes bi) = [] | otherwise = [includedir installDirs] bi = libBuildInfo lib installDirs = absoluteInstallDirs pkg lbi NoCopyDest -- ----------------------------------------------------------------------------- -- Unregistration
595
false
true
2
10
246
114
56
58
null
null
keithodulaigh/Hets
Temporal/NuSmv.hs
gpl-2.0
showType BoolType = "boolean"
29
showType BoolType = "boolean"
29
showType BoolType = "boolean"
29
false
false
1
5
3
13
4
9
null
null
rueshyna/gogol
gogol-doubleclick-search/gen/Network/Google/Resource/DoubleClickSearch/Reports/GetFile.hs
mpl-2.0
-- | ID of the report. rgfReportId :: Lens' ReportsGetFile Text rgfReportId = lens _rgfReportId (\ s a -> s{_rgfReportId = a})
128
rgfReportId :: Lens' ReportsGetFile Text rgfReportId = lens _rgfReportId (\ s a -> s{_rgfReportId = a})
105
rgfReportId = lens _rgfReportId (\ s a -> s{_rgfReportId = a})
64
true
true
1
9
23
45
22
23
null
null
mtraina/seven-languages-seven-weeks
week-7-haskell/day1/fib.hs
mit
fib x = fib (x - 1) + fib (x - 2)
33
fib x = fib (x - 1) + fib (x - 2)
33
fib x = fib (x - 1) + fib (x - 2)
33
false
false
3
7
11
37
16
21
null
null
danr/hipspec
testsuite/prod/zeno_version/PropT35.hs
gpl-3.0
drop (S x) (_:xs) = drop x xs
29
drop (S x) (_:xs) = drop x xs
29
drop (S x) (_:xs) = drop x xs
29
false
false
0
6
7
32
14
18
null
null
anwb/fp-one-on-one
lecture-11-hw.hs
mit
-- Exercise 6 -- fibs :: [Integer] fibs = 0 : 1 : [x + y | (x, y) <- zip fibs (tail fibs)]
91
fibs :: [Integer] fibs = 0 : 1 : [x + y | (x, y) <- zip fibs (tail fibs)]
74
fibs = 0 : 1 : [x + y | (x, y) <- zip fibs (tail fibs)]
56
true
true
4
11
24
65
32
33
null
null
ethercrow/docopt.hs
System/Console/Docopt/ParseUtils.hs
mit
numerics = ['0'..'9']++"-_"
27
numerics = ['0'..'9']++"-_"
27
numerics = ['0'..'9']++"-_"
27
false
false
3
6
2
21
8
13
null
null
narrative/stack
src/Stack/Dot.hs
bsd-3-clause
listDependencies :: (HasEnvConfig env ,HasHttpManager env ,HasLogLevel env ,MonadBaseControl IO m ,MonadCatch m ,MonadLogger m ,MonadMask m ,MonadIO m ,MonadReader env m ) => Text -> m () listDependencies sep = do let dotOpts = DotOpts True True Nothing Set.empty resultGraph <- createDependencyGraph dotOpts void (Map.traverseWithKey go (snd <$> resultGraph)) where go name v = liftIO (Text.putStrLn $ Text.pack (packageNameString name) <> sep <> maybe "<unknown>" (Text.pack . show) v) -- | @pruneGraph dontPrune toPrune graph@ prunes all packages in -- @graph@ with a name in @toPrune@ and removes resulting orphans -- unless they are in @dontPrune@
975
listDependencies :: (HasEnvConfig env ,HasHttpManager env ,HasLogLevel env ,MonadBaseControl IO m ,MonadCatch m ,MonadLogger m ,MonadMask m ,MonadIO m ,MonadReader env m ) => Text -> m () listDependencies sep = do let dotOpts = DotOpts True True Nothing Set.empty resultGraph <- createDependencyGraph dotOpts void (Map.traverseWithKey go (snd <$> resultGraph)) where go name v = liftIO (Text.putStrLn $ Text.pack (packageNameString name) <> sep <> maybe "<unknown>" (Text.pack . show) v) -- | @pruneGraph dontPrune toPrune graph@ prunes all packages in -- @graph@ with a name in @toPrune@ and removes resulting orphans -- unless they are in @dontPrune@
975
listDependencies sep = do let dotOpts = DotOpts True True Nothing Set.empty resultGraph <- createDependencyGraph dotOpts void (Map.traverseWithKey go (snd <$> resultGraph)) where go name v = liftIO (Text.putStrLn $ Text.pack (packageNameString name) <> sep <> maybe "<unknown>" (Text.pack . show) v) -- | @pruneGraph dontPrune toPrune graph@ prunes all packages in -- @graph@ with a name in @toPrune@ and removes resulting orphans -- unless they are in @dontPrune@
571
false
true
0
12
419
199
98
101
null
null
mietek/map-cutter
src/TileMap.hs
mit
insertRoadNodes :: TileMap -> [(RoadNode, (Int, Int))] -> TileMap insertRoadNodes = foldr (uncurry insertRoadNode)
118
insertRoadNodes :: TileMap -> [(RoadNode, (Int, Int))] -> TileMap insertRoadNodes = foldr (uncurry insertRoadNode)
118
insertRoadNodes = foldr (uncurry insertRoadNode)
52
false
true
0
10
17
50
25
25
null
null
DanielWaterworth/Idris-dev
src/Idris/ParseHelpers.hs
bsd-3-clause
-- | Allows comparison of indent, and fails if property doesn't hold indentPropHolds :: IndentProperty -> IdrisParser() indentPropHolds (IndentProperty op msg) = do li <- lastIndent i <- indent when (not $ op i li) $ fail ("Wrong indention: " ++ msg) -- | Greater-than indent property
291
indentPropHolds :: IndentProperty -> IdrisParser() indentPropHolds (IndentProperty op msg) = do li <- lastIndent i <- indent when (not $ op i li) $ fail ("Wrong indention: " ++ msg) -- | Greater-than indent property
222
indentPropHolds (IndentProperty op msg) = do li <- lastIndent i <- indent when (not $ op i li) $ fail ("Wrong indention: " ++ msg) -- | Greater-than indent property
171
true
true
0
11
53
83
39
44
null
null
nevrenato/HetsAlloy
DFOL/AS_DFOL.hs
gpl-2.0
printBasicItem (Axiom_item f) = dot <> pretty f
47
printBasicItem (Axiom_item f) = dot <> pretty f
47
printBasicItem (Axiom_item f) = dot <> pretty f
47
false
false
0
6
7
23
10
13
null
null
paulrzcz/takusen-oracle
Database/Enumerator.hs
bsd-3-clause
llback :: IE.ISession s => DBM mark s () rollback = DBM( ask >>= lift . IE.rollback )
88
rollback :: IE.ISession s => DBM mark s () rollback = DBM( ask >>= lift . IE.rollback )
87
rollback = DBM( ask >>= lift . IE.rollback )
44
false
true
0
8
20
45
22
23
null
null
Cortlandd/haskell-opencv
src/OpenCV/Internal/ImgProc/MiscImgTransform/ColorCodes.hs
bsd-3-clause
rgba_NV12 :: Proxy 'RGBA_NV12; rgba_NV12 = Proxy
50
rgba_NV12 :: Proxy 'RGBA_NV12 rgba_NV12 = Proxy
49
rgba_NV12 = Proxy
18
false
true
0
6
8
17
9
8
null
null
neothemachine/monadiccp
examples/AllInterval.hs
bsd-3-clause
main = example_sat_main_single_expr model
41
main = example_sat_main_single_expr model
41
main = example_sat_main_single_expr model
41
false
false
1
5
3
12
4
8
null
null
brendanhay/gogol
gogol-cloudiot/gen/Network/Google/Resource/CloudIOT/Projects/Locations/Registries/UnbindDeviceFromGateway.hs
mpl-2.0
-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). plrudfgUploadProtocol :: Lens' ProjectsLocationsRegistriesUnbindDeviceFromGateway (Maybe Text) plrudfgUploadProtocol = lens _plrudfgUploadProtocol (\ s a -> s{_plrudfgUploadProtocol = a})
257
plrudfgUploadProtocol :: Lens' ProjectsLocationsRegistriesUnbindDeviceFromGateway (Maybe Text) plrudfgUploadProtocol = lens _plrudfgUploadProtocol (\ s a -> s{_plrudfgUploadProtocol = a})
195
plrudfgUploadProtocol = lens _plrudfgUploadProtocol (\ s a -> s{_plrudfgUploadProtocol = a})
100
true
true
0
8
33
49
25
24
null
null
kmate/raw-feldspar
src/Feldspar/Optimize.hs
bsd-3-clause
simplifyUp (RemP t (LitP _ 0) b) = LitP t 0
43
simplifyUp (RemP t (LitP _ 0) b) = LitP t 0
43
simplifyUp (RemP t (LitP _ 0) b) = LitP t 0
43
false
false
0
9
10
32
15
17
null
null
tpsinnem/Idris-dev
src/Idris/Reflection.hs
bsd-3-clause
reifyApp ist t [t'] | t == reflm "Case" = liftM (CaseTac . delab ist) (reifyTT t')
82
reifyApp ist t [t'] | t == reflm "Case" = liftM (CaseTac . delab ist) (reifyTT t')
82
reifyApp ist t [t'] | t == reflm "Case" = liftM (CaseTac . delab ist) (reifyTT t')
82
false
false
0
9
16
50
23
27
null
null
emaphis/pythagorean
src/NumCalcs.hs
bsd-3-clause
-- lookup number of prime given that prime number -- findIndex retruns the (index - 1) lookupNumOfPrime :: Int -> Int lookupNumOfPrime n = idx + 1 where idx = fromMaybe (-1) (findIndex (\p -> snd p == n) primeNumTbl) -- factors of an integer
245
lookupNumOfPrime :: Int -> Int lookupNumOfPrime n = idx + 1 where idx = fromMaybe (-1) (findIndex (\p -> snd p == n) primeNumTbl) -- factors of an integer
158
lookupNumOfPrime n = idx + 1 where idx = fromMaybe (-1) (findIndex (\p -> snd p == n) primeNumTbl) -- factors of an integer
127
true
true
0
11
48
66
35
31
null
null
energyflowanalysis/efa-2.1
sandbox/genetic_programming/Polynome.hs
bsd-3-clause
paths :: Term -> [Path] paths (X _) = [[]]
42
paths :: Term -> [Path] paths (X _) = [[]]
42
paths (X _) = [[]]
18
false
true
0
9
9
38
18
20
null
null
ekmett/indexed
src/Indexed/Map.hs
bsd-3-clause
lookup :: forall k v a. IOrd k => k a -> IMap k v -> Maybe (v a) lookup = go where go :: k a -> IMap k v -> Maybe (v a) go !_ !Tip = Nothing go !k (Bin _ kx x l r) = icompare k kx (go k l) (Just x) (go k r)
233
lookup :: forall k v a. IOrd k => k a -> IMap k v -> Maybe (v a) lookup = go where go :: k a -> IMap k v -> Maybe (v a) go !_ !Tip = Nothing go !k (Bin _ kx x l r) = icompare k kx (go k l) (Just x) (go k r)
233
lookup = go where go :: k a -> IMap k v -> Maybe (v a) go !_ !Tip = Nothing go !k (Bin _ kx x l r) = icompare k kx (go k l) (Just x) (go k r)
168
false
true
0
11
86
153
73
80
null
null
GaloisInc/cbmc-reporter
src/Report.hs
bsd-3-clause
spreadSheetize :: Opts -> [Claim] -> S.Spreadsheet spreadSheetize Opts {sort, asserts} claims = S.sortSpreadsheet $ S.Spreadsheet columns (transpose cellValues) where so = Just S.Ascending fileCol = S.Column "File" S.StringT so funcCol = S.Column "Function" S.StringT so lineCol = S.Column "Line" (S.NumberT Nothing) so resCol = S.Column "Result" S.StringT so entCol = S.Column "Entry" S.StringT so astCol = S.Column "Expr" S.StringT so initCol = case sort of File -> (fileCol, fileVals) Func -> (funcCol, funcVals) Line -> (lineCol, lineVals) Result -> (resCol , resVals) Entry -> (entCol , entVals) cols = [fileCol, funcCol, lineCol, resCol, entCol] vals = [fileVals, funcVals, lineVals, resVals, entVals] (columns, cellValues) = unzip $ nub (initCol : zip cols vals) ++ if asserts then [(astCol, astVals)] else [] fileVals = map (S.StringV . claimFile) claims funcVals = map (S.StringV . claimFunc) claims lineVals = map (S.NumberV . fromIntegral . claimLine) claims resVals = map (S.StringV . show . claimVal) claims entVals = map (S.StringV . claimEntry) claims astVals = map (S.StringV . claimExpr) claims --------------------------------------------------------------------------------
1,409
spreadSheetize :: Opts -> [Claim] -> S.Spreadsheet spreadSheetize Opts {sort, asserts} claims = S.sortSpreadsheet $ S.Spreadsheet columns (transpose cellValues) where so = Just S.Ascending fileCol = S.Column "File" S.StringT so funcCol = S.Column "Function" S.StringT so lineCol = S.Column "Line" (S.NumberT Nothing) so resCol = S.Column "Result" S.StringT so entCol = S.Column "Entry" S.StringT so astCol = S.Column "Expr" S.StringT so initCol = case sort of File -> (fileCol, fileVals) Func -> (funcCol, funcVals) Line -> (lineCol, lineVals) Result -> (resCol , resVals) Entry -> (entCol , entVals) cols = [fileCol, funcCol, lineCol, resCol, entCol] vals = [fileVals, funcVals, lineVals, resVals, entVals] (columns, cellValues) = unzip $ nub (initCol : zip cols vals) ++ if asserts then [(astCol, astVals)] else [] fileVals = map (S.StringV . claimFile) claims funcVals = map (S.StringV . claimFunc) claims lineVals = map (S.NumberV . fromIntegral . claimLine) claims resVals = map (S.StringV . show . claimVal) claims entVals = map (S.StringV . claimEntry) claims astVals = map (S.StringV . claimExpr) claims --------------------------------------------------------------------------------
1,409
spreadSheetize Opts {sort, asserts} claims = S.sortSpreadsheet $ S.Spreadsheet columns (transpose cellValues) where so = Just S.Ascending fileCol = S.Column "File" S.StringT so funcCol = S.Column "Function" S.StringT so lineCol = S.Column "Line" (S.NumberT Nothing) so resCol = S.Column "Result" S.StringT so entCol = S.Column "Entry" S.StringT so astCol = S.Column "Expr" S.StringT so initCol = case sort of File -> (fileCol, fileVals) Func -> (funcCol, funcVals) Line -> (lineCol, lineVals) Result -> (resCol , resVals) Entry -> (entCol , entVals) cols = [fileCol, funcCol, lineCol, resCol, entCol] vals = [fileVals, funcVals, lineVals, resVals, entVals] (columns, cellValues) = unzip $ nub (initCol : zip cols vals) ++ if asserts then [(astCol, astVals)] else [] fileVals = map (S.StringV . claimFile) claims funcVals = map (S.StringV . claimFunc) claims lineVals = map (S.NumberV . fromIntegral . claimLine) claims resVals = map (S.StringV . show . claimVal) claims entVals = map (S.StringV . claimEntry) claims astVals = map (S.StringV . claimExpr) claims --------------------------------------------------------------------------------
1,358
false
true
0
10
384
458
247
211
null
null
kishoredbn/barrelfish
tools/flounder/GHBackend.hs
mit
ep_bind_fn_name n = ifscope n "bind_to_endpoint"
48
ep_bind_fn_name n = ifscope n "bind_to_endpoint"
48
ep_bind_fn_name n = ifscope n "bind_to_endpoint"
48
false
false
0
5
5
14
6
8
null
null
snoyberg/keter
Keter/HostManager.hs
mit
reactivateApp :: (LogMessage -> IO ()) -> HostManager -> AppId -> Map Host (ProxyAction, TLS.Credentials) -> Set Host -> IO () reactivateApp log (HostManager mstate) app actions hosts = do log $ ReactivatingApp app hosts (Map.keysSet actions) atomicModifyIORef mstate $ \state0 -> (activateHelper app (deactivateHelper app state0 hosts) actions, ())
444
reactivateApp :: (LogMessage -> IO ()) -> HostManager -> AppId -> Map Host (ProxyAction, TLS.Credentials) -> Set Host -> IO () reactivateApp log (HostManager mstate) app actions hosts = do log $ ReactivatingApp app hosts (Map.keysSet actions) atomicModifyIORef mstate $ \state0 -> (activateHelper app (deactivateHelper app state0 hosts) actions, ())
443
reactivateApp log (HostManager mstate) app actions hosts = do log $ ReactivatingApp app hosts (Map.keysSet actions) atomicModifyIORef mstate $ \state0 -> (activateHelper app (deactivateHelper app state0 hosts) actions, ())
241
false
true
0
12
144
143
70
73
null
null
zinfra/khan
khan-cli/src/Khan/CLI/Artifact.hs
mpl-2.0
prune :: Common -> Prune -> AWS () prune c Prune{..} = capture pAnsible c "bucket {}/{} {}" [pBucket, fromMaybe "" pPrefix, pArtifact] $ Bucket.prune pCopies pBucket pPrefix pArtifact
195
prune :: Common -> Prune -> AWS () prune c Prune{..} = capture pAnsible c "bucket {}/{} {}" [pBucket, fromMaybe "" pPrefix, pArtifact] $ Bucket.prune pCopies pBucket pPrefix pArtifact
195
prune c Prune{..} = capture pAnsible c "bucket {}/{} {}" [pBucket, fromMaybe "" pPrefix, pArtifact] $ Bucket.prune pCopies pBucket pPrefix pArtifact
160
false
true
4
7
40
72
38
34
null
null
foreverbell/project-euler-solutions
src/492.hs
bsd-3-clause
addMat (a, b, c, d) (x, y, z, w) m = (a', b', c', d') where a' = (a + x) `mod` m b' = (b + y) `mod` m c' = (c + z) `mod` m d' = (d + w) `mod` m
159
addMat (a, b, c, d) (x, y, z, w) m = (a', b', c', d') where a' = (a + x) `mod` m b' = (b + y) `mod` m c' = (c + z) `mod` m d' = (d + w) `mod` m
159
addMat (a, b, c, d) (x, y, z, w) m = (a', b', c', d') where a' = (a + x) `mod` m b' = (b + y) `mod` m c' = (c + z) `mod` m d' = (d + w) `mod` m
159
false
false
5
7
59
139
75
64
null
null
dysinger/amazonka
amazonka-ecs/gen/Network/AWS/ECS/StartTask.hs
mpl-2.0
-- | The short name or full Amazon Resource Name (ARN) of the cluster that you -- want to start your task on. If you do not specify a cluster, the default -- cluster is assumed.. st1Cluster :: Lens' StartTask (Maybe Text) st1Cluster = lens _st1Cluster (\s a -> s { _st1Cluster = a })
283
st1Cluster :: Lens' StartTask (Maybe Text) st1Cluster = lens _st1Cluster (\s a -> s { _st1Cluster = a })
104
st1Cluster = lens _st1Cluster (\s a -> s { _st1Cluster = a })
61
true
true
0
9
54
48
27
21
null
null
keithodulaigh/Hets
THF/ParseTHF.hs
gpl-2.0
inferenceItem :: CharParser st InferenceItem inferenceItem = fmap II_Inference_Status inferenceStatus <|> do key $ tryString "assumptions" fmap II_Assumptions_Record (parentheses (brackets nameList)) <|> do key $ tryString "new_symbols" oParentheses aw <- atomicWord comma nsl <- brackets (sepBy1 principalSymbol comma) cParentheses return $ II_New_Symbol_Record aw nsl <|> do key $ tryString "refutation" fmap II_Refutation (parentheses fileSource) {- THF & THF0: <inference_status> :== status(<status_value>) | <inference_info> <inference_info> :== <inference_rule>(<atomic_word>,<general_list>) <inference_rule> :== <atomic_word> -}
696
inferenceItem :: CharParser st InferenceItem inferenceItem = fmap II_Inference_Status inferenceStatus <|> do key $ tryString "assumptions" fmap II_Assumptions_Record (parentheses (brackets nameList)) <|> do key $ tryString "new_symbols" oParentheses aw <- atomicWord comma nsl <- brackets (sepBy1 principalSymbol comma) cParentheses return $ II_New_Symbol_Record aw nsl <|> do key $ tryString "refutation" fmap II_Refutation (parentheses fileSource) {- THF & THF0: <inference_status> :== status(<status_value>) | <inference_info> <inference_info> :== <inference_rule>(<atomic_word>,<general_list>) <inference_rule> :== <atomic_word> -}
696
inferenceItem = fmap II_Inference_Status inferenceStatus <|> do key $ tryString "assumptions" fmap II_Assumptions_Record (parentheses (brackets nameList)) <|> do key $ tryString "new_symbols" oParentheses aw <- atomicWord comma nsl <- brackets (sepBy1 principalSymbol comma) cParentheses return $ II_New_Symbol_Record aw nsl <|> do key $ tryString "refutation" fmap II_Refutation (parentheses fileSource) {- THF & THF0: <inference_status> :== status(<status_value>) | <inference_info> <inference_info> :== <inference_rule>(<atomic_word>,<general_list>) <inference_rule> :== <atomic_word> -}
651
false
true
7
11
130
140
63
77
null
null
PeterBeard/project-euler
haskell/src/problem-012.hs
gpl-2.0
main = putStrLn $ "The solution is " ++ (show solution)
55
main = putStrLn $ "The solution is " ++ (show solution)
55
main = putStrLn $ "The solution is " ++ (show solution)
55
false
false
0
7
10
20
10
10
null
null
phischu/fragnix
tests/packages/scotty/Data.Attoparsec.ByteString.Char8.hs
bsd-3-clause
-- | /Obsolete/. A type-specialized version of '<*' for -- 'B.ByteString'. Use '<*' instead. (<*.) :: Parser a -> B.ByteString -> Parser a f <*. s = f <* I.string s
164
(<*.) :: Parser a -> B.ByteString -> Parser a f <*. s = f <* I.string s
71
f <*. s = f <* I.string s
25
true
true
2
9
30
51
25
26
null
null
uduki/hsQt
Qtc/Gui/QWidget.hs
bsd-2-clause
setWindowModified :: QWidget a -> ((Bool)) -> IO () setWindowModified x0 (x1) = withObjectPtr x0 $ \cobj_x0 -> qtc_QWidget_setWindowModified cobj_x0 (toCBool x1)
167
setWindowModified :: QWidget a -> ((Bool)) -> IO () setWindowModified x0 (x1) = withObjectPtr x0 $ \cobj_x0 -> qtc_QWidget_setWindowModified cobj_x0 (toCBool x1)
167
setWindowModified x0 (x1) = withObjectPtr x0 $ \cobj_x0 -> qtc_QWidget_setWindowModified cobj_x0 (toCBool x1)
115
false
true
0
9
27
64
32
32
null
null
adizere/nifty-urb
src/Nifty/URB.hs
mit
startURB :: (Int, [(String, Int)], Int) -> MVar (Int) -> IO () startURB (procId, ipsPorts, msgCnt) stMVar = do handle <- openFile (getOutputFile procId) WriteMode eChan <- setupNetwork procId ipsPorts handle takeMVar stMVar >> startURBroadcast eChan procId msgCnt 1 handle
284
startURB :: (Int, [(String, Int)], Int) -> MVar (Int) -> IO () startURB (procId, ipsPorts, msgCnt) stMVar = do handle <- openFile (getOutputFile procId) WriteMode eChan <- setupNetwork procId ipsPorts handle takeMVar stMVar >> startURBroadcast eChan procId msgCnt 1 handle
284
startURB (procId, ipsPorts, msgCnt) stMVar = do handle <- openFile (getOutputFile procId) WriteMode eChan <- setupNetwork procId ipsPorts handle takeMVar stMVar >> startURBroadcast eChan procId msgCnt 1 handle
221
false
true
0
11
51
120
59
61
null
null
tpsinnem/Idris-dev
src/Idris/AbsSyntaxTree.hs
bsd-3-clause
unitTy = sUN "Unit"
21
unitTy = sUN "Unit"
21
unitTy = sUN "Unit"
21
false
false
0
5
5
9
4
5
null
null
peterokagey/haskellOEIS
test/External/A137735Spec.hs
apache-2.0
main :: IO () main = hspec spec
31
main :: IO () main = hspec spec
31
main = hspec spec
17
false
true
0
6
7
19
9
10
null
null
gmcabrita/icl-interpreter
Semantics.hs
mit
eval_exp (Apply e args) env mem = case c_eval e env mem of (Closure d_args e'' env', mem') -> eval_exp e'' new_env new_mem where env'' = beginScope env' (new_env, new_mem) = foldl (\(env', mem') (x, e') -> let (m1, m2) = (Delay e' env', mem') in (assoc x m1 env', m2)) (env'', mem') (zip d_args args) (_, mem') -> (Undefined, mem')
679
eval_exp (Apply e args) env mem = case c_eval e env mem of (Closure d_args e'' env', mem') -> eval_exp e'' new_env new_mem where env'' = beginScope env' (new_env, new_mem) = foldl (\(env', mem') (x, e') -> let (m1, m2) = (Delay e' env', mem') in (assoc x m1 env', m2)) (env'', mem') (zip d_args args) (_, mem') -> (Undefined, mem')
679
eval_exp (Apply e args) env mem = case c_eval e env mem of (Closure d_args e'' env', mem') -> eval_exp e'' new_env new_mem where env'' = beginScope env' (new_env, new_mem) = foldl (\(env', mem') (x, e') -> let (m1, m2) = (Delay e' env', mem') in (assoc x m1 env', m2)) (env'', mem') (zip d_args args) (_, mem') -> (Undefined, mem')
679
false
false
1
18
408
189
98
91
null
null
salamansar/GA-cube
src/GenAlg2.hs
mit
processOnesGA3 :: Int -> Int -> GenAlgContext -> (Int, [BSInd]) processOnesGA3 bitNum size context = runGA context (zerosFirstGen bitNum size createOnesInd) (maxStop bitNum)
175
processOnesGA3 :: Int -> Int -> GenAlgContext -> (Int, [BSInd]) processOnesGA3 bitNum size context = runGA context (zerosFirstGen bitNum size createOnesInd) (maxStop bitNum)
174
processOnesGA3 bitNum size context = runGA context (zerosFirstGen bitNum size createOnesInd) (maxStop bitNum)
110
false
true
0
9
24
62
32
30
null
null
javgh/mtgoxapi
Network/MtGoxAPI/Types.hs
bsd-3-clause
convertTypeStr (String "bid") = Just Bid
40
convertTypeStr (String "bid") = Just Bid
40
convertTypeStr (String "bid") = Just Bid
40
false
false
0
6
5
19
8
11
null
null
beni55/cgrep
src/CGrep/Semantic/WildCard.hs
gpl-2.0
filterCardIndicies :: [Int] -> [(Int, MultiCard a)] -> [MultiCard a] filterCardIndicies ns ps = map snd $ filter (\(n, _) -> n `notElem` ns) ps
143
filterCardIndicies :: [Int] -> [(Int, MultiCard a)] -> [MultiCard a] filterCardIndicies ns ps = map snd $ filter (\(n, _) -> n `notElem` ns) ps
143
filterCardIndicies ns ps = map snd $ filter (\(n, _) -> n `notElem` ns) ps
74
false
true
0
9
24
81
43
38
null
null