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
frontrowed/stratosphere
library-gen/Stratosphere/ResourceProperties/KinesisAnalyticsApplicationRecordColumn.hs
mit
kinesisAnalyticsApplicationRecordColumn :: Val Text -- ^ 'kaarcName' -> Val Text -- ^ 'kaarcSqlType' -> KinesisAnalyticsApplicationRecordColumn kinesisAnalyticsApplicationRecordColumn namearg sqlTypearg = KinesisAnalyticsApplicationRecordColumn { _kinesisAnalyticsApplicationRecordColumnMapping = Nothing , _...
442
kinesisAnalyticsApplicationRecordColumn :: Val Text -- ^ 'kaarcName' -> Val Text -- ^ 'kaarcSqlType' -> KinesisAnalyticsApplicationRecordColumn kinesisAnalyticsApplicationRecordColumn namearg sqlTypearg = KinesisAnalyticsApplicationRecordColumn { _kinesisAnalyticsApplicationRecordColumnMapping = Nothing , _...
442
kinesisAnalyticsApplicationRecordColumn namearg sqlTypearg = KinesisAnalyticsApplicationRecordColumn { _kinesisAnalyticsApplicationRecordColumnMapping = Nothing , _kinesisAnalyticsApplicationRecordColumnName = namearg , _kinesisAnalyticsApplicationRecordColumnSqlType = sqlTypearg }
292
false
true
0
8
48
61
31
30
null
null
msakai/icfpc2013
test/TestSExp.hs
bsd-2-clause
case_test1 = do parseSExp "(lambda (x) (fold x 0 (lambda (y z) (or y z))))" @?= Just expected where expected = SApply [ SAtom "lambda" , SApply [SAtom "x"] , SApply [ SAtom "fold" , SAtom "x" , SAtom "0" , SApply ...
636
case_test1 = do parseSExp "(lambda (x) (fold x 0 (lambda (y z) (or y z))))" @?= Just expected where expected = SApply [ SAtom "lambda" , SApply [SAtom "x"] , SApply [ SAtom "fold" , SAtom "x" , SAtom "0" , SApply ...
636
case_test1 = do parseSExp "(lambda (x) (fold x 0 (lambda (y z) (or y z))))" @?= Just expected where expected = SApply [ SAtom "lambda" , SApply [SAtom "x"] , SApply [ SAtom "fold" , SAtom "x" , SAtom "0" , SApply ...
636
false
false
0
13
301
128
63
65
null
null
anton-dessiatov/stack
src/Stack/Coverage.hs
bsd-3-clause
generateHpcReportForTargets :: HasEnvConfig env => HpcReportOpts -> RIO env () generateHpcReportForTargets opts = do let (tixFiles, targetNames) = partition (".tix" `T.isSuffixOf`) (hroptsInputs opts) targetTixFiles <- -- When there aren't any package component arguments, an...
3,353
generateHpcReportForTargets :: HasEnvConfig env => HpcReportOpts -> RIO env () generateHpcReportForTargets opts = do let (tixFiles, targetNames) = partition (".tix" `T.isSuffixOf`) (hroptsInputs opts) targetTixFiles <- -- When there aren't any package component arguments, an...
3,353
generateHpcReportForTargets opts = do let (tixFiles, targetNames) = partition (".tix" `T.isSuffixOf`) (hroptsInputs opts) targetTixFiles <- -- When there aren't any package component arguments, and --all -- isn't passed, default to not considering any targets. if not (hroptsAll opts) ...
3,246
false
true
0
30
1,406
730
348
382
null
null
qpliu/esolang
blo/hs/TestLLVMCodeGen.hs
gpl-3.0
testBreak2 :: Assertion testBreak2 = testCodeGen "testBreak2" "func TestBreak2(){for{for{break}}}" (prologue ++ "define void @_TestBreak2() {" ++ " l0:" ++ " br label %l1" ++ " l1:" ++ " br label %l2" ++ " l2:" ++ " br label...
346
testBreak2 :: Assertion testBreak2 = testCodeGen "testBreak2" "func TestBreak2(){for{for{break}}}" (prologue ++ "define void @_TestBreak2() {" ++ " l0:" ++ " br label %l1" ++ " l1:" ++ " br label %l2" ++ " l2:" ++ " br label...
346
testBreak2 = testCodeGen "testBreak2" "func TestBreak2(){for{for{break}}}" (prologue ++ "define void @_TestBreak2() {" ++ " l0:" ++ " br label %l1" ++ " l1:" ++ " br label %l2" ++ " l2:" ++ " br label %l1" ++ " }...
322
false
true
0
14
149
53
27
26
null
null
ivanperez-keera/Binpack
Data/BinPack/Internals.hs
bsd-3-clause
-- | Get the items in a bin. items :: Bin a b -> [b] items = snd
64
items :: Bin a b -> [b] items = snd
35
items = snd
11
true
true
0
6
17
24
13
11
null
null
expede/flower
src/Control/Flower/Compose.hs
mit
(.>) :: (a -> b) -> (b -> c) -> a -> c a .> b = b . a
54
(.>) :: (a -> b) -> (b -> c) -> a -> c a .> b = b . a
54
a .> b = b . a
15
false
true
0
10
20
50
26
24
null
null
CIFASIS/megadeth
Megadeth/Prim.hs
bsd-3-clause
isVarT (VarT _) = True
22
isVarT (VarT _) = True
22
isVarT (VarT _) = True
22
false
false
0
7
4
15
7
8
null
null
fpco/cabal
Cabal/Distribution/ParseUtils.hs
bsd-3-clause
braces m a (Line n i t l:ss) = do lookahead <- layout (i+1) [] ss case lookahead of ([], _) -> braces m (Node (n,t,l) [] :a) ss (ts, ss') -> braces m (Node (n,t,l) ts :a) ss'
200
braces m a (Line n i t l:ss) = do lookahead <- layout (i+1) [] ss case lookahead of ([], _) -> braces m (Node (n,t,l) [] :a) ss (ts, ss') -> braces m (Node (n,t,l) ts :a) ss'
200
braces m a (Line n i t l:ss) = do lookahead <- layout (i+1) [] ss case lookahead of ([], _) -> braces m (Node (n,t,l) [] :a) ss (ts, ss') -> braces m (Node (n,t,l) ts :a) ss'
200
false
false
0
14
64
143
74
69
null
null
michaxm/haskell-hdfs-thrift-client
src-gen-thrift/Hadoopfs_Types.hs
bsd-3-clause
write_MalformedInputException :: (T.Protocol p, T.Transport t) => p t -> MalformedInputException -> P.IO () write_MalformedInputException oprot record = T.writeVal oprot $ from_MalformedInputException record
207
write_MalformedInputException :: (T.Protocol p, T.Transport t) => p t -> MalformedInputException -> P.IO () write_MalformedInputException oprot record = T.writeVal oprot $ from_MalformedInputException record
207
write_MalformedInputException oprot record = T.writeVal oprot $ from_MalformedInputException record
99
false
true
0
9
22
69
32
37
null
null
rueshyna/gogol
gogol-youtube-analytics/gen/Network/Google/Resource/YouTubeAnalytics/GroupItems/Delete.hs
mpl-2.0
-- | Creates a value of 'GroupItemsDelete' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'gidOnBehalfOfContentOwner' -- -- * 'gidId' groupItemsDelete :: Text -- ^ 'gidId' -> GroupItemsDelete groupItemsDelete pGidId_ = Gro...
406
groupItemsDelete :: Text -- ^ 'gidId' -> GroupItemsDelete groupItemsDelete pGidId_ = GroupItemsDelete' { _gidOnBehalfOfContentOwner = Nothing , _gidId = pGidId_ }
186
groupItemsDelete pGidId_ = GroupItemsDelete' { _gidOnBehalfOfContentOwner = Nothing , _gidId = pGidId_ }
120
true
true
0
7
82
49
28
21
null
null
CindyLinz/Haskell.js
trans/src/Desugar/Tuple.hs
mit
deTupleQualStmt (ThenTrans l exp) = ThenTrans (id l) (deTupleExp exp)
69
deTupleQualStmt (ThenTrans l exp) = ThenTrans (id l) (deTupleExp exp)
69
deTupleQualStmt (ThenTrans l exp) = ThenTrans (id l) (deTupleExp exp)
69
false
false
0
7
9
35
16
19
null
null
rjohnsondev/haskellshop
src/Admin/NewProduct.hs
bsd-2-clause
detailMove :: Bool -> Handler App App () detailMove down = do productId <- getFormInt "product-id" 0 let key = if down then "product-detail-move-down" else "product-detail-move-up" pdid <- getFormInt key 0 with db $ PD.moveProductDetail down productId pdid infoRedirect ...
412
detailMove :: Bool -> Handler App App () detailMove down = do productId <- getFormInt "product-id" 0 let key = if down then "product-detail-move-down" else "product-detail-move-up" pdid <- getFormInt key 0 with db $ PD.moveProductDetail down productId pdid infoRedirect ...
412
detailMove down = do productId <- getFormInt "product-id" 0 let key = if down then "product-detail-move-down" else "product-detail-move-up" pdid <- getFormInt key 0 with db $ PD.moveProductDetail down productId pdid infoRedirect (C8.pack (printf "/admin/new_product?pr...
371
false
true
0
11
108
111
51
60
null
null
JerryLeiDing/haskell-house-chores
Haskell-House-Chores.hs
gpl-3.0
parse ["-h"] = help >> exit
27
parse ["-h"] = help >> exit
27
parse ["-h"] = help >> exit
27
false
false
0
6
5
16
8
8
null
null
eallik/clint-DAV
Network/Protocol/HTTP/DAV.hs
gpl-3.0
-- this should only happen once withLockIfPossible :: (MonadIO m, MonadBase IO m) => Bool -> DAVT m a -> DAVT m a withLockIfPossible nocreate f = do getOptionsOnce o <- get when (supportsLocking o) (lockResource nocreate) res <- f when (supportsLocking o) unlockResource return res
306
withLockIfPossible :: (MonadIO m, MonadBase IO m) => Bool -> DAVT m a -> DAVT m a withLockIfPossible nocreate f = do getOptionsOnce o <- get when (supportsLocking o) (lockResource nocreate) res <- f when (supportsLocking o) unlockResource return res
273
withLockIfPossible nocreate f = do getOptionsOnce o <- get when (supportsLocking o) (lockResource nocreate) res <- f when (supportsLocking o) unlockResource return res
191
true
true
0
9
70
109
50
59
null
null
kim/amazonka
amazonka-iam/gen/Network/AWS/IAM/UploadServerCertificate.hs
mpl-2.0
-- | The contents of the private key in PEM-encoded format. uscPrivateKey :: Lens' UploadServerCertificate Text uscPrivateKey = lens _uscPrivateKey (\s a -> s { _uscPrivateKey = a }) . _Sensitive
195
uscPrivateKey :: Lens' UploadServerCertificate Text uscPrivateKey = lens _uscPrivateKey (\s a -> s { _uscPrivateKey = a }) . _Sensitive
135
uscPrivateKey = lens _uscPrivateKey (\s a -> s { _uscPrivateKey = a }) . _Sensitive
83
true
true
0
10
30
44
24
20
null
null
tomtitchener/RealSimpleMusic
src/Music/RealSimpleMusic/Music/Data.hs
cc0-1.0
pitchClassToEnhIdx Df = 1
26
pitchClassToEnhIdx Df = 1
26
pitchClassToEnhIdx Df = 1
26
false
false
0
5
4
9
4
5
null
null
Peaker/GLFW-b
Graphics/UI/GLFW.hs
bsd-2-clause
getNextScheduled :: IO (Maybe (IO ())) getNextScheduled = atomicModifyIORef storedScheduledCallbacks $ \(ScheduledCallbacks oldForward oldBackward) -> case oldForward of [] -> let (mCb, newForward) = splitFirst (reverse oldBackward) in (ScheduledCallbacks newForward [], mCb) (cb:rest) -> ...
403
getNextScheduled :: IO (Maybe (IO ())) getNextScheduled = atomicModifyIORef storedScheduledCallbacks $ \(ScheduledCallbacks oldForward oldBackward) -> case oldForward of [] -> let (mCb, newForward) = splitFirst (reverse oldBackward) in (ScheduledCallbacks newForward [], mCb) (cb:rest) -> ...
403
getNextScheduled = atomicModifyIORef storedScheduledCallbacks $ \(ScheduledCallbacks oldForward oldBackward) -> case oldForward of [] -> let (mCb, newForward) = splitFirst (reverse oldBackward) in (ScheduledCallbacks newForward [], mCb) (cb:rest) -> -- Eat forward first (S...
364
false
true
0
16
89
128
65
63
null
null
Risto-Stevcev/haskell-church-encodings
Rank1Types/TestChurch.hs
bsd-3-clause
test_true_xor_true = TestCase $ assertEqual "true xor true == False"
68
test_true_xor_true = TestCase $ assertEqual "true xor true == False"
68
test_true_xor_true = TestCase $ assertEqual "true xor true == False"
68
false
false
0
6
9
13
6
7
null
null
spinda/liquidhaskell
src/Language/Haskell/Liquid/Desugar710/Check.hs
bsd-3-clause
-- For overlap and exhaustiveness checking -- purposes, a ~pat is like a wildcard tidy_pat (BangPat p) = tidy_pat (unLoc p)
184
tidy_pat (BangPat p) = tidy_pat (unLoc p)
46
tidy_pat (BangPat p) = tidy_pat (unLoc p)
46
true
false
0
7
81
26
13
13
null
null
mdunsmuir/routequery-service
src/Com/Google/Transit/Realtime/TripUpdate/StopTimeUpdate/ScheduleRelationship.hs
gpl-3.0
toMaybe'Enum :: Prelude'.Int -> P'.Maybe ScheduleRelationship toMaybe'Enum 0 = Prelude'.Just SCHEDULED
102
toMaybe'Enum :: Prelude'.Int -> P'.Maybe ScheduleRelationship toMaybe'Enum 0 = Prelude'.Just SCHEDULED
102
toMaybe'Enum 0 = Prelude'.Just SCHEDULED
40
false
true
0
8
10
34
15
19
null
null
flipstone/orville
orville-postgresql/test/OrderByTest.hs
mit
orderNamedAlice :: Order orderNamedAlice = Order { orderId = OrderId 2 , customerFkId = CustomerId 2 , orderName = OrderName "Alice" }
152
orderNamedAlice :: Order orderNamedAlice = Order { orderId = OrderId 2 , customerFkId = CustomerId 2 , orderName = OrderName "Alice" }
152
orderNamedAlice = Order { orderId = OrderId 2 , customerFkId = CustomerId 2 , orderName = OrderName "Alice" }
127
false
true
0
8
39
44
23
21
null
null
alekar/hugs
packages/base/Data/IntSet.hs
bsd-3-clause
showSet (x:xs) = showChar '{' . shows x . showTail xs where showTail [] = showChar '}' showTail (x:xs) = showChar ',' . shows x . showTail xs {-------------------------------------------------------------------- Read --------------------------------------------------------------------}
306
showSet (x:xs) = showChar '{' . shows x . showTail xs where showTail [] = showChar '}' showTail (x:xs) = showChar ',' . shows x . showTail xs {-------------------------------------------------------------------- Read --------------------------------------------------------------------}
306
showSet (x:xs) = showChar '{' . shows x . showTail xs where showTail [] = showChar '}' showTail (x:xs) = showChar ',' . shows x . showTail xs {-------------------------------------------------------------------- Read --------------------------------------------------------------------}
306
false
false
5
6
50
91
38
53
null
null
ghc-android/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
enumClassKey = mkPreludeClassUnique 2
48
enumClassKey = mkPreludeClassUnique 2
48
enumClassKey = mkPreludeClassUnique 2
48
false
false
0
5
14
9
4
5
null
null
langthom/stats
Parsing.hs
bsd-3-clause
------------------- [FILE PARSING SECTION] ---------------- -- Notes: -- -- Here a CSV file has lines, that are separated by eol. -- Each line has cells, that are comma separated. -- -- This means for the structure of the passed file, that -- it has to have at least one newline at the very end. -- If not, the parser w...
823
parseFile :: String -> Either ParseError [[String]] parseFile file = parse csvFile "(unknown)" file
99
parseFile file = parse csvFile "(unknown)" file
47
true
true
0
8
204
55
37
18
null
null
camspiers/Zendo
src/Zendo/Language.hs
mit
showExpr expr = show expr
25
showExpr expr = show expr
25
showExpr expr = show expr
25
false
false
0
5
4
12
5
7
null
null
liskin/strive
library/Strive/Internal/TH.hs
mit
getFieldName :: TH.VarStrictType -> String getFieldName (var, _, _) = (lensName . show) var
91
getFieldName :: TH.VarStrictType -> String getFieldName (var, _, _) = (lensName . show) var
91
getFieldName (var, _, _) = (lensName . show) var
48
false
true
0
7
13
39
21
18
null
null
ntc2/cabal-hsc2hs-bug
src/HS.hs
bsd-3-clause
hsTest = True
13
hsTest = True
13
hsTest = True
13
false
false
1
5
2
10
3
7
null
null
vaibhavsagar/duffer.hs
duffer/src/Duffer/Unified.hs
bsd-3-clause
readLooseRef :: FilePath -> WithRepo (Maybe Ref) readLooseRef refPath = hasLooseRef refPath >>= bool (return Nothing) (do content <- liftIO . readFile =<< asks (</> refPath) case parseOnly parseSymRef content of Right newPath -> readRef newPath Left _ -> return $ J...
339
readLooseRef :: FilePath -> WithRepo (Maybe Ref) readLooseRef refPath = hasLooseRef refPath >>= bool (return Nothing) (do content <- liftIO . readFile =<< asks (</> refPath) case parseOnly parseSymRef content of Right newPath -> readRef newPath Left _ -> return $ J...
339
readLooseRef refPath = hasLooseRef refPath >>= bool (return Nothing) (do content <- liftIO . readFile =<< asks (</> refPath) case parseOnly parseSymRef content of Right newPath -> readRef newPath Left _ -> return $ Just (init content))
290
false
true
0
14
98
117
54
63
null
null
bacchanalia/KitchenSink
KitchenSink/Qualified.hs
gpl-3.0
-- |'TL.unlines' tl_unlines = TL.unlines
40
tl_unlines = TL.unlines
23
tl_unlines = TL.unlines
23
true
false
0
5
4
9
5
4
null
null
ClathomasPrime/ImpCore
Impcore/src/OpSem.hs
bsd-3-clause
evaluateF (ReferenceF x) env@(Env glob func param) | Just v <- Map.lookup x param = return (v, env) | Just v <- Map.lookup x glob = return (v, env) | otherwise = M.throwError $ ErrorString "undefined var is referenced"
224
evaluateF (ReferenceF x) env@(Env glob func param) | Just v <- Map.lookup x param = return (v, env) | Just v <- Map.lookup x glob = return (v, env) | otherwise = M.throwError $ ErrorString "undefined var is referenced"
224
evaluateF (ReferenceF x) env@(Env glob func param) | Just v <- Map.lookup x param = return (v, env) | Just v <- Map.lookup x glob = return (v, env) | otherwise = M.throwError $ ErrorString "undefined var is referenced"
224
false
false
1
10
44
109
52
57
null
null
MoixaEnergy/blaze-react
src/Text/Blaze/Svg/Attributes.hs
mit
fill :: AttributeValue -> Attribute ev fill = attribute "fill" " fill=\""
73
fill :: AttributeValue -> Attribute ev fill = attribute "fill" " fill=\""
73
fill = attribute "fill" " fill=\""
34
false
true
0
7
11
28
12
16
null
null
prowdsponsor/country-codes
src/Data/CountryCodes/ISO31661.hs
bsd-3-clause
fromMText "QA" = Just QA
24
fromMText "QA" = Just QA
24
fromMText "QA" = Just QA
24
false
false
0
5
4
12
5
7
null
null
jmacmahon/syllabify
Linguisticks.hs
agpl-3.0
parsed_real = C.readParsedWords "data/real_words_1_parsed.csv"
62
parsed_real = C.readParsedWords "data/real_words_1_parsed.csv"
62
parsed_real = C.readParsedWords "data/real_words_1_parsed.csv"
62
false
false
0
6
3
11
5
6
null
null
mattias-lundell/timber-llvm
src/Syntax2Core.hs
bsd-3-clause
s2cEi env (ECase e alts) = do e <- s2cEc env TWild e alts <- mapM (s2cAE env TWild) alts return (TWild, Core.ECase e (alts++dflt))
211
s2cEi env (ECase e alts) = do e <- s2cEc env TWild e alts <- mapM (s2cAE env TWild) alts return (TWild, Core.ECase e (alts++dflt))
211
s2cEi env (ECase e alts) = do e <- s2cEc env TWild e alts <- mapM (s2cAE env TWild) alts return (TWild, Core.ECase e (alts++dflt))
211
false
false
0
11
105
79
37
42
null
null
NICTA/lets-lens
src/Lets/StoreLens.hs
bsd-3-clause
getS :: Store s a -> s getS (Store _ g) = g
49
getS :: Store s a -> s getS (Store _ g) = g
49
getS (Store _ g) = g
22
false
true
0
9
18
33
15
18
null
null
buckie/juno
src/Apps/Juno/ApiHandlers.hs
bsd-3-clause
ledgerQueryReqHandler :: BLC.ByteString -> Either BLC.ByteString [CommandEntry] ledgerQueryReqHandler bs = case JSON.decode bs of Just (LedgerQueryRequest (LedgerQueryBody (QueryJson acct tx sender receiver)) _) -> do let mByBoth = ByAcctName Both <$> acct let mSwiftId = BySwiftId <$> tx ...
693
ledgerQueryReqHandler :: BLC.ByteString -> Either BLC.ByteString [CommandEntry] ledgerQueryReqHandler bs = case JSON.decode bs of Just (LedgerQueryRequest (LedgerQueryBody (QueryJson acct tx sender receiver)) _) -> do let mByBoth = ByAcctName Both <$> acct let mSwiftId = BySwiftId <$> tx ...
693
ledgerQueryReqHandler bs = case JSON.decode bs of Just (LedgerQueryRequest (LedgerQueryBody (QueryJson acct tx sender receiver)) _) -> do let mByBoth = ByAcctName Both <$> acct let mSwiftId = BySwiftId <$> tx let mBySender = ByAcctName Sender <$> sender let mByReceiver = B...
613
false
true
0
15
163
206
98
108
null
null
hbrouwer/pdrt-sandbox
src/Data/PDRS/Binding.hs
apache-2.0
pdrsFreePRefs (PMerge p1 p2) gp = pdrsFreePRefs p1 gp `union` pdrsFreePRefs p2 gp
84
pdrsFreePRefs (PMerge p1 p2) gp = pdrsFreePRefs p1 gp `union` pdrsFreePRefs p2 gp
84
pdrsFreePRefs (PMerge p1 p2) gp = pdrsFreePRefs p1 gp `union` pdrsFreePRefs p2 gp
84
false
false
0
7
15
35
17
18
null
null
sdiehl/ghc
compiler/prelude/THNames.hs
bsd-3-clause
returnQName, bindQName, sequenceQName, newNameName, liftName, mkNameName, mkNameG_vName, mkNameG_dName, mkNameG_tcName, mkNameLName, mkNameSName, liftStringName, unTypeName, unTypeQName, unsafeTExpCoerceName, liftTypedName :: Name returnQName = thFun (fsLit "returnQ") returnQIdKey
298
returnQName, bindQName, sequenceQName, newNameName, liftName, mkNameName, mkNameG_vName, mkNameG_dName, mkNameG_tcName, mkNameLName, mkNameSName, liftStringName, unTypeName, unTypeQName, unsafeTExpCoerceName, liftTypedName :: Name returnQName = thFun (fsLit "returnQ") returnQIdKey
298
returnQName = thFun (fsLit "returnQ") returnQIdKey
55
false
true
0
7
40
52
41
11
null
null
osa1/sequent-core
src/Language/SequentCore/Syntax.hs
bsd-3-clause
setPairBinder (BindPKont _ pk) j = BindPKont j pk
50
setPairBinder (BindPKont _ pk) j = BindPKont j pk
50
setPairBinder (BindPKont _ pk) j = BindPKont j pk
50
false
false
1
6
9
24
11
13
null
null
d0kt0r0/estuary
client/src/Estuary/Help/Saborts.hs
gpl-3.0
exampleText :: Text -> Text exampleText "g" = ":> g"
53
exampleText :: Text -> Text exampleText "g" = ":> g"
52
exampleText "g" = ":> g"
24
false
true
0
5
10
18
9
9
null
null
jmitchell/Idris-dev
src/Idris/Core/TT.hs
bsd-3-clause
fmapMB f (Lam c t) = liftM (Lam c) (f t)
42
fmapMB f (Lam c t) = liftM (Lam c) (f t)
42
fmapMB f (Lam c t) = liftM (Lam c) (f t)
42
false
false
0
7
12
38
17
21
null
null
phadej/reflex
src/Reflex/Spider/Internal.hs
bsd-3-clause
putCurrentHeight :: Int -> EventM () putCurrentHeight h = EventM $ do heightRef <- asks eventEnvCurrentHeight liftIO $ writeIORef heightRef h
145
putCurrentHeight :: Int -> EventM () putCurrentHeight h = EventM $ do heightRef <- asks eventEnvCurrentHeight liftIO $ writeIORef heightRef h
145
putCurrentHeight h = EventM $ do heightRef <- asks eventEnvCurrentHeight liftIO $ writeIORef heightRef h
108
false
true
2
9
24
55
23
32
null
null
bergmark/hlint
data/Default.hs
bsd-3-clause
error "Redundant evaluate" = evaluate x ==> return x where _ = isWHNF x -- MAYBE
81
error "Redundant evaluate" = evaluate x ==> return x where _ = isWHNF x -- MAYBE
81
error "Redundant evaluate" = evaluate x ==> return x where _ = isWHNF x -- MAYBE
81
false
false
2
5
16
32
13
19
null
null
PavelClaudiuStefan/FMI
An_3_Semestru_1/ProgramareDeclarativa/Laboratoare/Laborator8/lab8.hs
cc0-1.0
maybeToList (Just a) = [a]
26
maybeToList (Just a) = [a]
26
maybeToList (Just a) = [a]
26
false
false
0
7
4
18
9
9
null
null
sdiehl/ghc
compiler/main/Packages.hs
bsd-3-clause
validateDatabase :: DynFlags -> InstalledPackageIndex -> (InstalledPackageIndex, UnusablePackages, [SCC UnitInfo]) validateDatabase dflags pkg_map1 = (pkg_map5, unusable, sccs) where ignore_flags = reverse (ignorePackageFlags dflags) -- Compute the reverse dependency index index = re...
2,367
validateDatabase :: DynFlags -> InstalledPackageIndex -> (InstalledPackageIndex, UnusablePackages, [SCC UnitInfo]) validateDatabase dflags pkg_map1 = (pkg_map5, unusable, sccs) where ignore_flags = reverse (ignorePackageFlags dflags) -- Compute the reverse dependency index index = re...
2,367
validateDatabase dflags pkg_map1 = (pkg_map5, unusable, sccs) where ignore_flags = reverse (ignorePackageFlags dflags) -- Compute the reverse dependency index index = reverseDeps pkg_map1 -- Helper function mk_unusable mk_err dep_matcher m uids = Map.fromList [ (unitId pkg, (pkg, mk_er...
2,235
false
true
17
15
575
491
263
228
null
null
ennocramer/hindent
src/HIndent/Pretty.hs
bsd-3-clause
exp (RecConstr _ n fs) = depend (do pretty n space) (braces (prefixedLined "," (map (indentedBlock . pretty) fs)))
170
exp (RecConstr _ n fs) = depend (do pretty n space) (braces (prefixedLined "," (map (indentedBlock . pretty) fs)))
170
exp (RecConstr _ n fs) = depend (do pretty n space) (braces (prefixedLined "," (map (indentedBlock . pretty) fs)))
170
false
false
0
13
74
66
31
35
null
null
christiaanb/ghc
compiler/hsSyn/HsExpr.hs
bsd-3-clause
pprHsBracket (TypBr t) = thBrackets (char 't') (ppr t)
56
pprHsBracket (TypBr t) = thBrackets (char 't') (ppr t)
56
pprHsBracket (TypBr t) = thBrackets (char 't') (ppr t)
56
false
false
0
7
10
33
15
18
null
null
snoyberg/ghc
compiler/codeGen/StgCmmClosure.hs
bsd-3-clause
-- NB: typePrimRep fails on unboxed tuples, -- but by StgCmm no Ids have unboxed tuple type addIdReps :: [NonVoid Id] -> [NonVoid (PrimRep, Id)] addIdReps = map (\id -> let id' = fromNonVoid id in NonVoid (idPrimRep id', id'))
260
addIdReps :: [NonVoid Id] -> [NonVoid (PrimRep, Id)] addIdReps = map (\id -> let id' = fromNonVoid id in NonVoid (idPrimRep id', id'))
159
addIdReps = map (\id -> let id' = fromNonVoid id in NonVoid (idPrimRep id', id'))
106
true
true
0
12
73
72
38
34
null
null
stefanocerruti/haskell-primer-alpha
src/Playground18.hs
bsd-3-clause
organToContainer :: Organ -> Container organToContainer Brain = Vat Brain
73
organToContainer :: Organ -> Container organToContainer Brain = Vat Brain
73
organToContainer Brain = Vat Brain
34
false
true
0
5
9
21
10
11
null
null
phischu/fragnix
tests/packages/scotty/Data.IntMap.Internal.hs
bsd-3-clause
-- | Filter the entries whose keys are missing from the other map -- using some 'Applicative' action. -- -- > filterAMissing f = Merge.Lazy.traverseMaybeMissing $ -- > \k x -> (\b -> guard b *> Just x) <$> f k x -- -- but this should be a little faster. filterAMissing :: Applicative f => (Key -> x -> f Bool) -> Whe...
474
filterAMissing :: Applicative f => (Key -> x -> f Bool) -> WhenMissing f x x filterAMissing f = WhenMissing { missingSubtree = \m -> filterWithKeyA f m , missingKey = \k x -> bool Nothing (Just x) <$> f k x }
218
filterAMissing f = WhenMissing { missingSubtree = \m -> filterWithKeyA f m , missingKey = \k x -> bool Nothing (Just x) <$> f k x }
139
true
true
0
12
105
111
58
53
null
null
yiannist/ganeti
src/Ganeti/HTools/Cluster.hs
bsd-2-clause
involvedNodes :: Instance.List -- ^ Instance list, used for retrieving -- the instance from its index; note -- that this /must/ be the original -- instance list, so that we can -- retrieve the old...
724
involvedNodes :: Instance.List -- ^ Instance list, used for retrieving -- the instance from its index; note -- that this /must/ be the original -- instance list, so that we can -- retrieve the old...
680
involvedNodes il plc = let (i, np, ns, _, _) = plc inst = Container.find i il in nub . filter (>= 0) $ [np, ns] ++ Instance.allNodes inst
147
true
true
0
11
326
107
61
46
null
null
phischu/fragnix
tests/packages/scotty/Data.ByteString.Search.Internal.Utils.hs
bsd-3-clause
keep :: Int -> [S.ByteString] -> ([S.ByteString],[S.ByteString]) keep !deep xs | deep < 1 = ([],xs)
106
keep :: Int -> [S.ByteString] -> ([S.ByteString],[S.ByteString]) keep !deep xs | deep < 1 = ([],xs)
106
keep !deep xs | deep < 1 = ([],xs)
41
false
true
0
12
22
72
36
36
null
null
runeksvendsen/rbpcp-handler
test/Spec.hs
bsd-3-clause
btcNetwork :: DisabledNet btcNetwork = DisabledNet
50
btcNetwork :: DisabledNet btcNetwork = DisabledNet
50
btcNetwork = DisabledNet
24
false
true
0
4
5
11
6
5
null
null
tolysz/prepare-ghcjs
spec-lts8/cabal/Cabal/tests/PackageTests/PackageTester.hs
bsd-3-clause
-- | Replace line breaks with spaces, correctly handling "\r\n". concatOutput :: String -> String concatOutput = unwords . lines . filter ((/=) '\r')
149
concatOutput :: String -> String concatOutput = unwords . lines . filter ((/=) '\r')
84
concatOutput = unwords . lines . filter ((/=) '\r')
51
true
true
0
8
23
35
19
16
null
null
elben/typing-haskell-in-haskell
TIMain.hs
bsd-3-clause
tiExpr ce as (Let bg e) = do (ps, as') <- tiBindGroup ce as bg (qs, t) <- tiExpr ce (as' ++ as) e return (ps ++ qs, t)
198
tiExpr ce as (Let bg e) = do (ps, as') <- tiBindGroup ce as bg (qs, t) <- tiExpr ce (as' ++ as) e return (ps ++ qs, t)
198
tiExpr ce as (Let bg e) = do (ps, as') <- tiBindGroup ce as bg (qs, t) <- tiExpr ce (as' ++ as) e return (ps ++ qs, t)
198
false
false
0
10
108
87
42
45
null
null
GaloisInc/halvm-ghc
compiler/basicTypes/Literal.hs
bsd-3-clause
litIsTrivial _ = True
36
litIsTrivial _ = True
36
litIsTrivial _ = True
36
false
false
0
4
18
10
4
6
null
null
jutaro/rdf4h
src/Data/RDF/Graph/MapSP.hs
bsd-3-clause
addPrefixMappings' :: MapSP -> PrefixMappings -> Bool -> MapSP addPrefixMappings' (MapSP (tsMap, baseURL, pms)) pms' replace = let merge = if replace then flip mergePrefixMappings else mergePrefixMappings in MapSP (tsMap, baseURL, merge pms pms')
251
addPrefixMappings' :: MapSP -> PrefixMappings -> Bool -> MapSP addPrefixMappings' (MapSP (tsMap, baseURL, pms)) pms' replace = let merge = if replace then flip mergePrefixMappings else mergePrefixMappings in MapSP (tsMap, baseURL, merge pms pms')
251
addPrefixMappings' (MapSP (tsMap, baseURL, pms)) pms' replace = let merge = if replace then flip mergePrefixMappings else mergePrefixMappings in MapSP (tsMap, baseURL, merge pms pms')
188
false
true
0
10
38
84
44
40
null
null
gcampax/ghc
compiler/hsSyn/HsExpr.hs
bsd-3-clause
isQuietHsCmd :: HsCmd id -> Bool -- Parentheses do display something, but it gives little info and -- if we go deeper when we go inside them then we get ugly things -- like (...) isQuietHsCmd (HsCmdPar _) = True
211
isQuietHsCmd :: HsCmd id -> Bool isQuietHsCmd (HsCmdPar _) = True
65
isQuietHsCmd (HsCmdPar _) = True
32
true
true
0
7
39
30
16
14
null
null
GaloisInc/delicious
Network/Delicious/RSS.hs
bsd-3-clause
getTagPopularBookmarks :: Tag -> DM [Post] getTagPopularBookmarks tg = performCall "getTagPopularBookmarks" eff_url where eff_url = popular_url ++ '/':tg
156
getTagPopularBookmarks :: Tag -> DM [Post] getTagPopularBookmarks tg = performCall "getTagPopularBookmarks" eff_url where eff_url = popular_url ++ '/':tg
156
getTagPopularBookmarks tg = performCall "getTagPopularBookmarks" eff_url where eff_url = popular_url ++ '/':tg
113
false
true
0
7
20
45
22
23
null
null
haskoin/haskoin
src/Haskoin/Util/Arbitrary/Keys.hs
unlicense
-- | Arbitrary BIP-32 path index. Can be hardened or not. arbitraryBip32PathIndex :: Gen Bip32PathIndex arbitraryBip32PathIndex = oneof [ Bip32SoftIndex <$> genIndex , Bip32HardIndex <$> genIndex ]
221
arbitraryBip32PathIndex :: Gen Bip32PathIndex arbitraryBip32PathIndex = oneof [ Bip32SoftIndex <$> genIndex , Bip32HardIndex <$> genIndex ]
163
arbitraryBip32PathIndex = oneof [ Bip32SoftIndex <$> genIndex , Bip32HardIndex <$> genIndex ]
117
true
true
0
7
50
32
17
15
null
null
cnr/stockfighter-hs
src/Stockfighter/Client/Internal.hs
mit
---- POST requests postBase :: (MonadAPI m, W.Postable p, FromJSON r) => [String] -> p -> m r postBase path p = do (ApiKey apiKey) <- ask parseResponse =<< liftIO (W.postWith (mkOpts apiKey) (intercalate "/" path) p)
225
postBase :: (MonadAPI m, W.Postable p, FromJSON r) => [String] -> p -> m r postBase path p = do (ApiKey apiKey) <- ask parseResponse =<< liftIO (W.postWith (mkOpts apiKey) (intercalate "/" path) p)
205
postBase path p = do (ApiKey apiKey) <- ask parseResponse =<< liftIO (W.postWith (mkOpts apiKey) (intercalate "/" path) p)
130
true
true
0
13
45
108
52
56
null
null
rvion/lamdu
test/InferCombinators.hs
gpl-3.0
rTyp :: Lens' Resumptions Type rTyp f ipl = mk <$> f (_rTyp ipl) where mk x = ipl { _rTyp = x }
107
rTyp :: Lens' Resumptions Type rTyp f ipl = mk <$> f (_rTyp ipl) where mk x = ipl { _rTyp = x }
107
rTyp f ipl = mk <$> f (_rTyp ipl) where mk x = ipl { _rTyp = x }
76
false
true
3
7
35
65
28
37
null
null
wouwouwou/2017_module_8
src/haskell/PP-project-2016/Checker.hs
apache-2.0
checker2 (ASTIf expr thenAst Nothing _) check | (getExprType exprCheck) == BoolType = ASTIf exprCheck thenCheck Nothing check | otherwise = error $ "Condition in if statement should be of type: bool, but isnt, in: " ++ (show expr) where exprCheck = checker2 expr check thenCheck = ...
383
checker2 (ASTIf expr thenAst Nothing _) check | (getExprType exprCheck) == BoolType = ASTIf exprCheck thenCheck Nothing check | otherwise = error $ "Condition in if statement should be of type: bool, but isnt, in: " ++ (show expr) where exprCheck = checker2 expr check thenCheck = ...
383
checker2 (ASTIf expr thenAst Nothing _) check | (getExprType exprCheck) == BoolType = ASTIf exprCheck thenCheck Nothing check | otherwise = error $ "Condition in if statement should be of type: bool, but isnt, in: " ++ (show expr) where exprCheck = checker2 expr check thenCheck = ...
383
false
false
1
10
95
98
47
51
null
null
michaelschade/hs-stripe
src/Web/Stripe/Customer.hs
bsd-3-clause
-- | Retrieves a list of all 'Customer's. The query can optionally be refined -- to a specific: -- -- * number of charges, via 'Count' and -- * page of results, via 'Offset'. getCustomers :: MonadIO m => Maybe Count -> Maybe Offset -> StripeT m [Customer] getCustomers mc mo = liftM snd $ queryData ((custome...
652
getCustomers :: MonadIO m => Maybe Count -> Maybe Offset -> StripeT m [Customer] getCustomers mc mo = liftM snd $ queryData ((customerRq []) { sQString = qstring }) where qstring = optionalArgs [ ("count", show . unCount <$> mc) , ("offset", show . unOffset <$> mo) ...
465
getCustomers mc mo = liftM snd $ queryData ((customerRq []) { sQString = qstring }) where qstring = optionalArgs [ ("count", show . unCount <$> mc) , ("offset", show . unOffset <$> mo) ] -- | Deletes a 'Customer' if it exists. If it does no...
384
true
true
1
11
195
133
69
64
null
null
choener/BiobaseFasta
_old/Pipes.hs
gpl-3.0
-- | This function collapses header objects, sets the header in each window, -- and sets window sizes if requested. -- -- This traverses the collected elements twice. --retracked ∷ Monad m ⇒ RetrackOptions → Producer TrackedFasta (Producer TrackedFasta m) x → Producer TrackedFasta m x retracked o p = next p >>= goHdr ...
3,700
retracked o p = next p >>= goHdr Seq.empty where goHdr (hs ∷ Seq TrackedFasta) = \case Left l → do unless (Seq.null hs) $ yield $ buildHeader hs return l Right (r,p') | TrackedHeader{} ← r → next p' >>= goHdr (hs Seq.|> clampHdr hs r) | otherwise → do let ...
3,413
retracked o p = next p >>= goHdr Seq.empty where goHdr (hs ∷ Seq TrackedFasta) = \case Left l → do unless (Seq.null hs) $ yield $ buildHeader hs return l Right (r,p') | TrackedHeader{} ← r → next p' >>= goHdr (hs Seq.|> clampHdr hs r) | otherwise → do let ...
3,413
true
false
77
16
1,457
760
415
345
null
null
spechub/Hets
Common/XPath.hs
gpl-2.0
isPathExpr :: Expr -> Bool isPathExpr e = case e of GenExpr True "|" args -> all isPathExpr args GenExpr False "id" [_] -> True PrimExpr Var _ -> True PathExpr m (Path _ s) -> isLegalPath s && maybe True isPathExpr m FilterExpr p _ -> isPathExpr p _ -> False -- | parse string
289
isPathExpr :: Expr -> Bool isPathExpr e = case e of GenExpr True "|" args -> all isPathExpr args GenExpr False "id" [_] -> True PrimExpr Var _ -> True PathExpr m (Path _ s) -> isLegalPath s && maybe True isPathExpr m FilterExpr p _ -> isPathExpr p _ -> False -- | parse string
289
isPathExpr e = case e of GenExpr True "|" args -> all isPathExpr args GenExpr False "id" [_] -> True PrimExpr Var _ -> True PathExpr m (Path _ s) -> isLegalPath s && maybe True isPathExpr m FilterExpr p _ -> isPathExpr p _ -> False -- | parse string
262
false
true
6
7
68
96
51
45
null
null
NCrashed/hjass
test-suites/Language/Jass/Parser/GrammarTest.hs
mit
parseTestStatement :: String -> Statement -> Assertion parseTestStatement = parseTest parseJassStatement
104
parseTestStatement :: String -> Statement -> Assertion parseTestStatement = parseTest parseJassStatement
104
parseTestStatement = parseTest parseJassStatement
49
false
true
0
6
10
22
11
11
null
null
jwiegley/hnix
tests/TestCommon.hs
bsd-3-clause
hnixEvalText :: Options -> Text -> IO (StdValue (StandardT (StdIdT IO))) hnixEvalText opts src = case parseNixText src of Failure err -> error $ "Parsing failed for expressien `" ++ unpack src ++ "`.\n" ++ show err Success expr -> runWithBasicEffects opts $ normalForm =<< nixEvalExp...
334
hnixEvalText :: Options -> Text -> IO (StdValue (StandardT (StdIdT IO))) hnixEvalText opts src = case parseNixText src of Failure err -> error $ "Parsing failed for expressien `" ++ unpack src ++ "`.\n" ++ show err Success expr -> runWithBasicEffects opts $ normalForm =<< nixEvalExp...
334
hnixEvalText opts src = case parseNixText src of Failure err -> error $ "Parsing failed for expressien `" ++ unpack src ++ "`.\n" ++ show err Success expr -> runWithBasicEffects opts $ normalForm =<< nixEvalExpr Nothing expr
261
false
true
0
13
84
108
50
58
null
null
tabemann/amphibian
src/Network/IRC/Client/Amphibian/IgnoreList.hs
bsd-3-clause
handleLoadIgnoreList :: IgnoreListData -> Response () -> IO IgnoreListData handleLoadIgnoreList ignoreList (Response response) = do amphibianDir <- getUserDataDir "amphibian" createDirectoryIfMissing True amphibianDir let filePath = amphibianDir </> "ignore" if not $ ignoreListLoaded ignoreList then do ...
2,055
handleLoadIgnoreList :: IgnoreListData -> Response () -> IO IgnoreListData handleLoadIgnoreList ignoreList (Response response) = do amphibianDir <- getUserDataDir "amphibian" createDirectoryIfMissing True amphibianDir let filePath = amphibianDir </> "ignore" if not $ ignoreListLoaded ignoreList then do ...
2,055
handleLoadIgnoreList ignoreList (Response response) = do amphibianDir <- getUserDataDir "amphibian" createDirectoryIfMissing True amphibianDir let filePath = amphibianDir </> "ignore" if not $ ignoreListLoaded ignoreList then do ignoreList <- loadIgnoreList' ignoreList filePath `ca...
1,980
false
true
1
21
801
535
260
275
null
null
kristoff3r/importify
HLint.hs
mit
warn = Data.Text.Lazy.toStrict ==> Universum.toText
51
warn = Data.Text.Lazy.toStrict ==> Universum.toText
51
warn = Data.Text.Lazy.toStrict ==> Universum.toText
51
false
false
0
6
4
16
9
7
null
null
dterei/Scraps
haskell/prettyGenerics/D3.hs
bsd-3-clause
printDoc (Union d1 d2) printer end = printDoc d1 printer (printDoc d2 printer end)
119
printDoc (Union d1 d2) printer end = printDoc d1 printer (printDoc d2 printer end)
119
printDoc (Union d1 d2) printer end = printDoc d1 printer (printDoc d2 printer end)
119
false
false
0
7
50
38
18
20
null
null
Cahu/krpc-hs
src/KRPCHS/SpaceCenter.hs
gpl-3.0
{- - A list of celestial bodies that are in orbit around this celestial body. -} getCelestialBodySatellites :: KRPCHS.SpaceCenter.CelestialBody -> RPCContext ([KRPCHS.SpaceCenter.CelestialBody]) getCelestialBodySatellites thisArg = do let r = makeRequest "SpaceCenter" "CelestialBody_get_Satellites" [makeArgument ...
379
getCelestialBodySatellites :: KRPCHS.SpaceCenter.CelestialBody -> RPCContext ([KRPCHS.SpaceCenter.CelestialBody]) getCelestialBodySatellites thisArg = do let r = makeRequest "SpaceCenter" "CelestialBody_get_Satellites" [makeArgument 0 thisArg] res <- sendRequest r processResponse res
296
getCelestialBodySatellites thisArg = do let r = makeRequest "SpaceCenter" "CelestialBody_get_Satellites" [makeArgument 0 thisArg] res <- sendRequest r processResponse res
182
true
true
0
13
54
78
37
41
null
null
FranklinChen/musicxml2
src/Data/Music/MusicXml/Simple.hs
bsd-3-clause
-- | -- Create a time signature. -- time :: Beat -> BeatType -> Music time a b = Music . single $ MusicAttributes $ Time $ DivTime a b
134
time :: Beat -> BeatType -> Music time a b = Music . single $ MusicAttributes $ Time $ DivTime a b
98
time a b = Music . single $ MusicAttributes $ Time $ DivTime a b
64
true
true
0
8
29
52
26
26
null
null
koengit/symbo
Main.hs
bsd-2-clause
zer = Cons "Zer" [] natT
25
zer = Cons "Zer" [] natT
25
zer = Cons "Zer" [] natT
25
false
false
1
6
6
20
7
13
null
null
stevejb71/xhaskell
space-age/example.hs
mit
ageOn :: Planet -> Seconds -> Years ageOn planet seconds = seconds / secondsPerYear planet
90
ageOn :: Planet -> Seconds -> Years ageOn planet seconds = seconds / secondsPerYear planet
90
ageOn planet seconds = seconds / secondsPerYear planet
54
false
true
0
6
14
31
15
16
null
null
jwiegley/ghc-release
libraries/Cabal/cabal-install/Distribution/Client/List.hs
gpl-3.0
-- |Show information about packages list :: Verbosity -> PackageDBStack -> [Repo] -> Compiler -> ProgramConfiguration -> ListFlags -> [String] -> IO () list verbosity packageDBs repos comp conf listFlags pats = do installedPkgIndex <- getInstalledPackages verbosity comp packageDB...
2,580
list :: Verbosity -> PackageDBStack -> [Repo] -> Compiler -> ProgramConfiguration -> ListFlags -> [String] -> IO () list verbosity packageDBs repos comp conf listFlags pats = do installedPkgIndex <- getInstalledPackages verbosity comp packageDBs conf sourcePkgDb <- getS...
2,544
list verbosity packageDBs repos comp conf listFlags pats = do installedPkgIndex <- getInstalledPackages verbosity comp packageDBs conf sourcePkgDb <- getSourcePackages verbosity repos let sourcePkgIndex = packageIndex sourcePkgDb prefs name = fromMaybe anyVersion (Ma...
2,393
true
true
4
21
886
534
265
269
null
null
dgonyeo/gatekeeper
Gatekeeper/CRDT.hs
mit
currentHosts :: Cluster -> [Host] currentHosts (Cluster a r) = filter (\(Host _ u1 _) -> foldl (\acc (Host _ u2 _) -> acc && u1 /= u2 ) True r ) a
318
currentHosts :: Cluster -> [Host] currentHosts (Cluster a r) = filter (\(Host _ u1 _) -> foldl (\acc (Host _ u2 _) -> acc && u1 /= u2 ) True r ) a
318
currentHosts (Cluster a r) = filter (\(Host _ u1 _) -> foldl (\acc (Host _ u2 _) -> acc && u1 /= u2 ) True r ) a
284
false
true
0
12
204
87
45
42
null
null
esmolanka/yaop
System/Console/YAOP/Argument.hs
bsd-3-clause
parseError :: [Char] -> [Char] -> a parseError metavar msg = error $ "Error parsing " ++ metavar ++ ": " ++ msg
111
parseError :: [Char] -> [Char] -> a parseError metavar msg = error $ "Error parsing " ++ metavar ++ ": " ++ msg
111
parseError metavar msg = error $ "Error parsing " ++ metavar ++ ": " ++ msg
75
false
true
0
8
22
46
24
22
null
null
hguenther/smtlib2
Language/SMTLib2/Internals/Expression.hs
gpl-3.0
expressionType _ _ _ _ _ _ (Quantification _ _ _) = return BoolRepr
67
expressionType _ _ _ _ _ _ (Quantification _ _ _) = return BoolRepr
67
expressionType _ _ _ _ _ _ (Quantification _ _ _) = return BoolRepr
67
false
false
1
6
13
30
15
15
null
null
snoyberg/ghc
compiler/hsSyn/HsUtils.hs
bsd-3-clause
nlHsCase expr matches = noLoc (HsCase expr (mkMatchGroup Generated matches))
77
nlHsCase expr matches = noLoc (HsCase expr (mkMatchGroup Generated matches))
77
nlHsCase expr matches = noLoc (HsCase expr (mkMatchGroup Generated matches))
77
false
false
1
9
10
34
14
20
null
null
qnikst/distributed-process-client-server
src/Control/Distributed/Process/ManagedProcess/Internal/GenProcess.hs
bsd-3-clause
-- @(ProcessExitException from ExitShutdown)@ will stop the server gracefully trapExit :: ExitSignalDispatcher s trapExit = handleExit (\_ _ (r :: ExitReason) -> stop r)
169
trapExit :: ExitSignalDispatcher s trapExit = handleExit (\_ _ (r :: ExitReason) -> stop r)
91
trapExit = handleExit (\_ _ (r :: ExitReason) -> stop r)
56
true
true
0
9
23
40
21
19
null
null
mitar/nxt
lib/Robotics/NXT/Protocol.hs
lgpl-3.0
{-| Helper function to get an ID of a module matching a given module name. Each module encompass some firmware functionality. Function caches IDs so it hopefully retrieves it from a cache of previous requests. -} getModuleID :: ModuleName -> NXT (Maybe ModuleID) getModuleID modulename | '*' `elem` modulename = return N...
1,183
getModuleID :: ModuleName -> NXT (Maybe ModuleID) getModuleID modulename | '*' `elem` modulename = return Nothing -- we do not allow wild cards | otherwise = do mods <- getsNXT modules let modulename' = map toLower modulename ...
970
getModuleID modulename | '*' `elem` modulename = return Nothing -- we do not allow wild cards | otherwise = do mods <- getsNXT modules let modulename' = map toLower modulename case modulename' `lookup` mods of ...
920
true
true
0
24
562
228
110
118
null
null
ddssff/pandoc
src/Text/Pandoc/Parsing.hs
gpl-2.0
--- -- | Removes the ParsecT layer from the monad transformer stack readWithM :: (Monad m, Functor m) => ParserT [Char] st m a -- ^ parser -> st -- ^ initial state -> String -- ^ input -> m (Either PandocError a) readWithM parser sta...
405
readWithM :: (Monad m, Functor m) => ParserT [Char] st m a -- ^ parser -> st -- ^ initial state -> String -- ^ input -> m (Either PandocError a) readWithM parser state input = mapLeft (ParsecError input) <$> runParserT parser stat...
336
readWithM parser state input = mapLeft (ParsecError input) <$> runParserT parser state "source" input
105
true
true
1
12
147
92
47
45
null
null
arekfu/project_euler
p0098/p0098.hs
mit
main = do text <- readFile "p098_words.txt" let ws = split (dropDelims $ dropBlanks $ oneOf "\",") text let families = filterTrivialAnagrams $ mapFromWords ws print families putStrLn $ "families: " ++ (show $ length families) let answer = findLargestSquare families putStrLn $ "answer: " ++ (...
332
main = do text <- readFile "p098_words.txt" let ws = split (dropDelims $ dropBlanks $ oneOf "\",") text let families = filterTrivialAnagrams $ mapFromWords ws print families putStrLn $ "families: " ++ (show $ length families) let answer = findLargestSquare families putStrLn $ "answer: " ++ (...
332
main = do text <- readFile "p098_words.txt" let ws = split (dropDelims $ dropBlanks $ oneOf "\",") text let families = filterTrivialAnagrams $ mapFromWords ws print families putStrLn $ "families: " ++ (show $ length families) let answer = findLargestSquare families putStrLn $ "answer: " ++ (...
332
false
false
1
13
75
120
52
68
null
null
BurntSushi/150fp-practice
QC/Q.hs
unlicense
rest (Q [] as) = rest (Q (reverse as) [])
44
rest (Q [] as) = rest (Q (reverse as) [])
44
rest (Q [] as) = rest (Q (reverse as) [])
44
false
false
0
9
12
38
18
20
null
null
anttisalonen/lvm
src/stau/Asm.hs
gpl-3.0
paramIndexToAddr i False = i
28
paramIndexToAddr i False = i
28
paramIndexToAddr i False = i
28
false
false
0
5
4
11
5
6
null
null
utsav2601/cmpe295A
hake/RuleDefs.hs
mit
arrakisApplicationBuildFn :: [String] -> String -> Args.Args -> HRule arrakisApplicationBuildFn af tf args | debugFlag && trace (Args.showArgs (tf ++ " Arrakis Application ") args) False = undefined
210
arrakisApplicationBuildFn :: [String] -> String -> Args.Args -> HRule arrakisApplicationBuildFn af tf args | debugFlag && trace (Args.showArgs (tf ++ " Arrakis Application ") args) False = undefined
210
arrakisApplicationBuildFn af tf args | debugFlag && trace (Args.showArgs (tf ++ " Arrakis Application ") args) False = undefined
140
false
true
0
13
39
73
34
39
null
null
tphyahoo/haskoin
haskoin-core/Network/Haskoin/Script/Evaluator.hs
unlicense
eval OP_HASH256 = tStack1 $ return . bsToSv . getHash256 . doubleHash256 . opToSv
86
eval OP_HASH256 = tStack1 $ return . bsToSv . getHash256 . doubleHash256 . opToSv
86
eval OP_HASH256 = tStack1 $ return . bsToSv . getHash256 . doubleHash256 . opToSv
86
false
false
3
6
18
35
14
21
null
null
FranklinChen/music-score
sketch/old/trans/trans2.hs
bsd-3-clause
inPTrans = getPTrans ~> PTrans
31
inPTrans = getPTrans ~> PTrans
31
inPTrans = getPTrans ~> PTrans
31
false
false
0
5
5
10
5
5
null
null
pparkkin/eta
compiler/ETA/Main/HscTypes.hs
bsd-3-clause
substInteractiveContext :: InteractiveContext -> TvSubst -> InteractiveContext substInteractiveContext ictxt@InteractiveContext{ ic_tythings = tts } subst | isEmptyTvSubst subst = ictxt | otherwise = ictxt { ic_tythings = map subst_ty tts } where subst_ty (AnId id) = AnId $ id `setIdType` substTy s...
364
substInteractiveContext :: InteractiveContext -> TvSubst -> InteractiveContext substInteractiveContext ictxt@InteractiveContext{ ic_tythings = tts } subst | isEmptyTvSubst subst = ictxt | otherwise = ictxt { ic_tythings = map subst_ty tts } where subst_ty (AnId id) = AnId $ id `setIdType` substTy s...
364
substInteractiveContext ictxt@InteractiveContext{ ic_tythings = tts } subst | isEmptyTvSubst subst = ictxt | otherwise = ictxt { ic_tythings = map subst_ty tts } where subst_ty (AnId id) = AnId $ id `setIdType` substTy subst (idType id) subst_ty tt = tt
285
false
true
3
8
78
119
57
62
null
null
jprider63/yesod
yesod-core/Yesod/Core/Json.hs
mit
-- | Provide both an HTML and JSON representation for a piece of -- data, using the default layout for the HTML output -- ('defaultLayout'). -- -- @since 0.3.0 defaultLayoutJson :: (Yesod site, J.ToJSON a) => WidgetFor site () -- ^ HTML -> HandlerFor site a -- ^ JSON ...
595
defaultLayoutJson :: (Yesod site, J.ToJSON a) => WidgetFor site () -- ^ HTML -> HandlerFor site a -- ^ JSON -> HandlerFor site TypedContent defaultLayoutJson w json = selectRep $ do provideRep $ defaultLayout w provideRep $ fmap J.toEncoding json -- | Wra...
435
defaultLayoutJson w json = selectRep $ do provideRep $ defaultLayout w provideRep $ fmap J.toEncoding json -- | Wraps a data type in a 'RepJson'. The data type must -- support conversion to JSON via 'J.ToJSON'. -- -- @since 0.3.0
239
true
true
0
10
158
97
51
46
null
null
wavecorenautic/ecdis-client
src/Data/Geo/Math.hs
bsd-3-clause
angNormalize :: (Ord a, Floating a) => PlaneAngle a -> PlaneAngle a angNormalize x = if (x >= (180 *~ degree)) then x - (360 *~ degree) else if (x < (-180) *~ degree) then x + (360 *~ degree) else x
202
angNormalize :: (Ord a, Floating a) => PlaneAngle a -> PlaneAngle a angNormalize x = if (x >= (180 *~ degree)) then x - (360 *~ degree) else if (x < (-180) *~ degree) then x + (360 *~ degree) else x
202
angNormalize x = if (x >= (180 *~ degree)) then x - (360 *~ degree) else if (x < (-180) *~ degree) then x + (360 *~ degree) else x
134
false
true
0
11
45
107
58
49
null
null
slogsdon/haskell-exercises
write-a-scheme/parsing/src/Parser/Parser.hs
mit
quotedString :: Parser Char quotedString = char '\\' >> char '"'
64
quotedString :: Parser Char quotedString = char '\\' >> char '"'
64
quotedString = char '\\' >> char '"'
36
false
true
0
6
10
24
11
13
null
null
paulkeene/FP101x
chapter06/Exercises.hs
bsd-3-clause
myAnyB :: (a -> Bool) -> [a] -> Bool myAnyB p xs = length (filter p xs) > 0
75
myAnyB :: (a -> Bool) -> [a] -> Bool myAnyB p xs = length (filter p xs) > 0
75
myAnyB p xs = length (filter p xs) > 0
38
false
true
0
8
18
49
25
24
null
null
dec9ue/jhc_copygc
src/FrontEnd/KindInfer.hs
gpl-2.0
aHsTypeToType kt HsTyExpKind { hsTyLType = Located _ t } = aHsTypeToType kt t
77
aHsTypeToType kt HsTyExpKind { hsTyLType = Located _ t } = aHsTypeToType kt t
77
aHsTypeToType kt HsTyExpKind { hsTyLType = Located _ t } = aHsTypeToType kt t
77
false
false
0
9
13
30
14
16
null
null
bgamari/shaking-up-ghc
src/Oracles/Setting.hs
bsd-3-clause
ghcEnableTablesNextToCode :: Action Bool ghcEnableTablesNextToCode = notM $ anyTargetArch ["ia64", "powerpc64", "powerpc64le"]
126
ghcEnableTablesNextToCode :: Action Bool ghcEnableTablesNextToCode = notM $ anyTargetArch ["ia64", "powerpc64", "powerpc64le"]
126
ghcEnableTablesNextToCode = notM $ anyTargetArch ["ia64", "powerpc64", "powerpc64le"]
85
false
true
0
7
11
30
16
14
null
null
fmthoma/ghc
compiler/main/DynFlags.hs
bsd-3-clause
pgm_dll :: DynFlags -> (String,[Option]) pgm_dll dflags = sPgm_dll (settings dflags)
98
pgm_dll :: DynFlags -> (String,[Option]) pgm_dll dflags = sPgm_dll (settings dflags)
98
pgm_dll dflags = sPgm_dll (settings dflags)
43
false
true
0
7
24
36
19
17
null
null
Denommus/stack
src/Stack/Types/Config.hs
bsd-3-clause
packageDatabaseDeps :: (MonadThrow m, MonadReader env m, HasEnvConfig env) => m (Path Abs Dir) packageDatabaseDeps = do root <- installationRootDeps return $ root </> $(mkRelDir "pkgdb") -- | Package database for installing local packages into
252
packageDatabaseDeps :: (MonadThrow m, MonadReader env m, HasEnvConfig env) => m (Path Abs Dir) packageDatabaseDeps = do root <- installationRootDeps return $ root </> $(mkRelDir "pkgdb") -- | Package database for installing local packages into
252
packageDatabaseDeps = do root <- installationRootDeps return $ root </> $(mkRelDir "pkgdb") -- | Package database for installing local packages into
157
false
true
0
10
43
71
35
36
null
null
GaloisInc/halvm-ghc
compiler/nativeGen/PPC/CodeGen.hs
bsd-3-clause
getRegister' dflags (CmmReg reg) = return (Fixed (cmmTypeFormat (cmmRegType dflags reg)) (getRegisterReg (targetPlatform dflags) reg) nilOL)
160
getRegister' dflags (CmmReg reg) = return (Fixed (cmmTypeFormat (cmmRegType dflags reg)) (getRegisterReg (targetPlatform dflags) reg) nilOL)
160
getRegister' dflags (CmmReg reg) = return (Fixed (cmmTypeFormat (cmmRegType dflags reg)) (getRegisterReg (targetPlatform dflags) reg) nilOL)
160
false
false
0
11
35
58
28
30
null
null
phischu/fragnix
tests/packages/scotty/System.Timeout.Lifted.hs
bsd-3-clause
-- | Generalized version of 'T.timeout'. -- -- Note that when the given computation times out any side effects of @m@ are -- discarded. When the computation completes within the given time the -- side-effects are restored on return. timeout :: MonadBaseControl IO m => Int -> m a -> m (Maybe a) timeout t m = liftBaseWit...
426
timeout :: MonadBaseControl IO m => Int -> m a -> m (Maybe a) timeout t m = liftBaseWith (\runInIO -> T.timeout t (runInIO m)) >>= maybe (return Nothing) (liftM Just . restoreM)
193
timeout t m = liftBaseWith (\runInIO -> T.timeout t (runInIO m)) >>= maybe (return Nothing) (liftM Just . restoreM)
131
true
true
0
11
87
99
50
49
null
null