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
danse/haskell-opaleye
src/Opaleye/Internal/HaskellDB/Sql/Default.hs
bsd-3-clause
toSqlAssoc :: SqlGenerator -> Assoc -> [(SqlColumn,SqlExpr)] toSqlAssoc gen = map (\(attr,expr) -> (toSqlColumn attr, sqlExpr gen expr))
136
toSqlAssoc :: SqlGenerator -> Assoc -> [(SqlColumn,SqlExpr)] toSqlAssoc gen = map (\(attr,expr) -> (toSqlColumn attr, sqlExpr gen expr))
136
toSqlAssoc gen = map (\(attr,expr) -> (toSqlColumn attr, sqlExpr gen expr))
75
false
true
0
9
17
62
34
28
null
null
kosmoskatten/ghost-lang
ghost-lang/src/GhostLang/Interpreter/InterpreterM.hs
mit
evalValue (Stored x) = do v <- lookup x <$> ask case v of Just v' -> evalValue v' _ -> error $ "Cannot lookup stored value: " ++ show x
165
evalValue (Stored x) = do v <- lookup x <$> ask case v of Just v' -> evalValue v' _ -> error $ "Cannot lookup stored value: " ++ show x
165
evalValue (Stored x) = do v <- lookup x <$> ask case v of Just v' -> evalValue v' _ -> error $ "Cannot lookup stored value: " ++ show x
165
false
false
0
11
60
65
29
36
null
null
PierreR/basic-prelude
test-is-a-prelude.hs
mit
(==) = (P.==)
13
(==) = (P.==)
13
(==) = (P.==)
13
false
false
1
6
2
16
8
8
null
null
copland/cmdargs
System/Console/CmdArgs/Explicit/Complete.hs
bsd-3-clause
expectFlag :: [Flag a] -> String -> [Complete] expectFlag flag x | (a,_:b) <- break (== '=') x = case pickBy (map f . flagNames) a flag of Nothing -> [] Just flg -> map (prepend (a ++ "=")) $ expectVal flg b | otherwise = expectStrings (map (map f . flagNames) flag) x where f x = "-" ++ ['-'...
341
expectFlag :: [Flag a] -> String -> [Complete] expectFlag flag x | (a,_:b) <- break (== '=') x = case pickBy (map f . flagNames) a flag of Nothing -> [] Just flg -> map (prepend (a ++ "=")) $ expectVal flg b | otherwise = expectStrings (map (map f . flagNames) flag) x where f x = "-" ++ ['-'...
341
expectFlag flag x | (a,_:b) <- break (== '=') x = case pickBy (map f . flagNames) a flag of Nothing -> [] Just flg -> map (prepend (a ++ "=")) $ expectVal flg b | otherwise = expectStrings (map (map f . flagNames) flag) x where f x = "-" ++ ['-' | length x > 1] ++ x
294
false
true
3
14
95
203
95
108
null
null
vincenthz/hs-crypto-pubkey
Crypto/PubKey/ECC/ECDSA.hs
bsd-2-clause
tHash :: HashFunction -> ByteString -> Integer -> Integer tHash hash m n | d > 0 = shiftR e d | otherwise = e where e = os2ip $ hash m d = log2 e - log2 n log2 = ceiling . logBase (2 :: Double) . fromIntegral
235
tHash :: HashFunction -> ByteString -> Integer -> Integer tHash hash m n | d > 0 = shiftR e d | otherwise = e where e = os2ip $ hash m d = log2 e - log2 n log2 = ceiling . logBase (2 :: Double) . fromIntegral
235
tHash hash m n | d > 0 = shiftR e d | otherwise = e where e = os2ip $ hash m d = log2 e - log2 n log2 = ceiling . logBase (2 :: Double) . fromIntegral
176
false
true
3
9
75
106
51
55
null
null
hvr/ansi-wl-pprint
Text/PrettyPrint/ANSI/Leijen.hs
bsd-2-clause
(onwhite, ondullwhite) = oncolorFunctions White
51
(onwhite, ondullwhite) = oncolorFunctions White
51
(onwhite, ondullwhite) = oncolorFunctions White
51
false
false
0
5
8
16
8
8
null
null
sdiehl/ghc
compiler/prelude/TysPrim.hs
bsd-3-clause
int64PrimTyCon :: TyCon int64PrimTyCon = pcPrimTyCon0 int64PrimTyConName Int64Rep
82
int64PrimTyCon :: TyCon int64PrimTyCon = pcPrimTyCon0 int64PrimTyConName Int64Rep
82
int64PrimTyCon = pcPrimTyCon0 int64PrimTyConName Int64Rep
58
false
true
0
6
8
23
9
14
null
null
brendanhay/gogol
gogol-iam/gen/Network/Google/IAM/Types/Product.hs
mpl-2.0
-- | The full resource name of the policy this lint request is about. The -- name follows the Google Cloud Platform (GCP) resource format. For -- example, a GCP project with ID \`my-project\` will be named -- \`\/\/cloudresourcemanager.googleapis.com\/projects\/my-project\`. The -- resource name is not used to read the...
603
lprFullResourceName :: Lens' LintPolicyRequest (Maybe Text) lprFullResourceName = lens _lprFullResourceName (\ s a -> s{_lprFullResourceName = a})
154
lprFullResourceName = lens _lprFullResourceName (\ s a -> s{_lprFullResourceName = a})
94
true
true
0
8
96
55
31
24
null
null
ghcjs/jsaddle-dom
src/JSDOM/Generated/HTMLFrameElement.hs
mit
-- | <https://developer.mozilla.org/en-US/docs/Web/API/HTMLFrameElement.location Mozilla HTMLFrameElement.location documentation> getLocation :: (MonadDOM m, FromJSString result) => HTMLFrameElement -> m (Maybe result) getLocation self = liftDOM ((self ^. js "location") >>= fromMaybeJSStrin...
322
getLocation :: (MonadDOM m, FromJSString result) => HTMLFrameElement -> m (Maybe result) getLocation self = liftDOM ((self ^. js "location") >>= fromMaybeJSString)
191
getLocation self = liftDOM ((self ^. js "location") >>= fromMaybeJSString)
76
true
true
0
10
56
68
33
35
null
null
bitemyapp/mustache
src/lib/Text/Mustache/Compile.hs
bsd-3-clause
getPartials' _ = mempty
23
getPartials' _ = mempty
23
getPartials' _ = mempty
23
false
false
0
5
3
9
4
5
null
null
noughtmare/yi
yi-mode-javascript/src/Yi/Syntax/JavaScript.hs
gpl-2.0
fromBlock :: Block t -> [Statement t] fromBlock (Block _ x _) = toList x
72
fromBlock :: Block t -> [Statement t] fromBlock (Block _ x _) = toList x
72
fromBlock (Block _ x _) = toList x
34
false
true
0
9
14
46
20
26
null
null
avh4/elm-format
elm-format-markdown/Cheapskate/Inlines.hs
bsd-3-clause
pReferenceLink :: ReferenceMap -> Text -> Inlines -> Parser Inlines pReferenceLink _ rawlab lab = do ref <- option rawlab $ scanSpnl >> pLinkLabel return $ singleton $ Link lab (Ref ref) "" -- An image: ! followed by a link.
231
pReferenceLink :: ReferenceMap -> Text -> Inlines -> Parser Inlines pReferenceLink _ rawlab lab = do ref <- option rawlab $ scanSpnl >> pLinkLabel return $ singleton $ Link lab (Ref ref) "" -- An image: ! followed by a link.
231
pReferenceLink _ rawlab lab = do ref <- option rawlab $ scanSpnl >> pLinkLabel return $ singleton $ Link lab (Ref ref) "" -- An image: ! followed by a link.
163
false
true
0
10
47
76
36
40
null
null
tom-szczarkowski/matasano-crypto-puzzles-solutions
set6/NumberTheory.hs
mit
sieve n = reverse $ foldl sieve' [] [2..n]
42
sieve n = reverse $ foldl sieve' [] [2..n]
42
sieve n = reverse $ foldl sieve' [] [2..n]
42
false
false
3
6
8
31
13
18
null
null
hvr/jhc
selftest/SelfTest.hs
mit
testProperties = do let prop_list x xs = sort (List.delete x $ nub xs) == toList p where p = unsetProperty x ((fromList xs) :: Properties) prop_enum :: Info.Types.Property -> Info.Types.Property -> Bool prop_enum x y = (fromEnum x `compare` fromEnum y) == (x `compare` y) qc "prop.lis...
361
testProperties = do let prop_list x xs = sort (List.delete x $ nub xs) == toList p where p = unsetProperty x ((fromList xs) :: Properties) prop_enum :: Info.Types.Property -> Info.Types.Property -> Bool prop_enum x y = (fromEnum x `compare` fromEnum y) == (x `compare` y) qc "prop.lis...
361
testProperties = do let prop_list x xs = sort (List.delete x $ nub xs) == toList p where p = unsetProperty x ((fromList xs) :: Properties) prop_enum :: Info.Types.Property -> Info.Types.Property -> Bool prop_enum x y = (fromEnum x `compare` fromEnum y) == (x `compare` y) qc "prop.lis...
361
false
false
0
15
91
142
71
71
null
null
gergoerdi/brainfuck
language-registermachine/src/Language/RegisterMachine/Syntax/Macros.hs
bsd-3-clause
instantiateStmt :: PrimitiveStmt -> Inst (Stmt Reg Label) instantiateStmt (Inc r) = return Inc `ap` instantiateReg r
120
instantiateStmt :: PrimitiveStmt -> Inst (Stmt Reg Label) instantiateStmt (Inc r) = return Inc `ap` instantiateReg r
120
instantiateStmt (Inc r) = return Inc `ap` instantiateReg r
62
false
true
0
8
20
47
23
24
null
null
jdubrule/bond
compiler/src/Language/Bond/Codegen/CustomMapping.hs
mit
qualifiedName :: Parser [String] qualifiedName = sepBy1 identifier (char '.') <?> "qualified name"
98
qualifiedName :: Parser [String] qualifiedName = sepBy1 identifier (char '.') <?> "qualified name"
98
qualifiedName = sepBy1 identifier (char '.') <?> "qualified name"
65
false
true
0
8
12
32
16
16
null
null
phadej/stack
src/Stack/Setup.hs
bsd-3-clause
checkDependencies :: (MonadIO m, MonadThrow m, MonadReader env m, HasConfig env) => CheckDependency a -> m a checkDependencies (CheckDependency f) = do menv <- getMinimalEnvOverride liftIO (f menv) >>= either (throwM . MissingDependencies) return
272
checkDependencies :: (MonadIO m, MonadThrow m, MonadReader env m, HasConfig env) => CheckDependency a -> m a checkDependencies (CheckDependency f) = do menv <- getMinimalEnvOverride liftIO (f menv) >>= either (throwM . MissingDependencies) return
272
checkDependencies (CheckDependency f) = do menv <- getMinimalEnvOverride liftIO (f menv) >>= either (throwM . MissingDependencies) return
145
false
true
0
10
59
98
46
52
null
null
ghc-android/ghc
testsuite/tests/ghci/should_run/ghcirun004.hs
bsd-3-clause
2562 = 2561
11
2562 = 2561
11
2562 = 2561
11
false
false
1
5
2
10
3
7
null
null
laszlopandy/elm-compiler
src/Parse/Helpers.hs
bsd-3-clause
onFreshLines :: (a -> b -> b) -> b -> IParser a -> IParser b onFreshLines insert init thing = go init where go values = do optionValue <- ignoreUntil thing case optionValue of Nothing -> return values Just v -> go (insert v values)
283
onFreshLines :: (a -> b -> b) -> b -> IParser a -> IParser b onFreshLines insert init thing = go init where go values = do optionValue <- ignoreUntil thing case optionValue of Nothing -> return values Just v -> go (insert v values)
283
onFreshLines insert init thing = go init where go values = do optionValue <- ignoreUntil thing case optionValue of Nothing -> return values Just v -> go (insert v values)
222
false
true
0
12
96
107
49
58
null
null
ulricha/dsh
src/Database/DSH/NKL/Typing.hs
bsd-3-clause
tyPrim1 Nub ty = catchError (listTy ty) (const $ opTyErr "nub" [ty]) >> pure ty
87
tyPrim1 Nub ty = catchError (listTy ty) (const $ opTyErr "nub" [ty]) >> pure ty
87
tyPrim1 Nub ty = catchError (listTy ty) (const $ opTyErr "nub" [ty]) >> pure ty
87
false
false
0
10
22
44
21
23
null
null
neothemachine/monadiccp
src/Control/CP/FD/FD.hs
bsd-3-clause
setFailed :: FDSolver s => FDInstance s () setFailed = do s <- get debug "setFailed!" $ return () put $ s { fdsFailed = True }
133
setFailed :: FDSolver s => FDInstance s () setFailed = do s <- get debug "setFailed!" $ return () put $ s { fdsFailed = True }
133
setFailed = do s <- get debug "setFailed!" $ return () put $ s { fdsFailed = True }
90
false
true
0
9
33
62
29
33
null
null
GaloisInc/saw-script
src/SAWScript/Prover/MRSolver/Monad.hs
bsd-3-clause
{- -- | Catch any errors thrown by a computation and coerce them to a 'Left' catchErrorEither :: MonadError e m => m a -> m (Either e a) catchErrorEither m = catchError (Right <$> m) (return . Left) -} -- FIXME: replace these individual lifting functions with a more general -- typeclass like LiftTCM -- | Lift a nulla...
442
liftSC0 :: (SharedContext -> IO a) -> MRM a liftSC0 f = mrSC >>= \sc -> liftIO (f sc)
85
liftSC0 f = mrSC >>= \sc -> liftIO (f sc)
41
true
true
0
9
84
53
28
25
null
null
mightymoose/liquidhaskell
benchmarks/llrbtree-0.1.1/Data/Heap/Splay.hs
bsd-3-clause
showHeap' pref (Node l x r) = show x ++ "\n" ++ pref ++ "+ " ++ showHeap' pref' l ++ pref ++ "+ " ++ showHeap' pref' r where pref' = " " ++ pref
199
showHeap' pref (Node l x r) = show x ++ "\n" ++ pref ++ "+ " ++ showHeap' pref' l ++ pref ++ "+ " ++ showHeap' pref' r where pref' = " " ++ pref
199
showHeap' pref (Node l x r) = show x ++ "\n" ++ pref ++ "+ " ++ showHeap' pref' l ++ pref ++ "+ " ++ showHeap' pref' r where pref' = " " ++ pref
199
false
false
0
12
90
74
35
39
null
null
bananu7/Turnip
src/Turnip/Eval/Util.hs
mit
-- this is very similar to makeNewTable, just operates on functions makeNewLambda :: FunctionData -> LuaM FunctionRef makeNewLambda f = do newRef <- uniqueFunctionRef LuaMT $ do functions . at newRef .= Just f return newRef
247
makeNewLambda :: FunctionData -> LuaM FunctionRef makeNewLambda f = do newRef <- uniqueFunctionRef LuaMT $ do functions . at newRef .= Just f return newRef
179
makeNewLambda f = do newRef <- uniqueFunctionRef LuaMT $ do functions . at newRef .= Just f return newRef
129
true
true
0
12
59
59
26
33
null
null
victoredwardocallaghan/bindings-libftdi
src/LibFtdi/LibFtdi.hs
lgpl-2.1
-- C ret code to typed error -- | (For internal use) Obtain a 'FtdiError' type of a C value from the Error codes list. ftdiErrorTy :: CInt -> FtdiReturnType () ftdiErrorTy c | c >= 0 = return () -- Success (on ret == 0) | c < 0 = (Left . toEnum . fromIntegral) c
301
ftdiErrorTy :: CInt -> FtdiReturnType () ftdiErrorTy c | c >= 0 = return () -- Success (on ret == 0) | c < 0 = (Left . toEnum . fromIntegral) c
181
ftdiErrorTy c | c >= 0 = return () -- Success (on ret == 0) | c < 0 = (Left . toEnum . fromIntegral) c
140
true
true
1
8
95
72
34
38
null
null
Alllex/stm-data-collection
benchmarks/PriorityQueueBench.hs
bsd-3-clause
implNames :: [String] implNames = map fst impls
47
implNames :: [String] implNames = map fst impls
47
implNames = map fst impls
25
false
true
0
5
7
19
10
9
null
null
nikai3d/ce-challenges
moderate/array_absurdity.hs
bsd-3-clause
absurd :: [String] -> String absurd [_] = ""
53
absurd :: [String] -> String absurd [_] = ""
53
absurd [_] = ""
18
false
true
0
6
17
24
13
11
null
null
iu-parfunc/containers
Data/Set/Base.hs
bsd-3-clause
null (Bin {}) = False
21
null (Bin {}) = False
21
null (Bin {}) = False
21
false
false
0
6
4
17
8
9
null
null
michaelficarra/purescript
src/Language/PureScript/Sugar/CaseDeclarations.hs
mit
inSameGroup :: Declaration -> Declaration -> Bool inSameGroup (ValueDeclaration ident1 _ _ _) (ValueDeclaration ident2 _ _ _) = ident1 == ident2
144
inSameGroup :: Declaration -> Declaration -> Bool inSameGroup (ValueDeclaration ident1 _ _ _) (ValueDeclaration ident2 _ _ _) = ident1 == ident2
144
inSameGroup (ValueDeclaration ident1 _ _ _) (ValueDeclaration ident2 _ _ _) = ident1 == ident2
94
false
true
0
7
21
52
26
26
null
null
muhbaasu/pfennig-server
src/Pfennig/Queries.hs
mit
allExpendituresBetween :: TimeRange -> H.Tx HP.Postgres s [Expenditure 'Database] allExpendituresBetween (start, end) = do rows <- H.listEx $ [H.stmt|select * from expenditures where (created_at, created_at) overlaps (?, ?) |] start end return $ fmap rowToEx...
334
allExpendituresBetween :: TimeRange -> H.Tx HP.Postgres s [Expenditure 'Database] allExpendituresBetween (start, end) = do rows <- H.listEx $ [H.stmt|select * from expenditures where (created_at, created_at) overlaps (?, ?) |] start end return $ fmap rowToEx...
334
allExpendituresBetween (start, end) = do rows <- H.listEx $ [H.stmt|select * from expenditures where (created_at, created_at) overlaps (?, ?) |] start end return $ fmap rowToExpenditure rows
252
false
true
0
10
97
79
40
39
null
null
mpwillson/mal
haskell/step7_quote.hs
mpl-2.0
-- eval is_pair (MalList x _:xs) = True
39
is_pair (MalList x _:xs) = True
31
is_pair (MalList x _:xs) = True
31
true
false
0
8
7
22
11
11
null
null
sile/isobmff
src/Codec/ISOBMFF6.hs
mit
getFlagsInternal :: Get Word32 getFlagsInternal = do high <- getWord8 mid <- getWord8 low <- getWord8 return $ makeFlags (fromIntegral high) (fromIntegral mid) (fromIntegral low)
186
getFlagsInternal :: Get Word32 getFlagsInternal = do high <- getWord8 mid <- getWord8 low <- getWord8 return $ makeFlags (fromIntegral high) (fromIntegral mid) (fromIntegral low)
186
getFlagsInternal = do high <- getWord8 mid <- getWord8 low <- getWord8 return $ makeFlags (fromIntegral high) (fromIntegral mid) (fromIntegral low)
155
false
true
0
10
32
67
31
36
null
null
Submitty/AnalysisTools
src/Lichen/Parser/Python.hs
bsd-3-clause
convertOp (BinaryAnd _) = pure $ Node [Tag "binaryand", Tag "&"] []
67
convertOp (BinaryAnd _) = pure $ Node [Tag "binaryand", Tag "&"] []
67
convertOp (BinaryAnd _) = pure $ Node [Tag "binaryand", Tag "&"] []
67
false
false
0
8
11
38
18
20
null
null
glebovitz/demo
src/DataAnalysis/Application/Handler/Export.hs
mit
renderDataPoint :: Monad m => DataPoint -> Producer m Event renderDataPoint dp = do with "label" (text (_dataLabel dp)) with "value" (text (toShortest (_dataValue dp))) maybe (return ()) (with "label" . text) (_dataGroup dp) where text = yield . EventContent . ContentText --------------------------------...
423
renderDataPoint :: Monad m => DataPoint -> Producer m Event renderDataPoint dp = do with "label" (text (_dataLabel dp)) with "value" (text (toShortest (_dataValue dp))) maybe (return ()) (with "label" . text) (_dataGroup dp) where text = yield . EventContent . ContentText --------------------------------...
423
renderDataPoint dp = do with "label" (text (_dataLabel dp)) with "value" (text (toShortest (_dataValue dp))) maybe (return ()) (with "label" . text) (_dataGroup dp) where text = yield . EventContent . ContentText -------------------------------------------------------------------------------- -- Utilitie...
363
false
true
0
13
68
129
62
67
null
null
FranklinChen/hugs98-plus-Sep2006
packages/base/Data/ByteString.hs
bsd-3-clause
split w (PS x s l) = inlinePerformIO $ withForeignPtr x $ \p -> do let ptr = p `plusPtr` s STRICT1(loop) loop n = let q = inlinePerformIO $ memchr (ptr `plusPtr` n) w (fromIntegral (l-n)) in if q == nullPtr then [PS ...
435
split w (PS x s l) = inlinePerformIO $ withForeignPtr x $ \p -> do let ptr = p `plusPtr` s STRICT1(loop) loop n = let q = inlinePerformIO $ memchr (ptr `plusPtr` n) w (fromIntegral (l-n)) in if q == nullPtr then [PS ...
435
split w (PS x s l) = inlinePerformIO $ withForeignPtr x $ \p -> do let ptr = p `plusPtr` s STRICT1(loop) loop n = let q = inlinePerformIO $ memchr (ptr `plusPtr` n) w (fromIntegral (l-n)) in if q == nullPtr then [PS ...
435
false
false
0
21
190
212
109
103
null
null
pellagic-puffbomb/simpleservantblog
src/Api/Admin/PostAdmin.hs
bsd-3-clause
getPost :: Int -> Connection -> IO (Maybe Post.BlogPost) getPost postId conn = do let q = "select * from post where id = ?" result <- liftIO $ query conn q (Only postId) case result of (x:_)-> return $ Just x _ -> return Nothing
246
getPost :: Int -> Connection -> IO (Maybe Post.BlogPost) getPost postId conn = do let q = "select * from post where id = ?" result <- liftIO $ query conn q (Only postId) case result of (x:_)-> return $ Just x _ -> return Nothing
246
getPost postId conn = do let q = "select * from post where id = ?" result <- liftIO $ query conn q (Only postId) case result of (x:_)-> return $ Just x _ -> return Nothing
189
false
true
0
11
63
104
49
55
null
null
haskell-opengl/OpenGLRaw
src/Graphics/GL/Functions/F06.hs
bsd-3-clause
ptr_glDisableVertexAttribArray :: FunPtr (GLuint -> IO ()) ptr_glDisableVertexAttribArray = unsafePerformIO $ getCommand "glDisableVertexAttribArray"
149
ptr_glDisableVertexAttribArray :: FunPtr (GLuint -> IO ()) ptr_glDisableVertexAttribArray = unsafePerformIO $ getCommand "glDisableVertexAttribArray"
149
ptr_glDisableVertexAttribArray = unsafePerformIO $ getCommand "glDisableVertexAttribArray"
90
false
true
0
9
12
33
16
17
null
null
mcmaniac/ghc
compiler/cmm/CmmRewriteAssignments.hs
bsd-3-clause
xassign2 _ = Nothing
20
xassign2 _ = Nothing
20
xassign2 _ = Nothing
20
false
false
0
4
3
10
4
6
null
null
osa1/rho-torrent
src/Rho/PieceStats.hs
bsd-3-clause
-- | Return at most N pieces with minimum availability. Returns less results -- when there aren't enough pieces in the queue. takeMins :: PieceStats -> Int -> [(PieceIdx, S.Set PeerId)] takeMins _ 0 = []
217
takeMins :: PieceStats -> Int -> [(PieceIdx, S.Set PeerId)] takeMins _ 0 = []
91
takeMins _ 0 = []
31
true
true
0
10
49
42
23
19
null
null
acowley/ghc
compiler/utils/Outputable.hs
bsd-3-clause
-- a bit frightening, but there you are plural _ = char 's'
61
plural _ = char 's'
21
plural _ = char 's'
21
true
false
0
5
14
14
6
8
null
null
lukexi/stack
src/Path/IO.hs
bsd-3-clause
ignoreDoesNotExist :: MonadIO m => IO () -> m () ignoreDoesNotExist f = liftIO $ catch f $ \e -> unless (isDoesNotExistError e) (throwIO e)
143
ignoreDoesNotExist :: MonadIO m => IO () -> m () ignoreDoesNotExist f = liftIO $ catch f $ \e -> unless (isDoesNotExistError e) (throwIO e)
143
ignoreDoesNotExist f = liftIO $ catch f $ \e -> unless (isDoesNotExistError e) (throwIO e)
94
false
true
4
9
28
74
33
41
null
null
lpeterse/haskell-socket
src/System/Socket/Unsafe.hs
mit
-- | Like `System.Socket.receive`, but using `Ptr` and length instead of a `ByteString`. -- -- This function is /unsafe/. @bufPtr@ must refer to a buffer which size is at least @bufSize@ bytes. unsafeReceive :: Socket a t p -> Ptr b -> CSize -> MessageFlags -> IO CInt unsafeReceive s bufPtr bufSize flags = tryWaitR...
378
unsafeReceive :: Socket a t p -> Ptr b -> CSize -> MessageFlags -> IO CInt unsafeReceive s bufPtr bufSize flags = tryWaitRetryLoop s waitRead (\fd-> c_recv fd bufPtr bufSize flags)
182
unsafeReceive s bufPtr bufSize flags = tryWaitRetryLoop s waitRead (\fd-> c_recv fd bufPtr bufSize flags)
107
true
true
0
10
66
82
39
43
null
null
cirquit/quizlearner
resources/sqlJoins/sqlText.hs
mit
main :: IO () main = runStderrLoggingT $ withSqlitePool "test.db3" openConnectionCount $ \pool -> liftIO $ do runResourceT $ flip runSqlPool pool $ do runMigration migrateAll insert $ Person "Michael" "Snoyman" 26 warp 3000 $ PersistTest pool
266
main :: IO () main = runStderrLoggingT $ withSqlitePool "test.db3" openConnectionCount $ \pool -> liftIO $ do runResourceT $ flip runSqlPool pool $ do runMigration migrateAll insert $ Person "Michael" "Snoyman" 26 warp 3000 $ PersistTest pool
266
main = runStderrLoggingT $ withSqlitePool "test.db3" openConnectionCount $ \pool -> liftIO $ do runResourceT $ flip runSqlPool pool $ do runMigration migrateAll insert $ Person "Michael" "Snoyman" 26 warp 3000 $ PersistTest pool
252
false
true
0
14
60
87
39
48
null
null
beni55/HTTP
Network/HTTP/Utils.hs
bsd-3-clause
dropWhileTail :: (a -> Bool) -> [a] -> [a] dropWhileTail f ls = case foldr chop Nothing ls of { Just xs -> xs; Nothing -> [] } where chop x (Just xs) = Just (x:xs) chop x _ | f x = Nothing | otherwise = Just [x] -- | @chopAtDelim elt ls@ breaks up @ls@ into two at first occurrence -- of @elt...
428
dropWhileTail :: (a -> Bool) -> [a] -> [a] dropWhileTail f ls = case foldr chop Nothing ls of { Just xs -> xs; Nothing -> [] } where chop x (Just xs) = Just (x:xs) chop x _ | f x = Nothing | otherwise = Just [x] -- | @chopAtDelim elt ls@ breaks up @ls@ into two at first occurrence -- of @elt...
428
dropWhileTail f ls = case foldr chop Nothing ls of { Just xs -> xs; Nothing -> [] } where chop x (Just xs) = Just (x:xs) chop x _ | f x = Nothing | otherwise = Just [x] -- | @chopAtDelim elt ls@ breaks up @ls@ into two at first occurrence -- of @elt@; @elt@ is elided too. If @elt@ does not o...
385
false
true
0
9
114
145
70
75
null
null
julienschmaltz/madl
src/Parser/MadlParser.hs
mit
-- | Parse an 'Attribute' that is not a single string parseAttributeNoString :: Parser Attribute parseAttributeNoString = (do first <- identifier <* dot rest <- sepBy1 identifier dot return (first:rest) ) <?> "Attribute no string"
246
parseAttributeNoString :: Parser Attribute parseAttributeNoString = (do first <- identifier <* dot rest <- sepBy1 identifier dot return (first:rest) ) <?> "Attribute no string"
192
parseAttributeNoString = (do first <- identifier <* dot rest <- sepBy1 identifier dot return (first:rest) ) <?> "Attribute no string"
149
true
true
0
11
50
58
28
30
null
null
rodrigogribeiro/mptc
src/Utils/Id.hs
bsd-3-clause
isunqual = not . isqual
23
isunqual = not . isqual
23
isunqual = not . isqual
23
false
false
0
5
4
10
5
5
null
null
Super-Fluid/heqet
Heqet/Input/Parse.hs
gpl-3.0
rational :: Parser Rational rational = do num <- natural whiteSpace b <- maybeDenom case b of Just denom -> return (fromIntegral num / fromIntegral denom) Nothing -> return (fromIntegral num)
226
rational :: Parser Rational rational = do num <- natural whiteSpace b <- maybeDenom case b of Just denom -> return (fromIntegral num / fromIntegral denom) Nothing -> return (fromIntegral num)
226
rational = do num <- natural whiteSpace b <- maybeDenom case b of Just denom -> return (fromIntegral num / fromIntegral denom) Nothing -> return (fromIntegral num)
198
false
true
0
13
65
78
35
43
null
null
Zolomon/edan40-chatterbot
Pattern.hs
mit
-- Helper function to match singleWildcardMatch, longerWildcardMatch :: Eq a => [a] -> [a] -> Maybe [a] singleWildcardMatch [] [] = Just []
141
singleWildcardMatch, longerWildcardMatch :: Eq a => [a] -> [a] -> Maybe [a] singleWildcardMatch [] [] = Just []
111
singleWildcardMatch [] [] = Just []
35
true
true
0
9
24
55
29
26
null
null
jfranklin9000/urbit
pkg/hs/urbit-king/lib/Urbit/Noun/Tree.hs
mit
mapFromHoonMap ∷ Ord k ⇒ HoonMap k v → Map k v mapFromHoonMap = mapFromList . treeToList . unHoonMap
100
mapFromHoonMap ∷ Ord k ⇒ HoonMap k v → Map k v mapFromHoonMap = mapFromList . treeToList . unHoonMap
100
mapFromHoonMap = mapFromList . treeToList . unHoonMap
53
false
true
0
7
18
40
19
21
null
null
nadavshemer/buildsome
src/Lib/PoolAlloc.hs
gpl-2.0
new :: [a] -> IO (PoolAlloc a) new xs = PoolAlloc <$> newIORef (PoolState xs PriorityQueue.empty)
97
new :: [a] -> IO (PoolAlloc a) new xs = PoolAlloc <$> newIORef (PoolState xs PriorityQueue.empty)
97
new xs = PoolAlloc <$> newIORef (PoolState xs PriorityQueue.empty)
66
false
true
0
9
15
50
24
26
null
null
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/enumFromThen_2.hs
mit
fsEsOrdering :: Ordering -> Ordering -> MyBool fsEsOrdering x y = not (esEsOrdering x y)
92
fsEsOrdering :: Ordering -> Ordering -> MyBool fsEsOrdering x y = not (esEsOrdering x y)
92
fsEsOrdering x y = not (esEsOrdering x y)
41
false
true
0
7
18
35
17
18
null
null
facebookincubator/duckling
tests/Duckling/Numeral/VI/Tests.hs
bsd-3-clause
tests :: TestTree tests = testGroup "VI Tests" [ makeCorpusTest [Seal Numeral] corpus ]
91
tests :: TestTree tests = testGroup "VI Tests" [ makeCorpusTest [Seal Numeral] corpus ]
91
tests = testGroup "VI Tests" [ makeCorpusTest [Seal Numeral] corpus ]
73
false
true
0
8
17
31
15
16
null
null
davidzhulijun/TAM
FiniteStateMachine/Programs/FSM3.hs
bsd-3-clause
trans A0 S4 = S4
17
trans A0 S4 = S4
17
trans A0 S4 = S4
17
false
false
1
5
5
16
5
11
null
null
alexander-b/hsay
src-exec/hsay.hs
gpl-3.0
diff _ [] = []
35
diff _ [] = []
35
diff _ [] = []
35
false
false
1
6
25
18
7
11
null
null
graninas/Haskell-Algorithms
Tests/Lessons/ListMap.hs
gpl-3.0
quareList' = map (\x -> x * x) l1
38
squareList' = map (\x -> x * x) l1
38
squareList' = map (\x -> x * x) l1
38
false
false
0
8
13
23
12
11
null
null
nikivazou/hscolour
Language/Haskell/HsColour/ANSI.hs
gpl-2.0
renderAttrG XTerm256Compatible (Background (Rgb r g b)) = [ "48", "5", show ( rgb24bit_to_xterm256 r g b ) ]
113
renderAttrG XTerm256Compatible (Background (Rgb r g b)) = [ "48", "5", show ( rgb24bit_to_xterm256 r g b ) ]
113
renderAttrG XTerm256Compatible (Background (Rgb r g b)) = [ "48", "5", show ( rgb24bit_to_xterm256 r g b ) ]
113
false
false
0
9
23
49
25
24
null
null
ekmett/containers
tests/intmap-properties.hs
bsd-3-clause
test_mappend :: Assertion test_mappend = mappend (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (7, "C")]) @?= fromList [(3, "b"), (5, "a"), (7, "C")]
156
test_mappend :: Assertion test_mappend = mappend (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (7, "C")]) @?= fromList [(3, "b"), (5, "a"), (7, "C")]
156
test_mappend = mappend (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (7, "C")]) @?= fromList [(3, "b"), (5, "a"), (7, "C")]
130
false
true
0
10
23
98
59
39
null
null
portnov/integration-server
THIS/Yaml.hs
lgpl-3.0
getInherit :: StringObject -> Either ErrorMessage (Maybe String, StringObject) getInherit x@(Mapping ps) = case lookupRemove "inherit" ps of (Nothing, _) -> return (Nothing, x) (Just (Scalar y), s) -> return (Just y, Mapping s) (J...
390
getInherit :: StringObject -> Either ErrorMessage (Maybe String, StringObject) getInherit x@(Mapping ps) = case lookupRemove "inherit" ps of (Nothing, _) -> return (Nothing, x) (Just (Scalar y), s) -> return (Just y, Mapping s) (J...
390
getInherit x@(Mapping ps) = case lookupRemove "inherit" ps of (Nothing, _) -> return (Nothing, x) (Just (Scalar y), s) -> return (Just y, Mapping s) (Just y, _) -> failure $ "Inherit: should be Scalar, but got " ++ show y
311
false
true
0
11
139
133
68
65
null
null
sweirich/hs-inferno
src/Language/Inferno/M/SolverHi.hs
bsd-3-clause
let0 c1 = do letn [] (\ _ -> return c1) (pure ()) <$$> (\ (Letn generalizable v1 _ ()) -> (generalizable, v1)) -------------------------------------------------------------------- -- running a constraint {- The constraint [c] should have been constructed by [let0], otherwise we risk encounterin...
603
let0 c1 = do letn [] (\ _ -> return c1) (pure ()) <$$> (\ (Letn generalizable v1 _ ()) -> (generalizable, v1)) -------------------------------------------------------------------- -- running a constraint {- The constraint [c] should have been constructed by [let0], otherwise we risk encounterin...
603
let0 c1 = do letn [] (\ _ -> return c1) (pure ()) <$$> (\ (Letn generalizable v1 _ ()) -> (generalizable, v1)) -------------------------------------------------------------------- -- running a constraint {- The constraint [c] should have been constructed by [let0], otherwise we risk encounterin...
603
false
false
0
12
121
75
40
35
null
null
copland/cmdargs
System/Console/CmdArgs/Verbosity.hs
bsd-3-clause
-- | Used to test if status updates should be output to the user. -- @True@ if the verbosity is set to 'Loud' (when @--verbose@ is specified). isLoud :: IO Bool isLoud = fmap (>=Loud) getVerbosity
198
isLoud :: IO Bool isLoud = fmap (>=Loud) getVerbosity
53
isLoud = fmap (>=Loud) getVerbosity
35
true
true
0
6
37
25
14
11
null
null
zeyuanxy/haskell-playground
write-yourself-a-scheme/chap8/main.hs
mit
car badArgList = throwError $ NumArgs 1 badArgList
50
car badArgList = throwError $ NumArgs 1 badArgList
50
car badArgList = throwError $ NumArgs 1 badArgList
50
false
false
0
6
7
18
8
10
null
null
chreekat/yesod
yesod-core/test/YesodCoreTest/CleanPath.hs
bsd-2-clause
hasTrailingSlash :: IO () hasTrailingSlash = runner $ do res <- request defaultRequest { pathInfo = decodePathSegments "/bar/" } assertStatus 200 res assertContentType "text/plain; charset=utf-8" res assertBody "bar" res
268
hasTrailingSlash :: IO () hasTrailingSlash = runner $ do res <- request defaultRequest { pathInfo = decodePathSegments "/bar/" } assertStatus 200 res assertContentType "text/plain; charset=utf-8" res assertBody "bar" res
268
hasTrailingSlash = runner $ do res <- request defaultRequest { pathInfo = decodePathSegments "/bar/" } assertStatus 200 res assertContentType "text/plain; charset=utf-8" res assertBody "bar" res
242
false
true
0
12
76
65
29
36
null
null
verement/etamoo
src/MOO/Database/LambdaMOO.hs
bsd-3-clause
type_err = 3
16
type_err = 3
16
type_err = 3
16
false
false
0
4
6
6
3
3
null
null
ezyang/ghc
testsuite/tests/simplStg/should_run/T13536.hs
bsd-3-clause
unId True _ = Nothing
21
unId True _ = Nothing
21
unId True _ = Nothing
21
false
false
0
4
4
13
5
8
null
null
ryoia/utah-haskell
2015-09-17-solution/Client.hs
apache-2.0
epAddr = "http://127.0.0.1:3000"
32
epAddr = "http://127.0.0.1:3000"
32
epAddr = "http://127.0.0.1:3000"
32
false
false
1
5
2
10
3
7
null
null
nbrendler/hackerrank-exercises
utopian-tree/Main.hs
mit
spring :: Int -> Int -> Int spring 0 h = h
42
spring :: Int -> Int -> Int spring 0 h = h
42
spring 0 h = h
14
false
true
0
6
11
24
12
12
null
null
olorin/amazonka
amazonka-s3/gen/Network/AWS/S3/ListParts.hs
mpl-2.0
-- | Identifies who initiated the multipart upload. lprsInitiator :: Lens' ListPartsResponse (Maybe Initiator) lprsInitiator = lens _lprsInitiator (\ s a -> s{_lprsInitiator = a})
179
lprsInitiator :: Lens' ListPartsResponse (Maybe Initiator) lprsInitiator = lens _lprsInitiator (\ s a -> s{_lprsInitiator = a})
127
lprsInitiator = lens _lprsInitiator (\ s a -> s{_lprsInitiator = a})
68
true
true
0
9
24
46
25
21
null
null
olorin/amazonka
core/src/Network/AWS/Data/XML.hs
mpl-2.0
parseXMLText :: FromText a => String -> [Node] -> Either String a parseXMLText n = withContent n >=> maybe (Left $ "empty node list, when expecting single node " ++ n) fromText
188
parseXMLText :: FromText a => String -> [Node] -> Either String a parseXMLText n = withContent n >=> maybe (Left $ "empty node list, when expecting single node " ++ n) fromText
188
parseXMLText n = withContent n >=> maybe (Left $ "empty node list, when expecting single node " ++ n) fromText
122
false
true
0
9
43
60
29
31
null
null
oldmanmike/ghc
compiler/basicTypes/VarEnv.hs
bsd-3-clause
extendVarEnv_Directly = addToUFM_Directly
41
extendVarEnv_Directly = addToUFM_Directly
41
extendVarEnv_Directly = addToUFM_Directly
41
false
false
0
4
2
6
3
3
null
null
artemtsushko/travelling-salesman-ga
src/TSP/GeneticAlgorithm.hs
bsd-3-clause
-- | selects path with minimal value of distance function from given set of paths bestResult :: (Path -> Distance) -> [Path] -> (Path, Distance) bestResult distanceFunc paths = let path = minimumBy (comparing distanceFunc) paths dist = distanceFunc path in (path,dist)
280
bestResult :: (Path -> Distance) -> [Path] -> (Path, Distance) bestResult distanceFunc paths = let path = minimumBy (comparing distanceFunc) paths dist = distanceFunc path in (path,dist)
198
bestResult distanceFunc paths = let path = minimumBy (comparing distanceFunc) paths dist = distanceFunc path in (path,dist)
135
true
true
0
11
53
77
41
36
null
null
tjakway/ghcjvm
libraries/base/System/Posix/Internals.hs
bsd-3-clause
setCloseOnExec :: FD -> IO () setCloseOnExec fd = do throwErrnoIfMinus1_ "setCloseOnExec" $ c_fcntl_write fd const_f_setfd const_fd_cloexec #endif -- ----------------------------------------------------------------------------- -- foreign imports #if !defined(mingw32_HOST_OS)
284
setCloseOnExec :: FD -> IO () setCloseOnExec fd = do throwErrnoIfMinus1_ "setCloseOnExec" $ c_fcntl_write fd const_f_setfd const_fd_cloexec #endif -- ----------------------------------------------------------------------------- -- foreign imports #if !defined(mingw32_HOST_OS)
284
setCloseOnExec fd = do throwErrnoIfMinus1_ "setCloseOnExec" $ c_fcntl_write fd const_f_setfd const_fd_cloexec #endif -- ----------------------------------------------------------------------------- -- foreign imports #if !defined(mingw32_HOST_OS)
254
false
true
0
8
32
44
22
22
null
null
sherwoodwang/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxSTC_LEX_RUBY :: Int wxSTC_LEX_RUBY = 22
41
wxSTC_LEX_RUBY :: Int wxSTC_LEX_RUBY = 22
41
wxSTC_LEX_RUBY = 22
19
false
true
0
6
5
18
7
11
null
null
Dobiasd/HackerRank-solutions
Algorithms/Warmup/Solve_me_first/Main.hs
mit
solve :: [Integer] -> Integer solve = sum
41
solve :: [Integer] -> Integer solve = sum
41
solve = sum
11
false
true
0
6
7
18
10
8
null
null
smaccm/capDL-tool
CapDL/State.hs
bsd-2-clause
validObjCap _ _ = True
22
validObjCap _ _ = True
22
validObjCap _ _ = True
22
false
false
0
5
4
11
5
6
null
null
rueshyna/gogol
gogol-genomics/gen/Network/Google/Genomics/Types/Product.hs
mpl-2.0
-- | The maximum number of variants to return in a single page. If -- unspecified, defaults to 5000. The maximum value is 10000. svrPageSize :: Lens' SearchVariantsRequest (Maybe Int32) svrPageSize = lens _svrPageSize (\ s a -> s{_svrPageSize = a}) . mapping _Coerce
274
svrPageSize :: Lens' SearchVariantsRequest (Maybe Int32) svrPageSize = lens _svrPageSize (\ s a -> s{_svrPageSize = a}) . mapping _Coerce
145
svrPageSize = lens _svrPageSize (\ s a -> s{_svrPageSize = a}) . mapping _Coerce
88
true
true
0
10
51
56
29
27
null
null
rjohnsondev/haskellshop
src/Admin/Admin.hs
bsd-2-clause
adminRoutes :: [(ByteString, AppHandler ())] adminRoutes = [ ("/admin/login" , catchErrors $ handleLogin) , ("/admin" , catchErrors $ requireAdmin $ render "admin/_index") , ("/admin/order" , catchErrors $ requireAdmin $ handleOrder) , ("/adm...
684
adminRoutes :: [(ByteString, AppHandler ())] adminRoutes = [ ("/admin/login" , catchErrors $ handleLogin) , ("/admin" , catchErrors $ requireAdmin $ render "admin/_index") , ("/admin/order" , catchErrors $ requireAdmin $ handleOrder) , ("/adm...
684
adminRoutes = [ ("/admin/login" , catchErrors $ handleLogin) , ("/admin" , catchErrors $ requireAdmin $ render "admin/_index") , ("/admin/order" , catchErrors $ requireAdmin $ handleOrder) , ("/admin/categories" , catchErrors $ requireAd...
639
false
true
2
9
210
150
81
69
null
null
dylex/range-set
tests/List.hs
mit
complementProps :: TestTree complementProps = testGroup "complement" [ QC.testProperty "definition" (\a e -> RSet.member e (rs a) === RSet.notMember e (RSet.complement (rs a))) , QC.testProperty "involutive" (\a -> rs a === RSet.complement (RSet.complement (rs a))) , QC.testProperty "(full \\\\)" (\a -> RSet...
444
complementProps :: TestTree complementProps = testGroup "complement" [ QC.testProperty "definition" (\a e -> RSet.member e (rs a) === RSet.notMember e (RSet.complement (rs a))) , QC.testProperty "involutive" (\a -> rs a === RSet.complement (RSet.complement (rs a))) , QC.testProperty "(full \\\\)" (\a -> RSet...
444
complementProps = testGroup "complement" [ QC.testProperty "definition" (\a e -> RSet.member e (rs a) === RSet.notMember e (RSet.complement (rs a))) , QC.testProperty "involutive" (\a -> rs a === RSet.complement (RSet.complement (rs a))) , QC.testProperty "(full \\\\)" (\a -> RSet.complement (rs a) === RSet....
416
false
true
1
14
78
199
96
103
null
null
ghcjs/ghcjs
src/Compiler/GhcjsProgram.hs
mit
optStr :: Mod OptionFields String -> Parser (Maybe String) optStr = optional . option str
89
optStr :: Mod OptionFields String -> Parser (Maybe String) optStr = optional . option str
89
optStr = optional . option str
30
false
true
1
9
14
42
18
24
null
null
fmapfmapfmap/amazonka
gen/src/Gen/AST/Data/Syntax.hs
mpl-2.0
pHMay = ".#?"
15
pHMay = ".#?"
15
pHMay = ".#?"
15
false
false
0
4
4
6
3
3
null
null
andorp/grin
grin/src/Transformations/Util.hs
bsd-3-clause
markToRemove _ False = Nothing
30
markToRemove _ False = Nothing
30
markToRemove _ False = Nothing
30
false
false
1
5
4
13
5
8
null
null
cnc-patch/cncmix
Codec/Archive/CnCMix/Backend.hs
gpl-3.0
read :: FilePath -> IO File read p = return . File shortname =<< L.readFile p where shortname = takeFileName p
112
read :: FilePath -> IO File read p = return . File shortname =<< L.readFile p where shortname = takeFileName p
112
read p = return . File shortname =<< L.readFile p where shortname = takeFileName p
84
false
true
2
7
22
56
23
33
null
null
skingo/kernel_category
kernelCategory/src/KernelCategory.hs
bsd-3-clause
morphToRelMorph :: (FinMonoid m, FinMonoid n) => (m -> n) -> (m -> DS.Set n) morphToRelMorph = (.) DS.singleton
111
morphToRelMorph :: (FinMonoid m, FinMonoid n) => (m -> n) -> (m -> DS.Set n) morphToRelMorph = (.) DS.singleton
111
morphToRelMorph = (.) DS.singleton
34
false
true
0
12
18
63
31
32
null
null
ambiata/highlighting-kate
Text/Highlighting/Kate/Syntax/Modelines.hs
gpl-2.0
list_False = Set.fromList $ words $ "off false 0"
49
list_False = Set.fromList $ words $ "off false 0"
49
list_False = Set.fromList $ words $ "off false 0"
49
false
false
1
7
8
20
8
12
null
null
josiah14/lambdaline
LambdaLine/XTerm/Colors.hs
gpl-3.0
hotPink1 :: Color hotPink1 = "169"
34
hotPink1 :: Color hotPink1 = "169"
34
hotPink1 = "169"
16
false
true
0
6
5
18
7
11
null
null
nulldatamap/bastet
src/Tokenizer.hs
bsd-3-clause
isStringToken _ = False
49
isStringToken _ = False
49
isStringToken _ = False
49
false
false
0
5
29
9
4
5
null
null
kumasento/accelerate
Data/Array/Accelerate/Pretty/Graphviz.hs
bsd-3-clause
dotAcc :: OpenAcc aenv a -> String dotAcc = toDigraph (travAcc dotLabels combineDot leafDot)
92
dotAcc :: OpenAcc aenv a -> String dotAcc = toDigraph (travAcc dotLabels combineDot leafDot)
92
dotAcc = toDigraph (travAcc dotLabels combineDot leafDot)
57
false
true
0
7
13
33
16
17
null
null
ulricha/algebra-sql
src/Database/Algebra/SQL/Termination.hs
bsd-3-clause
aggrAndGroupingF = wrap AggrAndGroupingF
40
aggrAndGroupingF = wrap AggrAndGroupingF
40
aggrAndGroupingF = wrap AggrAndGroupingF
40
false
false
0
5
3
9
4
5
null
null
sebastianpfluegelmeier/pa
src/Scores.hs
gpl-3.0
groove1 = str 0.3 $ loopBy 4 g1 where g1 = groove [1, 1, -2, 1, -1, 2, 8]
94
groove1 = str 0.3 $ loopBy 4 g1 where g1 = groove [1, 1, -2, 1, -1, 2, 8]
94
groove1 = str 0.3 $ loopBy 4 g1 where g1 = groove [1, 1, -2, 1, -1, 2, 8]
94
false
false
0
9
39
53
29
24
null
null
markus1189/fgl
Data/Graph/Inductive/Graph.hs
bsd-3-clause
flip2 :: (a,b) -> (b,a) flip2 (x,y) = (y,x)
43
flip2 :: (a,b) -> (b,a) flip2 (x,y) = (y,x)
43
flip2 (x,y) = (y,x)
19
false
true
0
8
8
48
26
22
null
null
snoyberg/ghc
compiler/vectorise/Vectorise/Utils/PADict.hs
bsd-3-clause
paDictOfType :: Type -> VM CoreExpr paDictOfType ty = paDictOfTyApp ty_fn ty_args where (ty_fn, ty_args) = splitAppTys ty paDictOfTyApp :: Type -> [Type] -> VM CoreExpr paDictOfTyApp ty_fn ty_args | Just ty_fn' <- coreView ty_fn = paDictOfTyApp ty_fn' ty_args -- for type variables,...
1,741
paDictOfType :: Type -> VM CoreExpr paDictOfType ty = paDictOfTyApp ty_fn ty_args where (ty_fn, ty_args) = splitAppTys ty paDictOfTyApp :: Type -> [Type] -> VM CoreExpr paDictOfTyApp ty_fn ty_args | Just ty_fn' <- coreView ty_fn = paDictOfTyApp ty_fn' ty_args -- for type variables,...
1,741
paDictOfType ty = paDictOfTyApp ty_fn ty_args where (ty_fn, ty_args) = splitAppTys ty paDictOfTyApp :: Type -> [Type] -> VM CoreExpr paDictOfTyApp ty_fn ty_args | Just ty_fn' <- coreView ty_fn = paDictOfTyApp ty_fn' ty_args -- for type variables, look up the dfun and apply to the P...
1,705
false
true
0
13
548
405
202
203
null
null
spacekitteh/compdata
src/Data/Comp/Derive/Ordering.hs
bsd-3-clause
compList :: [Ordering] -> Ordering compList = fromMaybe EQ . find (/= EQ)
73
compList :: [Ordering] -> Ordering compList = fromMaybe EQ . find (/= EQ)
73
compList = fromMaybe EQ . find (/= EQ)
38
false
true
0
7
12
32
17
15
null
null
spinda/liquidhaskell
src/Language/Haskell/Liquid/Desugar710/DsArrows.hs
bsd-3-clause
-- D, xs |- e :: Bool -- D; xs1 |-a c1 : stk --> t -- D; xs2 |-a c2 : stk --> t -- ---------------------------------------- -- D; xs |-a if e then c1 else c2 : stk --> t -- -- ---> premap (\ ((xs),stk) -> -- if e then Left ((xs1),stk) else Right ((xs2),stk)) -- (c1...
2,999
dsCmd ids local_vars stack_ty res_ty (HsCmdIf mb_fun cond then_cmd else_cmd) env_ids = do core_cond <- dsLExpr cond (core_then, fvs_then, then_ids) <- dsfixCmd ids local_vars stack_ty res_ty then_cmd (core_else, fvs_else, else_ids) <- dsfixCmd ids local_vars stack_ty res_ty else_cmd stack_id <...
2,669
dsCmd ids local_vars stack_ty res_ty (HsCmdIf mb_fun cond then_cmd else_cmd) env_ids = do core_cond <- dsLExpr cond (core_then, fvs_then, then_ids) <- dsfixCmd ids local_vars stack_ty res_ty then_cmd (core_else, fvs_else, else_ids) <- dsfixCmd ids local_vars stack_ty res_ty else_cmd stack_id <...
2,669
true
false
0
15
800
450
225
225
null
null
mreid/papersite
src/exec/scrape.hs
mit
isAbstract = isLinkType "abs"
29
isAbstract = isLinkType "abs"
29
isAbstract = isLinkType "abs"
29
false
false
0
5
3
9
4
5
null
null
michaelficarra/purescript
src/Language/PureScript/TypeChecker/Unify.hs
mit
solveType :: (Functor m, Applicative m, MonadError MultipleErrors m, MonadState CheckState m) => Int -> Type -> m () solveType u t = do occursCheck u t modify $ \cs -> cs { checkSubstitution = (checkSubstitution cs) { substType = M.insert ...
468
solveType :: (Functor m, Applicative m, MonadError MultipleErrors m, MonadState CheckState m) => Int -> Type -> m () solveType u t = do occursCheck u t modify $ \cs -> cs { checkSubstitution = (checkSubstitution cs) { substType = M.insert ...
468
solveType u t = do occursCheck u t modify $ \cs -> cs { checkSubstitution = (checkSubstitution cs) { substType = M.insert u t $ substType $ checkSubstitution cs } } -- |...
351
false
true
0
17
208
126
62
64
null
null
timbod7/veditor
demo/Examples/Example7.hs
bsd-3-clause
test = testC (mkVE :: VE ConstE MaybeVariants)
46
test = testC (mkVE :: VE ConstE MaybeVariants)
46
test = testC (mkVE :: VE ConstE MaybeVariants)
46
false
false
0
7
7
20
10
10
null
null
k-bx/stackage
Stackage/Config.hs
mit
add :: String -> String -> Writer PackageMap () add maintainer package = addRange maintainer package "-any"
107
add :: String -> String -> Writer PackageMap () add maintainer package = addRange maintainer package "-any"
107
add maintainer package = addRange maintainer package "-any"
59
false
true
0
8
16
42
19
23
null
null
bergey/plots
src/Plots/API.hs
bsd-3-clause
------------------------------------------------------------------------ -- Diagram Plot ------------------------------------------------------------------------ diagramPlot :: (v ~ BaseSpace c, Renderable (Path V2 n) b, MonadState (Axis b c n) m, Typeable b, Typeable v, Metric v, ...
395
diagramPlot :: (v ~ BaseSpace c, Renderable (Path V2 n) b, MonadState (Axis b c n) m, Typeable b, Typeable v, Metric v, TypeableFloat n) => QDiagram b v n Any -> m () diagramPlot = addPlotable
232
diagramPlot = addPlotable
25
true
true
0
8
82
108
54
54
null
null
kmate/HaRe
old/testing/introPattern/EitherIn1_TokOut.hs
bsd-3-clause
g x@(b_1 : b_2) = (head x) + (tail (head x))
44
g x@(b_1 : b_2) = (head x) + (tail (head x))
44
g x@(b_1 : b_2) = (head x) + (tail (head x))
44
false
false
1
10
10
47
21
26
null
null
twittner/zeromq-haskell
src/System/ZMQ4.hs
mit
-- | Restrict the outgoing and incoming socket buffers to a single message. setConflate :: Conflatable a => Bool -> Socket a -> IO () setConflate x s = setIntOpt s B.conflate (bool2cint x)
188
setConflate :: Conflatable a => Bool -> Socket a -> IO () setConflate x s = setIntOpt s B.conflate (bool2cint x)
112
setConflate x s = setIntOpt s B.conflate (bool2cint x)
54
true
true
0
10
33
59
27
32
null
null
veskoy/functional-programming-fmi
Homework4/03-is-sum-reachable/solution.hs
gpl-3.0
isSumReachable :: Graph -> Vertex -> Int -> Bool isSumReachable graph v n = (helper graph (findVertexEdges graph v) v n False) where helper :: Graph -> [Edge] -> Vertex -> Int -> Bool -> Bool helper _ [] _ _ _ = False helper graph edges currentSum desiredSum nonTrivial | nonTrivial && currentSum == ...
510
isSumReachable :: Graph -> Vertex -> Int -> Bool isSumReachable graph v n = (helper graph (findVertexEdges graph v) v n False) where helper :: Graph -> [Edge] -> Vertex -> Int -> Bool -> Bool helper _ [] _ _ _ = False helper graph edges currentSum desiredSum nonTrivial | nonTrivial && currentSum == ...
510
isSumReachable graph v n = (helper graph (findVertexEdges graph v) v n False) where helper :: Graph -> [Edge] -> Vertex -> Int -> Bool -> Bool helper _ [] _ _ _ = False helper graph edges currentSum desiredSum nonTrivial | nonTrivial && currentSum == desiredSum = True | otherwise = not (null (...
461
false
true
0
20
110
226
114
112
null
null