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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
akhileshs/stack | src/Stack/Upload.hs | bsd-3-clause | -- | Save the given credentials to the credentials file.
--
-- Since 0.1.0.0
saveCreds :: Config -> HackageCreds -> IO ()
saveCreds config creds = do
fp <- credsFile config
L.writeFile fp $ encode creds
-- | Load the Hackage credentials from the prompt, asking the user to type them
-- in.
--
-- Since 0.1.0.0 | 318 | saveCreds :: Config -> HackageCreds -> IO ()
saveCreds config creds = do
fp <- credsFile config
L.writeFile fp $ encode creds
-- | Load the Hackage credentials from the prompt, asking the user to type them
-- in.
--
-- Since 0.1.0.0 | 241 | saveCreds config creds = do
fp <- credsFile config
L.writeFile fp $ encode creds
-- | Load the Hackage credentials from the prompt, asking the user to type them
-- in.
--
-- Since 0.1.0.0 | 196 | true | true | 0 | 10 | 65 | 66 | 32 | 34 | null | null |
davesque/nagari | Nagari.hs | mit | takeOneIf' :: (Char -> Bool) -> Parser Char
takeOneIf' p = do
x <- char
if p x then return x else fail ""
-- | Builds a parser which will apply itself to a string the given number of
-- times. | 201 | takeOneIf' :: (Char -> Bool) -> Parser Char
takeOneIf' p = do
x <- char
if p x then return x else fail ""
-- | Builds a parser which will apply itself to a string the given number of
-- times. | 201 | takeOneIf' p = do
x <- char
if p x then return x else fail ""
-- | Builds a parser which will apply itself to a string the given number of
-- times. | 157 | false | true | 0 | 9 | 50 | 62 | 29 | 33 | null | null |
phaazon/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/Tokens.hs | bsd-3-clause | gl_QUERY_WAIT :: GLenum
gl_QUERY_WAIT = 0x8E13 | 46 | gl_QUERY_WAIT :: GLenum
gl_QUERY_WAIT = 0x8E13 | 46 | gl_QUERY_WAIT = 0x8E13 | 22 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
MaxDaten/yage | src/Yage/Rendering/Pipeline/Deferred/LightPass.hs | mit | mkGBufferSampler :: YageResource Sampler
mkGBufferSampler = throwWithStack $ do
sampler <- glResource
samplerParameteri sampler GL_TEXTURE_WRAP_S $= GL_CLAMP_TO_EDGE
samplerParameteri sampler GL_TEXTURE_WRAP_T $= GL_CLAMP_TO_EDGE
samplerParameteri sampler GL_TEXTURE_MIN_FILTER $= GL_LINEAR
samplerParameteri s... | 486 | mkGBufferSampler :: YageResource Sampler
mkGBufferSampler = throwWithStack $ do
sampler <- glResource
samplerParameteri sampler GL_TEXTURE_WRAP_S $= GL_CLAMP_TO_EDGE
samplerParameteri sampler GL_TEXTURE_WRAP_T $= GL_CLAMP_TO_EDGE
samplerParameteri sampler GL_TEXTURE_MIN_FILTER $= GL_LINEAR
samplerParameteri s... | 486 | mkGBufferSampler = throwWithStack $ do
sampler <- glResource
samplerParameteri sampler GL_TEXTURE_WRAP_S $= GL_CLAMP_TO_EDGE
samplerParameteri sampler GL_TEXTURE_WRAP_T $= GL_CLAMP_TO_EDGE
samplerParameteri sampler GL_TEXTURE_MIN_FILTER $= GL_LINEAR
samplerParameteri sampler GL_TEXTURE_MAG_FILTER $= GL_LINEAR... | 445 | false | true | 0 | 9 | 56 | 80 | 35 | 45 | null | null |
brendanhay/gogol | gogol-translate/gen/Network/Google/Resource/Language/Translations/List.hs | mpl-2.0 | -- | The language of the source text, set to one of the language codes listed
-- in Language Support. If the source language is not specified, the API
-- will attempt to identify the source language automatically and return it
-- within the response.
tlSource :: Lens' TranslationsList (Maybe Text)
tlSource = lens _tlSo... | 352 | tlSource :: Lens' TranslationsList (Maybe Text)
tlSource = lens _tlSource (\ s a -> s{_tlSource = a}) | 101 | tlSource = lens _tlSource (\ s a -> s{_tlSource = a}) | 53 | true | true | 0 | 9 | 61 | 49 | 28 | 21 | null | null |
DimaSamoz/mezzo | test/CompTestsCompile.hs | mit | scMAAs = test $ a_ sn :|: as_ qn' | 33 | scMAAs = test $ a_ sn :|: as_ qn' | 33 | scMAAs = test $ a_ sn :|: as_ qn' | 33 | false | false | 0 | 7 | 8 | 20 | 9 | 11 | null | null |
HJvT/com | System/Win32/Com/Exception.hs | bsd-3-clause | cAT_E_LAST :: HRESULT
cAT_E_LAST = word32ToInt32 (0x80040161 ::Word32) | 70 | cAT_E_LAST :: HRESULT
cAT_E_LAST = word32ToInt32 (0x80040161 ::Word32) | 70 | cAT_E_LAST = word32ToInt32 (0x80040161 ::Word32) | 48 | false | true | 0 | 6 | 7 | 26 | 12 | 14 | null | null |
robdockins/edison | edison-core/src/Data/Edison/Coll/EnumSet.hs | mit | partitionLT_GT :: (Ord a, Enum a) => a -> Set a -> (Set a, Set a)
partitionLT_GT x s = (filterLT x s,filterGT x s) | 114 | partitionLT_GT :: (Ord a, Enum a) => a -> Set a -> (Set a, Set a)
partitionLT_GT x s = (filterLT x s,filterGT x s) | 114 | partitionLT_GT x s = (filterLT x s,filterGT x s) | 48 | false | true | 0 | 9 | 24 | 70 | 35 | 35 | null | null |
meiersi/bytestring-builder | tests/FusionProperties.hs | bsd-3-clause | prop_noacc_up_lazy = eq4
(\g h i -> L.foldl g (0::W) . (L.map h . L.filter i))
(\g h i -> P.foldl g (0::W) . (P.map h . P.filter i)) | 140 | prop_noacc_up_lazy = eq4
(\g h i -> L.foldl g (0::W) . (L.map h . L.filter i))
(\g h i -> P.foldl g (0::W) . (P.map h . P.filter i)) | 140 | prop_noacc_up_lazy = eq4
(\g h i -> L.foldl g (0::W) . (L.map h . L.filter i))
(\g h i -> P.foldl g (0::W) . (P.map h . P.filter i)) | 140 | false | false | 0 | 12 | 36 | 103 | 53 | 50 | null | null |
jean-lopes/grafos | src/Algoritmos/Kruskal.hs | mit | g2 = Graph
{ vertices = "ABCDEFGHIJLM"
, edges =
[ Edge 'A' 'B' 4
, Edge 'A' 'M' 7
, Edge 'A' 'I' 4
, Edge 'B' 'C' 4
, Edge 'B' 'L' 8
, Edge 'C' 'D' 3
, Edge 'C' 'M' 6
, Edge 'D' 'E' 1
, Edge 'D' 'L' 2
, Edge 'E' 'F' 3
, Ed... | 498 | g2 = Graph
{ vertices = "ABCDEFGHIJLM"
, edges =
[ Edge 'A' 'B' 4
, Edge 'A' 'M' 7
, Edge 'A' 'I' 4
, Edge 'B' 'C' 4
, Edge 'B' 'L' 8
, Edge 'C' 'D' 3
, Edge 'C' 'M' 6
, Edge 'D' 'E' 1
, Edge 'D' 'L' 2
, Edge 'E' 'F' 3
, Ed... | 498 | g2 = Graph
{ vertices = "ABCDEFGHIJLM"
, edges =
[ Edge 'A' 'B' 4
, Edge 'A' 'M' 7
, Edge 'A' 'I' 4
, Edge 'B' 'C' 4
, Edge 'B' 'L' 8
, Edge 'C' 'D' 3
, Edge 'C' 'M' 6
, Edge 'D' 'E' 1
, Edge 'D' 'L' 2
, Edge 'E' 'F' 3
, Ed... | 498 | false | false | 1 | 9 | 253 | 197 | 98 | 99 | null | null |
joelwilliamson/jcc | Parser/Language.hs | gpl-3.0 | initializerList = liftM InitializerList
$ flip sepBy comma
$ liftM2 (,) (optionMaybe designation) initializer | 145 | initializerList = liftM InitializerList
$ flip sepBy comma
$ liftM2 (,) (optionMaybe designation) initializer | 145 | initializerList = liftM InitializerList
$ flip sepBy comma
$ liftM2 (,) (optionMaybe designation) initializer | 145 | false | false | 0 | 8 | 49 | 38 | 18 | 20 | null | null |
pikajude/melvin | src/Melvin.hs | mit | runClient :: ClientT m => Handle -> m (Either SomeException ())
runClient h = do
mt <- myThreadId
ct <- use M.clientThreadId
putMVar ct mt
try $ Client.loop h | 174 | runClient :: ClientT m => Handle -> m (Either SomeException ())
runClient h = do
mt <- myThreadId
ct <- use M.clientThreadId
putMVar ct mt
try $ Client.loop h | 174 | runClient h = do
mt <- myThreadId
ct <- use M.clientThreadId
putMVar ct mt
try $ Client.loop h | 110 | false | true | 0 | 10 | 44 | 77 | 34 | 43 | null | null |
phadej/stack | src/Stack/Init.hs | bsd-3-clause | -- | Generate stack.yaml
initProject
:: ( MonadBaseControl IO m, MonadIO m, MonadLogger m, MonadMask m
, MonadReader env m, HasConfig env , HasGHCVariant env
, HasHttpManager env , HasLogLevel env , HasReExec env
, HasTerminal env)
=> Path Abs Dir
-> InitOpts
-> Maybe AbstractResolv... | 5,138 | initProject
:: ( MonadBaseControl IO m, MonadIO m, MonadLogger m, MonadMask m
, MonadReader env m, HasConfig env , HasGHCVariant env
, HasHttpManager env , HasLogLevel env , HasReExec env
, HasTerminal env)
=> Path Abs Dir
-> InitOpts
-> Maybe AbstractResolver
-> m ()
initProjec... | 5,113 | initProject currDir initOpts mresolver = do
let dest = currDir </> stackDotYaml
reldest <- toFilePath `liftM` makeRelativeToCurrentDir dest
exists <- doesFileExist dest
when (not (forceOverwrite initOpts) && exists) $ do
error ("Stack configuration file " <> reldest <>
" exists,... | 4,803 | true | true | 15 | 18 | 1,783 | 1,151 | 567 | 584 | null | null |
sherwoodwang/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs | lgpl-2.1 | wxQUANTIZE_FILL_DESTINATION_IMAGE :: Int
wxQUANTIZE_FILL_DESTINATION_IMAGE = 4 | 78 | wxQUANTIZE_FILL_DESTINATION_IMAGE :: Int
wxQUANTIZE_FILL_DESTINATION_IMAGE = 4 | 78 | wxQUANTIZE_FILL_DESTINATION_IMAGE = 4 | 37 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
brendanhay/gogol | gogol-appengine/gen/Network/Google/Resource/AppEngine/Apps/Locations/Get.hs | mpl-2.0 | -- | JSONP
algCallback :: Lens' AppsLocationsGet (Maybe Text)
algCallback
= lens _algCallback (\ s a -> s{_algCallback = a}) | 126 | algCallback :: Lens' AppsLocationsGet (Maybe Text)
algCallback
= lens _algCallback (\ s a -> s{_algCallback = a}) | 115 | algCallback
= lens _algCallback (\ s a -> s{_algCallback = a}) | 64 | true | true | 0 | 9 | 21 | 48 | 25 | 23 | null | null |
nickbart1980/pandoc-citeproc | pandoc-citeproc.hs | bsd-3-clause | findWarnings :: Inline -> [String]
findWarnings (Span (_,["citeproc-not-found"],[("data-reference-id",ref)]) _) =
["pandoc-citeproc: reference " ++ ref ++ " not found" | ref /= "*"] | 183 | findWarnings :: Inline -> [String]
findWarnings (Span (_,["citeproc-not-found"],[("data-reference-id",ref)]) _) =
["pandoc-citeproc: reference " ++ ref ++ " not found" | ref /= "*"] | 183 | findWarnings (Span (_,["citeproc-not-found"],[("data-reference-id",ref)]) _) =
["pandoc-citeproc: reference " ++ ref ++ " not found" | ref /= "*"] | 148 | false | true | 0 | 9 | 24 | 73 | 40 | 33 | null | null |
TimLuq/transmissionbt-rpc | src/Network/BitTorrent/Transmission/Test.hs | mit | details'' :: (TorrentFieldsContainer t) => t -> IO ()
details'' x' = do
let x = torrentFields x'
putStr ">> "
case lookupTorrentField TorrentHashString x of
Nothing -> putStr " "
Just xh -> T.putStr xh
putStr " "
case lookupTorrentField TorrentName x of
Nothing... | 958 | details'' :: (TorrentFieldsContainer t) => t -> IO ()
details'' x' = do
let x = torrentFields x'
putStr ">> "
case lookupTorrentField TorrentHashString x of
Nothing -> putStr " "
Just xh -> T.putStr xh
putStr " "
case lookupTorrentField TorrentName x of
Nothing... | 958 | details'' x' = do
let x = torrentFields x'
putStr ">> "
case lookupTorrentField TorrentHashString x of
Nothing -> putStr " "
Just xh -> T.putStr xh
putStr " "
case lookupTorrentField TorrentName x of
Nothing -> putStrLn "(no name)"
Just xn -> putStrLn $ show... | 904 | false | true | 8 | 22 | 313 | 383 | 182 | 201 | null | null |
tomjaguarpaw/postgresql-simple | src/Database/PostgreSQL/Simple/Time/Implementation.hs | bsd-3-clause | parseDate :: B.ByteString -> Either String Date
parseDate = A.parseOnly (getDate <* A.endOfInput) | 97 | parseDate :: B.ByteString -> Either String Date
parseDate = A.parseOnly (getDate <* A.endOfInput) | 97 | parseDate = A.parseOnly (getDate <* A.endOfInput) | 49 | false | true | 0 | 8 | 12 | 36 | 18 | 18 | null | null |
sampou-org/pfad | Code/Code20.hs | bsd-3-clause | mkExprs1 :: [Int] -> [(Expr, Int)]
mkExprs1 [x] = [(Num x, x)] | 71 | mkExprs1 :: [Int] -> [(Expr, Int)]
mkExprs1 [x] = [(Num x, x)] | 71 | mkExprs1 [x] = [(Num x, x)] | 30 | false | true | 0 | 9 | 20 | 51 | 27 | 24 | null | null |
pseudonom/persistent | persistent/Database/Persist/Sql/Class.hs | mit | extractMaybe :: Maybe a -> a
extractMaybe = fromMaybe (error "Database.Persist.GenericSql.extractMaybe") | 104 | extractMaybe :: Maybe a -> a
extractMaybe = fromMaybe (error "Database.Persist.GenericSql.extractMaybe") | 104 | extractMaybe = fromMaybe (error "Database.Persist.GenericSql.extractMaybe") | 75 | false | true | 0 | 7 | 10 | 27 | 13 | 14 | null | null |
spechub/Hets | GMP/GMP-CoLoSS/GMP/Parser.hs | gpl-2.0 | -- | Parser which translates all implications in disjunctions & conjunctions
implFormula :: (SigFeature a b c) => a (b c) -> ModalOperator ->
Parser (Formula (a (b c)) )
implFormula sig flag = do
f <- orFormula sig flag
option f (do string "->"
spaces
... | 818 | implFormula :: (SigFeature a b c) => a (b c) -> ModalOperator ->
Parser (Formula (a (b c)) )
implFormula sig flag = do
f <- orFormula sig flag
option f (do string "->"
spaces
i <- implFormula sig flag
return $ Or (Neg f) i
... | 741 | implFormula sig flag = do
f <- orFormula sig flag
option f (do string "->"
spaces
i <- implFormula sig flag
return $ Or (Neg f) i
<|> do try (string "<->")
spaces
i <- implFormula sig flag
return $ An... | 611 | true | true | 0 | 20 | 349 | 256 | 116 | 140 | null | null |
rudymatela/llcheck | src/Test/LeanCheck/Utils/Types.hs | bsd-3-clause | fInt2 :: (Int->Int) -> (Int2->Int2) ; fInt2 = fNewtype int2 unInt2 | 71 | fInt2 :: (Int->Int) -> (Int2->Int2)
fInt2 = fNewtype int2 unInt2 | 67 | fInt2 = fNewtype int2 unInt2 | 30 | false | true | 0 | 7 | 15 | 38 | 20 | 18 | null | null |
clample/lamdabtc | backend/src/Protocol/Server.hs | bsd-3-clause | handleResponse' (Message (HeadersMessageBody (HeadersMessage headers)) _) = do
handleNewHeaders headers
getDataMerkleBlock headers -- request merkle blocks to look for our utxos | 181 | handleResponse' (Message (HeadersMessageBody (HeadersMessage headers)) _) = do
handleNewHeaders headers
getDataMerkleBlock headers -- request merkle blocks to look for our utxos | 181 | handleResponse' (Message (HeadersMessageBody (HeadersMessage headers)) _) = do
handleNewHeaders headers
getDataMerkleBlock headers -- request merkle blocks to look for our utxos | 181 | false | false | 0 | 11 | 24 | 42 | 19 | 23 | null | null |
liyanchang/scheme-in-haskell | src/chp7.hs | mit | eval env badForm = throwError $ BadSpecialForm "Unrecognized special form" badForm | 82 | eval env badForm = throwError $ BadSpecialForm "Unrecognized special form" badForm | 82 | eval env badForm = throwError $ BadSpecialForm "Unrecognized special form" badForm | 82 | false | false | 0 | 6 | 10 | 20 | 9 | 11 | null | null |
emilaxelsson/feldspar-synch | tests/Laws.hs | bsd-3-clause | --------------------------------------------------------------------------------
-- Proof of applicative laws for `System`
--------------------------------------------------------------------------------
-- identity: pure id <*> v = v
appLaw1 :: Monad m => System m a -> [System m a]
appLaw1 v@(System v') =
[ pure id... | 621 | appLaw1 :: Monad m => System m a -> [System m a]
appLaw1 v@(System v') =
[ pure id <*> v
, System (return (return id)) <*> (System v')
, System $ do
nextf <- return (return id)
nexta <- v'
return $ nextf <*> nexta
, System $ do
nexta <- v'
return $ return id <*> nexta
, System $ ... | 385 | appLaw1 v@(System v') =
[ pure id <*> v
, System (return (return id)) <*> (System v')
, System $ do
nextf <- return (return id)
nexta <- v'
return $ nextf <*> nexta
, System $ do
nexta <- v'
return $ return id <*> nexta
, System $ do
nexta <- v'
return $ nexta
, Sys... | 336 | true | true | 0 | 12 | 150 | 188 | 93 | 95 | null | null |
Proclivis/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs | lgpl-2.1 | wxSTC_CMD_DOCUMENTENDEXTEND :: Int
wxSTC_CMD_DOCUMENTENDEXTEND = 2319 | 69 | wxSTC_CMD_DOCUMENTENDEXTEND :: Int
wxSTC_CMD_DOCUMENTENDEXTEND = 2319 | 69 | wxSTC_CMD_DOCUMENTENDEXTEND = 2319 | 34 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
GRACeFUL-project/haskelzinc | src/Interfaces/MZBuiltIns.hs | bsd-3-clause | mz_index_set_1of3 = prefCall "index_set_1of3" | 45 | mz_index_set_1of3 = prefCall "index_set_1of3" | 45 | mz_index_set_1of3 = prefCall "index_set_1of3" | 45 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
susoDominguez/eNominalTerms-Alpha | TrmX_Actions.hs | unlicense | atmsRl (fc,l,r) = atmsTrmCtx (fc, TplTrm [l,r]) | 47 | atmsRl (fc,l,r) = atmsTrmCtx (fc, TplTrm [l,r]) | 47 | atmsRl (fc,l,r) = atmsTrmCtx (fc, TplTrm [l,r]) | 47 | false | false | 0 | 8 | 6 | 36 | 20 | 16 | null | null |
SRechenberger/grammata | src/Grammata/Machine/Core/Types.hs | gpl-3.0 | Struct sa na asa =:= Struct sb nb asb = do
let simple = sa == sb && na == nb
complex <- and <$> mapM (\(a,b) -> a =:= b) (asa `zip` asb)
return $ simple && complex | 189 | Struct sa na asa =:= Struct sb nb asb = do
let simple = sa == sb && na == nb
complex <- and <$> mapM (\(a,b) -> a =:= b) (asa `zip` asb)
return $ simple && complex | 189 | Struct sa na asa =:= Struct sb nb asb = do
let simple = sa == sb && na == nb
complex <- and <$> mapM (\(a,b) -> a =:= b) (asa `zip` asb)
return $ simple && complex | 189 | false | false | 0 | 12 | 64 | 101 | 50 | 51 | null | null |
forsyde/forsyde-atom | src/ForSyDe/Atom/MoC/SDF/Core.hs | bsd-3-clause | scen43 (c,p,f) = ctxt43 c p f | 29 | scen43 (c,p,f) = ctxt43 c p f | 29 | scen43 (c,p,f) = ctxt43 c p f | 29 | false | false | 0 | 6 | 6 | 25 | 13 | 12 | null | null |
ezyang/hoopl | testing/EvalMonad.hs | bsd-3-clause | runProg :: [Proc] -> [v] -> EvalM v x -> ErrorM (State v, x)
runProg procs vs (EvalM f) =
case f init_state of
Left (_, e) -> throwError e
Right x -> return x
where
init_state = State { frames = [], heap = M.empty, events = [],
vsupply = vs, procs = procMap }
procMap = ... | 359 | runProg :: [Proc] -> [v] -> EvalM v x -> ErrorM (State v, x)
runProg procs vs (EvalM f) =
case f init_state of
Left (_, e) -> throwError e
Right x -> return x
where
init_state = State { frames = [], heap = M.empty, events = [],
vsupply = vs, procs = procMap }
procMap = ... | 359 | runProg procs vs (EvalM f) =
case f init_state of
Left (_, e) -> throwError e
Right x -> return x
where
init_state = State { frames = [], heap = M.empty, events = [],
vsupply = vs, procs = procMap }
procMap = M.fromList $ zip (map name procs) procs | 298 | false | true | 2 | 11 | 114 | 176 | 88 | 88 | null | null |
xnning/fcore | lib/OptiUtils.hs | bsd-2-clause | joinExpr (Tuple es) = Tuple (map joinExpr es) | 45 | joinExpr (Tuple es) = Tuple (map joinExpr es) | 45 | joinExpr (Tuple es) = Tuple (map joinExpr es) | 45 | false | false | 0 | 7 | 7 | 26 | 12 | 14 | null | null |
nushio3/ghc | compiler/coreSyn/MkCore.hs | bsd-3-clause | -- | Make a core tuple of the given boxity
mkCoreTupBoxity :: Boxity -> [CoreExpr] -> CoreExpr
mkCoreTupBoxity Boxed exps = mkCoreTup exps | 140 | mkCoreTupBoxity :: Boxity -> [CoreExpr] -> CoreExpr
mkCoreTupBoxity Boxed exps = mkCoreTup exps | 97 | mkCoreTupBoxity Boxed exps = mkCoreTup exps | 45 | true | true | 0 | 7 | 24 | 31 | 16 | 15 | null | null |
hpacheco/HAAP | examples/plab/svn/2017li1g186/src/RunT1.hs | mit | main = do
args <- getArgs
case args of
["constroi"] -> do
str <- getContents
let caminho = readMaybe str
case caminho of
Nothing -> error "caminho invalido"
Just c -> print $ T1.constroi c
["testes"] -> print $ T1.testesT1
... | 370 | main = do
args <- getArgs
case args of
["constroi"] -> do
str <- getContents
let caminho = readMaybe str
case caminho of
Nothing -> error "caminho invalido"
Just c -> print $ T1.constroi c
["testes"] -> print $ T1.testesT1
... | 370 | main = do
args <- getArgs
case args of
["constroi"] -> do
str <- getContents
let caminho = readMaybe str
case caminho of
Nothing -> error "caminho invalido"
Just c -> print $ T1.constroi c
["testes"] -> print $ T1.testesT1
... | 370 | false | false | 1 | 18 | 145 | 110 | 49 | 61 | null | null |
emhoracek/smooch | app/src/Dolls/View.hs | gpl-3.0 | celImageSplice :: FilePath -> KissCel -> Substitutions Ctxt
celImageSplice dir cel =
subs [("cel-name", textFill $ T.pack $ celName cel)
,("pal-num", textFill $ T.pack $ show $ celPalette cel)
,("dir", textFill $ T.pack dir <> "/palette" <> T.pack (show $ celPalette cel))] | 289 | celImageSplice :: FilePath -> KissCel -> Substitutions Ctxt
celImageSplice dir cel =
subs [("cel-name", textFill $ T.pack $ celName cel)
,("pal-num", textFill $ T.pack $ show $ celPalette cel)
,("dir", textFill $ T.pack dir <> "/palette" <> T.pack (show $ celPalette cel))] | 289 | celImageSplice dir cel =
subs [("cel-name", textFill $ T.pack $ celName cel)
,("pal-num", textFill $ T.pack $ show $ celPalette cel)
,("dir", textFill $ T.pack dir <> "/palette" <> T.pack (show $ celPalette cel))] | 229 | false | true | 0 | 12 | 57 | 124 | 62 | 62 | null | null |
np/lens | src/Control/Lens/Prism.hs | bsd-3-clause | ------------------------------------------------------------------------------
-- Prism Combinators
------------------------------------------------------------------------------
-- | Build a 'Control.Lens.Prism.Prism'.
--
-- @'Either' t a@ is used instead of @'Maybe' a@ to permit the types of @s@ and @t@ to differ.
p... | 422 | prism :: (b -> t) -> (s -> Either t a) -> Prism s t a b
prism bt seta = prismatic seta . rmap (fmap bt) | 103 | prism bt seta = prismatic seta . rmap (fmap bt) | 47 | true | true | 0 | 9 | 58 | 74 | 39 | 35 | null | null |
RossMeikleham/Idris-dev | src/Idris/AbsSyntaxTree.hs | bsd-3-clause | inferDecl = PDatadecl inferTy NoFC
(PType bi)
[(emptyDocstring, [], inferCon, NoFC, PPi impl (sMN 0 "iType") NoFC (PType bi) (
PPi expl (sMN 0 "ival") NoFC (PRef bi [] (sMN 0 "iType"))
... | 362 | inferDecl = PDatadecl inferTy NoFC
(PType bi)
[(emptyDocstring, [], inferCon, NoFC, PPi impl (sMN 0 "iType") NoFC (PType bi) (
PPi expl (sMN 0 "ival") NoFC (PRef bi [] (sMN 0 "iType"))
... | 362 | inferDecl = PDatadecl inferTy NoFC
(PType bi)
[(emptyDocstring, [], inferCon, NoFC, PPi impl (sMN 0 "iType") NoFC (PType bi) (
PPi expl (sMN 0 "ival") NoFC (PRef bi [] (sMN 0 "iType"))
... | 362 | false | false | 0 | 14 | 183 | 128 | 67 | 61 | null | null |
DavidAlphaFox/ghc | libraries/Cabal/cabal-install/Distribution/Client/Upload.hs | bsd-3-clause | mkFormData :: FilePath -> ByteString -> [BodyPart]
mkFormData path pkg =
-- yes, web browsers are that stupid (re quoting)
[BodyPart [Header hdrContentDisposition $
"form-data; name=package; filename=\""++takeFileName path++"\"",
Header HdrContentType "application/x-gzip"]
pkg] | 311 | mkFormData :: FilePath -> ByteString -> [BodyPart]
mkFormData path pkg =
-- yes, web browsers are that stupid (re quoting)
[BodyPart [Header hdrContentDisposition $
"form-data; name=package; filename=\""++takeFileName path++"\"",
Header HdrContentType "application/x-gzip"]
pkg] | 311 | mkFormData path pkg =
-- yes, web browsers are that stupid (re quoting)
[BodyPart [Header hdrContentDisposition $
"form-data; name=package; filename=\""++takeFileName path++"\"",
Header HdrContentType "application/x-gzip"]
pkg] | 260 | false | true | 0 | 12 | 64 | 70 | 34 | 36 | null | null |
fmapfmapfmap/amazonka | amazonka-cloudsearch/gen/Network/AWS/CloudSearch/Types/Product.hs | mpl-2.0 | -- | Undocumented member.
spsOptions :: Lens' ScalingParametersStatus ScalingParameters
spsOptions = lens _spsOptions (\ s a -> s{_spsOptions = a}) | 147 | spsOptions :: Lens' ScalingParametersStatus ScalingParameters
spsOptions = lens _spsOptions (\ s a -> s{_spsOptions = a}) | 121 | spsOptions = lens _spsOptions (\ s a -> s{_spsOptions = a}) | 59 | true | true | 0 | 9 | 19 | 40 | 22 | 18 | null | null |
sopvop/cabal | cabal-install/Distribution/Client/ProjectPlanning/Types.hs | bsd-3-clause | elabSetupDependencies ElaboratedConfiguredPackage { elabPkgOrComp = ElabComponent comp }
= compSetupDependencies comp | 121 | elabSetupDependencies ElaboratedConfiguredPackage { elabPkgOrComp = ElabComponent comp }
= compSetupDependencies comp | 121 | elabSetupDependencies ElaboratedConfiguredPackage { elabPkgOrComp = ElabComponent comp }
= compSetupDependencies comp | 121 | false | false | 0 | 9 | 14 | 24 | 11 | 13 | null | null |
VictorDenisov/ldap-client | src/Ldap/Asn1/ToAsn1.hs | bsd-2-clause | sequence :: Mod -> Ber -> Ber
sequence m = tagged (tag 0x10 <> m) | 65 | sequence :: Mod -> Ber -> Ber
sequence m = tagged (tag 0x10 <> m) | 65 | sequence m = tagged (tag 0x10 <> m) | 35 | false | true | 0 | 8 | 14 | 35 | 17 | 18 | null | null |
noughtmare/yi | yi-keymap-vim/src/Yi/Keymap/Vim/Digraph.hs | gpl-2.0 | -- LATIN CAPITAL LETTER E WITH TILDE
switch 'e' '?' = '\x1EBD' | 62 | switch 'e' '?' = '\x1EBD' | 25 | switch 'e' '?' = '\x1EBD' | 25 | true | false | 0 | 5 | 11 | 12 | 6 | 6 | null | null |
ssaavedra/liquidhaskell | src/Language/Haskell/Liquid/Desugar710/HscMain.hs | bsd-3-clause | -- | Throw some errors.
throwErrors :: ErrorMessages -> Hsc a
throwErrors = liftIO . throwIO . mkSrcErr | 103 | throwErrors :: ErrorMessages -> Hsc a
throwErrors = liftIO . throwIO . mkSrcErr | 79 | throwErrors = liftIO . throwIO . mkSrcErr | 41 | true | true | 0 | 6 | 17 | 27 | 14 | 13 | null | null |
SneakingCat/distributed-nonsense | src/Master/Master.hs | apache-2.0 | taskMaster' :: [ProcessId] -> [Int] -> [Int] -> Process ()
taskMaster' [] xs ys = do
-- No processes are available, wait infinitely for one process to
-- show up.
say "Waiting for procs"
ProcessUp processId <- expect
say "Got proc"
taskMaster' [processId] xs ys | 273 | taskMaster' :: [ProcessId] -> [Int] -> [Int] -> Process ()
taskMaster' [] xs ys = do
-- No processes are available, wait infinitely for one process to
-- show up.
say "Waiting for procs"
ProcessUp processId <- expect
say "Got proc"
taskMaster' [processId] xs ys | 273 | taskMaster' [] xs ys = do
-- No processes are available, wait infinitely for one process to
-- show up.
say "Waiting for procs"
ProcessUp processId <- expect
say "Got proc"
taskMaster' [processId] xs ys | 214 | false | true | 0 | 9 | 56 | 83 | 40 | 43 | null | null |
tangboyun/miranda | src/MiRanda/Parameter/BL.hs | gpl-3.0 | treeBin10 :: ByteString
treeBin10 =
"(9598:0.00246,(9544:0.01008,(30611:0.05105,\
\(37347:0.05942,((((10116:0.03062,10090:0.02795):0.07956,\
\10141:0.07477):0.01444,9986:0.06786):0.00813,\
\(((42254:0.072,9365:0.08211):0.01948,(((9615:0.02488,\
\9685:0.03004):0.01452,9796:0.03237):0.00187,\
\991... | 610 | treeBin10 :: ByteString
treeBin10 =
"(9598:0.00246,(9544:0.01008,(30611:0.05105,\
\(37347:0.05942,((((10116:0.03062,10090:0.02795):0.07956,\
\10141:0.07477):0.01444,9986:0.06786):0.00813,\
\(((42254:0.072,9365:0.08211):0.01948,(((9615:0.02488,\
\9685:0.03004):0.01452,9796:0.03237):0.00187,\
\991... | 610 | treeBin10 =
"(9598:0.00246,(9544:0.01008,(30611:0.05105,\
\(37347:0.05942,((((10116:0.03062,10090:0.02795):0.07956,\
\10141:0.07477):0.01444,9986:0.06786):0.00813,\
\(((42254:0.072,9365:0.08211):0.01948,(((9615:0.02488,\
\9685:0.03004):0.01452,9796:0.03237):0.00187,\
\9913:0.05133):0.00192):0.00... | 586 | false | true | 0 | 4 | 54 | 11 | 6 | 5 | null | null |
dino-r/casttex | src/UpdateSvg.hs | mit | updateSVG :: String -> String -> IO ()
updateSVG svgStyle fileName =
do
-- file handle for svg file
handle <- openFile fileName ReadMode
-- get contents of svg file
svgContents <- hGetContents handle
-- open temporary file to store updated results
(tempName, tempHandle) <- openTe... | 678 | updateSVG :: String -> String -> IO ()
updateSVG svgStyle fileName =
do
-- file handle for svg file
handle <- openFile fileName ReadMode
-- get contents of svg file
svgContents <- hGetContents handle
-- open temporary file to store updated results
(tempName, tempHandle) <- openTe... | 678 | updateSVG svgStyle fileName =
do
-- file handle for svg file
handle <- openFile fileName ReadMode
-- get contents of svg file
svgContents <- hGetContents handle
-- open temporary file to store updated results
(tempName, tempHandle) <- openTempFile "." "temp"
-- put the upda... | 639 | false | true | 0 | 9 | 182 | 121 | 54 | 67 | null | null |
Ian-Stewart-Binks/courseography | dependencies/HaXml-1.25.3/src/Text/XML/HaXml/OneOfN.hs | gpl-3.0 | foldOneOf18 a b c d e f g h i j k l m n o p q r (NineOf18 z) = i z | 66 | foldOneOf18 a b c d e f g h i j k l m n o p q r (NineOf18 z) = i z | 66 | foldOneOf18 a b c d e f g h i j k l m n o p q r (NineOf18 z) = i z | 66 | false | false | 0 | 7 | 23 | 54 | 26 | 28 | null | null |
rgoulter/expenses-csv-utils | src/Data/Expenses/Parse/Megaparsec/Document.hs | mit | withFile :: String -> (Model -> IO ()) -> IO ()
withFile inputF f = do
-- Parse the input file to list of [DateDir | ExpDir]
rawResult <- runParser parseExpensesFile inputF <$> readFile inputF
case rawResult of
Left err -> putStrLn $ errorBundlePretty err
Right result -> case modelFromAst result of
... | 427 | withFile :: String -> (Model -> IO ()) -> IO ()
withFile inputF f = do
-- Parse the input file to list of [DateDir | ExpDir]
rawResult <- runParser parseExpensesFile inputF <$> readFile inputF
case rawResult of
Left err -> putStrLn $ errorBundlePretty err
Right result -> case modelFromAst result of
... | 427 | withFile inputF f = do
-- Parse the input file to list of [DateDir | ExpDir]
rawResult <- runParser parseExpensesFile inputF <$> readFile inputF
case rawResult of
Left err -> putStrLn $ errorBundlePretty err
Right result -> case modelFromAst result of
Left errors -> forM_ errors $ putStrL... | 379 | false | true | 0 | 15 | 102 | 132 | 60 | 72 | null | null |
nightscape/platform | editor/src/Editor.hs | mit | advancePath :: Path -> Box Text (Path,Region) -> Term V -> Maybe Path
advancePath p box term =
let
isBlank p = maybe False (== Term.blank) (Paths.atTerm p term)
scanHorizontal _ p | isBlank p = Just p
scanHorizontal radius p = maybe (scanVertical radius p) (scanHorizontal radius) (Doc.right' box p)
sc... | 611 | advancePath :: Path -> Box Text (Path,Region) -> Term V -> Maybe Path
advancePath p box term =
let
isBlank p = maybe False (== Term.blank) (Paths.atTerm p term)
scanHorizontal _ p | isBlank p = Just p
scanHorizontal radius p = maybe (scanVertical radius p) (scanHorizontal radius) (Doc.right' box p)
sc... | 611 | advancePath p box term =
let
isBlank p = maybe False (== Term.blank) (Paths.atTerm p term)
scanHorizontal _ p | isBlank p = Just p
scanHorizontal radius p = maybe (scanVertical radius p) (scanHorizontal radius) (Doc.right' box p)
scanVertical 0 _ = Nothing
scanVertical radius p = scanHorizontal (r... | 541 | false | true | 0 | 12 | 144 | 276 | 134 | 142 | null | null |
badp/ganeti | src/Ganeti/Path.hs | gpl-2.0 | -- | Path to cluster configuration file.
clusterConfFile :: IO FilePath
clusterConfFile = dataDirP "config.data" | 113 | clusterConfFile :: IO FilePath
clusterConfFile = dataDirP "config.data" | 72 | clusterConfFile = dataDirP "config.data" | 41 | true | true | 0 | 5 | 15 | 18 | 9 | 9 | null | null |
jaspervdj/patat | lib/Patat/Presentation/Fragment.hs | gpl-2.0 | fragmentBlock _ block@(Pandoc.DefinitionList {}) = [Append [block]] | 67 | fragmentBlock _ block@(Pandoc.DefinitionList {}) = [Append [block]] | 67 | fragmentBlock _ block@(Pandoc.DefinitionList {}) = [Append [block]] | 67 | false | false | 0 | 9 | 6 | 32 | 17 | 15 | null | null |
mniip/zalgo | test/Test.hs | bsd-3-clause | indexOfSpec :: (forall a. Eq a => [a] -> [a] -> Maybe Int) -> SpecWith ()
indexOfSpec f = do
it "finds a needle in the haystack" $ do
f "[needle]" "hello[needle]world" `shouldBe` Just 5
f "[needle]" "some stuff" `shouldBe` Nothing
it "finds a needle" $
property $ \as bs -> case f (as ::... | 1,659 | indexOfSpec :: (forall a. Eq a => [a] -> [a] -> Maybe Int) -> SpecWith ()
indexOfSpec f = do
it "finds a needle in the haystack" $ do
f "[needle]" "hello[needle]world" `shouldBe` Just 5
f "[needle]" "some stuff" `shouldBe` Nothing
it "finds a needle" $
property $ \as bs -> case f (as ::... | 1,659 | indexOfSpec f = do
it "finds a needle in the haystack" $ do
f "[needle]" "hello[needle]world" `shouldBe` Just 5
f "[needle]" "some stuff" `shouldBe` Nothing
it "finds a needle" $
property $ \as bs -> case f (as :: [Bool]) bs of
Just i -> Data.List.isPrefixOf as $ drop i bs
... | 1,585 | false | true | 0 | 19 | 459 | 557 | 269 | 288 | null | null |
comonoidial/ALFIN | RunTest.hs | mit | lookupFun :: String -> FunTable -> (FunAddr, Maybe NodeElem)
lookupFun f fs = snd $ fromJust $ find (\(q,_) -> ('.':f) `isSuffixOf` show q) fs | 142 | lookupFun :: String -> FunTable -> (FunAddr, Maybe NodeElem)
lookupFun f fs = snd $ fromJust $ find (\(q,_) -> ('.':f) `isSuffixOf` show q) fs | 142 | lookupFun f fs = snd $ fromJust $ find (\(q,_) -> ('.':f) `isSuffixOf` show q) fs | 81 | false | true | 0 | 11 | 24 | 76 | 41 | 35 | null | null |
nevrenato/HetsAlloy | GUI/HTkGenericATP.hs | gpl-2.0 | {- |
Converts a 'ProofStatus' into a ('ProofStatusColour', 'String') tuple to be
displayed by the GUI.
-}
toGuiStatus :: GenericConfig proofTree -- ^ current prover configuration
-> ProofStatus a -- ^ status to convert
-> (ProofStatusColour, String)
toGuiStatus cf st = case goalStatus st of
... | 584 | toGuiStatus :: GenericConfig proofTree -- ^ current prover configuration
-> ProofStatus a -- ^ status to convert
-> (ProofStatusColour, String)
toGuiStatus cf st = case goalStatus st of
Proved c -> if c then statusProved else statusProvedButInconsistent
Disproved -> statusDisproved
_ -> if... | 474 | toGuiStatus cf st = case goalStatus st of
Proved c -> if c then statusProved else statusProvedButInconsistent
Disproved -> statusDisproved
_ -> if timeLimitExceeded cf
then statusOpenTExceeded
else statusOpen
-- | stores widgets of an options frame and the frame itself | 306 | true | true | 4 | 7 | 142 | 88 | 46 | 42 | null | null |
ksaveljev/hake-2 | src/Constants.hs | bsd-3-clause | uSolid = 1 `shiftL` 27 :: Int | 33 | uSolid = 1 `shiftL` 27 :: Int | 33 | uSolid = 1 `shiftL` 27 :: Int | 33 | false | false | 0 | 5 | 10 | 15 | 9 | 6 | null | null |
brendanhay/gogol | gogol-dfareporting/gen/Network/Google/DFAReporting/Types/Product.hs | mpl-2.0 | -- | Account permission collection.
aplrAccountPermissions :: Lens' AccountPermissionsListResponse [AccountPermission]
aplrAccountPermissions
= lens _aplrAccountPermissions
(\ s a -> s{_aplrAccountPermissions = a})
. _Default
. _Coerce | 255 | aplrAccountPermissions :: Lens' AccountPermissionsListResponse [AccountPermission]
aplrAccountPermissions
= lens _aplrAccountPermissions
(\ s a -> s{_aplrAccountPermissions = a})
. _Default
. _Coerce | 219 | aplrAccountPermissions
= lens _aplrAccountPermissions
(\ s a -> s{_aplrAccountPermissions = a})
. _Default
. _Coerce | 136 | true | true | 3 | 8 | 44 | 58 | 28 | 30 | null | null |
shicks/shsh | System/Console/ShSh/Shell.hs | bsd-3-clause | redir _ p (1:>&2) = do eHandle -- this will mess stuff up sometimes?
return (p { p_out = p_err p }, return ()) | 143 | redir _ p (1:>&2) = do eHandle -- this will mess stuff up sometimes?
return (p { p_out = p_err p }, return ()) | 143 | redir _ p (1:>&2) = do eHandle -- this will mess stuff up sometimes?
return (p { p_out = p_err p }, return ()) | 143 | false | false | 1 | 12 | 56 | 56 | 26 | 30 | null | null |
oldmanmike/ghc | compiler/typecheck/TcType.hs | bsd-3-clause | isFunPtrTy :: Type -> Bool
isFunPtrTy ty
| Just (tc, [_]) <- splitTyConApp_maybe ty
= tc `hasKey` funPtrTyConKey
| otherwise
= False | 140 | isFunPtrTy :: Type -> Bool
isFunPtrTy ty
| Just (tc, [_]) <- splitTyConApp_maybe ty
= tc `hasKey` funPtrTyConKey
| otherwise
= False | 140 | isFunPtrTy ty
| Just (tc, [_]) <- splitTyConApp_maybe ty
= tc `hasKey` funPtrTyConKey
| otherwise
= False | 113 | false | true | 0 | 11 | 29 | 68 | 31 | 37 | null | null |
manyoo/reflex-dom | src-ghcjs/Reflex/Dom/Xhr/Foreign.hs | bsd-3-clause | xmlHttpRequestOnerror :: XMLHttpRequest -> EventM XMLHttpRequest XMLHttpRequestProgressEvent () -> IO (IO ())
xmlHttpRequestOnerror = (`on` error) | 146 | xmlHttpRequestOnerror :: XMLHttpRequest -> EventM XMLHttpRequest XMLHttpRequestProgressEvent () -> IO (IO ())
xmlHttpRequestOnerror = (`on` error) | 146 | xmlHttpRequestOnerror = (`on` error) | 36 | false | true | 0 | 11 | 15 | 51 | 25 | 26 | null | null |
phaazon/quaazar | src/Quaazar/Render/GL/Texture.hs | bsd-3-clause | ya8Converter :: PixelYA8 -> [Float]
ya8Converter (PixelYA8 y a) = map ((*imax8) . realToFrac) [y,a] | 99 | ya8Converter :: PixelYA8 -> [Float]
ya8Converter (PixelYA8 y a) = map ((*imax8) . realToFrac) [y,a] | 99 | ya8Converter (PixelYA8 y a) = map ((*imax8) . realToFrac) [y,a] | 63 | false | true | 0 | 8 | 14 | 51 | 28 | 23 | null | null |
balangs/eTeak | src/Bind.hs | bsd-3-clause | -- Check for colliding names
bindPostBinding :: BindPost (Binding Decl)
bindPostBinding (context:cs) (Complete, binding@(Binding _ name namespace _ decl)) = binding'
where
(lowVisible, _) = contextIndexRange context
searchContext = case decl of
ProcDecl {}
... | 1,033 | bindPostBinding :: BindPost (Binding Decl)
bindPostBinding (context:cs) (Complete, binding@(Binding _ name namespace _ decl)) = binding'
where
(lowVisible, _) = contextIndexRange context
searchContext = case decl of
ProcDecl {}
| bindingIndex binding ... | 996 | bindPostBinding (context:cs) (Complete, binding@(Binding _ name namespace _ decl)) = binding'
where
(lowVisible, _) = contextIndexRange context
searchContext = case decl of
ProcDecl {}
| bindingIndex binding == lowVisible -> emptyContext
... | 953 | true | true | 5 | 13 | 337 | 285 | 144 | 141 | null | null |
emmanueltouzery/cigale-timesheet | src/EventProviders/Email.hs | mit | readLine :: Parsec BSL.ByteString st BSL.ByteString
readLine = BL.pack <$> many (noneOf "\r\n") <* eol | 102 | readLine :: Parsec BSL.ByteString st BSL.ByteString
readLine = BL.pack <$> many (noneOf "\r\n") <* eol | 102 | readLine = BL.pack <$> many (noneOf "\r\n") <* eol | 50 | false | true | 2 | 7 | 14 | 48 | 21 | 27 | null | null |
plietar/super-user-spark | src/Parser.hs | mit | getFile :: Parser FilePath
getFile = do
pos <- getPosition
let file = sourceName pos
return file | 108 | getFile :: Parser FilePath
getFile = do
pos <- getPosition
let file = sourceName pos
return file | 108 | getFile = do
pos <- getPosition
let file = sourceName pos
return file | 81 | false | true | 0 | 10 | 28 | 39 | 17 | 22 | null | null |
noteed/sftp-streams | Network/SFTP/Messages.hs | bsd-3-clause | flagModifyTime = 0x00000020 | 27 | flagModifyTime = 0x00000020 | 27 | flagModifyTime = 0x00000020 | 27 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
PhDP/Sphinx-AI | Faun/Predicate.hs | mit | ground :: Predicate -> Bool
ground (Predicate _ ts) = all Term.ground ts | 72 | ground :: Predicate -> Bool
ground (Predicate _ ts) = all Term.ground ts | 72 | ground (Predicate _ ts) = all Term.ground ts | 44 | false | true | 0 | 7 | 12 | 33 | 16 | 17 | null | null |
kawu/skladnica-with-walenty | src/NLP/Skladnica/Walenty.hs | bsd-2-clause | printCatStats :: CatStats -> IO ()
printCatStats catStats = do
putStrLn "length,nodes,edges,waitnodes,waitedges,number"
forM_ (M.toList catStats) $ \(len, atom) -> do
putStr (show len)
putStr ","
printAtomStats atom | 231 | printCatStats :: CatStats -> IO ()
printCatStats catStats = do
putStrLn "length,nodes,edges,waitnodes,waitedges,number"
forM_ (M.toList catStats) $ \(len, atom) -> do
putStr (show len)
putStr ","
printAtomStats atom | 231 | printCatStats catStats = do
putStrLn "length,nodes,edges,waitnodes,waitedges,number"
forM_ (M.toList catStats) $ \(len, atom) -> do
putStr (show len)
putStr ","
printAtomStats atom | 196 | false | true | 0 | 13 | 42 | 82 | 37 | 45 | null | null |
rolph-recto/liquid-fixpoint | src/Language/Fixpoint/Types/Substitutions.hs | bsd-3-clause | appSubst :: Subst -> Symbol -> Expr
appSubst (Su s) x = fromMaybe (EVar x) (M.lookup x s) | 89 | appSubst :: Subst -> Symbol -> Expr
appSubst (Su s) x = fromMaybe (EVar x) (M.lookup x s) | 89 | appSubst (Su s) x = fromMaybe (EVar x) (M.lookup x s) | 53 | false | true | 0 | 10 | 17 | 57 | 26 | 31 | null | null |
urbanslug/ghc | testsuite/tests/driver/dynamic_flags_001/C.hs | bsd-3-clause | c_type_default :: Int
c_type_default = 2 ^ 2 | 44 | c_type_default :: Int
c_type_default = 2 ^ 2 | 44 | c_type_default = 2 ^ 2 | 22 | false | true | 2 | 6 | 7 | 23 | 9 | 14 | null | null |
seereason/ghcjs | src/Gen2/Sinker.hs | mit | foldArgsE :: Fold StgExpr Id
foldArgsE f (StgApp x args) = StgApp <$> f x <*> (traverse . foldArgsA) f args | 118 | foldArgsE :: Fold StgExpr Id
foldArgsE f (StgApp x args) = StgApp <$> f x <*> (traverse . foldArgsA) f args | 118 | foldArgsE f (StgApp x args) = StgApp <$> f x <*> (traverse . foldArgsA) f args | 89 | false | true | 0 | 8 | 31 | 52 | 25 | 27 | null | null |
vladimir-ipatov/ganeti | src/Ganeti/Constants.hs | gpl-2.0 | hvKvmCdromDiskType :: String
hvKvmCdromDiskType = "cdrom_disk_type" | 67 | hvKvmCdromDiskType :: String
hvKvmCdromDiskType = "cdrom_disk_type" | 67 | hvKvmCdromDiskType = "cdrom_disk_type" | 38 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
rahulmutt/ghcvm | compiler/Eta/Utils/UniqDSet.hs | bsd-3-clause | partitionUniqDSet :: (a -> Bool) -> UniqDSet a -> (UniqDSet a, UniqDSet a)
partitionUniqDSet = partitionUDFM | 108 | partitionUniqDSet :: (a -> Bool) -> UniqDSet a -> (UniqDSet a, UniqDSet a)
partitionUniqDSet = partitionUDFM | 108 | partitionUniqDSet = partitionUDFM | 33 | false | true | 0 | 8 | 15 | 41 | 21 | 20 | null | null |
juretta/haskell-jwt | tests/src/Web/JWTTests.hs | mit | case_decodeAndVerifyJWTAlgoNone = do
{-
- Header:
{
"alg": "none",
"typ": "JWT"
}
Payload:
{
"iss": "https://jwt-idp.example.com",
"sub": "mailto:[email protected]",
"nbf": 1425980755,
"e... | 856 | case_decodeAndVerifyJWTAlgoNone = do
{-
- Header:
{
"alg": "none",
"typ": "JWT"
}
Payload:
{
"iss": "https://jwt-idp.example.com",
"sub": "mailto:[email protected]",
"nbf": 1425980755,
"e... | 856 | case_decodeAndVerifyJWTAlgoNone = do
{-
- Header:
{
"alg": "none",
"typ": "JWT"
}
Payload:
{
"iss": "https://jwt-idp.example.com",
"sub": "mailto:[email protected]",
"nbf": 1425980755,
"e... | 856 | false | false | 0 | 12 | 251 | 42 | 20 | 22 | null | null |
andersk/haskell-cgi | Network/CGI/Protocol.hs | bsd-3-clause | formatResponse :: ByteString -> Headers -> ByteString
formatResponse c hs =
-- NOTE: we use CRLF since lighttpd mod_fastcgi can't handle
-- just LF if there are CRs in the content.
unlinesCrLf ([BS.pack (n++": "++v) | (HeaderName n,v) <- hs]
++ [BS.empty,c])
where unlinesCrLf = BS.concat... | 351 | formatResponse :: ByteString -> Headers -> ByteString
formatResponse c hs =
-- NOTE: we use CRLF since lighttpd mod_fastcgi can't handle
-- just LF if there are CRs in the content.
unlinesCrLf ([BS.pack (n++": "++v) | (HeaderName n,v) <- hs]
++ [BS.empty,c])
where unlinesCrLf = BS.concat... | 351 | formatResponse c hs =
-- NOTE: we use CRLF since lighttpd mod_fastcgi can't handle
-- just LF if there are CRs in the content.
unlinesCrLf ([BS.pack (n++": "++v) | (HeaderName n,v) <- hs]
++ [BS.empty,c])
where unlinesCrLf = BS.concat . intersperse (BS.pack "\r\n") | 297 | false | true | 0 | 12 | 81 | 105 | 55 | 50 | null | null |
SuperDrew/sql-server-gen | src/Database/SqlServer/Definition/DataType.hs | bsd-2-clause | storageOptions (VarChar _ _ s) = s | 34 | storageOptions (VarChar _ _ s) = s | 34 | storageOptions (VarChar _ _ s) = s | 34 | false | false | 0 | 6 | 6 | 20 | 9 | 11 | null | null |
rrnewton/hgdata | src/Network/Google/Books.hs | mit | totalItems ::
JSValue -- ^ The books' metadata.
-> Int -- ^ The total number of books in the shelf.
totalItems (JSObject books) =
let
Ok count = "totalItems" `valFromObj` books
in
count | 210 | totalItems ::
JSValue -- ^ The books' metadata.
-> Int
totalItems (JSObject books) =
let
Ok count = "totalItems" `valFromObj` books
in
count | 160 | totalItems (JSObject books) =
let
Ok count = "totalItems" `valFromObj` books
in
count | 97 | true | true | 0 | 9 | 57 | 49 | 24 | 25 | null | null |
alios/clearingstelle | Settings.hs | bsd-3-clause | -- | The base URL for your static files. As you can see by the default
-- value, this can simply be "static" appended to your application root.
-- A powerful optimization can be serving static files from a separate
-- domain name. This allows you to use a web server optimized for static
-- files, more easily set expire... | 827 | staticRoot :: AppConfig DefaultEnv -> Text
staticRoot conf = [st|#{appRoot conf}/static|] | 90 | staticRoot conf = [st|#{appRoot conf}/static|] | 46 | true | true | 0 | 6 | 130 | 38 | 27 | 11 | null | null |
adriannovegil/thinking-in-haskell | 01-introduccion/01-funciones/elemental.hs | gpl-2.0 | -- 05 - Última ficra de un número.
-- -----------------------------------------------------------------------------
-- Definirla la función ultimaCifra tal que (ultimaCifra x) es la última cifra
-- del número x. Por ejemplo,
--
-- ultimaCifra 325 == 5
ultimaCifra x = rem x 10 | 277 | ultimaCifra x = rem x 10 | 24 | ultimaCifra x = rem x 10 | 24 | true | false | 0 | 5 | 41 | 20 | 12 | 8 | null | null |
basvandijk/cassava | Data/Csv/Encoding.hs | bsd-3-clause | intersperse :: Builder -> [Builder] -> [Builder]
intersperse _ [] = [] | 77 | intersperse :: Builder -> [Builder] -> [Builder]
intersperse _ [] = [] | 77 | intersperse _ [] = [] | 28 | false | true | 0 | 9 | 18 | 40 | 19 | 21 | null | null |
fffej/HS-Poker | LookupPatternMatch.hs | bsd-3-clause | getValueFromProduct 4880485 = 3615 | 34 | getValueFromProduct 4880485 = 3615 | 34 | getValueFromProduct 4880485 = 3615 | 34 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
brendanhay/gogol | gogol-sqladmin/gen/Network/Google/Resource/SQL/Connect/Get.hs | mpl-2.0 | -- | Optional. Optional snapshot read timestamp to trade freshness for
-- performance.
cgReadTime :: Lens' ConnectGet (Maybe UTCTime)
cgReadTime
= lens _cgReadTime (\ s a -> s{_cgReadTime = a}) .
mapping _DateTime | 221 | cgReadTime :: Lens' ConnectGet (Maybe UTCTime)
cgReadTime
= lens _cgReadTime (\ s a -> s{_cgReadTime = a}) .
mapping _DateTime | 134 | cgReadTime
= lens _cgReadTime (\ s a -> s{_cgReadTime = a}) .
mapping _DateTime | 87 | true | true | 0 | 10 | 40 | 56 | 29 | 27 | null | null |
Solumin/ScriptNScribe | src/BreveLang.hs | mit | parseReturn :: Parser Statement
parseReturn = Return <$> (b_reserved "return" *> parseExpr) | 91 | parseReturn :: Parser Statement
parseReturn = Return <$> (b_reserved "return" *> parseExpr) | 91 | parseReturn = Return <$> (b_reserved "return" *> parseExpr) | 59 | false | true | 0 | 8 | 11 | 28 | 14 | 14 | null | null |
4ZP6Capstone2015/ampersand | src/Database/Design/Ampersand/Input/ADL1/FilePos.hs | gpl-3.0 | updatePos pos _ = addPos 1 pos | 33 | updatePos pos _ = addPos 1 pos | 33 | updatePos pos _ = addPos 1 pos | 33 | false | false | 0 | 5 | 9 | 18 | 7 | 11 | null | null |
madjestic/b1 | src/B1/Program/Chart/ChartFrame.hs | bsd-3-clause | newFrameState :: FrameOptions -> TaskManager -> Maybe Symbol -> IO FrameState
newFrameState
options@FrameOptions
{ chartOptions = chartOptions
}
taskManager
maybeSymbol = do
let createChart = newChartContent chartOptions taskManager
content <- case maybeSymbol of
Just symbol -> createCha... | 642 | newFrameState :: FrameOptions -> TaskManager -> Maybe Symbol -> IO FrameState
newFrameState
options@FrameOptions
{ chartOptions = chartOptions
}
taskManager
maybeSymbol = do
let createChart = newChartContent chartOptions taskManager
content <- case maybeSymbol of
Just symbol -> createCha... | 642 | newFrameState
options@FrameOptions
{ chartOptions = chartOptions
}
taskManager
maybeSymbol = do
let createChart = newChartContent chartOptions taskManager
content <- case maybeSymbol of
Just symbol -> createChart symbol
_ -> return Instructions
return FrameState
{ options = opt... | 564 | false | true | 1 | 13 | 156 | 162 | 79 | 83 | null | null |
leshchevds/ganeti | src/Ganeti/Hs2Py/OpDoc.hs | bsd-2-clause | opNodeAdd :: String
opNodeAdd =
"Add a node to the cluster.\n\
\\n\
\ @type node_name: C{str}\n\
\ @ivar node_name: The name of the node to add. This can be a short name,\n\
\ but it will be expanded to the FQDN.\n\
\ @type primary_ip: IP address\n\
\ @ivar primary_ip: The primary IP of the node... | 1,435 | opNodeAdd :: String
opNodeAdd =
"Add a node to the cluster.\n\
\\n\
\ @type node_name: C{str}\n\
\ @ivar node_name: The name of the node to add. This can be a short name,\n\
\ but it will be expanded to the FQDN.\n\
\ @type primary_ip: IP address\n\
\ @ivar primary_ip: The primary IP of the node... | 1,435 | opNodeAdd =
"Add a node to the cluster.\n\
\\n\
\ @type node_name: C{str}\n\
\ @ivar node_name: The name of the node to add. This can be a short name,\n\
\ but it will be expanded to the FQDN.\n\
\ @type primary_ip: IP address\n\
\ @ivar primary_ip: The primary IP of the node. This will be ignor... | 1,415 | false | true | 0 | 4 | 385 | 11 | 6 | 5 | null | null |
bertdouglas/euler-haskell | 001-050/13a.hs | mit | main = print $ solve numbers | 28 | main = print $ solve numbers | 28 | main = print $ solve numbers | 28 | false | false | 3 | 5 | 5 | 17 | 6 | 11 | null | null |
facebookincubator/duckling | Duckling/Rules.hs | bsd-3-clause | localeRules PL = PLRules.localeRules | 36 | localeRules PL = PLRules.localeRules | 36 | localeRules PL = PLRules.localeRules | 36 | false | false | 0 | 5 | 3 | 11 | 5 | 6 | null | null |
csrhodes/pandoc | src/Text/Pandoc/Readers/Markdown.hs | gpl-2.0 | exampleRef :: MarkdownParser (F Inlines)
exampleRef = try $ do
guardEnabled Ext_example_lists
char '@'
lab <- many1 (alphaNum <|> oneOf "-_")
return $ do
st <- askF
return $ case M.lookup lab (stateExamples st) of
Just n -> B.str (show n)
Nothing -> B.str ('@':la... | 322 | exampleRef :: MarkdownParser (F Inlines)
exampleRef = try $ do
guardEnabled Ext_example_lists
char '@'
lab <- many1 (alphaNum <|> oneOf "-_")
return $ do
st <- askF
return $ case M.lookup lab (stateExamples st) of
Just n -> B.str (show n)
Nothing -> B.str ('@':la... | 322 | exampleRef = try $ do
guardEnabled Ext_example_lists
char '@'
lab <- many1 (alphaNum <|> oneOf "-_")
return $ do
st <- askF
return $ case M.lookup lab (stateExamples st) of
Just n -> B.str (show n)
Nothing -> B.str ('@':lab) | 281 | false | true | 0 | 17 | 101 | 132 | 60 | 72 | null | null |
reinvdwoerd/lisp | src/Types.hs | mit | walk :: (LispVal -> LispM LispVal) -> LispVal -> LispM LispVal
walk f val = do
result <- f val
case result of
List items ->
List <$> traverse (walk f) items
_ ->
return result | 199 | walk :: (LispVal -> LispM LispVal) -> LispVal -> LispM LispVal
walk f val = do
result <- f val
case result of
List items ->
List <$> traverse (walk f) items
_ ->
return result | 199 | walk f val = do
result <- f val
case result of
List items ->
List <$> traverse (walk f) items
_ ->
return result | 136 | false | true | 0 | 13 | 59 | 87 | 40 | 47 | null | null |
batterseapower/context-semantics | Language/ContextSemantics/LinearLambda.hs | bsd-3-clause | --
-- Translation from traditional linear lambda calculus
--
exprSemantics :: Expr -> (Port, [(String, Port)])
exprSemantics e = exprSemantics' (fv "Input") [(v, fv v) | v <- freeVars e] e | 189 | exprSemantics :: Expr -> (Port, [(String, Port)])
exprSemantics e = exprSemantics' (fv "Input") [(v, fv v) | v <- freeVars e] e | 127 | exprSemantics e = exprSemantics' (fv "Input") [(v, fv v) | v <- freeVars e] e | 77 | true | true | 0 | 9 | 31 | 72 | 40 | 32 | null | null |
nomeata/ghc | compiler/codeGen/CgPrimOp.hs | bsd-3-clause | emitPrimOp [r] IndexArrayOp [obj,ix] _ = doReadPtrArrayOp r obj ix | 69 | emitPrimOp [r] IndexArrayOp [obj,ix] _ = doReadPtrArrayOp r obj ix | 69 | emitPrimOp [r] IndexArrayOp [obj,ix] _ = doReadPtrArrayOp r obj ix | 69 | false | false | 1 | 6 | 12 | 35 | 16 | 19 | null | null |
phylake/kademlia | Network/DHT/Kademlia/Util.hs | bsd-3-clause | forkIO_ :: IO () -> IO ()
forkIO_ = void . forkIO | 49 | forkIO_ :: IO () -> IO ()
forkIO_ = void . forkIO | 49 | forkIO_ = void . forkIO | 23 | false | true | 1 | 8 | 11 | 36 | 15 | 21 | null | null |
haskell/haddock | haddock-api/src/Haddock/Backends/Xhtml/Layout.hs | bsd-2-clause | divPackageHeader, divContent, divModuleHeader, divFooter,
divTableOfContents, divDescription, divSynopsis, divInterface,
divIndex, divAlphabet, divModuleList, divContentsList
:: Html -> Html
divPackageHeader = sectionDiv "package-header" | 249 | divPackageHeader, divContent, divModuleHeader, divFooter,
divTableOfContents, divDescription, divSynopsis, divInterface,
divIndex, divAlphabet, divModuleList, divContentsList
:: Html -> Html
divPackageHeader = sectionDiv "package-header" | 248 | divPackageHeader = sectionDiv "package-header" | 49 | false | true | 1 | 5 | 31 | 41 | 31 | 10 | null | null |
tabemann/amphibian | src_old/Network/IRC/Client/Amphibian/Default.hs | bsd-3-clause | getDirectory :: (String -> IO FilePath) -> IO FilePath
getDirectory query = do
newDir <- query $ T.unpack applicationName
newDirExists <- doesDirectoryExist newDir
if newDirExists
then return newDir
else do
oldDir <- getAppUserDataDirectory $ T.upack applicationName
oldDirExists <- doesDirectoryExist ... | 444 | getDirectory :: (String -> IO FilePath) -> IO FilePath
getDirectory query = do
newDir <- query $ T.unpack applicationName
newDirExists <- doesDirectoryExist newDir
if newDirExists
then return newDir
else do
oldDir <- getAppUserDataDirectory $ T.upack applicationName
oldDirExists <- doesDirectoryExist ... | 444 | getDirectory query = do
newDir <- query $ T.unpack applicationName
newDirExists <- doesDirectoryExist newDir
if newDirExists
then return newDir
else do
oldDir <- getAppUserDataDirectory $ T.upack applicationName
oldDirExists <- doesDirectoryExist oldDir
if oldDirExists
then return oldDir
e... | 389 | false | true | 0 | 13 | 93 | 125 | 56 | 69 | null | null |
jsavatgy/hatupist | code/aboutDialog.hs | gpl-2.0 | drawKeyrowsCanvas gsRef canvas _evt = do
gs <- readIORef gsRef
writeIORef gsRef gs {
lastLetter = nextLetter gs
}
let c = nextLetter gs
selected = [toUpper c]
dupl = toUpper c == toUpper (lastLetter gs)
keymap = [keyrow1 (s gs), keyrow2 (s gs), keyrow3 (s gs)]
leK y = length (keyma... | 605 | drawKeyrowsCanvas gsRef canvas _evt = do
gs <- readIORef gsRef
writeIORef gsRef gs {
lastLetter = nextLetter gs
}
let c = nextLetter gs
selected = [toUpper c]
dupl = toUpper c == toUpper (lastLetter gs)
keymap = [keyrow1 (s gs), keyrow2 (s gs), keyrow3 (s gs)]
leK y = length (keyma... | 605 | drawKeyrowsCanvas gsRef canvas _evt = do
gs <- readIORef gsRef
writeIORef gsRef gs {
lastLetter = nextLetter gs
}
let c = nextLetter gs
selected = [toUpper c]
dupl = toUpper c == toUpper (lastLetter gs)
keymap = [keyrow1 (s gs), keyrow2 (s gs), keyrow3 (s gs)]
leK y = length (keyma... | 605 | false | false | 0 | 18 | 169 | 313 | 155 | 158 | null | null |
JakDar/lab6-project | src/Lab2.hs | bsd-3-clause | - |Function changing the order of two arguments
flip2 :: (a -> b -> c) -> b -> a -> c
flip2 f a b = f b a
| 106 | flip2 :: (a -> b -> c) -> b -> a -> c
flip2 f a b = f b a | 57 | flip2 f a b = f b a | 19 | true | true | 2 | 10 | 29 | 56 | 27 | 29 | null | null |
gbataille/pandoc | src/Text/Pandoc/Writers/Texinfo.hs | gpl-2.0 | inlineToTexinfo (Strikeout lst) = do
modify $ \st -> st{ stStrikeout = True }
contents <- inlineListToTexinfo lst
return $ text "@textstrikeout{" <> contents <> text "}" | 175 | inlineToTexinfo (Strikeout lst) = do
modify $ \st -> st{ stStrikeout = True }
contents <- inlineListToTexinfo lst
return $ text "@textstrikeout{" <> contents <> text "}" | 175 | inlineToTexinfo (Strikeout lst) = do
modify $ \st -> st{ stStrikeout = True }
contents <- inlineListToTexinfo lst
return $ text "@textstrikeout{" <> contents <> text "}" | 175 | false | false | 0 | 10 | 32 | 66 | 31 | 35 | null | null |
ExNexu/Idris-dev | src/Idris/AbsSyntaxTree.hs | bsd-3-clause | -- | The initial state for the compiler
idrisInit :: IState
idrisInit = IState initContext S.empty []
emptyContext emptyContext emptyContext emptyContext
emptyContext emptyContext emptyContext emptyContext
emptyContext emptyContext emptyContext emptyContext
... | 811 | idrisInit :: IState
idrisInit = IState initContext S.empty []
emptyContext emptyContext emptyContext emptyContext
emptyContext emptyContext emptyContext emptyContext
emptyContext emptyContext emptyContext emptyContext
emptyContext emptyContext ... | 771 | idrisInit = IState initContext S.empty []
emptyContext emptyContext emptyContext emptyContext
emptyContext emptyContext emptyContext emptyContext
emptyContext emptyContext emptyContext emptyContext
emptyContext emptyContext emptyContext emptyCo... | 751 | true | true | 0 | 7 | 259 | 272 | 124 | 148 | null | null |
shaunstanislaus/caramel | src/Lambda.hs | mit | pretty :: Term -> String
pretty (Var n) = show n | 50 | pretty :: Term -> String
pretty (Var n) = show n | 50 | pretty (Var n) = show n | 25 | false | true | 0 | 9 | 12 | 32 | 14 | 18 | null | null |
sherwoodwang/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs | lgpl-2.1 | wxTEXT_ATTR_FONT_FACE :: Int
wxTEXT_ATTR_FONT_FACE = 0x00000004 | 85 | wxTEXT_ATTR_FONT_FACE :: Int
wxTEXT_ATTR_FONT_FACE = 0x00000004 | 85 | wxTEXT_ATTR_FONT_FACE = 0x00000004 | 45 | false | true | 0 | 4 | 27 | 11 | 6 | 5 | null | null |
fmapfmapfmap/amazonka | amazonka-importexport/gen/Network/AWS/ImportExport/CreateJob.hs | mpl-2.0 | -- | Undocumented member.
cjManifest :: Lens' CreateJob Text
cjManifest = lens _cjManifest (\ s a -> s{_cjManifest = a}) | 120 | cjManifest :: Lens' CreateJob Text
cjManifest = lens _cjManifest (\ s a -> s{_cjManifest = a}) | 94 | cjManifest = lens _cjManifest (\ s a -> s{_cjManifest = a}) | 59 | true | true | 1 | 9 | 19 | 45 | 22 | 23 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.