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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
amir-sabbaghi/proxy | app/Main.hs | gpl-3.0 | parseArgs ("-p":as) s = parseArgs ("--port":as) s | 49 | parseArgs ("-p":as) s = parseArgs ("--port":as) s | 49 | parseArgs ("-p":as) s = parseArgs ("--port":as) s | 49 | false | false | 0 | 7 | 6 | 30 | 15 | 15 | null | null |
codingiam/sandbox-hs | src/Ch02a.hs | bsd-3-clause | myInfo :: BookInfo
myInfo = Book 9780135072455 "Algebra of Programming"
["Richard Bird", "Oege de Moor"] | 106 | myInfo :: BookInfo
myInfo = Book 9780135072455 "Algebra of Programming"
["Richard Bird", "Oege de Moor"] | 106 | myInfo = Book 9780135072455 "Algebra of Programming"
["Richard Bird", "Oege de Moor"] | 87 | false | true | 0 | 5 | 16 | 25 | 13 | 12 | null | null |
ghcjs/haddock-internal | vendor/attoparsec-0.10.4.0/Data/Attoparsec/ByteString/Internal.hs | bsd-2-clause | ensure' :: Int -> Input -> Added -> More -> Failure r -> Success B.ByteString r
-> IResult B.ByteString r
ensure' !n0 i0 a0 m0 kf0 ks0 =
T.runParser (demandInput >> go n0) i0 a0 m0 kf0 ks0
where
go !n = T.Parser $ \i a m kf ks ->
if B.length (unI i) >= n
then ks i a m (unI i)
e... | 466 | ensure' :: Int -> Input -> Added -> More -> Failure r -> Success B.ByteString r
-> IResult B.ByteString r
ensure' !n0 i0 a0 m0 kf0 ks0 =
T.runParser (demandInput >> go n0) i0 a0 m0 kf0 ks0
where
go !n = T.Parser $ \i a m kf ks ->
if B.length (unI i) >= n
then ks i a m (unI i)
e... | 466 | ensure' !n0 i0 a0 m0 kf0 ks0 =
T.runParser (demandInput >> go n0) i0 a0 m0 kf0 ks0
where
go !n = T.Parser $ \i a m kf ks ->
if B.length (unI i) >= n
then ks i a m (unI i)
else T.runParser (demandInput >> go n) i a m kf ks
-- | If at least @n@ bytes of input are available, return the c... | 352 | false | true | 0 | 12 | 134 | 187 | 91 | 96 | null | null |
Crazycolorz5/Haskell-Code | Delaunay Fractal.hs | unlicense | d::Int->Double
d 1 = 1.0 | 24 | d::Int->Double
d 1 = 1.0 | 24 | d 1 = 1.0 | 9 | false | true | 0 | 7 | 4 | 25 | 10 | 15 | null | null |
NicolasT/paxos | src/Network/Paxos/Synod.hs | lgpl-2.1 | -- | Tests for modules in "Network.Paxos.Synod"
tests :: Test
tests = testGroup "Network.Paxos.Synod" [
Network.Paxos.Synod.Types.tests
, Network.Paxos.Synod.Proposer.tests
, Network.Paxos.Synod.Acceptor.tests
, Network.Paxos.Synod.Learner.tests
, Network.Paxos.Synod.Messages.t... | 334 | tests :: Test
tests = testGroup "Network.Paxos.Synod" [
Network.Paxos.Synod.Types.tests
, Network.Paxos.Synod.Proposer.tests
, Network.Paxos.Synod.Acceptor.tests
, Network.Paxos.Synod.Learner.tests
, Network.Paxos.Synod.Messages.tests
] | 286 | tests = testGroup "Network.Paxos.Synod" [
Network.Paxos.Synod.Types.tests
, Network.Paxos.Synod.Proposer.tests
, Network.Paxos.Synod.Acceptor.tests
, Network.Paxos.Synod.Learner.tests
, Network.Paxos.Synod.Messages.tests
] | 272 | true | true | 0 | 7 | 74 | 64 | 40 | 24 | null | null |
spaceships/circuit-synthesis | src/Examples/Comparison.hs | mit | -- returns less-than-or-equals
-- first input comes in unary form for instance 0 -> [1,0,0,0] or 3 -> [0,0,0,1]
-- second input is expected to come in special negated unary form: 0 -> [1,0,0,0], 3 -> [1,1,1,1]
comparison :: Int -> Circuit ArithGate
comparison maxVal = buildCircuit $ do
xs <- symbol maxVal
ys <-... | 444 | comparison :: Int -> Circuit ArithGate
comparison maxVal = buildCircuit $ do
xs <- symbol maxVal
ys <- symbol maxVal -- assumed to come in the negated sigma vector form
z <- circSum =<< zipWithM circMul xs ys
output z | 234 | comparison maxVal = buildCircuit $ do
xs <- symbol maxVal
ys <- symbol maxVal -- assumed to come in the negated sigma vector form
z <- circSum =<< zipWithM circMul xs ys
output z | 195 | true | true | 0 | 11 | 93 | 78 | 35 | 43 | null | null |
bobjflong/scalpel | src/Shelduck/Internal.hs | apache-2.0 | record :: Maybe Text -> TVar (Maybe Text) -> IO ()
record t r = atomically $ writeTVar r t | 90 | record :: Maybe Text -> TVar (Maybe Text) -> IO ()
record t r = atomically $ writeTVar r t | 90 | record t r = atomically $ writeTVar r t | 39 | false | true | 0 | 9 | 19 | 50 | 23 | 27 | null | null |
zachsully/hakaru | haskell/Language/Hakaru/Syntax/AST/Transforms.hs | bsd-3-clause | underLam
:: (ABT Term abt, Monad m)
=> (abt '[] b -> m (abt '[] b))
-> abt '[] (a ':-> b)
-> m (abt '[] (a ':-> b))
underLam f e = caseVarSyn e (return . var) $ \t ->
case t of
Lam_ :$ e1 :* End ->
caseBind e1 $ \x e1' -> do
... | 1,076 | underLam
:: (ABT Term abt, Monad m)
=> (abt '[] b -> m (abt '[] b))
-> abt '[] (a ':-> b)
-> m (abt '[] (a ':-> b))
underLam f e = caseVarSyn e (return . var) $ \t ->
case t of
Lam_ :$ e1 :* End ->
caseBind e1 $ \x e1' -> do
... | 1,076 | underLam f e = caseVarSyn e (return . var) $ \t ->
case t of
Lam_ :$ e1 :* End ->
caseBind e1 $ \x e1' -> do
e1'' <- f e1'
return . syn $
Lam_ :$ (bind x e1'' :* End)
... | 944 | false | true | 0 | 21 | 652 | 364 | 175 | 189 | null | null |
shepheb/autofocus | Settings.hs | bsd-2-clause | -- | The location of static files on your system. This is a file system
-- path. The default value works properly with your scaffolded site.
staticdir :: FilePath
staticdir = "static" | 183 | staticdir :: FilePath
staticdir = "static" | 42 | staticdir = "static" | 20 | true | true | 0 | 6 | 31 | 20 | 9 | 11 | null | null |
snoyberg/ghc | compiler/codeGen/StgCmmPrim.hs | bsd-3-clause | translateOp dflags ISrlOp = Just (mo_wordUShr dflags) | 61 | translateOp dflags ISrlOp = Just (mo_wordUShr dflags) | 61 | translateOp dflags ISrlOp = Just (mo_wordUShr dflags) | 61 | false | false | 0 | 7 | 14 | 20 | 9 | 11 | null | null |
OCExercise/haskellbook-solutions | chapters/chapter08/exercises/wordnumber.hs | bsd-2-clause | intToArrayOfIntsDec :: Integral a => a -> a -> [a]
intToArrayOfIntsDec n 0 = error "No int supplied" | 100 | intToArrayOfIntsDec :: Integral a => a -> a -> [a]
intToArrayOfIntsDec n 0 = error "No int supplied" | 100 | intToArrayOfIntsDec n 0 = error "No int supplied" | 49 | false | true | 0 | 8 | 17 | 37 | 18 | 19 | null | null |
GRACeFUL-project/GRACe | src/Compile1.hs | bsd-3-clause | translateActionCommands' :: ActCommand a -> IntermMonad a
translateActionCommands' (Act expr (Action _ (Param _ (Port j)))) = do
exprc <- compileCPExp' expr
let line = constr (HZ.Var (actName $ varID j) HZBuiltIns.->. (HZ.Var (varName $ varID j) HZBuiltIns.=.= exprc))
modify $ \st -> st { model = model st ++ [lin... | 345 | translateActionCommands' :: ActCommand a -> IntermMonad a
translateActionCommands' (Act expr (Action _ (Param _ (Port j)))) = do
exprc <- compileCPExp' expr
let line = constr (HZ.Var (actName $ varID j) HZBuiltIns.->. (HZ.Var (varName $ varID j) HZBuiltIns.=.= exprc))
modify $ \st -> st { model = model st ++ [lin... | 345 | translateActionCommands' (Act expr (Action _ (Param _ (Port j)))) = do
exprc <- compileCPExp' expr
let line = constr (HZ.Var (actName $ varID j) HZBuiltIns.->. (HZ.Var (varName $ varID j) HZBuiltIns.=.= exprc))
modify $ \st -> st { model = model st ++ [line]
} | 287 | false | true | 0 | 18 | 78 | 154 | 75 | 79 | null | null |
ElArtista/GTee | Shakefile.hs | mit | msvcCompileCommand :: CompileAction
msvcCompileCommand params input output =
unwords $ cxx ++ ["/c"] ++ ["/Fo", output] ++ defs ++ incls ++ [input]
where
cxx = ["cl"]
defs = map ("/D" ++) (defines params)
incls = map ("/I" ++) (includePaths params)
-- | Generates Msvc link commands | 309 | msvcCompileCommand :: CompileAction
msvcCompileCommand params input output =
unwords $ cxx ++ ["/c"] ++ ["/Fo", output] ++ defs ++ incls ++ [input]
where
cxx = ["cl"]
defs = map ("/D" ++) (defines params)
incls = map ("/I" ++) (includePaths params)
-- | Generates Msvc link commands | 308 | msvcCompileCommand params input output =
unwords $ cxx ++ ["/c"] ++ ["/Fo", output] ++ defs ++ incls ++ [input]
where
cxx = ["cl"]
defs = map ("/D" ++) (defines params)
incls = map ("/I" ++) (includePaths params)
-- | Generates Msvc link commands | 272 | false | true | 0 | 10 | 72 | 106 | 58 | 48 | null | null |
rueshyna/gogol | gogol-spectrum/gen/Network/Google/Spectrum/Types/Product.hs | mpl-2.0 | -- | A floating-point number that expresses the location uncertainty along
-- the minor axis of the ellipse. May be required by the regulatory domain.
-- When the uncertainty is optional, the default value is 0.
gleSemiMinorAxis :: Lens' GeoLocationEllipse (Maybe Double)
gleSemiMinorAxis
= lens _gleSemiMinorAxis
... | 381 | gleSemiMinorAxis :: Lens' GeoLocationEllipse (Maybe Double)
gleSemiMinorAxis
= lens _gleSemiMinorAxis
(\ s a -> s{_gleSemiMinorAxis = a})
. mapping _Coerce | 169 | gleSemiMinorAxis
= lens _gleSemiMinorAxis
(\ s a -> s{_gleSemiMinorAxis = a})
. mapping _Coerce | 109 | true | true | 2 | 8 | 69 | 62 | 30 | 32 | null | null |
brendanhay/gogol | gogol-cloudasset/gen/Network/Google/CloudAsset/Types/Product.hs | mpl-2.0 | -- | If the value is \`false\`, it means the operation is still in progress.
-- If \`true\`, the operation is completed, and either \`error\` or
-- \`response\` is available.
oDone :: Lens' Operation (Maybe Bool)
oDone = lens _oDone (\ s a -> s{_oDone = a}) | 257 | oDone :: Lens' Operation (Maybe Bool)
oDone = lens _oDone (\ s a -> s{_oDone = a}) | 82 | oDone = lens _oDone (\ s a -> s{_oDone = a}) | 44 | true | true | 1 | 9 | 46 | 52 | 27 | 25 | null | null |
yu-i9/HaSC | src/HaSC/Prim/Semantic.hs | mit | declTypeCheck (A_Func p info args body)
= case getRetType info of
(Just ty) -> do retTy <- stmtTypeCheck (objName info, ty) body
when (ty /= retTy) (fail $ invalidRetTypeError p (objName info))
Nothing -> fail $ invalidRetTypeError p (objName info)
where
getRetTyp... | 532 | declTypeCheck (A_Func p info args body)
= case getRetType info of
(Just ty) -> do retTy <- stmtTypeCheck (objName info, ty) body
when (ty /= retTy) (fail $ invalidRetTypeError p (objName info))
Nothing -> fail $ invalidRetTypeError p (objName info)
where
getRetTyp... | 532 | declTypeCheck (A_Func p info args body)
= case getRetType info of
(Just ty) -> do retTy <- stmtTypeCheck (objName info, ty) body
when (ty /= retTy) (fail $ invalidRetTypeError p (objName info))
Nothing -> fail $ invalidRetTypeError p (objName info)
where
getRetTyp... | 532 | false | false | 1 | 15 | 187 | 162 | 75 | 87 | null | null |
gsdlab/clafer | src/Language/Clafer/Intermediate/TypeSystem.hs | mit | TReal +++ TReal = TReal | 43 | TReal +++ TReal = TReal | 43 | TReal +++ TReal = TReal | 43 | false | false | 0 | 5 | 24 | 12 | 5 | 7 | null | null |
dylanmc/cryptol | src/Cryptol/Symbolic.hs | bsd-3-clause | evalType :: Env -> Type -> TValue
evalType env ty = Cryptol.Eval.Type.evalType env' ty
where env' = Cryptol.Eval.Env.EvalEnv Map.empty (envTypes env) | 151 | evalType :: Env -> Type -> TValue
evalType env ty = Cryptol.Eval.Type.evalType env' ty
where env' = Cryptol.Eval.Env.EvalEnv Map.empty (envTypes env) | 151 | evalType env ty = Cryptol.Eval.Type.evalType env' ty
where env' = Cryptol.Eval.Env.EvalEnv Map.empty (envTypes env) | 117 | false | true | 0 | 7 | 22 | 58 | 30 | 28 | null | null |
ssaavedra/liquidhaskell | src/Language/Haskell/Liquid/Desugar710/Coverage.hs | bsd-3-clause | addTickLStmts' :: (Maybe (Bool -> BoxLabel)) -> [ExprLStmt Id] -> TM a
-> TM ([ExprLStmt Id], a)
addTickLStmts' isGuard lstmts res
= bindLocals (collectLStmtsBinders lstmts) $
do { lstmts' <- mapM (liftL (addTickStmt isGuard)) lstmts
; a <- res
; return (lstmts', a) } | 303 | addTickLStmts' :: (Maybe (Bool -> BoxLabel)) -> [ExprLStmt Id] -> TM a
-> TM ([ExprLStmt Id], a)
addTickLStmts' isGuard lstmts res
= bindLocals (collectLStmtsBinders lstmts) $
do { lstmts' <- mapM (liftL (addTickStmt isGuard)) lstmts
; a <- res
; return (lstmts', a) } | 303 | addTickLStmts' isGuard lstmts res
= bindLocals (collectLStmtsBinders lstmts) $
do { lstmts' <- mapM (liftL (addTickStmt isGuard)) lstmts
; a <- res
; return (lstmts', a) } | 191 | false | true | 0 | 13 | 78 | 127 | 64 | 63 | null | null |
frontrowed/stratosphere | library-gen/Stratosphere/ResourceProperties/ApiGatewayDeploymentStageDescription.hs | mit | -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-stagedescription.html#cfn-apigateway-deployment-stagedescription-description
agdsdDescription :: Lens' ApiGatewayDeploymentStageDescription (Maybe (Val Text))
agdsdDescription = lens _apiGatewayDeploymentStageDescrip... | 404 | agdsdDescription :: Lens' ApiGatewayDeploymentStageDescription (Maybe (Val Text))
agdsdDescription = lens _apiGatewayDeploymentStageDescriptionDescription (\s a -> s { _apiGatewayDeploymentStageDescriptionDescription = a }) | 223 | agdsdDescription = lens _apiGatewayDeploymentStageDescriptionDescription (\s a -> s { _apiGatewayDeploymentStageDescriptionDescription = a }) | 141 | true | true | 1 | 9 | 22 | 55 | 28 | 27 | null | null |
snoyberg/ghc | compiler/main/ErrUtils.hs | bsd-3-clause | mkErrMsg dflags locn unqual msg = mk_err_msg dflags SevError locn unqual (ErrDoc [msg] [] []) | 114 | mkErrMsg dflags locn unqual msg = mk_err_msg dflags SevError locn unqual (ErrDoc [msg] [] []) | 114 | mkErrMsg dflags locn unqual msg = mk_err_msg dflags SevError locn unqual (ErrDoc [msg] [] []) | 114 | false | false | 0 | 8 | 35 | 43 | 21 | 22 | null | null |
bgamari/pandoc | src/Text/Pandoc/Readers/Org.hs | gpl-2.0 | str :: OrgParser (F Inlines)
str = return . B.str <$> many1 (noneOf $ specialChars ++ "\n\r ")
<* updateLastStrPos | 120 | str :: OrgParser (F Inlines)
str = return . B.str <$> many1 (noneOf $ specialChars ++ "\n\r ")
<* updateLastStrPos | 120 | str = return . B.str <$> many1 (noneOf $ specialChars ++ "\n\r ")
<* updateLastStrPos | 91 | false | true | 3 | 9 | 25 | 54 | 25 | 29 | null | null |
Gabriel439/Haskell-Errors-Library | Control/Error/Safe.hs | bsd-3-clause | -- | A 'fromJust' that fails using 'mzero'
justZ :: (MonadPlus m) => Maybe a -> m a
justZ = maybe mzero return | 110 | justZ :: (MonadPlus m) => Maybe a -> m a
justZ = maybe mzero return | 67 | justZ = maybe mzero return | 26 | true | true | 0 | 7 | 22 | 36 | 18 | 18 | null | null |
mapinguari/SC_HS_Proxy | src/Proxy/Query/Upgrade.hs | mit | mineralsBase MetabolicBoost = 100 | 33 | mineralsBase MetabolicBoost = 100 | 33 | mineralsBase MetabolicBoost = 100 | 33 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
shlevy/ghc | libraries/base/GHC/IO/Handle/Text.hs | bsd-3-clause | -- | The same as 'hPutStr', but adds a newline character.
hPutStrLn :: Handle -> String -> IO ()
hPutStrLn handle str = hPutStr' handle str True | 144 | hPutStrLn :: Handle -> String -> IO ()
hPutStrLn handle str = hPutStr' handle str True | 86 | hPutStrLn handle str = hPutStr' handle str True | 47 | true | true | 0 | 8 | 26 | 37 | 18 | 19 | null | null |
elieux/ghc | compiler/types/Type.hs | bsd-3-clause | mkStrLitTy :: FastString -> Type
mkStrLitTy s = LitTy (StrTyLit s) | 66 | mkStrLitTy :: FastString -> Type
mkStrLitTy s = LitTy (StrTyLit s) | 66 | mkStrLitTy s = LitTy (StrTyLit s) | 33 | false | true | 0 | 7 | 10 | 30 | 14 | 16 | null | null |
jsnajder/hofm | src/MorphGrammar/Hofm/Language/Croatian/Inflection.hs | bsd-3-clause | -- GLAGOLSKI UZORCI
-- pravilni glagoli:
v01 = iPattern "V01" "Vm" -- plesti (v1r1a)
(ends ["t"])
[rsfx "t" "sti" # ["n"],
rsfx "t" "st" # ["n"],
sfx "em" # ["ip1s"],
sfx "eš" # ["ip2s"],
sfx "e" # ["ip3s"],
sfx "emo" # ["ip1p"],
sfx "ete" # ["ip2p"],
sfx... | 650 | v01 = iPattern "V01" "Vm" -- plesti (v1r1a)
(ends ["t"])
[rsfx "t" "sti" # ["n"],
rsfx "t" "st" # ["n"],
sfx "em" # ["ip1s"],
sfx "eš" # ["ip2s"],
sfx "e" # ["ip3s"],
sfx "emo" # ["ip1p"],
sfx "ete" # ["ip2p"],
sfx "u" # ["ip3p"],
sfx "i" ... | 607 | v01 = iPattern "V01" "Vm" -- plesti (v1r1a)
(ends ["t"])
[rsfx "t" "sti" # ["n"],
rsfx "t" "st" # ["n"],
sfx "em" # ["ip1s"],
sfx "eš" # ["ip2s"],
sfx "e" # ["ip3s"],
sfx "emo" # ["ip1p"],
sfx "ete" # ["ip2p"],
sfx "u" # ["ip3p"],
sfx "i" ... | 607 | true | false | 0 | 7 | 239 | 277 | 148 | 129 | null | null |
samvher/translatethenews | app/TTN/Controller/Migrate.hs | mit | migrate1 :: TTNAction ctx a
migrate1 = do
(as :: [Entity Article]) <- runSQL $ selectList [] []
mapM_ migrateArticle as
(ts :: [Entity Translation]) <- runSQL $ selectList [] []
mapM_ migrateTranslation ts
renderSimpleStr "Ran migration 1"
where migrateArticle (Entity aid a) = runSQL $
... | 577 | migrate1 :: TTNAction ctx a
migrate1 = do
(as :: [Entity Article]) <- runSQL $ selectList [] []
mapM_ migrateArticle as
(ts :: [Entity Translation]) <- runSQL $ selectList [] []
mapM_ migrateTranslation ts
renderSimpleStr "Ran migration 1"
where migrateArticle (Entity aid a) = runSQL $
... | 577 | migrate1 = do
(as :: [Entity Article]) <- runSQL $ selectList [] []
mapM_ migrateArticle as
(ts :: [Entity Translation]) <- runSQL $ selectList [] []
mapM_ migrateTranslation ts
renderSimpleStr "Ran migration 1"
where migrateArticle (Entity aid a) = runSQL $
update aid [ ArticleBody ... | 549 | false | true | 1 | 12 | 159 | 204 | 97 | 107 | null | null |
bennofs/hdevtools | src/Info.hs | mit | getType :: FilePath -> (Int, Int) -> GHC.Ghc (Either String [((Int, Int, Int, Int), String)])
getType file (line, col) =
withModSummary file $ \m -> do
p <- GHC.parseModule m
typechecked <- GHC.typecheckModule p
types <- processTypeCheckedModule typechecked (line, col)
return (Right ... | 326 | getType :: FilePath -> (Int, Int) -> GHC.Ghc (Either String [((Int, Int, Int, Int), String)])
getType file (line, col) =
withModSummary file $ \m -> do
p <- GHC.parseModule m
typechecked <- GHC.typecheckModule p
types <- processTypeCheckedModule typechecked (line, col)
return (Right ... | 326 | getType file (line, col) =
withModSummary file $ \m -> do
p <- GHC.parseModule m
typechecked <- GHC.typecheckModule p
types <- processTypeCheckedModule typechecked (line, col)
return (Right types) | 232 | false | true | 0 | 12 | 78 | 136 | 70 | 66 | null | null |
gspindles/rftg-cards | src/Game/RftG/Cards/RvI.hs | mit | -------------------------------------------------------------------------------
-- Cards
-- reference: http://racepics.weihwa.com/rvi.html
-------------------------------------------------------------------------------
galacticAdvertisers :: Card
galacticAdvertisers = Card
Development
"GALACTIC ADVERTISERS"
(Cos... | 367 | galacticAdvertisers :: Card
galacticAdvertisers = Card
Development
"GALACTIC ADVERTISERS"
(Cost 3)
(VP 2)
Nothing
[]
[Trade, Consume] | 147 | galacticAdvertisers = Card
Development
"GALACTIC ADVERTISERS"
(Cost 3)
(VP 2)
Nothing
[]
[Trade, Consume] | 119 | true | true | 0 | 6 | 38 | 56 | 28 | 28 | null | null |
raichoo/Idris-dev | src/Idris/Reflection.hs | bsd-3-clause | reflectNameQuotePattern _ -- for all other names, match any
= do nameHole <- getNameFrom (sMN 0 "name")
claim nameHole (Var (reflm "TTName"))
movelast nameHole
fill (Var nameHole)
solve | 215 | reflectNameQuotePattern _ -- for all other names, match any
= do nameHole <- getNameFrom (sMN 0 "name")
claim nameHole (Var (reflm "TTName"))
movelast nameHole
fill (Var nameHole)
solve | 215 | reflectNameQuotePattern _ -- for all other names, match any
= do nameHole <- getNameFrom (sMN 0 "name")
claim nameHole (Var (reflm "TTName"))
movelast nameHole
fill (Var nameHole)
solve | 215 | false | false | 0 | 11 | 57 | 69 | 30 | 39 | null | null |
tewe/uroboro | src/Uroboro/Checker.hs | mit | patContext (Int.ConPat _ _ args) = concat $ map patContext args | 63 | patContext (Int.ConPat _ _ args) = concat $ map patContext args | 63 | patContext (Int.ConPat _ _ args) = concat $ map patContext args | 63 | false | false | 0 | 8 | 10 | 30 | 14 | 16 | null | null |
tibbe/cassava | tests/UnitTests.hs | bsd-3-clause | partialDecode :: Parser a -> Assertion
partialDecode p = case runParser p of
Left _ -> return ()
Right _ -> assertFailure "expected partial field decode" | 158 | partialDecode :: Parser a -> Assertion
partialDecode p = case runParser p of
Left _ -> return ()
Right _ -> assertFailure "expected partial field decode" | 158 | partialDecode p = case runParser p of
Left _ -> return ()
Right _ -> assertFailure "expected partial field decode" | 119 | false | true | 0 | 9 | 30 | 59 | 25 | 34 | null | null |
mapinguari/SC_HS_Proxy | src/Proxy/Query/Unit.hs | mit | buildTime SpecialXelNagaTemple = 4800 | 37 | buildTime SpecialXelNagaTemple = 4800 | 37 | buildTime SpecialXelNagaTemple = 4800 | 37 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
dalaing/sdl2 | src/SDL/Raw/Event.hs | bsd-3-clause | getEventFilter :: MonadIO m => Ptr EventFilter -> Ptr (Ptr ()) -> m Bool
getEventFilter v1 v2 = liftIO $ getEventFilterFFI v1 v2 | 128 | getEventFilter :: MonadIO m => Ptr EventFilter -> Ptr (Ptr ()) -> m Bool
getEventFilter v1 v2 = liftIO $ getEventFilterFFI v1 v2 | 128 | getEventFilter v1 v2 = liftIO $ getEventFilterFFI v1 v2 | 55 | false | true | 0 | 11 | 22 | 57 | 26 | 31 | null | null |
mihaimaruseac/petulant-octo-avenger | src-draw/Demos.hs | mit | -- compare with demoKoch51
demoKoch53 :: Diagram B
demoKoch53 = koch1 7 # glueLine # strokeLoop # fc green | 106 | demoKoch53 :: Diagram B
demoKoch53 = koch1 7 # glueLine # strokeLoop # fc green | 79 | demoKoch53 = koch1 7 # glueLine # strokeLoop # fc green | 55 | true | true | 1 | 7 | 18 | 36 | 16 | 20 | null | null |
bananu7/Turnip | src/Turnip/Eval/Eval.hs | mit | opMult :: BinaryOperatorImpl
opMult (Number a) (Number b) = return $ [Number (a * b)] | 85 | opMult :: BinaryOperatorImpl
opMult (Number a) (Number b) = return $ [Number (a * b)] | 85 | opMult (Number a) (Number b) = return $ [Number (a * b)] | 56 | false | true | 0 | 9 | 14 | 45 | 23 | 22 | null | null |
SwiftsNamesake/ElegantChess | lecture.hs | mit | map' f [] = [] | 14 | map' f [] = [] | 14 | map' f [] = [] | 14 | false | false | 0 | 6 | 4 | 15 | 7 | 8 | null | null |
roman/ai-class-haskell | src/Lesson2/UCS/Enumerator.hs | mit | -------------------------------------------------------------------------------
enumUCS :: (MonadIO m, Show a, Hashable a)
=> Node a
-> UCSGraph a
-> Enumerator (NavEvent (Node a)) m b
enumUCS zero g =
enumNavigation findCost
(return . (`getNodeNeighbours` g))
... | 631 | enumUCS :: (MonadIO m, Show a, Hashable a)
=> Node a
-> UCSGraph a
-> Enumerator (NavEvent (Node a)) m b
enumUCS zero g =
enumNavigation findCost
(return . (`getNodeNeighbours` g))
zero
where
findCost parent child =
return .
head .
... | 550 | enumUCS zero g =
enumNavigation findCost
(return . (`getNodeNeighbours` g))
zero
where
findCost parent child =
return .
head .
Set.fold (processEdge parent child) [] $
getL graphEdges g
processEdge parent child e acc
| getEdgeSource e ... | 421 | true | true | 1 | 12 | 200 | 197 | 96 | 101 | null | null |
Teaspot-Studio/Urho3D-Haskell | src/Graphics/Urho3D/Graphics/Animation.hs | mit | animationRemoveAllTracks :: (Parent Animation a, Pointer p a, MonadIO m)
=> p -- ^ Pointer to Animation or ascentor
-> m ()
animationRemoveAllTracks p = liftIO $ do
let ptr = parentPointer p
[C.exp| void {$(Animation* ptr)->RemoveAllTracks()} |]
-- | Set a trigger point at index. | 289 | animationRemoveAllTracks :: (Parent Animation a, Pointer p a, MonadIO m)
=> p -- ^ Pointer to Animation or ascentor
-> m ()
animationRemoveAllTracks p = liftIO $ do
let ptr = parentPointer p
[C.exp| void {$(Animation* ptr)->RemoveAllTracks()} |]
-- | Set a trigger point at index. | 289 | animationRemoveAllTracks p = liftIO $ do
let ptr = parentPointer p
[C.exp| void {$(Animation* ptr)->RemoveAllTracks()} |]
-- | Set a trigger point at index. | 161 | false | true | 0 | 11 | 54 | 76 | 39 | 37 | null | null |
stevejb71/Idris-dev | src/IRTS/CodegenJavaScript.hs | bsd-3-clause | translateChar :: Char -> String
translateChar ch
| '\a' <- ch = "\\u0007"
| '\b' <- ch = "\\b"
| '\f' <- ch = "\\f"
| '\n' <- ch = "\\n"
| '\r' <- ch = "\\r"
| '\t' <- ch = "\\t"
| '\v' <- ch = "\\v"
| '\SO' <- ch = "\\u000E"
| '\DEL' <- c... | 1,088 | translateChar :: Char -> String
translateChar ch
| '\a' <- ch = "\\u0007"
| '\b' <- ch = "\\b"
| '\f' <- ch = "\\f"
| '\n' <- ch = "\\n"
| '\r' <- ch = "\\r"
| '\t' <- ch = "\\t"
| '\v' <- ch = "\\v"
| '\SO' <- ch = "\\u000E"
| '\DEL' <- c... | 1,088 | translateChar ch
| '\a' <- ch = "\\u0007"
| '\b' <- ch = "\\b"
| '\f' <- ch = "\\f"
| '\n' <- ch = "\\n"
| '\r' <- ch = "\\r"
| '\t' <- ch = "\\t"
| '\v' <- ch = "\\v"
| '\SO' <- ch = "\\u000E"
| '\DEL' <- ch = "\\u007F"
| '\\' <... | 1,056 | false | true | 2 | 11 | 447 | 457 | 233 | 224 | null | null |
chrisdone/haskell-docs | src/main/Main.hs | bsd-3-clause | -- | Print an exception for humans.
printEx :: DocsException -> String
printEx e =
case e of
NoFindModule -> "Couldn't find any packages with that module."
PackageLookupFailed t -> "Couldn't lookup the right package: " <> unpack t
NoModulePackageCombo -> "Couldn't match a module with that package."
No... | 828 | printEx :: DocsException -> String
printEx e =
case e of
NoFindModule -> "Couldn't find any packages with that module."
PackageLookupFailed t -> "Couldn't lookup the right package: " <> unpack t
NoModulePackageCombo -> "Couldn't match a module with that package."
NoInterfaceFiles -> "No interface file... | 792 | printEx e =
case e of
NoFindModule -> "Couldn't find any packages with that module."
PackageLookupFailed t -> "Couldn't lookup the right package: " <> unpack t
NoModulePackageCombo -> "Couldn't match a module with that package."
NoInterfaceFiles -> "No interface files to search through! \
... | 757 | true | true | 1 | 11 | 204 | 121 | 56 | 65 | null | null |
mgoszcz2/eurosong-haskell | Data.hs | gpl-3.0 | chooseCountry :: Bool -> IO (Int, Ints)
chooseCountry = pickProp "Which country? " [("Utd Kingdom", Ints [10,5,8,3,7,3,1,2,4,2,4,3,3,1])
,("Ireland", Ints [10,5,5,5,5,3,6,5,5,7,4,3,3,4])
,("Israel", Ints [6,6,5,5,5,4,5,5,5,5,... | 1,486 | chooseCountry :: Bool -> IO (Int, Ints)
chooseCountry = pickProp "Which country? " [("Utd Kingdom", Ints [10,5,8,3,7,3,1,2,4,2,4,3,3,1])
,("Ireland", Ints [10,5,5,5,5,3,6,5,5,7,4,3,3,4])
,("Israel", Ints [6,6,5,5,5,4,5,5,5,5,... | 1,486 | chooseCountry = pickProp "Which country? " [("Utd Kingdom", Ints [10,5,8,3,7,3,1,2,4,2,4,3,3,1])
,("Ireland", Ints [10,5,5,5,5,3,6,5,5,7,4,3,3,4])
,("Israel", Ints [6,6,5,5,5,4,5,5,5,5,3,5,3,5])
... | 1,446 | false | true | 0 | 9 | 725 | 844 | 541 | 303 | null | null |
hth313/hthforth | src/Language/Forth.hs | bsd-2-clause | main :: IO ()
main =
let target = Target 4 4 1 LittleEndian :: Target
name = "hthforth"
in do
putStrLn $ name ++ ", version 1.1.1"
putStrLn "Forth-2012 System (Subset) with Environmental Restrictions"
putStrLn "Providing PARSE and WITHIN from the Core Extensions word set"
-- Conf... | 742 | main :: IO ()
main =
let target = Target 4 4 1 LittleEndian :: Target
name = "hthforth"
in do
putStrLn $ name ++ ", version 1.1.1"
putStrLn "Forth-2012 System (Subset) with Environmental Restrictions"
putStrLn "Providing PARSE and WITHIN from the Core Extensions word set"
-- Conf... | 742 | main =
let target = Target 4 4 1 LittleEndian :: Target
name = "hthforth"
in do
putStrLn $ name ++ ", version 1.1.1"
putStrLn "Forth-2012 System (Subset) with Environmental Restrictions"
putStrLn "Providing PARSE and WITHIN from the Core Extensions word set"
-- Configure and run ... | 728 | false | true | 0 | 15 | 224 | 173 | 81 | 92 | null | null |
cauterize-tools/caut-ghc7-ref | src/Cauterize/GHC7/Generate/GenTypes.hs | bsd-3-clause | transcodableTempl :: CT.Identifier -> Integer -> Integer -> String
transcodableTempl n szMin szMax = unindent [i|
instance CautTranscodable #{identToHsName n} where
cautName = const "#{CT.unIdentifier n}"
cautSize = const (#{szMin},#{szMax})|] | 253 | transcodableTempl :: CT.Identifier -> Integer -> Integer -> String
transcodableTempl n szMin szMax = unindent [i|
instance CautTranscodable #{identToHsName n} where
cautName = const "#{CT.unIdentifier n}"
cautSize = const (#{szMin},#{szMax})|] | 253 | transcodableTempl n szMin szMax = unindent [i|
instance CautTranscodable #{identToHsName n} where
cautName = const "#{CT.unIdentifier n}"
cautSize = const (#{szMin},#{szMax})|] | 186 | false | true | 0 | 7 | 39 | 39 | 21 | 18 | null | null |
NCrashed/hjass | src/library/Language/Jass/Semantic/Callable.hs | mit | -- | Returns function or native name
getCallableName :: Callable -> String
getCallableName (CallableNative (NativeDecl _ _ funcDecl)) = getFuncDeclName funcDecl | 160 | getCallableName :: Callable -> String
getCallableName (CallableNative (NativeDecl _ _ funcDecl)) = getFuncDeclName funcDecl | 123 | getCallableName (CallableNative (NativeDecl _ _ funcDecl)) = getFuncDeclName funcDecl | 85 | true | true | 0 | 11 | 20 | 43 | 20 | 23 | null | null |
QuickChick/Luck | luck/src/Core/Optimizations.hs | mit | functionFilter p (Case e alts) =
functionFilter p e || any (functionFilterAlt p) alts | 90 | functionFilter p (Case e alts) =
functionFilter p e || any (functionFilterAlt p) alts | 90 | functionFilter p (Case e alts) =
functionFilter p e || any (functionFilterAlt p) alts | 90 | false | false | 0 | 8 | 18 | 39 | 18 | 21 | null | null |
henrytill/deviser | src/Deviser/Types.hs | bsd-3-clause | showVal (DottedList xs x) =
T.concat ["(", unwordsList xs, " . ", showVal x, ")"] | 83 | showVal (DottedList xs x) =
T.concat ["(", unwordsList xs, " . ", showVal x, ")"] | 83 | showVal (DottedList xs x) =
T.concat ["(", unwordsList xs, " . ", showVal x, ")"] | 83 | false | false | 0 | 7 | 16 | 43 | 22 | 21 | null | null |
rueshyna/gogol | gogol-dataflow/gen/Network/Google/Dataflow/Types/Product.hs | mpl-2.0 | -- | Work item-specific configuration as an opaque blob.
wiConfiguration :: Lens' WorkItem (Maybe Text)
wiConfiguration
= lens _wiConfiguration
(\ s a -> s{_wiConfiguration = a}) | 186 | wiConfiguration :: Lens' WorkItem (Maybe Text)
wiConfiguration
= lens _wiConfiguration
(\ s a -> s{_wiConfiguration = a}) | 129 | wiConfiguration
= lens _wiConfiguration
(\ s a -> s{_wiConfiguration = a}) | 82 | true | true | 2 | 9 | 33 | 55 | 25 | 30 | null | null |
barrucadu/cabal-info | cabal-info/Fields.hs | mit | getPackageDescriptionField _ = const "" | 39 | getPackageDescriptionField _ = const "" | 39 | getPackageDescriptionField _ = const "" | 39 | false | false | 0 | 5 | 4 | 12 | 5 | 7 | null | null |
alanz/haskell-transformations-play | Main.hs | unlicense | aExpression :: Parser AExpr
aExpression = P.buildExpressionParser aOperators aTerm | 82 | aExpression :: Parser AExpr
aExpression = P.buildExpressionParser aOperators aTerm | 82 | aExpression = P.buildExpressionParser aOperators aTerm | 54 | false | true | 1 | 6 | 8 | 24 | 10 | 14 | null | null |
danr/hipspec | examples/old-examples/hip/MergeSort.hs | gpl-3.0 | sorted [x] = True | 17 | sorted [x] = True | 17 | sorted [x] = True | 17 | false | false | 0 | 5 | 3 | 13 | 6 | 7 | null | null |
rickyhan/rbtree | src/rbtree.hs | mit | balanceL' h (Node R _ a x (Node R _ b y c)) z d =
Node R (h+1) (Node B h a x b) y (Node B h c z d) | 102 | balanceL' h (Node R _ a x (Node R _ b y c)) z d =
Node R (h+1) (Node B h a x b) y (Node B h c z d) | 102 | balanceL' h (Node R _ a x (Node R _ b y c)) z d =
Node R (h+1) (Node B h a x b) y (Node B h c z d) | 102 | false | false | 0 | 9 | 35 | 89 | 44 | 45 | null | null |
ublubu/tile-rider | src/SDL/Geometry.hs | mit | zero :: Num a => Point a
zero = (0, 0) | 38 | zero :: Num a => Point a
zero = (0, 0) | 38 | zero = (0, 0) | 13 | false | true | 0 | 7 | 10 | 33 | 15 | 18 | null | null |
phischu/fragnix | tests/packages/scotty/Data.Aeson.Parser.Internal.hs | bsd-3-clause | -- | The only valid whitespace in a JSON document is space, newline,
-- carriage return, and tab.
skipSpace :: Parser ()
skipSpace = A.skipWhile $ \w -> w == 0x20 || w == 0x0a || w == 0x0d || w == 0x09 | 201 | skipSpace :: Parser ()
skipSpace = A.skipWhile $ \w -> w == 0x20 || w == 0x0a || w == 0x0d || w == 0x09 | 103 | skipSpace = A.skipWhile $ \w -> w == 0x20 || w == 0x0a || w == 0x0d || w == 0x09 | 80 | true | true | 1 | 13 | 42 | 61 | 30 | 31 | null | null |
glguy/vty-hangman-helper | GameModel.hs | bsd-3-clause | count :: (a -> Bool) -> [a] -> Int
count p = length . filter p | 62 | count :: (a -> Bool) -> [a] -> Int
count p = length . filter p | 62 | count p = length . filter p | 27 | false | true | 0 | 7 | 15 | 39 | 20 | 19 | null | null |
brendanhay/gogol | gogol-dlp/gen/Network/Google/DLP/Types/Product.hs | mpl-2.0 | -- | A stream of errors encountered running the job.
gpdvdjErrors :: Lens' GooglePrivacyDlpV2DlpJob [GooglePrivacyDlpV2Error]
gpdvdjErrors
= lens _gpdvdjErrors (\ s a -> s{_gpdvdjErrors = a})
. _Default
. _Coerce | 226 | gpdvdjErrors :: Lens' GooglePrivacyDlpV2DlpJob [GooglePrivacyDlpV2Error]
gpdvdjErrors
= lens _gpdvdjErrors (\ s a -> s{_gpdvdjErrors = a})
. _Default
. _Coerce | 173 | gpdvdjErrors
= lens _gpdvdjErrors (\ s a -> s{_gpdvdjErrors = a})
. _Default
. _Coerce | 100 | true | true | 0 | 11 | 43 | 53 | 28 | 25 | null | null |
iand675/disruptor | src/Control/Disruptor/FixedSequenceGroup.hs | mit | fixedSequenceGroup :: F.Foldable f => f Sequence -> FixedSequenceGroup
fixedSequenceGroup = FixedSequenceGroup . V.fromList . F.toList | 134 | fixedSequenceGroup :: F.Foldable f => f Sequence -> FixedSequenceGroup
fixedSequenceGroup = FixedSequenceGroup . V.fromList . F.toList | 134 | fixedSequenceGroup = FixedSequenceGroup . V.fromList . F.toList | 63 | false | true | 0 | 7 | 15 | 39 | 19 | 20 | null | null |
bch29/robo-monad | src/Game/Robo/Core/World.hs | gpl-3.0 | charToEvent '=' = Just ResetSPS | 31 | charToEvent '=' = Just ResetSPS | 31 | charToEvent '=' = Just ResetSPS | 31 | false | false | 0 | 5 | 4 | 12 | 5 | 7 | null | null |
CheeseSucker/haskell-roguelike | src/TerminalStuff.hs | bsd-2-clause | clrWhite = _createColor 37 | 26 | clrWhite = _createColor 37 | 26 | clrWhite = _createColor 37 | 26 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
39aldo39/klfc | src/Stream.hs | gpl-3.0 | writeStream' (File fname) (Just text) = do
liftIO $ createDirectoryIfMissing True (takeDirectory fname)
writeFile fname text | 132 | writeStream' (File fname) (Just text) = do
liftIO $ createDirectoryIfMissing True (takeDirectory fname)
writeFile fname text | 132 | writeStream' (File fname) (Just text) = do
liftIO $ createDirectoryIfMissing True (takeDirectory fname)
writeFile fname text | 132 | false | false | 0 | 10 | 23 | 51 | 22 | 29 | null | null |
lostbean/radio-fm69 | src/Radio/RFM69/Registers.hs | bsd-3-clause | skipRead :: forall w. (Bits w) => Int -> Reg w ()
skipRead len = modify $ \(s, w) -> (s, w `shiftR` len) | 104 | skipRead :: forall w. (Bits w) => Int -> Reg w ()
skipRead len = modify $ \(s, w) -> (s, w `shiftR` len) | 104 | skipRead len = modify $ \(s, w) -> (s, w `shiftR` len) | 54 | false | true | 0 | 10 | 23 | 71 | 38 | 33 | null | null |
dysinger/amazonka | amazonka-codedeploy/gen/Network/AWS/CodeDeploy/GetApplicationRevision.hs | mpl-2.0 | -- | The name of the application that corresponds to the revision.
garrApplicationName :: Lens' GetApplicationRevisionResponse (Maybe Text)
garrApplicationName =
lens _garrApplicationName (\s a -> s { _garrApplicationName = a }) | 232 | garrApplicationName :: Lens' GetApplicationRevisionResponse (Maybe Text)
garrApplicationName =
lens _garrApplicationName (\s a -> s { _garrApplicationName = a }) | 165 | garrApplicationName =
lens _garrApplicationName (\s a -> s { _garrApplicationName = a }) | 92 | true | true | 0 | 9 | 34 | 46 | 25 | 21 | null | null |
unisonweb/platform | parser-typechecker/src/Unison/UnisonFile.hs | mit | -- External type references that appear in the types of the file's terms
termSignatureExternalLabeledDependencies
:: Ord v => TypecheckedUnisonFile v a -> Set LabeledDependency
termSignatureExternalLabeledDependencies
(TypecheckedUnisonFile dataDeclarations' effectDeclarations' _ _ hashTerms) =
Set.difference
... | 645 | termSignatureExternalLabeledDependencies
:: Ord v => TypecheckedUnisonFile v a -> Set LabeledDependency
termSignatureExternalLabeledDependencies
(TypecheckedUnisonFile dataDeclarations' effectDeclarations' _ _ hashTerms) =
Set.difference
(Set.map LD.typeRef
. foldMap Type.dependencies
. fmap (\(... | 572 | termSignatureExternalLabeledDependencies
(TypecheckedUnisonFile dataDeclarations' effectDeclarations' _ _ hashTerms) =
Set.difference
(Set.map LD.typeRef
. foldMap Type.dependencies
. fmap (\(_r, _e, t) -> t)
. toList
$ hashTerms)
-- exclude any references that are defined in this ... | 466 | true | true | 0 | 15 | 131 | 170 | 84 | 86 | null | null |
NickAger/LearningHaskell | haskellForMacMiscPlayground/Diagrams.hsproj/DiagramsArrows.hs | mit | arrowStyle3 = (with & arrowHead .~ spike & headLength .~ normal
& arrowShaft .~ line) | 110 | arrowStyle3 = (with & arrowHead .~ spike & headLength .~ normal
& arrowShaft .~ line) | 110 | arrowStyle3 = (with & arrowHead .~ spike & headLength .~ normal
& arrowShaft .~ line) | 110 | false | false | 1 | 12 | 39 | 37 | 17 | 20 | null | null |
rimmington/unordered-containers | tests/HashMapProperties.hs | bsd-3-clause | eq_ :: (Eq k, Eq v, Hashable k, Ord k)
=> (Model k v -> Model k v) -- ^ Function that modifies a 'Model'
-> (HM.HashMap k v -> HM.HashMap k v) -- ^ Function that modified a
-- 'HashMap' in the same way
-> [(k, v)] -- ^ Initial... | 583 | eq_ :: (Eq k, Eq v, Hashable k, Ord k)
=> (Model k v -> Model k v) -- ^ Function that modifies a 'Model'
-> (HM.HashMap k v -> HM.HashMap k v) -- ^ Function that modified a
-- 'HashMap' in the same way
-> [(k, v)] -- ^ Initial... | 464 | eq_ f g = (M.toAscList . f) `eq` (toAscList . g) | 48 | true | true | 0 | 12 | 294 | 140 | 74 | 66 | null | null |
spacekitteh/smcghc | compiler/codeGen/StgCmmPrim.hs | bsd-3-clause | emitPrimOp dflags res IndexOffAddrOp_Int16 args = doIndexOffAddrOp (Just (mo_s_16ToWord dflags)) b16 res args | 122 | emitPrimOp dflags res IndexOffAddrOp_Int16 args = doIndexOffAddrOp (Just (mo_s_16ToWord dflags)) b16 res args | 122 | emitPrimOp dflags res IndexOffAddrOp_Int16 args = doIndexOffAddrOp (Just (mo_s_16ToWord dflags)) b16 res args | 122 | false | false | 0 | 9 | 25 | 40 | 17 | 23 | null | null |
snowmantw/Frag | src/Matrix.hs | gpl-2.0 | -- Finds the dot product of two vectors
dotProd :: Vec3->Vec3->Double
dotProd (a,b,c) (aa,bb,cc) = a*aa + b*bb + c*cc | 117 | dotProd :: Vec3->Vec3->Double
dotProd (a,b,c) (aa,bb,cc) = a*aa + b*bb + c*cc | 77 | dotProd (a,b,c) (aa,bb,cc) = a*aa + b*bb + c*cc | 47 | true | true | 3 | 9 | 19 | 72 | 36 | 36 | null | null |
ocharles/hackage-server | Distribution/Client/Mirror/Repo/Secure.hs | bsd-3-clause | downloadIndex :: Sec.Repository
-> Sec.Cache
-> [Sec.KeyId]
-> Sec.KeyThreshold
-> MirrorSession [PkgIndexInfo]
downloadIndex rep Sec.Cache{..} rootKeys threshold =
handleChecked (mirrorError . verificationError) $
handleChecked (mirrorError . remoteError)... | 920 | downloadIndex :: Sec.Repository
-> Sec.Cache
-> [Sec.KeyId]
-> Sec.KeyThreshold
-> MirrorSession [PkgIndexInfo]
downloadIndex rep Sec.Cache{..} rootKeys threshold =
handleChecked (mirrorError . verificationError) $
handleChecked (mirrorError . remoteError)... | 920 | downloadIndex rep Sec.Cache{..} rootKeys threshold =
handleChecked (mirrorError . verificationError) $
handleChecked (mirrorError . remoteError) $ do
_hasUpdates <- liftIO $ do
requiresBootstrap <- Sec.requiresBootstrap rep
when requiresBootstrap $ Sec.bootstrap rep rootKeys threshol... | 752 | false | true | 2 | 14 | 231 | 226 | 107 | 119 | null | null |
acple/renzu | src/Renzu/Getter.hs | bsd-3-clause | ipreuse :: MonadState s m => IxFold (Alt Maybe (i, a)) i s t a b -> m (Maybe (i, a))
ipreuse = gets . ipreview | 110 | ipreuse :: MonadState s m => IxFold (Alt Maybe (i, a)) i s t a b -> m (Maybe (i, a))
ipreuse = gets . ipreview | 110 | ipreuse = gets . ipreview | 25 | false | true | 1 | 11 | 25 | 77 | 37 | 40 | null | null |
ghc-android/ghc | testsuite/tests/ghci/should_run/ghcirun004.hs | bsd-3-clause | 4447 = 4446 | 11 | 4447 = 4446 | 11 | 4447 = 4446 | 11 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
kawu/crf-chain1-constrained | src/Data/CRF/Chain1/Constrained/DAG/Inference.hs | bsd-2-clause | -- | Potential label on the given vector position.
lbOn :: Md.Model -> X -> LbIx -> Lb
lbOn crf (C.X _) = (C.unAVec (Md.r0 crf) U.!) | 134 | lbOn :: Md.Model -> X -> LbIx -> Lb
lbOn crf (C.X _) = (C.unAVec (Md.r0 crf) U.!) | 83 | lbOn crf (C.X _) = (C.unAVec (Md.r0 crf) U.!) | 47 | true | true | 0 | 9 | 28 | 58 | 30 | 28 | null | null |
lbodor/amazonia | src/Stack.hs | bsd-3-clause | deleteStack :: Text -> AWST IO CF.DeleteStackResponse
deleteStack stackName = do
info ("Deleting stack: " <> stackName)
send $ CF.deleteStack stackName | 159 | deleteStack :: Text -> AWST IO CF.DeleteStackResponse
deleteStack stackName = do
info ("Deleting stack: " <> stackName)
send $ CF.deleteStack stackName | 159 | deleteStack stackName = do
info ("Deleting stack: " <> stackName)
send $ CF.deleteStack stackName | 105 | false | true | 0 | 9 | 28 | 50 | 23 | 27 | null | null |
ryzhyk/cocoon | cocoon/Boogie/Boogie.hs | apache-2.0 | statCollectTypes ctx (SAssume _ c) = exprCollectTypes ctx c | 62 | statCollectTypes ctx (SAssume _ c) = exprCollectTypes ctx c | 62 | statCollectTypes ctx (SAssume _ c) = exprCollectTypes ctx c | 62 | false | false | 0 | 6 | 11 | 26 | 11 | 15 | null | null |
m3mitsuppe/haskell | exercises/ch_07_01_lambda.hs | unlicense | oneIsOne :: Num a => a -> a
oneIsOne = dodgy 1 | 46 | oneIsOne :: Num a => a -> a
oneIsOne = dodgy 1 | 46 | oneIsOne = dodgy 1 | 18 | false | true | 0 | 6 | 11 | 25 | 12 | 13 | null | null |
ulikoehler/graph-generators | Data/Graph/Generators/Regular.hs | apache-2.0 | completeGraph n =
let allNodes = [0..n-1]
allEdges = [(i, j) | i <- allNodes,j <- allNodes, i < j]
in GraphInfo n allEdges | 138 | completeGraph n =
let allNodes = [0..n-1]
allEdges = [(i, j) | i <- allNodes,j <- allNodes, i < j]
in GraphInfo n allEdges | 138 | completeGraph n =
let allNodes = [0..n-1]
allEdges = [(i, j) | i <- allNodes,j <- allNodes, i < j]
in GraphInfo n allEdges | 138 | false | false | 1 | 11 | 39 | 77 | 37 | 40 | null | null |
bitemyapp/roshask | src/Ros/Logging.hs | bsd-3-clause | logDebug, logWarn, logInfo, logError, logFatal :: String -> Q Exp
logDebug = mkLogMsg Log.dEBUG | 95 | logDebug, logWarn, logInfo, logError, logFatal :: String -> Q Exp
logDebug = mkLogMsg Log.dEBUG | 95 | logDebug = mkLogMsg Log.dEBUG | 29 | false | true | 0 | 6 | 13 | 31 | 19 | 12 | null | null |
olsner/ghc | compiler/typecheck/TcBinds.hs | bsd-3-clause | tcVect (HsVectInstOut _)
= panic "TcBinds.tcVect: Unexpected 'HsVectInstOut'" | 79 | tcVect (HsVectInstOut _)
= panic "TcBinds.tcVect: Unexpected 'HsVectInstOut'" | 79 | tcVect (HsVectInstOut _)
= panic "TcBinds.tcVect: Unexpected 'HsVectInstOut'" | 79 | false | false | 0 | 7 | 9 | 18 | 8 | 10 | null | null |
gallais/potpourri | haskell/cyclic/CyclicListFlat.hs | gpl-3.0 | repeat :: a -> CList a
repeat x = CList [] [x] | 46 | repeat :: a -> CList a
repeat x = CList [] [x] | 46 | repeat x = CList [] [x] | 23 | false | true | 0 | 7 | 11 | 36 | 16 | 20 | null | null |
craffit/flexdb | src/DB/Flex/Query/Typed.hs | bsd-3-clause | -- | Produces the concatenation of two String-expressions.
cat :: Expr i l String -> Expr i' l String -> Expr (MeetAggr i i') l String
cat = binOp "||" | 151 | cat :: Expr i l String -> Expr i' l String -> Expr (MeetAggr i i') l String
cat = binOp "||" | 92 | cat = binOp "||" | 16 | true | true | 3 | 7 | 29 | 54 | 25 | 29 | null | null |
Charlesetc/haskell-parsing | src/Pear/Operator/Lexer.hs | bsd-3-clause | manyTill :: ALexer a b -> ALexer a e -> ALexer a [b]
manyTill = hoist2AR P.manyTill | 83 | manyTill :: ALexer a b -> ALexer a e -> ALexer a [b]
manyTill = hoist2AR P.manyTill | 83 | manyTill = hoist2AR P.manyTill | 30 | false | true | 0 | 8 | 16 | 42 | 20 | 22 | null | null |
JacquesCarette/literate-scientific-software | code/drasil-example/Drasil/SSP/GenDefs.hs | bsd-2-clause | bsWtrFDerivSliceEqn = inxi baseHydroForce $= inxi baseLngth * sy waterWeight *
bsWtrFDerivHeightEqn | 101 | bsWtrFDerivSliceEqn = inxi baseHydroForce $= inxi baseLngth * sy waterWeight *
bsWtrFDerivHeightEqn | 101 | bsWtrFDerivSliceEqn = inxi baseHydroForce $= inxi baseLngth * sy waterWeight *
bsWtrFDerivHeightEqn | 101 | false | false | 0 | 8 | 13 | 27 | 12 | 15 | null | null |
ziman/idris-py | src/Main.hs | bsd-3-clause | getOpts :: IO Opts
getOpts = do xs <- getArgs
return $ process (Opts [] "a.py") xs
where
process opts ("-o":o:xs) = process (opts { output = o }) xs
process opts ("--yes-really":xs) = process opts xs -- TODO
process opts (x:xs) = process (opts { inputs = x:inputs opts }) xs
process opts [... | 328 | getOpts :: IO Opts
getOpts = do xs <- getArgs
return $ process (Opts [] "a.py") xs
where
process opts ("-o":o:xs) = process (opts { output = o }) xs
process opts ("--yes-really":xs) = process opts xs -- TODO
process opts (x:xs) = process (opts { inputs = x:inputs opts }) xs
process opts [... | 328 | getOpts = do xs <- getArgs
return $ process (Opts [] "a.py") xs
where
process opts ("-o":o:xs) = process (opts { output = o }) xs
process opts ("--yes-really":xs) = process opts xs -- TODO
process opts (x:xs) = process (opts { inputs = x:inputs opts }) xs
process opts [] = opts | 309 | false | true | 0 | 11 | 87 | 164 | 80 | 84 | null | null |
markhibberd/fp-syd-free | src/Talks/Free/Language.hs | bsd-3-clause | setPw :: Text -> Text -> Free Language ()
setPw key pw =
liftF $ SetPassword key pw () | 88 | setPw :: Text -> Text -> Free Language ()
setPw key pw =
liftF $ SetPassword key pw () | 88 | setPw key pw =
liftF $ SetPassword key pw () | 46 | false | true | 0 | 8 | 20 | 44 | 21 | 23 | null | null |
TikhonJelvis/TPL | test/TPL/Test/Parse.hs | gpl-3.0 | isBoolean (Boolean b) "false" = not b | 37 | isBoolean (Boolean b) "false" = not b | 37 | isBoolean (Boolean b) "false" = not b | 37 | false | false | 0 | 7 | 6 | 20 | 9 | 11 | null | null |
DanielWaterworth/Idris-dev | src/Idris/Output.hs | bsd-3-clause | ideSlaveReturnAnnotated :: Integer -> Handle -> Doc OutputAnnotation -> Idris ()
ideSlaveReturnAnnotated n h out = do ist <- getIState
(str, spans) <- fmap displaySpans .
iRender .
... | 583 | ideSlaveReturnAnnotated :: Integer -> Handle -> Doc OutputAnnotation -> Idris ()
ideSlaveReturnAnnotated n h out = do ist <- getIState
(str, spans) <- fmap displaySpans .
iRender .
... | 583 | ideSlaveReturnAnnotated n h out = do ist <- getIState
(str, spans) <- fmap displaySpans .
iRender .
fmap (fancifyAnnots ist) $
... | 502 | false | true | 0 | 13 | 320 | 135 | 62 | 73 | null | null |
blippy/sifi | src/Yahoo.hs | gpl-3.0 | fetchQuote dstamp tstamp (ticker, rox) = do
let url = symUrl $ replace "^" "%5E" ticker
resp <- getUrl url
let clean = stripJunk resp
let sq = decodeFetch dstamp tstamp rox clean ticker
return sq | 207 | fetchQuote dstamp tstamp (ticker, rox) = do
let url = symUrl $ replace "^" "%5E" ticker
resp <- getUrl url
let clean = stripJunk resp
let sq = decodeFetch dstamp tstamp rox clean ticker
return sq | 207 | fetchQuote dstamp tstamp (ticker, rox) = do
let url = symUrl $ replace "^" "%5E" ticker
resp <- getUrl url
let clean = stripJunk resp
let sq = decodeFetch dstamp tstamp rox clean ticker
return sq | 207 | false | false | 0 | 11 | 47 | 87 | 39 | 48 | null | null |
ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/basic_haskell/showsPrec_2.hs | mit | primCmpInt :: MyInt -> MyInt -> Ordering;
primCmpInt (Pos Zero) (Pos Zero) = EQ | 83 | primCmpInt :: MyInt -> MyInt -> Ordering
primCmpInt (Pos Zero) (Pos Zero) = EQ | 82 | primCmpInt (Pos Zero) (Pos Zero) = EQ | 37 | false | true | 0 | 7 | 17 | 37 | 19 | 18 | null | null |
bgold-cosmos/Tidal | src/Sound/Tidal/Params.hs | gpl-3.0 | -- |
lhitom :: Pattern Double -> ControlPattern
lhitom = pF "lhitom" | 69 | lhitom :: Pattern Double -> ControlPattern
lhitom = pF "lhitom" | 63 | lhitom = pF "lhitom" | 20 | true | true | 0 | 7 | 12 | 29 | 12 | 17 | null | null |
m-schmidt/Asm6502 | src/Arch6502.hs | bsd-3-clause | -- |Encode a mnemonic with an operand of a specific addressing mode into a sequence of bytes
encodeInstruction :: Int -> Mnemonic -> AddressingMode -> Int -> Maybe [Word8]
encodeInstruction addr mnemonic mode value =
-- encoding is the instruction opcode followed by a stream of bytes for the operand
case opCode mne... | 641 | encodeInstruction :: Int -> Mnemonic -> AddressingMode -> Int -> Maybe [Word8]
encodeInstruction addr mnemonic mode value =
-- encoding is the instruction opcode followed by a stream of bytes for the operand
case opCode mnemonic mode of
Just code -> Just $ code : encodeOperand (operandLength mode) value'
_ ... | 548 | encodeInstruction addr mnemonic mode value =
-- encoding is the instruction opcode followed by a stream of bytes for the operand
case opCode mnemonic mode of
Just code -> Just $ code : encodeOperand (operandLength mode) value'
_ -> Nothing
where
-- convert target address into relative distanc... | 469 | true | true | 4 | 10 | 137 | 116 | 59 | 57 | null | null |
metabrainz/musicbrainz-data-service | test/suite/Common.hs | gpl-2.0 | testForm :: (Eq a, Show a) => Form Text MusicBrainz a -> [([Text], Text)] -> a -> MusicBrainz ()
testForm form submissions expected = do
actual <- success form submissions
actual @?= expected
-------------------------------------------------------------------------------- | 278 | testForm :: (Eq a, Show a) => Form Text MusicBrainz a -> [([Text], Text)] -> a -> MusicBrainz ()
testForm form submissions expected = do
actual <- success form submissions
actual @?= expected
-------------------------------------------------------------------------------- | 278 | testForm form submissions expected = do
actual <- success form submissions
actual @?= expected
-------------------------------------------------------------------------------- | 181 | false | true | 0 | 10 | 39 | 89 | 45 | 44 | null | null |
JPMoresmau/BuildWrapper | src/Language/Haskell/BuildWrapper/GHC.hs | bsd-3-clause | tokenType ITlanguage_prag="P" | 30 | tokenType ITlanguage_prag="P" | 30 | tokenType ITlanguage_prag="P" | 30 | false | false | 0 | 4 | 2 | 10 | 4 | 6 | null | null |
beni55/attoparsec | Data/Attoparsec/ByteString/Internal.hs | bsd-3-clause | -- | Satisfy a literal string, ignoring case.
stringCI :: ByteString -> Parser ByteString
stringCI s = string_ (stringSuspended lower) lower s
where lower = B8.map toLower
| 174 | stringCI :: ByteString -> Parser ByteString
stringCI s = string_ (stringSuspended lower) lower s
where lower = B8.map toLower
| 128 | stringCI s = string_ (stringSuspended lower) lower s
where lower = B8.map toLower
| 84 | true | true | 0 | 7 | 29 | 48 | 23 | 25 | null | null |
rahulmutt/ghcvm | compiler/Eta/Main/Constants.hs | bsd-3-clause | tARGET_MAX_CHAR :: Int
tARGET_MAX_CHAR = 0x10ffff | 49 | tARGET_MAX_CHAR :: Int
tARGET_MAX_CHAR = 0x10ffff | 49 | tARGET_MAX_CHAR = 0x10ffff | 26 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
billpmurphy/conway-combat | Immigration.hs | mit | gameLoop :: Int -> Universe2D Cell -> IO (Universe2D Cell)
gameLoop n u = do
threadDelay (10 ^ 6)
putStrLn "" >> print n
putStr $ renderBoard (-20, -20) (20, 20) u
if n <= 1
then return u
else gameLoop (n-1) (u =>> immigrationRule)
-- Immigration game as a 2-player game:
-- Whichever p... | 459 | gameLoop :: Int -> Universe2D Cell -> IO (Universe2D Cell)
gameLoop n u = do
threadDelay (10 ^ 6)
putStrLn "" >> print n
putStr $ renderBoard (-20, -20) (20, 20) u
if n <= 1
then return u
else gameLoop (n-1) (u =>> immigrationRule)
-- Immigration game as a 2-player game:
-- Whichever p... | 459 | gameLoop n u = do
threadDelay (10 ^ 6)
putStrLn "" >> print n
putStr $ renderBoard (-20, -20) (20, 20) u
if n <= 1
then return u
else gameLoop (n-1) (u =>> immigrationRule)
-- Immigration game as a 2-player game:
-- Whichever player has the most cells of their color in then 8x8 rectang... | 400 | false | true | 0 | 10 | 114 | 132 | 66 | 66 | null | null |
berdario/managemytime | test/Integration.hs | bsd-3-clause | getPreferredHours :<|> newPreferredHours :<|> updatePreferredHours :<|> deletePreferredHours = preferredHoursCrud $ Just "" | 123 | getPreferredHours :<|> newPreferredHours :<|> updatePreferredHours :<|> deletePreferredHours = preferredHoursCrud $ Just "" | 123 | getPreferredHours :<|> newPreferredHours :<|> updatePreferredHours :<|> deletePreferredHours = preferredHoursCrud $ Just "" | 123 | false | false | 0 | 7 | 11 | 26 | 12 | 14 | null | null |
brendanhay/gogol | gogol-bigtableadmin/gen/Network/Google/BigtableAdmin/Types/Product.hs | mpl-2.0 | -- | The normal response of the operation in case of success. If the original
-- method returns no data on success, such as \`Delete\`, the response is
-- \`google.protobuf.Empty\`. If the original method is standard
-- \`Get\`\/\`Create\`\/\`Update\`, the response should be the resource.
-- For other methods, the resp... | 648 | oResponse :: Lens' Operation (Maybe OperationResponse)
oResponse
= lens _oResponse (\ s a -> s{_oResponse = a}) | 113 | oResponse
= lens _oResponse (\ s a -> s{_oResponse = a}) | 58 | true | true | 0 | 9 | 98 | 55 | 32 | 23 | null | null |
sgillespie/ghc | compiler/codeGen/StgCmmPrim.hs | bsd-3-clause | emitCtzCall :: LocalReg -> CmmExpr -> Width -> FCode ()
emitCtzCall res x width = do
emitPrimCall
[ res ]
(MO_Ctz width)
[ x ] | 154 | emitCtzCall :: LocalReg -> CmmExpr -> Width -> FCode ()
emitCtzCall res x width = do
emitPrimCall
[ res ]
(MO_Ctz width)
[ x ] | 154 | emitCtzCall res x width = do
emitPrimCall
[ res ]
(MO_Ctz width)
[ x ] | 98 | false | true | 0 | 9 | 52 | 57 | 28 | 29 | null | null |
rawlep/EQS | sourceCode/LMisc.hs | mit | findWithRemainder f (x:xs)
| f x = (Just x , xs)
| otherwise =
case findWithRemainder f xs of
(mf, ys) -> (mf , x : ys)
--- finds an element of a list and returns the element along
-- with other elemens adjacent to it | 256 | findWithRemainder f (x:xs)
| f x = (Just x , xs)
| otherwise =
case findWithRemainder f xs of
(mf, ys) -> (mf , x : ys)
--- finds an element of a list and returns the element along
-- with other elemens adjacent to it | 256 | findWithRemainder f (x:xs)
| f x = (Just x , xs)
| otherwise =
case findWithRemainder f xs of
(mf, ys) -> (mf , x : ys)
--- finds an element of a list and returns the element along
-- with other elemens adjacent to it | 256 | false | false | 1 | 10 | 84 | 77 | 40 | 37 | null | null |
diku-dk/futhark | src/Futhark/CLI/REPL.hs | isc | -- Are we currently willing to break for this reason? Among othe
-- things, we do not want recursive breakpoints. It could work fine
-- technically, but is probably too confusing to be useful.
breakForReason :: FutharkiState -> I.StackFrame -> I.BreakReason -> Bool
breakForReason s _ I.BreakNaN
| not $ futharkiBrea... | 336 | breakForReason :: FutharkiState -> I.StackFrame -> I.BreakReason -> Bool
breakForReason s _ I.BreakNaN
| not $ futharkiBreakOnNaN s = False | 141 | breakForReason s _ I.BreakNaN
| not $ futharkiBreakOnNaN s = False | 68 | true | true | 0 | 9 | 57 | 52 | 26 | 26 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.