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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
julmue/UntypedLambda | src/Language/Lambda/Semantics/Nameless/SmallStep.hs | bsd-3-clause | stepCBN lt@(Let n d e) = case stepCBV d of
Normalform _ -> Normalform lt
Reducible d' -> Reducible (Let n d' e) | 119 | stepCBN lt@(Let n d e) = case stepCBV d of
Normalform _ -> Normalform lt
Reducible d' -> Reducible (Let n d' e) | 119 | stepCBN lt@(Let n d e) = case stepCBV d of
Normalform _ -> Normalform lt
Reducible d' -> Reducible (Let n d' e) | 119 | false | false | 1 | 10 | 30 | 68 | 29 | 39 | null | null |
ambiata/highlighting-kate | Text/Highlighting/Kate/Syntax/R.hs | gpl-2.0 | regex_'5ba'2dzA'2dZ'5f'5d'2b'5ba'2dzA'2dZ'5f'5c'2e0'2d9'5d'2a'28'3f'3d'5b'5cs'5d'2a'5b'28'5d'29 = compileRegex True "[a-zA-Z_]+[a-zA-Z_\\.0-9]*(?=[\\s]*[(])" | 157 | regex_'5ba'2dzA'2dZ'5f'5d'2b'5ba'2dzA'2dZ'5f'5c'2e0'2d9'5d'2a'28'3f'3d'5b'5cs'5d'2a'5b'28'5d'29 = compileRegex True "[a-zA-Z_]+[a-zA-Z_\\.0-9]*(?=[\\s]*[(])" | 157 | regex_'5ba'2dzA'2dZ'5f'5d'2b'5ba'2dzA'2dZ'5f'5c'2e0'2d9'5d'2a'28'3f'3d'5b'5cs'5d'2a'5b'28'5d'29 = compileRegex True "[a-zA-Z_]+[a-zA-Z_\\.0-9]*(?=[\\s]*[(])" | 157 | false | false | 0 | 5 | 4 | 11 | 5 | 6 | null | null |
renevp/hello-haskell | src/sing.hs | bsd-3-clause | sndString :: [Char] -> [Char]
sndString x = x ++ " over the rainbow" | 68 | sndString :: [Char] -> [Char]
sndString x = x ++ " over the rainbow" | 68 | sndString x = x ++ " over the rainbow" | 38 | false | true | 0 | 6 | 13 | 28 | 15 | 13 | null | null |
olorin/amazonka | amazonka-elasticbeanstalk/gen/Network/AWS/ElasticBeanstalk/Types/Product.hs | mpl-2.0 | -- | A list of Listeners used by the LoadBalancer.
lbdListeners :: Lens' LoadBalancerDescription [Listener]
lbdListeners = lens _lbdListeners (\ s a -> s{_lbdListeners = a}) . _Default . _Coerce | 194 | lbdListeners :: Lens' LoadBalancerDescription [Listener]
lbdListeners = lens _lbdListeners (\ s a -> s{_lbdListeners = a}) . _Default . _Coerce | 143 | lbdListeners = lens _lbdListeners (\ s a -> s{_lbdListeners = a}) . _Default . _Coerce | 86 | true | true | 0 | 11 | 29 | 51 | 28 | 23 | null | null |
AlexanderPankiv/ghc | compiler/nativeGen/X86/CodeGen.hs | bsd-3-clause | genCCall _ _ (PrimTarget (MO_AtomicWrite width)) [] [addr, val] = do
code <- assignMem_IntCode (intFormat width) addr val
return $ code `snocOL` MFENCE | 159 | genCCall _ _ (PrimTarget (MO_AtomicWrite width)) [] [addr, val] = do
code <- assignMem_IntCode (intFormat width) addr val
return $ code `snocOL` MFENCE | 159 | genCCall _ _ (PrimTarget (MO_AtomicWrite width)) [] [addr, val] = do
code <- assignMem_IntCode (intFormat width) addr val
return $ code `snocOL` MFENCE | 159 | false | false | 2 | 11 | 30 | 73 | 34 | 39 | null | null |
spinda/liquidhaskell | tests/gsoc15/unknown/pos/AssumedRecursive.hs | bsd-3-clause | foo :: a -> a
foo f = foo f | 27 | foo :: a -> a
foo f = foo f | 27 | foo f = foo f | 13 | false | true | 0 | 7 | 9 | 27 | 11 | 16 | null | null |
ezrosent/latexnodes | LatexNodes.hs | mit | varDecs :: Doc -> String
varDecs (Doc title author _ ) = printf "\\newcommand{\\mytitle}{%s}\
\ \n\\newcommand{\\myauthor}{%s}\n" title author | 144 | varDecs :: Doc -> String
varDecs (Doc title author _ ) = printf "\\newcommand{\\mytitle}{%s}\
\ \n\\newcommand{\\myauthor}{%s}\n" title author | 144 | varDecs (Doc title author _ ) = printf "\\newcommand{\\mytitle}{%s}\
\ \n\\newcommand{\\myauthor}{%s}\n" title author | 119 | false | true | 0 | 7 | 19 | 35 | 17 | 18 | null | null |
nevrenato/Hets_Fork | Search/Common/ACStandardization.hs | gpl-2.0 | arity s = case s
of (Lambda _ ar) -> ar
(Logical _ ar _) -> ar
(Parameter _ ar _) -> ar
(Variable _ ar _) -> ar | 160 | arity s = case s
of (Lambda _ ar) -> ar
(Logical _ ar _) -> ar
(Parameter _ ar _) -> ar
(Variable _ ar _) -> ar | 160 | arity s = case s
of (Lambda _ ar) -> ar
(Logical _ ar _) -> ar
(Parameter _ ar _) -> ar
(Variable _ ar _) -> ar | 160 | false | false | 1 | 9 | 77 | 79 | 37 | 42 | null | null |
dfaligertwood/onedrive | OneDrive/Internals/OAuth2.hs | bsd-3-clause | newAuth :: Client -> IO Auth
newAuth c
= getAuth
$ Auth c Nothing Nothing | 77 | newAuth :: Client -> IO Auth
newAuth c
= getAuth
$ Auth c Nothing Nothing | 77 | newAuth c
= getAuth
$ Auth c Nothing Nothing | 48 | false | true | 2 | 7 | 18 | 40 | 16 | 24 | null | null |
vladfi1/game-ai | lib/Game.hs | mit | lookAheadEvalDepth :: Game a s => Int -> Heuristic a s -> Heuristic a s
lookAheadEvalDepth n = iterateN n lookAheadEval | 119 | lookAheadEvalDepth :: Game a s => Int -> Heuristic a s -> Heuristic a s
lookAheadEvalDepth n = iterateN n lookAheadEval | 119 | lookAheadEvalDepth n = iterateN n lookAheadEval | 47 | false | true | 0 | 9 | 20 | 50 | 22 | 28 | null | null |
abdulrahimnizamani/OccamStar | LogicAgentOld.hs | gpl-2.0 | -- Truth table
valid T = T | 26 | valid T = T | 11 | valid T = T | 11 | true | false | 0 | 5 | 6 | 10 | 5 | 5 | null | null |
bonnefoa/Shaker | testsuite/tests/Shaker/CommonTest.hs | isc | mergedCompileInput :: IO CompileInput
mergedCompileInput = testShakerInput >>= runReaderT getNonMainCompileInput | 112 | mergedCompileInput :: IO CompileInput
mergedCompileInput = testShakerInput >>= runReaderT getNonMainCompileInput | 112 | mergedCompileInput = testShakerInput >>= runReaderT getNonMainCompileInput | 74 | false | true | 0 | 6 | 9 | 21 | 10 | 11 | null | null |
zaxtax/hakaru | haskell/Language/Hakaru/Util/Coda.hs | bsd-3-clause | meanVariance :: Fractional a => [a] -> (a,a)
meanVariance lst = (av,sigma2)
where
n = fromIntegral $ length lst
av = sum lst / n
sigma2 = (foldr (\x acc -> sqr (x - av) + acc) 0 lst) / (n - 1)
sqr x = x * x | 227 | meanVariance :: Fractional a => [a] -> (a,a)
meanVariance lst = (av,sigma2)
where
n = fromIntegral $ length lst
av = sum lst / n
sigma2 = (foldr (\x acc -> sqr (x - av) + acc) 0 lst) / (n - 1)
sqr x = x * x | 227 | meanVariance lst = (av,sigma2)
where
n = fromIntegral $ length lst
av = sum lst / n
sigma2 = (foldr (\x acc -> sqr (x - av) + acc) 0 lst) / (n - 1)
sqr x = x * x | 182 | false | true | 7 | 13 | 69 | 149 | 69 | 80 | null | null |
sboosali/commands-frontend-DragonNaturallySpeaking | sources/Commands/Mixins/DNS13OSX9/Derived.hs | bsd-3-clause | vocabularyGrammar :: [String] -> DNSEarleyRHS Text
vocabularyGrammar = tokens | 77 | vocabularyGrammar :: [String] -> DNSEarleyRHS Text
vocabularyGrammar = tokens | 77 | vocabularyGrammar = tokens | 26 | false | true | 0 | 6 | 8 | 21 | 11 | 10 | null | null |
rad1al/hutton_exercises | ch11.hs | gpl-2.0 | chop :: Int -> [a] -> [[a]]
chop n [] = [] | 42 | chop :: Int -> [a] -> [[a]]
chop n [] = [] | 42 | chop n [] = [] | 14 | false | true | 0 | 10 | 11 | 43 | 21 | 22 | null | null |
alphalambda/codeworld | codeworld-base/src/Internal/CodeWorld.hs | apache-2.0 | interactionOf ::
( [Number] -> world
, (world, Number) -> world
, (world, Event) -> world
, world -> Picture)
-> Program
interactionOf (initial, step, event, draw) =
do rs <- chooseRandoms
CW.interactionOf
(initial rs)
(\dt w -> step (w, fromDouble dt))
(\ev w -> event (w, fromCWEvent ev))
(toCWPic . draw)
`catch` reportError | 421 | interactionOf ::
( [Number] -> world
, (world, Number) -> world
, (world, Event) -> world
, world -> Picture)
-> Program
interactionOf (initial, step, event, draw) =
do rs <- chooseRandoms
CW.interactionOf
(initial rs)
(\dt w -> step (w, fromDouble dt))
(\ev w -> event (w, fromCWEvent ev))
(toCWPic . draw)
`catch` reportError | 421 | interactionOf (initial, step, event, draw) =
do rs <- chooseRandoms
CW.interactionOf
(initial rs)
(\dt w -> step (w, fromDouble dt))
(\ev w -> event (w, fromCWEvent ev))
(toCWPic . draw)
`catch` reportError | 268 | false | true | 0 | 13 | 147 | 159 | 87 | 72 | null | null |
begriffs/esqueleto | src/Database/Esqueleto/Internal/Sql.hs | bsd-3-clause | makeLimit :: IdentInfo -> LimitClause -> (TLB.Builder, [PersistValue])
makeLimit _ (Limit Nothing Nothing) = mempty | 119 | makeLimit :: IdentInfo -> LimitClause -> (TLB.Builder, [PersistValue])
makeLimit _ (Limit Nothing Nothing) = mempty | 119 | makeLimit _ (Limit Nothing Nothing) = mempty | 48 | false | true | 0 | 10 | 18 | 49 | 24 | 25 | null | null |
nkpart/lens-xml | src/Text/XML/Light/Lens.hs | bsd-3-clause | qNameL :: Lens' QName String
qNameL = lens qName (\v a -> v { qName = a }) | 74 | qNameL :: Lens' QName String
qNameL = lens qName (\v a -> v { qName = a }) | 74 | qNameL = lens qName (\v a -> v { qName = a }) | 45 | false | true | 0 | 9 | 17 | 46 | 22 | 24 | null | null |
buckie/juno | src/Juno/Types/Log.hs | bsd-3-clause | appendLogEntry :: LogEntry -> Log LogEntry -> Log LogEntry
appendLogEntry le es =
case lastEntry es of
Just ple -> over lEntries (Seq.|> hashLogEntry (Just ple) le) es
_ -> Log $ Seq.singleton (hashLogEntry Nothing le)
-- | Add/hash entries at specified index. | 271 | appendLogEntry :: LogEntry -> Log LogEntry -> Log LogEntry
appendLogEntry le es =
case lastEntry es of
Just ple -> over lEntries (Seq.|> hashLogEntry (Just ple) le) es
_ -> Log $ Seq.singleton (hashLogEntry Nothing le)
-- | Add/hash entries at specified index. | 271 | appendLogEntry le es =
case lastEntry es of
Just ple -> over lEntries (Seq.|> hashLogEntry (Just ple) le) es
_ -> Log $ Seq.singleton (hashLogEntry Nothing le)
-- | Add/hash entries at specified index. | 212 | false | true | 0 | 12 | 53 | 94 | 45 | 49 | null | null |
rvion/ride | jetpack/src/Data/List/NonEmpty/AsNe.hs | bsd-3-clause | -- ne_last :: forall a. NonEmpty a -> a
ne_last = I.last | 56 | ne_last = I.last | 16 | ne_last = I.last | 16 | true | false | 1 | 6 | 11 | 13 | 5 | 8 | null | null |
holzensp/ghc | compiler/codeGen/StgCmmPrim.hs | bsd-3-clause | emitPrimOp dflags [res] SizeofMutableArrayArrayOp [arg]
= emitPrimOp dflags [res] SizeofArrayOp [arg] | 104 | emitPrimOp dflags [res] SizeofMutableArrayArrayOp [arg]
= emitPrimOp dflags [res] SizeofArrayOp [arg] | 104 | emitPrimOp dflags [res] SizeofMutableArrayArrayOp [arg]
= emitPrimOp dflags [res] SizeofArrayOp [arg] | 104 | false | false | 0 | 6 | 13 | 36 | 19 | 17 | null | null |
a-ford/notghc | Llvm/Types.hs | bsd-3-clause | -- | Lower a variable of 'LMPointer' type.
pVarLift :: LlvmVar -> LlvmVar
pVarLift (LMGlobalVar s t l x a c) = LMGlobalVar s (pLift t) l x a c | 142 | pVarLift :: LlvmVar -> LlvmVar
pVarLift (LMGlobalVar s t l x a c) = LMGlobalVar s (pLift t) l x a c | 99 | pVarLift (LMGlobalVar s t l x a c) = LMGlobalVar s (pLift t) l x a c | 68 | true | true | 0 | 7 | 29 | 54 | 27 | 27 | null | null |
futurice/pulmurice-client | src/Main.hs | mit | sendMessage :: String -> ReqMsg -> IO ResMsg
sendMessage endPointHost reqMsg = do
initReq <- parseUrl endPoint
let reqBody = RequestBodyLBS $ A.encode reqMsg
let req = initReq { requestBody = reqBody, method = methodPost }
body <- responseBody <$> httpLbs req manager
return $ fromMaybe (ErrorResMsg "can't decode response message") (A.decode body)
where endPoint = "http://" ++ endPointHost ++ "/api" | 416 | sendMessage :: String -> ReqMsg -> IO ResMsg
sendMessage endPointHost reqMsg = do
initReq <- parseUrl endPoint
let reqBody = RequestBodyLBS $ A.encode reqMsg
let req = initReq { requestBody = reqBody, method = methodPost }
body <- responseBody <$> httpLbs req manager
return $ fromMaybe (ErrorResMsg "can't decode response message") (A.decode body)
where endPoint = "http://" ++ endPointHost ++ "/api" | 416 | sendMessage endPointHost reqMsg = do
initReq <- parseUrl endPoint
let reqBody = RequestBodyLBS $ A.encode reqMsg
let req = initReq { requestBody = reqBody, method = methodPost }
body <- responseBody <$> httpLbs req manager
return $ fromMaybe (ErrorResMsg "can't decode response message") (A.decode body)
where endPoint = "http://" ++ endPointHost ++ "/api" | 371 | false | true | 0 | 12 | 75 | 135 | 65 | 70 | null | null |
ekmett/containers | Data/Map/Base.hs | bsd-3-clause | findMin :: Map k a -> (k,a)
findMin (Bin _ kx x Tip _) = (kx,x) | 64 | findMin :: Map k a -> (k,a)
findMin (Bin _ kx x Tip _) = (kx,x) | 64 | findMin (Bin _ kx x Tip _) = (kx,x) | 36 | false | true | 0 | 9 | 16 | 55 | 27 | 28 | null | null |
Spawek/HCPParse | src/Preproc.hs | mit | performPreproc lastResult@(IncludeRequest _ _ _ _) _ = lastResult | 65 | performPreproc lastResult@(IncludeRequest _ _ _ _) _ = lastResult | 65 | performPreproc lastResult@(IncludeRequest _ _ _ _) _ = lastResult | 65 | false | false | 0 | 8 | 8 | 26 | 13 | 13 | null | null |
ricardopenyamari/ir2haskell | clir-parser-haskell-master/lib/sexp-grammar/src/Language/SexpGrammar/Base.hs | gpl-2.0 | unexpectedStr :: (MonadContextError (Propagation Position) (GrammarError Position) m) => Text -> m a
unexpectedStr msg = grammarError $ unexpected msg | 150 | unexpectedStr :: (MonadContextError (Propagation Position) (GrammarError Position) m) => Text -> m a
unexpectedStr msg = grammarError $ unexpected msg | 150 | unexpectedStr msg = grammarError $ unexpected msg | 49 | false | true | 0 | 8 | 19 | 53 | 26 | 27 | null | null |
glutamate/cmdtheline | src/System/Console/CmdTheLine/Manpage.hs | mit | print :: Subst -> HelpFormat -> Handle -> Page -> IO ()
print subst fmt = case fmt of
Pager -> printToPager (System.Console.CmdTheLine.Manpage.print subst)
Plain -> printPlainPage subst
Groff -> printGroffPage subst | 223 | print :: Subst -> HelpFormat -> Handle -> Page -> IO ()
print subst fmt = case fmt of
Pager -> printToPager (System.Console.CmdTheLine.Manpage.print subst)
Plain -> printPlainPage subst
Groff -> printGroffPage subst | 223 | print subst fmt = case fmt of
Pager -> printToPager (System.Console.CmdTheLine.Manpage.print subst)
Plain -> printPlainPage subst
Groff -> printGroffPage subst | 167 | false | true | 3 | 10 | 39 | 81 | 39 | 42 | null | null |
co-dan/NPNTool | src/NPNTool/ModelChecker.hs | bsd-3-clause | verify :: NCTL -> SS a -> Obj -> Verif
verify NCTLFalse _ _ = return False | 74 | verify :: NCTL -> SS a -> Obj -> Verif
verify NCTLFalse _ _ = return False | 74 | verify NCTLFalse _ _ = return False | 35 | false | true | 0 | 7 | 16 | 36 | 17 | 19 | null | null |
rrnewton/accelerate | Data/Array/Accelerate/Debug/Stats.hs | bsd-3-clause | pprTickCtx FusionDone = empty | 39 | pprTickCtx FusionDone = empty | 39 | pprTickCtx FusionDone = empty | 39 | false | false | 0 | 5 | 13 | 9 | 4 | 5 | null | null |
haskoin/haskoin | src/Haskoin/Script/Standard.hs | unlicense | -- | Encode a standard input into a script.
encodeInput :: ScriptInput -> Script
encodeInput s = case s of
RegularInput ri -> encodeSimpleInput ri
ScriptHashInput i o -> Script $
scriptOps (encodeSimpleInput i) ++ [opPushData $ encodeOutputBS o]
-- | Similar to 'encodeInput' but encodes directly to a serialized script
-- 'ByteString'. | 353 | encodeInput :: ScriptInput -> Script
encodeInput s = case s of
RegularInput ri -> encodeSimpleInput ri
ScriptHashInput i o -> Script $
scriptOps (encodeSimpleInput i) ++ [opPushData $ encodeOutputBS o]
-- | Similar to 'encodeInput' but encodes directly to a serialized script
-- 'ByteString'. | 309 | encodeInput s = case s of
RegularInput ri -> encodeSimpleInput ri
ScriptHashInput i o -> Script $
scriptOps (encodeSimpleInput i) ++ [opPushData $ encodeOutputBS o]
-- | Similar to 'encodeInput' but encodes directly to a serialized script
-- 'ByteString'. | 272 | true | true | 6 | 7 | 69 | 71 | 37 | 34 | null | null |
ev-hines/Haskell-Algorithms | src/GreedySch.hs | bsd-3-clause | removeDups :: [Job] -> [Job]
removeDups (a@(Job (x, _)):b@(Job(x2, _)):xs)
| x == x2 = removeDups (b:xs)
| otherwise = a : removeDups (b:xs) | 148 | removeDups :: [Job] -> [Job]
removeDups (a@(Job (x, _)):b@(Job(x2, _)):xs)
| x == x2 = removeDups (b:xs)
| otherwise = a : removeDups (b:xs) | 148 | removeDups (a@(Job (x, _)):b@(Job(x2, _)):xs)
| x == x2 = removeDups (b:xs)
| otherwise = a : removeDups (b:xs) | 119 | false | true | 1 | 12 | 31 | 106 | 57 | 49 | null | null |
ezyang/ghc | compiler/specialise/Rules.hs | bsd-3-clause | roughTopName (Coercion _) = Nothing | 35 | roughTopName (Coercion _) = Nothing | 35 | roughTopName (Coercion _) = Nothing | 35 | false | false | 0 | 6 | 4 | 16 | 7 | 9 | null | null |
section77/chaostreff-scheduler | src/Args.hs | mit | appCfg :: Year -> Month -> Parser AppCfg
appCfg y m = AppCfg
<$> strOption (short 'r' <> long "repo"
<> help "website src repository")
<*> strOption (short 'w' <> long "workdir"
<> help "website checkout directory")
<*> flag PushChanges NoPushChanges (long "no-push"
<> help "dont push changes to the src repo")
<*> option auto (short 'y' <> long "year"
<> help "run for the given year" <> value y)
<*> option auto (short 'm' <> long "month"
<> help "run for the given month" <> value m)
<*> option auto (short 'c' <> long "month-count"
<> help "generate for the given month count" <> value (MonthCount 2)) | 868 | appCfg :: Year -> Month -> Parser AppCfg
appCfg y m = AppCfg
<$> strOption (short 'r' <> long "repo"
<> help "website src repository")
<*> strOption (short 'w' <> long "workdir"
<> help "website checkout directory")
<*> flag PushChanges NoPushChanges (long "no-push"
<> help "dont push changes to the src repo")
<*> option auto (short 'y' <> long "year"
<> help "run for the given year" <> value y)
<*> option auto (short 'm' <> long "month"
<> help "run for the given month" <> value m)
<*> option auto (short 'c' <> long "month-count"
<> help "generate for the given month count" <> value (MonthCount 2)) | 868 | appCfg y m = AppCfg
<$> strOption (short 'r' <> long "repo"
<> help "website src repository")
<*> strOption (short 'w' <> long "workdir"
<> help "website checkout directory")
<*> flag PushChanges NoPushChanges (long "no-push"
<> help "dont push changes to the src repo")
<*> option auto (short 'y' <> long "year"
<> help "run for the given year" <> value y)
<*> option auto (short 'm' <> long "month"
<> help "run for the given month" <> value m)
<*> option auto (short 'c' <> long "month-count"
<> help "generate for the given month count" <> value (MonthCount 2)) | 827 | false | true | 0 | 15 | 369 | 219 | 99 | 120 | null | null |
christiaanb/Idris-dev | src/IRTS/Lang.hs | bsd-3-clause | usedIn env (LProj t i) = usedIn env t | 37 | usedIn env (LProj t i) = usedIn env t | 37 | usedIn env (LProj t i) = usedIn env t | 37 | false | false | 0 | 7 | 8 | 24 | 11 | 13 | null | null |
pauldoo/scratch | NBody/example/Example.hs | isc | display angle = do
clear [ColorBuffer, DepthBuffer]
loadIdentity
a <- get angle
rotate a $ Vector3 0 0 (1::GLfloat)
scale 0.7 0.7 (0.7::GLfloat)
preservingMatrix $ do
mapM_ (\(x,y,z) -> preservingMatrix $ do
color $ Color3 ((x+1.0)/2.0) ((y+1.0)/2.0) ((z+1.0)/2.0)
translate $ Vector3 x y z
rotate (a*3) $ Vector3 (1::GLfloat) (1::GLfloat) 0
cube (0.1::GLfloat)
color $ Color3 (0.0::GLfloat) (0.0::GLfloat) (0.0::GLfloat) --set outline color to black
cubeFrame (0.1::GLfloat)
) $ points 7
swapBuffers | 620 | display angle = do
clear [ColorBuffer, DepthBuffer]
loadIdentity
a <- get angle
rotate a $ Vector3 0 0 (1::GLfloat)
scale 0.7 0.7 (0.7::GLfloat)
preservingMatrix $ do
mapM_ (\(x,y,z) -> preservingMatrix $ do
color $ Color3 ((x+1.0)/2.0) ((y+1.0)/2.0) ((z+1.0)/2.0)
translate $ Vector3 x y z
rotate (a*3) $ Vector3 (1::GLfloat) (1::GLfloat) 0
cube (0.1::GLfloat)
color $ Color3 (0.0::GLfloat) (0.0::GLfloat) (0.0::GLfloat) --set outline color to black
cubeFrame (0.1::GLfloat)
) $ points 7
swapBuffers | 620 | display angle = do
clear [ColorBuffer, DepthBuffer]
loadIdentity
a <- get angle
rotate a $ Vector3 0 0 (1::GLfloat)
scale 0.7 0.7 (0.7::GLfloat)
preservingMatrix $ do
mapM_ (\(x,y,z) -> preservingMatrix $ do
color $ Color3 ((x+1.0)/2.0) ((y+1.0)/2.0) ((z+1.0)/2.0)
translate $ Vector3 x y z
rotate (a*3) $ Vector3 (1::GLfloat) (1::GLfloat) 0
cube (0.1::GLfloat)
color $ Color3 (0.0::GLfloat) (0.0::GLfloat) (0.0::GLfloat) --set outline color to black
cubeFrame (0.1::GLfloat)
) $ points 7
swapBuffers | 620 | false | false | 0 | 22 | 190 | 280 | 142 | 138 | null | null |
hsyl20/ViperVM | haskus-system/src/lib/Haskus/System/Terminal.hs | bsd-3-clause | newOutputState :: MonadIO m => Handle -> m OutputState
newOutputState fd = do
req <- atomically TList.empty
return $ OutputState req fd | 141 | newOutputState :: MonadIO m => Handle -> m OutputState
newOutputState fd = do
req <- atomically TList.empty
return $ OutputState req fd | 141 | newOutputState fd = do
req <- atomically TList.empty
return $ OutputState req fd | 86 | false | true | 0 | 10 | 27 | 57 | 24 | 33 | null | null |
pparkkin/eta | compiler/ETA/Prelude/PrimOp.hs | bsd-3-clause | primOpCodeSize DoubleTanOp = primOpCodeSizeForeignCall | 55 | primOpCodeSize DoubleTanOp = primOpCodeSizeForeignCall | 55 | primOpCodeSize DoubleTanOp = primOpCodeSizeForeignCall | 55 | false | false | 0 | 5 | 4 | 9 | 4 | 5 | null | null |
urbanslug/ghc | testsuite/tests/rename/should_compile/timing003.hs | bsd-3-clause | a064 = [] | 9 | a064 = [] | 9 | a064 = [] | 9 | false | false | 1 | 6 | 2 | 12 | 4 | 8 | null | null |
erikstenlund/lisp-parser | lisp.hs | mit | -- Parsers
parseASTNode :: Parser ASTNode
parseASTNode = parseString
<|> parseList
<|> parseIdentifier
<|> parseNumber
<|> parseQuotation
<|> parseDefine
<?> "lisp expression" | 253 | parseASTNode :: Parser ASTNode
parseASTNode = parseString
<|> parseList
<|> parseIdentifier
<|> parseNumber
<|> parseQuotation
<|> parseDefine
<?> "lisp expression" | 242 | parseASTNode = parseString
<|> parseList
<|> parseIdentifier
<|> parseNumber
<|> parseQuotation
<|> parseDefine
<?> "lisp expression" | 211 | true | true | 0 | 10 | 99 | 39 | 20 | 19 | null | null |
swamp-agr/carbuyer-advisor | fay/Types.hs | mit | tolPlusPercent :: TO
tolPlusPercent = TO "+%" (3 :: Int) "f2" | 61 | tolPlusPercent :: TO
tolPlusPercent = TO "+%" (3 :: Int) "f2" | 61 | tolPlusPercent = TO "+%" (3 :: Int) "f2" | 40 | false | true | 0 | 6 | 10 | 24 | 13 | 11 | null | null |
ancientlanguage/haskell-analysis | prepare/src/Prepare/Decompose.hs | mit | decomposeChar '\x2F832' = "\x537F" | 34 | decomposeChar '\x2F832' = "\x537F" | 34 | decomposeChar '\x2F832' = "\x537F" | 34 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
paulsamways/hs-scheme | src/Scheme.hs | bsd-3-clause | car [badArg] = throwError $ ErrorTypeMismatch "pair" badArg | 59 | car [badArg] = throwError $ ErrorTypeMismatch "pair" badArg | 59 | car [badArg] = throwError $ ErrorTypeMismatch "pair" badArg | 59 | false | false | 0 | 6 | 7 | 22 | 10 | 12 | null | null |
brendanhay/gogol | gogol-ml/gen/Network/Google/MachineLearning/Types/Product.hs | mpl-2.0 | -- | Required. Metric name.
gcmvmmMetric :: Lens' GoogleCloudMlV1_Measurement_Metric (Maybe Text)
gcmvmmMetric
= lens _gcmvmmMetric (\ s a -> s{_gcmvmmMetric = a}) | 165 | gcmvmmMetric :: Lens' GoogleCloudMlV1_Measurement_Metric (Maybe Text)
gcmvmmMetric
= lens _gcmvmmMetric (\ s a -> s{_gcmvmmMetric = a}) | 137 | gcmvmmMetric
= lens _gcmvmmMetric (\ s a -> s{_gcmvmmMetric = a}) | 67 | true | true | 0 | 9 | 23 | 48 | 25 | 23 | null | null |
tonymorris/story-board | src/Graphics/Storyboard/Tile.hs | bsd-3-clause | -- Used mainly for debugging blank tiles.
filled :: Text -> Size Double -> Tile ()
filled col (w',h') = tile (w',h') $ \ (Cavity (x,y) (w,h)) -> saveRestore $ do
globalAlpha 0.2
beginPath()
rect(0, 0, w, h)
fillStyle col
fill();
globalAlpha 0.5
beginPath()
rect(0, 0, w, h);
lineWidth 1;
strokeStyle "black";
stroke()
globalAlpha 1.0
-- compress a tile into a point. | 415 | filled :: Text -> Size Double -> Tile ()
filled col (w',h') = tile (w',h') $ \ (Cavity (x,y) (w,h)) -> saveRestore $ do
globalAlpha 0.2
beginPath()
rect(0, 0, w, h)
fillStyle col
fill();
globalAlpha 0.5
beginPath()
rect(0, 0, w, h);
lineWidth 1;
strokeStyle "black";
stroke()
globalAlpha 1.0
-- compress a tile into a point. | 373 | filled col (w',h') = tile (w',h') $ \ (Cavity (x,y) (w,h)) -> saveRestore $ do
globalAlpha 0.2
beginPath()
rect(0, 0, w, h)
fillStyle col
fill();
globalAlpha 0.5
beginPath()
rect(0, 0, w, h);
lineWidth 1;
strokeStyle "black";
stroke()
globalAlpha 1.0
-- compress a tile into a point. | 332 | true | true | 0 | 11 | 110 | 190 | 93 | 97 | null | null |
gcampax/ghc | compiler/deSugar/Check.hs | bsd-3-clause | okGroup :: [(EqnNo, EquationInfo)] -> Bool
-- True if all equations have at least one pattern, and
-- all have the same number of patterns
okGroup [] = True | 156 | okGroup :: [(EqnNo, EquationInfo)] -> Bool
okGroup [] = True | 60 | okGroup [] = True | 17 | true | true | 0 | 7 | 28 | 31 | 18 | 13 | null | null |
LukeHoersten/prometheus | src/System/Metrics/Prometheus/Encode/Text/MetricId.hs | bsd-3-clause | newline :: Builder
newline = char8 '\n' | 39 | newline :: Builder
newline = char8 '\n' | 39 | newline = char8 '\n' | 20 | false | true | 0 | 5 | 6 | 14 | 7 | 7 | null | null |
troydm/edda | src/EDDA/Types.hs | mit | onlyJustVec :: V.Vector (Maybe a) -> V.Vector a
onlyJustVec v = V.map fromJust (V.filter isJust v) | 98 | onlyJustVec :: V.Vector (Maybe a) -> V.Vector a
onlyJustVec v = V.map fromJust (V.filter isJust v) | 98 | onlyJustVec v = V.map fromJust (V.filter isJust v) | 50 | false | true | 0 | 8 | 15 | 51 | 24 | 27 | null | null |
erochest/ribot | src/Data/Ribot/Config.hs | bsd-3-clause | -- This looks up a file path and returns it. If the default is used, it's
-- returned as-is; otherwise, the path is canonicalized.
lookupFilePath :: FilePath -> Name -> Config -> IO FilePath
lookupFilePath defaultPath name config =
lookupDefault' defaultPath name config >>= absPath defaultPath | 298 | lookupFilePath :: FilePath -> Name -> Config -> IO FilePath
lookupFilePath defaultPath name config =
lookupDefault' defaultPath name config >>= absPath defaultPath | 167 | lookupFilePath defaultPath name config =
lookupDefault' defaultPath name config >>= absPath defaultPath | 107 | true | true | 0 | 8 | 49 | 49 | 24 | 25 | null | null |
kylcarte/harihara | src/Harihara/Monad.hs | bsd-3-clause | modifyTagEnv :: (TagEnv -> TagEnv) -> Harihara ()
modifyTagEnv = modifyHHEnv . onTagEnv | 87 | modifyTagEnv :: (TagEnv -> TagEnv) -> Harihara ()
modifyTagEnv = modifyHHEnv . onTagEnv | 87 | modifyTagEnv = modifyHHEnv . onTagEnv | 37 | false | true | 0 | 7 | 12 | 31 | 16 | 15 | null | null |
gspia/reflex-dom-htmlea | lib/src/Reflex/Dom/HTML5/Attrs/Aria.hs | bsd-3-clause | aDisabled = aNmVal "disabled" | 37 | aDisabled = aNmVal "disabled" | 37 | aDisabled = aNmVal "disabled" | 37 | false | false | 0 | 5 | 11 | 9 | 4 | 5 | null | null |
tittoassini/flat | src/Flat/Encoder/Size.hs | bsd-3-clause | sInt32 :: Int32 -> NumBits
sInt32 = sWord32 . zigZag | 52 | sInt32 :: Int32 -> NumBits
sInt32 = sWord32 . zigZag | 52 | sInt32 = sWord32 . zigZag | 25 | false | true | 0 | 7 | 9 | 26 | 11 | 15 | null | null |
allanderek/ipclib | Language/Pepa/QualifiedName.hs | gpl-2.0 | suffixQName (Mangled prefix ident) suffix = Mangled prefix (ident ++ suffix) | 76 | suffixQName (Mangled prefix ident) suffix = Mangled prefix (ident ++ suffix) | 76 | suffixQName (Mangled prefix ident) suffix = Mangled prefix (ident ++ suffix) | 76 | false | false | 0 | 7 | 10 | 31 | 15 | 16 | null | null |
ekmett/ghc | compiler/llvmGen/LlvmCodeGen/CodeGen.hs | bsd-3-clause | getHsFunc' :: LMString -> LlvmType -> LlvmM ExprData
getHsFunc' name fty
= do fun <- getGlobalPtr name
if getVarType fun == fty
then return (fun, nilOL, [])
else do (v1, s1) <- doExpr (pLift fty)
$ Cast LM_Bitcast fun (pLift fty)
return (v1, unitOL s1, [])
-- | Create a new local var | 361 | getHsFunc' :: LMString -> LlvmType -> LlvmM ExprData
getHsFunc' name fty
= do fun <- getGlobalPtr name
if getVarType fun == fty
then return (fun, nilOL, [])
else do (v1, s1) <- doExpr (pLift fty)
$ Cast LM_Bitcast fun (pLift fty)
return (v1, unitOL s1, [])
-- | Create a new local var | 361 | getHsFunc' name fty
= do fun <- getGlobalPtr name
if getVarType fun == fty
then return (fun, nilOL, [])
else do (v1, s1) <- doExpr (pLift fty)
$ Cast LM_Bitcast fun (pLift fty)
return (v1, unitOL s1, [])
-- | Create a new local var | 308 | false | true | 0 | 15 | 129 | 134 | 65 | 69 | null | null |
eklinkhammer/neural-algorithms | test/RandomUtil/RandomMatrixTest.hs | bsd-3-clause | -- testsSelectRandomMatrixElement
testSelects :: Test
testSelects = TestCase (assertEqual "selectRandomMatrixElement - Select"
5
(fst $ selectRandomMatrixElement Two mat)) | 221 | testSelects :: Test
testSelects = TestCase (assertEqual "selectRandomMatrixElement - Select"
5
(fst $ selectRandomMatrixElement Two mat)) | 187 | testSelects = TestCase (assertEqual "selectRandomMatrixElement - Select"
5
(fst $ selectRandomMatrixElement Two mat)) | 167 | true | true | 0 | 10 | 67 | 43 | 20 | 23 | null | null |
nomeata/ghc | compiler/main/DriverMkDepend.hs | bsd-3-clause | processDeps dflags hsc_env excl_mods root hdl (AcyclicSCC node)
= do { let extra_suffixes = depSuffixes dflags
include_pkg_deps = depIncludePkgDeps dflags
src_file = msHsFilePath node
obj_file = msObjFilePath node
obj_files = insertSuffixes obj_file extra_suffixes
do_imp loc is_boot pkg_qual imp_mod
= do { mb_hi <- findDependency hsc_env loc pkg_qual imp_mod
is_boot include_pkg_deps
; case mb_hi of {
Nothing -> return () ;
Just hi_file -> do
{ let hi_files = insertSuffixes hi_file extra_suffixes
write_dep (obj,hi) = writeDependency root hdl [obj] hi
-- Add one dependency for each suffix;
-- e.g. A.o : B.hi
-- A.x_o : B.x_hi
; mapM_ write_dep (obj_files `zip` hi_files) }}}
-- Emit std dependency of the object(s) on the source file
-- Something like A.o : A.hs
; writeDependency root hdl obj_files src_file
-- Emit a dependency for each import
; let do_imps is_boot idecls = sequence_
[ do_imp loc is_boot (ideclPkgQual i) mod
| L loc i <- idecls,
let mod = unLoc (ideclName i),
mod `notElem` excl_mods ]
; do_imps True (ms_srcimps node)
; do_imps False (ms_imps node)
} | 1,646 | processDeps dflags hsc_env excl_mods root hdl (AcyclicSCC node)
= do { let extra_suffixes = depSuffixes dflags
include_pkg_deps = depIncludePkgDeps dflags
src_file = msHsFilePath node
obj_file = msObjFilePath node
obj_files = insertSuffixes obj_file extra_suffixes
do_imp loc is_boot pkg_qual imp_mod
= do { mb_hi <- findDependency hsc_env loc pkg_qual imp_mod
is_boot include_pkg_deps
; case mb_hi of {
Nothing -> return () ;
Just hi_file -> do
{ let hi_files = insertSuffixes hi_file extra_suffixes
write_dep (obj,hi) = writeDependency root hdl [obj] hi
-- Add one dependency for each suffix;
-- e.g. A.o : B.hi
-- A.x_o : B.x_hi
; mapM_ write_dep (obj_files `zip` hi_files) }}}
-- Emit std dependency of the object(s) on the source file
-- Something like A.o : A.hs
; writeDependency root hdl obj_files src_file
-- Emit a dependency for each import
; let do_imps is_boot idecls = sequence_
[ do_imp loc is_boot (ideclPkgQual i) mod
| L loc i <- idecls,
let mod = unLoc (ideclName i),
mod `notElem` excl_mods ]
; do_imps True (ms_srcimps node)
; do_imps False (ms_imps node)
} | 1,646 | processDeps dflags hsc_env excl_mods root hdl (AcyclicSCC node)
= do { let extra_suffixes = depSuffixes dflags
include_pkg_deps = depIncludePkgDeps dflags
src_file = msHsFilePath node
obj_file = msObjFilePath node
obj_files = insertSuffixes obj_file extra_suffixes
do_imp loc is_boot pkg_qual imp_mod
= do { mb_hi <- findDependency hsc_env loc pkg_qual imp_mod
is_boot include_pkg_deps
; case mb_hi of {
Nothing -> return () ;
Just hi_file -> do
{ let hi_files = insertSuffixes hi_file extra_suffixes
write_dep (obj,hi) = writeDependency root hdl [obj] hi
-- Add one dependency for each suffix;
-- e.g. A.o : B.hi
-- A.x_o : B.x_hi
; mapM_ write_dep (obj_files `zip` hi_files) }}}
-- Emit std dependency of the object(s) on the source file
-- Something like A.o : A.hs
; writeDependency root hdl obj_files src_file
-- Emit a dependency for each import
; let do_imps is_boot idecls = sequence_
[ do_imp loc is_boot (ideclPkgQual i) mod
| L loc i <- idecls,
let mod = unLoc (ideclName i),
mod `notElem` excl_mods ]
; do_imps True (ms_srcimps node)
; do_imps False (ms_imps node)
} | 1,646 | false | false | 0 | 21 | 740 | 327 | 166 | 161 | null | null |
maarons/Cortex | Saffron/AppManager.hs | agpl-3.0 | addThread :: (MVar (), MVar Int) -> MVar [(MVar (), MVar Int)] ->
AppManagerMonadStack ()
addThread t mv = do
dirty <- isEmptyMVar mv
when dirty $ throwError "Dirty state encountered"
threads <- takeMVar mv
putMVar mv (t:threads)
----- | 256 | addThread :: (MVar (), MVar Int) -> MVar [(MVar (), MVar Int)] ->
AppManagerMonadStack ()
addThread t mv = do
dirty <- isEmptyMVar mv
when dirty $ throwError "Dirty state encountered"
threads <- takeMVar mv
putMVar mv (t:threads)
----- | 256 | addThread t mv = do
dirty <- isEmptyMVar mv
when dirty $ throwError "Dirty state encountered"
threads <- takeMVar mv
putMVar mv (t:threads)
----- | 162 | false | true | 0 | 11 | 59 | 112 | 52 | 60 | null | null |
paluh/systemd-config | src/System/Systemd/Config/Networkd/Network.hs | bsd-3-clause | showNetworkDHCP EnableIPv4DHCP = "ipv4" | 39 | showNetworkDHCP EnableIPv4DHCP = "ipv4" | 39 | showNetworkDHCP EnableIPv4DHCP = "ipv4" | 39 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
Macil-dev/verhface-ll | src/Bindings/Verba/ErrorCodes.hs | unlicense | verr 111 = VerbaError 111 "ERR_IMM" "Имитовставка неверна" | 71 | verr 111 = VerbaError 111 "ERR_IMM" "Имитовставка неверна" | 71 | verr 111 = VerbaError 111 "ERR_IMM" "Имитовставка неверна" | 71 | false | false | 1 | 5 | 20 | 19 | 7 | 12 | null | null |
urbanslug/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | selName_RDR = varQual_RDR gHC_GENERICS (fsLit "selName") | 62 | selName_RDR = varQual_RDR gHC_GENERICS (fsLit "selName") | 62 | selName_RDR = varQual_RDR gHC_GENERICS (fsLit "selName") | 62 | false | false | 0 | 7 | 11 | 17 | 8 | 9 | null | null |
danielcnorris/haskell-spelling-corrector | src/Main.hs | mit | -------------------------------------------------------------------------------
-- Main program
main :: IO ()
main = putStrLn "Loading training data..." >>
B.readFile "big.txt" >>= \contents ->
let trained = train . parse $ contents in
putStrLn (show (Trie.size trained) ++ " words indexed.") >>
forever (putStrLn "Enter a word: " >>
B.getLine >>= \word ->
if length (C.words word) > 1 || lowercase word /= word
then putStrLn "Must enter just one lowercase word!"
else let corrected = correct trained word in
if corrected == word
then putStrLn "Your word was spelled correctly"
else C.putStrLn $ B.concat ["Did you mean \""
, corrected
, "\"?"]) | 936 | main :: IO ()
main = putStrLn "Loading training data..." >>
B.readFile "big.txt" >>= \contents ->
let trained = train . parse $ contents in
putStrLn (show (Trie.size trained) ++ " words indexed.") >>
forever (putStrLn "Enter a word: " >>
B.getLine >>= \word ->
if length (C.words word) > 1 || lowercase word /= word
then putStrLn "Must enter just one lowercase word!"
else let corrected = correct trained word in
if corrected == word
then putStrLn "Your word was spelled correctly"
else C.putStrLn $ B.concat ["Did you mean \""
, corrected
, "\"?"]) | 839 | main = putStrLn "Loading training data..." >>
B.readFile "big.txt" >>= \contents ->
let trained = train . parse $ contents in
putStrLn (show (Trie.size trained) ++ " words indexed.") >>
forever (putStrLn "Enter a word: " >>
B.getLine >>= \word ->
if length (C.words word) > 1 || lowercase word /= word
then putStrLn "Must enter just one lowercase word!"
else let corrected = correct trained word in
if corrected == word
then putStrLn "Your word was spelled correctly"
else C.putStrLn $ B.concat ["Did you mean \""
, corrected
, "\"?"]) | 825 | true | true | 0 | 21 | 389 | 195 | 97 | 98 | null | null |
kawamuray/ganeti | src/Ganeti/Query/Query.hs | gpl-2.0 | queryInner :: ConfigData -- ^ The current configuration
-> Bool -- ^ Whether to collect live data
-> Query -- ^ The query (item, fields, filter)
-> [String] -- ^ Requested names
-> IO (ErrorResult QueryResult) -- ^ Result
queryInner cfg live (Query (ItemTypeOpCode QRNode) fields qfilter) wanted =
genericQuery Node.fieldsMap (CollectorFieldAware Node.collectLiveData)
nodeName configNodes getNode cfg live fields qfilter wanted | 511 | queryInner :: ConfigData -- ^ The current configuration
-> Bool -- ^ Whether to collect live data
-> Query -- ^ The query (item, fields, filter)
-> [String] -- ^ Requested names
-> IO (ErrorResult QueryResult)
queryInner cfg live (Query (ItemTypeOpCode QRNode) fields qfilter) wanted =
genericQuery Node.fieldsMap (CollectorFieldAware Node.collectLiveData)
nodeName configNodes getNode cfg live fields qfilter wanted | 498 | queryInner cfg live (Query (ItemTypeOpCode QRNode) fields qfilter) wanted =
genericQuery Node.fieldsMap (CollectorFieldAware Node.collectLiveData)
nodeName configNodes getNode cfg live fields qfilter wanted | 223 | true | true | 0 | 11 | 143 | 100 | 52 | 48 | null | null |
rdnetto/persistent | persistent-template/Database/Persist/TH.hs | mit | mkUniqueKeys :: EntityDef -> Q Dec
mkUniqueKeys def | entitySum def =
return $ FunD 'persistUniqueKeys [normalClause [WildP] (ListE [])] | 140 | mkUniqueKeys :: EntityDef -> Q Dec
mkUniqueKeys def | entitySum def =
return $ FunD 'persistUniqueKeys [normalClause [WildP] (ListE [])] | 140 | mkUniqueKeys def | entitySum def =
return $ FunD 'persistUniqueKeys [normalClause [WildP] (ListE [])] | 105 | false | true | 0 | 12 | 23 | 59 | 28 | 31 | null | null |
cnc-patch/disass | src/Language/Assembly/X86/Parse.hs | bsd-3-clause | parseBSWAP
:: (Stream s m Word8, Monad m) => Word8 -> ParsecT s PState m Instr
parseBSWAP b =
do let reg = (b .&. 0xf) - 8
r <- registerName (fromIntegral reg)
opsize <- instrOperandSize
return $ Instr BSWAP opsize [OpReg r (fromIntegral reg)] | 270 | parseBSWAP
:: (Stream s m Word8, Monad m) => Word8 -> ParsecT s PState m Instr
parseBSWAP b =
do let reg = (b .&. 0xf) - 8
r <- registerName (fromIntegral reg)
opsize <- instrOperandSize
return $ Instr BSWAP opsize [OpReg r (fromIntegral reg)] | 270 | parseBSWAP b =
do let reg = (b .&. 0xf) - 8
r <- registerName (fromIntegral reg)
opsize <- instrOperandSize
return $ Instr BSWAP opsize [OpReg r (fromIntegral reg)] | 189 | false | true | 0 | 13 | 71 | 121 | 57 | 64 | null | null |
lennart/coriolis | Math/Coriolis/Coriolis.hs | mit | replaceDot '.' = ',' | 20 | replaceDot '.' = ',' | 20 | replaceDot '.' = ',' | 20 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
bus000/Dikunt | src/IRCWriter/Impl.hs | bsd-3-clause | writeServerMessage (BT.ServerPing server) =
"PING :" ++ getServerName server ++ "\r\n" | 90 | writeServerMessage (BT.ServerPing server) =
"PING :" ++ getServerName server ++ "\r\n" | 90 | writeServerMessage (BT.ServerPing server) =
"PING :" ++ getServerName server ++ "\r\n" | 90 | false | false | 4 | 7 | 14 | 32 | 13 | 19 | null | null |
pepeiborra/yices | Math/SMT/Yices/Parser.hs | bsd-3-clause | vare = liftM VarE identifier | 28 | vare = liftM VarE identifier | 28 | vare = liftM VarE identifier | 28 | false | false | 1 | 5 | 4 | 16 | 5 | 11 | null | null |
vTurbine/ghc | compiler/basicTypes/VarSet.hs | bsd-3-clause | unitDVarSet :: Var -> DVarSet
unitDVarSet = unitUniqDSet | 56 | unitDVarSet :: Var -> DVarSet
unitDVarSet = unitUniqDSet | 56 | unitDVarSet = unitUniqDSet | 26 | false | true | 0 | 5 | 7 | 15 | 8 | 7 | null | null |
rueshyna/gogol | gogol-dataflow/gen/Network/Google/Dataflow/Types/Product.hs | mpl-2.0 | -- | The start (inclusive) of the key range.
krlStart :: Lens' KeyRangeLocation (Maybe Text)
krlStart = lens _krlStart (\ s a -> s{_krlStart = a}) | 146 | krlStart :: Lens' KeyRangeLocation (Maybe Text)
krlStart = lens _krlStart (\ s a -> s{_krlStart = a}) | 101 | krlStart = lens _krlStart (\ s a -> s{_krlStart = a}) | 53 | true | true | 2 | 9 | 25 | 55 | 25 | 30 | null | null |
rrnewton/accelerate | Data/Array/Accelerate/Debug/Trace.hs | bsd-3-clause | traceIO f msg = do
when f $ do
psec <- getCPUTime
let secs = fromIntegral psec * 1E-12 :: Double
D.traceIO $ showFFloat (Just 3) secs (':':msg)
#else
{-# INLINE traceIO #-}
traceIO _ _ = return ()
#endif
-- | The 'traceEvent' function behaves like 'trace' with the difference that the
-- message is emitted to the eventlog, if eventlog profiling is enabled at
-- runtime.
-- | 402 | traceIO f msg = do
when f $ do
psec <- getCPUTime
let secs = fromIntegral psec * 1E-12 :: Double
D.traceIO $ showFFloat (Just 3) secs (':':msg)
#else
{-# INLINE traceIO #-}
traceIO _ _ = return ()
#endif
-- | The 'traceEvent' function behaves like 'trace' with the difference that the
-- message is emitted to the eventlog, if eventlog profiling is enabled at
-- runtime.
-- | 402 | traceIO f msg = do
when f $ do
psec <- getCPUTime
let secs = fromIntegral psec * 1E-12 :: Double
D.traceIO $ showFFloat (Just 3) secs (':':msg)
#else
{-# INLINE traceIO #-}
traceIO _ _ = return ()
#endif
-- | The 'traceEvent' function behaves like 'trace' with the difference that the
-- message is emitted to the eventlog, if eventlog profiling is enabled at
-- runtime.
-- | 402 | false | false | 0 | 14 | 96 | 82 | 41 | 41 | null | null |
ssaavedra/liquidhaskell | src/Language/Haskell/Liquid/Desugar710/DsArrows.hs | bsd-3-clause | -- (|||) :: forall b d c. a b d -> a c d -> a (Either b c) d
-- note the swapping of d and c
do_choice :: DsCmdEnv -> Type -> Type -> Type ->
CoreExpr -> CoreExpr -> CoreExpr
do_choice ids b_ty c_ty d_ty f g
= mkApps (choice_id ids) [Type b_ty, Type d_ty, Type c_ty, f, g] | 290 | do_choice :: DsCmdEnv -> Type -> Type -> Type ->
CoreExpr -> CoreExpr -> CoreExpr
do_choice ids b_ty c_ty d_ty f g
= mkApps (choice_id ids) [Type b_ty, Type d_ty, Type c_ty, f, g] | 197 | do_choice ids b_ty c_ty d_ty f g
= mkApps (choice_id ids) [Type b_ty, Type d_ty, Type c_ty, f, g] | 99 | true | true | 0 | 10 | 79 | 85 | 44 | 41 | null | null |
atsukotakahashi/wi | src/library/Yi/Keymap/Vim/Tag.hs | gpl-2.0 | pushTagStack :: Tag -> Int -> FilePath -> Int -> Int -> EditorM ()
pushTagStack tag ind fp ln cn = do
tl <- getTagList
ti <- getTagIndex
setTagList $ (take ti tl) ++ [(tag, ind, fp, ln, cn)]
setTagIndex $ ti + 1
-- | Get tag and decrement index (so that when a new push is done, the current
-- tag is popped) | 325 | pushTagStack :: Tag -> Int -> FilePath -> Int -> Int -> EditorM ()
pushTagStack tag ind fp ln cn = do
tl <- getTagList
ti <- getTagIndex
setTagList $ (take ti tl) ++ [(tag, ind, fp, ln, cn)]
setTagIndex $ ti + 1
-- | Get tag and decrement index (so that when a new push is done, the current
-- tag is popped) | 325 | pushTagStack tag ind fp ln cn = do
tl <- getTagList
ti <- getTagIndex
setTagList $ (take ti tl) ++ [(tag, ind, fp, ln, cn)]
setTagIndex $ ti + 1
-- | Get tag and decrement index (so that when a new push is done, the current
-- tag is popped) | 258 | false | true | 0 | 11 | 81 | 111 | 57 | 54 | null | null |
rimmington/cabal | Cabal/Distribution/PackageDescription/Check.hs | bsd-3-clause | checkDevelopmentOnlyFlags :: GenericPackageDescription -> [PackageCheck]
checkDevelopmentOnlyFlags pkg =
concatMap checkDevelopmentOnlyFlagsBuildInfo
[ bi
| (conditions, bi) <- allConditionalBuildInfo
, not (any guardedByManualFlag conditions) ]
where
guardedByManualFlag = definitelyFalse
-- We've basically got three-values logic here: True, False or unknown
-- hence this pattern to propagate the unknown cases properly.
definitelyFalse (Var (Flag n)) = maybe False not (Map.lookup n manualFlags)
definitelyFalse (Var _) = False
definitelyFalse (Lit b) = not b
definitelyFalse (CNot c) = definitelyTrue c
definitelyFalse (COr c1 c2) = definitelyFalse c1 && definitelyFalse c2
definitelyFalse (CAnd c1 c2) = definitelyFalse c1 || definitelyFalse c2
definitelyTrue (Var (Flag n)) = fromMaybe False (Map.lookup n manualFlags)
definitelyTrue (Var _) = False
definitelyTrue (Lit b) = b
definitelyTrue (CNot c) = definitelyFalse c
definitelyTrue (COr c1 c2) = definitelyTrue c1 || definitelyTrue c2
definitelyTrue (CAnd c1 c2) = definitelyTrue c1 && definitelyTrue c2
manualFlags = Map.fromList
[ (flagName flag, flagDefault flag)
| flag <- genPackageFlags pkg
, flagManual flag ]
allConditionalBuildInfo :: [([Condition ConfVar], BuildInfo)]
allConditionalBuildInfo =
concatMap (collectCondTreePaths libBuildInfo)
(maybeToList (condLibrary pkg))
++ concatMap (collectCondTreePaths buildInfo . snd)
(condExecutables pkg)
++ concatMap (collectCondTreePaths testBuildInfo . snd)
(condTestSuites pkg)
++ concatMap (collectCondTreePaths benchmarkBuildInfo . snd)
(condBenchmarks pkg)
-- get all the leaf BuildInfo, paired up with the path (in the tree sense)
-- of if-conditions that guard it
collectCondTreePaths :: (a -> b)
-> CondTree v c a
-> [([Condition v], b)]
collectCondTreePaths mapData = go []
where
go conditions condNode =
-- the data at this level in the tree:
(reverse conditions, mapData (condTreeData condNode))
: concat
[ go (condition:conditions) ifThen
| (condition, ifThen, _) <- condTreeComponents condNode ]
++ concat
[ go (condition:conditions) elseThen
| (condition, _, Just elseThen) <- condTreeComponents condNode ]
-- ------------------------------------------------------------
-- * Checks involving files in the package
-- ------------------------------------------------------------
-- | Sanity check things that requires IO. It looks at the files in the
-- package and expects to find the package unpacked in at the given file path.
-- | 2,969 | checkDevelopmentOnlyFlags :: GenericPackageDescription -> [PackageCheck]
checkDevelopmentOnlyFlags pkg =
concatMap checkDevelopmentOnlyFlagsBuildInfo
[ bi
| (conditions, bi) <- allConditionalBuildInfo
, not (any guardedByManualFlag conditions) ]
where
guardedByManualFlag = definitelyFalse
-- We've basically got three-values logic here: True, False or unknown
-- hence this pattern to propagate the unknown cases properly.
definitelyFalse (Var (Flag n)) = maybe False not (Map.lookup n manualFlags)
definitelyFalse (Var _) = False
definitelyFalse (Lit b) = not b
definitelyFalse (CNot c) = definitelyTrue c
definitelyFalse (COr c1 c2) = definitelyFalse c1 && definitelyFalse c2
definitelyFalse (CAnd c1 c2) = definitelyFalse c1 || definitelyFalse c2
definitelyTrue (Var (Flag n)) = fromMaybe False (Map.lookup n manualFlags)
definitelyTrue (Var _) = False
definitelyTrue (Lit b) = b
definitelyTrue (CNot c) = definitelyFalse c
definitelyTrue (COr c1 c2) = definitelyTrue c1 || definitelyTrue c2
definitelyTrue (CAnd c1 c2) = definitelyTrue c1 && definitelyTrue c2
manualFlags = Map.fromList
[ (flagName flag, flagDefault flag)
| flag <- genPackageFlags pkg
, flagManual flag ]
allConditionalBuildInfo :: [([Condition ConfVar], BuildInfo)]
allConditionalBuildInfo =
concatMap (collectCondTreePaths libBuildInfo)
(maybeToList (condLibrary pkg))
++ concatMap (collectCondTreePaths buildInfo . snd)
(condExecutables pkg)
++ concatMap (collectCondTreePaths testBuildInfo . snd)
(condTestSuites pkg)
++ concatMap (collectCondTreePaths benchmarkBuildInfo . snd)
(condBenchmarks pkg)
-- get all the leaf BuildInfo, paired up with the path (in the tree sense)
-- of if-conditions that guard it
collectCondTreePaths :: (a -> b)
-> CondTree v c a
-> [([Condition v], b)]
collectCondTreePaths mapData = go []
where
go conditions condNode =
-- the data at this level in the tree:
(reverse conditions, mapData (condTreeData condNode))
: concat
[ go (condition:conditions) ifThen
| (condition, ifThen, _) <- condTreeComponents condNode ]
++ concat
[ go (condition:conditions) elseThen
| (condition, _, Just elseThen) <- condTreeComponents condNode ]
-- ------------------------------------------------------------
-- * Checks involving files in the package
-- ------------------------------------------------------------
-- | Sanity check things that requires IO. It looks at the files in the
-- package and expects to find the package unpacked in at the given file path.
-- | 2,969 | checkDevelopmentOnlyFlags pkg =
concatMap checkDevelopmentOnlyFlagsBuildInfo
[ bi
| (conditions, bi) <- allConditionalBuildInfo
, not (any guardedByManualFlag conditions) ]
where
guardedByManualFlag = definitelyFalse
-- We've basically got three-values logic here: True, False or unknown
-- hence this pattern to propagate the unknown cases properly.
definitelyFalse (Var (Flag n)) = maybe False not (Map.lookup n manualFlags)
definitelyFalse (Var _) = False
definitelyFalse (Lit b) = not b
definitelyFalse (CNot c) = definitelyTrue c
definitelyFalse (COr c1 c2) = definitelyFalse c1 && definitelyFalse c2
definitelyFalse (CAnd c1 c2) = definitelyFalse c1 || definitelyFalse c2
definitelyTrue (Var (Flag n)) = fromMaybe False (Map.lookup n manualFlags)
definitelyTrue (Var _) = False
definitelyTrue (Lit b) = b
definitelyTrue (CNot c) = definitelyFalse c
definitelyTrue (COr c1 c2) = definitelyTrue c1 || definitelyTrue c2
definitelyTrue (CAnd c1 c2) = definitelyTrue c1 && definitelyTrue c2
manualFlags = Map.fromList
[ (flagName flag, flagDefault flag)
| flag <- genPackageFlags pkg
, flagManual flag ]
allConditionalBuildInfo :: [([Condition ConfVar], BuildInfo)]
allConditionalBuildInfo =
concatMap (collectCondTreePaths libBuildInfo)
(maybeToList (condLibrary pkg))
++ concatMap (collectCondTreePaths buildInfo . snd)
(condExecutables pkg)
++ concatMap (collectCondTreePaths testBuildInfo . snd)
(condTestSuites pkg)
++ concatMap (collectCondTreePaths benchmarkBuildInfo . snd)
(condBenchmarks pkg)
-- get all the leaf BuildInfo, paired up with the path (in the tree sense)
-- of if-conditions that guard it
collectCondTreePaths :: (a -> b)
-> CondTree v c a
-> [([Condition v], b)]
collectCondTreePaths mapData = go []
where
go conditions condNode =
-- the data at this level in the tree:
(reverse conditions, mapData (condTreeData condNode))
: concat
[ go (condition:conditions) ifThen
| (condition, ifThen, _) <- condTreeComponents condNode ]
++ concat
[ go (condition:conditions) elseThen
| (condition, _, Just elseThen) <- condTreeComponents condNode ]
-- ------------------------------------------------------------
-- * Checks involving files in the package
-- ------------------------------------------------------------
-- | Sanity check things that requires IO. It looks at the files in the
-- package and expects to find the package unpacked in at the given file path.
-- | 2,896 | false | true | 8 | 10 | 835 | 689 | 345 | 344 | null | null |
prashant007/AMPL | myAMPL/src/TEMP/Layoutparser.hs | mit | -- layout separators
layoutOpen = "{" | 39 | layoutOpen = "{" | 17 | layoutOpen = "{" | 17 | true | false | 0 | 4 | 7 | 7 | 4 | 3 | null | null |
wxwxwwxxx/ghc | compiler/types/FamInstEnv.hs | bsd-3-clause | -- Get the family TyCon of the FamInst
famInstTyCon :: FamInst -> TyCon
famInstTyCon = coAxiomTyCon . famInstAxiom | 114 | famInstTyCon :: FamInst -> TyCon
famInstTyCon = coAxiomTyCon . famInstAxiom | 75 | famInstTyCon = coAxiomTyCon . famInstAxiom | 42 | true | true | 0 | 5 | 17 | 20 | 11 | 9 | null | null |
kim/amazonka | amazonka-iam/gen/Network/AWS/IAM/CreateUser.hs | mpl-2.0 | -- | 'CreateUserResponse' constructor.
--
-- The fields accessible through corresponding lenses are:
--
-- * 'curUser' @::@ 'Maybe' 'User'
--
createUserResponse :: CreateUserResponse
createUserResponse = CreateUserResponse
{ _curUser = Nothing
} | 253 | createUserResponse :: CreateUserResponse
createUserResponse = CreateUserResponse
{ _curUser = Nothing
} | 111 | createUserResponse = CreateUserResponse
{ _curUser = Nothing
} | 70 | true | true | 0 | 7 | 39 | 29 | 18 | 11 | null | null |
urbanslug/ghc | compiler/coreSyn/CoreUnfold.hs | bsd-3-clause | traceInline :: DynFlags -> String -> SDoc -> a -> a
traceInline dflags str doc result
| dopt Opt_D_dump_inlinings dflags && dopt Opt_D_verbose_core2core dflags
= pprTrace str doc result
| otherwise
= result | 210 | traceInline :: DynFlags -> String -> SDoc -> a -> a
traceInline dflags str doc result
| dopt Opt_D_dump_inlinings dflags && dopt Opt_D_verbose_core2core dflags
= pprTrace str doc result
| otherwise
= result | 210 | traceInline dflags str doc result
| dopt Opt_D_dump_inlinings dflags && dopt Opt_D_verbose_core2core dflags
= pprTrace str doc result
| otherwise
= result | 158 | false | true | 0 | 9 | 36 | 82 | 35 | 47 | null | null |
keithodulaigh/Hets | CSMOF/XMLKeywords.hs | gpl-2.0 | elementSuperClassK :: QName
elementSuperClassK = QName {qName = "superClass", qURI = Nothing, qPrefix = Nothing} | 112 | elementSuperClassK :: QName
elementSuperClassK = QName {qName = "superClass", qURI = Nothing, qPrefix = Nothing} | 112 | elementSuperClassK = QName {qName = "superClass", qURI = Nothing, qPrefix = Nothing} | 84 | false | true | 0 | 6 | 14 | 31 | 19 | 12 | null | null |
vTurbine/ghc | compiler/stgSyn/CoreToStg.hs | bsd-3-clause | getFVs :: FreeVarsInfo -> [Var]
getFVs fvs = [id | (id, how_bound, _) <- nonDetEltsUFM fvs,
-- It's OK to use nonDetEltsUFM here because we're not aiming for
-- bit-for-bit determinism.
-- See Note [Unique Determinism and code generation]
not (topLevelBound how_bound) ] | 296 | getFVs :: FreeVarsInfo -> [Var]
getFVs fvs = [id | (id, how_bound, _) <- nonDetEltsUFM fvs,
-- It's OK to use nonDetEltsUFM here because we're not aiming for
-- bit-for-bit determinism.
-- See Note [Unique Determinism and code generation]
not (topLevelBound how_bound) ] | 296 | getFVs fvs = [id | (id, how_bound, _) <- nonDetEltsUFM fvs,
-- It's OK to use nonDetEltsUFM here because we're not aiming for
-- bit-for-bit determinism.
-- See Note [Unique Determinism and code generation]
not (topLevelBound how_bound) ] | 264 | false | true | 0 | 10 | 68 | 66 | 34 | 32 | null | null |
Undeterminant/config-home-gui | home/.xmonad/xmonad.hs | cc0-1.0 | myKeyHome3 ProgDvorak = xK_e | 28 | myKeyHome3 ProgDvorak = xK_e | 28 | myKeyHome3 ProgDvorak = xK_e | 28 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
facebookincubator/duckling | Duckling/Time/NB/Rules.hs | bsd-3-clause | ruleUntilTimeofday :: Rule
ruleUntilTimeofday = Rule
{ name = "until <time-of-day>"
, pattern =
[ regex "(engang )?innen|før|opptil"
, dimension Time
]
, prod = \tokens -> case tokens of
(_:Token Time td:_) ->
tt $ withDirection TTime.Before td
_ -> Nothing
} | 299 | ruleUntilTimeofday :: Rule
ruleUntilTimeofday = Rule
{ name = "until <time-of-day>"
, pattern =
[ regex "(engang )?innen|før|opptil"
, dimension Time
]
, prod = \tokens -> case tokens of
(_:Token Time td:_) ->
tt $ withDirection TTime.Before td
_ -> Nothing
} | 299 | ruleUntilTimeofday = Rule
{ name = "until <time-of-day>"
, pattern =
[ regex "(engang )?innen|før|opptil"
, dimension Time
]
, prod = \tokens -> case tokens of
(_:Token Time td:_) ->
tt $ withDirection TTime.Before td
_ -> Nothing
} | 272 | false | true | 0 | 15 | 82 | 95 | 50 | 45 | null | null |
snoyberg/ghc | compiler/basicTypes/BasicTypes.hs | bsd-3-clause | pprRuleName :: RuleName -> SDoc
pprRuleName rn = doubleQuotes (ftext rn) | 72 | pprRuleName :: RuleName -> SDoc
pprRuleName rn = doubleQuotes (ftext rn) | 72 | pprRuleName rn = doubleQuotes (ftext rn) | 40 | false | true | 0 | 7 | 10 | 27 | 13 | 14 | null | null |
keithodulaigh/Hets | TopHybrid/Utilities.hs | gpl-2.0 | {- | Checks if a given computation was sucessfull, if not
gives an error message
Must i need this ? -}
maybeE :: Int -> Maybe a -> a
maybeE i = fromMaybe $ error $ fromMaybe gErr msg
where msg = M.lookup i msgs
-- Gives an hint message | 244 | maybeE :: Int -> Maybe a -> a
maybeE i = fromMaybe $ error $ fromMaybe gErr msg
where msg = M.lookup i msgs
-- Gives an hint message | 141 | maybeE i = fromMaybe $ error $ fromMaybe gErr msg
where msg = M.lookup i msgs
-- Gives an hint message | 111 | true | true | 0 | 8 | 58 | 54 | 27 | 27 | null | null |
yinguanhao/pipes-cereal | src/Pipes/Cereal.hs | bsd-3-clause | -- | Encode a value.
encode :: (Monad m, Serialize a) => a -> Producer ByteString m ()
encode = P.yield . S.encode | 114 | encode :: (Monad m, Serialize a) => a -> Producer ByteString m ()
encode = P.yield . S.encode | 93 | encode = P.yield . S.encode | 27 | true | true | 0 | 8 | 22 | 48 | 25 | 23 | null | null |
konn/Yablog | Handler/Blog.hs | bsd-2-clause | deleteArticleR :: YablogDay -> Text -> Handler RepHtml
deleteArticleR = withArticleAuth $ \(Entity key _) -> do
runDB $ do
mapM_ (delete . entityKey) =<< selectList [TagArticle ==. key] []
delete key
redirect RootR | 226 | deleteArticleR :: YablogDay -> Text -> Handler RepHtml
deleteArticleR = withArticleAuth $ \(Entity key _) -> do
runDB $ do
mapM_ (delete . entityKey) =<< selectList [TagArticle ==. key] []
delete key
redirect RootR | 226 | deleteArticleR = withArticleAuth $ \(Entity key _) -> do
runDB $ do
mapM_ (delete . entityKey) =<< selectList [TagArticle ==. key] []
delete key
redirect RootR | 171 | false | true | 2 | 15 | 45 | 96 | 43 | 53 | null | null |
acowley/ghc | utils/genprimopcode/Main.hs | bsd-3-clause | listify :: [String] -> String
listify ss = "[" ++ concat (intersperse ", " ss) ++ "]" | 85 | listify :: [String] -> String
listify ss = "[" ++ concat (intersperse ", " ss) ++ "]" | 85 | listify ss = "[" ++ concat (intersperse ", " ss) ++ "]" | 55 | false | true | 0 | 9 | 16 | 44 | 21 | 23 | null | null |
arne-schroppe/dash | src/Language/Dash/CodeGen/CodeGenState.hs | mit | -- TODO this is basically copied form normalization-state, unify it
addConstant :: Constant -> CodeGen ConstAddr
addConstant c = do
state <- get
let cTable = constTable state
let nextAddr = mkConstAddr $ length cTable
let constTable' = cTable ++ [c] -- TODO can we cons + reverse?
put $ state { constTable = constTable' }
return nextAddr | 349 | addConstant :: Constant -> CodeGen ConstAddr
addConstant c = do
state <- get
let cTable = constTable state
let nextAddr = mkConstAddr $ length cTable
let constTable' = cTable ++ [c] -- TODO can we cons + reverse?
put $ state { constTable = constTable' }
return nextAddr | 281 | addConstant c = do
state <- get
let cTable = constTable state
let nextAddr = mkConstAddr $ length cTable
let constTable' = cTable ++ [c] -- TODO can we cons + reverse?
put $ state { constTable = constTable' }
return nextAddr | 236 | true | true | 3 | 7 | 69 | 88 | 44 | 44 | null | null |
gbaz/cabal | Cabal/Distribution/Simple/Utils.hs | bsd-3-clause | rawSystemStdout :: Verbosity -> FilePath -> [String] -> IO String
rawSystemStdout verbosity path args = do
(output, errors, exitCode) <- rawSystemStdInOut verbosity path args
Nothing Nothing
Nothing False
when (exitCode /= ExitSuccess) $
die errors
return output
-- | Run a command and return its output, errors and exit status. Optionally
-- also supply some input. Also provides control over whether the binary/text
-- mode of the input and output.
-- | 564 | rawSystemStdout :: Verbosity -> FilePath -> [String] -> IO String
rawSystemStdout verbosity path args = do
(output, errors, exitCode) <- rawSystemStdInOut verbosity path args
Nothing Nothing
Nothing False
when (exitCode /= ExitSuccess) $
die errors
return output
-- | Run a command and return its output, errors and exit status. Optionally
-- also supply some input. Also provides control over whether the binary/text
-- mode of the input and output.
-- | 564 | rawSystemStdout verbosity path args = do
(output, errors, exitCode) <- rawSystemStdInOut verbosity path args
Nothing Nothing
Nothing False
when (exitCode /= ExitSuccess) $
die errors
return output
-- | Run a command and return its output, errors and exit status. Optionally
-- also supply some input. Also provides control over whether the binary/text
-- mode of the input and output.
-- | 498 | false | true | 0 | 10 | 181 | 97 | 49 | 48 | null | null |
mnick/hsparse | src/Numeric/Sparse/Vector.hs | bsd-3-clause | (><) :: (Eq a, Num a, DIM n, DIM m) => SparseVector n a -> SparseVector m a -> SparseMatrix n m a
x >< y = outer x y | 116 | (><) :: (Eq a, Num a, DIM n, DIM m) => SparseVector n a -> SparseVector m a -> SparseMatrix n m a
x >< y = outer x y | 116 | x >< y = outer x y | 18 | false | true | 0 | 10 | 29 | 76 | 37 | 39 | null | null |
kmate/HaRe | old/refactorer/RefacMerge.hs | bsd-3-clause | tidyLetClauses _ False _ = error "The types between the functions to be fused to do match. Please change the types first so that the arguments can converge." | 157 | tidyLetClauses _ False _ = error "The types between the functions to be fused to do match. Please change the types first so that the arguments can converge." | 157 | tidyLetClauses _ False _ = error "The types between the functions to be fused to do match. Please change the types first so that the arguments can converge." | 157 | false | false | 0 | 5 | 27 | 16 | 7 | 9 | null | null |
spechub/Hets | ExtModal/Ship.hs | gpl-2.0 | monitor :: CharParser st Monitor
monitor = do
skipKey "monitor"
h <- header
mc <- optionMaybe $ char '"' >> many (noneOf "\n\"") << skipChar '"'
f <- foltl
return $ Monitor h mc f | 189 | monitor :: CharParser st Monitor
monitor = do
skipKey "monitor"
h <- header
mc <- optionMaybe $ char '"' >> many (noneOf "\n\"") << skipChar '"'
f <- foltl
return $ Monitor h mc f | 189 | monitor = do
skipKey "monitor"
h <- header
mc <- optionMaybe $ char '"' >> many (noneOf "\n\"") << skipChar '"'
f <- foltl
return $ Monitor h mc f | 156 | false | true | 0 | 12 | 44 | 84 | 37 | 47 | null | null |
FranklinChen/hugs98-plus-Sep2006 | packages/GLUT/examples/RedBook/ShadowMap.hs | bsd-3-clause | makeState :: IO State
makeState = do
a <- newIORef 0
t <- newIORef 0
s <- newIORef False
n <- newIORef True
f <- newIORef Lequal
return $ State { angle = a, torusAngle = t, showShadow = s,
animate = n, funcMode = f } | 254 | makeState :: IO State
makeState = do
a <- newIORef 0
t <- newIORef 0
s <- newIORef False
n <- newIORef True
f <- newIORef Lequal
return $ State { angle = a, torusAngle = t, showShadow = s,
animate = n, funcMode = f } | 254 | makeState = do
a <- newIORef 0
t <- newIORef 0
s <- newIORef False
n <- newIORef True
f <- newIORef Lequal
return $ State { angle = a, torusAngle = t, showShadow = s,
animate = n, funcMode = f } | 232 | false | true | 0 | 9 | 84 | 103 | 51 | 52 | null | null |
rubik/stack | src/Stack/Nix.hs | bsd-3-clause | -- | Command-line argument for "nix"
nixCmdName :: String
nixCmdName = "nix" | 76 | nixCmdName :: String
nixCmdName = "nix" | 39 | nixCmdName = "nix" | 18 | true | true | 0 | 4 | 11 | 12 | 7 | 5 | null | null |
alphaHeavy/cabal | cabal-install/Distribution/Client/Init.hs | bsd-3-clause | getHomepage :: InitFlags -> IO InitFlags
getHomepage flags = do
hp <- queryHomepage
hp' <- return (flagToMaybe $ homepage flags)
?>> maybePrompt flags (promptStr "Project homepage URL" hp)
?>> return hp
return $ flags { homepage = maybeToFlag hp' }
-- | Right now this does nothing, but it could be changed to do some
-- intelligent guessing. | 375 | getHomepage :: InitFlags -> IO InitFlags
getHomepage flags = do
hp <- queryHomepage
hp' <- return (flagToMaybe $ homepage flags)
?>> maybePrompt flags (promptStr "Project homepage URL" hp)
?>> return hp
return $ flags { homepage = maybeToFlag hp' }
-- | Right now this does nothing, but it could be changed to do some
-- intelligent guessing. | 375 | getHomepage flags = do
hp <- queryHomepage
hp' <- return (flagToMaybe $ homepage flags)
?>> maybePrompt flags (promptStr "Project homepage URL" hp)
?>> return hp
return $ flags { homepage = maybeToFlag hp' }
-- | Right now this does nothing, but it could be changed to do some
-- intelligent guessing. | 334 | false | true | 0 | 13 | 90 | 96 | 45 | 51 | null | null |
AubreyEAnderson/shellcheck | ShellCheck/Analytics.hs | gpl-3.0 | prop_subshellAssignmentCheck6 = verifyTree subshellAssignmentCheck "( export lol=$(ls); ); echo $lol;" | 105 | prop_subshellAssignmentCheck6 = verifyTree subshellAssignmentCheck "( export lol=$(ls); ); echo $lol;" | 105 | prop_subshellAssignmentCheck6 = verifyTree subshellAssignmentCheck "( export lol=$(ls); ); echo $lol;" | 105 | false | false | 0 | 5 | 12 | 11 | 5 | 6 | null | null |
Numberartificial/workflow | haskell-first-principles/haskell-programming-from-first-principles-master/src/Chapter5.hs | mit | {-
3.
a = (+)
b = 5
c = b 10
d = c 200
=> won't compile
-}
a :: Num a => a -> a -> a
a = (+) | 94 | a :: Num a => a -> a -> a
a = (+) | 33 | a = (+) | 7 | true | true | 0 | 9 | 34 | 36 | 17 | 19 | null | null |
beni55/hs-monte-carlo | lib/Control/Monad/MC/Walker.hs | bsd-3-clause | -- Scale the probabilities in the table so that the lth entry
-- stores q[l] + l instead of q[l]. This helps when we are sampling
-- from the table.
scaleTable :: STTable s -> ST s ()
scaleTable qjs = let
n = MV.length qjs in
forM_ [ 0..(n-1) ] $ \l -> do
(ql, jl) <- MV.unsafeRead qjs l
MV.unsafeWrite qjs l ((ql + fromIntegral l), jl) | 361 | scaleTable :: STTable s -> ST s ()
scaleTable qjs = let
n = MV.length qjs in
forM_ [ 0..(n-1) ] $ \l -> do
(ql, jl) <- MV.unsafeRead qjs l
MV.unsafeWrite qjs l ((ql + fromIntegral l), jl) | 211 | scaleTable qjs = let
n = MV.length qjs in
forM_ [ 0..(n-1) ] $ \l -> do
(ql, jl) <- MV.unsafeRead qjs l
MV.unsafeWrite qjs l ((ql + fromIntegral l), jl) | 176 | true | true | 0 | 14 | 93 | 124 | 61 | 63 | null | null |
brendanhay/gogol | gogol-cloudsearch/gen/Network/Google/CloudSearch/Types/Product.hs | mpl-2.0 | rdlFields :: Lens' ResultDisplayLine [ResultDisplayField]
rdlFields
= lens _rdlFields (\ s a -> s{_rdlFields = a}) .
_Default
. _Coerce | 149 | rdlFields :: Lens' ResultDisplayLine [ResultDisplayField]
rdlFields
= lens _rdlFields (\ s a -> s{_rdlFields = a}) .
_Default
. _Coerce | 149 | rdlFields
= lens _rdlFields (\ s a -> s{_rdlFields = a}) .
_Default
. _Coerce | 91 | false | true | 2 | 9 | 33 | 57 | 27 | 30 | null | null |
natepisarski/tutpi-sources | haskell-versus-lisp/quicksort.hs | bsd-3-clause | :: (Num a, Ord a) => [a] -> [a]
qsort [] = [] | 45 | :: (Num a, Ord a) => [a] -> [a]
qsort [] = [] | 45 | :: (Num a, Ord a) => [a] -> [a]
qsort [] = [] | 45 | false | false | 0 | 9 | 12 | 46 | 23 | 23 | null | null |
randen/cabal | cabal-install/Distribution/Client/SetupWrapper.hs | bsd-3-clause | determineSetupMethod :: SetupScriptOptions -> BuildType -> SetupMethod
determineSetupMethod options buildType'
-- This order is picked so that it's stable. The build type and
-- required cabal version are external info, coming from .cabal
-- files and the command line. Those do switch between the
-- external and self & internal methods, but that info itself can
-- be considered stable. The logging and force-external conditions
-- are internally generated choices but now these only switch
-- between the self and internal setup methods, which are
-- consistent with each other.
| buildType' == Custom = externalSetupMethod
| not (cabalVersion `withinRange`
useCabalVersion options) = externalSetupMethod
| isJust (useLoggingHandle options)
-- Forcing is done to use an external process e.g. due to parallel
-- build concerns.
|| forceExternalSetupMethod options = selfExecSetupMethod
| otherwise = internalSetupMethod | 1,017 | determineSetupMethod :: SetupScriptOptions -> BuildType -> SetupMethod
determineSetupMethod options buildType'
-- This order is picked so that it's stable. The build type and
-- required cabal version are external info, coming from .cabal
-- files and the command line. Those do switch between the
-- external and self & internal methods, but that info itself can
-- be considered stable. The logging and force-external conditions
-- are internally generated choices but now these only switch
-- between the self and internal setup methods, which are
-- consistent with each other.
| buildType' == Custom = externalSetupMethod
| not (cabalVersion `withinRange`
useCabalVersion options) = externalSetupMethod
| isJust (useLoggingHandle options)
-- Forcing is done to use an external process e.g. due to parallel
-- build concerns.
|| forceExternalSetupMethod options = selfExecSetupMethod
| otherwise = internalSetupMethod | 1,017 | determineSetupMethod options buildType'
-- This order is picked so that it's stable. The build type and
-- required cabal version are external info, coming from .cabal
-- files and the command line. Those do switch between the
-- external and self & internal methods, but that info itself can
-- be considered stable. The logging and force-external conditions
-- are internally generated choices but now these only switch
-- between the self and internal setup methods, which are
-- consistent with each other.
| buildType' == Custom = externalSetupMethod
| not (cabalVersion `withinRange`
useCabalVersion options) = externalSetupMethod
| isJust (useLoggingHandle options)
-- Forcing is done to use an external process e.g. due to parallel
-- build concerns.
|| forceExternalSetupMethod options = selfExecSetupMethod
| otherwise = internalSetupMethod | 946 | false | true | 1 | 11 | 228 | 105 | 55 | 50 | null | null |
gs-akhan/haskel-experiments | lambda.hs | mit | {-return all the values whos squre is less than 2000-}
{-Haskell's lazy evaluation kicks in really well. You just have to define a infinite list-}
returnPow2Less2000 :: (Integral a) => [a]
returnPow2Less2000 = takeWhile ( <= 20000) (map ( ^2 ) [1..]) | 252 | returnPow2Less2000 :: (Integral a) => [a]
returnPow2Less2000 = takeWhile ( <= 20000) (map ( ^2 ) [1..]) | 104 | returnPow2Less2000 = takeWhile ( <= 20000) (map ( ^2 ) [1..]) | 62 | true | true | 0 | 8 | 43 | 49 | 29 | 20 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.