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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ckaestne/CIDE | other/CaseStudies/Arith/orig_armin/strict-dynamic/Arith.hs | gpl-3.0 | tvBinOp Add (TVDouble x) (TVDouble y) = Result (TVDouble (x+y)) | 63 | tvBinOp Add (TVDouble x) (TVDouble y) = Result (TVDouble (x+y)) | 63 | tvBinOp Add (TVDouble x) (TVDouble y) = Result (TVDouble (x+y)) | 63 | false | false | 0 | 9 | 9 | 43 | 20 | 23 | null | null |
jtapolczai/FileSync | tests/System/IO/FileSync/Tests/Tree.hs | apache-2.0 | -- Create file tree
-------------------------------------------------------------------------------
createEmptyFileTree :: Assertion
createEmptyFileTree = bracket'
(mkD "testDir/empty")
(rmD "testDir")
(do t <- createFileTree (LR "testDir/empty") >>= mapM materialize
assertEqual "empty file tree" [] t) | 320 | createEmptyFileTree :: Assertion
createEmptyFileTree = bracket'
(mkD "testDir/empty")
(rmD "testDir")
(do t <- createFileTree (LR "testDir/empty") >>= mapM materialize
assertEqual "empty file tree" [] t) | 219 | createEmptyFileTree = bracket'
(mkD "testDir/empty")
(rmD "testDir")
(do t <- createFileTree (LR "testDir/empty") >>= mapM materialize
assertEqual "empty file tree" [] t) | 186 | true | true | 0 | 12 | 46 | 72 | 34 | 38 | null | null |
xu-hao/QueryArrow | QueryArrow-db-cypher/src/QueryArrow/Cypher/Mapping.hs | bsd-3-clause | makeICATCypherDBAdapter :: String -> String -> String -> Neo4jDatabase -> IO (NoConnectionDatabase (GenericDatabase CypherTrans Neo4jDatabase ))
makeICATCypherDBAdapter ns predsPath mappingsPath conn = do
preds <- loadPreds predsPath
mappings <- loadMappings mappingsPath
let (CypherBuiltIn cypherbuiltin) =... | 560 | makeICATCypherDBAdapter :: String -> String -> String -> Neo4jDatabase -> IO (NoConnectionDatabase (GenericDatabase CypherTrans Neo4jDatabase ))
makeICATCypherDBAdapter ns predsPath mappingsPath conn = do
preds <- loadPreds predsPath
mappings <- loadMappings mappingsPath
let (CypherBuiltIn cypherbuiltin) =... | 560 | makeICATCypherDBAdapter ns predsPath mappingsPath conn = do
preds <- loadPreds predsPath
mappings <- loadMappings mappingsPath
let (CypherBuiltIn cypherbuiltin) = cypherBuiltIn (lookupPred ns)
let cypherbuiltinpreds = keys cypherbuiltin
return (NoConnectionDatabase (GenericDatabase (cypherTrans ns ... | 414 | false | true | 0 | 14 | 80 | 161 | 74 | 87 | null | null |
suhailshergill/liboleg | Language/TEval/TEvalNR.hs | bsd-3-clause | teval env (e1 :+ e2) =
let t1 = teval env e1
t2 = teval env e2
in case (toptyp t1,toptyp t2) of
(TInt, TInt) ->
topterm TInt `M.union` shift 0 t1 `M.union` shift 1 t2
ts -> error $ "Trying to add non-integers: " ++ show ts | 268 | teval env (e1 :+ e2) =
let t1 = teval env e1
t2 = teval env e2
in case (toptyp t1,toptyp t2) of
(TInt, TInt) ->
topterm TInt `M.union` shift 0 t1 `M.union` shift 1 t2
ts -> error $ "Trying to add non-integers: " ++ show ts | 268 | teval env (e1 :+ e2) =
let t1 = teval env e1
t2 = teval env e2
in case (toptyp t1,toptyp t2) of
(TInt, TInt) ->
topterm TInt `M.union` shift 0 t1 `M.union` shift 1 t2
ts -> error $ "Trying to add non-integers: " ++ show ts | 268 | false | false | 0 | 12 | 93 | 118 | 59 | 59 | null | null |
sethfowler/pygmalion | tools/Pygmalion.hs | bsd-3-clause | initialize :: IO ()
initialize = do
putStrLn "Initializing a pygmalion index..."
createDirectoryIfMissing True pygmalionDir
withFile configFile ReadWriteMode (\_ -> return ()) | 181 | initialize :: IO ()
initialize = do
putStrLn "Initializing a pygmalion index..."
createDirectoryIfMissing True pygmalionDir
withFile configFile ReadWriteMode (\_ -> return ()) | 181 | initialize = do
putStrLn "Initializing a pygmalion index..."
createDirectoryIfMissing True pygmalionDir
withFile configFile ReadWriteMode (\_ -> return ()) | 161 | false | true | 0 | 11 | 27 | 53 | 24 | 29 | null | null |
gridaphobe/ghc | compiler/basicTypes/VarEnv.hs | bsd-3-clause | modifyVarEnv_Directly :: (a -> a) -> UniqFM a -> Unique -> UniqFM a
modifyVarEnv_Directly mangle_fn env key
= case (lookupUFM_Directly env key) of
Nothing -> env
Just xx -> addToUFM_Directly env key (mangle_fn xx)
-- Deterministic VarEnv
-- See Note [Deterministic UniqFM] in UniqDFM for explanation why w... | 338 | modifyVarEnv_Directly :: (a -> a) -> UniqFM a -> Unique -> UniqFM a
modifyVarEnv_Directly mangle_fn env key
= case (lookupUFM_Directly env key) of
Nothing -> env
Just xx -> addToUFM_Directly env key (mangle_fn xx)
-- Deterministic VarEnv
-- See Note [Deterministic UniqFM] in UniqDFM for explanation why w... | 338 | modifyVarEnv_Directly mangle_fn env key
= case (lookupUFM_Directly env key) of
Nothing -> env
Just xx -> addToUFM_Directly env key (mangle_fn xx)
-- Deterministic VarEnv
-- See Note [Deterministic UniqFM] in UniqDFM for explanation why we need
-- DVarEnv. | 270 | false | true | 4 | 9 | 65 | 89 | 43 | 46 | null | null |
rueshyna/gogol | gogol-webmaster-tools/gen/Network/Google/Resource/Webmasters/URLCrawlErrorscounts/Query.hs | mpl-2.0 | -- | The crawl error category. For example: serverError. If not specified,
-- returns results for all categories.
uceqCategory :: Lens' URLCrawlErrorscountsQuery (Maybe URLCrawlErrorscountsQueryCategory)
uceqCategory
= lens _uceqCategory (\ s a -> s{_uceqCategory = a}) | 271 | uceqCategory :: Lens' URLCrawlErrorscountsQuery (Maybe URLCrawlErrorscountsQueryCategory)
uceqCategory
= lens _uceqCategory (\ s a -> s{_uceqCategory = a}) | 157 | uceqCategory
= lens _uceqCategory (\ s a -> s{_uceqCategory = a}) | 67 | true | true | 0 | 9 | 36 | 49 | 26 | 23 | null | null |
enolan/cabal | Cabal/Distribution/Simple/LHC.hs | bsd-3-clause | -- -----------------------------------------------------------------------------
-- Installing
-- |Install executables for GHC.
installExe :: Verbosity
-> LocalBuildInfo
-> InstallDirs FilePath -- ^Where to copy the files to
-> FilePath -- ^Build location
-> (FilePath, File... | 1,004 | installExe :: Verbosity
-> LocalBuildInfo
-> InstallDirs FilePath -- ^Where to copy the files to
-> FilePath -- ^Build location
-> (FilePath, FilePath) -- ^Executable (prefix,suffix)
-> PackageDescription
-> Executable
-> IO ()
installExe ve... | 875 | installExe verbosity lbi installDirs buildPref (progprefix, progsuffix) _pkg exe = do
let binDir = bindir installDirs
createDirectoryIfMissingVerbose verbosity True binDir
let exeFileName = exeName exe <.> exeExtension
fixedExeBaseName = progprefix ++ exeName exe ++ progsuffix
installBinary dest = do
... | 568 | true | true | 0 | 16 | 246 | 205 | 102 | 103 | null | null |
lpeterse/koka | src/Main.hs | apache-2.0 | mainh :: IO ()
mainh = mainArgs "-ilib -itest --console=raw" | 67 | mainh :: IO ()
mainh = mainArgs "-ilib -itest --console=raw" | 67 | mainh = mainArgs "-ilib -itest --console=raw" | 49 | false | true | 0 | 6 | 16 | 19 | 9 | 10 | null | null |
outlikealambda/trustocracy | src/Zipper.hs | bsd-3-clause | insertUpdate :: Keyed a
=> (a -> a -> a) -- ^ updating function, takes the inserted tree as 1st param
-> Directions -- ^ directions to the new parent
-> Tree a -- ^ tree to insert
-> Zipper a -- ^ fully zipped zipper
-> Zipper a -- ^ zipper with new tree
insertUpd... | 394 | insertUpdate :: Keyed a
=> (a -> a -> a) -- ^ updating function, takes the inserted tree as 1st param
-> Directions -- ^ directions to the new parent
-> Tree a -- ^ tree to insert
-> Zipper a -- ^ fully zipped zipper
-> Zipper a
insertUpdate f ds tree z = updateToTop (alte... | 359 | insertUpdate f ds tree z = updateToTop (alterNode f tree) (insertSubTree ds tree z) | 83 | true | true | 0 | 10 | 124 | 91 | 46 | 45 | null | null |
abau/bildpunkt | Bildpunkt/DistanceField.hs | gpl-3.0 | box :: Color -> Vector -> DistanceField
box c m = withColor c $ \p -> vecLength $ vecMax (constant (0,0,0)) (vecSub (vecAbs p)
(constant m)) | 217 | box :: Color -> Vector -> DistanceField
box c m = withColor c $ \p -> vecLength $ vecMax (constant (0,0,0)) (vecSub (vecAbs p)
(constant m)) | 217 | box c m = withColor c $ \p -> vecLength $ vecMax (constant (0,0,0)) (vecSub (vecAbs p)
(constant m)) | 177 | false | true | 2 | 11 | 102 | 86 | 42 | 44 | null | null |
backofhan/HaskellExercises | CH26/src/Lib.hs | bsd-3-clause | -- 3 & 4
rShow :: Show a => ReaderT a Identity String
rShow = reader show | 73 | rShow :: Show a => ReaderT a Identity String
rShow = reader show | 64 | rShow = reader show | 19 | true | true | 0 | 6 | 16 | 29 | 14 | 15 | null | null |
ogma-project/celtchar | app/Main.hs | mit | getOutputHandle :: Maybe FilePath -> IO Handle
getOutputHandle Nothing = pure stdout | 84 | getOutputHandle :: Maybe FilePath -> IO Handle
getOutputHandle Nothing = pure stdout | 84 | getOutputHandle Nothing = pure stdout | 37 | false | true | 0 | 7 | 11 | 32 | 13 | 19 | null | null |
pgj/bead | src/Bead/Persistence/SQL/Registration.hs | bsd-3-clause | loadUserReg :: Domain.UserRegKey -> Persist Domain.UserRegistration
loadUserReg key = do
value <- get (toEntityKey key)
return $
maybe (persistError "loadUserReg" $ "no registration key was found:" ++ show key)
toDomainValue
value
#ifdef TEST | 271 | loadUserReg :: Domain.UserRegKey -> Persist Domain.UserRegistration
loadUserReg key = do
value <- get (toEntityKey key)
return $
maybe (persistError "loadUserReg" $ "no registration key was found:" ++ show key)
toDomainValue
value
#ifdef TEST | 271 | loadUserReg key = do
value <- get (toEntityKey key)
return $
maybe (persistError "loadUserReg" $ "no registration key was found:" ++ show key)
toDomainValue
value
#ifdef TEST | 203 | false | true | 0 | 13 | 61 | 78 | 35 | 43 | null | null |
AndreasPK/stack | src/System/Process/PagerEditor.hs | bsd-3-clause | -- | Run editor on a ByteString.
editByteString :: String -> ByteString -> IO ByteString
editByteString f s = editReaderWriter f (`hPut` s) Data.ByteString.Lazy.readFile | 169 | editByteString :: String -> ByteString -> IO ByteString
editByteString f s = editReaderWriter f (`hPut` s) Data.ByteString.Lazy.readFile | 136 | editByteString f s = editReaderWriter f (`hPut` s) Data.ByteString.Lazy.readFile | 80 | true | true | 0 | 8 | 23 | 49 | 26 | 23 | null | null |
cchantep/dhek | Dhek/Geometry.hs | gpl-3.0 | areaCursor :: Area -> CursorType
areaCursor TOP_LEFT = TopLeftCorner | 72 | areaCursor :: Area -> CursorType
areaCursor TOP_LEFT = TopLeftCorner | 72 | areaCursor TOP_LEFT = TopLeftCorner | 39 | false | true | 0 | 5 | 12 | 18 | 9 | 9 | null | null |
vluukkal/aspreify | testaspparse.hs | mit | tbody2 = TestCase $ assertEqual "body 2" [Plain (Const "vtx") [Sym (Var "X")] True,Plain (Const "vtx") [Sym (Var "Y")] True,BExpr Lt (Sym (Var "X")) (Sym (Var "Y")),Plain (Const "r") [Sym (Var "X"),Sym (Var "Y")] False] (wrapparser_bl body "" "vtx(X), vtx(Y), X < Y, not r(X, Y)") | 280 | tbody2 = TestCase $ assertEqual "body 2" [Plain (Const "vtx") [Sym (Var "X")] True,Plain (Const "vtx") [Sym (Var "Y")] True,BExpr Lt (Sym (Var "X")) (Sym (Var "Y")),Plain (Const "r") [Sym (Var "X"),Sym (Var "Y")] False] (wrapparser_bl body "" "vtx(X), vtx(Y), X < Y, not r(X, Y)") | 280 | tbody2 = TestCase $ assertEqual "body 2" [Plain (Const "vtx") [Sym (Var "X")] True,Plain (Const "vtx") [Sym (Var "Y")] True,BExpr Lt (Sym (Var "X")) (Sym (Var "Y")),Plain (Const "r") [Sym (Var "X"),Sym (Var "Y")] False] (wrapparser_bl body "" "vtx(X), vtx(Y), X < Y, not r(X, Y)") | 280 | false | false | 1 | 12 | 45 | 160 | 78 | 82 | null | null |
llelf/prose | Prose/Internal/derive.hs | bsd-3-clause | coda = " ]\n" | 13 | coda = " ]\n" | 13 | coda = " ]\n" | 13 | false | false | 0 | 4 | 3 | 6 | 3 | 3 | null | null |
mitchellwrosen/persistent | persistent/Database/Persist/Sql/Migration.hs | mit | printMigration :: MonadIO m => Migration -> ReaderT SqlBackend m ()
printMigration m = showMigration m
>>= mapM_ (liftIO . Data.Text.IO.putStrLn) | 160 | printMigration :: MonadIO m => Migration -> ReaderT SqlBackend m ()
printMigration m = showMigration m
>>= mapM_ (liftIO . Data.Text.IO.putStrLn) | 160 | printMigration m = showMigration m
>>= mapM_ (liftIO . Data.Text.IO.putStrLn) | 92 | false | true | 0 | 9 | 35 | 55 | 27 | 28 | null | null |
scott-fleischman/parsec | Text/Parsec/Pos.hs | bsd-2-clause | -- | Set the column number of a source position.
setSourceColumn :: SourcePos -> Column -> SourcePos
setSourceColumn (SourcePos name line _column) n = SourcePos name line n | 174 | setSourceColumn :: SourcePos -> Column -> SourcePos
setSourceColumn (SourcePos name line _column) n = SourcePos name line n | 123 | setSourceColumn (SourcePos name line _column) n = SourcePos name line n | 71 | true | true | 0 | 7 | 29 | 42 | 21 | 21 | null | null |
ndmitchell/hlint | src/Apply.hs | bsd-3-clause | -- | Return either an idea (a parse error) or the module. In IO because might call the C pre processor.
parseModuleApply :: ParseFlags -> [Setting] -> FilePath -> Maybe String -> IO (Either Idea ModuleEx)
parseModuleApply flags s file src = do
res <- parseModuleEx (parseFlagsAddFixities [x | Infix x <- s] flags) fi... | 1,160 | parseModuleApply :: ParseFlags -> [Setting] -> FilePath -> Maybe String -> IO (Either Idea ModuleEx)
parseModuleApply flags s file src = do
res <- parseModuleEx (parseFlagsAddFixities [x | Infix x <- s] flags) file src
case res of
Right r -> pure $ Right r
Left (ParseError sl msg ctxt) ->
... | 1,056 | parseModuleApply flags s file src = do
res <- parseModuleEx (parseFlagsAddFixities [x | Infix x <- s] flags) file src
case res of
Right r -> pure $ Right r
Left (ParseError sl msg ctxt) ->
pure $ Left $ classify [x | SettingClassify x <- s] $ rawIdeaN Error (adjustMessage msg) sl ctxt No... | 955 | true | true | 6 | 16 | 335 | 298 | 148 | 150 | null | null |
ideas-edu/ideas | src/Ideas/Service/State.hs | apache-2.0 | emptyState :: Exercise a -> a -> State a
emptyState ex = emptyStateContext ex . inContext ex | 93 | emptyState :: Exercise a -> a -> State a
emptyState ex = emptyStateContext ex . inContext ex | 92 | emptyState ex = emptyStateContext ex . inContext ex | 51 | false | true | 0 | 7 | 17 | 38 | 17 | 21 | null | null |
Fuuzetsu/stack | src/Stack/Script.hs | bsd-3-clause | isWindows = True | 16 | isWindows = True | 16 | isWindows = True | 16 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
elieux/ghc | compiler/hsSyn/HsPat.hs | bsd-3-clause | hsPatNeedsParens :: Pat a -> Bool
hsPatNeedsParens (NPlusKPat {}) = True | 77 | hsPatNeedsParens :: Pat a -> Bool
hsPatNeedsParens (NPlusKPat {}) = True | 77 | hsPatNeedsParens (NPlusKPat {}) = True | 43 | false | true | 0 | 7 | 15 | 28 | 14 | 14 | null | null |
abakst/liquidhaskell | benchmarks/bytestring-0.9.2.1/Data/ByteString.T.hs | bsd-3-clause | findSubstrings :: ByteString -- ^ String to search for.
-> ByteString -- ^ String to seach in.
-> [Int]
-- LIQUID LATEST
findSubstrings pat str
| null pat = rng 0 (length str - 1) -- LIQUID COMPREHENSIONS [0 .. (length str - 1)]
| otherwise = search 0 str
where
... | 1,575 | findSubstrings :: ByteString -- ^ String to search for.
-> ByteString -- ^ String to seach in.
-> [Int]
findSubstrings pat str
| null pat = rng 0 (length str - 1) -- LIQUID COMPREHENSIONS [0 .. (length str - 1)]
| otherwise = search 0 str
where
{-@ Decrease sea... | 1,556 | findSubstrings pat str
| null pat = rng 0 (length str - 1) -- LIQUID COMPREHENSIONS [0 .. (length str - 1)]
| otherwise = search 0 str
where
{-@ Decrease search 2 @-}
STRICT2(search)
search (n :: Int) s
| null s = []
| pat `isPrefixOf` s = n : search (n+1... | 1,422 | true | true | 2 | 9 | 583 | 194 | 93 | 101 | null | null |
jneen/cube | Data/RubiksCube.hs | mit | oppositeDirection :: Direction -> Direction
oppositeDirection Double = Double | 79 | oppositeDirection :: Direction -> Direction
oppositeDirection Double = Double | 77 | oppositeDirection Double = Double | 33 | false | true | 0 | 5 | 10 | 18 | 9 | 9 | null | null |
tjakway/ghcjvm | compiler/prelude/THNames.hs | bsd-3-clause | mkTHModule :: FastString -> Module
mkTHModule m = mkModule thUnitId (mkModuleNameFS m) | 86 | mkTHModule :: FastString -> Module
mkTHModule m = mkModule thUnitId (mkModuleNameFS m) | 86 | mkTHModule m = mkModule thUnitId (mkModuleNameFS m) | 51 | false | true | 0 | 7 | 11 | 34 | 15 | 19 | null | null |
diagrams/diagrams-contrib | src/Diagrams/Color/XKCD.hs | bsd-3-clause | barneyPurple = fromJust $ readHexColor "#a00498" | 57 | barneyPurple = fromJust $ readHexColor "#a00498" | 57 | barneyPurple = fromJust $ readHexColor "#a00498" | 57 | false | false | 0 | 6 | 14 | 13 | 6 | 7 | null | null |
noschinl/cyp | src/Test/Info2/Cyp/Term.hs | mit | translateName :: Name l -> String
translateName (Ident _ s) = s | 63 | translateName :: Name l -> String
translateName (Ident _ s) = s | 63 | translateName (Ident _ s) = s | 29 | false | true | 0 | 7 | 11 | 29 | 14 | 15 | null | null |
wxwxwwxxx/ghc | testsuite/tests/programs/andy_cherry/DataTypes.hs | bsd-3-clause | charToMoveTok '#' = Just (MateTok) | 34 | charToMoveTok '#' = Just (MateTok) | 34 | charToMoveTok '#' = Just (MateTok) | 34 | false | false | 0 | 6 | 4 | 15 | 7 | 8 | null | null |
nevrenato/Hets_Fork | PGIP/Query.hs | gpl-2.0 | nodeCmds :: [NodeCmd]
nodeCmds = [minBound .. maxBound] | 55 | nodeCmds :: [NodeCmd]
nodeCmds = [minBound .. maxBound] | 55 | nodeCmds = [minBound .. maxBound] | 33 | false | true | 0 | 7 | 7 | 27 | 13 | 14 | null | null |
ancientlanguage/haskell-analysis | prepare/src/Prepare/Decompose.hs | mit | decomposeChar '\x2F8EB' = "\x6AA8" | 34 | decomposeChar '\x2F8EB' = "\x6AA8" | 34 | decomposeChar '\x2F8EB' = "\x6AA8" | 34 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
hvr/jhc | src/FrontEnd/Lex/Post.hs | mit | checkBangType :: [Either Name HsType] -> P HsBangType
checkBangType xs = checkSconType' xs >>= \s -> case s of
SconType True ty -> return $ HsBangedTy ty
_ -> HsUnBangedTy <$> f s
where
f (SconType False ty) = return ty
f (SconApp (SconOp x) [ta,tb]) | x == tc_Arrow = do HsTyFun <$> f tb <*... | 541 | checkBangType :: [Either Name HsType] -> P HsBangType
checkBangType xs = checkSconType' xs >>= \s -> case s of
SconType True ty -> return $ HsBangedTy ty
_ -> HsUnBangedTy <$> f s
where
f (SconType False ty) = return ty
f (SconApp (SconOp x) [ta,tb]) | x == tc_Arrow = do HsTyFun <$> f tb <*... | 541 | checkBangType xs = checkSconType' xs >>= \s -> case s of
SconType True ty -> return $ HsBangedTy ty
_ -> HsUnBangedTy <$> f s
where
f (SconType False ty) = return ty
f (SconApp (SconOp x) [ta,tb]) | x == tc_Arrow = do HsTyFun <$> f tb <*> f ta
f (SconType True _) = parseErrorK "(!) annot... | 486 | false | true | 0 | 12 | 137 | 230 | 108 | 122 | null | null |
Noeda/caramia-extras | tests/sanity-check/Main.hs | mit | main :: IO ()
main = defaultMain tests | 38 | main :: IO ()
main = defaultMain tests | 38 | main = defaultMain tests | 24 | false | true | 0 | 6 | 7 | 19 | 9 | 10 | null | null |
fugyk/cabal | Cabal/Distribution/Simple/GHC.hs | bsd-3-clause | checkPackageDbStack :: PackageDBStack -> IO ()
checkPackageDbStack (GlobalPackageDB:rest)
| GlobalPackageDB `notElem` rest = return () | 136 | checkPackageDbStack :: PackageDBStack -> IO ()
checkPackageDbStack (GlobalPackageDB:rest)
| GlobalPackageDB `notElem` rest = return () | 136 | checkPackageDbStack (GlobalPackageDB:rest)
| GlobalPackageDB `notElem` rest = return () | 89 | false | true | 0 | 8 | 16 | 47 | 23 | 24 | null | null |
ysnrkdm/Hamlet | src/Tree.hs | mit | minimize' :: Ord a => Tree a -> [a]
minimize' Node {node = n, childNodes = []} = n : [] | 87 | minimize' :: Ord a => Tree a -> [a]
minimize' Node {node = n, childNodes = []} = n : [] | 87 | minimize' Node {node = n, childNodes = []} = n : [] | 51 | false | true | 4 | 9 | 20 | 63 | 29 | 34 | null | null |
yu-i9/thih | test/sample/Thih.hs | bsd-3-clause | Just static = (preludeClasses
<:> maybeClasses
<:> listClasses
<:> monadClasses
<:> thihClasses) initialEnv | 151 | Just static = (preludeClasses
<:> maybeClasses
<:> listClasses
<:> monadClasses
<:> thihClasses) initialEnv | 151 | Just static = (preludeClasses
<:> maybeClasses
<:> listClasses
<:> monadClasses
<:> thihClasses) initialEnv | 151 | false | false | 1 | 10 | 56 | 34 | 15 | 19 | null | null |
beni55/cabal | cabal-install/Distribution/Client/Dependency/Modular/IndexConversion.hs | bsd-3-clause | -- | Convert a Cabal installed package index to the simpler,
-- more uniform index format of the solver.
convIPI' :: Bool -> SI.InstalledPackageIndex -> [(PN, I, PInfo)]
convIPI' sip idx =
-- apply shadowing whenever there are multiple installed packages with
-- the same version
[ maybeShadow (convIP idx pk... | 635 | convIPI' :: Bool -> SI.InstalledPackageIndex -> [(PN, I, PInfo)]
convIPI' sip idx =
-- apply shadowing whenever there are multiple installed packages with
-- the same version
[ maybeShadow (convIP idx pkg)
| (_pkgid, pkgs) <- SI.allPackagesBySourcePackageId idx
, (maybeShadow, pkg) <- zip (id : repe... | 530 | convIPI' sip idx =
-- apply shadowing whenever there are multiple installed packages with
-- the same version
[ maybeShadow (convIP idx pkg)
| (_pkgid, pkgs) <- SI.allPackagesBySourcePackageId idx
, (maybeShadow, pkg) <- zip (id : repeat shadow) pkgs ]
where
-- shadowing is recorded in the pa... | 465 | true | true | 0 | 11 | 163 | 168 | 90 | 78 | null | null |
begriffs/hasql-postgres | library/Hasql/Postgres/ErrorCode.hs | mit | -- * Class 01 — Warning
-------------------------
warning :: ErrorCode = "01000" | 126 | warning :: ErrorCode = "01000" | 75 | warning :: ErrorCode = "01000" | 75 | true | false | 0 | 5 | 57 | 13 | 7 | 6 | null | null |
utdemir/wai | warp/Network/Wai/Handler/Warp/HTTP2/Worker.hs | mit | newStreamInfo :: IO StreamInfo
newStreamInfo = StreamInfo <$> newIORef Nothing | 78 | newStreamInfo :: IO StreamInfo
newStreamInfo = StreamInfo <$> newIORef Nothing | 78 | newStreamInfo = StreamInfo <$> newIORef Nothing | 47 | false | true | 2 | 6 | 9 | 27 | 11 | 16 | null | null |
brendanhay/gogol | gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Cities/List.hs | mpl-2.0 | -- | User profile ID associated with this request.
citProFileId :: Lens' CitiesList Int64
citProFileId
= lens _citProFileId (\ s a -> s{_citProFileId = a})
. _Coerce | 173 | citProFileId :: Lens' CitiesList Int64
citProFileId
= lens _citProFileId (\ s a -> s{_citProFileId = a})
. _Coerce | 122 | citProFileId
= lens _citProFileId (\ s a -> s{_citProFileId = a})
. _Coerce | 83 | true | true | 1 | 8 | 34 | 52 | 25 | 27 | null | null |
rgleichman/glance | app/TranslateCore.hs | gpl-3.0 | combineExpressions :: Bool -> [(GraphAndRef, NameAndPort)] -> SyntaxGraph
combineExpressions inPattern portExpPairs =
mconcat $ fmap makeGraph portExpPairs
where
edgeOpts = if inPattern then [EdgeInPattern] else []
makeGraph (GraphAndRef graph ref, port) =
graph <> case ref of
Left str ->
... | 530 | combineExpressions :: Bool -> [(GraphAndRef, NameAndPort)] -> SyntaxGraph
combineExpressions inPattern portExpPairs =
mconcat $ fmap makeGraph portExpPairs
where
edgeOpts = if inPattern then [EdgeInPattern] else []
makeGraph (GraphAndRef graph ref, port) =
graph <> case ref of
Left str ->
... | 530 | combineExpressions inPattern portExpPairs =
mconcat $ fmap makeGraph portExpPairs
where
edgeOpts = if inPattern then [EdgeInPattern] else []
makeGraph (GraphAndRef graph ref, port) =
graph <> case ref of
Left str ->
if inPattern
then bindsToSyntaxGraph [SgBind str (Right ... | 456 | false | true | 4 | 13 | 128 | 161 | 83 | 78 | null | null |
BartMassey/hgallery | Handler/Home.hs | agpl-3.0 | postHomeR :: Handler Html
postHomeR = do
((result, _), _) <- runFormPost uploadForm
case result of
FormSuccess fi -> do
app <- getYesod
fileBytes <- runResourceT $ fileSource fi $$ sinkLbs
let mime = unpack $ fileContentType fi
let fileAssoc = FileAssoc { fileAssocName = unpack $ fileNam... | 632 | postHomeR :: Handler Html
postHomeR = do
((result, _), _) <- runFormPost uploadForm
case result of
FormSuccess fi -> do
app <- getYesod
fileBytes <- runResourceT $ fileSource fi $$ sinkLbs
let mime = unpack $ fileContentType fi
let fileAssoc = FileAssoc { fileAssocName = unpack $ fileNam... | 632 | postHomeR = do
((result, _), _) <- runFormPost uploadForm
case result of
FormSuccess fi -> do
app <- getYesod
fileBytes <- runResourceT $ fileSource fi $$ sinkLbs
let mime = unpack $ fileContentType fi
let fileAssoc = FileAssoc { fileAssocName = unpack $ fileName fi,
... | 606 | false | true | 0 | 19 | 251 | 170 | 83 | 87 | null | null |
qnikst/ygruq | Handler/Quote.hs | bsd-2-clause | postQuoteCreateR :: Handler RepHtml
postQuoteCreateR = do
form <- quoteAForm
((result,formWidget),enctype) <- runFormPost $ renderDivs form
showOnly <- lookupPostParam "show"
case result of
FormSuccess quote -> do
when (isJust (quoteSender quote)) $
setSession "sender... | 1,111 | postQuoteCreateR :: Handler RepHtml
postQuoteCreateR = do
form <- quoteAForm
((result,formWidget),enctype) <- runFormPost $ renderDivs form
showOnly <- lookupPostParam "show"
case result of
FormSuccess quote -> do
when (isJust (quoteSender quote)) $
setSession "sender... | 1,111 | postQuoteCreateR = do
form <- quoteAForm
((result,formWidget),enctype) <- runFormPost $ renderDivs form
showOnly <- lookupPostParam "show"
case result of
FormSuccess quote -> do
when (isJust (quoteSender quote)) $
setSession "sendername" $ fromJust $ quoteSender quote... | 1,075 | false | true | 0 | 20 | 437 | 263 | 121 | 142 | null | null |
energyflowanalysis/efa-2.1 | test/EFA/Test/EquationSystem.hs | bsd-3-clause | determinateness :: IO ()
determinateness =
Test.singleIO "Check whether all quantities can be determined." $ do
let undetermined =
undeterminedFromGraph $ solveIncomplete Given.partialEquations
allDetermined = null $ undetermined
when (not allDetermined) $ do
putStrLn $ "undetermined v... | 412 | determinateness :: IO ()
determinateness =
Test.singleIO "Check whether all quantities can be determined." $ do
let undetermined =
undeterminedFromGraph $ solveIncomplete Given.partialEquations
allDetermined = null $ undetermined
when (not allDetermined) $ do
putStrLn $ "undetermined v... | 412 | determinateness =
Test.singleIO "Check whether all quantities can be determined." $ do
let undetermined =
undeterminedFromGraph $ solveIncomplete Given.partialEquations
allDetermined = null $ undetermined
when (not allDetermined) $ do
putStrLn $ "undetermined variables:\n" ++
u... | 387 | false | true | 0 | 16 | 89 | 104 | 46 | 58 | null | null |
dolio/irc-core | src/Client/Configuration.hs | isc | defaultPaddingSide :: Int -> PaddingMode
defaultPaddingSide = RightPadding | 74 | defaultPaddingSide :: Int -> PaddingMode
defaultPaddingSide = RightPadding | 74 | defaultPaddingSide = RightPadding | 33 | false | true | 0 | 5 | 7 | 15 | 8 | 7 | null | null |
mgsloan/airship | src/Airship/Internal/Decision.hs | mit | writeCacheTags :: Monad m => Resource s m -> FlowStateT s m ()
writeCacheTags Resource{..} = lift $ do
etag <- generateETag
case etag of
Nothing -> return ()
Just t -> addResponseHeader ("ETag", etagToByteString t)
modified <- lastModified
case modified of
Nothing -> return ()
... | 591 | writeCacheTags :: Monad m => Resource s m -> FlowStateT s m ()
writeCacheTags Resource{..} = lift $ do
etag <- generateETag
case etag of
Nothing -> return ()
Just t -> addResponseHeader ("ETag", etagToByteString t)
modified <- lastModified
case modified of
Nothing -> return ()
... | 591 | writeCacheTags Resource{..} = lift $ do
etag <- generateETag
case etag of
Nothing -> return ()
Just t -> addResponseHeader ("ETag", etagToByteString t)
modified <- lastModified
case modified of
Nothing -> return ()
Just d -> addResponseHeader ("Last-Modified", utcTimeToRfc1... | 528 | false | true | 0 | 13 | 108 | 144 | 68 | 76 | null | null |
tetigi/hlol | src/HLol/API/Stats.hs | agpl-3.0 | getSummaries :: Int -> IO (Either LolError PlayerStatsSummaryListDto)
getSummaries summonerId = get $ "/v1.3/stats/by-summoner/" ++ show summonerId ++ "/summary" | 161 | getSummaries :: Int -> IO (Either LolError PlayerStatsSummaryListDto)
getSummaries summonerId = get $ "/v1.3/stats/by-summoner/" ++ show summonerId ++ "/summary" | 161 | getSummaries summonerId = get $ "/v1.3/stats/by-summoner/" ++ show summonerId ++ "/summary" | 91 | false | true | 0 | 8 | 18 | 48 | 22 | 26 | null | null |
tsahyt/midi-simple | src/Sound/MIDI/Serialize.hs | lgpl-3.0 | pitch :: Pitch -> Builder
pitch = word8 . getPitch | 50 | pitch :: Pitch -> Builder
pitch = word8 . getPitch | 50 | pitch = word8 . getPitch | 24 | false | true | 0 | 7 | 9 | 26 | 11 | 15 | null | null |
ComputationWithBoundedResources/tct-trs | src/Tct/Trs/Data/RuleSelector.hs | bsd-3-clause | preventMainSelection :: (Ord v) => RuleSetSelector F v -> RuleSetSelector F v
preventMainSelection = selFilter "not main function" (not . isMainFunction) | 153 | preventMainSelection :: (Ord v) => RuleSetSelector F v -> RuleSetSelector F v
preventMainSelection = selFilter "not main function" (not . isMainFunction) | 153 | preventMainSelection = selFilter "not main function" (not . isMainFunction) | 75 | false | true | 0 | 7 | 20 | 46 | 23 | 23 | null | null |
scrive/ntp-control | Network/NTP/Control/Packet.hs | bsd-3-clause | decodeEventCode 15 = return StaleLeapsecondValues | 49 | decodeEventCode 15 = return StaleLeapsecondValues | 49 | decodeEventCode 15 = return StaleLeapsecondValues | 49 | false | false | 1 | 5 | 4 | 15 | 5 | 10 | null | null |
gabesoft/kapi | src/Handlers/Common.hs | bsd-3-clause | -- ^
-- Create an application that provides CRUD functionality for a record type
app' ::
( Enter (Entered Handler Api (ServerT api Handler)) Api Handler (ServerT api Handler)
, HasServer api '[]
)
=> Proxy api
-> Entered Handler Api (ServerT api Handler)
-> ApiConfig
-> Application
app' proxy han... | 676 | app' ::
( Enter (Entered Handler Api (ServerT api Handler)) Api Handler (ServerT api Handler)
, HasServer api '[]
)
=> Proxy api
-> Entered Handler Api (ServerT api Handler)
-> ApiConfig
-> Application
app' proxy handlers = serve proxy . server' handlers
where
server' ::
(Enter (En... | 595 | app' proxy handlers = serve proxy . server' handlers
where
server' ::
(Enter (Entered Handler Api ret) Api Handler ret)
=> Entered Handler Api ret
-> ApiConfig
-> ret
server' hs cfg = enter (toHandler cfg) hs
toHandler :: ApiConfig -> Api :~> Handler
toHandler conf = NT (`ru... | 370 | true | true | 5 | 11 | 175 | 215 | 108 | 107 | null | null |
Hrothen/Hubert | src/CSS.hs | mit | id = do
char '#'
i <- identifier
modifyState (\(Simple n _ cs) -> Simple n (Just i) cs)
-- selector class | 118 | id = do
char '#'
i <- identifier
modifyState (\(Simple n _ cs) -> Simple n (Just i) cs)
-- selector class | 118 | id = do
char '#'
i <- identifier
modifyState (\(Simple n _ cs) -> Simple n (Just i) cs)
-- selector class | 118 | false | false | 1 | 13 | 34 | 61 | 27 | 34 | null | null |
adept/hledger | hledger-lib/Hledger/Data/Journal.hs | gpl-3.0 | -- | A query for accounts in this journal which have been
-- declared as Revenue by account directives, or otherwise for
-- accounts with names matched by the case-insensitive regular expression
-- @^(income|revenue)s?(:|$)@.
journalRevenueAccountQuery :: Journal -> Query
journalRevenueAccountQuery = journalAccountType... | 355 | journalRevenueAccountQuery :: Journal -> Query
journalRevenueAccountQuery = journalAccountTypeQuery [Revenue] revenueAccountRegex | 129 | journalRevenueAccountQuery = journalAccountTypeQuery [Revenue] revenueAccountRegex | 82 | true | true | 0 | 6 | 43 | 27 | 16 | 11 | null | null |
usami-k/H-99-Ninety-Nine-Haskell-Problems | 01-10/08.hs | mit | compress (c:x:xs) | c == x = compress (x:xs) | 44 | compress (c:x:xs) | c == x = compress (x:xs) | 44 | compress (c:x:xs) | c == x = compress (x:xs) | 44 | false | false | 0 | 8 | 8 | 40 | 19 | 21 | null | null |
OH6AD/puputti | src/SpeedTestMain.hs | agpl-3.0 | main = do
[csvPath, from, to] <- getArgs
net <- readPupuCsv csvPath
results <- runTest (findBy name net from) (findBy name net to)
putStr $ unlines $ map show results
-- |Shorthand for searching by given field | 218 | main = do
[csvPath, from, to] <- getArgs
net <- readPupuCsv csvPath
results <- runTest (findBy name net from) (findBy name net to)
putStr $ unlines $ map show results
-- |Shorthand for searching by given field | 218 | main = do
[csvPath, from, to] <- getArgs
net <- readPupuCsv csvPath
results <- runTest (findBy name net from) (findBy name net to)
putStr $ unlines $ map show results
-- |Shorthand for searching by given field | 218 | false | false | 0 | 10 | 45 | 81 | 39 | 42 | null | null |
mbakke/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | runpartsSkip :: Int
runpartsSkip = 0 | 36 | runpartsSkip :: Int
runpartsSkip = 0 | 36 | runpartsSkip = 0 | 16 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
axman6/TernaryTrees | Data/Map/StringMap.hs | bsd-3-clause | insertWith f xss@(_:_) v (Null v' rest) = Null (f v v') $ insertWith f xss v rest | 84 | insertWith f xss@(_:_) v (Null v' rest) = Null (f v v') $ insertWith f xss v rest | 84 | insertWith f xss@(_:_) v (Null v' rest) = Null (f v v') $ insertWith f xss v rest | 84 | false | false | 0 | 8 | 20 | 63 | 28 | 35 | null | null |
agocorona/ghcjs-perch | src/Internal/Perch.hs | mit | source = nelem "source" | 25 | source = nelem "source" | 25 | source = nelem "source" | 25 | false | false | 1 | 5 | 5 | 13 | 4 | 9 | null | null |
bitemyapp/ghc | compiler/rename/RnSplice.hs | bsd-3-clause | --------------------------------------
-- Check for cross-stage lifting
checkThLocalName _name
= return () | 108 | checkThLocalName _name
= return () | 36 | checkThLocalName _name
= return () | 36 | true | false | 0 | 5 | 12 | 16 | 8 | 8 | null | null |
daleooo/barrelfish | tools/flounder/THCStubsBackend.hs | mit | select_idc :: Side -> BC.Direction -> IDCChannel
select_idc ClientSide BC.TX = C2S | 83 | select_idc :: Side -> BC.Direction -> IDCChannel
select_idc ClientSide BC.TX = C2S | 82 | select_idc ClientSide BC.TX = C2S | 33 | false | true | 0 | 7 | 12 | 28 | 14 | 14 | null | null |
verement/etamoo | src/MOO/Builtins/Objects.hs | bsd-3-clause | bf_delete_verb = Builtin "delete_verb" 2 (Just 2)
[TObj, TAny] TAny $ \[Obj object, verb_desc] -> do
obj <- checkValid object
getVerb obj verb_desc
unless (objectPermW obj) $ checkPermission (objectOwner obj)
numericStrings <- serverOption supportNumericVerbnameStrings
case lookupVerbRef num... | 509 | bf_delete_verb = Builtin "delete_verb" 2 (Just 2)
[TObj, TAny] TAny $ \[Obj object, verb_desc] -> do
obj <- checkValid object
getVerb obj verb_desc
unless (objectPermW obj) $ checkPermission (objectOwner obj)
numericStrings <- serverOption supportNumericVerbnameStrings
case lookupVerbRef num... | 509 | bf_delete_verb = Builtin "delete_verb" 2 (Just 2)
[TObj, TAny] TAny $ \[Obj object, verb_desc] -> do
obj <- checkValid object
getVerb obj verb_desc
unless (objectPermW obj) $ checkPermission (objectOwner obj)
numericStrings <- serverOption supportNumericVerbnameStrings
case lookupVerbRef num... | 509 | false | false | 1 | 17 | 120 | 177 | 78 | 99 | null | null |
justinethier/husk-scheme | hs-src/Language/Scheme/Numerical.hs | mit | numCast' ((Rational a), b@(Float _)) = return $ (Float $ fromRational a, b) | 75 | numCast' ((Rational a), b@(Float _)) = return $ (Float $ fromRational a, b) | 75 | numCast' ((Rational a), b@(Float _)) = return $ (Float $ fromRational a, b) | 75 | false | false | 0 | 9 | 12 | 47 | 25 | 22 | null | null |
rueshyna/gogol | gogol-pagespeed/gen/Network/Google/PageSpeed/Types/Product.hs | mpl-2.0 | -- | Heading to be displayed with the list of URLs.
rfrrraubiHeader :: Lens' ResultFormattedResultsRuleResultsAdditionalURLBlocksItem (Maybe PagespeedAPIFormatStringV2)
rfrrraubiHeader
= lens _rfrrraubiHeader
(\ s a -> s{_rfrrraubiHeader = a}) | 251 | rfrrraubiHeader :: Lens' ResultFormattedResultsRuleResultsAdditionalURLBlocksItem (Maybe PagespeedAPIFormatStringV2)
rfrrraubiHeader
= lens _rfrrraubiHeader
(\ s a -> s{_rfrrraubiHeader = a}) | 199 | rfrrraubiHeader
= lens _rfrrraubiHeader
(\ s a -> s{_rfrrraubiHeader = a}) | 82 | true | true | 0 | 9 | 35 | 48 | 25 | 23 | null | null |
geophf/1HaskellADay | exercises/HAD/Data/BlockChain/Block/Web.hs | mit | link :: String -> Hash -> Element
link branch hash = link' branch hash hash | 75 | link :: String -> Hash -> Element
link branch hash = link' branch hash hash | 75 | link branch hash = link' branch hash hash | 41 | false | true | 0 | 6 | 14 | 31 | 15 | 16 | null | null |
tomlokhorst/dutchhug-nl | src/WikiScrape.hs | bsd-2-clause | stail (_:xs) = xs | 17 | stail (_:xs) = xs | 17 | stail (_:xs) = xs | 17 | false | false | 0 | 6 | 3 | 17 | 8 | 9 | null | null |
mikeizbicki/Classification | src/Plots.hs | bsd-3-clause | swapL :: Char -> Char -> String -> String
swapL x y ls = map (\c -> if c==x
then y
else c) ls | 151 | swapL :: Char -> Char -> String -> String
swapL x y ls = map (\c -> if c==x
then y
else c) ls | 151 | swapL x y ls = map (\c -> if c==x
then y
else c) ls | 109 | false | true | 0 | 9 | 81 | 55 | 29 | 26 | null | null |
mcschroeder/ghc | compiler/stranal/DmdAnal.hs | bsd-3-clause | setBndrsDemandInfo bs _ = pprPanic "setBndrsDemandInfo" (ppr bs) | 65 | setBndrsDemandInfo bs _ = pprPanic "setBndrsDemandInfo" (ppr bs) | 65 | setBndrsDemandInfo bs _ = pprPanic "setBndrsDemandInfo" (ppr bs) | 65 | false | false | 0 | 7 | 8 | 22 | 10 | 12 | null | null |
rahulmutt/ghcvm | compiler/Eta/SimplCore/LiberateCase.hs | bsd-3-clause | libCase _ (Coercion co) = Coercion co | 45 | libCase _ (Coercion co) = Coercion co | 45 | libCase _ (Coercion co) = Coercion co | 45 | false | false | 0 | 7 | 14 | 20 | 9 | 11 | null | null |
zalora/cl-aws | src/PutMetric.hs | mpl-2.0 | putMetricParser :: O.Parser PutMetric
putMetricParser = PutMetric
<$> O.option O.auto (makeOption "region")
<*> O.option text (makeOption "namespace")
<*> O.option text (makeOption "metricName")
<*> O.option O.auto (makeOption "value")
<*> O.many (O.option O.auto (makeOption "dimension"))
<*> O.... | 366 | putMetricParser :: O.Parser PutMetric
putMetricParser = PutMetric
<$> O.option O.auto (makeOption "region")
<*> O.option text (makeOption "namespace")
<*> O.option text (makeOption "metricName")
<*> O.option O.auto (makeOption "value")
<*> O.many (O.option O.auto (makeOption "dimension"))
<*> O.... | 366 | putMetricParser = PutMetric
<$> O.option O.auto (makeOption "region")
<*> O.option text (makeOption "namespace")
<*> O.option text (makeOption "metricName")
<*> O.option O.auto (makeOption "value")
<*> O.many (O.option O.auto (makeOption "dimension"))
<*> O.optional (O.option O.auto (makeOption ... | 328 | false | true | 17 | 9 | 62 | 158 | 78 | 80 | null | null |
edx/patch-juggler | Juggler/Types.hs | bsd-3-clause | end :: (Num a, HasLength s a, HasStart s a) => Lens' s a
end = lens getter setter
where getter r = r ^. start + r ^. length
setter r e = r & length .~ (e - r ^. start) | 181 | end :: (Num a, HasLength s a, HasStart s a) => Lens' s a
end = lens getter setter
where getter r = r ^. start + r ^. length
setter r e = r & length .~ (e - r ^. start) | 181 | end = lens getter setter
where getter r = r ^. start + r ^. length
setter r e = r & length .~ (e - r ^. start) | 124 | false | true | 0 | 10 | 56 | 97 | 49 | 48 | null | null |
RossMeikleham/Project-Euler-Haskell | 11.hs | mit | grid = V.fromList [
08, 02, 22, 97, 38, 15, 00, 40, 00, 75, 04, 05, 07, 78, 52, 12, 50, 77, 91, 08,
49, 49, 99, 40, 17, 81, 18, 57, 60, 87, 17, 40, 98, 43, 69, 48, 04, 56, 62, 00,
81, 49, 31, 73, 55, 79, 14, 29, 93, 71, 40, 67, 53, 88, 30, 03, 49, 13, 36, 65,
52, 70, 95, 23, 04, 60, 11, 42, 69, 24, 68, ... | 1,704 | grid = V.fromList [
08, 02, 22, 97, 38, 15, 00, 40, 00, 75, 04, 05, 07, 78, 52, 12, 50, 77, 91, 08,
49, 49, 99, 40, 17, 81, 18, 57, 60, 87, 17, 40, 98, 43, 69, 48, 04, 56, 62, 00,
81, 49, 31, 73, 55, 79, 14, 29, 93, 71, 40, 67, 53, 88, 30, 03, 49, 13, 36, 65,
52, 70, 95, 23, 04, 60, 11, 42, 69, 24, 68, ... | 1,704 | grid = V.fromList [
08, 02, 22, 97, 38, 15, 00, 40, 00, 75, 04, 05, 07, 78, 52, 12, 50, 77, 91, 08,
49, 49, 99, 40, 17, 81, 18, 57, 60, 87, 17, 40, 98, 43, 69, 48, 04, 56, 62, 00,
81, 49, 31, 73, 55, 79, 14, 29, 93, 71, 40, 67, 53, 88, 30, 03, 49, 13, 36, 65,
52, 70, 95, 23, 04, 60, 11, 42, 69, 24, 68, ... | 1,704 | false | false | 0 | 6 | 488 | 1,211 | 805 | 406 | null | null |
siddhanathan/ghc | libraries/template-haskell/Language/Haskell/TH/PprLib.hs | bsd-3-clause | hsep = liftM HPJ.hsep . sequence | 32 | hsep = liftM HPJ.hsep . sequence | 32 | hsep = liftM HPJ.hsep . sequence | 32 | false | false | 1 | 6 | 5 | 19 | 7 | 12 | null | null |
HaskellForCats/HaskellForCats | LearnYouAHaskell/LearnCh3.hs | mit | -- where xs = [(1,3),(4,3),(2,4),(5,3),(5,6),(3,1)]
tell [] = "The list is empty" | 82 | tell [] = "The list is empty" | 29 | tell [] = "The list is empty" | 29 | true | false | 1 | 5 | 12 | 16 | 6 | 10 | null | null |
alexander-at-github/eta | compiler/ETA/Prelude/PrimOp.hs | bsd-3-clause | primOpHasSideEffects PrefetchByteArrayOp1 = True | 48 | primOpHasSideEffects PrefetchByteArrayOp1 = True | 48 | primOpHasSideEffects PrefetchByteArrayOp1 = True | 48 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
PavelClaudiuStefan/FMI | An_3_Semestru_1/ProgramareDeclarativa/Laboratoare/Laborator7/lab7.hs | cc0-1.0 | -- Functions for handling Props
-- turns a Prop into a string approximating mathematical notation
showProp :: Prop -> String
showProp (Var x) = x | 154 | showProp :: Prop -> String
showProp (Var x) = x | 55 | showProp (Var x) = x | 28 | true | true | 0 | 7 | 33 | 26 | 14 | 12 | null | null |
brownsys/pane | src/Parser.hs | bsd-3-clause | hexByte = do
let hexChar = oneOf ([ '0' .. '9' ] ++ [ 'a' .. 'f' ] ++ [ 'A' .. 'F' ])
ch1 <- hexChar
ch2 <- hexChar
let b :: Word8 = read ['0','x',ch1,ch2]
return b | 174 | hexByte = do
let hexChar = oneOf ([ '0' .. '9' ] ++ [ 'a' .. 'f' ] ++ [ 'A' .. 'F' ])
ch1 <- hexChar
ch2 <- hexChar
let b :: Word8 = read ['0','x',ch1,ch2]
return b | 174 | hexByte = do
let hexChar = oneOf ([ '0' .. '9' ] ++ [ 'a' .. 'f' ] ++ [ 'A' .. 'F' ])
ch1 <- hexChar
ch2 <- hexChar
let b :: Word8 = read ['0','x',ch1,ch2]
return b | 174 | false | false | 0 | 14 | 48 | 96 | 49 | 47 | null | null |
txkaduo/hs-hash-utils | Crypto/Hash/TX/Utils.hs | bsd-3-clause | md5HashLBS :: LB.ByteString -> MD5Hash
md5HashLBS = MD5Hash . MD5.hashlazy | 74 | md5HashLBS :: LB.ByteString -> MD5Hash
md5HashLBS = MD5Hash . MD5.hashlazy | 74 | md5HashLBS = MD5Hash . MD5.hashlazy | 35 | false | true | 0 | 6 | 9 | 23 | 12 | 11 | null | null |
Lysxia/breadcrumbs | Data/Breadcrumbs/Internal.hs | mit | runBoundedStream :: Int -> IOStream a -> IO [a]
runBoundedStream 0 = const (return []) | 86 | runBoundedStream :: Int -> IOStream a -> IO [a]
runBoundedStream 0 = const (return []) | 86 | runBoundedStream 0 = const (return []) | 38 | false | true | 0 | 8 | 14 | 42 | 20 | 22 | null | null |
rueshyna/gogol | gogol-youtube/gen/Network/Google/Resource/YouTube/Subscriptions/List.hs | mpl-2.0 | -- | Creates a value of 'SubscriptionsList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'subPart'
--
-- * 'subMine'
--
-- * 'subChannelId'
--
-- * 'subMyRecentSubscribers'
--
-- * 'subOnBehalfOfContentOwner'
--
-- * 'subOnBehalfOfC... | 994 | subscriptionsList
:: Text -- ^ 'subPart'
-> SubscriptionsList
subscriptionsList pSubPart_ =
SubscriptionsList'
{ _subPart = pSubPart_
, _subMine = Nothing
, _subChannelId = Nothing
, _subMyRecentSubscribers = Nothing
, _subOnBehalfOfContentOwner = Nothing
, _subOnBehalfOfContentOwner... | 519 | subscriptionsList pSubPart_ =
SubscriptionsList'
{ _subPart = pSubPart_
, _subMine = Nothing
, _subChannelId = Nothing
, _subMyRecentSubscribers = Nothing
, _subOnBehalfOfContentOwner = Nothing
, _subOnBehalfOfContentOwnerChannel = Nothing
, _subId = Nothing
, _subMySubscribers = Not... | 449 | true | true | 0 | 7 | 202 | 129 | 88 | 41 | null | null |
DanielSchuessler/hstri | Blender/Init.hs | gpl-3.0 | lamp_init :: PythonVar -> BlenderLamp -> Python ()
lamp_init lightVar l =
case l of
Sun{..} -> do
lightVar .= methodCallExpr (bpy_dat "lamps") "new" (str lamp_name, str "SUN")
lightVar <.> "shadow_method" .= str "RAY_SHADOW" | 263 | lamp_init :: PythonVar -> BlenderLamp -> Python ()
lamp_init lightVar l =
case l of
Sun{..} -> do
lightVar .= methodCallExpr (bpy_dat "lamps") "new" (str lamp_name, str "SUN")
lightVar <.> "shadow_method" .= str "RAY_SHADOW" | 263 | lamp_init lightVar l =
case l of
Sun{..} -> do
lightVar .= methodCallExpr (bpy_dat "lamps") "new" (str lamp_name, str "SUN")
lightVar <.> "shadow_method" .= str "RAY_SHADOW" | 212 | false | true | 0 | 13 | 72 | 91 | 43 | 48 | null | null |
GaloisInc/haskell-tor | src/Tor/DataFormat/TorCell.hs | bsd-3-clause | putHandshakeType NTor = putWord16be 0x0002 | 49 | putHandshakeType NTor = putWord16be 0x0002 | 49 | putHandshakeType NTor = putWord16be 0x0002 | 49 | false | false | 1 | 5 | 11 | 15 | 5 | 10 | null | null |
nna774/term | Testing/Term.hs | gpl-3.0 | containFreeValsT :: Term -> [Char]
containFreeValsT O = [] | 58 | containFreeValsT :: Term -> [Char]
containFreeValsT O = [] | 58 | containFreeValsT O = [] | 23 | false | true | 0 | 6 | 8 | 23 | 12 | 11 | null | null |
meiersi/psqueues-old | tests/Data/PSQ/Class/Tests.hs | bsd-3-clause | test_equality
:: forall psq. (PSQ psq, TestKey (Key psq),
Eq (psq Int Char))
=> Tagged psq Assertion
test_equality = Tagged $ do
-- Mostly to get 100% coverage
assert $ e /= s
assert $ s /= e
where
e = empty :: psq Int Char
s = singleton 3 100 'a' :: psq I... | 327 | test_equality
:: forall psq. (PSQ psq, TestKey (Key psq),
Eq (psq Int Char))
=> Tagged psq Assertion
test_equality = Tagged $ do
-- Mostly to get 100% coverage
assert $ e /= s
assert $ s /= e
where
e = empty :: psq Int Char
s = singleton 3 100 'a' :: psq I... | 327 | test_equality = Tagged $ do
-- Mostly to get 100% coverage
assert $ e /= s
assert $ s /= e
where
e = empty :: psq Int Char
s = singleton 3 100 'a' :: psq Int Char | 198 | false | true | 5 | 10 | 119 | 133 | 61 | 72 | null | null |
lukexi/ghc | compiler/codeGen/StgCmmLayout.hs | bsd-3-clause | nonVArgs :: [(ArgRep, Maybe CmmExpr)] -> [CmmExpr]
nonVArgs [] = [] | 67 | nonVArgs :: [(ArgRep, Maybe CmmExpr)] -> [CmmExpr]
nonVArgs [] = [] | 67 | nonVArgs [] = [] | 16 | false | true | 0 | 8 | 10 | 37 | 20 | 17 | null | null |
pa-ba/alfred | examples/DBLP.hs | bsd-3-clause | main = runScript (transformQuery getAuthors runQuery) mkItems | 61 | main = runScript (transformQuery getAuthors runQuery) mkItems | 61 | main = runScript (transformQuery getAuthors runQuery) mkItems | 61 | false | false | 1 | 7 | 6 | 23 | 9 | 14 | null | null |
sorki/odrive | src/LDrive/Control/Transform.hs | bsd-3-clause | clarke :: IFloat -> IFloat -> (IFloat, IFloat)
clarke pb pc = (alpha, beta)
where
alpha = -pb - pc
beta = (pb - pc) / (sqrt 3) | 137 | clarke :: IFloat -> IFloat -> (IFloat, IFloat)
clarke pb pc = (alpha, beta)
where
alpha = -pb - pc
beta = (pb - pc) / (sqrt 3) | 137 | clarke pb pc = (alpha, beta)
where
alpha = -pb - pc
beta = (pb - pc) / (sqrt 3) | 90 | false | true | 0 | 7 | 38 | 72 | 39 | 33 | null | null |
phischu/fragnix | tests/packages/scotty/Network.Wai.Handler.Warp.HTTP2.Worker.hs | bsd-3-clause | getStreamInfo :: StreamInfo -> IO (Maybe Input)
getStreamInfo (StreamInfo ref) = readIORef ref | 94 | getStreamInfo :: StreamInfo -> IO (Maybe Input)
getStreamInfo (StreamInfo ref) = readIORef ref | 94 | getStreamInfo (StreamInfo ref) = readIORef ref | 46 | false | true | 0 | 8 | 12 | 36 | 17 | 19 | null | null |
anttisalonen/cgen | src/HeaderParser.hs | bsd-3-clause | enum :: CharParser HeaderState Object
enum = do
_ <- many1 whitespace
n <- identifier
spaces
_ <- char '{'
vals <- sepBy1 enumVal (char ',')
spaces
optional (char ',')
spaces
_ <- char '}'
spaces
_ <- eos
spaces
cls <- classstack <$> getState
return $ EnumDef n va... | 326 | enum :: CharParser HeaderState Object
enum = do
_ <- many1 whitespace
n <- identifier
spaces
_ <- char '{'
vals <- sepBy1 enumVal (char ',')
spaces
optional (char ',')
spaces
_ <- char '}'
spaces
_ <- eos
spaces
cls <- classstack <$> getState
return $ EnumDef n va... | 326 | enum = do
_ <- many1 whitespace
n <- identifier
spaces
_ <- char '{'
vals <- sepBy1 enumVal (char ',')
spaces
optional (char ',')
spaces
_ <- char '}'
spaces
_ <- eos
spaces
cls <- classstack <$> getState
return $ EnumDef n vals cls | 288 | false | true | 0 | 10 | 106 | 130 | 55 | 75 | null | null |
javgh/bitcoin-rpc | Network/BitcoinRPC/Types.hs | bsd-3-clause | blockHashAsByteString :: BlockHash -> B.ByteString
blockHashAsByteString = E.encodeUtf8 . btcBlockHash | 102 | blockHashAsByteString :: BlockHash -> B.ByteString
blockHashAsByteString = E.encodeUtf8 . btcBlockHash | 102 | blockHashAsByteString = E.encodeUtf8 . btcBlockHash | 51 | false | true | 0 | 8 | 9 | 30 | 13 | 17 | null | null |
keithodulaigh/Hets | THF/HasCASL2THF0Buildins.hs | gpl-2.0 | o3ci :: Constant -> ConstInfo
o3ci c = ConstInfo
{ constId = c
, constName = mkConstsName c
, constType = MapType OType (MapType OType OType)
, constAnno = Null } | 178 | o3ci :: Constant -> ConstInfo
o3ci c = ConstInfo
{ constId = c
, constName = mkConstsName c
, constType = MapType OType (MapType OType OType)
, constAnno = Null } | 178 | o3ci c = ConstInfo
{ constId = c
, constName = mkConstsName c
, constType = MapType OType (MapType OType OType)
, constAnno = Null } | 148 | false | true | 0 | 10 | 46 | 69 | 35 | 34 | null | null |
imalsogreg/GameTheory | src/MockButtons.hs | bsd-3-clause | draw :: World -> IO Picture
draw w = do
a <- oneoffRead leftCoopFile
b <- oneoffRead leftCheatFile
c <- oneoffRead rightCoopFile
d <- oneoffRead rightCheatFile
putStrLn $ (map head [a,b,c,d])
return $ circle 10 | 222 | draw :: World -> IO Picture
draw w = do
a <- oneoffRead leftCoopFile
b <- oneoffRead leftCheatFile
c <- oneoffRead rightCoopFile
d <- oneoffRead rightCheatFile
putStrLn $ (map head [a,b,c,d])
return $ circle 10 | 222 | draw w = do
a <- oneoffRead leftCoopFile
b <- oneoffRead leftCheatFile
c <- oneoffRead rightCoopFile
d <- oneoffRead rightCheatFile
putStrLn $ (map head [a,b,c,d])
return $ circle 10 | 194 | false | true | 0 | 11 | 46 | 102 | 46 | 56 | null | null |
beni55/text | tests/Tests/Properties.hs | bsd-2-clause | stripSuffix p t = reverse `fmap` L.stripPrefix (reverse p) (reverse t) | 70 | stripSuffix p t = reverse `fmap` L.stripPrefix (reverse p) (reverse t) | 70 | stripSuffix p t = reverse `fmap` L.stripPrefix (reverse p) (reverse t) | 70 | false | false | 0 | 8 | 10 | 36 | 18 | 18 | null | null |
pparkkin/eta | compiler/ETA/Prelude/PrimOp.hs | bsd-3-clause | primOpInfo SizeofMutableArrayArrayOp = mkGenPrimOp (fsLit "sizeofMutableArrayArray#") [deltaTyVar] [mkMutableArrayArrayPrimTy deltaTy] (intPrimTy) | 147 | primOpInfo SizeofMutableArrayArrayOp = mkGenPrimOp (fsLit "sizeofMutableArrayArray#") [deltaTyVar] [mkMutableArrayArrayPrimTy deltaTy] (intPrimTy) | 147 | primOpInfo SizeofMutableArrayArrayOp = mkGenPrimOp (fsLit "sizeofMutableArrayArray#") [deltaTyVar] [mkMutableArrayArrayPrimTy deltaTy] (intPrimTy) | 147 | false | false | 0 | 7 | 10 | 36 | 18 | 18 | null | null |
EricYT/Haskell | src/chapter-7.hs | apache-2.0 | area (Rectangle x1 y1 x2 y2) = (abs $ x2 - x1) * (abs $ y2 - y1) | 64 | area (Rectangle x1 y1 x2 y2) = (abs $ x2 - x1) * (abs $ y2 - y1) | 64 | area (Rectangle x1 y1 x2 y2) = (abs $ x2 - x1) * (abs $ y2 - y1) | 64 | false | false | 0 | 8 | 17 | 47 | 24 | 23 | null | null |
vrthra/v | src/VPrim.hs | gpl-2.0 | prim = [("+", VPFunc_ vAdd), ("-", VPFunc_ vSub), ("*", VPFunc_ vMul),
("i", VIOFunc_ vI),
("puts", VIOFunc_ vPuts),
("dup", VPFunc_ vDup),
("swap", VPFunc_ vSwap),
("?", VPFunc_ vDebug), (".", VPFunc_ vDef) ] | 247 | prim = [("+", VPFunc_ vAdd), ("-", VPFunc_ vSub), ("*", VPFunc_ vMul),
("i", VIOFunc_ vI),
("puts", VIOFunc_ vPuts),
("dup", VPFunc_ vDup),
("swap", VPFunc_ vSwap),
("?", VPFunc_ vDebug), (".", VPFunc_ vDef) ] | 247 | prim = [("+", VPFunc_ vAdd), ("-", VPFunc_ vSub), ("*", VPFunc_ vMul),
("i", VIOFunc_ vI),
("puts", VIOFunc_ vPuts),
("dup", VPFunc_ vDup),
("swap", VPFunc_ vSwap),
("?", VPFunc_ vDebug), (".", VPFunc_ vDef) ] | 247 | false | false | 1 | 7 | 67 | 117 | 66 | 51 | null | null |
zcesur/h99 | src/Problems54Athru60.hs | gpl-3.0 | insertAt (Node l v r) [] = error "The path collides with an existing node." | 75 | insertAt (Node l v r) [] = error "The path collides with an existing node." | 75 | insertAt (Node l v r) [] = error "The path collides with an existing node." | 75 | false | false | 0 | 6 | 14 | 28 | 12 | 16 | null | null |
gcampax/ghc | compiler/basicTypes/Id.hs | bsd-3-clause | isOneShotLambda :: Id -> Bool
isOneShotLambda id = case idOneShotInfo id of
OneShotLam -> True
_ -> False | 160 | isOneShotLambda :: Id -> Bool
isOneShotLambda id = case idOneShotInfo id of
OneShotLam -> True
_ -> False | 160 | isOneShotLambda id = case idOneShotInfo id of
OneShotLam -> True
_ -> False | 130 | false | true | 0 | 7 | 72 | 37 | 18 | 19 | null | null |
NorfairKing/the-notes | src/Sets/Algebra/Complement.hs | gpl-2.0 | complementaryLawUnion :: Note
complementaryLawUnion = thm $ do
lab unionComplementaryLawTheoremLabel
s [the, defineTerm "complementary law", " for the set ", union]
let (a, b, x, y) = ("A", "B", "x", "y")
s ["Let ", m a, and, m b, " be sets"]
ma $ a ∪ setc a =§= setuniv
proof $ do
align... | 877 | complementaryLawUnion :: Note
complementaryLawUnion = thm $ do
lab unionComplementaryLawTheoremLabel
s [the, defineTerm "complementary law", " for the set ", union]
let (a, b, x, y) = ("A", "B", "x", "y")
s ["Let ", m a, and, m b, " be sets"]
ma $ a ∪ setc a =§= setuniv
proof $ do
align... | 877 | complementaryLawUnion = thm $ do
lab unionComplementaryLawTheoremLabel
s [the, defineTerm "complementary law", " for the set ", union]
let (a, b, x, y) = ("A", "B", "x", "y")
s ["Let ", m a, and, m b, " be sets"]
ma $ a ∪ setc a =§= setuniv
proof $ do
align_ $
[
... | 847 | false | true | 0 | 23 | 344 | 447 | 239 | 208 | null | null |
cmahon/interactive-brokers | library/API/IB/Data.hs | bsd-3-clause | parseDecimalField' :: Parser Decimal
parseDecimalField' = (parseEmptyField *> return 0) <|> parseDecimalField | 109 | parseDecimalField' :: Parser Decimal
parseDecimalField' = (parseEmptyField *> return 0) <|> parseDecimalField | 109 | parseDecimalField' = (parseEmptyField *> return 0) <|> parseDecimalField | 72 | false | true | 0 | 8 | 11 | 28 | 14 | 14 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.