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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Teaspot-Studio/Urho3D-Haskell
|
urho3d-bindgen/src/Graphics/Urho3D/Container/Ptr.hs
|
mit
|
weakPtr :: (WeakPointerFinalizer pw a, SharedPointerFinalizer ps a) => SharedPtr a -> WeakPtr a
weakPtr = makePointer . pointer
| 127
|
weakPtr :: (WeakPointerFinalizer pw a, SharedPointerFinalizer ps a) => SharedPtr a -> WeakPtr a
weakPtr = makePointer . pointer
| 127
|
weakPtr = makePointer . pointer
| 31
| false
| true
| 0
| 7
| 18
| 44
| 22
| 22
| null | null |
acowley/ghc
|
compiler/coreSyn/TrieMap.hs
|
bsd-3-clause
|
xtA env (LitAlt l, _, rhs) f m =
m { am_lit = am_lit m |> xtLit l |>> xtG (D env rhs) f }
| 99
|
xtA env (LitAlt l, _, rhs) f m =
m { am_lit = am_lit m |> xtLit l |>> xtG (D env rhs) f }
| 99
|
xtA env (LitAlt l, _, rhs) f m =
m { am_lit = am_lit m |> xtLit l |>> xtG (D env rhs) f }
| 99
| false
| false
| 1
| 11
| 34
| 71
| 32
| 39
| null | null |
ml9951/ghc
|
compiler/prelude/PrelNames.hs
|
bsd-3-clause
|
filterName = varQual gHC_LIST (fsLit "filter") filterIdKey
| 65
|
filterName = varQual gHC_LIST (fsLit "filter") filterIdKey
| 65
|
filterName = varQual gHC_LIST (fsLit "filter") filterIdKey
| 65
| false
| false
| 0
| 7
| 13
| 19
| 9
| 10
| null | null |
dysinger/amazonka
|
amazonka-storagegateway/gen/Network/AWS/StorageGateway/CreateSnapshotFromVolumeRecoveryPoint.hs
|
mpl-2.0
|
csfvrprVolumeARN :: Lens' CreateSnapshotFromVolumeRecoveryPointResponse (Maybe Text)
csfvrprVolumeARN = lens _csfvrprVolumeARN (\s a -> s { _csfvrprVolumeARN = a })
| 164
|
csfvrprVolumeARN :: Lens' CreateSnapshotFromVolumeRecoveryPointResponse (Maybe Text)
csfvrprVolumeARN = lens _csfvrprVolumeARN (\s a -> s { _csfvrprVolumeARN = a })
| 164
|
csfvrprVolumeARN = lens _csfvrprVolumeARN (\s a -> s { _csfvrprVolumeARN = a })
| 79
| false
| true
| 1
| 9
| 18
| 49
| 24
| 25
| null | null |
jwiegley/github
|
samples/Gists/Comments/ShowComment.hs
|
bsd-3-clause
|
formatDate = show . Github.fromDate
| 35
|
formatDate = show . Github.fromDate
| 35
|
formatDate = show . Github.fromDate
| 35
| false
| false
| 0
| 6
| 4
| 12
| 6
| 6
| null | null |
jwiegley/ghc-release
|
libraries/Cabal/cabal/Distribution/Simple/BuildTarget.hs
|
gpl-3.0
|
matchModuleFileUnrooted :: [ModuleName] -> String -> Match FilePath
matchModuleFileUnrooted ms str = do
let filepath = normalise str
_ <- matchModuleFileStem ms filepath
return filepath
| 197
|
matchModuleFileUnrooted :: [ModuleName] -> String -> Match FilePath
matchModuleFileUnrooted ms str = do
let filepath = normalise str
_ <- matchModuleFileStem ms filepath
return filepath
| 197
|
matchModuleFileUnrooted ms str = do
let filepath = normalise str
_ <- matchModuleFileStem ms filepath
return filepath
| 129
| false
| true
| 1
| 10
| 36
| 60
| 27
| 33
| null | null |
dblia/nosql-ganeti
|
test/hs/Test/Ganeti/HTools/Cluster.hs
|
gpl-2.0
|
prop_CheckConsistency :: Node.Node -> Instance.Instance -> Bool
prop_CheckConsistency node inst =
let nl = makeSmallCluster node 3
(node1, node2, node3) =
case Container.elems nl of
[a, b, c] -> (a, b, c)
l -> error $ "Invalid node list out of makeSmallCluster/3: " ++
show l
node3' = node3 { Node.group = 1 }
nl' = Container.add (Node.idx node3') node3' nl
inst1 = Instance.setBoth inst (Node.idx node1) (Node.idx node2)
inst2 = Instance.setBoth inst (Node.idx node1) Node.noSecondary
inst3 = Instance.setBoth inst (Node.idx node1) (Node.idx node3)
ccheck = Cluster.findSplitInstances nl' . Container.fromList
in null (ccheck [(0, inst1)]) &&
null (ccheck [(0, inst2)]) &&
(not . null $ ccheck [(0, inst3)])
| 807
|
prop_CheckConsistency :: Node.Node -> Instance.Instance -> Bool
prop_CheckConsistency node inst =
let nl = makeSmallCluster node 3
(node1, node2, node3) =
case Container.elems nl of
[a, b, c] -> (a, b, c)
l -> error $ "Invalid node list out of makeSmallCluster/3: " ++
show l
node3' = node3 { Node.group = 1 }
nl' = Container.add (Node.idx node3') node3' nl
inst1 = Instance.setBoth inst (Node.idx node1) (Node.idx node2)
inst2 = Instance.setBoth inst (Node.idx node1) Node.noSecondary
inst3 = Instance.setBoth inst (Node.idx node1) (Node.idx node3)
ccheck = Cluster.findSplitInstances nl' . Container.fromList
in null (ccheck [(0, inst1)]) &&
null (ccheck [(0, inst2)]) &&
(not . null $ ccheck [(0, inst3)])
| 807
|
prop_CheckConsistency node inst =
let nl = makeSmallCluster node 3
(node1, node2, node3) =
case Container.elems nl of
[a, b, c] -> (a, b, c)
l -> error $ "Invalid node list out of makeSmallCluster/3: " ++
show l
node3' = node3 { Node.group = 1 }
nl' = Container.add (Node.idx node3') node3' nl
inst1 = Instance.setBoth inst (Node.idx node1) (Node.idx node2)
inst2 = Instance.setBoth inst (Node.idx node1) Node.noSecondary
inst3 = Instance.setBoth inst (Node.idx node1) (Node.idx node3)
ccheck = Cluster.findSplitInstances nl' . Container.fromList
in null (ccheck [(0, inst1)]) &&
null (ccheck [(0, inst2)]) &&
(not . null $ ccheck [(0, inst3)])
| 743
| false
| true
| 0
| 13
| 206
| 313
| 164
| 149
| null | null |
afcowie/new-snap-server
|
src/Snap/Internal/Http/Server/Date.hs
|
bsd-3-clause
|
getLogDateString :: IO ByteString
getLogDateString = mask_ $ do
ensureFreshDate
readIORef $ _cachedLogString dateState
------------------------------------------------------------------------------
| 207
|
getLogDateString :: IO ByteString
getLogDateString = mask_ $ do
ensureFreshDate
readIORef $ _cachedLogString dateState
------------------------------------------------------------------------------
| 207
|
getLogDateString = mask_ $ do
ensureFreshDate
readIORef $ _cachedLogString dateState
------------------------------------------------------------------------------
| 173
| false
| true
| 2
| 9
| 24
| 39
| 16
| 23
| null | null |
bgold-cosmos/Tidal
|
src/Sound/Tidal/Params.hs
|
gpl-3.0
|
ctfg :: Pattern Double -> ControlPattern
ctfg = cutoffegint
| 59
|
ctfg :: Pattern Double -> ControlPattern
ctfg = cutoffegint
| 59
|
ctfg = cutoffegint
| 18
| false
| true
| 0
| 7
| 8
| 25
| 10
| 15
| null | null |
mauroblanco/fpnla-examples
|
src-test/TestBLAS.hs
|
bsd-3-clause
|
main :: IO ()
main = do
putStrLn "execGEMMQC"
res1 <- quickCheckResult propDefSeqStratIsOK_Inst
res2 <- quickCheckResult propBlocksSeqStratIsOK_Inst
res3 <- quickCheckResult propDefParMPStratIsOK_Inst
res4 <- quickCheckResult propBlocksParMPStratIsOK_Inst
res5 <- quickCheckResult propDefParSTStratIsOK_Inst
res6 <- quickCheckResult propBlocksParSTStratIsOK_Inst
putStrLn "execGEMMAccQC"
--res7 <- quickCheckResult propDefParAccStratIsOK_Inst
putStrLn "execStrassenQC"
res8 <- quickCheckResult propStrassenMPStratIsOK_Inst
res10 <- quickCheckResult propStrassenSTStratIsOK_Inst
putStrLn "execTRSMQC"
res11 <- quickCheckResult propTRSMStratIsOK_Inst
res12 <- quickCheckResult propTRSMBlockByColsIsOK_Inst
res13 <- quickCheckResult propTRSMBlockByRowsIsOK_Inst
res14 <- quickCheckResult propTRSMMPStratIsOK_Inst
res15 <- quickCheckResult propTRSMSTStratIsOK_Inst
handleResult res1
handleResult res2
handleResult res3
handleResult res4
handleResult res5
handleResult res6
--handleResult res7
handleResult res8
handleResult res10
handleResult res11
handleResult res12
handleResult res13
handleResult res14
handleResult res15
| 1,248
|
main :: IO ()
main = do
putStrLn "execGEMMQC"
res1 <- quickCheckResult propDefSeqStratIsOK_Inst
res2 <- quickCheckResult propBlocksSeqStratIsOK_Inst
res3 <- quickCheckResult propDefParMPStratIsOK_Inst
res4 <- quickCheckResult propBlocksParMPStratIsOK_Inst
res5 <- quickCheckResult propDefParSTStratIsOK_Inst
res6 <- quickCheckResult propBlocksParSTStratIsOK_Inst
putStrLn "execGEMMAccQC"
--res7 <- quickCheckResult propDefParAccStratIsOK_Inst
putStrLn "execStrassenQC"
res8 <- quickCheckResult propStrassenMPStratIsOK_Inst
res10 <- quickCheckResult propStrassenSTStratIsOK_Inst
putStrLn "execTRSMQC"
res11 <- quickCheckResult propTRSMStratIsOK_Inst
res12 <- quickCheckResult propTRSMBlockByColsIsOK_Inst
res13 <- quickCheckResult propTRSMBlockByRowsIsOK_Inst
res14 <- quickCheckResult propTRSMMPStratIsOK_Inst
res15 <- quickCheckResult propTRSMSTStratIsOK_Inst
handleResult res1
handleResult res2
handleResult res3
handleResult res4
handleResult res5
handleResult res6
--handleResult res7
handleResult res8
handleResult res10
handleResult res11
handleResult res12
handleResult res13
handleResult res14
handleResult res15
| 1,248
|
main = do
putStrLn "execGEMMQC"
res1 <- quickCheckResult propDefSeqStratIsOK_Inst
res2 <- quickCheckResult propBlocksSeqStratIsOK_Inst
res3 <- quickCheckResult propDefParMPStratIsOK_Inst
res4 <- quickCheckResult propBlocksParMPStratIsOK_Inst
res5 <- quickCheckResult propDefParSTStratIsOK_Inst
res6 <- quickCheckResult propBlocksParSTStratIsOK_Inst
putStrLn "execGEMMAccQC"
--res7 <- quickCheckResult propDefParAccStratIsOK_Inst
putStrLn "execStrassenQC"
res8 <- quickCheckResult propStrassenMPStratIsOK_Inst
res10 <- quickCheckResult propStrassenSTStratIsOK_Inst
putStrLn "execTRSMQC"
res11 <- quickCheckResult propTRSMStratIsOK_Inst
res12 <- quickCheckResult propTRSMBlockByColsIsOK_Inst
res13 <- quickCheckResult propTRSMBlockByRowsIsOK_Inst
res14 <- quickCheckResult propTRSMMPStratIsOK_Inst
res15 <- quickCheckResult propTRSMSTStratIsOK_Inst
handleResult res1
handleResult res2
handleResult res3
handleResult res4
handleResult res5
handleResult res6
--handleResult res7
handleResult res8
handleResult res10
handleResult res11
handleResult res12
handleResult res13
handleResult res14
handleResult res15
| 1,234
| false
| true
| 0
| 9
| 226
| 256
| 97
| 159
| null | null |
trin-cz/glxgears-haskell
|
heart/ViewRotation.hs
|
mit
|
keyboardRot (Char 'h') = do
matrixMode $= Modelview 0
rotate (-_ROTATION_STEP) $ (Vector3 0 1 (0::GLfloat))
postRedisplay Nothing
| 135
|
keyboardRot (Char 'h') = do
matrixMode $= Modelview 0
rotate (-_ROTATION_STEP) $ (Vector3 0 1 (0::GLfloat))
postRedisplay Nothing
| 135
|
keyboardRot (Char 'h') = do
matrixMode $= Modelview 0
rotate (-_ROTATION_STEP) $ (Vector3 0 1 (0::GLfloat))
postRedisplay Nothing
| 135
| false
| false
| 0
| 10
| 23
| 62
| 29
| 33
| null | null |
bergey/plots
|
examples/line.hs
|
bsd-3-clause
|
mydata1 = [(1,3), (2,5.5), (3.2, 6), (3.5, 6.1)]
| 48
|
mydata1 = [(1,3), (2,5.5), (3.2, 6), (3.5, 6.1)]
| 48
|
mydata1 = [(1,3), (2,5.5), (3.2, 6), (3.5, 6.1)]
| 48
| false
| false
| 1
| 6
| 7
| 45
| 27
| 18
| null | null |
tolysz/prepare-ghcjs
|
spec-lts8/base/Foreign/C/Error.hs
|
bsd-3-clause
|
eDOM = Errno (CONST_EDOM)
| 36
|
eDOM = Errno (CONST_EDOM)
| 36
|
eDOM = Errno (CONST_EDOM)
| 36
| false
| false
| 0
| 6
| 14
| 12
| 6
| 6
| null | null |
tcrayford/hafka
|
Network/Kafka/Specs/Kafka/EndToEnd/KeepAliveProducerSpecs.hs
|
bsd-3-clause
|
keepAliveProducerReconnects :: Spec
keepAliveProducerReconnects = it "reconnects after the socket is closed" $ do
let stream = Stream (Topic "keep_alive_producer_reconnects_to_closed_sockets") (Partition 0)
message = Message "keep_alive_producer_should_receive_this_after_closing_socket"
(testProducer, testConsumer) = coupledProducerConsumer stream
result <- newEmptyMVar
p <- keepAliveProducer testProducer
killSocket' p
recordMatching testConsumer message result
produce p [message]
waitFor result message (killSocket' p)
| 589
|
keepAliveProducerReconnects :: Spec
keepAliveProducerReconnects = it "reconnects after the socket is closed" $ do
let stream = Stream (Topic "keep_alive_producer_reconnects_to_closed_sockets") (Partition 0)
message = Message "keep_alive_producer_should_receive_this_after_closing_socket"
(testProducer, testConsumer) = coupledProducerConsumer stream
result <- newEmptyMVar
p <- keepAliveProducer testProducer
killSocket' p
recordMatching testConsumer message result
produce p [message]
waitFor result message (killSocket' p)
| 589
|
keepAliveProducerReconnects = it "reconnects after the socket is closed" $ do
let stream = Stream (Topic "keep_alive_producer_reconnects_to_closed_sockets") (Partition 0)
message = Message "keep_alive_producer_should_receive_this_after_closing_socket"
(testProducer, testConsumer) = coupledProducerConsumer stream
result <- newEmptyMVar
p <- keepAliveProducer testProducer
killSocket' p
recordMatching testConsumer message result
produce p [message]
waitFor result message (killSocket' p)
| 553
| false
| true
| 0
| 13
| 116
| 127
| 58
| 69
| null | null |
ardumont/haskell-lab
|
test/BSTTests.hs
|
gpl-2.0
|
testContains7 :: Test
testContains7 = True ~=? contains t1 3
| 60
|
testContains7 :: Test
testContains7 = True ~=? contains t1 3
| 60
|
testContains7 = True ~=? contains t1 3
| 38
| false
| true
| 0
| 6
| 9
| 20
| 10
| 10
| null | null |
kazu-yamamoto/http2
|
test-hpack/HPACKDecode.hs
|
bsd-3-clause
|
testLoop :: Conf
-> [Case]
-> DynamicTable
-> IO Result
testLoop _ [] _ = return Pass
| 124
|
testLoop :: Conf
-> [Case]
-> DynamicTable
-> IO Result
testLoop _ [] _ = return Pass
| 124
|
testLoop _ [] _ = return Pass
| 41
| false
| true
| 0
| 8
| 55
| 41
| 20
| 21
| null | null |
vikraman/ghc
|
compiler/basicTypes/Id.hs
|
bsd-3-clause
|
---------------------------------
-- Occcurrence INFO
idOccInfo :: Id -> OccInfo
idOccInfo id = occInfo (idInfo id)
| 123
|
idOccInfo :: Id -> OccInfo
idOccInfo id = occInfo (idInfo id)
| 61
|
idOccInfo id = occInfo (idInfo id)
| 34
| true
| true
| 0
| 7
| 22
| 34
| 16
| 18
| null | null |
keithodulaigh/Hets
|
HasCASL/Constrain.hs
|
gpl-2.0
|
entail :: Monad m => Env -> Constrain -> m ()
entail te c = let cm = classMap te in case c of
Kinding ty k -> if k == universe then
assert (rawKindOfType ty == ClassKind ())
$ return () else
let Result _ds mk = inferKinds Nothing ty te in
case mk of
Nothing -> fail $ "constrain '" ++
showDoc c "' is unprovable"
Just ((_, ks), _) -> when (newKind cm k ks)
$ fail $ "constrain '" ++
showDoc c "' is unprovable" ++
if Set.null ks then "" else
"\n known kinds are: " ++ showDoc ks ""
Subtyping t1 t2 -> unless (lesserType te t1 t2)
$ fail ("unable to prove: " ++ showDoc t1 " < "
++ showDoc t2 "")
| 916
|
entail :: Monad m => Env -> Constrain -> m ()
entail te c = let cm = classMap te in case c of
Kinding ty k -> if k == universe then
assert (rawKindOfType ty == ClassKind ())
$ return () else
let Result _ds mk = inferKinds Nothing ty te in
case mk of
Nothing -> fail $ "constrain '" ++
showDoc c "' is unprovable"
Just ((_, ks), _) -> when (newKind cm k ks)
$ fail $ "constrain '" ++
showDoc c "' is unprovable" ++
if Set.null ks then "" else
"\n known kinds are: " ++ showDoc ks ""
Subtyping t1 t2 -> unless (lesserType te t1 t2)
$ fail ("unable to prove: " ++ showDoc t1 " < "
++ showDoc t2 "")
| 916
|
entail te c = let cm = classMap te in case c of
Kinding ty k -> if k == universe then
assert (rawKindOfType ty == ClassKind ())
$ return () else
let Result _ds mk = inferKinds Nothing ty te in
case mk of
Nothing -> fail $ "constrain '" ++
showDoc c "' is unprovable"
Just ((_, ks), _) -> when (newKind cm k ks)
$ fail $ "constrain '" ++
showDoc c "' is unprovable" ++
if Set.null ks then "" else
"\n known kinds are: " ++ showDoc ks ""
Subtyping t1 t2 -> unless (lesserType te t1 t2)
$ fail ("unable to prove: " ++ showDoc t1 " < "
++ showDoc t2 "")
| 870
| false
| true
| 0
| 22
| 450
| 284
| 134
| 150
| null | null |
DaMSL/K3
|
src/Language/K3/Codegen/KTrace/KTraceDB.hs
|
apache-2.0
|
compareField :: (String, String) -> Either String String
compareField (field, typ) | typ == varcharType = Right $ proj "l" ++ " = " ++ proj "r"
| typ == intType = Right $ proj "l" ++ " = " ++ proj "r"
| typ == doubleType = Right $ abs (proj "l" ++ "-" ++ proj "r") ++ " < .01"
| otherwise = Left $ "Invalid type for result comparison: " ++ typ
where
proj t = t ++ "." ++ field
abs s = "ABS(" ++ s ++ ")"
{- Constants -}
-- Key for joining Globals and Messages
-- Prefixed with _ to help avoid name clashes with global vars
| 618
|
compareField :: (String, String) -> Either String String
compareField (field, typ) | typ == varcharType = Right $ proj "l" ++ " = " ++ proj "r"
| typ == intType = Right $ proj "l" ++ " = " ++ proj "r"
| typ == doubleType = Right $ abs (proj "l" ++ "-" ++ proj "r") ++ " < .01"
| otherwise = Left $ "Invalid type for result comparison: " ++ typ
where
proj t = t ++ "." ++ field
abs s = "ABS(" ++ s ++ ")"
{- Constants -}
-- Key for joining Globals and Messages
-- Prefixed with _ to help avoid name clashes with global vars
| 618
|
compareField (field, typ) | typ == varcharType = Right $ proj "l" ++ " = " ++ proj "r"
| typ == intType = Right $ proj "l" ++ " = " ++ proj "r"
| typ == doubleType = Right $ abs (proj "l" ++ "-" ++ proj "r") ++ " < .01"
| otherwise = Left $ "Invalid type for result comparison: " ++ typ
where
proj t = t ++ "." ++ field
abs s = "ABS(" ++ s ++ ")"
{- Constants -}
-- Key for joining Globals and Messages
-- Prefixed with _ to help avoid name clashes with global vars
| 561
| false
| true
| 1
| 12
| 209
| 190
| 92
| 98
| null | null |
Rydgel/snakeskell
|
src/Main.hs
|
mit
|
hoistState :: Monad m => State s a -> StateT s m a
hoistState = StateT . (return .) . runState
| 94
|
hoistState :: Monad m => State s a -> StateT s m a
hoistState = StateT . (return .) . runState
| 94
|
hoistState = StateT . (return .) . runState
| 43
| false
| true
| 1
| 8
| 20
| 53
| 24
| 29
| null | null |
fmapfmapfmap/amazonka
|
amazonka-cloudwatch/test/Test/AWS/Gen/CloudWatch.hs
|
mpl-2.0
|
testDescribeAlarmHistory :: DescribeAlarmHistory -> TestTree
testDescribeAlarmHistory = req
"DescribeAlarmHistory"
"fixture/DescribeAlarmHistory.yaml"
| 158
|
testDescribeAlarmHistory :: DescribeAlarmHistory -> TestTree
testDescribeAlarmHistory = req
"DescribeAlarmHistory"
"fixture/DescribeAlarmHistory.yaml"
| 158
|
testDescribeAlarmHistory = req
"DescribeAlarmHistory"
"fixture/DescribeAlarmHistory.yaml"
| 97
| false
| true
| 0
| 5
| 17
| 21
| 10
| 11
| null | null |
gcampax/ghc
|
compiler/llvmGen/LlvmCodeGen/Data.hs
|
bsd-3-clause
|
genStaticLit (CmmHighStackMark)
= panic "genStaticLit: CmmHighStackMark unsupported!"
| 89
|
genStaticLit (CmmHighStackMark)
= panic "genStaticLit: CmmHighStackMark unsupported!"
| 89
|
genStaticLit (CmmHighStackMark)
= panic "genStaticLit: CmmHighStackMark unsupported!"
| 89
| false
| false
| 0
| 6
| 10
| 15
| 7
| 8
| null | null |
mgold/Elm
|
src/Elm/Compiler/Module.hs
|
bsd-3-clause
|
qualifiedVar :: ModuleName.Canonical -> String -> String
qualifiedVar =
Gen.qualified
| 87
|
qualifiedVar :: ModuleName.Canonical -> String -> String
qualifiedVar =
Gen.qualified
| 87
|
qualifiedVar =
Gen.qualified
| 30
| false
| true
| 0
| 6
| 11
| 23
| 12
| 11
| null | null |
phischu/fragnix
|
tests/packages/scotty/Data.Aeson.Types.FromJSON.hs
|
bsd-3-clause
|
parseRealFloat expected v = typeMismatch expected v
| 60
|
parseRealFloat expected v = typeMismatch expected v
| 60
|
parseRealFloat expected v = typeMismatch expected v
| 60
| false
| false
| 0
| 5
| 15
| 16
| 7
| 9
| null | null |
termite2/tsl
|
Frontend/MethodOps.hs
|
bsd-3-clause
|
methParent :: (?spec::Spec) => Template -> Method -> Maybe (Template, Method)
methParent t m =
case listToMaybe $ catMaybes $ map (\t' -> objLookup (ObjTemplate t') (name m)) (tmParents t) of
Nothing -> Nothing
Just (ObjMethod t' m') -> Just (t',m')
-- Complete method body, including inherited parts
| 340
|
methParent :: (?spec::Spec) => Template -> Method -> Maybe (Template, Method)
methParent t m =
case listToMaybe $ catMaybes $ map (\t' -> objLookup (ObjTemplate t') (name m)) (tmParents t) of
Nothing -> Nothing
Just (ObjMethod t' m') -> Just (t',m')
-- Complete method body, including inherited parts
| 340
|
methParent t m =
case listToMaybe $ catMaybes $ map (\t' -> objLookup (ObjTemplate t') (name m)) (tmParents t) of
Nothing -> Nothing
Just (ObjMethod t' m') -> Just (t',m')
-- Complete method body, including inherited parts
| 262
| false
| true
| 0
| 12
| 87
| 127
| 65
| 62
| null | null |
ocean0yohsuke/Scheme
|
src/Scheme/Parser.hs
|
bsd-3-clause
|
tryparens :: Parser Expr -> Parser Expr
tryparens p = try $ parens p
| 68
|
tryparens :: Parser Expr -> Parser Expr
tryparens p = try $ parens p
| 68
|
tryparens p = try $ parens p
| 28
| false
| true
| 0
| 6
| 13
| 31
| 14
| 17
| null | null |
mainland/dph
|
dph-prim-par/Data/Array/Parallel/Unlifted/Parallel/UPSegd.hs
|
bsd-3-clause
|
-- | O(1). Construct an empty segment descriptor, with no elements or segments.
empty :: UPSegd
empty = fromUSegd USegd.empty
| 135
|
empty :: UPSegd
empty = fromUSegd USegd.empty
| 55
|
empty = fromUSegd USegd.empty
| 39
| true
| true
| 0
| 6
| 29
| 24
| 10
| 14
| null | null |
dbp/positionsites
|
src/Handler/Site.hs
|
bsd-3-clause
|
loadData _ _ = return mempty
| 28
|
loadData _ _ = return mempty
| 28
|
loadData _ _ = return mempty
| 28
| false
| false
| 1
| 5
| 5
| 15
| 6
| 9
| null | null |
rasendubi/neat-interpolation
|
library/NeatInterpolation/String.hs
|
mit
|
tabsToSpaces :: [Char] -> [Char]
tabsToSpaces ('\t':tail) = " " ++ tabsToSpaces tail
| 87
|
tabsToSpaces :: [Char] -> [Char]
tabsToSpaces ('\t':tail) = " " ++ tabsToSpaces tail
| 87
|
tabsToSpaces ('\t':tail) = " " ++ tabsToSpaces tail
| 54
| false
| true
| 0
| 7
| 15
| 38
| 20
| 18
| null | null |
gittywithexcitement/hindent
|
src/HIndent.hs
|
bsd-3-clause
|
-- | Test with the given style, prints to stdout.
test :: Style -> Text -> IO ()
test style =
either error (T.putStrLn . T.toLazyText) .
reformat style Nothing
| 163
|
test :: Style -> Text -> IO ()
test style =
either error (T.putStrLn . T.toLazyText) .
reformat style Nothing
| 113
|
test style =
either error (T.putStrLn . T.toLazyText) .
reformat style Nothing
| 82
| true
| true
| 0
| 9
| 33
| 53
| 26
| 27
| null | null |
fffej/sql-server-gen
|
src/Database/SqlServer/Create/Database.hs
|
bsd-2-clause
|
defaultRenderOptions :: RenderOptions
defaultRenderOptions = RenderOptions
True True True True True True True True True True True True True 10000000
| 150
|
defaultRenderOptions :: RenderOptions
defaultRenderOptions = RenderOptions
True True True True True True True True True True True True True 10000000
| 150
|
defaultRenderOptions = RenderOptions
True True True True True True True True True True True True True 10000000
| 112
| false
| true
| 0
| 6
| 21
| 51
| 21
| 30
| null | null |
vigoos/Farrago-OS
|
aura-master/aura-master/src/Aura/Build.hs
|
gpl-2.0
|
moveToSourcePath (p:ps) = do
let newName = srcPkgStore </> p
liftIO $ mv p newName
(newName :) <$> moveToSourcePath ps
| 124
|
moveToSourcePath (p:ps) = do
let newName = srcPkgStore </> p
liftIO $ mv p newName
(newName :) <$> moveToSourcePath ps
| 124
|
moveToSourcePath (p:ps) = do
let newName = srcPkgStore </> p
liftIO $ mv p newName
(newName :) <$> moveToSourcePath ps
| 124
| false
| false
| 0
| 10
| 25
| 55
| 26
| 29
| null | null |
uduki/hsQt
|
Qtc/ClassTypes/Gui.hs
|
bsd-2-clause
|
qBoxLayoutFromPtr :: Ptr (TQBoxLayout a) -> IO (QBoxLayout a)
qBoxLayoutFromPtr p
= objectFromPtr qtc_QBoxLayout_getFinalizer p
| 129
|
qBoxLayoutFromPtr :: Ptr (TQBoxLayout a) -> IO (QBoxLayout a)
qBoxLayoutFromPtr p
= objectFromPtr qtc_QBoxLayout_getFinalizer p
| 129
|
qBoxLayoutFromPtr p
= objectFromPtr qtc_QBoxLayout_getFinalizer p
| 67
| false
| true
| 0
| 9
| 16
| 46
| 20
| 26
| null | null |
apyrgio/ganeti
|
src/Ganeti/Query/Common.hs
|
bsd-2-clause
|
vTypeToQFT VTypeSize = QFTUnit
| 37
|
vTypeToQFT VTypeSize = QFTUnit
| 37
|
vTypeToQFT VTypeSize = QFTUnit
| 37
| false
| false
| 0
| 4
| 10
| 10
| 4
| 6
| null | null |
HIPERFIT/futhark
|
src/Futhark/Internalise/FreeVars.hs
|
isc
|
size :: VName -> NameSet
size v = NameSet $ M.singleton v $ Scalar $ Prim $ Signed Int64
| 88
|
size :: VName -> NameSet
size v = NameSet $ M.singleton v $ Scalar $ Prim $ Signed Int64
| 88
|
size v = NameSet $ M.singleton v $ Scalar $ Prim $ Signed Int64
| 63
| false
| true
| 0
| 10
| 18
| 42
| 20
| 22
| null | null |
codemac/yi-editor
|
src/Yi/Style.hs
|
gpl-2.0
|
green = RGB 0 128 0
| 25
|
green = RGB 0 128 0
| 25
|
green = RGB 0 128 0
| 25
| false
| false
| 0
| 5
| 11
| 13
| 6
| 7
| null | null |
marcelosousa/poet
|
src/Exploration/UNF/API.hs
|
gpl-2.0
|
reset_alte :: Show act => EventID -> Events act -> IO ()
reset_alte e events = do
ev@Event{..} <- get_event "reset_alte" e events
let altEv = []
ev' = ev{ alte = altEv }
set_event e ev' events
-- | set conf as the previous configuration
| 249
|
reset_alte :: Show act => EventID -> Events act -> IO ()
reset_alte e events = do
ev@Event{..} <- get_event "reset_alte" e events
let altEv = []
ev' = ev{ alte = altEv }
set_event e ev' events
-- | set conf as the previous configuration
| 249
|
reset_alte e events = do
ev@Event{..} <- get_event "reset_alte" e events
let altEv = []
ev' = ev{ alte = altEv }
set_event e ev' events
-- | set conf as the previous configuration
| 192
| false
| true
| 0
| 11
| 58
| 97
| 47
| 50
| null | null |
phaazon/OpenGLRaw
|
src/Graphics/Rendering/OpenGL/Raw/Tokens.hs
|
bsd-3-clause
|
gl_FOG_COORDINATE_ARRAY_LIST_IBM :: GLenum
gl_FOG_COORDINATE_ARRAY_LIST_IBM = 103076
| 84
|
gl_FOG_COORDINATE_ARRAY_LIST_IBM :: GLenum
gl_FOG_COORDINATE_ARRAY_LIST_IBM = 103076
| 84
|
gl_FOG_COORDINATE_ARRAY_LIST_IBM = 103076
| 41
| false
| true
| 0
| 4
| 5
| 11
| 6
| 5
| null | null |
haskell-java-bridge/java-bridge-extras
|
src/Foreign/Java/Control.hs
|
mit
|
until :: Monad m => a -> (a -> m (Bool, a)) -> m a
-- ^ Reiterate a computation on a given value until
-- a condition is 'True'.
until i action = do
(done, result) <- action i
if done then return result
else until result action
| 248
|
until :: Monad m => a -> (a -> m (Bool, a)) -> m a
until i action = do
(done, result) <- action i
if done then return result
else until result action
| 170
|
until i action = do
(done, result) <- action i
if done then return result
else until result action
| 119
| true
| true
| 0
| 12
| 69
| 92
| 45
| 47
| null | null |
vikraman/ghc
|
compiler/deSugar/Coverage.hs
|
bsd-3-clause
|
addTickHsExpr (HsCase e mgs) =
liftM2 HsCase
(addTickLHsExpr e) -- not an EvalInner; e might not necessarily
-- be evaluated.
(addTickMatchGroup False mgs)
| 230
|
addTickHsExpr (HsCase e mgs) =
liftM2 HsCase
(addTickLHsExpr e) -- not an EvalInner; e might not necessarily
-- be evaluated.
(addTickMatchGroup False mgs)
| 230
|
addTickHsExpr (HsCase e mgs) =
liftM2 HsCase
(addTickLHsExpr e) -- not an EvalInner; e might not necessarily
-- be evaluated.
(addTickMatchGroup False mgs)
| 230
| false
| false
| 0
| 7
| 97
| 40
| 20
| 20
| null | null |
sashabu/libcspm
|
cspmchecker/src/Checker/Main.hs
|
bsd-3-clause
|
options :: [OptDescr (Options -> Options)]
options = [
Option ['v'] ["version"]
(NoArg (\o -> o { printVersion = True }))
"Print out the version number",
Option ['r'] ["recursive"]
(NoArg (\o -> o { recursive = True }))
"If the input file is a directory, check all files contained in all subdirectories",
Option ['h'] ["help"]
(NoArg (\o -> o { help = True }))
"Display usage message"
]
++ CSPM.allOptions cspmOptions (\ opts x -> opts { cspmOptions = x })
| 529
|
options :: [OptDescr (Options -> Options)]
options = [
Option ['v'] ["version"]
(NoArg (\o -> o { printVersion = True }))
"Print out the version number",
Option ['r'] ["recursive"]
(NoArg (\o -> o { recursive = True }))
"If the input file is a directory, check all files contained in all subdirectories",
Option ['h'] ["help"]
(NoArg (\o -> o { help = True }))
"Display usage message"
]
++ CSPM.allOptions cspmOptions (\ opts x -> opts { cspmOptions = x })
| 529
|
options = [
Option ['v'] ["version"]
(NoArg (\o -> o { printVersion = True }))
"Print out the version number",
Option ['r'] ["recursive"]
(NoArg (\o -> o { recursive = True }))
"If the input file is a directory, check all files contained in all subdirectories",
Option ['h'] ["help"]
(NoArg (\o -> o { help = True }))
"Display usage message"
]
++ CSPM.allOptions cspmOptions (\ opts x -> opts { cspmOptions = x })
| 486
| false
| true
| 2
| 12
| 153
| 181
| 99
| 82
| null | null |
rueshyna/gogol
|
gogol-replicapool/gen/Network/Google/ReplicaPool/Types/Product.hs
|
mpl-2.0
|
-- | Creates a value of 'InstanceGroupManagersSetInstanceTemplateRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'igmsitrInstanceTemplate'
instanceGroupManagersSetInstanceTemplateRequest
:: InstanceGroupManagersSetInstanceTemplateRequest
instanceGroupManagersSetInstanceTemplateRequest =
InstanceGroupManagersSetInstanceTemplateRequest'
{ _igmsitrInstanceTemplate = Nothing
}
| 485
|
instanceGroupManagersSetInstanceTemplateRequest
:: InstanceGroupManagersSetInstanceTemplateRequest
instanceGroupManagersSetInstanceTemplateRequest =
InstanceGroupManagersSetInstanceTemplateRequest'
{ _igmsitrInstanceTemplate = Nothing
}
| 252
|
instanceGroupManagersSetInstanceTemplateRequest =
InstanceGroupManagersSetInstanceTemplateRequest'
{ _igmsitrInstanceTemplate = Nothing
}
| 149
| true
| true
| 1
| 7
| 60
| 31
| 17
| 14
| null | null |
luzhuomi/cpp-obs
|
Language/C/Obfuscate/CFF.hs
|
apache-2.0
|
cff_trans_stmt :: Bool -> -- ^ is return type void
S.Set Ident -> -- ^ local vars
S.Set Ident -> -- ^ formal args
ContextName ->
Ident -> -- ^ fname
Ident -> -- ^ sw
M.Map Ident LabeledBlock -> -- ^ \bar{b} kenv
Ident -> -- ^ label for the current block
AST.CCompoundBlockItem N.NodeInfo -> -- ^ stmt
[AST.CCompoundBlockItem N.NodeInfo]
{-
CS_cff (goto l_i) kenv lj = \overline{X = E}; sw = i; break;
where (\overline{\phi}, s) = kenv l_i
\overline{(X,E)} = CF_cff \overline{\phi} l_j
-}
cff_trans_stmt isReturnVoid localVars fargs ctxtName fname sw kenv l_j (AST.CBlockStmt (AST.CGoto l_i nodeInfo)) = case M.lookup l_i kenv of
{ Just lb ->
let
asgmts = cff_trans_phis ctxtName l_j l_i (lb_phis lb)
i = AST.CConst (AST.CIntConst (cInteger (unLabPref l_i)) N.undefNode)
sw_assg = AST.CBlockStmt (AST.CExpr (Just ((cvar sw) .=. i)) N.undefNode)
in asgmts ++ [ sw_assg, cBreak ]
; Nothing -> error "cff_trans_stmt failed at a non existent label."
}
| 1,212
|
cff_trans_stmt :: Bool -> -- ^ is return type void
S.Set Ident -> -- ^ local vars
S.Set Ident -> -- ^ formal args
ContextName ->
Ident -> -- ^ fname
Ident -> -- ^ sw
M.Map Ident LabeledBlock -> -- ^ \bar{b} kenv
Ident -> -- ^ label for the current block
AST.CCompoundBlockItem N.NodeInfo -> -- ^ stmt
[AST.CCompoundBlockItem N.NodeInfo]
cff_trans_stmt isReturnVoid localVars fargs ctxtName fname sw kenv l_j (AST.CBlockStmt (AST.CGoto l_i nodeInfo)) = case M.lookup l_i kenv of
{ Just lb ->
let
asgmts = cff_trans_phis ctxtName l_j l_i (lb_phis lb)
i = AST.CConst (AST.CIntConst (cInteger (unLabPref l_i)) N.undefNode)
sw_assg = AST.CBlockStmt (AST.CExpr (Just ((cvar sw) .=. i)) N.undefNode)
in asgmts ++ [ sw_assg, cBreak ]
; Nothing -> error "cff_trans_stmt failed at a non existent label."
}
| 1,030
|
cff_trans_stmt isReturnVoid localVars fargs ctxtName fname sw kenv l_j (AST.CBlockStmt (AST.CGoto l_i nodeInfo)) = case M.lookup l_i kenv of
{ Just lb ->
let
asgmts = cff_trans_phis ctxtName l_j l_i (lb_phis lb)
i = AST.CConst (AST.CIntConst (cInteger (unLabPref l_i)) N.undefNode)
sw_assg = AST.CBlockStmt (AST.CExpr (Just ((cvar sw) .=. i)) N.undefNode)
in asgmts ++ [ sw_assg, cBreak ]
; Nothing -> error "cff_trans_stmt failed at a non existent label."
}
| 527
| true
| true
| 0
| 20
| 421
| 270
| 138
| 132
| null | null |
jaspervdj/hstyle
|
src/HStyle/Rules/DataAlignment.hs
|
bsd-3-clause
|
dataSelector :: Selector [Position]
dataSelector (md, _) _ =
[ (map (positionFromScrSpanInfo . H.ann) constrs, rangeFromScrSpanInfo loc)
| H.DataDecl loc _ _ _ constrs _ <- everything md
]
| 200
|
dataSelector :: Selector [Position]
dataSelector (md, _) _ =
[ (map (positionFromScrSpanInfo . H.ann) constrs, rangeFromScrSpanInfo loc)
| H.DataDecl loc _ _ _ constrs _ <- everything md
]
| 200
|
dataSelector (md, _) _ =
[ (map (positionFromScrSpanInfo . H.ann) constrs, rangeFromScrSpanInfo loc)
| H.DataDecl loc _ _ _ constrs _ <- everything md
]
| 164
| false
| true
| 1
| 11
| 40
| 86
| 41
| 45
| null | null |
tomjaguarpaw/postgresql-simple
|
src/Database/PostgreSQL/Simple/TypeInfo/Static.hs
|
bsd-3-clause
|
oid :: TypeInfo
oid = Basic {
typoid = oidOid,
typcategory = 'N',
typdelim = ',',
typname = "oid"
}
| 130
|
oid :: TypeInfo
oid = Basic {
typoid = oidOid,
typcategory = 'N',
typdelim = ',',
typname = "oid"
}
| 130
|
oid = Basic {
typoid = oidOid,
typcategory = 'N',
typdelim = ',',
typname = "oid"
}
| 114
| false
| true
| 0
| 7
| 50
| 44
| 24
| 20
| null | null |
rueshyna/gogol
|
gogol-genomics/gen/Network/Google/Resource/Genomics/DataSets/SetIAMPolicy.hs
|
mpl-2.0
|
-- | Multipart request metadata.
dssipPayload :: Lens' DataSetsSetIAMPolicy SetIAMPolicyRequest
dssipPayload
= lens _dssipPayload (\ s a -> s{_dssipPayload = a})
| 163
|
dssipPayload :: Lens' DataSetsSetIAMPolicy SetIAMPolicyRequest
dssipPayload
= lens _dssipPayload (\ s a -> s{_dssipPayload = a})
| 130
|
dssipPayload
= lens _dssipPayload (\ s a -> s{_dssipPayload = a})
| 67
| true
| true
| 1
| 9
| 22
| 46
| 22
| 24
| null | null |
li-zhirui/EoplLangs
|
test/CallByNeed/ParserSuite.hs
|
bsd-3-clause
|
constNum = ConstExpr . ExprNum
| 30
|
constNum = ConstExpr . ExprNum
| 30
|
constNum = ConstExpr . ExprNum
| 30
| false
| false
| 0
| 5
| 4
| 10
| 5
| 5
| null | null |
goldfirere/singletons
|
singletons-base/tests/compile-and-dump/GradingClient/Database.hs
|
bsd-3-clause
|
query (Union ra rb) = do
rowsa <- query ra
rowsb <- query rb
return $ List.unionBy eqRow rowsa rowsb
| 106
|
query (Union ra rb) = do
rowsa <- query ra
rowsb <- query rb
return $ List.unionBy eqRow rowsa rowsb
| 106
|
query (Union ra rb) = do
rowsa <- query ra
rowsb <- query rb
return $ List.unionBy eqRow rowsa rowsb
| 106
| false
| false
| 0
| 9
| 25
| 53
| 23
| 30
| null | null |
trskop/cabal
|
cabal-install/Distribution/Client/Setup.hs
|
bsd-3-clause
|
defaultExecFlags :: ExecFlags
defaultExecFlags = ExecFlags {
execVerbosity = toFlag normal
}
| 96
|
defaultExecFlags :: ExecFlags
defaultExecFlags = ExecFlags {
execVerbosity = toFlag normal
}
| 96
|
defaultExecFlags = ExecFlags {
execVerbosity = toFlag normal
}
| 66
| false
| true
| 0
| 7
| 15
| 22
| 12
| 10
| null | null |
phischu/fragnix
|
tests/packages/scotty/Data.Text.Internal.Private.hs
|
bsd-3-clause
|
span_ :: (Char -> Bool) -> Text -> (# Text, Text #)
span_ p t@(Text arr off len) = (# hd,tl #)
where hd = text arr off k
tl = text arr (off+k) (len-k)
!k = loop 0
loop !i | i < len && p c = loop (i+d)
| otherwise = i
where Iter c d = iter t i
| 308
|
span_ :: (Char -> Bool) -> Text -> (# Text, Text #)
span_ p t@(Text arr off len) = (# hd,tl #)
where hd = text arr off k
tl = text arr (off+k) (len-k)
!k = loop 0
loop !i | i < len && p c = loop (i+d)
| otherwise = i
where Iter c d = iter t i
| 308
|
span_ p t@(Text arr off len) = (# hd,tl #)
where hd = text arr off k
tl = text arr (off+k) (len-k)
!k = loop 0
loop !i | i < len && p c = loop (i+d)
| otherwise = i
where Iter c d = iter t i
| 256
| false
| true
| 5
| 12
| 128
| 169
| 84
| 85
| null | null |
olsner/ghc
|
compiler/types/Coercion.hs
|
bsd-3-clause
|
seqProv (HoleProv _) = ()
| 32
|
seqProv (HoleProv _) = ()
| 32
|
seqProv (HoleProv _) = ()
| 32
| false
| false
| 0
| 6
| 11
| 18
| 8
| 10
| null | null |
mtsch/basic-lisp
|
src/SExpr.hs
|
bsd-2-clause
|
isString :: SExpr -> Bool
isString (String _) = True
| 52
|
isString :: SExpr -> Bool
isString (String _) = True
| 52
|
isString (String _) = True
| 26
| false
| true
| 0
| 7
| 9
| 24
| 12
| 12
| null | null |
bergmark/purescript
|
src/Language/PureScript/Sugar/Operators.hs
|
mit
|
matchOp :: Qualified Ident -> P.Parsec Chain () ()
matchOp op = do
ident <- parseOp
guard $ ident == op
| 107
|
matchOp :: Qualified Ident -> P.Parsec Chain () ()
matchOp op = do
ident <- parseOp
guard $ ident == op
| 107
|
matchOp op = do
ident <- parseOp
guard $ ident == op
| 56
| false
| true
| 0
| 8
| 24
| 57
| 25
| 32
| null | null |
kawu/factorized-tag-parser
|
src/NLP/Partage/Gen.hs
|
bsd-2-clause
|
adjoin s (R.Node n ts) =
here ++ below
where
-- perform adjunction here
here = [replaceFoot (R.Node n ts) s | R.rootLabel s == n]
-- consider to perform adjunction lower in the tree
below = map (R.Node n) (doit ts)
doit [] = []
doit (x:xs) =
[u : xs | u <- adjoin s x] ++
[x : us | us <- doit xs]
-- | Replace foot of the second tree with the first tree.
-- If there is no foot in the second tree, it will be returned
-- unchanged.
| 479
|
adjoin s (R.Node n ts) =
here ++ below
where
-- perform adjunction here
here = [replaceFoot (R.Node n ts) s | R.rootLabel s == n]
-- consider to perform adjunction lower in the tree
below = map (R.Node n) (doit ts)
doit [] = []
doit (x:xs) =
[u : xs | u <- adjoin s x] ++
[x : us | us <- doit xs]
-- | Replace foot of the second tree with the first tree.
-- If there is no foot in the second tree, it will be returned
-- unchanged.
| 479
|
adjoin s (R.Node n ts) =
here ++ below
where
-- perform adjunction here
here = [replaceFoot (R.Node n ts) s | R.rootLabel s == n]
-- consider to perform adjunction lower in the tree
below = map (R.Node n) (doit ts)
doit [] = []
doit (x:xs) =
[u : xs | u <- adjoin s x] ++
[x : us | us <- doit xs]
-- | Replace foot of the second tree with the first tree.
-- If there is no foot in the second tree, it will be returned
-- unchanged.
| 479
| false
| false
| 7
| 9
| 142
| 178
| 83
| 95
| null | null |
fractalcat/slides
|
2015-08-26-fp-syd-approx-quantiles/approx-quantile/main/gaussian.hs
|
mit
|
args = info (helper <*> params)
( fullDesc
<> progDesc "Write COUNT real numbers drawn from a Gaussian."
)
| 145
|
args = info (helper <*> params)
( fullDesc
<> progDesc "Write COUNT real numbers drawn from a Gaussian."
)
| 145
|
args = info (helper <*> params)
( fullDesc
<> progDesc "Write COUNT real numbers drawn from a Gaussian."
)
| 145
| false
| false
| 0
| 8
| 57
| 28
| 14
| 14
| null | null |
rotskoff/Haskell-PDB-Utilities
|
Experimental/IdealDesolvationCalcium.hs
|
gpl-3.0
|
ideal15 = [ Atom {name=B.pack "CA",coords=[-0.004747,-2.610336,1.521578]},
Atom {name=B.pack "O",coords=[-0.993994,-0.826406,0.077517]},
Atom {name=B.pack "O",coords=[0.077417,-6.710028,0.815082]},
Atom {name=B.pack "O",coords=[1.878272,-1.758493,0.140112]},
Atom {name=B.pack "O",coords=[0.594333,2.132564,1.720856]},
Atom {name=B.pack "O",coords=[0.602690,-3.142616,3.877881]},
Atom {name=B.pack "O",coords=[-0.582345,-3.596358,-0.695906]},
Atom {name=B.pack "O",coords=[-0.609624,-6.162614,-1.809005]},
Atom {name=B.pack "O",coords=[-3.014573,0.486590,1.408456]},
Atom {name=B.pack "O",coords=[1.692054,-0.968197,5.210299]},
Atom {name=B.pack "O",coords=[1.112481,0.788526,-0.642668]},
Atom {name=B.pack "O",coords=[-2.031508,3.044433,1.913616]},
Atom {name=B.pack "O",coords=[0.733765,-0.489105,2.624878]},
Atom {name=B.pack "O",coords=[-2.069686,-1.808089,2.668727]},
Atom {name=B.pack "O",coords=[-1.336665,-4.668469,2.013766]},
Atom {name=B.pack "O",coords=[1.625529,-4.501197,1.369710]}]
| 1,175
|
ideal15 = [ Atom {name=B.pack "CA",coords=[-0.004747,-2.610336,1.521578]},
Atom {name=B.pack "O",coords=[-0.993994,-0.826406,0.077517]},
Atom {name=B.pack "O",coords=[0.077417,-6.710028,0.815082]},
Atom {name=B.pack "O",coords=[1.878272,-1.758493,0.140112]},
Atom {name=B.pack "O",coords=[0.594333,2.132564,1.720856]},
Atom {name=B.pack "O",coords=[0.602690,-3.142616,3.877881]},
Atom {name=B.pack "O",coords=[-0.582345,-3.596358,-0.695906]},
Atom {name=B.pack "O",coords=[-0.609624,-6.162614,-1.809005]},
Atom {name=B.pack "O",coords=[-3.014573,0.486590,1.408456]},
Atom {name=B.pack "O",coords=[1.692054,-0.968197,5.210299]},
Atom {name=B.pack "O",coords=[1.112481,0.788526,-0.642668]},
Atom {name=B.pack "O",coords=[-2.031508,3.044433,1.913616]},
Atom {name=B.pack "O",coords=[0.733765,-0.489105,2.624878]},
Atom {name=B.pack "O",coords=[-2.069686,-1.808089,2.668727]},
Atom {name=B.pack "O",coords=[-1.336665,-4.668469,2.013766]},
Atom {name=B.pack "O",coords=[1.625529,-4.501197,1.369710]}]
| 1,175
|
ideal15 = [ Atom {name=B.pack "CA",coords=[-0.004747,-2.610336,1.521578]},
Atom {name=B.pack "O",coords=[-0.993994,-0.826406,0.077517]},
Atom {name=B.pack "O",coords=[0.077417,-6.710028,0.815082]},
Atom {name=B.pack "O",coords=[1.878272,-1.758493,0.140112]},
Atom {name=B.pack "O",coords=[0.594333,2.132564,1.720856]},
Atom {name=B.pack "O",coords=[0.602690,-3.142616,3.877881]},
Atom {name=B.pack "O",coords=[-0.582345,-3.596358,-0.695906]},
Atom {name=B.pack "O",coords=[-0.609624,-6.162614,-1.809005]},
Atom {name=B.pack "O",coords=[-3.014573,0.486590,1.408456]},
Atom {name=B.pack "O",coords=[1.692054,-0.968197,5.210299]},
Atom {name=B.pack "O",coords=[1.112481,0.788526,-0.642668]},
Atom {name=B.pack "O",coords=[-2.031508,3.044433,1.913616]},
Atom {name=B.pack "O",coords=[0.733765,-0.489105,2.624878]},
Atom {name=B.pack "O",coords=[-2.069686,-1.808089,2.668727]},
Atom {name=B.pack "O",coords=[-1.336665,-4.668469,2.013766]},
Atom {name=B.pack "O",coords=[1.625529,-4.501197,1.369710]}]
| 1,175
| false
| false
| 0
| 9
| 230
| 548
| 330
| 218
| null | null |
kjgorman/melchior
|
Melchior/Remote/Internal/Parser.hs
|
mit
|
exceptNull :: [Json] -> [Json]
exceptNull [] = []
| 49
|
exceptNull :: [Json] -> [Json]
exceptNull [] = []
| 49
|
exceptNull [] = []
| 18
| false
| true
| 0
| 6
| 8
| 28
| 15
| 13
| null | null |
MadSciGuys/trebuchet
|
src/Treb/Types.hs
|
mit
|
isAliasType _ = False
| 33
|
isAliasType _ = False
| 33
|
isAliasType _ = False
| 33
| false
| false
| 0
| 5
| 15
| 9
| 4
| 5
| null | null |
MichaelMcCulloch/MPlusPlus
|
src/ASTConv.hs
|
bsd-3-clause
|
transBlock :: Block -> A.M_stmt
transBlock x = case x of
Program declarations programbody -> A.M_block (concatMap transDeclaration declarations, transProgramBody programbody)
| 178
|
transBlock :: Block -> A.M_stmt
transBlock x = case x of
Program declarations programbody -> A.M_block (concatMap transDeclaration declarations, transProgramBody programbody)
| 177
|
transBlock x = case x of
Program declarations programbody -> A.M_block (concatMap transDeclaration declarations, transProgramBody programbody)
| 145
| false
| true
| 4
| 6
| 24
| 51
| 26
| 25
| null | null |
sherwoodwang/wxHaskell
|
wx/src/Graphics/UI/WX/Attributes.hs
|
lgpl-2.1
|
-- | Create a new attribute with a specified name, getter and setter function.
newAttr :: String -> (w -> IO a) -> (w -> a -> IO ()) -> Attr w a
newAttr name getter setter
= makeAttr name getter setter updater
where
updater w f = do x <- getter w; setter w (f x); return x
-- | Define a read-only attribute.
| 320
|
newAttr :: String -> (w -> IO a) -> (w -> a -> IO ()) -> Attr w a
newAttr name getter setter
= makeAttr name getter setter updater
where
updater w f = do x <- getter w; setter w (f x); return x
-- | Define a read-only attribute.
| 241
|
newAttr name getter setter
= makeAttr name getter setter updater
where
updater w f = do x <- getter w; setter w (f x); return x
-- | Define a read-only attribute.
| 175
| true
| true
| 0
| 13
| 77
| 121
| 57
| 64
| null | null |
silky/bibtexier
|
src/Text/BibTeX/Parse.hs
|
bsd-3-clause
|
{- |
Parse a value like
> jul
or
> 2010
or
> {Firstname Surname}
or
> "Firstname Surname"
.
-}
value :: Parser String
value =
lexeme (many1 letter) <|> -- for fields like: month = jul
lexeme (many1 digit) <|> -- for fields like: year = 2010
braces (texSequence '}') <|>
lexeme (between (char '"') (char '"') (texSequence '"'))
| 347
|
value :: Parser String
value =
lexeme (many1 letter) <|> -- for fields like: month = jul
lexeme (many1 digit) <|> -- for fields like: year = 2010
braces (texSequence '}') <|>
lexeme (between (char '"') (char '"') (texSequence '"'))
| 244
|
value =
lexeme (many1 letter) <|> -- for fields like: month = jul
lexeme (many1 digit) <|> -- for fields like: year = 2010
braces (texSequence '}') <|>
lexeme (between (char '"') (char '"') (texSequence '"'))
| 221
| true
| true
| 0
| 10
| 81
| 87
| 43
| 44
| null | null |
vrom911/hs-init
|
summoner-cli/test/Test/QuestionSpec.hs
|
mit
|
yesNoPromptSpec :: Spec
yesNoPromptSpec = describe "mkDefaultYesNoPrompt works correctly" $
it "makes cabal prompt" $
yesNoPrompt (mkDefaultYesNoPrompt "Cabal") == "Add Cabal?"
| 188
|
yesNoPromptSpec :: Spec
yesNoPromptSpec = describe "mkDefaultYesNoPrompt works correctly" $
it "makes cabal prompt" $
yesNoPrompt (mkDefaultYesNoPrompt "Cabal") == "Add Cabal?"
| 188
|
yesNoPromptSpec = describe "mkDefaultYesNoPrompt works correctly" $
it "makes cabal prompt" $
yesNoPrompt (mkDefaultYesNoPrompt "Cabal") == "Add Cabal?"
| 164
| false
| true
| 0
| 9
| 32
| 38
| 18
| 20
| null | null |
liyang/value-change-dump
|
examples/daikin.hs
|
bsd-3-clause
|
-- FIXME: error or stop bit?
packet :: (Monad m) => Pipe DF (Either DF Packet) m ()
packet = do
peak <- await
if not $ df 3467 I peak then packet else do
trough <- await
if not $ df 1733 O trough then return () else do
gobble []
where
gobble bs@ ~(BS.pack . reverse -> pkt) = do
e'b <- byte
case e'b of
Left e@(d, f) -> if d >= 3900 && f == O
then yield (Right pkt) else yield (Left e)
Right b -> gobble (b : bs)
{- decode :: Pipe ByteString THING m () -}
| 538
|
packet :: (Monad m) => Pipe DF (Either DF Packet) m ()
packet = do
peak <- await
if not $ df 3467 I peak then packet else do
trough <- await
if not $ df 1733 O trough then return () else do
gobble []
where
gobble bs@ ~(BS.pack . reverse -> pkt) = do
e'b <- byte
case e'b of
Left e@(d, f) -> if d >= 3900 && f == O
then yield (Right pkt) else yield (Left e)
Right b -> gobble (b : bs)
{- decode :: Pipe ByteString THING m () -}
| 509
|
packet = do
peak <- await
if not $ df 3467 I peak then packet else do
trough <- await
if not $ df 1733 O trough then return () else do
gobble []
where
gobble bs@ ~(BS.pack . reverse -> pkt) = do
e'b <- byte
case e'b of
Left e@(d, f) -> if d >= 3900 && f == O
then yield (Right pkt) else yield (Left e)
Right b -> gobble (b : bs)
{- decode :: Pipe ByteString THING m () -}
| 454
| true
| true
| 4
| 14
| 186
| 240
| 115
| 125
| null | null |
keithshep/txt-sushi
|
Database/TxtSushi/SQLExpression.hs
|
bsd-3-clause
|
selectionContainsAggregates _ = False
| 37
|
selectionContainsAggregates _ = False
| 37
|
selectionContainsAggregates _ = False
| 37
| false
| false
| 0
| 5
| 3
| 9
| 4
| 5
| null | null |
tidalcycles/tidal-midi
|
Sound/Tidal/MIDI/Synthino.hs
|
gpl-3.0
|
(arplength, arplength_p) = pF "arplength" (Just 0)
| 50
|
(arplength, arplength_p) = pF "arplength" (Just 0)
| 50
|
(arplength, arplength_p) = pF "arplength" (Just 0)
| 50
| false
| false
| 0
| 7
| 6
| 24
| 12
| 12
| null | null |
ku-fpg/marked-pretty
|
src/Text/PrettyPrint/MarkedHughesPJ.hs
|
bsd-3-clause
|
-- | Default TextDetails printer
txtPrinter :: TextDetails a -> String -> String
txtPrinter (Chr c) s = c:s
| 110
|
txtPrinter :: TextDetails a -> String -> String
txtPrinter (Chr c) s = c:s
| 77
|
txtPrinter (Chr c) s = c:s
| 29
| true
| true
| 0
| 7
| 21
| 38
| 19
| 19
| null | null |
finlay/octohat
|
src/Network/Octohat/Internal.hs
|
mit
|
putRequestTo :: FromJSON a => T.Text -> GitHub a
putRequestTo uri = do
opts <- requestOptions
response <- liftIO $ putWith opts (T.unpack uri) EmptyBody
checkForStatus response
tryRight $ getResponseEntity response
| 226
|
putRequestTo :: FromJSON a => T.Text -> GitHub a
putRequestTo uri = do
opts <- requestOptions
response <- liftIO $ putWith opts (T.unpack uri) EmptyBody
checkForStatus response
tryRight $ getResponseEntity response
| 226
|
putRequestTo uri = do
opts <- requestOptions
response <- liftIO $ putWith opts (T.unpack uri) EmptyBody
checkForStatus response
tryRight $ getResponseEntity response
| 177
| false
| true
| 0
| 12
| 42
| 79
| 35
| 44
| null | null |
np/hlatex
|
Language/LaTeX/Builder/Math.hs
|
bsd-3-clause
|
_C :: MathItem
_C = rawMathChar 'C'
| 35
|
_C :: MathItem
_C = rawMathChar 'C'
| 35
|
_C = rawMathChar 'C'
| 20
| false
| true
| 0
| 5
| 6
| 14
| 7
| 7
| null | null |
IreneKnapp/Faction
|
faction/Distribution/Client/Dependency.hs
|
bsd-3-clause
|
-- TODO: warn about unsuported options
runSolver Modular = modularResolver
| 74
|
runSolver Modular = modularResolver
| 35
|
runSolver Modular = modularResolver
| 35
| true
| false
| 0
| 5
| 9
| 10
| 5
| 5
| null | null |
ndmitchell/nsis
|
src/Development/NSIS/Plugins/WinMessages.hs
|
bsd-3-clause
|
bst_INDETERMINATE = 2
| 22
|
bst_INDETERMINATE = 2
| 22
|
bst_INDETERMINATE = 2
| 22
| false
| false
| 0
| 4
| 3
| 6
| 3
| 3
| null | null |
ganeti-github-testing/ganeti-test-1
|
src/Ganeti/Constants.hs
|
bsd-2-clause
|
defaultDiskCustom :: String
defaultDiskCustom = ""
| 50
|
defaultDiskCustom :: String
defaultDiskCustom = ""
| 50
|
defaultDiskCustom = ""
| 22
| false
| true
| 0
| 4
| 5
| 11
| 6
| 5
| null | null |
pascal-knodel/haskell-craft
|
_/links/E'5''4.hs
|
mit
|
testMaxOccurs4 = TestCase ( assertEqual "for: maxOccurs 2 3" (3, 1) (maxOccurs 2 3) )
| 86
|
testMaxOccurs4 = TestCase ( assertEqual "for: maxOccurs 2 3" (3, 1) (maxOccurs 2 3) )
| 86
|
testMaxOccurs4 = TestCase ( assertEqual "for: maxOccurs 2 3" (3, 1) (maxOccurs 2 3) )
| 86
| false
| false
| 0
| 9
| 15
| 33
| 17
| 16
| null | null |
meteficha/yesod
|
yesod-newsfeed/Yesod/AtomFeed.hs
|
mit
|
atomLink :: MonadWidget m
=> Route (HandlerSite m)
-> Text -- ^ title
-> m ()
atomLink r title = toWidgetHead [hamlet|
<link href=@{r} type=#{S8.unpack typeAtom} rel="alternate" title=#{title}>
|]
| 231
|
atomLink :: MonadWidget m
=> Route (HandlerSite m)
-> Text -- ^ title
-> m ()
atomLink r title = toWidgetHead [hamlet|
<link href=@{r} type=#{S8.unpack typeAtom} rel="alternate" title=#{title}>
|]
| 231
|
atomLink r title = toWidgetHead [hamlet|
<link href=@{r} type=#{S8.unpack typeAtom} rel="alternate" title=#{title}>
|]
| 126
| false
| true
| 0
| 9
| 63
| 53
| 27
| 26
| null | null |
factisresearch/graph-core
|
src/Data/Core/Graph/PureCore.hs
|
mit
|
hullFoldM :: Monad m => Graph -> (b -> Node -> m b) -> b -> Node -> m b
hullFoldM g = hullFoldImpl (g_adj g)
| 108
|
hullFoldM :: Monad m => Graph -> (b -> Node -> m b) -> b -> Node -> m b
hullFoldM g = hullFoldImpl (g_adj g)
| 108
|
hullFoldM g = hullFoldImpl (g_adj g)
| 36
| false
| true
| 0
| 11
| 25
| 63
| 30
| 33
| null | null |
projectorhq/haskell-liquid
|
src/Text/Liquid/VariableFinder.hs
|
bsd-3-clause
|
aggregateElem _ _ v@(Variable _) = v
| 55
|
aggregateElem _ _ v@(Variable _) = v
| 55
|
aggregateElem _ _ v@(Variable _) = v
| 55
| false
| false
| 0
| 8
| 25
| 22
| 11
| 11
| null | null |
jstolarek/haddock
|
haddock-api/src/Haddock/GhcUtils.hs
|
bsd-2-clause
|
familyConDecl :: ConDecl Name -> [(Name, [Name])]
familyConDecl d = zip (map unL (con_names d)) (repeat $ children d)
| 117
|
familyConDecl :: ConDecl Name -> [(Name, [Name])]
familyConDecl d = zip (map unL (con_names d)) (repeat $ children d)
| 117
|
familyConDecl d = zip (map unL (con_names d)) (repeat $ children d)
| 67
| false
| true
| 0
| 10
| 18
| 68
| 33
| 35
| null | null |
phischu/fragnix
|
tests/packages/scotty/Data.Text.Internal.Fusion.Size.hs
|
bsd-3-clause
|
subtractSize a@(Between 0 _) Unknown = a
| 48
|
subtractSize a@(Between 0 _) Unknown = a
| 48
|
subtractSize a@(Between 0 _) Unknown = a
| 48
| false
| false
| 0
| 8
| 14
| 22
| 11
| 11
| null | null |
shouya/thinking-dumps
|
transformer/trans.hs
|
mit
|
testexpr3 = (App (Abs "v" (Plus (Id "v") (Lit 3)))
(Plus (Lit 3) (Lit 1)))
| 91
|
testexpr3 = (App (Abs "v" (Plus (Id "v") (Lit 3)))
(Plus (Lit 3) (Lit 1)))
| 91
|
testexpr3 = (App (Abs "v" (Plus (Id "v") (Lit 3)))
(Plus (Lit 3) (Lit 1)))
| 91
| false
| false
| 0
| 12
| 31
| 62
| 31
| 31
| null | null |
selectel/mongoDB-haskell
|
Database/MongoDB/Query.hs
|
apache-2.0
|
master :: AccessMode
-- ^ Same as 'ConfirmWrites' []
master = ConfirmWrites []
| 78
|
master :: AccessMode
master = ConfirmWrites []
| 46
|
master = ConfirmWrites []
| 25
| true
| true
| 0
| 6
| 12
| 24
| 10
| 14
| null | null |
bos/text
|
src/Data/Text/Internal/Encoding/Utf8.hs
|
bsd-2-clause
|
ord4 :: Char -> (Word8,Word8,Word8,Word8)
ord4 c =
-- ord4 is used only in test suite to construct a deliberately invalid ByteString,
-- actually violating the assertion, so it is commented out
-- assert (n >= 0x10000)
(x1,x2,x3,x4)
where
n = ord c
x1 = fromIntegral $ (n `shiftR` 18) + 0xF0
x2 = fromIntegral $ ((n `shiftR` 12) .&. 0x3F) + 0x80
x3 = fromIntegral $ ((n `shiftR` 6) .&. 0x3F) + 0x80
x4 = fromIntegral $ (n .&. 0x3F) + 0x80
| 489
|
ord4 :: Char -> (Word8,Word8,Word8,Word8)
ord4 c =
-- ord4 is used only in test suite to construct a deliberately invalid ByteString,
-- actually violating the assertion, so it is commented out
-- assert (n >= 0x10000)
(x1,x2,x3,x4)
where
n = ord c
x1 = fromIntegral $ (n `shiftR` 18) + 0xF0
x2 = fromIntegral $ ((n `shiftR` 12) .&. 0x3F) + 0x80
x3 = fromIntegral $ ((n `shiftR` 6) .&. 0x3F) + 0x80
x4 = fromIntegral $ (n .&. 0x3F) + 0x80
| 489
|
ord4 c =
-- ord4 is used only in test suite to construct a deliberately invalid ByteString,
-- actually violating the assertion, so it is commented out
-- assert (n >= 0x10000)
(x1,x2,x3,x4)
where
n = ord c
x1 = fromIntegral $ (n `shiftR` 18) + 0xF0
x2 = fromIntegral $ ((n `shiftR` 12) .&. 0x3F) + 0x80
x3 = fromIntegral $ ((n `shiftR` 6) .&. 0x3F) + 0x80
x4 = fromIntegral $ (n .&. 0x3F) + 0x80
| 447
| false
| true
| 0
| 10
| 133
| 162
| 92
| 70
| null | null |
mvdan/hint
|
src/Control/Monad/Ghc.hs
|
bsd-3-clause
|
runGhcT :: (MonadIO m, MonadMask m) => Maybe FilePath -> GhcT m a -> m a
runGhcT f = unMTLA . rawRunGhcT f . unGhcT
| 115
|
runGhcT :: (MonadIO m, MonadMask m) => Maybe FilePath -> GhcT m a -> m a
runGhcT f = unMTLA . rawRunGhcT f . unGhcT
| 115
|
runGhcT f = unMTLA . rawRunGhcT f . unGhcT
| 42
| false
| true
| 0
| 8
| 24
| 59
| 28
| 31
| null | null |
facebookincubator/duckling
|
Duckling/Time/ZH/Corpus.hs
|
bsd-3-clause
|
defaultCorpus :: Corpus
defaultCorpus = corpus
| 46
|
defaultCorpus :: Corpus
defaultCorpus = corpus
| 46
|
defaultCorpus = corpus
| 22
| false
| true
| 0
| 4
| 5
| 11
| 6
| 5
| null | null |
kowey/GenI
|
src/NLP/GenI/Parser.hs
|
gpl-2.0
|
geniTree :: (Ord v, GeniValLike v) => Parser (T.Tree (GNode v))
geniTree =
do node <- geniNode
kids <- option [] (braces $ many geniTree)
<?> "child nodes"
-- sanity checks
let noKidsAllowed t c = when (c node && (not.null $ kids)) $
fail $ t ++ " nodes may *not* have any children"
noKidsAllowed "Anchor" $ ganchor
noKidsAllowed "Substitution" $ (== Subs) . gtype
noKidsAllowed "Foot" $ (== Foot) . gtype
--
return (T.Node node kids)
| 516
|
geniTree :: (Ord v, GeniValLike v) => Parser (T.Tree (GNode v))
geniTree =
do node <- geniNode
kids <- option [] (braces $ many geniTree)
<?> "child nodes"
-- sanity checks
let noKidsAllowed t c = when (c node && (not.null $ kids)) $
fail $ t ++ " nodes may *not* have any children"
noKidsAllowed "Anchor" $ ganchor
noKidsAllowed "Substitution" $ (== Subs) . gtype
noKidsAllowed "Foot" $ (== Foot) . gtype
--
return (T.Node node kids)
| 516
|
geniTree =
do node <- geniNode
kids <- option [] (braces $ many geniTree)
<?> "child nodes"
-- sanity checks
let noKidsAllowed t c = when (c node && (not.null $ kids)) $
fail $ t ++ " nodes may *not* have any children"
noKidsAllowed "Anchor" $ ganchor
noKidsAllowed "Substitution" $ (== Subs) . gtype
noKidsAllowed "Foot" $ (== Foot) . gtype
--
return (T.Node node kids)
| 452
| false
| true
| 0
| 18
| 159
| 190
| 92
| 98
| null | null |
piyush-kurur/yesod
|
yesod-core/Yesod/Dispatch.hs
|
mit
|
mkYesodDataGeneral :: String -> Cxt -> Bool -> [ResourceTree String] -> Q [Dec]
mkYesodDataGeneral name clazzes isSub res = do
let (name':rest) = words name
(x, _) <- mkYesodGeneral name' rest clazzes isSub res
let rname = mkName $ "resources" ++ name
eres <- lift res
let y = [ SigD rname $ ListT `AppT` (ConT ''ResourceTree `AppT` ConT ''String)
, FunD rname [Clause [] (NormalB eres) []]
]
return $ x ++ y
-- | See 'mkYesodData'.
| 481
|
mkYesodDataGeneral :: String -> Cxt -> Bool -> [ResourceTree String] -> Q [Dec]
mkYesodDataGeneral name clazzes isSub res = do
let (name':rest) = words name
(x, _) <- mkYesodGeneral name' rest clazzes isSub res
let rname = mkName $ "resources" ++ name
eres <- lift res
let y = [ SigD rname $ ListT `AppT` (ConT ''ResourceTree `AppT` ConT ''String)
, FunD rname [Clause [] (NormalB eres) []]
]
return $ x ++ y
-- | See 'mkYesodData'.
| 481
|
mkYesodDataGeneral name clazzes isSub res = do
let (name':rest) = words name
(x, _) <- mkYesodGeneral name' rest clazzes isSub res
let rname = mkName $ "resources" ++ name
eres <- lift res
let y = [ SigD rname $ ListT `AppT` (ConT ''ResourceTree `AppT` ConT ''String)
, FunD rname [Clause [] (NormalB eres) []]
]
return $ x ++ y
-- | See 'mkYesodData'.
| 401
| false
| true
| 0
| 15
| 126
| 203
| 100
| 103
| null | null |
tjakway/ghcjvm
|
compiler/hsSyn/HsExpr.hs
|
bsd-3-clause
|
ppr_expr (HsLet (L _ binds) expr)
= sep [hang (text "let") 2 (pprBinds binds),
hang (text "in") 2 (ppr expr)]
| 121
|
ppr_expr (HsLet (L _ binds) expr)
= sep [hang (text "let") 2 (pprBinds binds),
hang (text "in") 2 (ppr expr)]
| 121
|
ppr_expr (HsLet (L _ binds) expr)
= sep [hang (text "let") 2 (pprBinds binds),
hang (text "in") 2 (ppr expr)]
| 121
| false
| false
| 0
| 8
| 31
| 73
| 35
| 38
| null | null |
ggreif/clash-compiler
|
tests/shouldwork/HOPrim/HOImap.hs
|
bsd-2-clause
|
busSwitch1 :: forall n a b . KnownNat n
=> Vec n (Signal (Maybe a) -> Signal b ) -- vector of functions
-> Signal (Index n) -- address as index of vectors
-> Signal (Maybe a) -- input
-> Vec n (Signal b) -- output
busSwitch1 vec addr inp = r where
r = imap f vec
f :: Index n
-> (Signal (Maybe a) -> Signal b)
-> Signal b
f n x = x s where
s :: Signal (Maybe a)
s = liftA2 fa inp addr
fa :: Maybe a
-> Index n
-> Maybe a
fa i a | n == a = i
| otherwise = Nothing
-- based on address modify input signal
| 697
|
busSwitch1 :: forall n a b . KnownNat n
=> Vec n (Signal (Maybe a) -> Signal b ) -- vector of functions
-> Signal (Index n) -- address as index of vectors
-> Signal (Maybe a) -- input
-> Vec n (Signal b)
busSwitch1 vec addr inp = r where
r = imap f vec
f :: Index n
-> (Signal (Maybe a) -> Signal b)
-> Signal b
f n x = x s where
s :: Signal (Maybe a)
s = liftA2 fa inp addr
fa :: Maybe a
-> Index n
-> Maybe a
fa i a | n == a = i
| otherwise = Nothing
-- based on address modify input signal
| 666
|
busSwitch1 vec addr inp = r where
r = imap f vec
f :: Index n
-> (Signal (Maybe a) -> Signal b)
-> Signal b
f n x = x s where
s :: Signal (Maybe a)
s = liftA2 fa inp addr
fa :: Maybe a
-> Index n
-> Maybe a
fa i a | n == a = i
| otherwise = Nothing
-- based on address modify input signal
| 380
| true
| true
| 0
| 14
| 314
| 249
| 120
| 129
| null | null |
wavewave/hoodle-parser
|
src/Text/Hoodle/Parse/Attoparsec.hs
|
bsd-2-clause
|
-- |
trim_starting_space :: Parser ()
trim_starting_space = do try endOfInput
<|> takeWhile (inClass " \n") *> return ()
| 146
|
trim_starting_space :: Parser ()
trim_starting_space = do try endOfInput
<|> takeWhile (inClass " \n") *> return ()
| 140
|
trim_starting_space = do try endOfInput
<|> takeWhile (inClass " \n") *> return ()
| 107
| true
| true
| 0
| 9
| 44
| 45
| 21
| 24
| null | null |
esmolanka/haddock
|
haddock-api/src/Haddock/Backends/LaTeX.hs
|
bsd-2-clause
|
ppVerbOccName :: OccName -> LaTeX
ppVerbOccName = text . latexFilter . occNameString
| 84
|
ppVerbOccName :: OccName -> LaTeX
ppVerbOccName = text . latexFilter . occNameString
| 84
|
ppVerbOccName = text . latexFilter . occNameString
| 50
| false
| true
| 0
| 6
| 11
| 23
| 12
| 11
| null | null |
siddhanathan/yi
|
yi-mode-haskell/src/Yi/Mode/Haskell.hs
|
gpl-2.0
|
mkHaskModeHL :: Show st => CharToTTScanner st -> ExtHL (Exp (Tok Token))
mkHaskModeHL l = ExtHL $ Driver.mkHighlighter scnr
where
scnr = IncrParser.scanner Hask.parse . Hask.indentScanner . l
| 197
|
mkHaskModeHL :: Show st => CharToTTScanner st -> ExtHL (Exp (Tok Token))
mkHaskModeHL l = ExtHL $ Driver.mkHighlighter scnr
where
scnr = IncrParser.scanner Hask.parse . Hask.indentScanner . l
| 197
|
mkHaskModeHL l = ExtHL $ Driver.mkHighlighter scnr
where
scnr = IncrParser.scanner Hask.parse . Hask.indentScanner . l
| 124
| false
| true
| 3
| 12
| 33
| 86
| 37
| 49
| null | null |
AlexeyRaga/eta
|
compiler/ETA/Main/DynFlags.hs
|
bsd-3-clause
|
setOverlappingInsts True = do
l <- getCurLoc
upd (\d -> d { overlapInstLoc = l })
deprecate "instead use per-instance pragmas OVERLAPPING/OVERLAPPABLE/OVERLAPS"
| 166
|
setOverlappingInsts True = do
l <- getCurLoc
upd (\d -> d { overlapInstLoc = l })
deprecate "instead use per-instance pragmas OVERLAPPING/OVERLAPPABLE/OVERLAPS"
| 166
|
setOverlappingInsts True = do
l <- getCurLoc
upd (\d -> d { overlapInstLoc = l })
deprecate "instead use per-instance pragmas OVERLAPPING/OVERLAPPABLE/OVERLAPS"
| 166
| false
| false
| 0
| 11
| 27
| 45
| 21
| 24
| null | null |
jaspervdj/firefly
|
src/Firefly/Math/Shape.hs
|
bsd-3-clause
|
--------------------------------------------------------------------------------
lineCircleIntersection :: XY -> XY -> XY -> Double -> Collision
lineCircleIntersection p1 p2 c1 r = mconcat
[ Collision [p1 .+. d .* t]
| t <- solveQuadratic (d .*. d) (2 * (f .*. d)) (f .*. f - r * r)
, t >= 0 && t <= 1
]
where
d = p2 .-. p1
f = p1 .-. c1
| 364
|
lineCircleIntersection :: XY -> XY -> XY -> Double -> Collision
lineCircleIntersection p1 p2 c1 r = mconcat
[ Collision [p1 .+. d .* t]
| t <- solveQuadratic (d .*. d) (2 * (f .*. d)) (f .*. f - r * r)
, t >= 0 && t <= 1
]
where
d = p2 .-. p1
f = p1 .-. c1
| 283
|
lineCircleIntersection p1 p2 c1 r = mconcat
[ Collision [p1 .+. d .* t]
| t <- solveQuadratic (d .*. d) (2 * (f .*. d)) (f .*. f - r * r)
, t >= 0 && t <= 1
]
where
d = p2 .-. p1
f = p1 .-. c1
| 219
| true
| true
| 0
| 12
| 91
| 145
| 75
| 70
| null | null |
martinvlk/cabal
|
Cabal/Distribution/Compat/Internal/TempFile.hs
|
bsd-3-clause
|
output_flags = std_flags .|. o_CREAT
| 39
|
output_flags = std_flags .|. o_CREAT
| 39
|
output_flags = std_flags .|. o_CREAT
| 39
| false
| false
| 0
| 5
| 7
| 10
| 5
| 5
| null | null |
apanagio/easykenak
|
slicer2/src/Utils.hs
|
gpl-3.0
|
getParsedObst :: Int -> TempObstacle -> Interval -> ParsedObstacle
getParsedObst i (_, d, he) (from, to) = Item {
start = (i, from)
, end = (i, to)
, startHeight = (0,0)
, endHeight = (0,0)
, props = ObstacleProps {
distance = d
, h = he
}
}
| 265
|
getParsedObst :: Int -> TempObstacle -> Interval -> ParsedObstacle
getParsedObst i (_, d, he) (from, to) = Item {
start = (i, from)
, end = (i, to)
, startHeight = (0,0)
, endHeight = (0,0)
, props = ObstacleProps {
distance = d
, h = he
}
}
| 265
|
getParsedObst i (_, d, he) (from, to) = Item {
start = (i, from)
, end = (i, to)
, startHeight = (0,0)
, endHeight = (0,0)
, props = ObstacleProps {
distance = d
, h = he
}
}
| 198
| false
| true
| 0
| 8
| 73
| 115
| 71
| 44
| null | null |
gefei/learning_haskell
|
euler/euler.hs
|
mit
|
e009 = case (head ls) of (a,b,c) -> a * b * c
where ls = [(a,b,1000-a-b) | a <- [1..333], b <- [a..1000], a*a + b*b == (1000-a-b)*(1000-a-b)]
| 148
|
e009 = case (head ls) of (a,b,c) -> a * b * c
where ls = [(a,b,1000-a-b) | a <- [1..333], b <- [a..1000], a*a + b*b == (1000-a-b)*(1000-a-b)]
| 148
|
e009 = case (head ls) of (a,b,c) -> a * b * c
where ls = [(a,b,1000-a-b) | a <- [1..333], b <- [a..1000], a*a + b*b == (1000-a-b)*(1000-a-b)]
| 148
| false
| false
| 2
| 12
| 35
| 146
| 75
| 71
| null | null |
keithodulaigh/Hets
|
Common/AnalyseAnnos.hs
|
gpl-2.0
|
showIdPair :: (Id, Id) -> ShowS
showIdPair (i1, i2) = showId i1 . showString "," . showId i2
| 92
|
showIdPair :: (Id, Id) -> ShowS
showIdPair (i1, i2) = showId i1 . showString "," . showId i2
| 92
|
showIdPair (i1, i2) = showId i1 . showString "," . showId i2
| 60
| false
| true
| 0
| 8
| 17
| 52
| 25
| 27
| null | null |
ardumont/write-yourself-a-scheme-lab
|
Main.hs
|
gpl-2.0
|
main :: IO ()
main =
getArgs >>=
\ args -> if null args then runRepl ":q" "lisp>>> " else runOne args
| 105
|
main :: IO ()
main =
getArgs >>=
\ args -> if null args then runRepl ":q" "lisp>>> " else runOne args
| 105
|
main =
getArgs >>=
\ args -> if null args then runRepl ":q" "lisp>>> " else runOne args
| 91
| false
| true
| 0
| 8
| 25
| 44
| 22
| 22
| null | null |
brendanhay/gogol
|
gogol-serviceuser/gen/Network/Google/Resource/ServiceUser/Services/Search.hs
|
mpl-2.0
|
-- | Requested size of the next page of data.
ssPageSize :: Lens' ServicesSearch (Maybe Int32)
ssPageSize
= lens _ssPageSize (\ s a -> s{_ssPageSize = a}) .
mapping _Coerce
| 180
|
ssPageSize :: Lens' ServicesSearch (Maybe Int32)
ssPageSize
= lens _ssPageSize (\ s a -> s{_ssPageSize = a}) .
mapping _Coerce
| 134
|
ssPageSize
= lens _ssPageSize (\ s a -> s{_ssPageSize = a}) .
mapping _Coerce
| 85
| true
| true
| 1
| 9
| 37
| 59
| 28
| 31
| null | null |
lexml/lexml-linker
|
src/main/haskell/LexML/Linker/Decorator.hs
|
gpl-2.0
|
--addDecoration t1 p1 t2 p2 tagName attributes =
-- M.insertWith M.union t1 (M.singleton p1 (t2,p2,TagOpen tagName (M.toAscList attributes),TagClose tagName))
decorate :: (String -> (Tag String,Tag String)) -> DecorationMap -> [Tag String] -> [Tag String]
decorate makeTags dm tl = res
where
l = [ (x, y, k) | (x,q) <- M.toAscList dm, (y,k) <- M.toAscList q ]
(_,revDecorated,_,rest) = foldl decorateSingle (0,[],0,(zip [0 ..] tl)) l
res = concat (reverse (map snd rest : revDecorated))
decorateSingle (lastX,rl,d,tl) (x1,y1,(x2,y2,u)) = (x2,encloseTagText to tc l2 : l1 : rl,y2,tl2)
where
(to,tc) = makeTags u
d' = if lastX == x1 then d else 0
(l1,tl1) = splitTags (x1,y1 - d') tl
y2' = if x1 == x2 then y2 - y1 else y2
(l2,tl2) = splitTags (x2,y2') tl1
| 827
|
decorate :: (String -> (Tag String,Tag String)) -> DecorationMap -> [Tag String] -> [Tag String]
decorate makeTags dm tl = res
where
l = [ (x, y, k) | (x,q) <- M.toAscList dm, (y,k) <- M.toAscList q ]
(_,revDecorated,_,rest) = foldl decorateSingle (0,[],0,(zip [0 ..] tl)) l
res = concat (reverse (map snd rest : revDecorated))
decorateSingle (lastX,rl,d,tl) (x1,y1,(x2,y2,u)) = (x2,encloseTagText to tc l2 : l1 : rl,y2,tl2)
where
(to,tc) = makeTags u
d' = if lastX == x1 then d else 0
(l1,tl1) = splitTags (x1,y1 - d') tl
y2' = if x1 == x2 then y2 - y1 else y2
(l2,tl2) = splitTags (x2,y2') tl1
| 666
|
decorate makeTags dm tl = res
where
l = [ (x, y, k) | (x,q) <- M.toAscList dm, (y,k) <- M.toAscList q ]
(_,revDecorated,_,rest) = foldl decorateSingle (0,[],0,(zip [0 ..] tl)) l
res = concat (reverse (map snd rest : revDecorated))
decorateSingle (lastX,rl,d,tl) (x1,y1,(x2,y2,u)) = (x2,encloseTagText to tc l2 : l1 : rl,y2,tl2)
where
(to,tc) = makeTags u
d' = if lastX == x1 then d else 0
(l1,tl1) = splitTags (x1,y1 - d') tl
y2' = if x1 == x2 then y2 - y1 else y2
(l2,tl2) = splitTags (x2,y2') tl1
| 569
| true
| true
| 7
| 9
| 198
| 394
| 207
| 187
| null | null |
j3h/doc-review
|
src/State/Types.hs
|
bsd-3-clause
|
mkCommentId :: T.Text -> Maybe CommentId
mkCommentId = Just . CommentId
| 71
|
mkCommentId :: T.Text -> Maybe CommentId
mkCommentId = Just . CommentId
| 71
|
mkCommentId = Just . CommentId
| 30
| false
| true
| 0
| 7
| 10
| 30
| 13
| 17
| null | null |
abayley/netpoll
|
src/Network/Protocol/SNMP/UDP.hs
|
gpl-3.0
|
highBitSet :: [Word.Word8] -> Bool
highBitSet [] = False
| 56
|
highBitSet :: [Word.Word8] -> Bool
highBitSet [] = False
| 56
|
highBitSet [] = False
| 21
| false
| true
| 0
| 7
| 8
| 25
| 13
| 12
| null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.