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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
bkoropoff/Idris-dev
|
src/IRTS/CodegenC.hs
|
bsd-3-clause
|
doOp v (LLe ITChar) [l, r] = doOp v (LLe ITNative) [l, r]
| 57
|
doOp v (LLe ITChar) [l, r] = doOp v (LLe ITNative) [l, r]
| 57
|
doOp v (LLe ITChar) [l, r] = doOp v (LLe ITNative) [l, r]
| 57
| false
| false
| 0
| 7
| 12
| 47
| 23
| 24
| null | null |
Sahil-yerawar/IRChbot
|
src/CowsAndBulls.hs
|
bsd-3-clause
|
randomNumber :: Int
randomNumber = unsafePerformIO (getStdRandom (randomR (1023, 9876)))
| 88
|
randomNumber :: Int
randomNumber = unsafePerformIO (getStdRandom (randomR (1023, 9876)))
| 88
|
randomNumber = unsafePerformIO (getStdRandom (randomR (1023, 9876)))
| 68
| false
| true
| 0
| 10
| 9
| 32
| 17
| 15
| null | null |
hsyl20/ViperVM
|
haskus-system/src/lib/Haskus/System/Linux/Internals/Terminal.hs
|
bsd-3-clause
|
-- | Allow the output buffer to drain, and set serial port settings
--
-- TCSETSW
ttySetConfigDrain :: (MonadInIO m) => TermConfig -> Handle -> FlowT '[ErrorCode] m ()
ttySetConfigDrain = ioctlWriteCmd (rawIoctlCommand 0x5403)
| 226
|
ttySetConfigDrain :: (MonadInIO m) => TermConfig -> Handle -> FlowT '[ErrorCode] m ()
ttySetConfigDrain = ioctlWriteCmd (rawIoctlCommand 0x5403)
| 144
|
ttySetConfigDrain = ioctlWriteCmd (rawIoctlCommand 0x5403)
| 58
| true
| true
| 0
| 10
| 33
| 54
| 29
| 25
| null | null |
antonpetkoff/learning
|
haskell/fmi-fp/trees.hs
|
gpl-3.0
|
orTree _ _ = Empty
| 18
|
orTree _ _ = Empty
| 18
|
orTree _ _ = Empty
| 18
| false
| false
| 0
| 5
| 4
| 11
| 5
| 6
| null | null |
madjestic/b1
|
src/B1/Program/Prices/Options.hs
|
bsd-3-clause
|
options :: [OptDescr (Options -> Options)]
options =
[ Option "d" ["dataSource"] (ReqArg getDataSource "DATASOURCE")
"Data source to get stock price information."
, Option "s" ["symbol"] (ReqArg getSymbol "SYMBOL")
"Stock symbol like SPY."
]
| 259
|
options :: [OptDescr (Options -> Options)]
options =
[ Option "d" ["dataSource"] (ReqArg getDataSource "DATASOURCE")
"Data source to get stock price information."
, Option "s" ["symbol"] (ReqArg getSymbol "SYMBOL")
"Stock symbol like SPY."
]
| 259
|
options =
[ Option "d" ["dataSource"] (ReqArg getDataSource "DATASOURCE")
"Data source to get stock price information."
, Option "s" ["symbol"] (ReqArg getSymbol "SYMBOL")
"Stock symbol like SPY."
]
| 216
| false
| true
| 0
| 8
| 51
| 70
| 37
| 33
| null | null |
nikki-and-the-robots/nikki
|
src/Physics/Chipmunk/ContactRef.hs
|
lgpl-3.0
|
setMyCollisionType :: Enum collisionType => collisionType -> Shape -> IO ()
setMyCollisionType ct s = collisionType s $= toNumber ct
| 132
|
setMyCollisionType :: Enum collisionType => collisionType -> Shape -> IO ()
setMyCollisionType ct s = collisionType s $= toNumber ct
| 132
|
setMyCollisionType ct s = collisionType s $= toNumber ct
| 56
| false
| true
| 0
| 9
| 19
| 46
| 21
| 25
| null | null |
green-haskell/ghc
|
compiler/utils/Outputable.hs
|
bsd-3-clause
|
-- | Returns the comma-separated concatenation of the quoted pretty printed things.
--
-- > [x,y,z] ==> `x', `y', `z'
pprQuotedList :: Outputable a => [a] -> SDoc
pprQuotedList = quotedList . map ppr
| 201
|
pprQuotedList :: Outputable a => [a] -> SDoc
pprQuotedList = quotedList . map ppr
| 81
|
pprQuotedList = quotedList . map ppr
| 36
| true
| true
| 0
| 7
| 35
| 35
| 19
| 16
| null | null |
sopvop/cabal
|
cabal-install/tests/IntegrationTests2.hs
|
bsd-3-clause
|
mkProjectConfig :: GhcPath -> ProjectConfig
mkProjectConfig (GhcPath ghcPath) =
mempty {
projectConfigShared = mempty {
projectConfigHcPath = maybeToFlag ghcPath
},
projectConfigBuildOnly = mempty {
projectConfigNumJobs = toFlag (Just 1)
}
}
where
maybeToFlag = maybe mempty toFlag
| 332
|
mkProjectConfig :: GhcPath -> ProjectConfig
mkProjectConfig (GhcPath ghcPath) =
mempty {
projectConfigShared = mempty {
projectConfigHcPath = maybeToFlag ghcPath
},
projectConfigBuildOnly = mempty {
projectConfigNumJobs = toFlag (Just 1)
}
}
where
maybeToFlag = maybe mempty toFlag
| 332
|
mkProjectConfig (GhcPath ghcPath) =
mempty {
projectConfigShared = mempty {
projectConfigHcPath = maybeToFlag ghcPath
},
projectConfigBuildOnly = mempty {
projectConfigNumJobs = toFlag (Just 1)
}
}
where
maybeToFlag = maybe mempty toFlag
| 288
| false
| true
| 0
| 11
| 87
| 79
| 42
| 37
| null | null |
nikai3d/ce-challenges
|
hard/brainfuck.hs
|
bsd-3-clause
|
bfuck :: Int -> Int -> Map Int Int -> Map Int Int -> String -> String
bfuck x y brack dats zs | x == length zs = ""
| c == '+' && d < 255 = bfuck (succ x) y brack (Map.insert y (succ d) dats) zs
| c == '+' = bfuck (succ x) y brack (Map.insert y 0 dats) zs
| c == '-' && d > 0 = bfuck (succ x) y brack (Map.insert y (pred d) dats) zs
| c == '-' = bfuck (succ x) y brack (Map.insert y 255 dats) zs
| c == '>' = bfuck (succ x) (succ y) brack dats zs
| c == '<' = bfuck (succ x) (pred y) brack dats zs
| c == '.' = chr d : bfuck (succ x) y brack dats zs
| c == ',' = bfuck (succ x) y brack dats zs
| c == '[' && d == 0 = bfuck (Map.findWithDefault 0 x brack) y brack dats zs
| c == '[' = bfuck (succ x) y brack dats zs
| c == ']' && d /= 0 = bfuck (Map.findWithDefault 0 x brack) y brack dats zs
| otherwise = bfuck (succ x) y brack dats zs
where c = zs!!x
d = Map.findWithDefault 0 y dats
| 1,340
|
bfuck :: Int -> Int -> Map Int Int -> Map Int Int -> String -> String
bfuck x y brack dats zs | x == length zs = ""
| c == '+' && d < 255 = bfuck (succ x) y brack (Map.insert y (succ d) dats) zs
| c == '+' = bfuck (succ x) y brack (Map.insert y 0 dats) zs
| c == '-' && d > 0 = bfuck (succ x) y brack (Map.insert y (pred d) dats) zs
| c == '-' = bfuck (succ x) y brack (Map.insert y 255 dats) zs
| c == '>' = bfuck (succ x) (succ y) brack dats zs
| c == '<' = bfuck (succ x) (pred y) brack dats zs
| c == '.' = chr d : bfuck (succ x) y brack dats zs
| c == ',' = bfuck (succ x) y brack dats zs
| c == '[' && d == 0 = bfuck (Map.findWithDefault 0 x brack) y brack dats zs
| c == '[' = bfuck (succ x) y brack dats zs
| c == ']' && d /= 0 = bfuck (Map.findWithDefault 0 x brack) y brack dats zs
| otherwise = bfuck (succ x) y brack dats zs
where c = zs!!x
d = Map.findWithDefault 0 y dats
| 1,340
|
bfuck x y brack dats zs | x == length zs = ""
| c == '+' && d < 255 = bfuck (succ x) y brack (Map.insert y (succ d) dats) zs
| c == '+' = bfuck (succ x) y brack (Map.insert y 0 dats) zs
| c == '-' && d > 0 = bfuck (succ x) y brack (Map.insert y (pred d) dats) zs
| c == '-' = bfuck (succ x) y brack (Map.insert y 255 dats) zs
| c == '>' = bfuck (succ x) (succ y) brack dats zs
| c == '<' = bfuck (succ x) (pred y) brack dats zs
| c == '.' = chr d : bfuck (succ x) y brack dats zs
| c == ',' = bfuck (succ x) y brack dats zs
| c == '[' && d == 0 = bfuck (Map.findWithDefault 0 x brack) y brack dats zs
| c == '[' = bfuck (succ x) y brack dats zs
| c == ']' && d /= 0 = bfuck (Map.findWithDefault 0 x brack) y brack dats zs
| otherwise = bfuck (succ x) y brack dats zs
where c = zs!!x
d = Map.findWithDefault 0 y dats
| 1,253
| false
| true
| 0
| 10
| 675
| 569
| 270
| 299
| null | null |
gianlucagiorgolo/glue-tp
|
TP.hs
|
mit
|
startState :: S
startState = S (-1) Map.empty
| 45
|
startState :: S
startState = S (-1) Map.empty
| 45
|
startState = S (-1) Map.empty
| 29
| false
| true
| 0
| 7
| 7
| 23
| 12
| 11
| null | null |
JoeyEremondi/utrecht-apa-p1
|
src/Optimize/Environment.hs
|
bsd-3-clause
|
{-|
Given a function which finds all variables defined in a definition,
A function mapping expressions to our target information type,
an initial expression, and an initial environment,
return an infinite list of environments.
This is used as the "context"-generating function, passing environments
down the AST, in our tree traversals for annotating ASTs.
|-}
extendEnv
:: (Ord l)
=> (d -> [Var])
-> (Expr a d Var -> l)
-> Expr a d Var
-> Env l
-> [Env l]
extendEnv getDefined getLabelFn expr env = case expr of
A _ann (Let defs _body) ->
repeat $ Map.union env $ Map.fromList $ [(v, label) | v <- concatMap getDefined defs]
A _ann (Lambda pat _fnBody) ->
repeat $ Map.union env $ Map.fromList $ [(v, label) | v <- getPatternVars pat]
_ -> repeat env
where label = getLabelFn expr
{-|
Given the expression for a module, generate the environment containing only
the top-level "global" definitions for that module.
|-}
--TODO do we need to use list fn from traversals?
| 997
|
extendEnv
:: (Ord l)
=> (d -> [Var])
-> (Expr a d Var -> l)
-> Expr a d Var
-> Env l
-> [Env l]
extendEnv getDefined getLabelFn expr env = case expr of
A _ann (Let defs _body) ->
repeat $ Map.union env $ Map.fromList $ [(v, label) | v <- concatMap getDefined defs]
A _ann (Lambda pat _fnBody) ->
repeat $ Map.union env $ Map.fromList $ [(v, label) | v <- getPatternVars pat]
_ -> repeat env
where label = getLabelFn expr
{-|
Given the expression for a module, generate the environment containing only
the top-level "global" definitions for that module.
|-}
--TODO do we need to use list fn from traversals?
| 635
|
extendEnv getDefined getLabelFn expr env = case expr of
A _ann (Let defs _body) ->
repeat $ Map.union env $ Map.fromList $ [(v, label) | v <- concatMap getDefined defs]
A _ann (Lambda pat _fnBody) ->
repeat $ Map.union env $ Map.fromList $ [(v, label) | v <- getPatternVars pat]
_ -> repeat env
where label = getLabelFn expr
{-|
Given the expression for a module, generate the environment containing only
the top-level "global" definitions for that module.
|-}
--TODO do we need to use list fn from traversals?
| 527
| true
| true
| 0
| 13
| 198
| 235
| 117
| 118
| null | null |
scolobb/fgl
|
Data/Graph/Inductive/Query/Monad.hs
|
bsd-3-clause
|
runGT :: (Monad m) => GT m g a -> m g -> m a
runGT gt mg = do {(x,_) <- apply gt mg; return x}
| 94
|
runGT :: (Monad m) => GT m g a -> m g -> m a
runGT gt mg = do {(x,_) <- apply gt mg; return x}
| 94
|
runGT gt mg = do {(x,_) <- apply gt mg; return x}
| 49
| false
| true
| 0
| 8
| 26
| 73
| 36
| 37
| null | null |
travitch/foreign-inference
|
src/Foreign/Inference/Analysis/RefCount.hs
|
bsd-3-clause
|
subtypeRefCountTypes :: DependencySummary
-> Type
-> Maybe ((String, String), HashSet Type)
subtypeRefCountTypes ds t0 = go t1
where
t1 = stripPointerTypes t0
go t = case t of
TypeStruct _ (structuralParent:_) _ -> do
-- If this type is known to be ref counted, just return.
-- Otherwise, check if any structural parents of this type are
-- known to be ref counted. We check this by considering the
-- constituent types of t. If the first one is a struct type,
-- that is the structural parent (since they are
-- interchangable to code expecting the parent type).
case isRefCountedObject ds t of
Just rcFuncs -> return (rcFuncs, HS.singleton t1)
Nothing -> go structuralParent
TypeStruct _ _ _ -> do
rcFuncs <- isRefCountedObject ds t
return (rcFuncs, HS.singleton t1)
_ -> Nothing
-- | If the function is unary, return a set with the type of that
-- argument along with all of the types it is casted to in the body of
-- the function
| 1,106
|
subtypeRefCountTypes :: DependencySummary
-> Type
-> Maybe ((String, String), HashSet Type)
subtypeRefCountTypes ds t0 = go t1
where
t1 = stripPointerTypes t0
go t = case t of
TypeStruct _ (structuralParent:_) _ -> do
-- If this type is known to be ref counted, just return.
-- Otherwise, check if any structural parents of this type are
-- known to be ref counted. We check this by considering the
-- constituent types of t. If the first one is a struct type,
-- that is the structural parent (since they are
-- interchangable to code expecting the parent type).
case isRefCountedObject ds t of
Just rcFuncs -> return (rcFuncs, HS.singleton t1)
Nothing -> go structuralParent
TypeStruct _ _ _ -> do
rcFuncs <- isRefCountedObject ds t
return (rcFuncs, HS.singleton t1)
_ -> Nothing
-- | If the function is unary, return a set with the type of that
-- argument along with all of the types it is casted to in the body of
-- the function
| 1,106
|
subtypeRefCountTypes ds t0 = go t1
where
t1 = stripPointerTypes t0
go t = case t of
TypeStruct _ (structuralParent:_) _ -> do
-- If this type is known to be ref counted, just return.
-- Otherwise, check if any structural parents of this type are
-- known to be ref counted. We check this by considering the
-- constituent types of t. If the first one is a struct type,
-- that is the structural parent (since they are
-- interchangable to code expecting the parent type).
case isRefCountedObject ds t of
Just rcFuncs -> return (rcFuncs, HS.singleton t1)
Nothing -> go structuralParent
TypeStruct _ _ _ -> do
rcFuncs <- isRefCountedObject ds t
return (rcFuncs, HS.singleton t1)
_ -> Nothing
-- | If the function is unary, return a set with the type of that
-- argument along with all of the types it is casted to in the body of
-- the function
| 966
| false
| true
| 1
| 16
| 338
| 195
| 96
| 99
| null | null |
kojiromike/Idris-dev
|
src/Idris/REPL.hs
|
bsd-3-clause
|
process fn (DocStr (Left n) w)
| UN ty <- n, ty == T.pack "Type" = getIState >>= iRenderResult . pprintTypeDoc
| otherwise = do
ist <- getIState
let docs = lookupCtxtName n (idris_docstrings ist) ++
map (\(n,d)-> (n, (d, [])))
(lookupCtxtName (modDocN n) (idris_moduledocs ist))
case docs of
[] -> iPrintError $ "No documentation for " ++ show n
ns -> do toShow <- mapM (showDoc ist) ns
iRenderResult (vsep toShow)
where showDoc ist (n, d) = do doc <- getDocs n w
return $ pprintDocs ist doc
modDocN (NS (UN n) ns) = NS modDocName (n:ns)
modDocN (UN n) = NS modDocName [n]
modDocN _ = sMN 1 "NotFoundForSure"
| 807
|
process fn (DocStr (Left n) w)
| UN ty <- n, ty == T.pack "Type" = getIState >>= iRenderResult . pprintTypeDoc
| otherwise = do
ist <- getIState
let docs = lookupCtxtName n (idris_docstrings ist) ++
map (\(n,d)-> (n, (d, [])))
(lookupCtxtName (modDocN n) (idris_moduledocs ist))
case docs of
[] -> iPrintError $ "No documentation for " ++ show n
ns -> do toShow <- mapM (showDoc ist) ns
iRenderResult (vsep toShow)
where showDoc ist (n, d) = do doc <- getDocs n w
return $ pprintDocs ist doc
modDocN (NS (UN n) ns) = NS modDocName (n:ns)
modDocN (UN n) = NS modDocName [n]
modDocN _ = sMN 1 "NotFoundForSure"
| 807
|
process fn (DocStr (Left n) w)
| UN ty <- n, ty == T.pack "Type" = getIState >>= iRenderResult . pprintTypeDoc
| otherwise = do
ist <- getIState
let docs = lookupCtxtName n (idris_docstrings ist) ++
map (\(n,d)-> (n, (d, [])))
(lookupCtxtName (modDocN n) (idris_moduledocs ist))
case docs of
[] -> iPrintError $ "No documentation for " ++ show n
ns -> do toShow <- mapM (showDoc ist) ns
iRenderResult (vsep toShow)
where showDoc ist (n, d) = do doc <- getDocs n w
return $ pprintDocs ist doc
modDocN (NS (UN n) ns) = NS modDocName (n:ns)
modDocN (UN n) = NS modDocName [n]
modDocN _ = sMN 1 "NotFoundForSure"
| 807
| false
| false
| 1
| 16
| 309
| 323
| 157
| 166
| null | null |
laszlopandy/elm-make
|
src/Report.hs
|
bsd-3-clause
|
-- REPORTING THREAD
thread :: Type -> Bool -> Chan.Chan Message -> PackageID -> Int -> IO ()
thread reportType warn messageChan rootPkg totalTasks =
case reportType of
Normal ->
do isTerminal <- hIsTerminalDevice stdout
normalLoop isTerminal warn messageChan rootPkg totalTasks 0 0
Json ->
jsonLoop messageChan 0
-- JSON LOOP
| 368
|
thread :: Type -> Bool -> Chan.Chan Message -> PackageID -> Int -> IO ()
thread reportType warn messageChan rootPkg totalTasks =
case reportType of
Normal ->
do isTerminal <- hIsTerminalDevice stdout
normalLoop isTerminal warn messageChan rootPkg totalTasks 0 0
Json ->
jsonLoop messageChan 0
-- JSON LOOP
| 347
|
thread reportType warn messageChan rootPkg totalTasks =
case reportType of
Normal ->
do isTerminal <- hIsTerminalDevice stdout
normalLoop isTerminal warn messageChan rootPkg totalTasks 0 0
Json ->
jsonLoop messageChan 0
-- JSON LOOP
| 274
| true
| true
| 0
| 12
| 93
| 107
| 50
| 57
| null | null |
aochagavia/CompilerConstruction
|
funflow/src/FunFlow/TypeSystem.hs
|
apache-2.0
|
w :: TypeEnv -> Expr -> State Int (Type, TypeSubstitution, Constraints)
w env (Int _) = return $ debug $ (TypeInt, idSub, cEmpty)
| 129
|
w :: TypeEnv -> Expr -> State Int (Type, TypeSubstitution, Constraints)
w env (Int _) = return $ debug $ (TypeInt, idSub, cEmpty)
| 129
|
w env (Int _) = return $ debug $ (TypeInt, idSub, cEmpty)
| 57
| false
| true
| 4
| 10
| 22
| 67
| 34
| 33
| null | null |
twopoint718/haifa
|
src/PluginSystem.hs
|
gpl-2.0
|
deinitPlugin :: Plugin -> IO ()
deinitPlugin p = do rmDir (pluginPath p)
| 72
|
deinitPlugin :: Plugin -> IO ()
deinitPlugin p = do rmDir (pluginPath p)
| 72
|
deinitPlugin p = do rmDir (pluginPath p)
| 40
| false
| true
| 0
| 9
| 12
| 35
| 16
| 19
| null | null |
DatePaper616/code
|
ToNET.hs
|
apache-2.0
|
accumulateList i (a:as) = (resA:resAs,i')
where (resA, i'') = accumulate i a
(resAs, i') = accumulateList i'' as
| 120
|
accumulateList i (a:as) = (resA:resAs,i')
where (resA, i'') = accumulate i a
(resAs, i') = accumulateList i'' as
| 120
|
accumulateList i (a:as) = (resA:resAs,i')
where (resA, i'') = accumulate i a
(resAs, i') = accumulateList i'' as
| 120
| false
| false
| 1
| 7
| 25
| 63
| 34
| 29
| null | null |
noughtmare/yi
|
yi-core/src/Yi/Command.hs
|
gpl-2.0
|
shellCommandE :: YiM ()
shellCommandE = withMinibufferFree "Shell command:" shellCommandV
| 89
|
shellCommandE :: YiM ()
shellCommandE = withMinibufferFree "Shell command:" shellCommandV
| 89
|
shellCommandE = withMinibufferFree "Shell command:" shellCommandV
| 65
| false
| true
| 0
| 7
| 9
| 27
| 11
| 16
| null | null |
tphyahoo/gititpt
|
Network/Gitit/Util.hs
|
gpl-2.0
|
yesOrNo False = "no"
| 20
|
yesOrNo False = "no"
| 20
|
yesOrNo False = "no"
| 20
| false
| false
| 1
| 5
| 3
| 13
| 4
| 9
| null | null |
githubkleon/ConvenientHDL
|
src/Language/Verilog/Parser.hs
|
bsd-3-clause
|
assignment :: Stream s Identity Char => P s Assignment
assignment
= liftM (uncurry Assignment) (assign lvalue)
| 112
|
assignment :: Stream s Identity Char => P s Assignment
assignment
= liftM (uncurry Assignment) (assign lvalue)
| 112
|
assignment
= liftM (uncurry Assignment) (assign lvalue)
| 57
| false
| true
| 0
| 7
| 18
| 46
| 21
| 25
| null | null |
yiannist/ganeti
|
src/Ganeti/Constants.hs
|
bsd-2-clause
|
vClusterRootdirEnvname :: String
vClusterRootdirEnvname = "GANETI_ROOTDIR"
| 74
|
vClusterRootdirEnvname :: String
vClusterRootdirEnvname = "GANETI_ROOTDIR"
| 74
|
vClusterRootdirEnvname = "GANETI_ROOTDIR"
| 41
| false
| true
| 0
| 4
| 5
| 11
| 6
| 5
| null | null |
nevrenato/HyLoRes_Source
|
src/HyLoRes/Clause/SelFunction.hs
|
gpl-2.0
|
{- Given:
- a list of boolean functions l
returns a function that returns true whenever any of the
functions in l return true
-}
makeClass :: [ (AtFormulaNF -> Bool) ] -> AtFormulaNF -> Bool
makeClass l f = any ($ f) l
| 226
|
makeClass :: [ (AtFormulaNF -> Bool) ] -> AtFormulaNF -> Bool
makeClass l f = any ($ f) l
| 89
|
makeClass l f = any ($ f) l
| 27
| true
| true
| 0
| 8
| 51
| 44
| 24
| 20
| null | null |
trygvis/hledger
|
hledger/Hledger/Cli/Format.hs
|
gpl-3.0
|
formatString :: GenParser Char st FormatString
formatString =
formatField
<|> formatLiteral
| 103
|
formatString :: GenParser Char st FormatString
formatString =
formatField
<|> formatLiteral
| 103
|
formatString =
formatField
<|> formatLiteral
| 56
| false
| true
| 3
| 5
| 22
| 26
| 13
| 13
| null | null |
jbracker/supermonad-plugin
|
examples/monad/hmtc/original/PPTAMCode.hs
|
bsd-3-clause
|
fmtDisp d = "- " ++ show (abs ((fromIntegral d) :: Integer))
| 72
|
fmtDisp d = "- " ++ show (abs ((fromIntegral d) :: Integer))
| 72
|
fmtDisp d = "- " ++ show (abs ((fromIntegral d) :: Integer))
| 72
| false
| false
| 0
| 11
| 23
| 34
| 17
| 17
| null | null |
kosmoskatten/ghost-lang
|
ghost-shell/src/Main.hs
|
mit
|
eval state HelpApi = do
outputStrLn $ unlines apiDocs
repl state
-- | Quit the repl loop.
| 94
|
eval state HelpApi = do
outputStrLn $ unlines apiDocs
repl state
-- | Quit the repl loop.
| 94
|
eval state HelpApi = do
outputStrLn $ unlines apiDocs
repl state
-- | Quit the repl loop.
| 94
| false
| false
| 0
| 8
| 21
| 28
| 12
| 16
| null | null |
KeizoBookman/bf-haskell
|
Main.hs
|
mit
|
main :: IO ()
main = do
args <- getArgs
case args of
[] -> return ()
[path] -> do
src <- readFile path
run $ parse $ filter (`elem` "+-><.,[]") src
putChar '\n'
| 216
|
main :: IO ()
main = do
args <- getArgs
case args of
[] -> return ()
[path] -> do
src <- readFile path
run $ parse $ filter (`elem` "+-><.,[]") src
putChar '\n'
| 216
|
main = do
args <- getArgs
case args of
[] -> return ()
[path] -> do
src <- readFile path
run $ parse $ filter (`elem` "+-><.,[]") src
putChar '\n'
| 202
| false
| true
| 1
| 16
| 89
| 95
| 43
| 52
| null | null |
yaxu/volca-tidal
|
beats.hs
|
gpl-3.0
|
ctrlN (Level LoTom v) = (42, v)
| 34
|
ctrlN (Level LoTom v) = (42, v)
| 34
|
ctrlN (Level LoTom v) = (42, v)
| 34
| false
| false
| 0
| 6
| 9
| 24
| 12
| 12
| null | null |
SU-LOSP/folgerhs
|
app/Folgerhs/Animate.hs
|
gpl-3.0
|
clock :: Play -> Picture
clock p = let d = translate (-60) (-10) $ scale 0.3 0.3 $ color white $ text $ curLine p
a = color (greyN 0.2) $ rotate (-90) $ scale 1 (-1) $ thickArc 0 (lineRatio p * 360) 75 5
in pictures [d, a]
| 247
|
clock :: Play -> Picture
clock p = let d = translate (-60) (-10) $ scale 0.3 0.3 $ color white $ text $ curLine p
a = color (greyN 0.2) $ rotate (-90) $ scale 1 (-1) $ thickArc 0 (lineRatio p * 360) 75 5
in pictures [d, a]
| 247
|
clock p = let d = translate (-60) (-10) $ scale 0.3 0.3 $ color white $ text $ curLine p
a = color (greyN 0.2) $ rotate (-90) $ scale 1 (-1) $ thickArc 0 (lineRatio p * 360) 75 5
in pictures [d, a]
| 222
| false
| true
| 0
| 15
| 75
| 143
| 70
| 73
| null | null |
forked-upstream-packages-for-ghcjs/ghc
|
compiler/coreSyn/CoreUtils.hs
|
bsd-3-clause
|
exprType (Tick _ e) = exprType e
| 41
|
exprType (Tick _ e) = exprType e
| 41
|
exprType (Tick _ e) = exprType e
| 41
| false
| false
| 0
| 7
| 15
| 20
| 9
| 11
| null | null |
sdiehl/ghc
|
libraries/base/GHC/List.hs
|
bsd-3-clause
|
badHead :: a
badHead = errorEmptyList "head"
| 44
|
badHead :: a
badHead = errorEmptyList "head"
| 44
|
badHead = errorEmptyList "head"
| 31
| false
| true
| 0
| 6
| 6
| 20
| 8
| 12
| null | null |
dmcclean/HaTeX
|
Text/LaTeX/Base/Commands.hs
|
bsd-3-clause
|
large3 :: LaTeXC l => l -> l
large3 = sizecomm "LARGE"
| 54
|
large3 :: LaTeXC l => l -> l
large3 = sizecomm "LARGE"
| 54
|
large3 = sizecomm "LARGE"
| 25
| false
| true
| 0
| 6
| 11
| 25
| 12
| 13
| null | null |
flounders/lambdaPass
|
src/Text/LambdaPass/Logic.hs
|
gpl-2.0
|
decryptErrorHandler
:: DecryptError
-> Text
decryptErrorHandler x =
case x of
NoData -> "No data in the passwords file."
BadPass -> "Wrong password. Please enter again."
_ -> "Encountered an unhandled error."
| 226
|
decryptErrorHandler
:: DecryptError
-> Text
decryptErrorHandler x =
case x of
NoData -> "No data in the passwords file."
BadPass -> "Wrong password. Please enter again."
_ -> "Encountered an unhandled error."
| 226
|
decryptErrorHandler x =
case x of
NoData -> "No data in the passwords file."
BadPass -> "Wrong password. Please enter again."
_ -> "Encountered an unhandled error."
| 178
| false
| true
| 0
| 8
| 49
| 46
| 21
| 25
| null | null |
blanu/arbre-go
|
Arbre/Native.hs
|
gpl-2.0
|
builtinParams :: (M.Map String [String])
builtinParams = M.fromList [
("+", ["a", "b"]),
("-", ["a", "b"]),
("*", ["a", "b"]),
("/", ["a", "b"]),
("==", ["a", "b"]),
("if", ["cond", "then", "else"]),
(">", ["a", "b"]),
("<", ["a", "b"]),
("and", ["a", "b"]),
("or", ["a", "b"]),
("not", ["a"]),
("+f", ["a", "b"]),
("-f", ["a", "b"]),
("*f", ["a", "b"]),
("/f", ["a", "b"]),
("==f", ["a", "b"]),
(">f", ["a", "b"]),
("append", ["a", "b"]),
("==s", ["a", "b"]),
("emit", ["type", "value"]),
("emitThen", ["type", "value", "next"]),
("mutate", ["type", "selector", "value"]),
("receive", ["type", "block"])
]
| 700
|
builtinParams :: (M.Map String [String])
builtinParams = M.fromList [
("+", ["a", "b"]),
("-", ["a", "b"]),
("*", ["a", "b"]),
("/", ["a", "b"]),
("==", ["a", "b"]),
("if", ["cond", "then", "else"]),
(">", ["a", "b"]),
("<", ["a", "b"]),
("and", ["a", "b"]),
("or", ["a", "b"]),
("not", ["a"]),
("+f", ["a", "b"]),
("-f", ["a", "b"]),
("*f", ["a", "b"]),
("/f", ["a", "b"]),
("==f", ["a", "b"]),
(">f", ["a", "b"]),
("append", ["a", "b"]),
("==s", ["a", "b"]),
("emit", ["type", "value"]),
("emitThen", ["type", "value", "next"]),
("mutate", ["type", "selector", "value"]),
("receive", ["type", "block"])
]
| 700
|
builtinParams = M.fromList [
("+", ["a", "b"]),
("-", ["a", "b"]),
("*", ["a", "b"]),
("/", ["a", "b"]),
("==", ["a", "b"]),
("if", ["cond", "then", "else"]),
(">", ["a", "b"]),
("<", ["a", "b"]),
("and", ["a", "b"]),
("or", ["a", "b"]),
("not", ["a"]),
("+f", ["a", "b"]),
("-f", ["a", "b"]),
("*f", ["a", "b"]),
("/f", ["a", "b"]),
("==f", ["a", "b"]),
(">f", ["a", "b"]),
("append", ["a", "b"]),
("==s", ["a", "b"]),
("emit", ["type", "value"]),
("emitThen", ["type", "value", "next"]),
("mutate", ["type", "selector", "value"]),
("receive", ["type", "block"])
]
| 659
| false
| true
| 0
| 8
| 174
| 380
| 249
| 131
| null | null |
hanshoglund/modulo
|
src/Language/Modulo/Lisp.hs
|
gpl-3.0
|
-- T n; or T n = v;
convertDecl st (GlobalDecl n v t) = notSupported "Globals"
| 81
|
convertDecl st (GlobalDecl n v t) = notSupported "Globals"
| 61
|
convertDecl st (GlobalDecl n v t) = notSupported "Globals"
| 61
| true
| false
| 0
| 7
| 19
| 25
| 12
| 13
| null | null |
nushio3/ghc
|
compiler/main/GhcMake.hs
|
bsd-3-clause
|
mkBuildModule :: ModSummary -> BuildModule
mkBuildModule ms = (ms_mod ms, if isBootSummary ms then IsBoot else NotBoot)
| 119
|
mkBuildModule :: ModSummary -> BuildModule
mkBuildModule ms = (ms_mod ms, if isBootSummary ms then IsBoot else NotBoot)
| 119
|
mkBuildModule ms = (ms_mod ms, if isBootSummary ms then IsBoot else NotBoot)
| 76
| false
| true
| 0
| 7
| 16
| 38
| 20
| 18
| null | null |
TomMD/ghc
|
compiler/prelude/THNames.hs
|
bsd-3-clause
|
integerLIdKey = mkPreludeMiscIdUnique 222
| 45
|
integerLIdKey = mkPreludeMiscIdUnique 222
| 45
|
integerLIdKey = mkPreludeMiscIdUnique 222
| 45
| false
| false
| 0
| 5
| 7
| 9
| 4
| 5
| null | null |
DavidAlphaFox/bittorrent
|
tests/Config.hs
|
bsd-3-clause
|
getThisOpts :: IO ClientOpts
getThisOpts = thisOpts <$> getEnvOpts
| 66
|
getThisOpts :: IO ClientOpts
getThisOpts = thisOpts <$> getEnvOpts
| 66
|
getThisOpts = thisOpts <$> getEnvOpts
| 37
| false
| true
| 0
| 5
| 8
| 18
| 9
| 9
| null | null |
thurn/cantor
|
src/Token.hs
|
unlicense
|
initialHyphen :: CantorParser Form
initialHyphen = do
char '-' <?> ""
num <- intOrFloat
return $ case num of
Int i -> Int $ negate i
Float f -> Float $ negate f
_ -> error "Unexpected return from intOrFloat"
| 233
|
initialHyphen :: CantorParser Form
initialHyphen = do
char '-' <?> ""
num <- intOrFloat
return $ case num of
Int i -> Int $ negate i
Float f -> Float $ negate f
_ -> error "Unexpected return from intOrFloat"
| 233
|
initialHyphen = do
char '-' <?> ""
num <- intOrFloat
return $ case num of
Int i -> Int $ negate i
Float f -> Float $ negate f
_ -> error "Unexpected return from intOrFloat"
| 198
| false
| true
| 0
| 12
| 65
| 83
| 37
| 46
| null | null |
michaelficarra/purescript
|
src/Language/PureScript/Parser/Lexer.hs
|
mit
|
prettyPrintToken RParen = ")"
| 40
|
prettyPrintToken RParen = ")"
| 40
|
prettyPrintToken RParen = ")"
| 40
| false
| false
| 0
| 5
| 14
| 9
| 4
| 5
| null | null |
jgoerzen/hpodder
|
DB.hs
|
gpl-2.0
|
getSelectedPodcasts dbh ["all"] = getPodcasts dbh
| 49
|
getSelectedPodcasts dbh ["all"] = getPodcasts dbh
| 49
|
getSelectedPodcasts dbh ["all"] = getPodcasts dbh
| 49
| false
| false
| 0
| 5
| 5
| 19
| 8
| 11
| null | null |
brendanhay/gogol
|
gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/EventTags/Delete.hs
|
mpl-2.0
|
-- | V1 error format.
etdXgafv :: Lens' EventTagsDelete (Maybe Xgafv)
etdXgafv = lens _etdXgafv (\ s a -> s{_etdXgafv = a})
| 123
|
etdXgafv :: Lens' EventTagsDelete (Maybe Xgafv)
etdXgafv = lens _etdXgafv (\ s a -> s{_etdXgafv = a})
| 101
|
etdXgafv = lens _etdXgafv (\ s a -> s{_etdXgafv = a})
| 53
| true
| true
| 0
| 9
| 21
| 46
| 25
| 21
| null | null |
haroldcarr/learn-haskell-coq-ml-etc
|
haskell/course/2014-10-edx-delft-fp101x-intro-to-fp-erik-meijer/lab3.hs
|
unlicense
|
e6 = U.t "e6" (sum $ squares' 10 0::Int) 385
| 46
|
e6 = U.t "e6" (sum $ squares' 10 0::Int) 385
| 46
|
e6 = U.t "e6" (sum $ squares' 10 0::Int) 385
| 46
| false
| false
| 1
| 8
| 11
| 33
| 15
| 18
| null | null |
GaloisInc/verification-game
|
web-prover/src/Dirs.hs
|
bsd-3-clause
|
-- | We store classification tags in here
tagsDir :: TaskName -> StoragePath
tagsDir taskName = taskDir taskName <> singletonPath "tags"
| 136
|
tagsDir :: TaskName -> StoragePath
tagsDir taskName = taskDir taskName <> singletonPath "tags"
| 94
|
tagsDir taskName = taskDir taskName <> singletonPath "tags"
| 59
| true
| true
| 0
| 6
| 20
| 29
| 14
| 15
| null | null |
jstolarek/ghc
|
libraries/base/Control/Monad.hs
|
bsd-3-clause
|
forever a = let a' = a >> a' in a'
| 36
|
forever a = let a' = a >> a' in a'
| 36
|
forever a = let a' = a >> a' in a'
| 36
| false
| false
| 0
| 9
| 12
| 24
| 11
| 13
| null | null |
GaloisInc/saw-script
|
src/SAWScript/Prover/MRSolver/Term.hs
|
bsd-3-clause
|
-- | Match a type as being of the form @CompM a@ for some @a@
asCompM :: Term -> Maybe Term
asCompM (asApp -> Just (isGlobalDef "Prelude.CompM" -> Just (), tp)) =
return tp
| 174
|
asCompM :: Term -> Maybe Term
asCompM (asApp -> Just (isGlobalDef "Prelude.CompM" -> Just (), tp)) =
return tp
| 112
|
asCompM (asApp -> Just (isGlobalDef "Prelude.CompM" -> Just (), tp)) =
return tp
| 82
| true
| true
| 0
| 12
| 35
| 53
| 26
| 27
| null | null |
anttisalonen/freekick2
|
src/SDLUtils.hs
|
gpl-3.0
|
keyDowns :: [SDL.Event] -> [SDLKey]
keyDowns = foldl' (\acc e -> case e of KeyDown (Keysym n _ _) -> (n:acc); _ -> acc) []
| 122
|
keyDowns :: [SDL.Event] -> [SDLKey]
keyDowns = foldl' (\acc e -> case e of KeyDown (Keysym n _ _) -> (n:acc); _ -> acc) []
| 122
|
keyDowns = foldl' (\acc e -> case e of KeyDown (Keysym n _ _) -> (n:acc); _ -> acc) []
| 86
| false
| true
| 0
| 13
| 24
| 77
| 41
| 36
| null | null |
awto/pretty-template
|
src/Text/PrettyTemplate/Printer.hs
|
bsd-3-clause
|
warnS :: String -> D ()
warnS = warn . C.text
| 45
|
warnS :: String -> D ()
warnS = warn . C.text
| 45
|
warnS = warn . C.text
| 21
| false
| true
| 1
| 8
| 10
| 33
| 14
| 19
| null | null |
bfraikin/netpbm
|
src/Data/PNM.hs
|
gpl-2.0
|
headerPBM :: Parser Header
headerPBM = do width <- natural
height <- natural
return $ Header width height 1
{- values parser -}
| 158
|
headerPBM :: Parser Header
headerPBM = do width <- natural
height <- natural
return $ Header width height 1
{- values parser -}
| 158
|
headerPBM = do width <- natural
height <- natural
return $ Header width height 1
{- values parser -}
| 131
| false
| true
| 1
| 9
| 53
| 47
| 20
| 27
| null | null |
SteffenMichels/IHPMC
|
src/Interval.hs
|
mit
|
(~>=) :: IntervalLimitPoint -> IntervalLimitPoint -> Maybe Bool
x ~>= y
| oneArgIndet x y = Nothing
| otherwise = let c = compareIntervalPoints x y in Just $ c == Gt || c == Eq
| 190
|
(~>=) :: IntervalLimitPoint -> IntervalLimitPoint -> Maybe Bool
x ~>= y
| oneArgIndet x y = Nothing
| otherwise = let c = compareIntervalPoints x y in Just $ c == Gt || c == Eq
| 190
|
x ~>= y
| oneArgIndet x y = Nothing
| otherwise = let c = compareIntervalPoints x y in Just $ c == Gt || c == Eq
| 126
| false
| true
| 1
| 10
| 49
| 81
| 38
| 43
| null | null |
tonicebrian/sgf
|
Data/SGF/Parse/Raw.hs
|
bsd-3-clause
|
satisfyChar = satisfy . (. enum)
| 32
|
satisfyChar = satisfy . (. enum)
| 32
|
satisfyChar = satisfy . (. enum)
| 32
| false
| false
| 0
| 6
| 5
| 14
| 8
| 6
| null | null |
comonoidial/ALFIN
|
Alfin/CoreLowering.hs
|
mit
|
lowerLit (SCString s _) = StringLit s
| 37
|
lowerLit (SCString s _) = StringLit s
| 37
|
lowerLit (SCString s _) = StringLit s
| 37
| false
| false
| 0
| 7
| 6
| 20
| 9
| 11
| null | null |
ambiata/highlighting-kate
|
Text/Highlighting/Kate/Syntax/Dtd.hs
|
gpl-2.0
|
parseRules ("DTD","Declaration") =
(((pString False "<!--" >>= withAttribute CommentTok) >>~ pushContext ("DTD","Comment"))
<|>
((pDetect2Chars False '-' '-' >>= withAttribute CommentTok) >>~ pushContext ("DTD","InlineComment"))
<|>
((pDetectChar False '>' >>= withAttribute DataTypeTok) >>~ (popContext))
<|>
((pDetectChar False '"' >>= withAttribute StringTok) >>~ pushContext ("DTD","String"))
<|>
((pRegExpr regex_'28'2d'7cO'29'5cs'28'2d'7cO'29 >>= withAttribute DataTypeTok))
<|>
((pAnyChar "(|)," >>= withAttribute DecValTok))
<|>
((pRegExpr regex_'28'25'7c'26'29'28'23'5b0'2d9'5d'2b'7c'23'5bxX'5d'5b0'2d9A'2dFa'2df'5d'2b'7c'5b'5c'2d'5cw'5cd'5c'2e'3a'5f'5d'2b'29'3b >>= withAttribute DecValTok))
<|>
((pAnyChar "?*+-&" >>= withAttribute FloatTok))
<|>
((pRegExpr regex_'25'5cs >>= withAttribute DecValTok))
<|>
((pKeyword " \n\t.():!+,-<=>%&*/;?[]^{|}~\\" list_Category >>= withAttribute KeywordTok))
<|>
((pKeyword " \n\t.():!+,-<=>%&*/;?[]^{|}~\\" list_Keywords >>= withAttribute KeywordTok))
<|>
((pRegExpr regex_'5cb'5b'5c'2d'5cw'5cd'5c'2e'3a'5f'5d'2b'5cb >>= withAttribute FunctionTok))
<|>
(currentContext >>= \x -> guard (x == ("DTD","Declaration")) >> pDefault >>= withAttribute NormalTok))
| 1,278
|
parseRules ("DTD","Declaration") =
(((pString False "<!--" >>= withAttribute CommentTok) >>~ pushContext ("DTD","Comment"))
<|>
((pDetect2Chars False '-' '-' >>= withAttribute CommentTok) >>~ pushContext ("DTD","InlineComment"))
<|>
((pDetectChar False '>' >>= withAttribute DataTypeTok) >>~ (popContext))
<|>
((pDetectChar False '"' >>= withAttribute StringTok) >>~ pushContext ("DTD","String"))
<|>
((pRegExpr regex_'28'2d'7cO'29'5cs'28'2d'7cO'29 >>= withAttribute DataTypeTok))
<|>
((pAnyChar "(|)," >>= withAttribute DecValTok))
<|>
((pRegExpr regex_'28'25'7c'26'29'28'23'5b0'2d9'5d'2b'7c'23'5bxX'5d'5b0'2d9A'2dFa'2df'5d'2b'7c'5b'5c'2d'5cw'5cd'5c'2e'3a'5f'5d'2b'29'3b >>= withAttribute DecValTok))
<|>
((pAnyChar "?*+-&" >>= withAttribute FloatTok))
<|>
((pRegExpr regex_'25'5cs >>= withAttribute DecValTok))
<|>
((pKeyword " \n\t.():!+,-<=>%&*/;?[]^{|}~\\" list_Category >>= withAttribute KeywordTok))
<|>
((pKeyword " \n\t.():!+,-<=>%&*/;?[]^{|}~\\" list_Keywords >>= withAttribute KeywordTok))
<|>
((pRegExpr regex_'5cb'5b'5c'2d'5cw'5cd'5c'2e'3a'5f'5d'2b'5cb >>= withAttribute FunctionTok))
<|>
(currentContext >>= \x -> guard (x == ("DTD","Declaration")) >> pDefault >>= withAttribute NormalTok))
| 1,278
|
parseRules ("DTD","Declaration") =
(((pString False "<!--" >>= withAttribute CommentTok) >>~ pushContext ("DTD","Comment"))
<|>
((pDetect2Chars False '-' '-' >>= withAttribute CommentTok) >>~ pushContext ("DTD","InlineComment"))
<|>
((pDetectChar False '>' >>= withAttribute DataTypeTok) >>~ (popContext))
<|>
((pDetectChar False '"' >>= withAttribute StringTok) >>~ pushContext ("DTD","String"))
<|>
((pRegExpr regex_'28'2d'7cO'29'5cs'28'2d'7cO'29 >>= withAttribute DataTypeTok))
<|>
((pAnyChar "(|)," >>= withAttribute DecValTok))
<|>
((pRegExpr regex_'28'25'7c'26'29'28'23'5b0'2d9'5d'2b'7c'23'5bxX'5d'5b0'2d9A'2dFa'2df'5d'2b'7c'5b'5c'2d'5cw'5cd'5c'2e'3a'5f'5d'2b'29'3b >>= withAttribute DecValTok))
<|>
((pAnyChar "?*+-&" >>= withAttribute FloatTok))
<|>
((pRegExpr regex_'25'5cs >>= withAttribute DecValTok))
<|>
((pKeyword " \n\t.():!+,-<=>%&*/;?[]^{|}~\\" list_Category >>= withAttribute KeywordTok))
<|>
((pKeyword " \n\t.():!+,-<=>%&*/;?[]^{|}~\\" list_Keywords >>= withAttribute KeywordTok))
<|>
((pRegExpr regex_'5cb'5b'5c'2d'5cw'5cd'5c'2e'3a'5f'5d'2b'5cb >>= withAttribute FunctionTok))
<|>
(currentContext >>= \x -> guard (x == ("DTD","Declaration")) >> pDefault >>= withAttribute NormalTok))
| 1,278
| false
| false
| 0
| 22
| 181
| 357
| 183
| 174
| null | null |
ghcjs/jsaddle-dom
|
src/JSDOM/Generated/FontFaceSet.hs
|
mit
|
-- | <https://developer.mozilla.org/en-US/docs/Web/API/FontFaceSet.onloadingdone Mozilla FontFaceSet.onloadingdone documentation>
loadingDone :: EventName FontFaceSet Event
loadingDone = unsafeEventName (toJSString "loadingdone")
| 230
|
loadingDone :: EventName FontFaceSet Event
loadingDone = unsafeEventName (toJSString "loadingdone")
| 99
|
loadingDone = unsafeEventName (toJSString "loadingdone")
| 56
| true
| true
| 0
| 7
| 16
| 26
| 13
| 13
| null | null |
Teaspot-Studio/Urho3D-Haskell
|
src/Graphics/Urho3D/Graphics/Geometry.hs
|
mit
|
geometryGetIndexStart :: (Parent Geometry a, Pointer p a, MonadIO m)
=> p -- ^ Pointer to Geometry or ascentor
-> m Word
geometryGetIndexStart p = liftIO $ do
let ptr = parentPointer p
fromIntegral <$> [C.exp| unsigned int {$(Geometry* ptr)->GetIndexStart()} |]
-- unsigned GetIndexStart() const { return indexStart_; }
-- | Return number of indices.
| 359
|
geometryGetIndexStart :: (Parent Geometry a, Pointer p a, MonadIO m)
=> p -- ^ Pointer to Geometry or ascentor
-> m Word
geometryGetIndexStart p = liftIO $ do
let ptr = parentPointer p
fromIntegral <$> [C.exp| unsigned int {$(Geometry* ptr)->GetIndexStart()} |]
-- unsigned GetIndexStart() const { return indexStart_; }
-- | Return number of indices.
| 359
|
geometryGetIndexStart p = liftIO $ do
let ptr = parentPointer p
fromIntegral <$> [C.exp| unsigned int {$(Geometry* ptr)->GetIndexStart()} |]
-- unsigned GetIndexStart() const { return indexStart_; }
-- | Return number of indices.
| 234
| false
| true
| 0
| 11
| 63
| 79
| 41
| 38
| null | null |
mdsteele/fallback
|
src/Fallback/State/Area.hs
|
gpl-3.0
|
arsClock :: (AreaState a) => a -> Clock
arsClock = acsClock . arsCommon
| 71
|
arsClock :: (AreaState a) => a -> Clock
arsClock = acsClock . arsCommon
| 71
|
arsClock = acsClock . arsCommon
| 31
| false
| true
| 0
| 6
| 12
| 28
| 15
| 13
| null | null |
JoePym/hs-deck-builder
|
app/Main.hs
|
bsd-3-clause
|
jsonFile :: FilePath
jsonFile = "data/cards.json"
| 49
|
jsonFile :: FilePath
jsonFile = "data/cards.json"
| 49
|
jsonFile = "data/cards.json"
| 28
| false
| true
| 0
| 6
| 5
| 18
| 7
| 11
| null | null |
tjakway/ghcjvm
|
compiler/types/Coercion.hs
|
bsd-3-clause
|
ltRole Representational _ = False
| 39
|
ltRole Representational _ = False
| 39
|
ltRole Representational _ = False
| 39
| false
| false
| 0
| 4
| 10
| 13
| 5
| 8
| null | null |
tsbattman/Raskell
|
src/Language/R/Package/Deploy.hs
|
mit
|
document :: Rscript -> String -> IO ()
document rs = reval (addLibMethods rs) . printf "devtools::document('%v')"
| 113
|
document :: Rscript -> String -> IO ()
document rs = reval (addLibMethods rs) . printf "devtools::document('%v')"
| 113
|
document rs = reval (addLibMethods rs) . printf "devtools::document('%v')"
| 74
| false
| true
| 0
| 8
| 16
| 43
| 20
| 23
| null | null |
HairyDude/pdxparse
|
src/QQ.hs
|
mit
|
rhs2exp other = [| other |]
| 27
|
rhs2exp other = [| other |]
| 27
|
rhs2exp other = [| other |]
| 27
| false
| false
| 1
| 5
| 5
| 16
| 7
| 9
| null | null |
forste/haReFork
|
tools/base/tests/HaskellLibraries/PreludeList.hs
|
bsd-3-clause
|
ookup key ((x,y):xys)
| key == x = Just y
| otherwise = lookup key xys
| 84
|
lookup key ((x,y):xys)
| key == x = Just y
| otherwise = lookup key xys
| 84
|
lookup key ((x,y):xys)
| key == x = Just y
| otherwise = lookup key xys
| 84
| false
| false
| 1
| 8
| 29
| 51
| 24
| 27
| null | null |
jsamol/fractal-painter
|
src/Mandelbrot.hs
|
bsd-3-clause
|
test2 = TestCase (assertEqual "color2" 196864 (drawMandelbrot_ (1,1)))
| 70
|
test2 = TestCase (assertEqual "color2" 196864 (drawMandelbrot_ (1,1)))
| 70
|
test2 = TestCase (assertEqual "color2" 196864 (drawMandelbrot_ (1,1)))
| 70
| false
| false
| 0
| 10
| 7
| 31
| 16
| 15
| null | null |
svenssonjoel/EmbArBB
|
Intel/ArBB/Backend/ArBB/CodeGen.hs
|
bsd-3-clause
|
isOpDynamic Bit_or = False
| 26
|
isOpDynamic Bit_or = False
| 26
|
isOpDynamic Bit_or = False
| 26
| false
| false
| 0
| 5
| 3
| 9
| 4
| 5
| null | null |
DougBurke/swish
|
tests/RDFProofContextTest.hs
|
lgpl-2.1
|
getAxiom :: String -> RDFFormula
getAxiom nam = getContextAxiom (makeSName nam) nullRDFFormula rdfdContext
| 106
|
getAxiom :: String -> RDFFormula
getAxiom nam = getContextAxiom (makeSName nam) nullRDFFormula rdfdContext
| 106
|
getAxiom nam = getContextAxiom (makeSName nam) nullRDFFormula rdfdContext
| 73
| false
| true
| 0
| 7
| 12
| 31
| 15
| 16
| null | null |
wouwouwou/2017_module_8
|
src/haskell/PP-project-2017/ASTBuilder.hs
|
apache-2.0
|
getStr (PNode Op [x]) = getStr x
| 38
|
getStr (PNode Op [x]) = getStr x
| 38
|
getStr (PNode Op [x]) = getStr x
| 38
| false
| false
| 0
| 7
| 12
| 24
| 11
| 13
| null | null |
ghc-android/ghc
|
testsuite/tests/ghci/should_run/ghcirun004.hs
|
bsd-3-clause
|
2175 = 2174
| 11
|
2175 = 2174
| 11
|
2175 = 2174
| 11
| false
| false
| 1
| 5
| 2
| 10
| 3
| 7
| null | null |
spechub/Hets
|
HasCASL/TypeRel.hs
|
gpl-2.0
|
monos :: Env -> [Named Sentence]
monos e = concatMap (makeMonos e) . Map.toList $ assumps e
| 91
|
monos :: Env -> [Named Sentence]
monos e = concatMap (makeMonos e) . Map.toList $ assumps e
| 91
|
monos e = concatMap (makeMonos e) . Map.toList $ assumps e
| 58
| false
| true
| 0
| 9
| 16
| 46
| 22
| 24
| null | null |
ekmett/models
|
src/Model/Par/Internal/Deque.hs
|
bsd-2-clause
|
size :: (PrimMonad m, PrimState m ~ RealWorld) => Deque a -> m (Int, Int)
size Deque{..} = primIO $ do
b1 <- readCounter bottom
t <- readCounter top
b2 <- readCounter bottom
let sz1 = b1 - t -- always the lower bound on x86, due to lack of load reordering
sz2 = b2 - t -- always the upper bound on x86, due to lack of load reordering
return (min sz1 sz2, max sz1 sz2)
-- * Queue Operations
-- | For a work-stealing queue `push` is the ``local'' push.
--
-- Thus only a single thread should perform this operation.
--
-- 'push' and 'pop' together act like a stack.
--
-- >>> q :: Deque String <- empty
-- >>> push "hello" q
-- >>> push "world" q
-- >>> pop q
-- Just "world"
-- >>> pop q
-- Just "hello"
-- >>> pop q
-- Nothing
--
-- 'push' and 'steal' together act like a queue.
--
-- >>> p :: Deque String <- empty
-- >>> push "hello" p
-- >>> push "world" p
-- >>> steal p
-- Just "hello"
-- >>> steal p
-- Just "world"
-- >>> steal p
-- Nothing
| 966
|
size :: (PrimMonad m, PrimState m ~ RealWorld) => Deque a -> m (Int, Int)
size Deque{..} = primIO $ do
b1 <- readCounter bottom
t <- readCounter top
b2 <- readCounter bottom
let sz1 = b1 - t -- always the lower bound on x86, due to lack of load reordering
sz2 = b2 - t -- always the upper bound on x86, due to lack of load reordering
return (min sz1 sz2, max sz1 sz2)
-- * Queue Operations
-- | For a work-stealing queue `push` is the ``local'' push.
--
-- Thus only a single thread should perform this operation.
--
-- 'push' and 'pop' together act like a stack.
--
-- >>> q :: Deque String <- empty
-- >>> push "hello" q
-- >>> push "world" q
-- >>> pop q
-- Just "world"
-- >>> pop q
-- Just "hello"
-- >>> pop q
-- Nothing
--
-- 'push' and 'steal' together act like a queue.
--
-- >>> p :: Deque String <- empty
-- >>> push "hello" p
-- >>> push "world" p
-- >>> steal p
-- Just "hello"
-- >>> steal p
-- Just "world"
-- >>> steal p
-- Nothing
| 966
|
size Deque{..} = primIO $ do
b1 <- readCounter bottom
t <- readCounter top
b2 <- readCounter bottom
let sz1 = b1 - t -- always the lower bound on x86, due to lack of load reordering
sz2 = b2 - t -- always the upper bound on x86, due to lack of load reordering
return (min sz1 sz2, max sz1 sz2)
-- * Queue Operations
-- | For a work-stealing queue `push` is the ``local'' push.
--
-- Thus only a single thread should perform this operation.
--
-- 'push' and 'pop' together act like a stack.
--
-- >>> q :: Deque String <- empty
-- >>> push "hello" q
-- >>> push "world" q
-- >>> pop q
-- Just "world"
-- >>> pop q
-- Just "hello"
-- >>> pop q
-- Nothing
--
-- 'push' and 'steal' together act like a queue.
--
-- >>> p :: Deque String <- empty
-- >>> push "hello" p
-- >>> push "world" p
-- >>> steal p
-- Just "hello"
-- >>> steal p
-- Just "world"
-- >>> steal p
-- Nothing
| 892
| false
| true
| 0
| 11
| 219
| 164
| 93
| 71
| null | null |
fmapfmapfmap/amazonka
|
gen/src/Gen/AST/Data/Syntax.hs
|
mpl-2.0
|
pHMap = var "parseHeadersMap"
| 31
|
pHMap = var "parseHeadersMap"
| 31
|
pHMap = var "parseHeadersMap"
| 31
| false
| false
| 0
| 5
| 5
| 9
| 4
| 5
| null | null |
ipuustin/propositional-planning
|
AI/Planning/SatPlan.hs
|
bsd-3-clause
|
-- trace ("expression:" ++ show expr) expr
-- | create the CNF and the mapping from the problem
translateToSat :: Problem -> Int -> Maybe (Expr, VariableMap)
translateToSat prob tmax =
do
cnfexpr <- fmap toCnf $ translateToExpr prob tmax
let mapping = createMapping cnfexpr
return (cnfexpr, mapping)
-- | Convert problem to format that Data.Boolean.SatSolver understands
| 402
|
translateToSat :: Problem -> Int -> Maybe (Expr, VariableMap)
translateToSat prob tmax =
do
cnfexpr <- fmap toCnf $ translateToExpr prob tmax
let mapping = createMapping cnfexpr
return (cnfexpr, mapping)
-- | Convert problem to format that Data.Boolean.SatSolver understands
| 304
|
translateToSat prob tmax =
do
cnfexpr <- fmap toCnf $ translateToExpr prob tmax
let mapping = createMapping cnfexpr
return (cnfexpr, mapping)
-- | Convert problem to format that Data.Boolean.SatSolver understands
| 242
| true
| true
| 0
| 10
| 88
| 79
| 39
| 40
| null | null |
Yuras/splaytree
|
src/Data/SplayTree/Map.hs
|
bsd-3-clause
|
insert :: Ord k => k -> a -> Map k a -> Map k a
insert = insertWith (flip const)
| 80
|
insert :: Ord k => k -> a -> Map k a -> Map k a
insert = insertWith (flip const)
| 80
|
insert = insertWith (flip const)
| 32
| false
| true
| 0
| 10
| 20
| 55
| 24
| 31
| null | null |
atsukotakahashi/wi
|
src/library/Yi/Syntax/Tree.hs
|
gpl-2.0
|
arbitraryFromList xs = do
m <- choose (1,length xs - 1)
let (l,r) = splitAt m xs
Bin <$> arbitraryFromList l <*> arbitraryFromList r
| 138
|
arbitraryFromList xs = do
m <- choose (1,length xs - 1)
let (l,r) = splitAt m xs
Bin <$> arbitraryFromList l <*> arbitraryFromList r
| 138
|
arbitraryFromList xs = do
m <- choose (1,length xs - 1)
let (l,r) = splitAt m xs
Bin <$> arbitraryFromList l <*> arbitraryFromList r
| 138
| false
| false
| 0
| 11
| 29
| 70
| 32
| 38
| null | null |
hferreiro/replay
|
compiler/nativeGen/X86/CodeGen.hs
|
bsd-3-clause
|
assignMem_FltCode pk addr src = do
(src_reg, src_code) <- getNonClobberedReg src
Amode addr addr_code <- getAmode addr
use_sse2 <- sse2Enabled
let
code = src_code `appOL`
addr_code `snocOL`
if use_sse2 then MOV pk (OpReg src_reg) (OpAddr addr)
else GST pk src_reg addr
return code
-- Floating point assignment to a register/temporary
| 411
|
assignMem_FltCode pk addr src = do
(src_reg, src_code) <- getNonClobberedReg src
Amode addr addr_code <- getAmode addr
use_sse2 <- sse2Enabled
let
code = src_code `appOL`
addr_code `snocOL`
if use_sse2 then MOV pk (OpReg src_reg) (OpAddr addr)
else GST pk src_reg addr
return code
-- Floating point assignment to a register/temporary
| 411
|
assignMem_FltCode pk addr src = do
(src_reg, src_code) <- getNonClobberedReg src
Amode addr addr_code <- getAmode addr
use_sse2 <- sse2Enabled
let
code = src_code `appOL`
addr_code `snocOL`
if use_sse2 then MOV pk (OpReg src_reg) (OpAddr addr)
else GST pk src_reg addr
return code
-- Floating point assignment to a register/temporary
| 411
| false
| false
| 0
| 14
| 127
| 114
| 55
| 59
| null | null |
sdiehl/ghc
|
compiler/typecheck/TcOrigin.hs
|
bsd-3-clause
|
pprCtO StandAloneDerivOrigin = text "a 'deriving' declaration"
| 62
|
pprCtO StandAloneDerivOrigin = text "a 'deriving' declaration"
| 62
|
pprCtO StandAloneDerivOrigin = text "a 'deriving' declaration"
| 62
| false
| false
| 0
| 5
| 6
| 12
| 5
| 7
| null | null |
beni55/haste-compiler
|
libraries/ghc-7.8/base/System/IO.hs
|
bsd-3-clause
|
localeEncoding :: TextEncoding
localeEncoding = initLocaleEncoding
| 66
|
localeEncoding :: TextEncoding
localeEncoding = initLocaleEncoding
| 66
|
localeEncoding = initLocaleEncoding
| 35
| false
| true
| 0
| 4
| 5
| 11
| 6
| 5
| null | null |
nomicflux/threals
|
src/Threal/Threals.hs
|
gpl-2.0
|
blueGoneRed = Threal [red] [red] []
| 35
|
blueGoneRed = Threal [red] [red] []
| 35
|
blueGoneRed = Threal [red] [red] []
| 35
| false
| false
| 0
| 6
| 5
| 21
| 11
| 10
| null | null |
jre2/FinanceAcitvityAnalyzer
|
Data/Chase/Activity.hs
|
bsd-3-clause
|
rowToTrans (a:b:c:d:[]) = Tran a (mkDate $ parseDate b c) (mkDate b) (extractMsg c) (read $ B.unpack d)
| 103
|
rowToTrans (a:b:c:d:[]) = Tran a (mkDate $ parseDate b c) (mkDate b) (extractMsg c) (read $ B.unpack d)
| 103
|
rowToTrans (a:b:c:d:[]) = Tran a (mkDate $ parseDate b c) (mkDate b) (extractMsg c) (read $ B.unpack d)
| 103
| false
| false
| 0
| 11
| 17
| 77
| 38
| 39
| null | null |
pbevin/toycss
|
src/HtmlDoc.hs
|
gpl-2.0
|
bodyNode :: Dimensions -> [DomNode] -> DomNode
bodyNode = DomNode (attrs "body") "" bodyProperties
| 98
|
bodyNode :: Dimensions -> [DomNode] -> DomNode
bodyNode = DomNode (attrs "body") "" bodyProperties
| 98
|
bodyNode = DomNode (attrs "body") "" bodyProperties
| 51
| false
| true
| 0
| 7
| 13
| 35
| 18
| 17
| null | null |
MaxDaten/yage-core
|
src/Yage/Core/Application/Logging.hs
|
mit
|
--------------------------------------------------------------------------------
coloredLogFormatter :: forall a. String -> Formatter.LogFormatter a
coloredLogFormatter = formatter
where
formatter :: String -> Formatter.LogFormatter a
formatter format _ (prio,msg) loggername =
let vars =
[("time", formatTime defaultTimeLocale timeFormat <$> getZonedTime)
,("utcTime", formatTime defaultTimeLocale timeFormat <$> getCurrentTime)
,("msg", return msg)
,("prio", return $ show prio)
,("loggername", return loggername)
,("tid", show <$> myThreadId)
]
color = msgColor prio
in (\s -> color ++ s ++ reset) <$> replaceVarM vars format
msgColor prio
| prio == Logger.DEBUG = debugColor
| prio == Logger.WARNING = warnColor
| prio == Logger.NOTICE = noticeColor
| prio >= Logger.ERROR = errColor
| otherwise = normColor
timeFormat = "%F %X %Z"
normColor = setSGRCode []
debugColor = setSGRCode [ SetColor Foreground Vivid Blue ]
warnColor = setSGRCode [ SetColor Foreground Vivid Yellow ]
noticeColor= setSGRCode [ SetColor Foreground Dull Yellow ]
errColor = setSGRCode [ SetColor Foreground Vivid Red ]
reset = normColor
--------------------------------------------------------------------------------
-- is sadly not exported
-- http://hackage.haskell.org/package/hslogger-1.2.3/docs/src/System-Log-Formatter.html#simpleLogFormatter
-- | Replace some '$' variables in a string with supplied values
| 1,746
|
coloredLogFormatter :: forall a. String -> Formatter.LogFormatter a
coloredLogFormatter = formatter
where
formatter :: String -> Formatter.LogFormatter a
formatter format _ (prio,msg) loggername =
let vars =
[("time", formatTime defaultTimeLocale timeFormat <$> getZonedTime)
,("utcTime", formatTime defaultTimeLocale timeFormat <$> getCurrentTime)
,("msg", return msg)
,("prio", return $ show prio)
,("loggername", return loggername)
,("tid", show <$> myThreadId)
]
color = msgColor prio
in (\s -> color ++ s ++ reset) <$> replaceVarM vars format
msgColor prio
| prio == Logger.DEBUG = debugColor
| prio == Logger.WARNING = warnColor
| prio == Logger.NOTICE = noticeColor
| prio >= Logger.ERROR = errColor
| otherwise = normColor
timeFormat = "%F %X %Z"
normColor = setSGRCode []
debugColor = setSGRCode [ SetColor Foreground Vivid Blue ]
warnColor = setSGRCode [ SetColor Foreground Vivid Yellow ]
noticeColor= setSGRCode [ SetColor Foreground Dull Yellow ]
errColor = setSGRCode [ SetColor Foreground Vivid Red ]
reset = normColor
--------------------------------------------------------------------------------
-- is sadly not exported
-- http://hackage.haskell.org/package/hslogger-1.2.3/docs/src/System-Log-Formatter.html#simpleLogFormatter
-- | Replace some '$' variables in a string with supplied values
| 1,664
|
coloredLogFormatter = formatter
where
formatter :: String -> Formatter.LogFormatter a
formatter format _ (prio,msg) loggername =
let vars =
[("time", formatTime defaultTimeLocale timeFormat <$> getZonedTime)
,("utcTime", formatTime defaultTimeLocale timeFormat <$> getCurrentTime)
,("msg", return msg)
,("prio", return $ show prio)
,("loggername", return loggername)
,("tid", show <$> myThreadId)
]
color = msgColor prio
in (\s -> color ++ s ++ reset) <$> replaceVarM vars format
msgColor prio
| prio == Logger.DEBUG = debugColor
| prio == Logger.WARNING = warnColor
| prio == Logger.NOTICE = noticeColor
| prio >= Logger.ERROR = errColor
| otherwise = normColor
timeFormat = "%F %X %Z"
normColor = setSGRCode []
debugColor = setSGRCode [ SetColor Foreground Vivid Blue ]
warnColor = setSGRCode [ SetColor Foreground Vivid Yellow ]
noticeColor= setSGRCode [ SetColor Foreground Dull Yellow ]
errColor = setSGRCode [ SetColor Foreground Vivid Red ]
reset = normColor
--------------------------------------------------------------------------------
-- is sadly not exported
-- http://hackage.haskell.org/package/hslogger-1.2.3/docs/src/System-Log-Formatter.html#simpleLogFormatter
-- | Replace some '$' variables in a string with supplied values
| 1,596
| true
| true
| 0
| 14
| 522
| 365
| 191
| 174
| null | null |
zeyuanxy/hacker-rank
|
practice/fp/misc/common-divisors/common-divisors.hs
|
mit
|
solve :: [[Int]] -> [Int]
solve ([t] : arr) = map (\[m, n] -> calc (gcd m n) 1) arr
| 83
|
solve :: [[Int]] -> [Int]
solve ([t] : arr) = map (\[m, n] -> calc (gcd m n) 1) arr
| 83
|
solve ([t] : arr) = map (\[m, n] -> calc (gcd m n) 1) arr
| 57
| false
| true
| 0
| 10
| 19
| 69
| 38
| 31
| null | null |
dictation-toolbox/aenea
|
server/windows/aenea-windows-server/src/Main.hs
|
lgpl-3.0
|
keyPressMethod :: Method Server
keyPressMethod = toMethod "key_press" keyPressFunction
(Required securityTokenKey :+:
Required "key" :+:
Optional "modifiers" [] :+:
Optional "direction" Press :+:
Optional "count" 1 :+:
Optional "delay" defaultKeyDelay :+: ())
| 366
|
keyPressMethod :: Method Server
keyPressMethod = toMethod "key_press" keyPressFunction
(Required securityTokenKey :+:
Required "key" :+:
Optional "modifiers" [] :+:
Optional "direction" Press :+:
Optional "count" 1 :+:
Optional "delay" defaultKeyDelay :+: ())
| 366
|
keyPressMethod = toMethod "key_press" keyPressFunction
(Required securityTokenKey :+:
Required "key" :+:
Optional "modifiers" [] :+:
Optional "direction" Press :+:
Optional "count" 1 :+:
Optional "delay" defaultKeyDelay :+: ())
| 334
| false
| true
| 1
| 13
| 138
| 81
| 36
| 45
| null | null |
fferreira/hnh
|
TypeUtils.hs
|
gpl-3.0
|
addType (LetExp d e _) t = LetExp d e t
| 39
|
addType (LetExp d e _) t = LetExp d e t
| 39
|
addType (LetExp d e _) t = LetExp d e t
| 39
| false
| false
| 1
| 6
| 10
| 32
| 13
| 19
| null | null |
sthiele/hasple
|
Test.hs
|
gpl-3.0
|
mpr6b = "v :- u.\n"
++ "u :- v.\n"
++ "u :- x.\n"
++ "x :- not y.\n"
++ "y :- not x.\n"
| 107
|
mpr6b = "v :- u.\n"
++ "u :- v.\n"
++ "u :- x.\n"
++ "x :- not y.\n"
++ "y :- not x.\n"
| 107
|
mpr6b = "v :- u.\n"
++ "u :- v.\n"
++ "u :- x.\n"
++ "x :- not y.\n"
++ "y :- not x.\n"
| 107
| false
| false
| 0
| 8
| 42
| 22
| 11
| 11
| null | null |
ezyang/ghc
|
libraries/template-haskell/Language/Haskell/TH/Syntax.hs
|
bsd-3-clause
|
badIO :: String -> IO a
badIO op = do { qReport True ("Can't do `" ++ op ++ "' in the IO monad")
; fail "Template Haskell failure" }
| 150
|
badIO :: String -> IO a
badIO op = do { qReport True ("Can't do `" ++ op ++ "' in the IO monad")
; fail "Template Haskell failure" }
| 150
|
badIO op = do { qReport True ("Can't do `" ++ op ++ "' in the IO monad")
; fail "Template Haskell failure" }
| 126
| false
| true
| 0
| 11
| 47
| 53
| 25
| 28
| null | null |
tobsan/yane
|
CPUHelpers.hs
|
gpl-3.0
|
-- checks if we have overflow in an addition
hasVAdd :: Operand -> Operand -> Operand -> Bool
hasVAdd op1 op2 res
| op1 >= 0 && op2 >= 0 && res < 0 = True
| op1 < 0 && op2 < 0 && res >= 0 = True
| otherwise = False
| 255
|
hasVAdd :: Operand -> Operand -> Operand -> Bool
hasVAdd op1 op2 res
| op1 >= 0 && op2 >= 0 && res < 0 = True
| op1 < 0 && op2 < 0 && res >= 0 = True
| otherwise = False
| 210
|
hasVAdd op1 op2 res
| op1 >= 0 && op2 >= 0 && res < 0 = True
| op1 < 0 && op2 < 0 && res >= 0 = True
| otherwise = False
| 161
| true
| true
| 1
| 12
| 94
| 101
| 48
| 53
| null | null |
bergmark/purescript
|
src/Language/PureScript/Parser/Declarations.hs
|
mit
|
parseLocalDeclaration :: P.Parsec String ParseState Declaration
parseLocalDeclaration = PositionedDeclaration <$> sourcePos <*> P.choice
[ parseTypeDeclaration
, parseValueDeclaration
] P.<?> "local declaration"
| 268
|
parseLocalDeclaration :: P.Parsec String ParseState Declaration
parseLocalDeclaration = PositionedDeclaration <$> sourcePos <*> P.choice
[ parseTypeDeclaration
, parseValueDeclaration
] P.<?> "local declaration"
| 268
|
parseLocalDeclaration = PositionedDeclaration <$> sourcePos <*> P.choice
[ parseTypeDeclaration
, parseValueDeclaration
] P.<?> "local declaration"
| 204
| false
| true
| 0
| 8
| 77
| 45
| 23
| 22
| null | null |
fiigii/k-cfa
|
Parser.hs
|
mit
|
functionDef :: Parser (String, Ast)
functionDef = do whiteSpace
reserved "function"
name <- identifier
formal <- parens $ commaSep1 identifier
body <- expr
optional semi
return (name, foldr (\v acc -> Function v acc)
(Function (last formal) body)
(init formal))
| 437
|
functionDef :: Parser (String, Ast)
functionDef = do whiteSpace
reserved "function"
name <- identifier
formal <- parens $ commaSep1 identifier
body <- expr
optional semi
return (name, foldr (\v acc -> Function v acc)
(Function (last formal) body)
(init formal))
| 437
|
functionDef = do whiteSpace
reserved "function"
name <- identifier
formal <- parens $ commaSep1 identifier
body <- expr
optional semi
return (name, foldr (\v acc -> Function v acc)
(Function (last formal) body)
(init formal))
| 401
| false
| true
| 0
| 13
| 215
| 117
| 55
| 62
| null | null |
juhp/stack
|
src/test/Stack/PackageDumpSpec.hs
|
bsd-3-clause
|
main :: IO ()
main = hspec spec
| 31
|
main :: IO ()
main = hspec spec
| 31
|
main = hspec spec
| 17
| false
| true
| 0
| 7
| 7
| 25
| 10
| 15
| null | null |
AlexanderPankiv/ghc
|
compiler/main/ErrUtils.hs
|
bsd-3-clause
|
mkPlainErrMsg dflags locn msg = mk_err_msg dflags SevError locn alwaysQualify msg empty
| 103
|
mkPlainErrMsg dflags locn msg = mk_err_msg dflags SevError locn alwaysQualify msg empty
| 103
|
mkPlainErrMsg dflags locn msg = mk_err_msg dflags SevError locn alwaysQualify msg empty
| 103
| false
| false
| 0
| 5
| 27
| 26
| 12
| 14
| null | null |
beni55/fay
|
examples/oscillator.hs
|
bsd-3-clause
|
-- Samples in graph.
-- Main entry point. Just register an "onload" handler.
--
main :: Fay ()
main = addWindowEventListener "load" run
| 138
|
main :: Fay ()
main = addWindowEventListener "load" run
| 55
|
main = addWindowEventListener "load" run
| 40
| true
| true
| 1
| 6
| 25
| 27
| 13
| 14
| null | null |
libscott/hawk
|
src/HSL/Types.hs
|
bsd-3-clause
|
f :: Float
f = undefined
| 24
|
f :: Float
f = undefined
| 24
|
f = undefined
| 13
| false
| true
| 0
| 6
| 5
| 18
| 7
| 11
| null | null |
snoyberg/ghc
|
compiler/basicTypes/VarSet.hs
|
bsd-3-clause
|
seqDVarSet :: DVarSet -> ()
seqDVarSet s = sizeDVarSet s `seq` ()
| 65
|
seqDVarSet :: DVarSet -> ()
seqDVarSet s = sizeDVarSet s `seq` ()
| 65
|
seqDVarSet s = sizeDVarSet s `seq` ()
| 37
| false
| true
| 0
| 8
| 11
| 37
| 17
| 20
| null | null |
fgaz/shine-varying
|
tests/misc.hs
|
mit
|
main :: IO ()
main = runWebGUI $ \ webView -> do
ctx <- fixedSizeCanvas webView 800 600
Just doc <- webViewGetDomDocument webView
playVarying ctx doc 30 pictureVar
| 175
|
main :: IO ()
main = runWebGUI $ \ webView -> do
ctx <- fixedSizeCanvas webView 800 600
Just doc <- webViewGetDomDocument webView
playVarying ctx doc 30 pictureVar
| 175
|
main = runWebGUI $ \ webView -> do
ctx <- fixedSizeCanvas webView 800 600
Just doc <- webViewGetDomDocument webView
playVarying ctx doc 30 pictureVar
| 161
| false
| true
| 0
| 10
| 39
| 64
| 29
| 35
| null | null |
vdweegen/UvA-Software_Testing
|
Lab2/Final/Exercises.hs
|
gpl-3.0
|
combcompar x y = compar x (y !! 0) (y !! 1)
| 43
|
combcompar x y = compar x (y !! 0) (y !! 1)
| 43
|
combcompar x y = compar x (y !! 0) (y !! 1)
| 43
| false
| false
| 0
| 7
| 11
| 32
| 16
| 16
| null | null |
ksaveljev/hake-2
|
src/Constants.hs
|
bsd-3-clause
|
sizeOfInt = 4 :: Int
| 23
|
sizeOfInt = 4 :: Int
| 23
|
sizeOfInt = 4 :: Int
| 23
| false
| false
| 0
| 4
| 7
| 9
| 5
| 4
| null | null |
tpsinnem/Idris-dev
|
src/Idris/Parser/Helpers.hs
|
bsd-3-clause
|
isEol _ = False
| 18
|
isEol _ = False
| 18
|
isEol _ = False
| 18
| false
| false
| 0
| 4
| 6
| 10
| 4
| 6
| null | null |
pgj/bead
|
src/Bead/Persistence/SQL/TestFeedback.hs
|
bsd-3-clause
|
testIncomingDataDir = FS.testIncomingDataDir
| 44
|
testIncomingDataDir = FS.testIncomingDataDir
| 44
|
testIncomingDataDir = FS.testIncomingDataDir
| 44
| false
| false
| 1
| 6
| 2
| 12
| 4
| 8
| null | null |
CindyLinz/Haskell.js
|
trans/src/Desugar/Where.hs
|
mit
|
deWhereClassDecl (ClsTyDef l type1 type2) = ClsTyDef (id l) (deWhereType type1) (deWhereType type2)
| 99
|
deWhereClassDecl (ClsTyDef l type1 type2) = ClsTyDef (id l) (deWhereType type1) (deWhereType type2)
| 99
|
deWhereClassDecl (ClsTyDef l type1 type2) = ClsTyDef (id l) (deWhereType type1) (deWhereType type2)
| 99
| false
| false
| 0
| 7
| 12
| 44
| 21
| 23
| null | null |
djeik/goto
|
libgoto/Language/GoLite/Lexer/Keywords.hs
|
mit
|
-- | Parses the \"fallthrough\" keyword, checking for a semicolon.
kwFallthrough :: Parser (Semi Keyword)
kwFallthrough = onlyKeywordSemi "fallthrough"
| 151
|
kwFallthrough :: Parser (Semi Keyword)
kwFallthrough = onlyKeywordSemi "fallthrough"
| 84
|
kwFallthrough = onlyKeywordSemi "fallthrough"
| 45
| true
| true
| 0
| 7
| 18
| 24
| 12
| 12
| null | null |
doylew/practice
|
haskell/test.hs
|
mit
|
combineTriple :: (Num a) => (a,a,a) -> a
combineTriple (x,y,z) = let a=x; b=y; c=z in a+b+c
| 91
|
combineTriple :: (Num a) => (a,a,a) -> a
combineTriple (x,y,z) = let a=x; b=y; c=z in a+b+c
| 91
|
combineTriple (x,y,z) = let a=x; b=y; c=z in a+b+c
| 50
| false
| true
| 0
| 8
| 16
| 80
| 44
| 36
| null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.