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
shlevy/ghc
compiler/cmm/MkGraph.hs
bsd-3-clause
(<*>) :: CmmAGraph -> CmmAGraph -> CmmAGraph (<*>) = appOL
77
(<*>) :: CmmAGraph -> CmmAGraph -> CmmAGraph (<*>) = appOL
77
(<*>) = appOL
23
false
true
0
8
28
30
15
15
null
null
oldmanmike/vulkan
generate/src/Spec/Graph.hs
bsd-3-clause
getSpecGraph :: Spec -> SpecGraph getSpecGraph spec = graph where gVertices = (typeDeclToVertex graph <$> sTypes spec) ++ (constantToVertex graph <$> sConstants spec) ++ (enumToVertex graph <$> sEnums spec) ++ (bitmaskToVertex graph <$> sBitmasks spec) ++ ...
674
getSpecGraph :: Spec -> SpecGraph getSpecGraph spec = graph where gVertices = (typeDeclToVertex graph <$> sTypes spec) ++ (constantToVertex graph <$> sConstants spec) ++ (enumToVertex graph <$> sEnums spec) ++ (bitmaskToVertex graph <$> sBitmasks spec) ++ ...
674
getSpecGraph spec = graph where gVertices = (typeDeclToVertex graph <$> sTypes spec) ++ (constantToVertex graph <$> sConstants spec) ++ (enumToVertex graph <$> sEnums spec) ++ (bitmaskToVertex graph <$> sBitmasks spec) ++ (commandToVertex...
640
false
true
2
11
156
146
73
73
null
null
abhinav/tbr
app/main.hs
mit
listArgument :: Parser Text listArgument = argument text (metavar "LIST")
73
listArgument :: Parser Text listArgument = argument text (metavar "LIST")
73
listArgument = argument text (metavar "LIST")
45
false
true
0
7
9
25
12
13
null
null
metabrainz/musicbrainz-data-service
src/MusicBrainz/API/Url.hs
gpl-2.0
-------------------------------------------------------------------------------- tree :: Form Text MusicBrainz (Tree Url) tree = UrlTree <$> "url" .: url <*> relationships
186
tree :: Form Text MusicBrainz (Tree Url) tree = UrlTree <$> "url" .: url <*> relationships
105
tree = UrlTree <$> "url" .: url <*> relationships
64
true
true
1
7
31
41
19
22
null
null
ohua-dev/ohua-core
core/src/Ohua/Unit.hs
epl-1.0
someUnitExpr :: Expr someUnitExpr = unitExpr
44
someUnitExpr :: Expr someUnitExpr = unitExpr
44
someUnitExpr = unitExpr
23
false
true
0
4
5
11
6
5
null
null
yupferris/write-you-a-haskell
chapter7/poly_constraints/src/Eval.hs
mit
runEval :: TermEnv -> String -> Expr -> (Value, TermEnv) runEval env nm ex = let res = runIdentity (eval env ex) in (res, Map.insert nm res env)
148
runEval :: TermEnv -> String -> Expr -> (Value, TermEnv) runEval env nm ex = let res = runIdentity (eval env ex) in (res, Map.insert nm res env)
148
runEval env nm ex = let res = runIdentity (eval env ex) in (res, Map.insert nm res env)
91
false
true
0
11
31
73
37
36
null
null
mcschroeder/ghc
compiler/prelude/TysPrim.hs
bsd-3-clause
{- ********************************************************************* * * The mutable variable type * * ***********************************************************...
444
mutVarPrimTyCon :: TyCon mutVarPrimTyCon = pcPrimTyCon mutVarPrimTyConName [Nominal, Representational] PtrRep
109
mutVarPrimTyCon = pcPrimTyCon mutVarPrimTyConName [Nominal, Representational] PtrRep
84
true
true
0
6
176
25
14
11
null
null
Peaker/lamdu
test/Tests/Sugar.hs
gpl-3.0
testSugarActionsWith :: FilePath -> [WorkArea (Annotation (EvaluationScopes Name (OnceT (T ViewM))) Name) Name (OnceT (T ViewM)) (T ViewM) (Sugar.Payload (Annotation (EvaluationScopes Name (OnceT (T ViewM))) Name) (T ViewM)) -> OnceT (T ViewM) a] -> Env -> IO () testSugarActionsWith prog...
434
testSugarActionsWith :: FilePath -> [WorkArea (Annotation (EvaluationScopes Name (OnceT (T ViewM))) Name) Name (OnceT (T ViewM)) (T ViewM) (Sugar.Payload (Annotation (EvaluationScopes Name (OnceT (T ViewM))) Name) (T ViewM)) -> OnceT (T ViewM) a] -> Env -> IO () testSugarActionsWith prog...
434
testSugarActionsWith program actions env = traverse_ (convertWorkArea env >>=) actions <* convertWorkArea env & testProgram program
139
false
true
2
20
93
182
88
94
null
null
mettekou/ghc
compiler/codeGen/StgCmmClosure.hs
bsd-3-clause
-- | Used in places where some invariant ensures that all these Ids are -- non-void; e.g. constructor field binders in case expressions. -- See Note [Post-unarisation invariants] in UnariseStg. assertNonVoidIds :: [Id] -> [NonVoid Id] assertNonVoidIds ids = ASSERT(not (any (isVoidTy . idType) ids)) ...
333
assertNonVoidIds :: [Id] -> [NonVoid Id] assertNonVoidIds ids = ASSERT(not (any (isVoidTy . idType) ids)) coerce ids
139
assertNonVoidIds ids = ASSERT(not (any (isVoidTy . idType) ids)) coerce ids
98
true
true
0
11
69
58
31
27
null
null
fmapfmapfmap/amazonka
amazonka-rds/gen/Network/AWS/RDS/DescribeDBParameters.hs
mpl-2.0
-- | The parameter types to return. -- -- Default: All parameter types returned -- -- Valid Values: 'user | system | engine-default' ddpSource :: Lens' DescribeDBParameters (Maybe Text) ddpSource = lens _ddpSource (\ s a -> s{_ddpSource = a})
242
ddpSource :: Lens' DescribeDBParameters (Maybe Text) ddpSource = lens _ddpSource (\ s a -> s{_ddpSource = a})
109
ddpSource = lens _ddpSource (\ s a -> s{_ddpSource = a})
56
true
true
0
9
39
50
29
21
null
null
jwiegley/ghc-release
libraries/base/GHC/Event/Thread.hs
gpl-3.0
-- | Suspends the current thread for a given number of microseconds -- (GHC only). -- -- There is no guarantee that the thread will be rescheduled promptly -- when the delay has expired, but the thread will never continue to -- run /earlier/ than specified. threadDelay :: Int -> IO () threadDelay usecs = mask_ $ do m...
617
threadDelay :: Int -> IO () threadDelay usecs = mask_ $ do mgr <- getSystemTimerManager m <- newEmptyMVar reg <- TM.registerTimeout mgr usecs (putMVar m ()) takeMVar m `onException` TM.unregisterTimeout mgr reg -- | Set the value of returned TVar to True after a given number of -- microseconds. The caveats ass...
359
threadDelay usecs = mask_ $ do mgr <- getSystemTimerManager m <- newEmptyMVar reg <- TM.registerTimeout mgr usecs (putMVar m ()) takeMVar m `onException` TM.unregisterTimeout mgr reg -- | Set the value of returned TVar to True after a given number of -- microseconds. The caveats associated with threadDelay als...
331
true
true
0
12
111
95
49
46
null
null
garetxe/cabal
Cabal/tests/UnitTests/Distribution/Version.hs
bsd-3-clause
-- | 'intersectVersionIntervals' is commutative -- prop_intersectVersionIntervals_commutative :: VersionIntervals -> VersionIntervals -> Bool prop_intersectVersionIntervals_commutative = Laws.commutative intersectVersionIntervals
274
prop_intersectVersionIntervals_commutative :: VersionIntervals -> VersionIntervals -> Bool prop_intersectVersionIntervals_commutative = Laws.commutative intersectVersionIntervals
223
prop_intersectVersionIntervals_commutative = Laws.commutative intersectVersionIntervals
89
true
true
0
6
61
26
14
12
null
null
perryleo/sicp
ch1/sicpc1e24.hs
mit
-- Compute the runtime of `nextPrimesNum` computeRuntime n m = do start <- getCurrentTime print $ nextPrimesNum n m stop <- getCurrentTime print $ diffUTCTime stop start -- -- Actually the expectation is not confirmed. Because the runtime is -- determined by many factors: the occupation of system resources, th...
692
computeRuntime n m = do start <- getCurrentTime print $ nextPrimesNum n m stop <- getCurrentTime print $ diffUTCTime stop start -- -- Actually the expectation is not confirmed. Because the runtime is -- determined by many factors: the occupation of system resources, the -- optimization of interpreter of compil...
650
computeRuntime n m = do start <- getCurrentTime print $ nextPrimesNum n m stop <- getCurrentTime print $ diffUTCTime stop start -- -- Actually the expectation is not confirmed. Because the runtime is -- determined by many factors: the occupation of system resources, the -- optimization of interpreter of compil...
650
true
false
0
8
105
66
38
28
null
null
spinda/liquidhaskell
tests/gsoc15/unknown/pos/partialmeasure.hs
bsd-3-clause
hd :: [a] -> a hd (x:_) = x
33
hd :: [a] -> a hd (x:_) = x
33
hd (x:_) = x
12
false
true
0
6
14
29
15
14
null
null
nevrenato/Hets_Fork
HasCASL/Builtin.hs
gpl-2.0
cType :: Type cType = typeArgToType cTypeArg
44
cType :: Type cType = typeArgToType cTypeArg
44
cType = typeArgToType cTypeArg
30
false
true
0
6
6
20
8
12
null
null
romanb/amazonka
amazonka-ec2/gen/Network/AWS/EC2/Types.hs
mpl-2.0
-- | The ID of the reservation. rReservationId :: Lens' Reservation Text rReservationId = lens _rReservationId (\s a -> s { _rReservationId = a })
146
rReservationId :: Lens' Reservation Text rReservationId = lens _rReservationId (\s a -> s { _rReservationId = a })
114
rReservationId = lens _rReservationId (\s a -> s { _rReservationId = a })
73
true
true
1
9
24
45
22
23
null
null
paf31/typescript-docs
src/Language/TypeScript/Docs/Html.hs
mit
header 4 = H.h4
15
header 4 = H.h4
15
header 4 = H.h4
15
false
false
0
5
3
11
5
6
null
null
CristhianMotoche/scion
server/Main.hs
bsd-3-clause
log = HL.logM __FILE__
22
log = HL.logM __FILE__
22
log = HL.logM __FILE__
22
false
false
1
5
3
15
5
10
null
null
nomeata/cryptonite
Crypto/PubKey/DSA.hs
bsd-3-clause
-- | sign message using the private key and an explicit k number. signWith :: (ByteArrayAccess msg, HashAlgorithm hash) => Integer -- ^ k random number -> PrivateKey -- ^ private key -> hash -- ^ hash function -> msg -- ^ message to sign -...
812
signWith :: (ByteArrayAccess msg, HashAlgorithm hash) => Integer -- ^ k random number -> PrivateKey -- ^ private key -> hash -- ^ hash function -> msg -- ^ message to sign -> Maybe Signature signWith k pk hashAlg msg | r == 0 || s == 0...
746
signWith k pk hashAlg msg | r == 0 || s == 0 = Nothing | otherwise = Just $ Signature r s where -- parameters (Params p g q) = private_params pk x = private_x pk -- compute r,s kInv = fromJust $ inverse k q hm = os2ip $ hash...
474
true
true
0
12
342
202
106
96
null
null
jtapolczai/wumpus
Main.hs
apache-2.0
maxStatF :: [(FilePath, Int)] -> (FilePath, Int) maxStatF = head . sortBy (comparing snd)
89
maxStatF :: [(FilePath, Int)] -> (FilePath, Int) maxStatF = head . sortBy (comparing snd)
89
maxStatF = head . sortBy (comparing snd)
40
false
true
0
8
13
43
24
19
null
null
xyst/colour
Main.hs
gpl-3.0
added (']' : a) = apply green "]" ++ added a
44
added (']' : a) = apply green "]" ++ added a
44
added (']' : a) = apply green "]" ++ added a
44
false
false
2
6
10
31
13
18
null
null
MaxDaten/yage-rendering
src/Yage/Rendering/Shader.hs
mit
unrollArrayLocations (name, texs) = -- match against the last array idx in brackets case name =~ lastBracketPat :: String of "" -> zipWith ( \(idx::Int) -> (name ++ arrayIdxBracket idx,) ) [0..] texs theBracket -> let startIdx :: Int startIdx =...
671
unrollArrayLocations (name, texs) = -- match against the last array idx in brackets case name =~ lastBracketPat :: String of "" -> zipWith ( \(idx::Int) -> (name ++ arrayIdxBracket idx,) ) [0..] texs theBracket -> let startIdx :: Int startIdx =...
671
unrollArrayLocations (name, texs) = -- match against the last array idx in brackets case name =~ lastBracketPat :: String of "" -> zipWith ( \(idx::Int) -> (name ++ arrayIdxBracket idx,) ) [0..] texs theBracket -> let startIdx :: Int startIdx =...
671
false
false
2
13
207
206
108
98
null
null
brendanhay/gogol
gogol-proximitybeacon/gen/Network/Google/ProximityBeacon/Types/Product.hs
mpl-2.0
-- | The number of attachments that were deleted. darNumDeleted :: Lens' DeleteAttachmentsResponse (Maybe Int32) darNumDeleted = lens _darNumDeleted (\ s a -> s{_darNumDeleted = a}) . mapping _Coerce
213
darNumDeleted :: Lens' DeleteAttachmentsResponse (Maybe Int32) darNumDeleted = lens _darNumDeleted (\ s a -> s{_darNumDeleted = a}) . mapping _Coerce
163
darNumDeleted = lens _darNumDeleted (\ s a -> s{_darNumDeleted = a}) . mapping _Coerce
100
true
true
0
10
42
55
28
27
null
null
Fuuzetsu/stack
src/main/Main.hs
bsd-3-clause
templatesCmd :: () -> GlobalOpts -> IO () templatesCmd _ go@GlobalOpts{..} = withConfigAndLock go listTemplates
111
templatesCmd :: () -> GlobalOpts -> IO () templatesCmd _ go@GlobalOpts{..} = withConfigAndLock go listTemplates
111
templatesCmd _ go@GlobalOpts{..} = withConfigAndLock go listTemplates
69
false
true
0
8
14
45
22
23
null
null
Fuuzetsu/stack
src/Stack/Config.hs
bsd-3-clause
getLatestResolver :: (StackMiniM env m, HasConfig env) => m Resolver getLatestResolver = do snapshots <- getSnapshots let mlts = do (x,y) <- listToMaybe (reverse (IntMap.toList (snapshotsLts snapshots))) return (LTS x y) snap = fromMaybe (Nightly (snapshotsNightly snapshots)) mlt...
467
getLatestResolver :: (StackMiniM env m, HasConfig env) => m Resolver getLatestResolver = do snapshots <- getSnapshots let mlts = do (x,y) <- listToMaybe (reverse (IntMap.toList (snapshotsLts snapshots))) return (LTS x y) snap = fromMaybe (Nightly (snapshotsNightly snapshots)) mlt...
467
getLatestResolver = do snapshots <- getSnapshots let mlts = do (x,y) <- listToMaybe (reverse (IntMap.toList (snapshotsLts snapshots))) return (LTS x y) snap = fromMaybe (Nightly (snapshotsNightly snapshots)) mlts return (ResolverSnapshot snap) -- | Create a 'Config' value wh...
398
false
true
0
19
104
133
65
68
null
null
apyrgio/snf-ganeti
src/Ganeti/OpParams.hs
bsd-2-clause
pIallocator :: Field pIallocator = withDoc "Iallocator for deciding the target node for shared-storage\ \ instances" $ optionalNEStringField "iallocator"
167
pIallocator :: Field pIallocator = withDoc "Iallocator for deciding the target node for shared-storage\ \ instances" $ optionalNEStringField "iallocator"
167
pIallocator = withDoc "Iallocator for deciding the target node for shared-storage\ \ instances" $ optionalNEStringField "iallocator"
146
false
true
0
6
32
21
10
11
null
null
NicolasT/paxos
src/Network/Paxos/Synod/Proposer.hs
lgpl-2.1
prop_startRound1 :: Quorum -> ProposalId Int -> () -> Bool prop_startRound1 q p v = and [ proposalId s == p , quorum s == q , value s == v , null $ acceptors s , isNothing $ highestAccepted s ...
376
prop_startRound1 :: Quorum -> ProposalId Int -> () -> Bool prop_startRound1 q p v = and [ proposalId s == p , quorum s == q , value s == v , null $ acceptors s , isNothing $ highestAccepted s ...
376
prop_startRound1 q p v = and [ proposalId s == p , quorum s == q , value s == v , null $ acceptors s , isNothing $ highestAccepted s ] where (s, _) = startRound q p v
317
false
true
0
8
200
110
54
56
null
null
sdiehl/ghc
compiler/GHC/Cmm/Type.hs
bsd-3-clause
isFloatType _other = False
43
isFloatType _other = False
43
isFloatType _other = False
43
false
false
0
4
20
9
4
5
null
null
brendanhay/gogol
gogol-healthcare/gen/Network/Google/Resource/Healthcare/Projects/Locations/List.hs
mpl-2.0
-- | JSONP pllCallback :: Lens' ProjectsLocationsList (Maybe Text) pllCallback = lens _pllCallback (\ s a -> s{_pllCallback = a})
131
pllCallback :: Lens' ProjectsLocationsList (Maybe Text) pllCallback = lens _pllCallback (\ s a -> s{_pllCallback = a})
120
pllCallback = lens _pllCallback (\ s a -> s{_pllCallback = a})
64
true
true
0
9
21
48
25
23
null
null
TomMD/ghc
libraries/base/Control/Exception/Base.hs
bsd-3-clause
bracket :: IO a -- ^ computation to run first (\"acquire resource\") -> (a -> IO b) -- ^ computation to run last (\"release resource\") -> (a -> IO c) -- ^ computation to run in-between -> IO c -- returns the value from the in-between computation bracket before after th...
533
bracket :: IO a -- ^ computation to run first (\"acquire resource\") -> (a -> IO b) -- ^ computation to run last (\"release resource\") -> (a -> IO c) -- ^ computation to run in-between -> IO c bracket before after thing = mask $ \restore -> do a <- before r <- restor...
472
bracket before after thing = mask $ \restore -> do a <- before r <- restore (thing a) `onException` after a _ <- after a return r -- | A specialised variant of 'bracket' with just a computation to run -- afterward. --
236
true
true
2
13
158
126
61
65
null
null
ssaavedra/liquidhaskell
src/Language/Haskell/Liquid/Desugar710/Check.hs
bsd-3-clause
might_fail_pat (SigPatOut p _ ) = might_fail_lpat p
64
might_fail_pat (SigPatOut p _ ) = might_fail_lpat p
64
might_fail_pat (SigPatOut p _ ) = might_fail_lpat p
64
false
false
0
6
20
21
9
12
null
null
ihc/futhark
src/futhark-bench.hs
isc
io :: IO a -> BenchM a io = liftIO
34
io :: IO a -> BenchM a io = liftIO
34
io = liftIO
11
false
true
0
6
9
21
10
11
null
null
bitemyapp/ghc
compiler/typecheck/TcType.hs
bsd-3-clause
isTyVarExposed _ (LitTy {}) = False
41
isTyVarExposed _ (LitTy {}) = False
41
isTyVarExposed _ (LitTy {}) = False
41
false
false
1
6
11
21
9
12
null
null
sashabu/libcspm
cspmchecker/src/Checker/Monad.hs
bsd-3-clause
initCheckerState :: IO CheckerState initCheckerState = do sess <- newCSPMSession return $ CheckerState sess []
118
initCheckerState :: IO CheckerState initCheckerState = do sess <- newCSPMSession return $ CheckerState sess []
118
initCheckerState = do sess <- newCSPMSession return $ CheckerState sess []
82
false
true
0
9
22
35
16
19
null
null
ardumont/yesod-lab
devel.hs
gpl-2.0
loop :: IO () loop = do threadDelay 100000 e <- doesFileExist "yesod-devel/devel-terminate" if e then terminateDevel else loop
132
loop :: IO () loop = do threadDelay 100000 e <- doesFileExist "yesod-devel/devel-terminate" if e then terminateDevel else loop
132
loop = do threadDelay 100000 e <- doesFileExist "yesod-devel/devel-terminate" if e then terminateDevel else loop
118
false
true
0
8
24
49
21
28
null
null
trskop/cabal
Cabal/Distribution/Simple/LHC.hs
bsd-3-clause
-- ----------------------------------------------------------------------------- -- Configuring configure :: Verbosity -> Maybe FilePath -> Maybe FilePath -> ProgramConfiguration -> IO (Compiler, Maybe Platform, ProgramConfiguration) configure verbosity hcPath hcPkgPath conf = do (lhcProg, lhcVersion, con...
1,495
configure :: Verbosity -> Maybe FilePath -> Maybe FilePath -> ProgramConfiguration -> IO (Compiler, Maybe Platform, ProgramConfiguration) configure verbosity hcPath hcPkgPath conf = do (lhcProg, lhcVersion, conf') <- requireProgramVersion verbosity lhcProgram (orLaterVersion (Version [0,7] [])) ...
1,398
configure verbosity hcPath hcPkgPath conf = do (lhcProg, lhcVersion, conf') <- requireProgramVersion verbosity lhcProgram (orLaterVersion (Version [0,7] [])) (userMaybeSpecifyPath "lhc" hcPath conf) (lhcPkgProg, lhcPkgVersion, conf'') <- requireProgramVersion verbosity lhcPkgProgram (orL...
1,250
true
true
0
19
349
352
181
171
null
null
rueshyna/gogol
gogol-groups-settings/gen/Network/Google/GroupsSettings/Types/Product.hs
mpl-2.0
-- | If the group is archive only gArchiveOnly :: Lens' Groups (Maybe Text) gArchiveOnly = lens _gArchiveOnly (\ s a -> s{_gArchiveOnly = a})
143
gArchiveOnly :: Lens' Groups (Maybe Text) gArchiveOnly = lens _gArchiveOnly (\ s a -> s{_gArchiveOnly = a})
109
gArchiveOnly = lens _gArchiveOnly (\ s a -> s{_gArchiveOnly = a})
67
true
true
2
9
26
55
25
30
null
null
ekarayel/HTF
tests/TestHTF.hs
lgpl-2.1
test_genericAssertions_OK = case test1 of AssertOk _ -> fail "did not expect AssertOk" AssertFailed stack -> do assertEqual 2 (length stack) let [se1, se2] = stack assertNothing (ase_message se1) loc1 <- assertJust (ase_location se1) _ <- ass...
710
test_genericAssertions_OK = case test1 of AssertOk _ -> fail "did not expect AssertOk" AssertFailed stack -> do assertEqual 2 (length stack) let [se1, se2] = stack assertNothing (ase_message se1) loc1 <- assertJust (ase_location se1) _ <- ass...
710
test_genericAssertions_OK = case test1 of AssertOk _ -> fail "did not expect AssertOk" AssertFailed stack -> do assertEqual 2 (length stack) let [se1, se2] = stack assertNothing (ase_message se1) loc1 <- assertJust (ase_location se1) _ <- ass...
710
false
false
1
13
218
193
89
104
null
null
kawu/crf-chain2-tiers
src/Data/CRF/Chain2/Tiers/DAG/Inference.hs
bsd-2-clause
complicate _ (Just x) = Mid x
29
complicate _ (Just x) = Mid x
29
complicate _ (Just x) = Mid x
29
false
false
1
6
6
23
9
14
null
null
brendanhay/gogol
gogol-deploymentmanager/gen/Network/Google/DeploymentManager/Types/Product.hs
mpl-2.0
-- | Output only. The size limit for expanded manifests in the project. mManifestSizeLimitBytes :: Lens' Manifest (Maybe Int64) mManifestSizeLimitBytes = lens _mManifestSizeLimitBytes (\ s a -> s{_mManifestSizeLimitBytes = a}) . mapping _Coerce
258
mManifestSizeLimitBytes :: Lens' Manifest (Maybe Int64) mManifestSizeLimitBytes = lens _mManifestSizeLimitBytes (\ s a -> s{_mManifestSizeLimitBytes = a}) . mapping _Coerce
186
mManifestSizeLimitBytes = lens _mManifestSizeLimitBytes (\ s a -> s{_mManifestSizeLimitBytes = a}) . mapping _Coerce
130
true
true
1
8
46
57
28
29
null
null
romanofski/workbalance
src/Main.hs
gpl-3.0
main :: IO () main = shelly $ silently $ do nowTime <- liftIO $ getCurrentTime let yD = yesterDay nowTime output <- getHamsterOutput startDate yD case getWorkBalanceFromHamsterOutput startDate yD output of Left err -> liftIO $ printf "Parsing Error of hamster output: %s \n%s" (T.unpack output) er...
378
main :: IO () main = shelly $ silently $ do nowTime <- liftIO $ getCurrentTime let yD = yesterDay nowTime output <- getHamsterOutput startDate yD case getWorkBalanceFromHamsterOutput startDate yD output of Left err -> liftIO $ printf "Parsing Error of hamster output: %s \n%s" (T.unpack output) er...
378
main = shelly $ silently $ do nowTime <- liftIO $ getCurrentTime let yD = yesterDay nowTime output <- getHamsterOutput startDate yD case getWorkBalanceFromHamsterOutput startDate yD output of Left err -> liftIO $ printf "Parsing Error of hamster output: %s \n%s" (T.unpack output) err Right ...
364
false
true
2
16
85
126
55
71
null
null
enolan/Idris-dev
src/Idris/Docs.hs
bsd-3-clause
docRecord :: Name -> RecordInfo -> Idris Docs docRecord n ri = do i <- getIState let docStrings = listToMaybe $ lookupCtxt n $ idris_docstrings i docstr = maybe emptyDocstring fst docStrings params = map (\(pn,pt) -> (pn, pt, docStrings >>= (lookup (nsroot pn) . snd))) ...
506
docRecord :: Name -> RecordInfo -> Idris Docs docRecord n ri = do i <- getIState let docStrings = listToMaybe $ lookupCtxt n $ idris_docstrings i docstr = maybe emptyDocstring fst docStrings params = map (\(pn,pt) -> (pn, pt, docStrings >>= (lookup (nsroot pn) . snd))) ...
506
docRecord n ri = do i <- getIState let docStrings = listToMaybe $ lookupCtxt n $ idris_docstrings i docstr = maybe emptyDocstring fst docStrings params = map (\(pn,pt) -> (pn, pt, docStrings >>= (lookup (nsroot pn) . snd))) (record_parameters ri) pdocs <- ma...
460
false
true
0
19
143
178
87
91
null
null
martin-kolinek/stack
src/Stack/Build/Installed.hs
bsd-3-clause
toPackageLocation (Just (InstalledTo loc)) = loc
48
toPackageLocation (Just (InstalledTo loc)) = loc
48
toPackageLocation (Just (InstalledTo loc)) = loc
48
false
false
0
9
5
21
10
11
null
null
thoughtpolice/hs-poly1305
src/Crypto/MAC/Poly1305.hs
mit
authenticate :: Key -- ^ Secret key -> ByteString -- ^ Message -> Auth -- ^ Authenticator authenticate (Key k) msg = Auth $ unsafePerformIO . create onetimeauthBYTES $ \out -> unsafeUseAsCStringLen msg $ \(cstr, clen) -> unsafeUseAsCString k $...
401
authenticate :: Key -- ^ Secret key -> ByteString -- ^ Message -> Auth authenticate (Key k) msg = Auth $ unsafePerformIO . create onetimeauthBYTES $ \out -> unsafeUseAsCStringLen msg $ \(cstr, clen) -> unsafeUseAsCString k $ \pk -> c_crypto_onetime...
369
authenticate (Key k) msg = Auth $ unsafePerformIO . create onetimeauthBYTES $ \out -> unsafeUseAsCStringLen msg $ \(cstr, clen) -> unsafeUseAsCString k $ \pk -> c_crypto_onetimeauth out cstr (fromIntegral clen) pk >> return ()
246
true
true
0
14
135
107
55
52
null
null
xicesky/sky-haskell-playground
src/Sky/Compositional/Demo1Basics.hs
bsd-3-clause
eval :: (Functor f, Eval f g) => Term f -> Term g eval = cata evalAlg
69
eval :: (Functor f, Eval f g) => Term f -> Term g eval = cata evalAlg
69
eval = cata evalAlg
19
false
true
0
7
16
41
20
21
null
null
jfranklin9000/urbit
pkg/hs/urbit-king/lib/Urbit/Vere/LMDB.hs
mit
mdbValToBytes :: MDB_val -> IO ByteString mdbValToBytes (MDB_val sz ptr) = do BU.unsafePackCStringLen (castPtr ptr, fromIntegral sz)
134
mdbValToBytes :: MDB_val -> IO ByteString mdbValToBytes (MDB_val sz ptr) = do BU.unsafePackCStringLen (castPtr ptr, fromIntegral sz)
134
mdbValToBytes (MDB_val sz ptr) = do BU.unsafePackCStringLen (castPtr ptr, fromIntegral sz)
92
false
true
0
9
18
49
23
26
null
null
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/index_4.hs
mit
esEsOrdering EQ EQ = MyTrue
27
esEsOrdering EQ EQ = MyTrue
27
esEsOrdering EQ EQ = MyTrue
27
false
false
1
5
4
16
5
11
null
null
fboyer/craft3e
RPS.hs
mit
outcome Scissors Rock = -1
26
outcome Scissors Rock = -1
26
outcome Scissors Rock = -1
26
false
false
0
5
4
13
6
7
null
null
phischu/fragnix
tests/packages/scotty/Data.Attoparsec.Text.Internal.hs
bsd-3-clause
takeText :: Parser Text takeText = T.concat `fmap` takeRest
59
takeText :: Parser Text takeText = T.concat `fmap` takeRest
59
takeText = T.concat `fmap` takeRest
35
false
true
0
6
8
22
12
10
null
null
UCSD-PL/nano-js
Language/Nano/Liquid/Types.hs
bsd-3-clause
isBaseRType :: RType r -> Bool ------------------------------------------------------------------------------------------ isBaseRType (TApp _ [] _) = True
154
isBaseRType :: RType r -> Bool isBaseRType (TApp _ [] _) = True
63
isBaseRType (TApp _ [] _) = True
32
true
true
0
10
13
40
18
22
null
null
smly/hubigraph
Graphics/Ubigraph/Fgl.hs
bsd-3-clause
pathWidth :: Path -> Float -> H.Hubigraph () pathWidth p width = mapM_ (\n -> H.edgeWidth (mkEdgeId n) width) $ pathEdges p
123
pathWidth :: Path -> Float -> H.Hubigraph () pathWidth p width = mapM_ (\n -> H.edgeWidth (mkEdgeId n) width) $ pathEdges p
123
pathWidth p width = mapM_ (\n -> H.edgeWidth (mkEdgeId n) width) $ pathEdges p
78
false
true
0
11
21
62
30
32
null
null
mjhoy/chorebot
src/Chorebot/Distributor.hs
gpl-2.0
askSanityCheckLimit = liftM sanityCheckLimit ask
48
askSanityCheckLimit = liftM sanityCheckLimit ask
48
askSanityCheckLimit = liftM sanityCheckLimit ask
48
false
false
0
5
4
11
5
6
null
null
ardumont/haskell-lab
src/Life.hs
gpl-2.0
wait :: Int -> IO () wait n = seqn [ return () | _ <- [1..n]]
61
wait :: Int -> IO () wait n = seqn [ return () | _ <- [1..n]]
61
wait n = seqn [ return () | _ <- [1..n]]
40
false
true
0
9
16
47
23
24
null
null
agrafix/Spock
Spock-core/test/Web/Spock/FrameworkSpecHelper.hs
bsd-3-clause
actionSpec :: SpecWith (st, Wai.Application) actionSpec = describe "Action Framework" $ do it "handles auth correctly" $ do request methodGet "/auth/user/pass" [mkAuthHeader "user" "pass"] "" `shouldRespondWith` "ok" {matchStatus = 200} request methodGet "/auth/user/pass" [mkAuth...
914
actionSpec :: SpecWith (st, Wai.Application) actionSpec = describe "Action Framework" $ do it "handles auth correctly" $ do request methodGet "/auth/user/pass" [mkAuthHeader "user" "pass"] "" `shouldRespondWith` "ok" {matchStatus = 200} request methodGet "/auth/user/pass" [mkAuth...
914
actionSpec = describe "Action Framework" $ do it "handles auth correctly" $ do request methodGet "/auth/user/pass" [mkAuthHeader "user" "pass"] "" `shouldRespondWith` "ok" {matchStatus = 200} request methodGet "/auth/user/pass" [mkAuthHeader "user" ""] "" `shouldRespondWith` "err...
869
false
true
0
14
186
270
138
132
null
null
crazymaik/ard-haskell
lib/ARD/Parser.hs
mit
pBlock :: SceneParser a -> SceneParser a pBlock = between (char '{' >> spaces) (char '}' >> spaces)
99
pBlock :: SceneParser a -> SceneParser a pBlock = between (char '{' >> spaces) (char '}' >> spaces)
99
pBlock = between (char '{' >> spaces) (char '}' >> spaces)
58
false
true
0
8
17
53
23
30
null
null
osa1/rho-torrent
test/Rho/TestUtils.hs
bsd-3-clause
-- | Create an IO action that returns next byte from the bytestring in each -- call. mkByteEmitter :: B.ByteString -> IO (IO B.ByteString) mkByteEmitter msg = do msgRef <- newIORef msg return $ do m <- readIORef msgRef case B.uncons m of Just (w, rest) -> do writeIORef msgRef rest ...
512
mkByteEmitter :: B.ByteString -> IO (IO B.ByteString) mkByteEmitter msg = do msgRef <- newIORef msg return $ do m <- readIORef msgRef case B.uncons m of Just (w, rest) -> do writeIORef msgRef rest return (B.singleton w) Nothing -> return B.empty -- signal closed s...
427
mkByteEmitter msg = do msgRef <- newIORef msg return $ do m <- readIORef msgRef case B.uncons m of Just (w, rest) -> do writeIORef msgRef rest return (B.singleton w) Nothing -> return B.empty -- signal closed socket -- | Generate two IO actions, first one to push...
373
true
true
0
19
138
128
59
69
null
null
IanConnolly/aws-sdk-fork
AWS/RDS/Event.hs
bsd-3-clause
eventSink :: MonadThrow m => Consumer XML.Event m Event eventSink = Event <$> do a <- getT "Message" traceShow a $ return a <*> getT "SourceType" <*> elements' "EventCategories" "EventCategory" text <*> getT "Date" <*> getT "SourceIdentifier"
286
eventSink :: MonadThrow m => Consumer XML.Event m Event eventSink = Event <$> do a <- getT "Message" traceShow a $ return a <*> getT "SourceType" <*> elements' "EventCategories" "EventCategory" text <*> getT "Date" <*> getT "SourceIdentifier"
286
eventSink = Event <$> do a <- getT "Message" traceShow a $ return a <*> getT "SourceType" <*> elements' "EventCategories" "EventCategory" text <*> getT "Date" <*> getT "SourceIdentifier"
222
false
true
14
8
80
102
47
55
null
null
AaronFriel/eff-experiments
src/Data/Iota/Tagged/Eff1.hs
bsd-3-clause
ts11r = ((10,10) ==) $ run (runStateR ts11 (0::Int))
52
ts11r = ((10,10) ==) $ run (runStateR ts11 (0::Int))
52
ts11r = ((10,10) ==) $ run (runStateR ts11 (0::Int))
52
false
false
3
8
8
41
21
20
null
null
HIPERFIT/futhark
src/Language/Futhark/Prop.hs
isc
modExpImports (ModApply _ me _ _ _) = modExpImports me
54
modExpImports (ModApply _ me _ _ _) = modExpImports me
54
modExpImports (ModApply _ me _ _ _) = modExpImports me
54
false
false
0
6
9
27
12
15
null
null
tolysz/prepare-ghcjs
spec-lts8/cabal/Cabal/Distribution/Simple/Utils.hs
bsd-3-clause
matchDirFileGlob :: FilePath -> FilePath -> IO [FilePath] matchDirFileGlob dir filepath = case parseFileGlob filepath of Nothing -> die $ "invalid file glob '" ++ filepath ++ "'. Wildcards '*' are only allowed in place of the file" ++ " name, not in the directory name or file extension...
1,184
matchDirFileGlob :: FilePath -> FilePath -> IO [FilePath] matchDirFileGlob dir filepath = case parseFileGlob filepath of Nothing -> die $ "invalid file glob '" ++ filepath ++ "'. Wildcards '*' are only allowed in place of the file" ++ " name, not in the directory name or file extension...
1,184
matchDirFileGlob dir filepath = case parseFileGlob filepath of Nothing -> die $ "invalid file glob '" ++ filepath ++ "'. Wildcards '*' are only allowed in place of the file" ++ " name, not in the directory name or file extension." ++ " If a wildcard is used it must be w...
1,126
false
true
0
17
330
217
109
108
null
null
ranjitjhala/gradr
Handler/Widgets.hs
mit
classInstructors classId instructor teachers insEnc insWidget = $(widgetFile "classInstructors")
98
classInstructors classId instructor teachers insEnc insWidget = $(widgetFile "classInstructors")
98
classInstructors classId instructor teachers insEnc insWidget = $(widgetFile "classInstructors")
98
false
false
0
7
10
24
11
13
null
null
mimi1vx/shellcheck
ShellCheck/Analytics.hs
gpl-3.0
prop_subshellAssignmentCheck15 = verifyNotTree subshellAssignmentCheck "#!/bin/ksh\ncat foo | while read bar; do a=$bar; done\necho \"$a\""
139
prop_subshellAssignmentCheck15 = verifyNotTree subshellAssignmentCheck "#!/bin/ksh\ncat foo | while read bar; do a=$bar; done\necho \"$a\""
139
prop_subshellAssignmentCheck15 = verifyNotTree subshellAssignmentCheck "#!/bin/ksh\ncat foo | while read bar; do a=$bar; done\necho \"$a\""
139
false
false
0
5
13
11
5
6
null
null
beni55/cryptol
src/Cryptol/Parser/AST.hs
bsd-3-clause
tpQName :: TParam -> QName tpQName = mkUnqual . tpName
55
tpQName :: TParam -> QName tpQName = mkUnqual . tpName
55
tpQName = mkUnqual . tpName
28
false
true
1
7
10
27
11
16
null
null
alphalambda/k12math
prog/graph/graph06.hs
mit
main = drawPicture myPicture
28
main = drawPicture myPicture
28
main = drawPicture myPicture
28
false
false
0
5
3
9
4
5
null
null
rueshyna/gogol
gogol-drive/gen/Network/Google/Drive/Types/Product.hs
mpl-2.0
-- | The user who created the comment. comAuthor :: Lens' Comment (Maybe User) comAuthor = lens _comAuthor (\ s a -> s{_comAuthor = a})
137
comAuthor :: Lens' Comment (Maybe User) comAuthor = lens _comAuthor (\ s a -> s{_comAuthor = a})
98
comAuthor = lens _comAuthor (\ s a -> s{_comAuthor = a})
58
true
true
0
9
26
48
25
23
null
null
snoyberg/ghc
compiler/nativeGen/PPC/Regs.hs
bsd-3-clause
realRegSqueeze :: RegClass -> RealReg -> Int realRegSqueeze cls rr = case cls of RcInteger -> case rr of RealRegSingle regNo | regNo < 32 -> 1 -- first fp reg is 32 | otherwise -> 0 RealRegPair{} -> 0...
554
realRegSqueeze :: RegClass -> RealReg -> Int realRegSqueeze cls rr = case cls of RcInteger -> case rr of RealRegSingle regNo | regNo < 32 -> 1 -- first fp reg is 32 | otherwise -> 0 RealRegPair{} -> 0...
554
realRegSqueeze cls rr = case cls of RcInteger -> case rr of RealRegSingle regNo | regNo < 32 -> 1 -- first fp reg is 32 | otherwise -> 0 RealRegPair{} -> 0 RcDouble -> case rr of ...
509
false
true
3
12
307
136
62
74
null
null
Cognimeta/perdure-file
src/Database/Perdure/LocalStoreFile.hs
apache-2.0
storeFileWriteWords :: (Endian w, RawStoreFile f) => f -> Len Word8 Word64 -> Endianness -> [PrimArray Pinned w] -> Async Bool () storeFileWriteWords f addr e bufs = storeFileWriteRaw f addr $ fmap fullArrayRange $ fromWords bufs where fromWords = bool (fmap $ unsafePrimArrayCast . mapImmArray swapBytes) (fmap unsafe...
439
storeFileWriteWords :: (Endian w, RawStoreFile f) => f -> Len Word8 Word64 -> Endianness -> [PrimArray Pinned w] -> Async Bool () storeFileWriteWords f addr e bufs = storeFileWriteRaw f addr $ fmap fullArrayRange $ fromWords bufs where fromWords = bool (fmap $ unsafePrimArrayCast . mapImmArray swapBytes) (fmap unsafe...
439
storeFileWriteWords f addr e bufs = storeFileWriteRaw f addr $ fmap fullArrayRange $ fromWords bufs where fromWords = bool (fmap $ unsafePrimArrayCast . mapImmArray swapBytes) (fmap unsafePrimArrayCast) (e == platformWordEndianness) -- The passed endianness must be the endianness of the words on the media
309
false
true
0
11
68
132
65
67
null
null
copton/bitcoin-script-tools
src/Language/Bitcoin/Utils.hs
gpl-3.0
extractSign :: B.ByteString -> (Int32 , B.ByteString) extractSign string = assert (B.length string == 4) $ let (msb, rest) = fromJust $ B.uncons string in if msb >= 0x70 then (-1, (msb - 0x70) `B.cons` rest) else (1, msb `B.cons` rest)
247
extractSign :: B.ByteString -> (Int32 , B.ByteString) extractSign string = assert (B.length string == 4) $ let (msb, rest) = fromJust $ B.uncons string in if msb >= 0x70 then (-1, (msb - 0x70) `B.cons` rest) else (1, msb `B.cons` rest)
247
extractSign string = assert (B.length string == 4) $ let (msb, rest) = fromJust $ B.uncons string in if msb >= 0x70 then (-1, (msb - 0x70) `B.cons` rest) else (1, msb `B.cons` rest)
193
false
true
0
12
52
123
67
56
null
null
TakeLab/gpkex
kex.hs
bsd-3-clause
eval (Times e1 e2) c = liftM2 (*) (eval e1 c) (eval e2 c)
57
eval (Times e1 e2) c = liftM2 (*) (eval e1 c) (eval e2 c)
57
eval (Times e1 e2) c = liftM2 (*) (eval e1 c) (eval e2 c)
57
false
false
0
7
13
44
22
22
null
null
zhangyz/llvm-slicing
src/LLVM/Slicing/Util/DefRef.hs
apache-2.0
valueDefs :: IsValue a => IntMap (HashSet Value) -> a -> HashSet Value valueDefs fms iv = HS.delete (toValue iv). recursiveOp addValuesFrom. HS.singleton $ toValue iv where insert v q = if isConstant v then q else HS.insert v q addValuesFrom :: HashSet Value -> Value -> HashSet Value addValuesFrom q v = ca...
2,567
valueDefs :: IsValue a => IntMap (HashSet Value) -> a -> HashSet Value valueDefs fms iv = HS.delete (toValue iv). recursiveOp addValuesFrom. HS.singleton $ toValue iv where insert v q = if isConstant v then q else HS.insert v q addValuesFrom :: HashSet Value -> Value -> HashSet Value addValuesFrom q v = ca...
2,567
valueDefs fms iv = HS.delete (toValue iv). recursiveOp addValuesFrom. HS.singleton $ toValue iv where insert v q = if isConstant v then q else HS.insert v q addValuesFrom :: HashSet Value -> Value -> HashSet Value addValuesFrom q v = case valueContent' v of InstructionC BranchInst {} -> q I...
2,496
false
true
8
14
821
738
362
376
null
null
vlastachu/haskell-ccg
app/Main.hs
bsd-3-clause
getDiagonal End = []
37
getDiagonal End = []
37
getDiagonal End = []
37
false
false
0
5
20
11
5
6
null
null
AlexanderPankiv/ghc
compiler/basicTypes/IdInfo.hs
bsd-3-clause
zapDemandInfo :: IdInfo -> Maybe IdInfo zapDemandInfo info = Just (info {demandInfo = topDmd})
94
zapDemandInfo :: IdInfo -> Maybe IdInfo zapDemandInfo info = Just (info {demandInfo = topDmd})
94
zapDemandInfo info = Just (info {demandInfo = topDmd})
54
false
true
0
8
13
35
18
17
null
null
wilbowma/accelerate
Data/Array/Accelerate/Interpreter.hs
bsd-3-clause
evalPrimConst (PrimMaxBound ty) = evalMaxBound ty
49
evalPrimConst (PrimMaxBound ty) = evalMaxBound ty
49
evalPrimConst (PrimMaxBound ty) = evalMaxBound ty
49
false
false
0
7
5
18
8
10
null
null
fmapfmapfmap/amazonka
amazonka-ec2/gen/Network/AWS/EC2/DescribeClassicLinkInstances.hs
mpl-2.0
-- | The maximum number of results to return for the request in a single -- page. The remaining results of the initial request can be seen by -- sending another request with the returned 'NextToken' value. This value -- can be between 5 and 1000; if 'MaxResults' is given a value larger than -- 1000, only 1000 results a...
641
dcliMaxResults :: Lens' DescribeClassicLinkInstances (Maybe Int) dcliMaxResults = lens _dcliMaxResults (\ s a -> s{_dcliMaxResults = a})
136
dcliMaxResults = lens _dcliMaxResults (\ s a -> s{_dcliMaxResults = a})
71
true
true
0
9
108
54
33
21
null
null
romanofski/gtfsbrisbane
test/TestSchedule.hs
bsd-3-clause
testFormatScheduleItem :: TestTree testFormatScheduleItem = testGroup "formats schedule item" $ makeTest <$> [ ( "punctual" , [punctual] , (defaultScheduleConfig $ TimeOfDay 7 45 0) , "Punctual 5min 07:50:00 ") , ( "punctual with walking delay" , [ testScheduleItem "Punctual" ...
1,497
testFormatScheduleItem :: TestTree testFormatScheduleItem = testGroup "formats schedule item" $ makeTest <$> [ ( "punctual" , [punctual] , (defaultScheduleConfig $ TimeOfDay 7 45 0) , "Punctual 5min 07:50:00 ") , ( "punctual with walking delay" , [ testScheduleItem "Punctual" ...
1,497
testFormatScheduleItem = testGroup "formats schedule item" $ makeTest <$> [ ( "punctual" , [punctual] , (defaultScheduleConfig $ TimeOfDay 7 45 0) , "Punctual 5min 07:50:00 ") , ( "punctual with walking delay" , [ testScheduleItem "Punctual" (TimeOfDay 7 50 0) 0 2] , (defa...
1,460
false
true
4
10
389
404
217
187
null
null
gcampax/ghc
compiler/hsSyn/HsExpr.hs
bsd-3-clause
noPostTcExpr :: PostTcExpr noPostTcExpr = HsLit (HsString "" (fsLit "noPostTcExpr"))
84
noPostTcExpr :: PostTcExpr noPostTcExpr = HsLit (HsString "" (fsLit "noPostTcExpr"))
84
noPostTcExpr = HsLit (HsString "" (fsLit "noPostTcExpr"))
57
false
true
0
9
9
28
14
14
null
null
brendanhay/gogol
gogol-serviceusage/gen/Network/Google/ServiceUsage/Types/Product.hs
mpl-2.0
-- | Whether the metric records instantaneous values, changes to a value, -- etc. Some combinations of \`metric_kind\` and \`value_type\` might not -- be supported. mdMetricKind :: Lens' MetricDescriptor (Maybe MetricDescriptorMetricKind) mdMetricKind = lens _mdMetricKind (\ s a -> s{_mdMetricKind = a})
306
mdMetricKind :: Lens' MetricDescriptor (Maybe MetricDescriptorMetricKind) mdMetricKind = lens _mdMetricKind (\ s a -> s{_mdMetricKind = a})
141
mdMetricKind = lens _mdMetricKind (\ s a -> s{_mdMetricKind = a})
67
true
true
0
9
43
50
27
23
null
null
fmthoma/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
word64ToIntegerName = varQual gHC_INTEGER_TYPE (fsLit "word64ToInteger") word64ToIntegerIdKey
97
word64ToIntegerName = varQual gHC_INTEGER_TYPE (fsLit "word64ToInteger") word64ToIntegerIdKey
97
word64ToIntegerName = varQual gHC_INTEGER_TYPE (fsLit "word64ToInteger") word64ToIntegerIdKey
97
false
false
0
7
10
19
9
10
null
null
martin-kolinek/stack
src/Path/Extra.hs
bsd-3-clause
-- | Add a relative FilePath to the end of a Path -- We can't parse the FilePath first because we need to account for ".." -- in the FilePath (#2895) concatAndColapseAbsDir :: MonadThrow m => Path Abs Dir -> FilePath -> m (Path Abs Dir) concatAndColapseAbsDir base rel = parseCollapsedAbsDir (toFilePath base FP.</> rel)
320
concatAndColapseAbsDir :: MonadThrow m => Path Abs Dir -> FilePath -> m (Path Abs Dir) concatAndColapseAbsDir base rel = parseCollapsedAbsDir (toFilePath base FP.</> rel)
170
concatAndColapseAbsDir base rel = parseCollapsedAbsDir (toFilePath base FP.</> rel)
83
true
true
0
10
54
65
32
33
null
null
kazu-yamamoto/llrbtree
Data/Heap/Leftist.hs
bsd-3-clause
null (Node _ _ _ _) = False
27
null (Node _ _ _ _) = False
27
null (Node _ _ _ _) = False
27
false
false
0
6
7
22
10
12
null
null
truls/language-vhdl-quote
src/Language/VHDL/Parser/Internal.hs
mpl-2.0
-------------------------------------------------------------------------------- -- ** 3.2.1 Array types {- array_type_definition ::= unconstrained_array_definition | constrained_array_definition unconstrained_array_definition ::= ARRAY ( index_subtype_definition { , index_subtype_definitio...
873
arrayTypeDefinition :: Parser ArrayTypeDefinition arrayTypeDefinition = trace "arrayTypedefinition" $ reserved "array" >> choice [ ArrU <$> try unconstrainedArrayDefinition , ArrC <$> constrainedArrayDefinition ]
230
arrayTypeDefinition = trace "arrayTypedefinition" $ reserved "array" >> choice [ ArrU <$> try unconstrainedArrayDefinition , ArrC <$> constrainedArrayDefinition ]
180
true
true
0
7
153
51
26
25
null
null
friedbrice/Haskell
ch09/cat.hs
gpl-2.0
main :: IO () main = do paths <- getArgs conts <- mapM readFile paths let cat = concat conts putStr cat
111
main :: IO () main = do paths <- getArgs conts <- mapM readFile paths let cat = concat conts putStr cat
111
main = do paths <- getArgs conts <- mapM readFile paths let cat = concat conts putStr cat
97
false
true
0
10
29
53
23
30
null
null
esmolanka/sexp-grammar
invertible-grammar/src/Data/InvertibleGrammar/Base.hs
bsd-3-clause
trace :: String -> a -> a trace = if False then Debug.Trace.trace else flip const
81
trace :: String -> a -> a trace = if False then Debug.Trace.trace else flip const
81
trace = if False then Debug.Trace.trace else flip const
55
false
true
0
6
15
33
18
15
null
null
danr/hipspec
examples/old-examples/hip/Queues.hs
gpl-3.0
enqueue :: a -> Queue a -> Queue a enqueue x (Queue [] []) = Queue [x] []
73
enqueue :: a -> Queue a -> Queue a enqueue x (Queue [] []) = Queue [x] []
73
enqueue x (Queue [] []) = Queue [x] []
38
false
true
0
7
17
57
26
31
null
null
MichaelBurge/haskell-authorize-net
test/Test/Network/AuthorizeNet/Util.hs
bsd-3-clause
testMerchantAuthentication :: MerchantAuthentication testMerchantAuthentication = MerchantAuthentication { merchantAuthentication_name = "API_LOGIN_ID", merchantAuthentication_transactionKey = "API_TRANSACTION_KEY" }
232
testMerchantAuthentication :: MerchantAuthentication testMerchantAuthentication = MerchantAuthentication { merchantAuthentication_name = "API_LOGIN_ID", merchantAuthentication_transactionKey = "API_TRANSACTION_KEY" }
232
testMerchantAuthentication = MerchantAuthentication { merchantAuthentication_name = "API_LOGIN_ID", merchantAuthentication_transactionKey = "API_TRANSACTION_KEY" }
179
false
true
0
6
29
25
15
10
null
null
brendanhay/gogol
gogol-cloudkms/gen/Network/Google/CloudKMS/Types/Product.hs
mpl-2.0
-- | The list of CryptoKeys. lckrCryptoKeys :: Lens' ListCryptoKeysResponse [CryptoKey] lckrCryptoKeys = lens _lckrCryptoKeys (\ s a -> s{_lckrCryptoKeys = a}) . _Default . _Coerce
200
lckrCryptoKeys :: Lens' ListCryptoKeysResponse [CryptoKey] lckrCryptoKeys = lens _lckrCryptoKeys (\ s a -> s{_lckrCryptoKeys = a}) . _Default . _Coerce
171
lckrCryptoKeys = lens _lckrCryptoKeys (\ s a -> s{_lckrCryptoKeys = a}) . _Default . _Coerce
112
true
true
0
11
45
53
28
25
null
null
zhiyuanshi/fcore
frontend/typecheck/TypeCheck.hs
bsd-2-clause
inferExpr this@(L loc (TApp e arg)) = do (t, e') <- inferExpr e checkType arg d <- getTypeContext let arg' = expandType d arg case t of Forall (a,c) t1 -> do case c of Nothing -> return () Just t -> do result <- subtype arg t ...
806
inferExpr this@(L loc (TApp e arg)) = do (t, e') <- inferExpr e checkType arg d <- getTypeContext let arg' = expandType d arg case t of Forall (a,c) t1 -> do case c of Nothing -> return () Just t -> do result <- subtype arg t ...
806
inferExpr this@(L loc (TApp e arg)) = do (t, e') <- inferExpr e checkType arg d <- getTypeContext let arg' = expandType d arg case t of Forall (a,c) t1 -> do case c of Nothing -> return () Just t -> do result <- subtype arg t ...
806
false
false
2
26
281
326
154
172
null
null
JustusAdam/marvin
src/Marvin/Adapter/Slack/Internal/Common.hs
bsd-3-clause
flip2_1 :: (a -> b -> c -> d) -> c -> a -> b -> d flip2_1 f c a b = f a b c
75
flip2_1 :: (a -> b -> c -> d) -> c -> a -> b -> d flip2_1 f c a b = f a b c
75
flip2_1 f c a b = f a b c
25
false
true
0
9
26
58
29
29
null
null
seppeljordan/geimskell
tests/UnitTests.hs
gpl-3.0
testEventToMaybeWindowResizeEvent :: TestEvent a -> Maybe (V2 CInt) testEventToMaybeWindowResizeEvent (TestWindowResizeEvent x) = Just x
136
testEventToMaybeWindowResizeEvent :: TestEvent a -> Maybe (V2 CInt) testEventToMaybeWindowResizeEvent (TestWindowResizeEvent x) = Just x
136
testEventToMaybeWindowResizeEvent (TestWindowResizeEvent x) = Just x
68
false
true
0
8
13
43
19
24
null
null
raichoo/Idris-dev
src/Idris/Reflection.hs
bsd-3-clause
reifyPair left right tm = fail $ "Not a pair: " ++ show tm
58
reifyPair left right tm = fail $ "Not a pair: " ++ show tm
58
reifyPair left right tm = fail $ "Not a pair: " ++ show tm
58
false
false
0
6
13
24
11
13
null
null
uduki/hsQt
Qtc/Gui/QDialogButtonBox.hs
bsd-2-clause
qDialogButtonBox_delete :: QDialogButtonBox a -> IO () qDialogButtonBox_delete x0 = withObjectPtr x0 $ \cobj_x0 -> qtc_QDialogButtonBox_delete cobj_x0
156
qDialogButtonBox_delete :: QDialogButtonBox a -> IO () qDialogButtonBox_delete x0 = withObjectPtr x0 $ \cobj_x0 -> qtc_QDialogButtonBox_delete cobj_x0
156
qDialogButtonBox_delete x0 = withObjectPtr x0 $ \cobj_x0 -> qtc_QDialogButtonBox_delete cobj_x0
101
false
true
0
7
22
41
19
22
null
null
beni55/cps-core
Main.hs
bsd-3-clause
caseBoundFunctionExample :: G.Term caseBoundFunctionExample = G.Case (G.Value (G.Lambda (G.ATyVar a) (G.Value (G.Lambda (G.AnId x) (G.Var x))))) intTy lifted_id [(G.DefaultAlt, G.Case (G.Value (G.Literal (Int 1))) intTy one [(G.DefaultAlt, G.LetRec [(boxed_one...
934
caseBoundFunctionExample :: G.Term caseBoundFunctionExample = G.Case (G.Value (G.Lambda (G.ATyVar a) (G.Value (G.Lambda (G.AnId x) (G.Var x))))) intTy lifted_id [(G.DefaultAlt, G.Case (G.Value (G.Literal (Int 1))) intTy one [(G.DefaultAlt, G.LetRec [(boxed_one...
934
caseBoundFunctionExample = G.Case (G.Value (G.Lambda (G.ATyVar a) (G.Value (G.Lambda (G.AnId x) (G.Var x))))) intTy lifted_id [(G.DefaultAlt, G.Case (G.Value (G.Literal (Int 1))) intTy one [(G.DefaultAlt, G.LetRec [(boxed_one, G.Value (G.Data G.iHashDataCon []...
899
false
true
5
20
233
416
227
189
null
null
CarstenKoenig/Countdown
src/lib/Countdown/Completion.hs
mit
start :: [Int] -> [(Input, Expression)] start ns = [ (inp, applyInput Hole inp) | inp <- possibleInputs ns Hole ]
113
start :: [Int] -> [(Input, Expression)] start ns = [ (inp, applyInput Hole inp) | inp <- possibleInputs ns Hole ]
113
start ns = [ (inp, applyInput Hole inp) | inp <- possibleInputs ns Hole ]
73
false
true
0
9
20
61
32
29
null
null
tolysz/prepare-ghcjs
spec-lts8/base/GHC/IO/Encoding/Iconv.hs
bsd-3-clause
iconvDecode :: IConv -> DecodeBuffer iconvDecode iconv_t ibuf obuf = iconvRecode iconv_t ibuf 0 obuf char_shift
111
iconvDecode :: IConv -> DecodeBuffer iconvDecode iconv_t ibuf obuf = iconvRecode iconv_t ibuf 0 obuf char_shift
111
iconvDecode iconv_t ibuf obuf = iconvRecode iconv_t ibuf 0 obuf char_shift
74
false
true
0
5
15
33
16
17
null
null
keera-studios/pngload
Codec/Image/PNG.hs
bsd-2-clause
bytesPerPixel Ct4 Bd16 = 4
28
bytesPerPixel Ct4 Bd16 = 4
28
bytesPerPixel Ct4 Bd16 = 4
28
false
false
0
5
6
11
5
6
null
null
M42/interludio
RandomChord.hs
gpl-2.0
-- | Probability distribution of the next chord given one. -- Based on the classical harmonical rules. nextChordDist :: Degree -> [(Degree, Rational)] nextChordDist I = [(II,1), (IV,1), (V,1), (VI,1)]
204
nextChordDist :: Degree -> [(Degree, Rational)] nextChordDist I = [(II,1), (IV,1), (V,1), (VI,1)]
99
nextChordDist I = [(II,1), (IV,1), (V,1), (VI,1)]
51
true
true
0
9
33
71
42
29
null
null
geoffhuston/Network.Irc
Network/Irc/Parse.hs
bsd-3-clause
pingParser :: Parser Text pingParser = do string "PING " takeText
73
pingParser :: Parser Text pingParser = do string "PING " takeText
73
pingParser = do string "PING " takeText
47
false
true
0
7
18
23
10
13
null
null
geophf/1HaskellADay
exercises/HAD/Y2017/M02/D16/Solution.hs
mit
{-- >>> uncurry cross parentsA Prob {getProb = [(AA,1 % 2),(Aa,1 % 2)]} --} -- What is the Genotype of a child whose parents are a = "Aa" b ="Aa"? parentsB = adjoin mkgene ("Aa", "Aa")
186
parentsB = adjoin mkgene ("Aa", "Aa")
37
parentsB = adjoin mkgene ("Aa", "Aa")
37
true
false
0
6
37
19
11
8
null
null
kailuowang/BeautifulMinds
tests/FaveGraphSpec.hs
mit
clean :: IO () clean = do _ <- perform $ TC.runTransaction $ TC.cypher " MATCH (n) \ \ OPTIONAL MATCH (n)-[r]-() \ \ DELETE n, r " M.empty return ()
253
clean :: IO () clean = do _ <- perform $ TC.runTransaction $ TC.cypher " MATCH (n) \ \ OPTIONAL MATCH (n)-[r]-() \ \ DELETE n, r " M.empty return ()
253
clean = do _ <- perform $ TC.runTransaction $ TC.cypher " MATCH (n) \ \ OPTIONAL MATCH (n)-[r]-() \ \ DELETE n, r " M.empty return ()
238
false
true
0
10
135
50
23
27
null
null
mightybyte/reflex-dom-stubs
src/GHCJS/DOM/HTMLTextAreaElement.hs
bsd-3-clause
ghcjs_dom_html_text_area_element_get_default_value = undefined
62
ghcjs_dom_html_text_area_element_get_default_value = undefined
62
ghcjs_dom_html_text_area_element_get_default_value = undefined
62
false
false
0
4
2
6
3
3
null
null