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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
NewByteOrder/ghcjs-base
|
test/Tests/Properties.hs
|
mit
|
s_justifyLeft k c = justifyLeft j c `eqP` (unpackS . S.justifyLeftI j c)
where j = fromIntegral (k :: Word8)
| 112
|
s_justifyLeft k c = justifyLeft j c `eqP` (unpackS . S.justifyLeftI j c)
where j = fromIntegral (k :: Word8)
| 112
|
s_justifyLeft k c = justifyLeft j c `eqP` (unpackS . S.justifyLeftI j c)
where j = fromIntegral (k :: Word8)
| 112
| false
| false
| 0
| 9
| 23
| 53
| 27
| 26
| null | null |
turion/hasched
|
LatexWriter.hs
|
gpl-3.0
|
unsafeHead _ (a : _) = a
| 26
|
unsafeHead _ (a : _) = a
| 26
|
unsafeHead _ (a : _) = a
| 26
| false
| false
| 1
| 6
| 8
| 21
| 9
| 12
| null | null |
laszlopandy/elm-package
|
src/Utils/Http.hs
|
bsd-3-clause
|
sendSafe :: String -> (Request -> Manager -> IO a) -> IO (Either String a)
sendSafe url handler =
sendUnsafe url handler
`E.catch` handleHttpError url
`E.catch` (handleAnyError url :: E.SomeException -> IO (Either String b))
| 240
|
sendSafe :: String -> (Request -> Manager -> IO a) -> IO (Either String a)
sendSafe url handler =
sendUnsafe url handler
`E.catch` handleHttpError url
`E.catch` (handleAnyError url :: E.SomeException -> IO (Either String b))
| 240
|
sendSafe url handler =
sendUnsafe url handler
`E.catch` handleHttpError url
`E.catch` (handleAnyError url :: E.SomeException -> IO (Either String b))
| 165
| false
| true
| 0
| 10
| 50
| 99
| 50
| 49
| null | null |
ezyang/ghc
|
compiler/utils/FastStringEnv.hs
|
bsd-3-clause
|
elemFsEnv x y = elemUFM x y
| 39
|
elemFsEnv x y = elemUFM x y
| 39
|
elemFsEnv x y = elemUFM x y
| 39
| false
| false
| 0
| 5
| 18
| 16
| 7
| 9
| null | null |
spinda/liquidhaskell
|
tests/gsoc15/unknown/pos/AVL.hs
|
bsd-3-clause
|
bFac (Tree v l r) = ht l - ht r
| 31
|
bFac (Tree v l r) = ht l - ht r
| 31
|
bFac (Tree v l r) = ht l - ht r
| 31
| false
| false
| 0
| 7
| 10
| 29
| 13
| 16
| null | null |
scott-fleischman/greek-grammar
|
haskell/greek-grammar/src/Data/Unicode/DecomposeChar.hs
|
mit
|
decomposeChar '\x30C9' = "\x30C8\x3099"
| 39
|
decomposeChar '\x30C9' = "\x30C8\x3099"
| 39
|
decomposeChar '\x30C9' = "\x30C8\x3099"
| 39
| false
| false
| 0
| 4
| 3
| 10
| 4
| 6
| null | null |
mariefarrell/Hets
|
Temporal/Mu.hs
|
gpl-2.0
|
nnfP (Pand phi psi) = Pand (nnfP phi) (nnfP psi)
| 48
|
nnfP (Pand phi psi) = Pand (nnfP phi) (nnfP psi)
| 48
|
nnfP (Pand phi psi) = Pand (nnfP phi) (nnfP psi)
| 48
| false
| false
| 0
| 7
| 9
| 34
| 16
| 18
| null | null |
RAFIRAF/HASKELL
|
baby.hs
|
mit
|
surface (Rectangle (Point x1 y1) (Point x2 y2)) = (abs $ x2-x1)*(abs $ y2-y1)
| 77
|
surface (Rectangle (Point x1 y1) (Point x2 y2)) = (abs $ x2-x1)*(abs $ y2-y1)
| 77
|
surface (Rectangle (Point x1 y1) (Point x2 y2)) = (abs $ x2-x1)*(abs $ y2-y1)
| 77
| false
| false
| 0
| 8
| 13
| 60
| 30
| 30
| null | null |
scslab/hails
|
Hails/PolicyModule/DSL.hs
|
mit
|
setPolicy :: DCPriv -> PolicyExpM () -> PMAction ()
setPolicy priv pol =
case runPolicy pol of
Left err -> liftLIO $ throwLIO $ PolicyCompileError err
Right policy -> execPolicy policy
where execPolicy (PolicyExp db cs) = do
execPolicyDB db
void $ forM cs execPolicyCol
--
execPolicyDB (DBExp r w a) = do
setDatabaseLabelP priv (r %% w)
setCollectionSetLabelP priv (r %% a)
--
execPolicyCol (ColExp n (ColAccExp lr lw) (ColClrExp cr cw) doc fs) =
let cps = mkColPol doc fs
in createCollectionP priv n (lr %% lw) (cr %% cw) cps
--
mkColPol (ColDocExp fdocE) cs =
let fdoc = unDataPolicy fdocE
in CollectionPolicy { documentLabelPolicy = fdoc
, fieldLabelPolicies = Map.map unFieldExp cs }
--
unDataPolicy fpolE = \doc ->
let (LabelExp s i) = fpolE doc
in s %% i
--
unFieldExp ColFieldSearchable = SearchableField
unFieldExp (ColLabFieldExp f) = FieldPolicy (unDataPolicy f)
-- | Exception thrown if a policy cannot be \"compiled\" or if we
-- deternmine that it's faulty at \"runtime\".
| 1,220
|
setPolicy :: DCPriv -> PolicyExpM () -> PMAction ()
setPolicy priv pol =
case runPolicy pol of
Left err -> liftLIO $ throwLIO $ PolicyCompileError err
Right policy -> execPolicy policy
where execPolicy (PolicyExp db cs) = do
execPolicyDB db
void $ forM cs execPolicyCol
--
execPolicyDB (DBExp r w a) = do
setDatabaseLabelP priv (r %% w)
setCollectionSetLabelP priv (r %% a)
--
execPolicyCol (ColExp n (ColAccExp lr lw) (ColClrExp cr cw) doc fs) =
let cps = mkColPol doc fs
in createCollectionP priv n (lr %% lw) (cr %% cw) cps
--
mkColPol (ColDocExp fdocE) cs =
let fdoc = unDataPolicy fdocE
in CollectionPolicy { documentLabelPolicy = fdoc
, fieldLabelPolicies = Map.map unFieldExp cs }
--
unDataPolicy fpolE = \doc ->
let (LabelExp s i) = fpolE doc
in s %% i
--
unFieldExp ColFieldSearchable = SearchableField
unFieldExp (ColLabFieldExp f) = FieldPolicy (unDataPolicy f)
-- | Exception thrown if a policy cannot be \"compiled\" or if we
-- deternmine that it's faulty at \"runtime\".
| 1,220
|
setPolicy priv pol =
case runPolicy pol of
Left err -> liftLIO $ throwLIO $ PolicyCompileError err
Right policy -> execPolicy policy
where execPolicy (PolicyExp db cs) = do
execPolicyDB db
void $ forM cs execPolicyCol
--
execPolicyDB (DBExp r w a) = do
setDatabaseLabelP priv (r %% w)
setCollectionSetLabelP priv (r %% a)
--
execPolicyCol (ColExp n (ColAccExp lr lw) (ColClrExp cr cw) doc fs) =
let cps = mkColPol doc fs
in createCollectionP priv n (lr %% lw) (cr %% cw) cps
--
mkColPol (ColDocExp fdocE) cs =
let fdoc = unDataPolicy fdocE
in CollectionPolicy { documentLabelPolicy = fdoc
, fieldLabelPolicies = Map.map unFieldExp cs }
--
unDataPolicy fpolE = \doc ->
let (LabelExp s i) = fpolE doc
in s %% i
--
unFieldExp ColFieldSearchable = SearchableField
unFieldExp (ColLabFieldExp f) = FieldPolicy (unDataPolicy f)
-- | Exception thrown if a policy cannot be \"compiled\" or if we
-- deternmine that it's faulty at \"runtime\".
| 1,168
| false
| true
| 6
| 18
| 400
| 367
| 178
| 189
| null | null |
ZacharyKamerling/Canvas
|
src/Main.hs
|
mit
|
-- Enter Key Pressed. Execute command.
handleInput (EventKey (SpecialKey KeyEnter) Down _ _) w = case runParser draw $ (_info w){_words=combos $ _inputStr w} of
(i,Nothing) -> w{_inputStr="",_info=i}
(i,Just ok) -> w{_inputStr="",_info=i,_commands=_commands w ++ [ok]}
| 277
|
handleInput (EventKey (SpecialKey KeyEnter) Down _ _) w = case runParser draw $ (_info w){_words=combos $ _inputStr w} of
(i,Nothing) -> w{_inputStr="",_info=i}
(i,Just ok) -> w{_inputStr="",_info=i,_commands=_commands w ++ [ok]}
| 238
|
handleInput (EventKey (SpecialKey KeyEnter) Down _ _) w = case runParser draw $ (_info w){_words=combos $ _inputStr w} of
(i,Nothing) -> w{_inputStr="",_info=i}
(i,Just ok) -> w{_inputStr="",_info=i,_commands=_commands w ++ [ok]}
| 238
| true
| false
| 0
| 11
| 43
| 133
| 73
| 60
| null | null |
lpeterse/crprover
|
Datatypes.hs
|
gpl-2.0
|
fromProof (IffElim2 a) = If (second $ fromProof a) (first $ fromProof a)
| 76
|
fromProof (IffElim2 a) = If (second $ fromProof a) (first $ fromProof a)
| 76
|
fromProof (IffElim2 a) = If (second $ fromProof a) (first $ fromProof a)
| 76
| false
| false
| 0
| 8
| 16
| 42
| 19
| 23
| null | null |
dzhus/dsmc
|
src/DSMC/Util/Constants.hs
|
bsd-3-clause
|
-- | Avogadro constant 6.02214129(27)e23
avogadro :: Double
avogadro = 6.0221412927272727e23
| 92
|
avogadro :: Double
avogadro = 6.0221412927272727e23
| 51
|
avogadro = 6.0221412927272727e23
| 32
| true
| true
| 0
| 4
| 10
| 12
| 7
| 5
| null | null |
wavewave/devadmin
|
lib/Application/DevAdmin/Graph.hs
|
bsd-3-clause
|
constructMotherMap :: BuildConfiguration -> ProjectConfiguration
-> IO (M.Map String [String])
constructMotherMap bc pc = do
let projects = pc_projects pc
gdescs <- getAllGenPkgDesc bc pc
let deps = map ((,) <$> getPkgName <*> getDependency) gdescs
mlst = map ((,) <$> fst <*> (filter (nameMatch projects). snd)) deps
return (M.fromList mlst)
| 379
|
constructMotherMap :: BuildConfiguration -> ProjectConfiguration
-> IO (M.Map String [String])
constructMotherMap bc pc = do
let projects = pc_projects pc
gdescs <- getAllGenPkgDesc bc pc
let deps = map ((,) <$> getPkgName <*> getDependency) gdescs
mlst = map ((,) <$> fst <*> (filter (nameMatch projects). snd)) deps
return (M.fromList mlst)
| 379
|
constructMotherMap bc pc = do
let projects = pc_projects pc
gdescs <- getAllGenPkgDesc bc pc
let deps = map ((,) <$> getPkgName <*> getDependency) gdescs
mlst = map ((,) <$> fst <*> (filter (nameMatch projects). snd)) deps
return (M.fromList mlst)
| 264
| false
| true
| 0
| 17
| 86
| 146
| 71
| 75
| null | null |
elben/typing-haskell-in-haskell
|
TypingHaskellInHaskell.hs
|
bsd-3-clause
|
candidates :: ClassEnv -> Ambiguity -> [Type]
candidates ce (v, qs) = [ t' | let is = [ i | IsIn i t <- qs ]
ts = [ t | IsIn i t <- qs ],
all ((TVar v)==) ts,
any (`elem` numClasses) is,
all (`elem` stdClasses) is,
t' <- defaults ce,
all (entail ce []) [ IsIn i t' | i <- is ] ]
| 485
|
candidates :: ClassEnv -> Ambiguity -> [Type]
candidates ce (v, qs) = [ t' | let is = [ i | IsIn i t <- qs ]
ts = [ t | IsIn i t <- qs ],
all ((TVar v)==) ts,
any (`elem` numClasses) is,
all (`elem` stdClasses) is,
t' <- defaults ce,
all (entail ce []) [ IsIn i t' | i <- is ] ]
| 484
|
candidates ce (v, qs) = [ t' | let is = [ i | IsIn i t <- qs ]
ts = [ t | IsIn i t <- qs ],
all ((TVar v)==) ts,
any (`elem` numClasses) is,
all (`elem` stdClasses) is,
t' <- defaults ce,
all (entail ce []) [ IsIn i t' | i <- is ] ]
| 428
| false
| true
| 0
| 13
| 274
| 183
| 95
| 88
| null | null |
michaelt/series
|
Series/Prelude.hs
|
bsd-3-clause
|
-- ---------------------------------------
-- IO fripperies copped from Pipes.Prelude
-- ---------------------------------------
-- stdinLn = Wrap loop where
-- loop = getLine >>= \str -> return (Construct (str :> Wrap loop))
--
-- jstdinLn = \construct wrap done ->
-- let loop = wrap $ getLine >>= \str -> return (construct (str :> loop))
-- in loop
--
stdinLn :: MonadIO m => Series (Of String) m ()
stdinLn = fromHandle IO.stdin
| 449
|
stdinLn :: MonadIO m => Series (Of String) m ()
stdinLn = fromHandle IO.stdin
| 77
|
stdinLn = fromHandle IO.stdin
| 29
| true
| true
| 0
| 8
| 86
| 48
| 28
| 20
| null | null |
trskop/cabal
|
Cabal/Distribution/Simple/Build.hs
|
bsd-3-clause
|
initialBuildSteps :: FilePath -- ^"dist" prefix
-> PackageDescription -- ^mostly information from the .cabal file
-> LocalBuildInfo -- ^Configuration information
-> Verbosity -- ^The verbosity to use
-> IO ()
initialBuildSteps _distPref pkg_descr lbi verbosity = do
-- check that there's something to build
unless (not . null $ allBuildInfo pkg_descr) $ do
let name = display (packageId pkg_descr)
die $ "No libraries, executables, tests, or benchmarks "
++ "are enabled for package " ++ name ++ "."
createDirectoryIfMissingVerbose verbosity True (buildDir lbi)
writeAutogenFiles verbosity pkg_descr lbi
-- | Generate and write out the Paths_<pkg>.hs and cabal_macros.h files
--
| 777
|
initialBuildSteps :: FilePath -- ^"dist" prefix
-> PackageDescription -- ^mostly information from the .cabal file
-> LocalBuildInfo -- ^Configuration information
-> Verbosity -- ^The verbosity to use
-> IO ()
initialBuildSteps _distPref pkg_descr lbi verbosity = do
-- check that there's something to build
unless (not . null $ allBuildInfo pkg_descr) $ do
let name = display (packageId pkg_descr)
die $ "No libraries, executables, tests, or benchmarks "
++ "are enabled for package " ++ name ++ "."
createDirectoryIfMissingVerbose verbosity True (buildDir lbi)
writeAutogenFiles verbosity pkg_descr lbi
-- | Generate and write out the Paths_<pkg>.hs and cabal_macros.h files
--
| 777
|
initialBuildSteps _distPref pkg_descr lbi verbosity = do
-- check that there's something to build
unless (not . null $ allBuildInfo pkg_descr) $ do
let name = display (packageId pkg_descr)
die $ "No libraries, executables, tests, or benchmarks "
++ "are enabled for package " ++ name ++ "."
createDirectoryIfMissingVerbose verbosity True (buildDir lbi)
writeAutogenFiles verbosity pkg_descr lbi
-- | Generate and write out the Paths_<pkg>.hs and cabal_macros.h files
--
| 495
| false
| true
| 0
| 16
| 197
| 140
| 67
| 73
| null | null |
ku-fpg/kansas-amber
|
System/Hardware/Haskino/Data.hs
|
bsd-3-clause
|
firmwareCmdVal SER_CMD_END = 0xE1
| 46
|
firmwareCmdVal SER_CMD_END = 0xE1
| 46
|
firmwareCmdVal SER_CMD_END = 0xE1
| 46
| false
| false
| 0
| 5
| 16
| 9
| 4
| 5
| null | null |
stevezhee/pec
|
Pec/Base.hs
|
bsd-3-clause
|
unwrap_ :: (Typed a, Typed b) => E (IString_ -> a -> b)
unwrap_ = lamE "" $ \_ -> lamE "" $ \a -> setE (unE a)
| 110
|
unwrap_ :: (Typed a, Typed b) => E (IString_ -> a -> b)
unwrap_ = lamE "" $ \_ -> lamE "" $ \a -> setE (unE a)
| 110
|
unwrap_ = lamE "" $ \_ -> lamE "" $ \a -> setE (unE a)
| 54
| false
| true
| 0
| 11
| 27
| 73
| 37
| 36
| null | null |
jstolarek/slicer
|
lib/Language/Slicer/Eval.hs
|
gpl-3.0
|
evalOp f [VInt i, VInt j] | isIntBinOp f
= return (ORet ((intBinOps ! f) (i,j)))
| 91
|
evalOp f [VInt i, VInt j] | isIntBinOp f
= return (ORet ((intBinOps ! f) (i,j)))
| 91
|
evalOp f [VInt i, VInt j] | isIntBinOp f
= return (ORet ((intBinOps ! f) (i,j)))
| 91
| false
| false
| 0
| 10
| 26
| 62
| 29
| 33
| null | null |
mettekou/ghc
|
compiler/types/TyCoRep.hs
|
bsd-3-clause
|
-- all other possibilities are unlifted
isUnliftedTypeKind _ = False
| 68
|
isUnliftedTypeKind _ = False
| 28
|
isUnliftedTypeKind _ = False
| 28
| true
| false
| 0
| 5
| 9
| 10
| 5
| 5
| null | null |
mino2357/Hello_Haskell
|
mod.hsproj/Zn.hs
|
mit
|
toZn :: Integer -> Integer -> Zn
toZn n p = Zn n p
| 50
|
toZn :: Integer -> Integer -> Zn
toZn n p = Zn n p
| 50
|
toZn n p = Zn n p
| 17
| false
| true
| 0
| 8
| 13
| 36
| 15
| 21
| null | null |
vito/atomo
|
src/Atomo/Environment.hs
|
bsd-3-clause
|
dynamicBind :: [(String, Value)] -> VM a -> VM a
dynamicBind bs x = do
modify $ \e -> e
{ dynamic = foldl (\m (n, v) -> bindDynamic n v m) (dynamic e) bs
}
res <- x
modify $ \e -> e
{ dynamic = foldl (\m (n, _) -> unbindDynamic n m) (dynamic e) bs
}
return res
-- | Execute an action with a new toplevel delegating to the old one.
| 382
|
dynamicBind :: [(String, Value)] -> VM a -> VM a
dynamicBind bs x = do
modify $ \e -> e
{ dynamic = foldl (\m (n, v) -> bindDynamic n v m) (dynamic e) bs
}
res <- x
modify $ \e -> e
{ dynamic = foldl (\m (n, _) -> unbindDynamic n m) (dynamic e) bs
}
return res
-- | Execute an action with a new toplevel delegating to the old one.
| 382
|
dynamicBind bs x = do
modify $ \e -> e
{ dynamic = foldl (\m (n, v) -> bindDynamic n v m) (dynamic e) bs
}
res <- x
modify $ \e -> e
{ dynamic = foldl (\m (n, _) -> unbindDynamic n m) (dynamic e) bs
}
return res
-- | Execute an action with a new toplevel delegating to the old one.
| 333
| false
| true
| 0
| 14
| 126
| 163
| 85
| 78
| null | null |
DaMSL/K3
|
examples/analysis/FusionHarness.hs
|
apache-2.0
|
groupByFoldProg :: String
groupByFoldProg = "\
\ typedef MyC = collection {a:int} @Collection \
\ declare c : MyC \
\ declare d : MyC \
\ trigger t : () = \\_ -> ( \
\ let x = ((c.group_by (\\r -> r.a + 2) \
\ (\\acc -> \\r -> acc + 1) \
\ 0) \
\ .fold (\\acc -> \\r -> (acc.insert {a:r.value+1}; acc)) \
\ (empty {a:int} @Collection)) \
\ in \
\ c.insert {a:5} \
\ ) \
\ "
| 988
|
groupByFoldProg :: String
groupByFoldProg = "\
\ typedef MyC = collection {a:int} @Collection \
\ declare c : MyC \
\ declare d : MyC \
\ trigger t : () = \\_ -> ( \
\ let x = ((c.group_by (\\r -> r.a + 2) \
\ (\\acc -> \\r -> acc + 1) \
\ 0) \
\ .fold (\\acc -> \\r -> (acc.insert {a:r.value+1}; acc)) \
\ (empty {a:int} @Collection)) \
\ in \
\ c.insert {a:5} \
\ ) \
\ "
| 988
|
groupByFoldProg = "\
\ typedef MyC = collection {a:int} @Collection \
\ declare c : MyC \
\ declare d : MyC \
\ trigger t : () = \\_ -> ( \
\ let x = ((c.group_by (\\r -> r.a + 2) \
\ (\\acc -> \\r -> acc + 1) \
\ 0) \
\ .fold (\\acc -> \\r -> (acc.insert {a:r.value+1}; acc)) \
\ (empty {a:int} @Collection)) \
\ in \
\ c.insert {a:5} \
\ ) \
\ "
| 962
| false
| true
| 0
| 4
| 700
| 11
| 6
| 5
| null | null |
josuf107/xioqbot
|
src/Queue.hs
|
bsd-3-clause
|
withQueueHereMap :: QueueModify (Map.Map TwitchUser UTCTime)
withQueueHereMap f = modify $ \q -> q { queueHereMap = f (queueHereMap q) }
| 136
|
withQueueHereMap :: QueueModify (Map.Map TwitchUser UTCTime)
withQueueHereMap f = modify $ \q -> q { queueHereMap = f (queueHereMap q) }
| 136
|
withQueueHereMap f = modify $ \q -> q { queueHereMap = f (queueHereMap q) }
| 75
| false
| true
| 0
| 11
| 20
| 53
| 27
| 26
| null | null |
tpsinnem/Idris-dev
|
src/Idris/Core/TT.hs
|
bsd-3-clause
|
nsroot (NS n _) = n
| 19
|
nsroot (NS n _) = n
| 19
|
nsroot (NS n _) = n
| 19
| false
| false
| 0
| 7
| 5
| 17
| 8
| 9
| null | null |
Philonous/prototyper
|
src/Graphics/UI/Gtk/WidgetBuilder.hs
|
mit
|
cLSA :: (TypedTreeModelClass model, CellLayoutClass self,
CellRendererClass cell, TreeModelClass (model row)) =>
cell
-> (row -> [AttrOp cell])
-> self
-> model row
-> IO ()
cLSA rend attr col model = cellLayoutSetAttributes col rend model attr
| 281
|
cLSA :: (TypedTreeModelClass model, CellLayoutClass self,
CellRendererClass cell, TreeModelClass (model row)) =>
cell
-> (row -> [AttrOp cell])
-> self
-> model row
-> IO ()
cLSA rend attr col model = cellLayoutSetAttributes col rend model attr
| 281
|
cLSA rend attr col model = cellLayoutSetAttributes col rend model attr
| 70
| false
| true
| 0
| 11
| 73
| 99
| 49
| 50
| null | null |
anttisalonen/economics
|
src/Market.hs
|
mit
|
-- Removes the production factors from market needed for production.
-- Then removes the consumed goods from market.
-- Returns new market status and the list of production factors retrieved
-- from the market.
stepDemand' :: UtilityMap -> ProductionMap -> MarketPriceMap -> MarketQuantityMap -> ProductName -> Price -> (MarketQuantityMap, MarketQuantityMap, MarketQuantityMap)
stepDemand' utilities prods mprices mquantities rootname i =
let (mq', prodinputs) = withdraw (requiredInputs prods mprices) mquantities -- deduct inputs
(mq'', consumed) = withdraw (quantityAllocation mprices -- consumption
(budgetAllocation i
(buildUtilityTree
rootname utilities mprices)))
mq'
in (mq'', prodinputs, consumed)
| 811
|
stepDemand' :: UtilityMap -> ProductionMap -> MarketPriceMap -> MarketQuantityMap -> ProductName -> Price -> (MarketQuantityMap, MarketQuantityMap, MarketQuantityMap)
stepDemand' utilities prods mprices mquantities rootname i =
let (mq', prodinputs) = withdraw (requiredInputs prods mprices) mquantities -- deduct inputs
(mq'', consumed) = withdraw (quantityAllocation mprices -- consumption
(budgetAllocation i
(buildUtilityTree
rootname utilities mprices)))
mq'
in (mq'', prodinputs, consumed)
| 600
|
stepDemand' utilities prods mprices mquantities rootname i =
let (mq', prodinputs) = withdraw (requiredInputs prods mprices) mquantities -- deduct inputs
(mq'', consumed) = withdraw (quantityAllocation mprices -- consumption
(budgetAllocation i
(buildUtilityTree
rootname utilities mprices)))
mq'
in (mq'', prodinputs, consumed)
| 433
| true
| true
| 0
| 15
| 194
| 146
| 79
| 67
| null | null |
ajhc/drift
|
src/GenUtil.hs
|
mit
|
- | take the fst of every element of a list
fsts :: [(a,b)] -> [a]
fsts = map fst
| 82
|
fsts :: [(a,b)] -> [a]
fsts = map fst
| 37
|
fsts = map fst
| 14
| true
| true
| 1
| 8
| 20
| 65
| 29
| 36
| null | null |
gurgeh/pressure
|
src/BitPrec.hs
|
bsd-3-clause
|
bitPrec :: forall a . (Bounded a, Integral a) => a
bitPrec =
fromIntegral $ calcBits $ toInteger (maxBound::a)
where
calcBits = length . takeWhile (> 0) . iterate (`shiftR` 1)
| 183
|
bitPrec :: forall a . (Bounded a, Integral a) => a
bitPrec =
fromIntegral $ calcBits $ toInteger (maxBound::a)
where
calcBits = length . takeWhile (> 0) . iterate (`shiftR` 1)
| 183
|
bitPrec =
fromIntegral $ calcBits $ toInteger (maxBound::a)
where
calcBits = length . takeWhile (> 0) . iterate (`shiftR` 1)
| 132
| false
| true
| 0
| 8
| 38
| 80
| 44
| 36
| null | null |
tweag/distributed-process
|
src/Control/Distributed/Process/Management/Internal/Trace/Remote.hs
|
bsd-3-clause
|
setTraceFlagsRemote :: TraceFlags -> NodeId -> Process ()
setTraceFlagsRemote flags node = do
nsendRemote node
"trace.controller"
((Nothing :: Maybe (SendPort TraceOk)), flags)
| 206
|
setTraceFlagsRemote :: TraceFlags -> NodeId -> Process ()
setTraceFlagsRemote flags node = do
nsendRemote node
"trace.controller"
((Nothing :: Maybe (SendPort TraceOk)), flags)
| 206
|
setTraceFlagsRemote flags node = do
nsendRemote node
"trace.controller"
((Nothing :: Maybe (SendPort TraceOk)), flags)
| 148
| false
| true
| 0
| 13
| 51
| 65
| 31
| 34
| null | null |
stevenremot/fronsduk
|
src/Qzitche/Compile.hs
|
gpl-3.0
|
registerBindings (ident : idents) pos = do
state <- registerBindings idents $ pos + 1
return $ putBinding state ident (depth state, pos)
| 140
|
registerBindings (ident : idents) pos = do
state <- registerBindings idents $ pos + 1
return $ putBinding state ident (depth state, pos)
| 140
|
registerBindings (ident : idents) pos = do
state <- registerBindings idents $ pos + 1
return $ putBinding state ident (depth state, pos)
| 140
| false
| false
| 1
| 11
| 26
| 62
| 28
| 34
| null | null |
pfcuttle/twentyfour-2013
|
src/acid-state/Main.hs
|
bsd-3-clause
|
failuresOverTime :: Query FailureDb [Failure]
failuresOverTime =
sortBy (comparing failureTime) . IntMap.elems . allFailures <$> ask
| 134
|
failuresOverTime :: Query FailureDb [Failure]
failuresOverTime =
sortBy (comparing failureTime) . IntMap.elems . allFailures <$> ask
| 134
|
failuresOverTime =
sortBy (comparing failureTime) . IntMap.elems . allFailures <$> ask
| 88
| false
| true
| 1
| 9
| 17
| 47
| 21
| 26
| null | null |
hargettp/raft
|
src/Control/Consensus/Raft/Types.hs
|
mit
|
{-|
Returns default timeouts scaled from the provided RPC timeout.
-}
timeouts :: Timeout -> Timeouts
timeouts rpc =
let heartbeat = 10 * rpc
in Timeouts {
timeoutRpc = rpc,
timeoutClientRpc = 5 * rpc,
timeoutHeartbeat = heartbeat,
timeoutPulse = 7 * rpc, -- must be less than the heartbeat
timeoutElectionRange = (5 * heartbeat,10 * heartbeat)
}
| 420
|
timeouts :: Timeout -> Timeouts
timeouts rpc =
let heartbeat = 10 * rpc
in Timeouts {
timeoutRpc = rpc,
timeoutClientRpc = 5 * rpc,
timeoutHeartbeat = heartbeat,
timeoutPulse = 7 * rpc, -- must be less than the heartbeat
timeoutElectionRange = (5 * heartbeat,10 * heartbeat)
}
| 349
|
timeouts rpc =
let heartbeat = 10 * rpc
in Timeouts {
timeoutRpc = rpc,
timeoutClientRpc = 5 * rpc,
timeoutHeartbeat = heartbeat,
timeoutPulse = 7 * rpc, -- must be less than the heartbeat
timeoutElectionRange = (5 * heartbeat,10 * heartbeat)
}
| 317
| true
| true
| 0
| 9
| 132
| 98
| 53
| 45
| null | null |
noteed/syntactical
|
Text/Syntactical/Data.hs
|
bsd-3-clause
|
groupLast _ = error "groupLast: not a Last part"
| 48
|
groupLast _ = error "groupLast: not a Last part"
| 48
|
groupLast _ = error "groupLast: not a Last part"
| 48
| false
| false
| 0
| 5
| 8
| 12
| 5
| 7
| null | null |
Yuras/hfd
|
src/App.hs
|
bsd-3-clause
|
etLastCmd cmd = lift . lift $ do
state <- get
put $ state {asLastCmd = cmd}
| 80
|
setLastCmd cmd = lift . lift $ do
state <- get
put $ state {asLastCmd = cmd}
| 80
|
setLastCmd cmd = lift . lift $ do
state <- get
put $ state {asLastCmd = cmd}
| 80
| false
| false
| 0
| 10
| 21
| 39
| 19
| 20
| null | null |
markflorisson/hpack
|
testrepo/bytestring-0.9.1.9/Data/ByteString/Lazy.hs
|
bsd-3-clause
|
-- reverse a list of possibly-empty chunks into a lazy ByteString
revChunks :: [P.ByteString] -> ByteString
revChunks cs = L.foldl' (flip chunk) Empty cs
| 153
|
revChunks :: [P.ByteString] -> ByteString
revChunks cs = L.foldl' (flip chunk) Empty cs
| 87
|
revChunks cs = L.foldl' (flip chunk) Empty cs
| 45
| true
| true
| 0
| 8
| 23
| 45
| 21
| 24
| null | null |
ComputationWithBoundedResources/tct-core
|
src/Tct/Core/Data/Declaration.hs
|
bsd-3-clause
|
setArgMeta k (StrategyArg a ds) = StrategyArg (k a) ds
| 54
|
setArgMeta k (StrategyArg a ds) = StrategyArg (k a) ds
| 54
|
setArgMeta k (StrategyArg a ds) = StrategyArg (k a) ds
| 54
| false
| false
| 0
| 7
| 9
| 30
| 14
| 16
| null | null |
AlexeyRaga/eta
|
compiler/ETA/CodeGen/Prim.hs
|
bsd-3-clause
|
shouldInlinePrimOp' _ CopyMutableArrayArrayOp args = Right $ return
[
fold args
<> invokestatic (mkMethodRef stgArray "copyArray"
[stgArrayType, jint, stgArrayType, jint, jint]
void)
]
| 253
|
shouldInlinePrimOp' _ CopyMutableArrayArrayOp args = Right $ return
[
fold args
<> invokestatic (mkMethodRef stgArray "copyArray"
[stgArrayType, jint, stgArrayType, jint, jint]
void)
]
| 253
|
shouldInlinePrimOp' _ CopyMutableArrayArrayOp args = Right $ return
[
fold args
<> invokestatic (mkMethodRef stgArray "copyArray"
[stgArrayType, jint, stgArrayType, jint, jint]
void)
]
| 253
| false
| false
| 0
| 10
| 91
| 60
| 31
| 29
| null | null |
silverweed/ketchup
|
Ketchup/Utils.hs
|
mit
|
-- |Send 400 Bad Request error
sendBadRequest :: Socket -> IO ()
sendBadRequest client =
sendReply client 400 [("Content-Type",["text/plain"])] "400 Bad Request\n"
| 170
|
sendBadRequest :: Socket -> IO ()
sendBadRequest client =
sendReply client 400 [("Content-Type",["text/plain"])] "400 Bad Request\n"
| 137
|
sendBadRequest client =
sendReply client 400 [("Content-Type",["text/plain"])] "400 Bad Request\n"
| 103
| true
| true
| 0
| 8
| 28
| 45
| 24
| 21
| null | null |
mboes/hs-asn1
|
data/Tests.hs
|
bsd-3-clause
|
arbitraryPrintString = do
let printableString = (['a'..'z'] ++ ['A'..'Z'] ++ ['0'..'9'] ++ " ()+,-./:=?")
x <- replicateM 21 (elements printableString)
return $ x
| 186
|
arbitraryPrintString = do
let printableString = (['a'..'z'] ++ ['A'..'Z'] ++ ['0'..'9'] ++ " ()+,-./:=?")
x <- replicateM 21 (elements printableString)
return $ x
| 186
|
arbitraryPrintString = do
let printableString = (['a'..'z'] ++ ['A'..'Z'] ++ ['0'..'9'] ++ " ()+,-./:=?")
x <- replicateM 21 (elements printableString)
return $ x
| 186
| false
| false
| 0
| 14
| 46
| 70
| 35
| 35
| null | null |
tomjaguarpaw/postgresql-simple
|
src/Database/PostgreSQL/Simple/TypeInfo/Static.hs
|
bsd-3-clause
|
array_numericOid :: Oid
array_numericOid = Oid 1231
| 51
|
array_numericOid :: Oid
array_numericOid = Oid 1231
| 51
|
array_numericOid = Oid 1231
| 27
| false
| true
| 0
| 5
| 6
| 14
| 7
| 7
| null | null |
JakeWheat/Chaos-2010
|
Games/Chaos2010/Database/View_attributes.hs
|
bsd-3-clause
|
view_attributes :: Table View_attributes
view_attributes = baseTable "view_attributes"
| 86
|
view_attributes :: Table View_attributes
view_attributes = baseTable "view_attributes"
| 86
|
view_attributes = baseTable "view_attributes"
| 45
| false
| true
| 0
| 5
| 7
| 17
| 8
| 9
| null | null |
olorin/amazonka
|
amazonka-ec2/gen/Network/AWS/EC2/Types/Product.hs
|
mpl-2.0
|
-- | The name of the key pair.
sflsKeyName :: Lens' SpotFleetLaunchSpecification (Maybe Text)
sflsKeyName = lens _sflsKeyName (\ s a -> s{_sflsKeyName = a})
| 156
|
sflsKeyName :: Lens' SpotFleetLaunchSpecification (Maybe Text)
sflsKeyName = lens _sflsKeyName (\ s a -> s{_sflsKeyName = a})
| 125
|
sflsKeyName = lens _sflsKeyName (\ s a -> s{_sflsKeyName = a})
| 62
| true
| true
| 0
| 9
| 24
| 46
| 25
| 21
| null | null |
fmapfmapfmap/amazonka
|
amazonka-iam/gen/Network/AWS/IAM/GetInstanceProfile.hs
|
mpl-2.0
|
-- | Creates a value of 'GetInstanceProfileResponse' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'giprsResponseStatus'
--
-- * 'giprsInstanceProfile'
getInstanceProfileResponse
:: Int -- ^ 'giprsResponseStatus'
-> InstanceProfile -- ^ 'giprsInstanceProfile'
-> GetInstanceProfileResponse
getInstanceProfileResponse pResponseStatus_ pInstanceProfile_ =
GetInstanceProfileResponse'
{ _giprsResponseStatus = pResponseStatus_
, _giprsInstanceProfile = pInstanceProfile_
}
| 584
|
getInstanceProfileResponse
:: Int -- ^ 'giprsResponseStatus'
-> InstanceProfile -- ^ 'giprsInstanceProfile'
-> GetInstanceProfileResponse
getInstanceProfileResponse pResponseStatus_ pInstanceProfile_ =
GetInstanceProfileResponse'
{ _giprsResponseStatus = pResponseStatus_
, _giprsInstanceProfile = pInstanceProfile_
}
| 345
|
getInstanceProfileResponse pResponseStatus_ pInstanceProfile_ =
GetInstanceProfileResponse'
{ _giprsResponseStatus = pResponseStatus_
, _giprsInstanceProfile = pInstanceProfile_
}
| 195
| true
| true
| 0
| 8
| 92
| 56
| 32
| 24
| null | null |
frontrowed/stratosphere
|
library-gen/Stratosphere/ResourceProperties/Route53RecordSetGroupRecordSet.hs
|
mit
|
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-recordset.html#cfn-route53-recordset-resourcerecords
rrsgrsResourceRecords :: Lens' Route53RecordSetGroupRecordSet (Maybe (ValList Text))
rrsgrsResourceRecords = lens _route53RecordSetGroupRecordSetResourceRecords (\s a -> s { _route53RecordSetGroupRecordSetResourceRecords = a })
| 370
|
rrsgrsResourceRecords :: Lens' Route53RecordSetGroupRecordSet (Maybe (ValList Text))
rrsgrsResourceRecords = lens _route53RecordSetGroupRecordSetResourceRecords (\s a -> s { _route53RecordSetGroupRecordSetResourceRecords = a })
| 227
|
rrsgrsResourceRecords = lens _route53RecordSetGroupRecordSetResourceRecords (\s a -> s { _route53RecordSetGroupRecordSetResourceRecords = a })
| 142
| true
| true
| 0
| 9
| 22
| 52
| 28
| 24
| null | null |
ntc2/cryptol
|
src/Cryptol/TypeCheck/Solver/InfNat.hs
|
bsd-3-clause
|
nMax (Nat x) (Nat y) = Nat (max x y)
| 37
|
nMax (Nat x) (Nat y) = Nat (max x y)
| 37
|
nMax (Nat x) (Nat y) = Nat (max x y)
| 37
| false
| false
| 0
| 7
| 10
| 34
| 16
| 18
| null | null |
jahaynes/crawler
|
src/HttpUtil.hs
|
mit
|
checkSize :: MonadFail m => Int -> Response a -> m ()
checkSize maxContentLength res =
case getContentLength res of
Just x | x <= maxContentLength -> return ()
| otherwise -> fail "TODO - Too big"
Nothing -> return ()
| 264
|
checkSize :: MonadFail m => Int -> Response a -> m ()
checkSize maxContentLength res =
case getContentLength res of
Just x | x <= maxContentLength -> return ()
| otherwise -> fail "TODO - Too big"
Nothing -> return ()
| 264
|
checkSize maxContentLength res =
case getContentLength res of
Just x | x <= maxContentLength -> return ()
| otherwise -> fail "TODO - Too big"
Nothing -> return ()
| 210
| false
| true
| 0
| 11
| 87
| 97
| 42
| 55
| null | null |
scott-fleischman/greek-grammar
|
haskell/greek-grammar/src/Text/Greek/Mounce/Parse.hs
|
mit
|
nounCategoryParser :: CharParser () NounCategory
nounCategoryParser = NounCategory
<$> (spaces *> (pack <$> (many1 (noneOf "\n\r") <* spaces)))
<*> (spaces *> nounFormsParser <* spaces)
<*> (spaces *> string "lemmas:" *> spaces *> lemmasParser)
| 250
|
nounCategoryParser :: CharParser () NounCategory
nounCategoryParser = NounCategory
<$> (spaces *> (pack <$> (many1 (noneOf "\n\r") <* spaces)))
<*> (spaces *> nounFormsParser <* spaces)
<*> (spaces *> string "lemmas:" *> spaces *> lemmasParser)
| 250
|
nounCategoryParser = NounCategory
<$> (spaces *> (pack <$> (many1 (noneOf "\n\r") <* spaces)))
<*> (spaces *> nounFormsParser <* spaces)
<*> (spaces *> string "lemmas:" *> spaces *> lemmasParser)
| 201
| false
| true
| 8
| 13
| 38
| 97
| 50
| 47
| null | null |
dysinger/amazonka
|
amazonka-datapipeline/gen/Network/AWS/DataPipeline/DescribeObjects.hs
|
mpl-2.0
|
-- | Indicates whether any expressions in the object should be evaluated when the
-- object descriptions are returned.
doEvaluateExpressions :: Lens' DescribeObjects (Maybe Bool)
doEvaluateExpressions =
lens _doEvaluateExpressions (\s a -> s { _doEvaluateExpressions = a })
| 277
|
doEvaluateExpressions :: Lens' DescribeObjects (Maybe Bool)
doEvaluateExpressions =
lens _doEvaluateExpressions (\s a -> s { _doEvaluateExpressions = a })
| 158
|
doEvaluateExpressions =
lens _doEvaluateExpressions (\s a -> s { _doEvaluateExpressions = a })
| 98
| true
| true
| 0
| 9
| 41
| 47
| 26
| 21
| null | null |
li-zhirui/EoplLangs
|
src/CallByReference/Parser.hs
|
bsd-3-clause
|
keyWord :: String -> Parser ()
keyWord w = string w *> notFollowedBy alphaNumChar *> spaceConsumer
| 98
|
keyWord :: String -> Parser ()
keyWord w = string w *> notFollowedBy alphaNumChar *> spaceConsumer
| 98
|
keyWord w = string w *> notFollowedBy alphaNumChar *> spaceConsumer
| 67
| false
| true
| 0
| 7
| 15
| 37
| 17
| 20
| null | null |
esengie/algebraic-checker
|
test/Spec.hs
|
bsd-3-clause
|
catTest1 :: Test
catTest1 = TestCase $ assertBool "Leib" $ not.isLeft $ N.proof N.one
| 85
|
catTest1 :: Test
catTest1 = TestCase $ assertBool "Leib" $ not.isLeft $ N.proof N.one
| 85
|
catTest1 = TestCase $ assertBool "Leib" $ not.isLeft $ N.proof N.one
| 68
| false
| true
| 2
| 7
| 13
| 42
| 18
| 24
| null | null |
KolodeznyDiver/THEff
|
src/Control/THEff/TH/Internal.hs
|
bsd-3-clause
|
lookEffFn :: String -> String -> Q Name
lookEffFn mdl eff = lookEffValue $ concat [mdl, "eff", eff]
| 100
|
lookEffFn :: String -> String -> Q Name
lookEffFn mdl eff = lookEffValue $ concat [mdl, "eff", eff]
| 99
|
lookEffFn mdl eff = lookEffValue $ concat [mdl, "eff", eff]
| 59
| false
| true
| 0
| 7
| 18
| 43
| 22
| 21
| null | null |
junnf/Functional-Programming
|
codes/binarydata.hs
|
unlicense
|
num2bytes number = bytes ++ [getNthByte number (length bytes)]
where
bytes = last $ takeWhile (\n -> bytes2num n < number) $ bytesSequences
bytesSequences = map (\n -> take n (byteStream number)) [0..]
byteStream number = map (getNthByte number) [0..]
| 268
|
num2bytes number = bytes ++ [getNthByte number (length bytes)]
where
bytes = last $ takeWhile (\n -> bytes2num n < number) $ bytesSequences
bytesSequences = map (\n -> take n (byteStream number)) [0..]
byteStream number = map (getNthByte number) [0..]
| 268
|
num2bytes number = bytes ++ [getNthByte number (length bytes)]
where
bytes = last $ takeWhile (\n -> bytes2num n < number) $ bytesSequences
bytesSequences = map (\n -> take n (byteStream number)) [0..]
byteStream number = map (getNthByte number) [0..]
| 268
| false
| false
| 0
| 13
| 56
| 114
| 58
| 56
| null | null |
alsonkemp/turbinado
|
Turbinado/Database/ORM/Adapters/Common.hs
|
bsd-3-clause
|
generateConstructor cs typeName =
typeName ++ " " ++ (unwords $
map (\i -> "(HDBC.fromSql (r !! " ++ (show i) ++ "))") [0..((M.size cs) - 1)])
| 146
|
generateConstructor cs typeName =
typeName ++ " " ++ (unwords $
map (\i -> "(HDBC.fromSql (r !! " ++ (show i) ++ "))") [0..((M.size cs) - 1)])
| 146
|
generateConstructor cs typeName =
typeName ++ " " ++ (unwords $
map (\i -> "(HDBC.fromSql (r !! " ++ (show i) ++ "))") [0..((M.size cs) - 1)])
| 146
| false
| false
| 0
| 14
| 30
| 73
| 38
| 35
| null | null |
oldmanmike/ghc
|
compiler/basicTypes/MkId.hs
|
bsd-3-clause
|
seqName = mkWiredInIdName gHC_PRIM (fsLit "seq") seqIdKey seqId
| 95
|
seqName = mkWiredInIdName gHC_PRIM (fsLit "seq") seqIdKey seqId
| 95
|
seqName = mkWiredInIdName gHC_PRIM (fsLit "seq") seqIdKey seqId
| 95
| false
| false
| 0
| 7
| 39
| 21
| 10
| 11
| null | null |
jaapweel/piffle
|
src/Main.hs
|
gpl-2.0
|
-- RETURN STATUS CODES FOR THE PROGRAM -------------------------------
statusReady =
ExitSuccess
| 101
|
statusReady =
ExitSuccess
| 29
|
statusReady =
ExitSuccess
| 29
| true
| false
| 0
| 4
| 15
| 7
| 4
| 3
| null | null |
Philonous/pontarius-service
|
source/DBusInterface.hs
|
agpl-3.0
|
setCredentialsMethod :: PSState -> Method
setCredentialsMethod st =
Method (DBus.repMethod $ \u p -> setCredentialsM st u p)
"setCredentials"
("username" :> "password" :> Done)
Done
| 218
|
setCredentialsMethod :: PSState -> Method
setCredentialsMethod st =
Method (DBus.repMethod $ \u p -> setCredentialsM st u p)
"setCredentials"
("username" :> "password" :> Done)
Done
| 218
|
setCredentialsMethod st =
Method (DBus.repMethod $ \u p -> setCredentialsM st u p)
"setCredentials"
("username" :> "password" :> Done)
Done
| 176
| false
| true
| 0
| 9
| 61
| 61
| 31
| 30
| null | null |
csabahruska/quake3
|
mapviewer/Camera.hs
|
bsd-3-clause
|
spline' :: Vec3 -> Vec3 -> Vec3 -> Vec3 -> Float -> Vec3
spline' p0 p1 p2 p3 t = 0.5 *& (p2 &- p0 &+ (4*&p0 &- 10*&p1 &+ 8*&p2 &- 2*&p3) &* t &+ ((-3)*&p0 &+ 9*&p1 &- 8*&p2 &+ 3*&p3) &* t^2)
| 190
|
spline' :: Vec3 -> Vec3 -> Vec3 -> Vec3 -> Float -> Vec3
spline' p0 p1 p2 p3 t = 0.5 *& (p2 &- p0 &+ (4*&p0 &- 10*&p1 &+ 8*&p2 &- 2*&p3) &* t &+ ((-3)*&p0 &+ 9*&p1 &- 8*&p2 &+ 3*&p3) &* t^2)
| 190
|
spline' p0 p1 p2 p3 t = 0.5 *& (p2 &- p0 &+ (4*&p0 &- 10*&p1 &+ 8*&p2 &- 2*&p3) &* t &+ ((-3)*&p0 &+ 9*&p1 &- 8*&p2 &+ 3*&p3) &* t^2)
| 133
| false
| true
| 0
| 19
| 44
| 140
| 72
| 68
| null | null |
spatial-reasoning/zeno
|
src/DecisionProcedure/OrientedPoint/AngleConsistency.hs
|
bsd-2-clause
|
getVarsFo (Le t1 t2) = Set.union (getVarsTe t1) (getVarsTe t2)
| 66
|
getVarsFo (Le t1 t2) = Set.union (getVarsTe t1) (getVarsTe t2)
| 66
|
getVarsFo (Le t1 t2) = Set.union (getVarsTe t1) (getVarsTe t2)
| 66
| false
| false
| 0
| 7
| 13
| 36
| 17
| 19
| null | null |
suhailshergill/extensible-effects
|
test/Control/Eff/Reader/Strict/Test.hs
|
mit
|
case_Strict1_Reader_runReader :: Assertion
case_Strict1_Reader_runReader = let
e = run $ runReader (undefined :: ()) voidReader
in
assertUndefined (e :: ())
where
voidReader = do
_ <- (ask :: Eff '[Reader ()] ())
return ()
| 251
|
case_Strict1_Reader_runReader :: Assertion
case_Strict1_Reader_runReader = let
e = run $ runReader (undefined :: ()) voidReader
in
assertUndefined (e :: ())
where
voidReader = do
_ <- (ask :: Eff '[Reader ()] ())
return ()
| 251
|
case_Strict1_Reader_runReader = let
e = run $ runReader (undefined :: ()) voidReader
in
assertUndefined (e :: ())
where
voidReader = do
_ <- (ask :: Eff '[Reader ()] ())
return ()
| 208
| false
| true
| 0
| 13
| 62
| 96
| 48
| 48
| null | null |
locaweb/leela
|
src/warpdrive/src/Leela/Data/Endpoint.hs
|
apache-2.0
|
isHTTPS _ = False
| 26
|
isHTTPS _ = False
| 26
|
isHTTPS _ = False
| 26
| false
| false
| 0
| 5
| 12
| 9
| 4
| 5
| null | null |
green-haskell/ghc
|
compiler/codeGen/StgCmmClosure.hs
|
bsd-3-clause
|
getCallMethod dflags name id (LFThunk _ _ updatable std_form_info is_fun)
n_args _cg_loc _self_loop_info
| is_fun -- it *might* be a function, so we must "call" it (which is always safe)
= SlowCall -- We cannot just enter it [in eval/apply, the entry code
-- is the fast-entry code]
-- Since is_fun is False, we are *definitely* looking at a data value
| updatable || gopt Opt_Ticky dflags -- to catch double entry
{- OLD: || opt_SMP
I decided to remove this, because in SMP mode it doesn't matter
if we enter the same thunk multiple times, so the optimisation
of jumping directly to the entry code is still valid. --SDM
-}
= EnterIt
-- even a non-updatable selector thunk can be updated by the garbage
-- collector, so we must enter it. (#8817)
| SelectorThunk{} <- std_form_info
= EnterIt
-- We used to have ASSERT( n_args == 0 ), but actually it is
-- possible for the optimiser to generate
-- let bot :: Int = error Int "urk"
-- in (bot `cast` unsafeCoerce Int (Int -> Int)) 3
-- This happens as a result of the case-of-error transformation
-- So the right thing to do is just to enter the thing
| otherwise -- Jump direct to code for single-entry thunks
= ASSERT( n_args == 0 )
DirectEntry (thunkEntryLabel dflags name (idCafInfo id) std_form_info
updatable) 0
| 1,426
|
getCallMethod dflags name id (LFThunk _ _ updatable std_form_info is_fun)
n_args _cg_loc _self_loop_info
| is_fun -- it *might* be a function, so we must "call" it (which is always safe)
= SlowCall -- We cannot just enter it [in eval/apply, the entry code
-- is the fast-entry code]
-- Since is_fun is False, we are *definitely* looking at a data value
| updatable || gopt Opt_Ticky dflags -- to catch double entry
{- OLD: || opt_SMP
I decided to remove this, because in SMP mode it doesn't matter
if we enter the same thunk multiple times, so the optimisation
of jumping directly to the entry code is still valid. --SDM
-}
= EnterIt
-- even a non-updatable selector thunk can be updated by the garbage
-- collector, so we must enter it. (#8817)
| SelectorThunk{} <- std_form_info
= EnterIt
-- We used to have ASSERT( n_args == 0 ), but actually it is
-- possible for the optimiser to generate
-- let bot :: Int = error Int "urk"
-- in (bot `cast` unsafeCoerce Int (Int -> Int)) 3
-- This happens as a result of the case-of-error transformation
-- So the right thing to do is just to enter the thing
| otherwise -- Jump direct to code for single-entry thunks
= ASSERT( n_args == 0 )
DirectEntry (thunkEntryLabel dflags name (idCafInfo id) std_form_info
updatable) 0
| 1,426
|
getCallMethod dflags name id (LFThunk _ _ updatable std_form_info is_fun)
n_args _cg_loc _self_loop_info
| is_fun -- it *might* be a function, so we must "call" it (which is always safe)
= SlowCall -- We cannot just enter it [in eval/apply, the entry code
-- is the fast-entry code]
-- Since is_fun is False, we are *definitely* looking at a data value
| updatable || gopt Opt_Ticky dflags -- to catch double entry
{- OLD: || opt_SMP
I decided to remove this, because in SMP mode it doesn't matter
if we enter the same thunk multiple times, so the optimisation
of jumping directly to the entry code is still valid. --SDM
-}
= EnterIt
-- even a non-updatable selector thunk can be updated by the garbage
-- collector, so we must enter it. (#8817)
| SelectorThunk{} <- std_form_info
= EnterIt
-- We used to have ASSERT( n_args == 0 ), but actually it is
-- possible for the optimiser to generate
-- let bot :: Int = error Int "urk"
-- in (bot `cast` unsafeCoerce Int (Int -> Int)) 3
-- This happens as a result of the case-of-error transformation
-- So the right thing to do is just to enter the thing
| otherwise -- Jump direct to code for single-entry thunks
= ASSERT( n_args == 0 )
DirectEntry (thunkEntryLabel dflags name (idCafInfo id) std_form_info
updatable) 0
| 1,426
| false
| false
| 0
| 9
| 387
| 144
| 75
| 69
| null | null |
redongjun/haskellschool
|
homework/HW05/HW05.hs
|
unlicense
|
getBadTs :: FilePath -> FilePath -> IO (Maybe [Transaction])
getBadTs victims_path transaction_path = do
victims_tid <- (parseFile victims_path) :: IO (Maybe [TId])
transactions <- (parseFile transaction_path) :: IO (Maybe [Transaction])
return $ (\vs ts -> filter (\z -> elem (tid z) vs) ts) <$> victims_tid <*> transactions
-- Exercise 5 -----------------------------------------
| 388
|
getBadTs :: FilePath -> FilePath -> IO (Maybe [Transaction])
getBadTs victims_path transaction_path = do
victims_tid <- (parseFile victims_path) :: IO (Maybe [TId])
transactions <- (parseFile transaction_path) :: IO (Maybe [Transaction])
return $ (\vs ts -> filter (\z -> elem (tid z) vs) ts) <$> victims_tid <*> transactions
-- Exercise 5 -----------------------------------------
| 388
|
getBadTs victims_path transaction_path = do
victims_tid <- (parseFile victims_path) :: IO (Maybe [TId])
transactions <- (parseFile transaction_path) :: IO (Maybe [Transaction])
return $ (\vs ts -> filter (\z -> elem (tid z) vs) ts) <$> victims_tid <*> transactions
-- Exercise 5 -----------------------------------------
| 327
| false
| true
| 0
| 17
| 57
| 142
| 72
| 70
| null | null |
maurer/15-411-Haskell-Base-Code
|
src/Text/Parsec/Char.hs
|
bsd-3-clause
|
-- | As the dual of 'oneOf', @noneOf cs@ succeeds if the current
-- character /not/ in the supplied list of characters @cs@. Returns the
-- parsed character.
--
-- > consonant = noneOf "aeiou"
noneOf :: (Stream s m Char) => [Char] -> ParsecT s u m Char
noneOf cs = satisfy (\c -> not (elem c cs))
| 308
|
noneOf :: (Stream s m Char) => [Char] -> ParsecT s u m Char
noneOf cs = satisfy (\c -> not (elem c cs))
| 113
|
noneOf cs = satisfy (\c -> not (elem c cs))
| 53
| true
| true
| 0
| 10
| 70
| 75
| 39
| 36
| null | null |
uduki/hsQt
|
Qtc/ClassTypes/Gui.hs
|
bsd-2-clause
|
qDropEventAddFinalizer :: QDropEvent a -> IO ()
qDropEventAddFinalizer (Object fp)
= addForeignPtrFinalizer qtc_QDropEvent_getFinalizer fp
| 140
|
qDropEventAddFinalizer :: QDropEvent a -> IO ()
qDropEventAddFinalizer (Object fp)
= addForeignPtrFinalizer qtc_QDropEvent_getFinalizer fp
| 140
|
qDropEventAddFinalizer (Object fp)
= addForeignPtrFinalizer qtc_QDropEvent_getFinalizer fp
| 92
| false
| true
| 0
| 7
| 15
| 37
| 17
| 20
| null | null |
alexbaluta/courseography
|
dependencies/HaXml-1.25.3/src/Text/XML/HaXml/Combinators.hs
|
gpl-3.0
|
-- | @ifTxt yes no@ processes any textual content with the @yes@ filter,
-- but otherwise is the same as the @no@ filter.
ifTxt :: (String->CFilter i) -> CFilter i -> CFilter i
ifTxt yes _no c@(CString _ s _) = yes s c
| 221
|
ifTxt :: (String->CFilter i) -> CFilter i -> CFilter i
ifTxt yes _no c@(CString _ s _) = yes s c
| 97
|
ifTxt yes _no c@(CString _ s _) = yes s c
| 42
| true
| true
| 0
| 8
| 46
| 66
| 32
| 34
| null | null |
plaprade/aeson
|
Data/Aeson/Types/Instances.hs
|
bsd-3-clause
|
scientificToNumber :: Scientific -> Number
scientificToNumber s
| e < 0 = D $ Scientific.toRealFloat s
| otherwise = I $ c * 10 ^ e
where
e = Scientific.base10Exponent s
c = Scientific.coefficient s
| 221
|
scientificToNumber :: Scientific -> Number
scientificToNumber s
| e < 0 = D $ Scientific.toRealFloat s
| otherwise = I $ c * 10 ^ e
where
e = Scientific.base10Exponent s
c = Scientific.coefficient s
| 221
|
scientificToNumber s
| e < 0 = D $ Scientific.toRealFloat s
| otherwise = I $ c * 10 ^ e
where
e = Scientific.base10Exponent s
c = Scientific.coefficient s
| 178
| false
| true
| 3
| 8
| 57
| 85
| 38
| 47
| null | null |
vTurbine/ghc
|
utils/ghctags/Main.hs
|
bsd-3-clause
|
foundOfLName :: ModuleName -> Located Name -> FoundThing
foundOfLName mod id = FoundThing mod (getOccString $ unLoc id) (startOfLocated id)
| 139
|
foundOfLName :: ModuleName -> Located Name -> FoundThing
foundOfLName mod id = FoundThing mod (getOccString $ unLoc id) (startOfLocated id)
| 139
|
foundOfLName mod id = FoundThing mod (getOccString $ unLoc id) (startOfLocated id)
| 82
| false
| true
| 0
| 8
| 19
| 54
| 25
| 29
| null | null |
accraze/discogs-haskell
|
src/Discogs/Actions/Label.hs
|
mit
|
-- | Get a label with a specific id
--
-- GET \/labels\/:labelId
--
-- @
-- runDiscogsAnon $ Discogs.Actions.getLabel $ LabelID "1"
-- @
getLabel :: Monad m => LabelID -> DiscogsT m Label
getLabel = runRoute . Route.getLabel
| 228
|
getLabel :: Monad m => LabelID -> DiscogsT m Label
getLabel = runRoute . Route.getLabel
| 87
|
getLabel = runRoute . Route.getLabel
| 36
| true
| true
| 0
| 8
| 43
| 46
| 24
| 22
| null | null |
alios/iho-presentation
|
Data/IHO/S52/Types/Vector.hs
|
bsd-3-clause
|
parsePenColour :: Parser VectorInstruction
parsePenColour = parseInstruction' "SP" SetPenColour $ anyChar
| 120
|
parsePenColour :: Parser VectorInstruction
parsePenColour = parseInstruction' "SP" SetPenColour $ anyChar
| 105
|
parsePenColour = parseInstruction' "SP" SetPenColour $ anyChar
| 62
| false
| true
| 1
| 6
| 25
| 27
| 11
| 16
| null | null |
lambdacms/lambdacms.org
|
lambdacmsorg-page/LambdaCmsOrg/Page/Message.hs
|
mit
|
englishMessage (LogDeletedPage title) = "Deleted page \"" <> title <> "\""
| 74
|
englishMessage (LogDeletedPage title) = "Deleted page \"" <> title <> "\""
| 74
|
englishMessage (LogDeletedPage title) = "Deleted page \"" <> title <> "\""
| 74
| false
| false
| 0
| 7
| 10
| 23
| 11
| 12
| null | null |
meiersi/scyther-proof
|
src/Scyther/Facts.hs
|
gpl-3.0
|
-- Equalities
-------------
-- | Lift a substitutition.
liftSubst :: (E.Equalities -> a -> b) -> Facts -> a -> b
liftSubst subst facts = subst (equalities facts)
| 162
|
liftSubst :: (E.Equalities -> a -> b) -> Facts -> a -> b
liftSubst subst facts = subst (equalities facts)
| 105
|
liftSubst subst facts = subst (equalities facts)
| 48
| true
| true
| 0
| 9
| 28
| 59
| 29
| 30
| null | null |
DavidAlphaFox/ghc
|
libraries/Cabal/Cabal/Distribution/Simple/PackageIndex.hs
|
bsd-3-clause
|
reverseTopologicalOrder :: PackageInstalled a => PackageIndex a -> [a]
reverseTopologicalOrder index = map toPkgId
. Graph.topSort
. Graph.transposeG
$ graph
where (graph, toPkgId, _) = dependencyGraph index
-- | Builds a graph of the package dependencies.
--
-- Dependencies on other packages that are not in the index are discarded.
-- You can check if there are any such dependencies with 'brokenPackages'.
--
| 505
|
reverseTopologicalOrder :: PackageInstalled a => PackageIndex a -> [a]
reverseTopologicalOrder index = map toPkgId
. Graph.topSort
. Graph.transposeG
$ graph
where (graph, toPkgId, _) = dependencyGraph index
-- | Builds a graph of the package dependencies.
--
-- Dependencies on other packages that are not in the index are discarded.
-- You can check if there are any such dependencies with 'brokenPackages'.
--
| 505
|
reverseTopologicalOrder index = map toPkgId
. Graph.topSort
. Graph.transposeG
$ graph
where (graph, toPkgId, _) = dependencyGraph index
-- | Builds a graph of the package dependencies.
--
-- Dependencies on other packages that are not in the index are discarded.
-- You can check if there are any such dependencies with 'brokenPackages'.
--
| 434
| false
| true
| 0
| 8
| 155
| 75
| 40
| 35
| null | null |
qpliu/esolang
|
01_/hs/interp/ParseSigs.hs
|
gpl-3.0
|
parseSig name patterns (Equal:tokens) [] =
collectBody name (reverse patterns) tokens []
| 92
|
parseSig name patterns (Equal:tokens) [] =
collectBody name (reverse patterns) tokens []
| 92
|
parseSig name patterns (Equal:tokens) [] =
collectBody name (reverse patterns) tokens []
| 92
| false
| false
| 0
| 7
| 15
| 41
| 20
| 21
| null | null |
bus000/Dikunt
|
src/Types/Internal.hs
|
bsd-3-clause
|
getServerCommand ServerPart{} = PART
| 36
|
getServerCommand ServerPart{} = PART
| 36
|
getServerCommand ServerPart{} = PART
| 36
| false
| false
| 1
| 5
| 3
| 16
| 6
| 10
| null | null |
oldmanmike/ghc
|
compiler/utils/Pretty.hs
|
bsd-3-clause
|
brackets p = char '[' <> p <> char ']'
| 42
|
brackets p = char '[' <> p <> char ']'
| 42
|
brackets p = char '[' <> p <> char ']'
| 42
| false
| false
| 0
| 7
| 13
| 23
| 10
| 13
| null | null |
fibsifan/pandoc
|
src/Text/Pandoc.hs
|
gpl-2.0
|
getDefaultExtensions "plain" = plainExtensions
| 56
|
getDefaultExtensions "plain" = plainExtensions
| 56
|
getDefaultExtensions "plain" = plainExtensions
| 56
| false
| false
| 0
| 4
| 13
| 10
| 4
| 6
| null | null |
lfritz/python-type-inference
|
python-type-inference/src/Language/Python/TypeInference/Common.hs
|
bsd-3-clause
|
iota = "\x03b9"
| 15
|
iota = "\x03b9"
| 15
|
iota = "\x03b9"
| 15
| false
| false
| 1
| 5
| 2
| 10
| 3
| 7
| null | null |
beni55/cps-core
|
CPS/FromGHC.hs
|
bsd-3-clause
|
freshs :: (Context -> String -> a -> (Context, b))
-> Context -> String -> [a] -> (Context, [b])
freshs fresh ids s tys = mapAccumL (\ids ty -> fresh ids s ty) ids tys
| 174
|
freshs :: (Context -> String -> a -> (Context, b))
-> Context -> String -> [a] -> (Context, [b])
freshs fresh ids s tys = mapAccumL (\ids ty -> fresh ids s ty) ids tys
| 174
|
freshs fresh ids s tys = mapAccumL (\ids ty -> fresh ids s ty) ids tys
| 70
| false
| true
| 0
| 10
| 41
| 93
| 50
| 43
| null | null |
juodaspaulius/clafer
|
src/Language/Clafer/Intermediate/SimpleScopeAnalyzer.hs
|
mit
|
findConstraints (IEClafer clafer) = concatMap findConstraints (_elements clafer)
| 80
|
findConstraints (IEClafer clafer) = concatMap findConstraints (_elements clafer)
| 80
|
findConstraints (IEClafer clafer) = concatMap findConstraints (_elements clafer)
| 80
| false
| false
| 0
| 7
| 7
| 26
| 12
| 14
| null | null |
conal/reification-rules
|
src/ReificationRules/MonoPrims.hs
|
bsd-3-clause
|
bGe = GeP :: Prim (BinRel Bool )
| 41
|
bGe = GeP :: Prim (BinRel Bool )
| 41
|
bGe = GeP :: Prim (BinRel Bool )
| 41
| false
| false
| 0
| 7
| 16
| 18
| 9
| 9
| null | null |
soenkehahn/quickcheck
|
Test/QuickCheck/All.hs
|
bsd-3-clause
|
monomorphiseType err mono ty@(ForallT _ _ _) = err $ "Higher-ranked type"
| 73
|
monomorphiseType err mono ty@(ForallT _ _ _) = err $ "Higher-ranked type"
| 73
|
monomorphiseType err mono ty@(ForallT _ _ _) = err $ "Higher-ranked type"
| 73
| false
| false
| 0
| 8
| 11
| 30
| 15
| 15
| null | null |
kawu/factorized-tag-parser
|
src/NLP/Partage/Tree/Other.hs
|
bsd-2-clause
|
-- | Projection of a tree, i.e. a list of its terminals.
project :: Tree n t -> [t]
project =
F.foldMap term
where
term (Term x) = [x]
term _ = []
-- | Is it a root label of the given tree?
| 212
|
project :: Tree n t -> [t]
project =
F.foldMap term
where
term (Term x) = [x]
term _ = []
-- | Is it a root label of the given tree?
| 155
|
project =
F.foldMap term
where
term (Term x) = [x]
term _ = []
-- | Is it a root label of the given tree?
| 128
| true
| true
| 0
| 8
| 66
| 69
| 32
| 37
| null | null |
madjestic/b1
|
src/B1/Program/Prices/Options.hs
|
bsd-3-clause
|
getDataSource :: String -> Options -> Options
getDataSource arg options = options { dataSource = readDataSource }
where
readDataSource = case arg of
"google" -> Google
"mock" -> Mock
_ -> Google
| 219
|
getDataSource :: String -> Options -> Options
getDataSource arg options = options { dataSource = readDataSource }
where
readDataSource = case arg of
"google" -> Google
"mock" -> Mock
_ -> Google
| 219
|
getDataSource arg options = options { dataSource = readDataSource }
where
readDataSource = case arg of
"google" -> Google
"mock" -> Mock
_ -> Google
| 173
| false
| true
| 0
| 7
| 56
| 62
| 32
| 30
| null | null |
zudov/purescript-importer
|
src/Lib.hs
|
bsd-3-clause
|
overPositioned f a = f a
| 24
|
overPositioned f a = f a
| 24
|
overPositioned f a = f a
| 24
| false
| false
| 1
| 5
| 5
| 19
| 6
| 13
| null | null |
dysinger/amazonka
|
amazonka-directconnect/gen/Network/AWS/DirectConnect/AllocatePrivateVirtualInterface.hs
|
mpl-2.0
|
apvirLocation :: Lens' AllocatePrivateVirtualInterfaceResponse (Maybe Text)
apvirLocation = lens _apvirLocation (\s a -> s { _apvirLocation = a })
| 146
|
apvirLocation :: Lens' AllocatePrivateVirtualInterfaceResponse (Maybe Text)
apvirLocation = lens _apvirLocation (\s a -> s { _apvirLocation = a })
| 146
|
apvirLocation = lens _apvirLocation (\s a -> s { _apvirLocation = a })
| 70
| false
| true
| 0
| 9
| 18
| 45
| 24
| 21
| null | null |
gsdlab/clafer
|
src/Language/Clafer/Generator/Html.hs
|
mit
|
printName :: Name -> Int -> Map.Map Span [Ir] -> Bool -> [(Span, String)] -> String
printName (Path _ modids) indent irMap html comments = unwords $ map (\x -> printModId x indent irMap html comments) modids
| 207
|
printName :: Name -> Int -> Map.Map Span [Ir] -> Bool -> [(Span, String)] -> String
printName (Path _ modids) indent irMap html comments = unwords $ map (\x -> printModId x indent irMap html comments) modids
| 207
|
printName (Path _ modids) indent irMap html comments = unwords $ map (\x -> printModId x indent irMap html comments) modids
| 123
| false
| true
| 0
| 11
| 36
| 97
| 50
| 47
| null | null |
joeyadams/haskell-rolling-queue
|
Data/STM/RollingQueue.hs
|
bsd-3-clause
|
isEmpty :: RollingQueue a -> STM Bool
isEmpty (RQ rv _) =
readTVar rv >>= TList.null . readPtr
| 98
|
isEmpty :: RollingQueue a -> STM Bool
isEmpty (RQ rv _) =
readTVar rv >>= TList.null . readPtr
| 98
|
isEmpty (RQ rv _) =
readTVar rv >>= TList.null . readPtr
| 60
| false
| true
| 0
| 7
| 21
| 45
| 21
| 24
| null | null |
leichunfeng/learnyouahaskell
|
baby.hs
|
mit
|
sayMe :: (Integral a) => a -> String
sayMe 1 = "One!"
| 53
|
sayMe :: (Integral a) => a -> String
sayMe 1 = "One!"
| 53
|
sayMe 1 = "One!"
| 16
| false
| true
| 0
| 8
| 11
| 33
| 15
| 18
| null | null |
kawu/monad-codec
|
Control/Monad/Codec.hs
|
bsd-2-clause
|
-- | Encode the object with codec component identified by the lens.
encode :: Ord a => AtomLens c a -> a -> Codec c Int
encode lens x = do
codec <- getCodec
let atomCodec = getL lens codec
m' = updateMap (to atomCodec) x
y = m' M.! x
r' = I.insert y x (from atomCodec)
!atom = AtomCodec m' r'
codec' = setL lens atom codec
setCodec codec'
return y
-- | Version of encode which doesn't update the return componenent
-- of the atom codec. It is useful when we know that particular
-- value (e.g. value of a condition observation) won't be decoded
-- afterwards so there is no need to store it and waste memory.
| 667
|
encode :: Ord a => AtomLens c a -> a -> Codec c Int
encode lens x = do
codec <- getCodec
let atomCodec = getL lens codec
m' = updateMap (to atomCodec) x
y = m' M.! x
r' = I.insert y x (from atomCodec)
!atom = AtomCodec m' r'
codec' = setL lens atom codec
setCodec codec'
return y
-- | Version of encode which doesn't update the return componenent
-- of the atom codec. It is useful when we know that particular
-- value (e.g. value of a condition observation) won't be decoded
-- afterwards so there is no need to store it and waste memory.
| 599
|
encode lens x = do
codec <- getCodec
let atomCodec = getL lens codec
m' = updateMap (to atomCodec) x
y = m' M.! x
r' = I.insert y x (from atomCodec)
!atom = AtomCodec m' r'
codec' = setL lens atom codec
setCodec codec'
return y
-- | Version of encode which doesn't update the return componenent
-- of the atom codec. It is useful when we know that particular
-- value (e.g. value of a condition observation) won't be decoded
-- afterwards so there is no need to store it and waste memory.
| 547
| true
| true
| 0
| 12
| 179
| 150
| 72
| 78
| null | null |
np/ling
|
Ling/Fmt/Albert/Layout.hs
|
bsd-3-clause
|
-- layout separators
layoutOpen, layoutClose, layoutSep :: String
layoutOpen = "{"
| 85
|
layoutOpen, layoutClose, layoutSep :: String
layoutOpen = "{"
| 62
|
layoutOpen = "{"
| 17
| true
| true
| 3
| 5
| 13
| 24
| 11
| 13
| null | null |
chrisdone/clockin
|
src/Clockin.hs
|
bsd-3-clause
|
hoursRemaining now (Credit h) = "-" <> hoursIn now h
| 52
|
hoursRemaining now (Credit h) = "-" <> hoursIn now h
| 52
|
hoursRemaining now (Credit h) = "-" <> hoursIn now h
| 52
| false
| false
| 0
| 6
| 9
| 28
| 12
| 16
| null | null |
RefactoringTools/HaRe
|
test/testdata/AddOneParameter/A2.hs
|
bsd-3-clause
|
main = sumSq [1..4]
| 19
|
main = sumSq [1..4]
| 19
|
main = sumSq [1..4]
| 19
| false
| false
| 0
| 6
| 3
| 14
| 7
| 7
| null | null |
mcschroeder/ghc
|
compiler/hsSyn/HsUtils.hs
|
bsd-3-clause
|
{-
************************************************************************
* *
Constructing syntax with no location info
* *
************************************************************************
-}
nlHsVar :: id -> LHsExpr id
nlHsVar n = noLoc (HsVar (noLoc n))
| 412
|
nlHsVar :: id -> LHsExpr id
nlHsVar n = noLoc (HsVar (noLoc n))
| 63
|
nlHsVar n = noLoc (HsVar (noLoc n))
| 35
| true
| true
| 0
| 9
| 173
| 37
| 18
| 19
| null | null |
shockkolate/containers
|
tests/map-strictness.hs
|
bsd-3-clause
|
------------------------------------------------------------------------
-- * Test harness
main :: IO ()
main = defaultMain tests
| 130
|
main :: IO ()
main = defaultMain tests
| 38
|
main = defaultMain tests
| 24
| true
| true
| 0
| 7
| 13
| 27
| 12
| 15
| null | null |
nomeata/cryptonite
|
Crypto/PubKey/ECC/Types.hs
|
bsd-3-clause
|
getCurveByName SEC_t409k1 = CurveF2m $ CurveBinary
0x02000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000001
(CurveCommon
{ ecc_a = 0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
, ecc_b = 0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
, ecc_g = Point 0x0060f05f658f49c1ad3ab1890f7184210efd0987e307c84c27accfb8f9f67cc2c460189eb5aaaa62ee222eb1b35540cfe9023746
0x01e369050b7c4e42acba1dacbf04299c3460782f918ea427e6325165e9ea10e3da5f6c42e9c55215aa9ca27a5863ec48d8e0286b
, ecc_n = 0x007ffffffffffffffffffffffffffffffffffffffffffffffffffe5f83b2d4ea20400ec4557d5ed3e3e7ca5b4b5c83b8e01e5fcf
, ecc_h = 4
})
| 846
|
getCurveByName SEC_t409k1 = CurveF2m $ CurveBinary
0x02000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000001
(CurveCommon
{ ecc_a = 0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
, ecc_b = 0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
, ecc_g = Point 0x0060f05f658f49c1ad3ab1890f7184210efd0987e307c84c27accfb8f9f67cc2c460189eb5aaaa62ee222eb1b35540cfe9023746
0x01e369050b7c4e42acba1dacbf04299c3460782f918ea427e6325165e9ea10e3da5f6c42e9c55215aa9ca27a5863ec48d8e0286b
, ecc_n = 0x007ffffffffffffffffffffffffffffffffffffffffffffffffffe5f83b2d4ea20400ec4557d5ed3e3e7ca5b4b5c83b8e01e5fcf
, ecc_h = 4
})
| 846
|
getCurveByName SEC_t409k1 = CurveF2m $ CurveBinary
0x02000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000001
(CurveCommon
{ ecc_a = 0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
, ecc_b = 0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
, ecc_g = Point 0x0060f05f658f49c1ad3ab1890f7184210efd0987e307c84c27accfb8f9f67cc2c460189eb5aaaa62ee222eb1b35540cfe9023746
0x01e369050b7c4e42acba1dacbf04299c3460782f918ea427e6325165e9ea10e3da5f6c42e9c55215aa9ca27a5863ec48d8e0286b
, ecc_n = 0x007ffffffffffffffffffffffffffffffffffffffffffffffffffe5f83b2d4ea20400ec4557d5ed3e3e7ca5b4b5c83b8e01e5fcf
, ecc_h = 4
})
| 846
| false
| false
| 0
| 10
| 110
| 58
| 33
| 25
| null | null |
mbelicki/valdemar
|
src/Transformations/LoopAllocator.hs
|
gpl-3.0
|
-- return transformed expression and inner allocations
transformStatement :: S.Statement a -> S.Statement a
transformStatement (S.WhileStmt cond update body)
= S.BlockStmt $ allocations ++ [S.WhileStmt cond update newBody]
where (newBody, allocations) = reallocate body
| 282
|
transformStatement :: S.Statement a -> S.Statement a
transformStatement (S.WhileStmt cond update body)
= S.BlockStmt $ allocations ++ [S.WhileStmt cond update newBody]
where (newBody, allocations) = reallocate body
| 227
|
transformStatement (S.WhileStmt cond update body)
= S.BlockStmt $ allocations ++ [S.WhileStmt cond update newBody]
where (newBody, allocations) = reallocate body
| 174
| true
| true
| 0
| 8
| 46
| 80
| 40
| 40
| null | null |
nickbart1980/pandoc
|
src/Text/Pandoc/Readers/Org.hs
|
gpl-2.0
|
-- One or more horizontal rules after the first content line mark the previous
-- line as a header. All other horizontal lines are discarded.
rowToContent :: OrgTableRow
-> OrgTable
-> F OrgTable
rowToContent OrgHlineRow t = maybeBodyToHeader t
| 278
|
rowToContent :: OrgTableRow
-> OrgTable
-> F OrgTable
rowToContent OrgHlineRow t = maybeBodyToHeader t
| 135
|
rowToContent OrgHlineRow t = maybeBodyToHeader t
| 55
| true
| true
| 0
| 7
| 72
| 32
| 16
| 16
| null | null |
triplepointfive/cereal
|
src/Data/Serialize/Builder.hs
|
bsd-3-clause
|
-- | /O(1)./ A Builder taking a single byte, satisfying
--
-- * @'toLazyByteString' ('singleton' b) = 'L.singleton' b@
--
singleton :: Word8 -> Builder
singleton = writeN 1 . flip poke
| 185
|
singleton :: Word8 -> Builder
singleton = writeN 1 . flip poke
| 62
|
singleton = writeN 1 . flip poke
| 32
| true
| true
| 0
| 6
| 32
| 29
| 16
| 13
| null | null |
sgillespie/ghc
|
testsuite/tests/simplCore/should_compile/simpl003.hs
|
bsd-3-clause
|
thenI m k
= \s0 -> case m s0 of
IMonadFail s1 msg -> IMonadFail s1 msg
IMonadOk s1 r1 -> k r1 s1
| 132
|
thenI m k
= \s0 -> case m s0 of
IMonadFail s1 msg -> IMonadFail s1 msg
IMonadOk s1 r1 -> k r1 s1
| 132
|
thenI m k
= \s0 -> case m s0 of
IMonadFail s1 msg -> IMonadFail s1 msg
IMonadOk s1 r1 -> k r1 s1
| 132
| false
| false
| 0
| 9
| 59
| 55
| 25
| 30
| null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.