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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
league/postgrest | src/PostgREST/Parsers.hs | mit | pOperatiorWithNegation :: Parser Operator
pOperatiorWithNegation = try ( (<>) <$> ( cs <$> string "not." ) <*> pOperator) <|> pOperator | 136 | pOperatiorWithNegation :: Parser Operator
pOperatiorWithNegation = try ( (<>) <$> ( cs <$> string "not." ) <*> pOperator) <|> pOperator | 136 | pOperatiorWithNegation = try ( (<>) <$> ( cs <$> string "not." ) <*> pOperator) <|> pOperator | 94 | false | true | 0 | 12 | 20 | 44 | 23 | 21 | null | null |
matonix/pfds | src/PFDS/Sec9/Ex13_2.hs | bsd-3-clause | fixup :: RList a -> RList a
fixup (Zero : ds) = let (Node _ t1 t2, ds') = unconsTree ds in Two [t1, t2] : ds' | 109 | fixup :: RList a -> RList a
fixup (Zero : ds) = let (Node _ t1 t2, ds') = unconsTree ds in Two [t1, t2] : ds' | 109 | fixup (Zero : ds) = let (Node _ t1 t2, ds') = unconsTree ds in Two [t1, t2] : ds' | 81 | false | true | 0 | 10 | 26 | 72 | 35 | 37 | null | null |
cutsea110/tut | Application.hs | bsd-2-clause | -- This function allocates resources (such as a database connection pool),
-- performs initialization and creates a WAI application. This is also the
-- place to put your migrate statements to have automatic database
-- migrations handled by Yesod.
withTut :: AppConfig DefaultEnv -> Logger -> (Application -> IO ()) -> ... | 831 | withTut :: AppConfig DefaultEnv -> Logger -> (Application -> IO ()) -> IO ()
withTut conf logger f = do
#ifdef PRODUCTION
s <- static Settings.staticDir
#else
s <- staticDevel Settings.staticDir
#endif
dbconf <- withYamlEnvironment "config/sqlite.yml" (appEnv conf)
$ either error return . Databa... | 582 | withTut conf logger f = do
#ifdef PRODUCTION
s <- static Settings.staticDir
#else
s <- staticDevel Settings.staticDir
#endif
dbconf <- withYamlEnvironment "config/sqlite.yml" (appEnv conf)
$ either error return . Database.Persist.Base.loadConfig
Database.Persist.Base.withPool (dbconf :: Sett... | 505 | true | true | 0 | 14 | 163 | 178 | 90 | 88 | null | null |
AlexanderPankiv/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | typeable4ClassKey = mkPreludeClassUnique 24 | 49 | typeable4ClassKey = mkPreludeClassUnique 24 | 49 | typeable4ClassKey = mkPreludeClassUnique 24 | 49 | false | false | 0 | 5 | 9 | 9 | 4 | 5 | null | null |
mkm/sokoban | src/Tree.hs | gpl-3.0 | mergeBranches (Branch ll lK lV Leaf) r = Branch ll lK lV r | 58 | mergeBranches (Branch ll lK lV Leaf) r = Branch ll lK lV r | 58 | mergeBranches (Branch ll lK lV Leaf) r = Branch ll lK lV r | 58 | false | false | 0 | 7 | 12 | 32 | 15 | 17 | null | null |
keithodulaigh/Hets | CommonLogic/PredefinedCASLAxioms.hs | gpl-2.0 | -- | setting casl sign: sorts, cons, nil, append
listSig :: CASLSign
listSig = (emptySign ())
{ sortRel = Rel.fromKeysSet
$ Set.fromList [list, individual]
, opMap = MapSet.fromList
[ (cons, [consTypeS])
, (nil, [nilTypeS... | 744 | listSig :: CASLSign
listSig = (emptySign ())
{ sortRel = Rel.fromKeysSet
$ Set.fromList [list, individual]
, opMap = MapSet.fromList
[ (cons, [consTypeS])
, (nil, [nilTypeS])
, (append, [appendTyp... | 695 | listSig = (emptySign ())
{ sortRel = Rel.fromKeysSet
$ Set.fromList [list, individual]
, opMap = MapSet.fromList
[ (cons, [consTypeS])
, (nil, [nilTypeS])
, (append, [appendTypeS])
... | 675 | true | true | 0 | 13 | 363 | 171 | 98 | 73 | null | null |
sayon/lenses-talk | lenses.hs | gpl-2.0 | john = Person 42 "John" $ Address "France" "Rue" 42 | 52 | john = Person 42 "John" $ Address "France" "Rue" 42 | 52 | john = Person 42 "John" $ Address "France" "Rue" 42 | 52 | false | false | 1 | 6 | 10 | 26 | 10 | 16 | null | null |
kim/amazonka | amazonka-ec2/gen/Network/AWS/EC2/RunInstances.hs | mpl-2.0 | -- | One or more instances.
rirInstances :: Lens' RunInstancesResponse [Instance]
rirInstances = lens _rirInstances (\s a -> s { _rirInstances = a }) . _List | 157 | rirInstances :: Lens' RunInstancesResponse [Instance]
rirInstances = lens _rirInstances (\s a -> s { _rirInstances = a }) . _List | 129 | rirInstances = lens _rirInstances (\s a -> s { _rirInstances = a }) . _List | 75 | true | true | 0 | 10 | 25 | 47 | 26 | 21 | null | null |
duairc/opaleye-x | src/Opaleye/X/Optional.hs | mpl-2.0 | ------------------------------------------------------------------------------
defaults :: forall a. Defaults a => Optional a
defaults = let DefaultsPP n = p in Optional n
where
p = def :: DefaultsPP (DistributeOption a) (DistributeOption a)
----------------------------------------------------------------------... | 328 | defaults :: forall a. Defaults a => Optional a
defaults = let DefaultsPP n = p in Optional n
where
p = def :: DefaultsPP (DistributeOption a) (DistributeOption a)
------------------------------------------------------------------------------ | 249 | defaults = let DefaultsPP n = p in Optional n
where
p = def :: DefaultsPP (DistributeOption a) (DistributeOption a)
------------------------------------------------------------------------------ | 202 | true | true | 0 | 9 | 38 | 74 | 36 | 38 | null | null |
LevelFiveElixirStorage/haskell | conway.hs | unlicense | readBoard :: String -> Board
readBoard s = map (map readCell) (lines s) | 71 | readBoard :: String -> Board
readBoard s = map (map readCell) (lines s) | 71 | readBoard s = map (map readCell) (lines s) | 42 | false | true | 0 | 7 | 12 | 38 | 18 | 20 | null | null |
geraldus/yesod | yesod-form/Yesod/Form/Functions.hs | mit | getKey :: Text
getKey = "_hasdata" | 34 | getKey :: Text
getKey = "_hasdata" | 34 | getKey = "_hasdata" | 19 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
abakst/symmetry | checker/src/Symmetry/SymbEx.hs | mit | symLt x y
= SE $ do xv <- runSE x
yv <- runSE y
return $ APred Nothing (Just (opPred IL.Lt xv yv))
------------------------------------------------- | 176 | symLt x y
= SE $ do xv <- runSE x
yv <- runSE y
return $ APred Nothing (Just (opPred IL.Lt xv yv))
------------------------------------------------- | 176 | symLt x y
= SE $ do xv <- runSE x
yv <- runSE y
return $ APred Nothing (Just (opPred IL.Lt xv yv))
------------------------------------------------- | 176 | false | false | 3 | 14 | 52 | 72 | 30 | 42 | null | null |
epsilonhalbe/accelerate-typelits | test/Test/Data/Array/Accelerate/TypeLits/System/Random/MWC.hs | isc | unitTests :: TestTree
unitTests = testGroup "Unit tests"
[--hunit
] | 71 | unitTests :: TestTree
unitTests = testGroup "Unit tests"
[--hunit
] | 71 | unitTests = testGroup "Unit tests"
[--hunit
] | 49 | false | true | 0 | 6 | 13 | 27 | 11 | 16 | null | null |
yiannist/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | -- * RPC
rpcEncodingNone :: Int
rpcEncodingNone = 0 | 52 | rpcEncodingNone :: Int
rpcEncodingNone = 0 | 42 | rpcEncodingNone = 0 | 19 | true | true | 0 | 4 | 9 | 12 | 7 | 5 | null | null |
brendanhay/gogol | gogol-healthcare/gen/Network/Google/Resource/Healthcare/Projects/Locations/DataSets/Hl7V2Stores/TestIAMPermissions.hs | mpl-2.0 | -- | Multipart request metadata.
pldshvstipPayload :: Lens' ProjectsLocationsDataSetsHl7V2StoresTestIAMPermissions TestIAMPermissionsRequest
pldshvstipPayload
= lens _pldshvstipPayload
(\ s a -> s{_pldshvstipPayload = a}) | 229 | pldshvstipPayload :: Lens' ProjectsLocationsDataSetsHl7V2StoresTestIAMPermissions TestIAMPermissionsRequest
pldshvstipPayload
= lens _pldshvstipPayload
(\ s a -> s{_pldshvstipPayload = a}) | 196 | pldshvstipPayload
= lens _pldshvstipPayload
(\ s a -> s{_pldshvstipPayload = a}) | 88 | true | true | 1 | 9 | 28 | 45 | 22 | 23 | null | null |
ambiata/highlighting-kate | Text/Highlighting/Kate/Syntax/Vhdl.hs | gpl-2.0 | list_forOrWhile = Set.fromList $ words $ "loop" | 47 | list_forOrWhile = Set.fromList $ words $ "loop" | 47 | list_forOrWhile = Set.fromList $ words $ "loop" | 47 | false | false | 1 | 7 | 6 | 20 | 8 | 12 | null | null |
vizziv/Darjeelang | darjeelang.hs | mit | branch exp1 exp2 exp3 = E $ EBranch exp1 exp2 exp3 | 50 | branch exp1 exp2 exp3 = E $ EBranch exp1 exp2 exp3 | 50 | branch exp1 exp2 exp3 = E $ EBranch exp1 exp2 exp3 | 50 | false | false | 0 | 6 | 10 | 24 | 11 | 13 | null | null |
alpmestan/accelerate-blas | src/Data/Array/Accelerate/BLAS/Internal/Nrm2.hs | bsd-3-clause | dnrm2 :: Acc (Vector Double) -> Acc (Scalar Double)
dnrm2 = foreignAcc foreignNrm2D pureNrm2D
where foreignNrm2D = CUDAForeignAcc "cudaNrm2D" cudaNrm2D
pureNrm2D :: Acc (Vector Double) -> Acc (Scalar Double)
pureNrm2D = map sqrt . fold (+) 0 . map (\x -> x*x) | 286 | dnrm2 :: Acc (Vector Double) -> Acc (Scalar Double)
dnrm2 = foreignAcc foreignNrm2D pureNrm2D
where foreignNrm2D = CUDAForeignAcc "cudaNrm2D" cudaNrm2D
pureNrm2D :: Acc (Vector Double) -> Acc (Scalar Double)
pureNrm2D = map sqrt . fold (+) 0 . map (\x -> x*x) | 286 | dnrm2 = foreignAcc foreignNrm2D pureNrm2D
where foreignNrm2D = CUDAForeignAcc "cudaNrm2D" cudaNrm2D
pureNrm2D :: Acc (Vector Double) -> Acc (Scalar Double)
pureNrm2D = map sqrt . fold (+) 0 . map (\x -> x*x) | 234 | false | true | 5 | 8 | 68 | 116 | 57 | 59 | null | null |
spencerjanssen/cabal2nix | src/Cabal2Nix/PostProcess.hs | bsd-3-clause | agdaPostInstall :: String
agdaPostInstall = unlines
[ "postInstall = ''"
, " $out/bin/agda -c --no-main $(find $out/share -name Primitive.agda)"
, " $out/bin/agda-mode compile"
, "'';"
] | 198 | agdaPostInstall :: String
agdaPostInstall = unlines
[ "postInstall = ''"
, " $out/bin/agda -c --no-main $(find $out/share -name Primitive.agda)"
, " $out/bin/agda-mode compile"
, "'';"
] | 198 | agdaPostInstall = unlines
[ "postInstall = ''"
, " $out/bin/agda -c --no-main $(find $out/share -name Primitive.agda)"
, " $out/bin/agda-mode compile"
, "'';"
] | 172 | false | true | 0 | 5 | 37 | 26 | 15 | 11 | null | null |
diku-dk/futhark | src/Language/Futhark/Traversals.hs | isc | bareDimIndex (DimSlice x y z) =
DimSlice (bareExp <$> x) (bareExp <$> y) (bareExp <$> z) | 90 | bareDimIndex (DimSlice x y z) =
DimSlice (bareExp <$> x) (bareExp <$> y) (bareExp <$> z) | 90 | bareDimIndex (DimSlice x y z) =
DimSlice (bareExp <$> x) (bareExp <$> y) (bareExp <$> z) | 90 | false | false | 0 | 7 | 17 | 49 | 24 | 25 | null | null |
fpoli/lambda | test/Lambda/TestParser.hs | gpl-3.0 | tests :: Test
tests = test [
assertEqual
"Test parse x"
(Just (VarTerm (Variable "x")))
(parse "x")
,
assertEqual
"Test parse ab"
(Just (VarTerm (Variable "ab")))
(parse "ab")
,
assertEqual
"Test ... | 3,503 | tests :: Test
tests = test [
assertEqual
"Test parse x"
(Just (VarTerm (Variable "x")))
(parse "x")
,
assertEqual
"Test parse ab"
(Just (VarTerm (Variable "ab")))
(parse "ab")
,
assertEqual
"Test ... | 3,503 | tests = test [
assertEqual
"Test parse x"
(Just (VarTerm (Variable "x")))
(parse "x")
,
assertEqual
"Test parse ab"
(Just (VarTerm (Variable "ab")))
(parse "ab")
,
assertEqual
"Test parse ab12"
... | 3,489 | false | true | 0 | 19 | 1,771 | 904 | 452 | 452 | null | null |
svaiter/fay-canvas | src/HtmlCanvas.hs | bsd-3-clause | setGlobalCompositeOperation :: String -> Context -> Fay ()
setGlobalCompositeOperation = ffi "%2['globalCompositeOperation']=%1" | 128 | setGlobalCompositeOperation :: String -> Context -> Fay ()
setGlobalCompositeOperation = ffi "%2['globalCompositeOperation']=%1" | 128 | setGlobalCompositeOperation = ffi "%2['globalCompositeOperation']=%1" | 69 | false | true | 0 | 8 | 11 | 27 | 13 | 14 | null | null |
li-zhirui/EoplLangs | src/ExceptionLang/Evaluator.hs | bsd-3-clause | evalLetExpr :: [(String, Expression)] -> Expression -> Environment
-> Continuation
-> EvaluateResult
evalLetExpr [] body env cont = valueOf body env cont | 177 | evalLetExpr :: [(String, Expression)] -> Expression -> Environment
-> Continuation
-> EvaluateResult
evalLetExpr [] body env cont = valueOf body env cont | 177 | evalLetExpr [] body env cont = valueOf body env cont | 52 | false | true | 0 | 8 | 45 | 54 | 28 | 26 | null | null |
nbloomf/carl | src/Carl/Data/Monomial.hs | gpl-3.0 | monomialLCM :: (Ord a) => Monomial a -> Monomial a -> Monomial a
monomialLCM m1 m2 = Monomial $ M.unionWith natMax (unMonomial m1) (unMonomial m2) | 146 | monomialLCM :: (Ord a) => Monomial a -> Monomial a -> Monomial a
monomialLCM m1 m2 = Monomial $ M.unionWith natMax (unMonomial m1) (unMonomial m2) | 146 | monomialLCM m1 m2 = Monomial $ M.unionWith natMax (unMonomial m1) (unMonomial m2) | 81 | false | true | 0 | 9 | 24 | 71 | 33 | 38 | null | null |
tnrangwi/haskellGames4iPad | Labyrinth3d.hs | mit | -- | Wait for arbitrary key
getOK :: IO ()
getOK = getChar >> return () | 71 | getOK :: IO ()
getOK = getChar >> return () | 43 | getOK = getChar >> return () | 28 | true | true | 2 | 7 | 15 | 32 | 14 | 18 | null | null |
zsol/visual-graphrewrite | GraphRewrite/Internal/Rewrite.hs | bsd-3-clause | matchFine rs g (SLit y) e binds
= let tree = rewriteStepFine rs e g in
case lastGraph tree of
(SLit x, _) | x == y -> (Just binds, [tree])
_ -> (Nothing, []) | 212 | matchFine rs g (SLit y) e binds
= let tree = rewriteStepFine rs e g in
case lastGraph tree of
(SLit x, _) | x == y -> (Just binds, [tree])
_ -> (Nothing, []) | 212 | matchFine rs g (SLit y) e binds
= let tree = rewriteStepFine rs e g in
case lastGraph tree of
(SLit x, _) | x == y -> (Just binds, [tree])
_ -> (Nothing, []) | 212 | false | false | 1 | 13 | 89 | 107 | 49 | 58 | null | null |
shlevy/ghc | testsuite/tests/pmcheck/should_compile/EmptyCase010.hs | bsd-3-clause | f29 :: Baz (DC Bool) Char -> ()
f29 = \case | 43 | f29 :: Baz (DC Bool) Char -> ()
f29 = \case | 43 | f29 = \case | 11 | false | true | 0 | 9 | 10 | 36 | 16 | 20 | null | null |
BartAdv/hoogle | src/Output/Types.hs | bsd-3-clause | writeFingerprints :: StoreWrite -> [Fingerprint] -> IO ()
writeFingerprints store xs = storeWriteV store $ V.fromList xs | 120 | writeFingerprints :: StoreWrite -> [Fingerprint] -> IO ()
writeFingerprints store xs = storeWriteV store $ V.fromList xs | 120 | writeFingerprints store xs = storeWriteV store $ V.fromList xs | 62 | false | true | 0 | 8 | 16 | 44 | 21 | 23 | null | null |
mankyKitty/leesp | src/Main.hs | mit | makeStringN :: [LispVal] -> ThrowsError LispVal
makeStringN [Number n, Character c] = (return . String . L.genericTake n) $ repeat c | 132 | makeStringN :: [LispVal] -> ThrowsError LispVal
makeStringN [Number n, Character c] = (return . String . L.genericTake n) $ repeat c | 132 | makeStringN [Number n, Character c] = (return . String . L.genericTake n) $ repeat c | 84 | false | true | 0 | 9 | 20 | 63 | 30 | 33 | null | null |
patperry/hs-linear-algebra | tests/STVector.hs | bsd-3-clause | binaryProp :: (AEq e, Arbitrary e, Show e, Storable e, Testable a)
=> e
-> (Vector e -> Vector e)
-> (forall s . STVector s e -> STVector s e -> ST s a)
-> Property
binaryProp t imm_f f = let
prop2 t (VectorPair x y) = runST $ let _ = typed t x in
x `readOnlyV... | 436 | binaryProp :: (AEq e, Arbitrary e, Show e, Storable e, Testable a)
=> e
-> (Vector e -> Vector e)
-> (forall s . STVector s e -> STVector s e -> ST s a)
-> Property
binaryProp t imm_f f = let
prop2 t (VectorPair x y) = runST $ let _ = typed t x in
x `readOnlyV... | 436 | binaryProp t imm_f f = let
prop2 t (VectorPair x y) = runST $ let _ = typed t x in
x `readOnlyVector` \mx ->
y `mutatesToVector` (imm_f x) $ \my -> f my mx
where _ = typed t x
in label "" prop2 | 223 | false | true | 0 | 17 | 159 | 207 | 102 | 105 | null | null |
mrehayden1/lji | src/LJI/Run.hs | bsd-3-clause | targetMelody :: [Int] -> Staff Note -> Environment (Staff Note)
targetMelody ts ns = do
d <- asks optDur
let nss = flip evalState (drop 1 . cycle . toList $ ns)
. mapM (targetMelody' d ts)
$ ns
return . over WrapStaff (fmap fold) $ nss
where
targetMelody' :: Dur -> [Int] -> Note -> St... | 459 | targetMelody :: [Int] -> Staff Note -> Environment (Staff Note)
targetMelody ts ns = do
d <- asks optDur
let nss = flip evalState (drop 1 . cycle . toList $ ns)
. mapM (targetMelody' d ts)
$ ns
return . over WrapStaff (fmap fold) $ nss
where
targetMelody' :: Dur -> [Int] -> Note -> St... | 459 | targetMelody ts ns = do
d <- asks optDur
let nss = flip evalState (drop 1 . cycle . toList $ ns)
. mapM (targetMelody' d ts)
$ ns
return . over WrapStaff (fmap fold) $ nss
where
targetMelody' :: Dur -> [Int] -> Note -> State [Note] (Section Note)
targetMelody' d ts n = do
ns <-... | 395 | false | true | 0 | 17 | 132 | 218 | 103 | 115 | null | null |
NickAger/LearningHaskell | HaskellProgrammingFromFirstPrinciples/Chapter15.hsproj/SemiGroup8.hs | mit | test2 = TestCase (assertEqual "right fst propogated" (Fst 1 <> Fst 2) (Fst 2)) | 78 | test2 = TestCase (assertEqual "right fst propogated" (Fst 1 <> Fst 2) (Fst 2)) | 78 | test2 = TestCase (assertEqual "right fst propogated" (Fst 1 <> Fst 2) (Fst 2)) | 78 | false | false | 1 | 10 | 13 | 42 | 18 | 24 | null | null |
travitch/language-python-builder | src/Language/Python/Common/Builder.hs | bsd-3-clause | binaryOrAO :: annot -> OpQ annot
binaryOrAO = return . BinaryOr | 63 | binaryOrAO :: annot -> OpQ annot
binaryOrAO = return . BinaryOr | 63 | binaryOrAO = return . BinaryOr | 30 | false | true | 0 | 6 | 10 | 22 | 11 | 11 | null | null |
maurer/ptrace | src/System/PTrace.hs | bsd-3-clause | traceVFork = 0x4 | 16 | traceVFork = 0x4 | 16 | traceVFork = 0x4 | 16 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
TomMD/ghc | compiler/hsSyn/HsPat.hs | bsd-3-clause | pprPat (BangPat pat) = char '!' <> pprParendLPat pat | 61 | pprPat (BangPat pat) = char '!' <> pprParendLPat pat | 61 | pprPat (BangPat pat) = char '!' <> pprParendLPat pat | 61 | false | false | 0 | 7 | 17 | 25 | 11 | 14 | null | null |
RoboNickBot/interactive-tree-demos | src/Hyper/Canvas.hs | bsd-2-clause | safeReadInput :: Read a => String -> a -> IO a
safeReadInput n d = tryread d <$> readInput n | 92 | safeReadInput :: Read a => String -> a -> IO a
safeReadInput n d = tryread d <$> readInput n | 92 | safeReadInput n d = tryread d <$> readInput n | 45 | false | true | 0 | 8 | 19 | 44 | 20 | 24 | null | null |
megantti/rtorrent-rpc | Network/RTorrent/SCGI.hs | mit | makeRequest :: Body -> ByteString
makeRequest (Body hd bd) = res
where
res = toByteString . mconcat $ [
integral len
, fromChar ':'
, fromByteString hdbs
, fromChar ','
, fromByteString bd
]
fromBS0 bs = fromWrite $ writeByteString bs <> writeWord8 0
hdbs = toByteSt... | 499 | makeRequest :: Body -> ByteString
makeRequest (Body hd bd) = res
where
res = toByteString . mconcat $ [
integral len
, fromChar ':'
, fromByteString hdbs
, fromChar ','
, fromByteString bd
]
fromBS0 bs = fromWrite $ writeByteString bs <> writeWord8 0
hdbs = toByteSt... | 499 | makeRequest (Body hd bd) = res
where
res = toByteString . mconcat $ [
integral len
, fromChar ':'
, fromByteString hdbs
, fromChar ','
, fromByteString bd
]
fromBS0 bs = fromWrite $ writeByteString bs <> writeWord8 0
hdbs = toByteString . mconcat $
(from... | 465 | false | true | 3 | 13 | 155 | 180 | 88 | 92 | null | null |
astanin/ditaa-img | ditaa-img.hs | mit | generateImage :: String -> String -> String -> IO ExitCode
generateImage ditaaCommand imagename code =
withSystemTempFile (imagename ++ "..txt") $ \tmpname tmphandle -> do
let cmd = replace "INPUT" tmpname .
replace "OUTPUT" imagename $ ditaaCommand
hPutStrLn tmphandle code
hClose tmphan... | 340 | generateImage :: String -> String -> String -> IO ExitCode
generateImage ditaaCommand imagename code =
withSystemTempFile (imagename ++ "..txt") $ \tmpname tmphandle -> do
let cmd = replace "INPUT" tmpname .
replace "OUTPUT" imagename $ ditaaCommand
hPutStrLn tmphandle code
hClose tmphan... | 340 | generateImage ditaaCommand imagename code =
withSystemTempFile (imagename ++ "..txt") $ \tmpname tmphandle -> do
let cmd = replace "INPUT" tmpname .
replace "OUTPUT" imagename $ ditaaCommand
hPutStrLn tmphandle code
hClose tmphandle
system2 cmd | 281 | false | true | 0 | 15 | 79 | 106 | 47 | 59 | null | null |
geophf/1HaskellADay | exercises/HAD/Y2020/M12/D01/Solution.hs | mit | linkOrphanedCountries :: Set Continent -> Set Country -> Set OrphanedCountry
-> CountryTriage
linkOrphanedCountries cs1 cs2 ocs =
execState (loc' cs1 cs2 (Set.toList ocs))
(Triage Map.empty Map.empty Set.empty) | 249 | linkOrphanedCountries :: Set Continent -> Set Country -> Set OrphanedCountry
-> CountryTriage
linkOrphanedCountries cs1 cs2 ocs =
execState (loc' cs1 cs2 (Set.toList ocs))
(Triage Map.empty Map.empty Set.empty) | 249 | linkOrphanedCountries cs1 cs2 ocs =
execState (loc' cs1 cs2 (Set.toList ocs))
(Triage Map.empty Map.empty Set.empty) | 132 | false | true | 0 | 9 | 65 | 85 | 38 | 47 | null | null |
JPMoresmau/HJVM | src/Language/Java/JVM/API.hs | bsd-3-clause | charMethod :: (WithJava m) =>JObjectPtr -> Method -> [JValue] -> m (Char)
charMethod obj m args= execMethod f_callCharMethod obj m args | 138 | charMethod :: (WithJava m) =>JObjectPtr -> Method -> [JValue] -> m (Char)
charMethod obj m args= execMethod f_callCharMethod obj m args | 135 | charMethod obj m args= execMethod f_callCharMethod obj m args | 61 | false | true | 0 | 10 | 23 | 57 | 29 | 28 | null | null |
ocean0yohsuke/Simply-Typed-Lambda | src/Lambda/DataType.hs | bsd-3-clause | char c = CHAR c Nothing | 23 | char c = CHAR c Nothing | 23 | char c = CHAR c Nothing | 23 | false | false | 0 | 5 | 5 | 14 | 6 | 8 | null | null |
josuf107/Adverb | Adverb/Common.hs | gpl-3.0 | heftily = id | 12 | heftily = id | 12 | heftily = id | 12 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
mrlovre/super-memory | Pro3/src/LinguisticVariables/AngleLinguisticVariables.hs | gpl-3.0 | sharpRightAngle :: AFuzzySet
sharpRightAngle = lvVery $ angleFuzzySet (lFunctionGenerator angleSharpRightI angleRightI) | 119 | sharpRightAngle :: AFuzzySet
sharpRightAngle = lvVery $ angleFuzzySet (lFunctionGenerator angleSharpRightI angleRightI) | 119 | sharpRightAngle = lvVery $ angleFuzzySet (lFunctionGenerator angleSharpRightI angleRightI) | 90 | false | true | 0 | 8 | 10 | 26 | 13 | 13 | null | null |
vikraman/ghc | compiler/hsSyn/HsDecls.hs | bsd-3-clause | -- | closed type family info
isClosedTypeFamilyInfo :: FamilyInfo name -> Bool
isClosedTypeFamilyInfo (ClosedTypeFamily {}) = True | 130 | isClosedTypeFamilyInfo :: FamilyInfo name -> Bool
isClosedTypeFamilyInfo (ClosedTypeFamily {}) = True | 101 | isClosedTypeFamilyInfo (ClosedTypeFamily {}) = True | 51 | true | true | 0 | 7 | 16 | 29 | 15 | 14 | null | null |
rodrigo-machado/ufrgs-grt | src/Graph/TestRewriting.hs | gpl-3.0 | rewriteOnError :: (Eq a, Eq b) => Rule a b -> TypedDigraph a b -> [Error (TypedDigraph a b)]
rewriteOnError = rewrite | 117 | rewriteOnError :: (Eq a, Eq b) => Rule a b -> TypedDigraph a b -> [Error (TypedDigraph a b)]
rewriteOnError = rewrite | 117 | rewriteOnError = rewrite | 24 | false | true | 0 | 11 | 21 | 58 | 29 | 29 | null | null |
keera-studios/hssdl | Graphics/UI/SDL/RWOps.hs | bsd-3-clause | free :: RWops -> IO ()
free =
#if defined(__GLASGOW_HASKELL__)
finalizeForeignPtr | 83 | free :: RWops -> IO ()
free =
#if defined(__GLASGOW_HASKELL__)
finalizeForeignPtr | 83 | free =
#if defined(__GLASGOW_HASKELL__)
finalizeForeignPtr | 60 | false | true | 0 | 7 | 12 | 21 | 11 | 10 | null | null |
lpeterse/HiggsSet | src/Data/HiggsSet.hs | bsd-3-clause | updateLookup :: (Indexable a, Index i, IndexOf a ~ i) => (a -> Maybe a) -> i -> HiggsSet a i -> (Maybe a, HiggsSet a i)
updateLookup = updateLookupUnsafe [minBound..maxBound] | 194 | updateLookup :: (Indexable a, Index i, IndexOf a ~ i) => (a -> Maybe a) -> i -> HiggsSet a i -> (Maybe a, HiggsSet a i)
updateLookup = updateLookupUnsafe [minBound..maxBound] | 194 | updateLookup = updateLookupUnsafe [minBound..maxBound] | 61 | false | true | 0 | 10 | 50 | 86 | 43 | 43 | null | null |
chreekat/snowdrift | Model/User.hs | agpl-3.0 | deleteUserDB :: UserId -> DB ()
deleteUserDB user_id = do
deleteCommentsDB user_id
deleteBlogPostsDB user_id
deleteWikiEditsDB user_id
deleteCascade user_id | 172 | deleteUserDB :: UserId -> DB ()
deleteUserDB user_id = do
deleteCommentsDB user_id
deleteBlogPostsDB user_id
deleteWikiEditsDB user_id
deleteCascade user_id | 172 | deleteUserDB user_id = do
deleteCommentsDB user_id
deleteBlogPostsDB user_id
deleteWikiEditsDB user_id
deleteCascade user_id | 140 | false | true | 0 | 8 | 33 | 52 | 20 | 32 | null | null |
cocreature/leksah | src/IDE/Core/State.hs | gpl-2.0 | -- Main window is always the first one in the list
window = head . windows | 74 | window = head . windows | 23 | window = head . windows | 23 | true | false | 2 | 5 | 15 | 16 | 6 | 10 | null | null |
HalfWayMan/mt-mongodb | src/Massive/Database/MongoDB/Template.hs | bsd-3-clause | indexedFieldName ∷ Int → Name
indexedFieldName = mkName ∘ ("field" ++) ∘ show | 77 | indexedFieldName ∷ Int → Name
indexedFieldName = mkName ∘ ("field" ++) ∘ show | 77 | indexedFieldName = mkName ∘ ("field" ++) ∘ show | 47 | false | true | 0 | 7 | 12 | 27 | 15 | 12 | null | null |
lfritz/python-type-inference | python-type-inference/src/Language/Python/TypeInference/CFG/CFG.hs | bsd-3-clause | isRegularParameter _ = False | 42 | isRegularParameter _ = False | 42 | isRegularParameter _ = False | 42 | false | false | 0 | 4 | 17 | 10 | 4 | 6 | null | null |
forked-upstream-packages-for-ghcjs/ghc | compiler/typecheck/TcEvidence.hs | bsd-3-clause | (<.>) :: HsWrapper -> HsWrapper -> HsWrapper
WpHole <.> c = c | 61 | (<.>) :: HsWrapper -> HsWrapper -> HsWrapper
WpHole <.> c = c | 61 | WpHole <.> c = c | 16 | false | true | 0 | 6 | 11 | 27 | 14 | 13 | null | null |
metaml/dokreg | src/Pipes/Docker.hs | gpl-3.0 | ports :: Maybe Object -> Maybe [Int]
ports o = case o of
Just obj -> let ports' = map (\p -> decimal p) $ map (\p -> head (splitOn "/" p)) $ Map.keys obj
in return $ map (\pair -> fst pair) (rights ports')
Nothing -> Nothing | 272 | ports :: Maybe Object -> Maybe [Int]
ports o = case o of
Just obj -> let ports' = map (\p -> decimal p) $ map (\p -> head (splitOn "/" p)) $ Map.keys obj
in return $ map (\pair -> fst pair) (rights ports')
Nothing -> Nothing | 272 | ports o = case o of
Just obj -> let ports' = map (\p -> decimal p) $ map (\p -> head (splitOn "/" p)) $ Map.keys obj
in return $ map (\pair -> fst pair) (rights ports')
Nothing -> Nothing | 235 | false | true | 0 | 19 | 95 | 137 | 65 | 72 | null | null |
ecaustin/haskhol-deductive | src/HaskHOL/Lib/Tactics.hs | bsd-2-clause | tacACCEPT :: (BoolCtxt thry, HOLThmRep thm cls thry) => ThmTactic thm cls thry
tacACCEPT pthm (Goal _ w) =
do thm@(Thm _ c) <- toHThm pthm
if c `aConv` w
then return . GS nullMeta [] $ propagateThm thm
else fail "tacACCEPT"
-- create a tactic from a conversion | 293 | tacACCEPT :: (BoolCtxt thry, HOLThmRep thm cls thry) => ThmTactic thm cls thry
tacACCEPT pthm (Goal _ w) =
do thm@(Thm _ c) <- toHThm pthm
if c `aConv` w
then return . GS nullMeta [] $ propagateThm thm
else fail "tacACCEPT"
-- create a tactic from a conversion | 293 | tacACCEPT pthm (Goal _ w) =
do thm@(Thm _ c) <- toHThm pthm
if c `aConv` w
then return . GS nullMeta [] $ propagateThm thm
else fail "tacACCEPT"
-- create a tactic from a conversion | 214 | false | true | 0 | 11 | 81 | 115 | 56 | 59 | null | null |
bredelings/BAli-Phy | haskell/Data/Tuple.hs | gpl-2.0 | swap (x,y) = (y,x) | 18 | swap (x,y) = (y,x) | 18 | swap (x,y) = (y,x) | 18 | false | false | 0 | 5 | 3 | 22 | 12 | 10 | null | null |
5outh/WeekOfPragmas | set.hs | mit | setBind :: Ord b => Set a -> (a -> Set b) -> Set b
setBind s f = S.foldr S.union S.empty (S.map f s) | 100 | setBind :: Ord b => Set a -> (a -> Set b) -> Set b
setBind s f = S.foldr S.union S.empty (S.map f s) | 100 | setBind s f = S.foldr S.union S.empty (S.map f s) | 49 | false | true | 0 | 10 | 24 | 70 | 33 | 37 | null | null |
exercism/xhaskell | exercises/practice/forth/.meta/examples/success-standard/src/Forth.hs | mit | stepWord Subtract = with2 (push .: (-)) | 40 | stepWord Subtract = with2 (push .: (-)) | 40 | stepWord Subtract = with2 (push .: (-)) | 40 | false | false | 0 | 7 | 7 | 21 | 11 | 10 | null | null |
bitemyapp/node-manager | src/Node/Manager.hs | bsd-3-clause | startServer :: NodeManagerConfig -> NodeManager -> IO ()
startServer nc nmFoundation = do
app <- toWaiApp nmFoundation
let nodeManagerDefaults = setTimeout (3*60).
(setHost.getHostPreference.nodeManagerHost $ nc).
(setPort.nodeManagerPort $ nc) $ defaultSet... | 363 | startServer :: NodeManagerConfig -> NodeManager -> IO ()
startServer nc nmFoundation = do
app <- toWaiApp nmFoundation
let nodeManagerDefaults = setTimeout (3*60).
(setHost.getHostPreference.nodeManagerHost $ nc).
(setPort.nodeManagerPort $ nc) $ defaultSet... | 363 | startServer nc nmFoundation = do
app <- toWaiApp nmFoundation
let nodeManagerDefaults = setTimeout (3*60).
(setHost.getHostPreference.nodeManagerHost $ nc).
(setPort.nodeManagerPort $ nc) $ defaultSettings
runSettings nodeManagerDefaults app | 306 | false | true | 0 | 16 | 97 | 98 | 47 | 51 | null | null |
beni55/text | tests/Tests/Properties.hs | bsd-2-clause | t_intercalate c = unsquare $
L.intercalate c `eq`
(unpackS . T.intercalate (packS c) . map packS) | 139 | t_intercalate c = unsquare $
L.intercalate c `eq`
(unpackS . T.intercalate (packS c) . map packS) | 139 | t_intercalate c = unsquare $
L.intercalate c `eq`
(unpackS . T.intercalate (packS c) . map packS) | 139 | false | false | 0 | 11 | 57 | 49 | 24 | 25 | null | null |
flowbox-public/ghcjs | src/Gen2/DynamicLinking.hs | mit | throwCmdLineError :: String -> IO a
throwCmdLineError = throwGhcExceptionIO . CmdLineError | 90 | throwCmdLineError :: String -> IO a
throwCmdLineError = throwGhcExceptionIO . CmdLineError | 90 | throwCmdLineError = throwGhcExceptionIO . CmdLineError | 54 | false | true | 0 | 6 | 10 | 22 | 11 | 11 | null | null |
Cahu/krpc-hs | src/KRPCHS/SpaceCenter.hs | gpl-3.0 | getFlightAntiRadialStream :: KRPCHS.SpaceCenter.Flight -> RPCContext (KRPCStream ((Double, Double, Double)))
getFlightAntiRadialStream thisArg = requestStream $ getFlightAntiRadialStreamReq thisArg | 197 | getFlightAntiRadialStream :: KRPCHS.SpaceCenter.Flight -> RPCContext (KRPCStream ((Double, Double, Double)))
getFlightAntiRadialStream thisArg = requestStream $ getFlightAntiRadialStreamReq thisArg | 197 | getFlightAntiRadialStream thisArg = requestStream $ getFlightAntiRadialStreamReq thisArg | 88 | false | true | 0 | 10 | 15 | 52 | 27 | 25 | null | null |
DavidAlphaFox/darcs | hashed-storage/Storage/Hashed/Test.hs | gpl-2.0 | tree :: [TF.Test]
tree = [ testCase "modifyTree" check_modify
, testCase "complex modifyTree" check_modify_complex
, testCase "modifyTree removal" check_modify_remove
, testCase "expand" check_expand
, testCase "expandPath" check_expand_path
, testCase "expandPath of sub" check_expand... | 9,630 | tree :: [TF.Test]
tree = [ testCase "modifyTree" check_modify
, testCase "complex modifyTree" check_modify_complex
, testCase "modifyTree removal" check_modify_remove
, testCase "expand" check_expand
, testCase "expandPath" check_expand_path
, testCase "expandPath of sub" check_expand... | 9,630 | tree = [ testCase "modifyTree" check_modify
, testCase "complex modifyTree" check_modify_complex
, testCase "modifyTree removal" check_modify_remove
, testCase "expand" check_expand
, testCase "expandPath" check_expand_path
, testCase "expandPath of sub" check_expand_path_sub
,... | 9,612 | false | true | 15 | 15 | 3,454 | 2,634 | 1,251 | 1,383 | null | null |
rahulmutt/ghcvm | compiler/Eta/Prelude/PrimOp.hs | bsd-3-clause | tagOf_PrimOp CopyMutableArrayOp = _ILIT(149) | 44 | tagOf_PrimOp CopyMutableArrayOp = _ILIT(149) | 44 | tagOf_PrimOp CopyMutableArrayOp = _ILIT(149) | 44 | false | false | 0 | 6 | 3 | 15 | 7 | 8 | null | null |
andrey013/pluginstest | Plugins/Gallery/Gallery/Manual58.hs | mit | d = centerX (t ||| s ||| o ||| c) | 33 | d = centerX (t ||| s ||| o ||| c) | 33 | d = centerX (t ||| s ||| o ||| c) | 33 | false | false | 1 | 9 | 9 | 27 | 12 | 15 | null | null |
peteg/ADHOC | Tests/08_Kesterel/003_pause.hs | gpl-2.0 | e4 = unitA >>> nothingE >>> arr (\() -> ((), ())) >>> pauseE *** (pauseE >>> nothingE) | 86 | e4 = unitA >>> nothingE >>> arr (\() -> ((), ())) >>> pauseE *** (pauseE >>> nothingE) | 86 | e4 = unitA >>> nothingE >>> arr (\() -> ((), ())) >>> pauseE *** (pauseE >>> nothingE) | 86 | false | false | 0 | 12 | 16 | 52 | 28 | 24 | null | null |
CindyLinz/Haskell.js | trans/src/Desugar/CaseReorder.hs | mit | deCaseReorderLiteral a1 (PrimString l string1 string2) = PrimString (id l) (id string1) (id string2) | 100 | deCaseReorderLiteral a1 (PrimString l string1 string2) = PrimString (id l) (id string1) (id string2) | 100 | deCaseReorderLiteral a1 (PrimString l string1 string2) = PrimString (id l) (id string1) (id string2) | 100 | false | false | 0 | 7 | 13 | 46 | 22 | 24 | null | null |
SamirTalwar/advent-of-code | 2016/AOC_17_2.hs | mit | directions = [U, D, L, R] | 25 | directions = [U, D, L, R] | 25 | directions = [U, D, L, R] | 25 | false | false | 1 | 5 | 5 | 21 | 11 | 10 | null | null |
master-q/carettah | src/Carettah/Render.hs | gpl-3.0 | truePosition :: Double -> Double -> (CPosition, CPosition) -> (Double, Double)
truePosition fsize _ (CPosition x', CPosition y') = (x', y' + fsize) | 147 | truePosition :: Double -> Double -> (CPosition, CPosition) -> (Double, Double)
truePosition fsize _ (CPosition x', CPosition y') = (x', y' + fsize) | 147 | truePosition fsize _ (CPosition x', CPosition y') = (x', y' + fsize) | 68 | false | true | 0 | 11 | 22 | 70 | 36 | 34 | null | null |
mikeizbicki/dominion | src/Dominion/Cards.hs | bsd-3-clause | harbinger :: Card
harbinger = defCard
{ cardAction = \cs gs -> do
gs <- actionDrawCards 1 cs gs
gs <- actionAddActions 1 cs gs
gs <- MaybeT $ return $ actionDiscardToDeck cs gs
return gs
, cardCost = 3
, cardName = "harbinger"
, cardType = defCardType { action = True }
... | 897 | harbinger :: Card
harbinger = defCard
{ cardAction = \cs gs -> do
gs <- actionDrawCards 1 cs gs
gs <- actionAddActions 1 cs gs
gs <- MaybeT $ return $ actionDiscardToDeck cs gs
return gs
, cardCost = 3
, cardName = "harbinger"
, cardType = defCardType { action = True }
... | 897 | harbinger = defCard
{ cardAction = \cs gs -> do
gs <- actionDrawCards 1 cs gs
gs <- actionAddActions 1 cs gs
gs <- MaybeT $ return $ actionDiscardToDeck cs gs
return gs
, cardCost = 3
, cardName = "harbinger"
, cardType = defCardType { action = True }
}
where
... | 879 | false | true | 5 | 14 | 353 | 255 | 130 | 125 | null | null |
hyPiRion/hs-playground | fun-to-imp/src/Main.hs | unlicense | catted :: [FStmt]
catted = [FAssign "x" (FFilter
(FFilter (FIdent "lst")
"z" (FCall "eq" [FCall "len" [FIdent "z"],
FCall "len" [FIdent "lst"]]))
"w"
(FCall "greater" [FCall "len" [... | 386 | catted :: [FStmt]
catted = [FAssign "x" (FFilter
(FFilter (FIdent "lst")
"z" (FCall "eq" [FCall "len" [FIdent "z"],
FCall "len" [FIdent "lst"]]))
"w"
(FCall "greater" [FCall "len" [... | 386 | catted = [FAssign "x" (FFilter
(FFilter (FIdent "lst")
"z" (FCall "eq" [FCall "len" [FIdent "z"],
FCall "len" [FIdent "lst"]]))
"w"
(FCall "greater" [FCall "len" [FIdent "w"],
... | 368 | false | true | 0 | 17 | 211 | 119 | 58 | 61 | null | null |
nushio3/ghc | compiler/stranal/DmdAnal.hs | bsd-3-clause | findBndrsDmds :: AnalEnv -> DmdType -> [Var] -> (DmdType, [Demand])
-- Return the demands on the Ids in the [Var]
findBndrsDmds env dmd_ty bndrs
= go dmd_ty bndrs
where
go dmd_ty [] = (dmd_ty, [])
go dmd_ty (b:bs)
| isId b = let (dmd_ty1, dmds) = go dmd_ty bs
(dmd_ty2, dmd)... | 433 | findBndrsDmds :: AnalEnv -> DmdType -> [Var] -> (DmdType, [Demand])
findBndrsDmds env dmd_ty bndrs
= go dmd_ty bndrs
where
go dmd_ty [] = (dmd_ty, [])
go dmd_ty (b:bs)
| isId b = let (dmd_ty1, dmds) = go dmd_ty bs
(dmd_ty2, dmd) = findBndrDmd env False dmd_ty1 b
... | 387 | findBndrsDmds env dmd_ty bndrs
= go dmd_ty bndrs
where
go dmd_ty [] = (dmd_ty, [])
go dmd_ty (b:bs)
| isId b = let (dmd_ty1, dmds) = go dmd_ty bs
(dmd_ty2, dmd) = findBndrDmd env False dmd_ty1 b
in (dmd_ty2, dmd : dmds)
| otherwise = go dmd_ty bs | 319 | true | true | 1 | 10 | 140 | 179 | 86 | 93 | null | null |
TomMD/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | dATA_ARRAY_PARALLEL_PRIM_NAME = mkModuleNameFS (fsLit "Data.Array.Parallel.Prim") | 81 | dATA_ARRAY_PARALLEL_PRIM_NAME = mkModuleNameFS (fsLit "Data.Array.Parallel.Prim") | 81 | dATA_ARRAY_PARALLEL_PRIM_NAME = mkModuleNameFS (fsLit "Data.Array.Parallel.Prim") | 81 | false | false | 0 | 7 | 4 | 15 | 7 | 8 | null | null |
yairchu/hmm | src/Numeric/HMM/Internal.hs | bsd-3-clause | algoH
:: (Unboxed prob, Num prob)
=> Direction -> AlgoMode prob -> Hmm state obs prob -> [obs]
-> (prob, Int -> Int -> prob)
algoH dir mode hmm observations =
(score, getVal)
where
getVal layer node = resultArr ! ((layerArrIdxs ! layer) + node)
layers = map (hmmStatesForObservation hmm) observations
... | 4,351 | algoH
:: (Unboxed prob, Num prob)
=> Direction -> AlgoMode prob -> Hmm state obs prob -> [obs]
-> (prob, Int -> Int -> prob)
algoH dir mode hmm observations =
(score, getVal)
where
getVal layer node = resultArr ! ((layerArrIdxs ! layer) + node)
layers = map (hmmStatesForObservation hmm) observations
... | 4,351 | algoH dir mode hmm observations =
(score, getVal)
where
getVal layer node = resultArr ! ((layerArrIdxs ! layer) + node)
layers = map (hmmStatesForObservation hmm) observations
numLayers = length layers
layerArrIdxs :: UArray Int Int
layerArrIdxs = listArray (0, numLayers - 1) . scanl (+) 0 . map... | 4,220 | false | true | 123 | 15 | 1,458 | 1,318 | 689 | 629 | null | null |
yihuang/wai-sockjs | Main.hs | bsd-3-clause | staticApp :: Application
staticApp = Static.staticApp Static.defaultFileServerSettings
{ Static.ssFolder = Static.embeddedLookup $ Static.toEmbedded $(embedDir "static") } | 185 | staticApp :: Application
staticApp = Static.staticApp Static.defaultFileServerSettings
{ Static.ssFolder = Static.embeddedLookup $ Static.toEmbedded $(embedDir "static") } | 185 | staticApp = Static.staticApp Static.defaultFileServerSettings
{ Static.ssFolder = Static.embeddedLookup $ Static.toEmbedded $(embedDir "static") } | 160 | false | true | 0 | 12 | 29 | 46 | 23 | 23 | null | null |
vincenthz/language-c | src/Language/C/Analysis/AstAnalysis.hs | bsd-3-clause | tExpr' c _ (CUnary CCompOp e ni) =
do t <- tExpr c RValue e
checkIntegral' ni t
return t | 103 | tExpr' c _ (CUnary CCompOp e ni) =
do t <- tExpr c RValue e
checkIntegral' ni t
return t | 103 | tExpr' c _ (CUnary CCompOp e ni) =
do t <- tExpr c RValue e
checkIntegral' ni t
return t | 103 | false | false | 0 | 8 | 34 | 51 | 22 | 29 | null | null |
kovach/ecstatic | Development/Ecstatic/Size.hs | bsd-2-clause | sizeOfType g (ArrayType ty (ArraySize _ expr) _ _) = sizeOfType g ty * expr | 75 | sizeOfType g (ArrayType ty (ArraySize _ expr) _ _) = sizeOfType g ty * expr | 75 | sizeOfType g (ArrayType ty (ArraySize _ expr) _ _) = sizeOfType g ty * expr | 75 | false | false | 0 | 9 | 14 | 40 | 19 | 21 | null | null |
gcampax/ghc | compiler/hsSyn/HsExpr.hs | bsd-3-clause | ppr_expr (HsArrApp arrow arg _ HsFirstOrderApp False)
= hsep [ppr_lexpr arg, arrowt, ppr_lexpr arrow] | 103 | ppr_expr (HsArrApp arrow arg _ HsFirstOrderApp False)
= hsep [ppr_lexpr arg, arrowt, ppr_lexpr arrow] | 103 | ppr_expr (HsArrApp arrow arg _ HsFirstOrderApp False)
= hsep [ppr_lexpr arg, arrowt, ppr_lexpr arrow] | 103 | false | false | 0 | 7 | 15 | 41 | 20 | 21 | null | null |
mzini/tct-homepage | src/Main.hs | bsd-3-clause | parentIdField = field "parent-id" (return . takeDirectory . toFilePath . itemIdentifier) | 88 | parentIdField = field "parent-id" (return . takeDirectory . toFilePath . itemIdentifier) | 88 | parentIdField = field "parent-id" (return . takeDirectory . toFilePath . itemIdentifier) | 88 | false | false | 0 | 9 | 10 | 26 | 13 | 13 | null | null |
alios/lambda-devs | Data/DEVS/Simulation/Simulator.hs | bsd-3-clause | waitOnZero :: Integral i => MSemN i -> IO a -> IO a
waitOnZero sem = MSemN.with sem 1 | 85 | waitOnZero :: Integral i => MSemN i -> IO a -> IO a
waitOnZero sem = MSemN.with sem 1 | 85 | waitOnZero sem = MSemN.with sem 1 | 33 | false | true | 0 | 8 | 18 | 45 | 20 | 25 | null | null |
qpliu/esolang | DGOL/hs/compiler/CodeGen/CodeGen.hs | gpl-3.0 | declareExtern :: [String] -> (String,String) -> ModuleBuilder ()
declareExtern libs (mod,rout)
| elem mod libs = return ()
| otherwise = do
extern (fromString (mod ++ "." ++ rout)) [pFrameType] void
return () | 228 | declareExtern :: [String] -> (String,String) -> ModuleBuilder ()
declareExtern libs (mod,rout)
| elem mod libs = return ()
| otherwise = do
extern (fromString (mod ++ "." ++ rout)) [pFrameType] void
return () | 228 | declareExtern libs (mod,rout)
| elem mod libs = return ()
| otherwise = do
extern (fromString (mod ++ "." ++ rout)) [pFrameType] void
return () | 163 | false | true | 1 | 13 | 52 | 106 | 52 | 54 | null | null |
philopon/arib | src/Data/Arib/PESPSI/Internal.hs | bsd-3-clause | concatTsPackets :: Monad m => Conduit TS m (Either TS (PESPSI L.ByteString))
concatTsPackets = concatTsPackets' (yield . Left) (yield . Right) | 142 | concatTsPackets :: Monad m => Conduit TS m (Either TS (PESPSI L.ByteString))
concatTsPackets = concatTsPackets' (yield . Left) (yield . Right) | 142 | concatTsPackets = concatTsPackets' (yield . Left) (yield . Right) | 65 | false | true | 0 | 11 | 20 | 60 | 30 | 30 | null | null |
brendanhay/gogol | gogol-cloudiot/gen/Network/Google/Resource/CloudIOT/Projects/Locations/Registries/Groups/BindDeviceToGateway.hs | mpl-2.0 | -- | Upload protocol for media (e.g. \"raw\", \"multipart\").
plrgbdtgUploadProtocol :: Lens' ProjectsLocationsRegistriesGroupsBindDeviceToGateway (Maybe Text)
plrgbdtgUploadProtocol
= lens _plrgbdtgUploadProtocol
(\ s a -> s{_plrgbdtgUploadProtocol = a}) | 263 | plrgbdtgUploadProtocol :: Lens' ProjectsLocationsRegistriesGroupsBindDeviceToGateway (Maybe Text)
plrgbdtgUploadProtocol
= lens _plrgbdtgUploadProtocol
(\ s a -> s{_plrgbdtgUploadProtocol = a}) | 201 | plrgbdtgUploadProtocol
= lens _plrgbdtgUploadProtocol
(\ s a -> s{_plrgbdtgUploadProtocol = a}) | 103 | true | true | 0 | 8 | 33 | 49 | 25 | 24 | null | null |
silky/csound-expression | src/Csound/Air/ModArg.hs | bsd-3-clause | -- delayed white noise
delNoiseArg1 :: (ModArg1 (SE Sig) b) => D -> D -> Sig -> b -> ModArgOut1 (SE Sig) b
delNoiseArg1 delTime riseTime depth f = delModArg1 delTime riseTime depth white f | 189 | delNoiseArg1 :: (ModArg1 (SE Sig) b) => D -> D -> Sig -> b -> ModArgOut1 (SE Sig) b
delNoiseArg1 delTime riseTime depth f = delModArg1 delTime riseTime depth white f | 165 | delNoiseArg1 delTime riseTime depth f = delModArg1 delTime riseTime depth white f | 81 | true | true | 0 | 12 | 35 | 76 | 38 | 38 | null | null |
mrshannon/trees | src/Graphics.hs | gpl-2.0 | applyProjection :: Window -> View -> IO ()
applyProjection = GL.applyProjection | 79 | applyProjection :: Window -> View -> IO ()
applyProjection = GL.applyProjection | 79 | applyProjection = GL.applyProjection | 36 | false | true | 0 | 8 | 10 | 26 | 13 | 13 | null | null |
adarqui/99problems-hs | Experimentation/P07.hs | gpl-3.0 | flatten_rec :: [[a]] -> [a]
flatten_rec [] = [] | 47 | flatten_rec :: [[a]] -> [a]
flatten_rec [] = [] | 47 | flatten_rec [] = [] | 19 | false | true | 0 | 7 | 8 | 31 | 17 | 14 | null | null |
ezyang/ghc | compiler/utils/Bag.hs | bsd-3-clause | filterBagM pred (ListBag vs) = do
sat <- filterM pred vs
return (listToBag sat) | 83 | filterBagM pred (ListBag vs) = do
sat <- filterM pred vs
return (listToBag sat) | 83 | filterBagM pred (ListBag vs) = do
sat <- filterM pred vs
return (listToBag sat) | 83 | false | false | 0 | 9 | 17 | 41 | 18 | 23 | null | null |
mgold/Elm | src/Type/Constrain/Expression.hs | bsd-3-clause | constrain
:: Env.Environment
-> Canonical.Expr
-> Type
-> IO TypeConstraint
constrain env annotatedExpr@(A.A region expression) tipe =
let
list t =
Env.getType env "List" <| t
in
case expression of
E.Literal lit ->
Literal.constrain env region lit tipe
E.Cmd _ ->
ret... | 4,809 | constrain
:: Env.Environment
-> Canonical.Expr
-> Type
-> IO TypeConstraint
constrain env annotatedExpr@(A.A region expression) tipe =
let
list t =
Env.getType env "List" <| t
in
case expression of
E.Literal lit ->
Literal.constrain env region lit tipe
E.Cmd _ ->
ret... | 4,809 | constrain env annotatedExpr@(A.A region expression) tipe =
let
list t =
Env.getType env "List" <| t
in
case expression of
E.Literal lit ->
Literal.constrain env region lit tipe
E.Cmd _ ->
return CTrue
E.Sub _ ->
return CTrue
E.OutgoingPort _ _ ->
return CTrue
... | 4,717 | false | true | 0 | 26 | 1,722 | 1,650 | 785 | 865 | null | null |
rudyl313/factual-haskell-driver | test/Tests.hs | bsd-3-clause | rawIntegrationTest :: Token -> Test
rawIntegrationTest token = TestCase (do
result <- get (Options { token = token, timeout = Nothing }) "/t/places" (M.fromList [("q", "starbucks")])
assertEqual "Valid read query" "ok" (status result)) | 239 | rawIntegrationTest :: Token -> Test
rawIntegrationTest token = TestCase (do
result <- get (Options { token = token, timeout = Nothing }) "/t/places" (M.fromList [("q", "starbucks")])
assertEqual "Valid read query" "ok" (status result)) | 239 | rawIntegrationTest token = TestCase (do
result <- get (Options { token = token, timeout = Nothing }) "/t/places" (M.fromList [("q", "starbucks")])
assertEqual "Valid read query" "ok" (status result)) | 203 | false | true | 0 | 14 | 36 | 88 | 46 | 42 | null | null |
ajnsit/react-flux | src/React/Flux/DOM.hs | bsd-3-clause | hr_ :: [PropertyOrHandler eventHandler] -> ReactElementM eventHandler (); hr_ p = el "hr" p mempty | 98 | hr_ :: [PropertyOrHandler eventHandler] -> ReactElementM eventHandler ()
hr_ p = el "hr" p mempty | 97 | hr_ p = el "hr" p mempty | 24 | false | true | 0 | 7 | 14 | 39 | 19 | 20 | null | null |
comonoidial/ALFIN | ExtCore/Pretty.hs | mit | ppKind' Kunlifted = char '#' | 28 | ppKind' Kunlifted = char '#' | 28 | ppKind' Kunlifted = char '#' | 28 | false | false | 0 | 5 | 4 | 12 | 5 | 7 | null | null |
balangs/eTeak | src/TeakScript.hs | bsd-3-clause | tsBadArg :: TSVRecordClass record => String -> String -> TSValue record -> TSValue record
tsBadArg name expecting arg = TSVError $ "bad argument `" ++ show arg ++ "' to function `" ++ name
++ "' expecting " ++ expecting | 231 | tsBadArg :: TSVRecordClass record => String -> String -> TSValue record -> TSValue record
tsBadArg name expecting arg = TSVError $ "bad argument `" ++ show arg ++ "' to function `" ++ name
++ "' expecting " ++ expecting | 227 | tsBadArg name expecting arg = TSVError $ "bad argument `" ++ show arg ++ "' to function `" ++ name
++ "' expecting " ++ expecting | 137 | false | true | 2 | 9 | 51 | 76 | 34 | 42 | null | null |
vTurbine/ghc | compiler/basicTypes/DataCon.hs | bsd-3-clause | -- | Was this tycon promotable before GHC 8.0? That is, is it promotable
-- without -XTypeInType
isLegacyPromotableTyCon :: TyCon -> Bool
isLegacyPromotableTyCon tc
= isVanillaAlgTyCon tc ||
-- This returns True more often than it should, but it's quite painful
-- to make this fully accurate. And no harm ... | 528 | isLegacyPromotableTyCon :: TyCon -> Bool
isLegacyPromotableTyCon tc
= isVanillaAlgTyCon tc ||
-- This returns True more often than it should, but it's quite painful
-- to make this fully accurate. And no harm is caused; we just don't
-- require -XTypeInType every time we need to. (We'll always requi... | 431 | isLegacyPromotableTyCon tc
= isVanillaAlgTyCon tc ||
-- This returns True more often than it should, but it's quite painful
-- to make this fully accurate. And no harm is caused; we just don't
-- require -XTypeInType every time we need to. (We'll always require
-- -XDataKinds, though, so there... | 390 | true | true | 0 | 7 | 108 | 41 | 22 | 19 | null | null |
ksaveljev/hake-2 | src/Constants.hs | bsd-3-clause | fLstring = 2 :: Int | 22 | fLstring = 2 :: Int | 22 | fLstring = 2 :: Int | 22 | false | false | 0 | 4 | 7 | 9 | 5 | 4 | null | null |
arnizamani/occam | Parsing.hs | mit | -- merge the two HsDecl, one as lhs and one as rhs
mergeHsDecl :: HsDecl -> HsDecl -> (HsExp,HsExp)
mergeHsDecl (HsPatBind _ _ (HsUnGuardedRhs (HsApp (HsVar (UnQual name)) pat)) _) (HsPatBind _ _ (HsUnGuardedRhs exp) _)
-- = normalDec $ HsFunBind [HsMatch (SrcLoc "" 0 0) name [expToPat pat] (HsUnGuardedRhs exp) []]... | 367 | mergeHsDecl :: HsDecl -> HsDecl -> (HsExp,HsExp)
mergeHsDecl (HsPatBind _ _ (HsUnGuardedRhs (HsApp (HsVar (UnQual name)) pat)) _) (HsPatBind _ _ (HsUnGuardedRhs exp) _)
-- = normalDec $ HsFunBind [HsMatch (SrcLoc "" 0 0) name [expToPat pat] (HsUnGuardedRhs exp) []]
= ((HsApp (HsVar (UnQual name)) pat), exp) | 316 | mergeHsDecl (HsPatBind _ _ (HsUnGuardedRhs (HsApp (HsVar (UnQual name)) pat)) _) (HsPatBind _ _ (HsUnGuardedRhs exp) _)
-- = normalDec $ HsFunBind [HsMatch (SrcLoc "" 0 0) name [expToPat pat] (HsUnGuardedRhs exp) []]
= ((HsApp (HsVar (UnQual name)) pat), exp) | 267 | true | true | 0 | 15 | 66 | 114 | 60 | 54 | null | null |
verement/etamoo | src/MOO/List.hs | bsd-3-clause | toList :: MOOList -> [Value]
toList = V.toList . toVector | 57 | toList :: MOOList -> [Value]
toList = V.toList . toVector | 57 | toList = V.toList . toVector | 28 | false | true | 0 | 6 | 9 | 24 | 13 | 11 | null | null |
DanielWaterworth/Idris-dev | src/Idris/AbsSyntaxTree.hs | bsd-3-clause | tldeclared (PClass _ _ _ _ n _ _ ms) = concatMap tldeclared ms | 62 | tldeclared (PClass _ _ _ _ n _ _ ms) = concatMap tldeclared ms | 62 | tldeclared (PClass _ _ _ _ n _ _ ms) = concatMap tldeclared ms | 62 | false | false | 0 | 6 | 13 | 35 | 16 | 19 | null | null |
pjones/themoviedb | test/TestHelper.hs | mit | fileRequest :: FilePath -> RequestFunction
fileRequest path _ _ = Right <$> readFileLBS path | 92 | fileRequest :: FilePath -> RequestFunction
fileRequest path _ _ = Right <$> readFileLBS path | 92 | fileRequest path _ _ = Right <$> readFileLBS path | 49 | false | true | 0 | 6 | 13 | 29 | 14 | 15 | null | null |
aaronc/Idris-dev | src/Idris/AbsSyntaxTree.hs | bsd-3-clause | mapPDeclFC f g (PRunElabDecl fc script ns) =
PRunElabDecl (f fc) (mapPTermFC f g script) ns | 95 | mapPDeclFC f g (PRunElabDecl fc script ns) =
PRunElabDecl (f fc) (mapPTermFC f g script) ns | 95 | mapPDeclFC f g (PRunElabDecl fc script ns) =
PRunElabDecl (f fc) (mapPTermFC f g script) ns | 95 | false | false | 0 | 7 | 19 | 46 | 22 | 24 | null | null |
bhamrick/RouteNeo | Pokemon/Species.hs | bsd-3-clause | allSpecies :: [Species]
allSpecies =
[ Species
{ _name = "Bulbasaur"
, _expCurve = MediumSlow
, _type1 = Grass
, _type2 = Just Poison
, _baseHP = 45
, _baseAtk = 49
, _baseDef = 49
, _baseSpd = 45
, _baseSpc = 65
, _kill... | 85,563 | allSpecies :: [Species]
allSpecies =
[ Species
{ _name = "Bulbasaur"
, _expCurve = MediumSlow
, _type1 = Grass
, _type2 = Just Poison
, _baseHP = 45
, _baseAtk = 49
, _baseDef = 49
, _baseSpd = 45
, _baseSpc = 65
, _kill... | 85,563 | allSpecies =
[ Species
{ _name = "Bulbasaur"
, _expCurve = MediumSlow
, _type1 = Grass
, _type2 = Just Poison
, _baseHP = 45
, _baseAtk = 49
, _baseDef = 49
, _baseSpd = 45
, _baseSpc = 65
, _killExp = 64
, _lea... | 85,539 | false | true | 0 | 11 | 43,561 | 21,191 | 13,859 | 7,332 | null | null |
paulkeene/FP101x | chapter04/Exercises.hs | bsd-3-clause | -- Exercise 10 --
ex10 :: Int
ex10 = sum [x | x <- [1..10], even x] | 68 | ex10 :: Int
ex10 = sum [x | x <- [1..10], even x] | 49 | ex10 = sum [x | x <- [1..10], even x] | 37 | true | true | 0 | 9 | 17 | 45 | 21 | 24 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.