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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
futufeld/eclogues | eclogues-impl/gen-hs/AuroraAdmin_Client.hs | bsd-3-clause | endMaintenance (ip,op) arg_hosts arg_session = do
send_endMaintenance op arg_hosts arg_session
recv_endMaintenance ip | 121 | endMaintenance (ip,op) arg_hosts arg_session = do
send_endMaintenance op arg_hosts arg_session
recv_endMaintenance ip | 121 | endMaintenance (ip,op) arg_hosts arg_session = do
send_endMaintenance op arg_hosts arg_session
recv_endMaintenance ip | 121 | false | false | 1 | 8 | 15 | 38 | 16 | 22 | null | null |
Javran/Project-Euler | src/ProjectEuler/Problem84.hs | mit | problem :: Problem
problem = pureProblem 84 Solved result | 57 | problem :: Problem
problem = pureProblem 84 Solved result | 57 | problem = pureProblem 84 Solved result | 38 | false | true | 0 | 5 | 8 | 18 | 9 | 9 | null | null |
li-zhirui/EoplLangs | src/LetRecLang/Data.hs | bsd-3-clause | apply :: Environment -> String -> Maybe DenotedValue
apply = flip M.lookup | 74 | apply :: Environment -> String -> Maybe DenotedValue
apply = flip M.lookup | 74 | apply = flip M.lookup | 21 | false | true | 0 | 8 | 11 | 32 | 14 | 18 | null | null |
TomMD/ghc | compiler/utils/Outputable.hs | bsd-3-clause | semi = docToSDoc $ Pretty.semi | 36 | semi = docToSDoc $ Pretty.semi | 36 | semi = docToSDoc $ Pretty.semi | 36 | false | false | 0 | 6 | 10 | 12 | 6 | 6 | null | null |
termite2/tsl | Frontend/NS.hs | bsd-3-clause | objLookup (ObjRelation t r) n = fmap (ObjRArg (ScopeRelation t r)) $ find ((== n) . name) (relArg r) | 100 | objLookup (ObjRelation t r) n = fmap (ObjRArg (ScopeRelation t r)) $ find ((== n) . name) (relArg r) | 100 | objLookup (ObjRelation t r) n = fmap (ObjRArg (ScopeRelation t r)) $ find ((== n) . name) (relArg r) | 100 | false | false | 0 | 10 | 18 | 62 | 31 | 31 | null | null |
vincenthz/cryptonite | tests/KAT_Scrypt.hs | bsd-3-clause | vectors :: [ ((ByteString, ByteString, Word64, Int, Int, Int), ByteString) ]
vectors =
[
( ("", "", 16, 1, 1, 64)
, "\x77\xd6\x57\x62\x38\x65\x7b\x20\x3b\x19\xca\x42\xc1\x8a\x04\x97\xf1\x6b\x48\x44\xe3\x07\x4a\xe8\xdf\xdf\xfa\x3f\xed\xe2\x14\x42\xfc\xd0\x06\x9d\xed\x09\x48\xf8\x32\x6a\x75\x3a\x0f\xc... | 1,423 | vectors :: [ ((ByteString, ByteString, Word64, Int, Int, Int), ByteString) ]
vectors =
[
( ("", "", 16, 1, 1, 64)
, "\x77\xd6\x57\x62\x38\x65\x7b\x20\x3b\x19\xca\x42\xc1\x8a\x04\x97\xf1\x6b\x48\x44\xe3\x07\x4a\xe8\xdf\xdf\xfa\x3f\xed\xe2\x14\x42\xfc\xd0\x06\x9d\xed\x09\x48\xf8\x32\x6a\x75\x3a\x0f\xc... | 1,423 | vectors =
[
( ("", "", 16, 1, 1, 64)
, "\x77\xd6\x57\x62\x38\x65\x7b\x20\x3b\x19\xca\x42\xc1\x8a\x04\x97\xf1\x6b\x48\x44\xe3\x07\x4a\xe8\xdf\xdf\xfa\x3f\xed\xe2\x14\x42\xfc\xd0\x06\x9d\xed\x09\x48\xf8\x32\x6a\x75\x3a\x0f\xc8\x1f\x17\xe8\xd3\xe0\xfb\x2e\x0d\x36\x28\xcf\x35\xe2\x0c\x38\xd1\x89\x06"
... | 1,346 | false | true | 0 | 7 | 155 | 146 | 96 | 50 | null | null |
maque/Hate | src/Hate/Common.hs | mit | -- Assuming this doesn't change, for now
-- this actually controls update rate, as the display
-- rate is vsynced
desiredFPS = 60.0 | 131 | desiredFPS = 60.0 | 17 | desiredFPS = 60.0 | 17 | true | false | 1 | 5 | 22 | 13 | 6 | 7 | null | null |
j-mueller/hldb | webapp/VirtualHom/Svg.hs | bsd-3-clause | -- | The @unicodeBidi@ attribute.
unicode_bidi :: AttrTag
unicode_bidi = makeAttribute "unicode-bidi" | 101 | unicode_bidi :: AttrTag
unicode_bidi = makeAttribute "unicode-bidi" | 67 | unicode_bidi = makeAttribute "unicode-bidi" | 43 | true | true | 0 | 5 | 11 | 15 | 8 | 7 | null | null |
JacquesCarette/literate-scientific-software | code/drasil-example/Drasil/GamePhysics/Unitals.hs | bsd-2-clause | perpLenB = perpParam "B" $ eqSymb contDispB | 46 | perpLenB = perpParam "B" $ eqSymb contDispB | 46 | perpLenB = perpParam "B" $ eqSymb contDispB | 46 | false | false | 1 | 6 | 9 | 19 | 7 | 12 | null | null |
Zankoku-Okuno/octopus | Language/Octopus/Parser/Import.hs | gpl-3.0 | pushExplicit :: Int -> Parser ()
pushExplicit n = layoutOnly $ modifyState (Explicit n :) | 89 | pushExplicit :: Int -> Parser ()
pushExplicit n = layoutOnly $ modifyState (Explicit n :) | 89 | pushExplicit n = layoutOnly $ modifyState (Explicit n :) | 56 | false | true | 0 | 8 | 14 | 37 | 18 | 19 | null | null |
spencerjanssen/cabal2nix | src/Cabal2Nix/License.hs | bsd-3-clause | fromCabalLicense PublicDomain = Known "stdenv.lib.licenses.publicDomain" | 98 | fromCabalLicense PublicDomain = Known "stdenv.lib.licenses.publicDomain" | 98 | fromCabalLicense PublicDomain = Known "stdenv.lib.licenses.publicDomain" | 98 | false | false | 0 | 5 | 30 | 13 | 5 | 8 | null | null |
leohahn/scheme-interpreter | .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/autogen/Paths_scheme_interpreter.hs | bsd-3-clause | libdir = "/home/lhahn/dev/haskell/scheme-interpreter/.stack-work/install/x86_64-linux/lts-4.2/7.10.3/lib/x86_64-linux-ghc-7.10.3/scheme-interpreter-0.1.0.0-JKJnTqsSGsY8xQJBR5BvwX" | 183 | libdir = "/home/lhahn/dev/haskell/scheme-interpreter/.stack-work/install/x86_64-linux/lts-4.2/7.10.3/lib/x86_64-linux-ghc-7.10.3/scheme-interpreter-0.1.0.0-JKJnTqsSGsY8xQJBR5BvwX" | 183 | libdir = "/home/lhahn/dev/haskell/scheme-interpreter/.stack-work/install/x86_64-linux/lts-4.2/7.10.3/lib/x86_64-linux-ghc-7.10.3/scheme-interpreter-0.1.0.0-JKJnTqsSGsY8xQJBR5BvwX" | 183 | false | false | 1 | 5 | 6 | 10 | 3 | 7 | null | null |
diogob/postgrest | test/Feature/RangeSpec.hs | mit | emptyRange :: BL.ByteString
emptyRange = [json| { "min": 2, "max": 2 } |] | 73 | emptyRange :: BL.ByteString
emptyRange = [json| { "min": 2, "max": 2 } |] | 73 | emptyRange = [json| { "min": 2, "max": 2 } |] | 45 | false | true | 0 | 7 | 12 | 24 | 12 | 12 | null | null |
kallisti-dev/portalchess | PortalChess.hs | bsd-3-clause | moveSet c (Just (Piece player piece)) = case piece of
Pawn ->
forwardStep `mplus` diagCapture
where
forwardStep = linearStep . Move c . startDirFor $ player
diagCapture = (mplus `on` step captureRule . Move c) diag1 diag2
(diag1, diag2) = rotateCW &&& rotateCCW $ startDirFor player
... | 811 | moveSet c (Just (Piece player piece)) = case piece of
Pawn ->
forwardStep `mplus` diagCapture
where
forwardStep = linearStep . Move c . startDirFor $ player
diagCapture = (mplus `on` step captureRule . Move c) diag1 diag2
(diag1, diag2) = rotateCW &&& rotateCCW $ startDirFor player
... | 811 | moveSet c (Just (Piece player piece)) = case piece of
Pawn ->
forwardStep `mplus` diagCapture
where
forwardStep = linearStep . Move c . startDirFor $ player
diagCapture = (mplus `on` step captureRule . Move c) diag1 diag2
(diag1, diag2) = rotateCW &&& rotateCCW $ startDirFor player
... | 811 | false | false | 2 | 14 | 196 | 285 | 143 | 142 | null | null |
HaskellForCats/HaskellForCats | EstTaxQrt/estTax3rdQrt.hs | mit | taxAlbany = ( earnedQt*albanyOblig) | 35 | taxAlbany = ( earnedQt*albanyOblig) | 35 | taxAlbany = ( earnedQt*albanyOblig) | 35 | false | false | 1 | 7 | 3 | 17 | 7 | 10 | null | null |
eklavya/Idris-dev | src/Idris/AbsSyntaxTree.hs | bsd-3-clause | strLogCat IIBC = "ibc" | 27 | strLogCat IIBC = "ibc" | 27 | strLogCat IIBC = "ibc" | 27 | false | false | 0 | 5 | 8 | 9 | 4 | 5 | null | null |
travitch/llvm-analysis | src/LLVM/Analysis/CallGraph/Internal.hs | bsd-3-clause | callSiteTargets cg (InvokeInst { invokeFunction = f}) =
callValueTargets cg f | 79 | callSiteTargets cg (InvokeInst { invokeFunction = f}) =
callValueTargets cg f | 79 | callSiteTargets cg (InvokeInst { invokeFunction = f}) =
callValueTargets cg f | 79 | false | false | 0 | 8 | 12 | 31 | 14 | 17 | null | null |
dysinger/amazonka | amazonka-dynamodb/gen/Network/AWS/DynamoDB/Scan.hs | mpl-2.0 | -- | A string that identifies one or more attributes to retrieve from the
-- specified table or index. These attributes can include scalars, sets, or
-- elements of a JSON document. The attributes in the expression must be
-- separated by commas.
--
-- If no attribute names are specified, then all attributes will be re... | 775 | sProjectionExpression :: Lens' Scan (Maybe Text)
sProjectionExpression =
lens _sProjectionExpression (\s a -> s { _sProjectionExpression = a }) | 147 | sProjectionExpression =
lens _sProjectionExpression (\s a -> s { _sProjectionExpression = a }) | 98 | true | true | 0 | 9 | 113 | 55 | 34 | 21 | null | null |
raichoo/Idris-dev | src/Idris/Reflection.hs | bsd-3-clause | reflectRawQuotePattern unq (RApp f x) =
do fH <- getNameFrom (sMN 0 "f")
claim fH (Var (reflm "Raw"))
movelast fH
xH <- getNameFrom (sMN 0 "x")
claim xH (Var (reflm "Raw"))
movelast xH
fill $ reflCall "RApp" [Var fH, Var xH]
solve
focus fH; reflectRawQuotePattern unq f
foc... | 355 | reflectRawQuotePattern unq (RApp f x) =
do fH <- getNameFrom (sMN 0 "f")
claim fH (Var (reflm "Raw"))
movelast fH
xH <- getNameFrom (sMN 0 "x")
claim xH (Var (reflm "Raw"))
movelast xH
fill $ reflCall "RApp" [Var fH, Var xH]
solve
focus fH; reflectRawQuotePattern unq f
foc... | 355 | reflectRawQuotePattern unq (RApp f x) =
do fH <- getNameFrom (sMN 0 "f")
claim fH (Var (reflm "Raw"))
movelast fH
xH <- getNameFrom (sMN 0 "x")
claim xH (Var (reflm "Raw"))
movelast xH
fill $ reflCall "RApp" [Var fH, Var xH]
solve
focus fH; reflectRawQuotePattern unq f
foc... | 355 | false | false | 0 | 11 | 98 | 164 | 71 | 93 | null | null |
spwhitton/srem | src/Utility/EventCache.hs | gpl-3.0 | makeEventCSV :: Reminder -> String
makeEventCSV r = (show . getReminderHour $ r) ++ "," ++
(show . getReminderMinute $ r) ++ ","
++ getReminderText r | 185 | makeEventCSV :: Reminder -> String
makeEventCSV r = (show . getReminderHour $ r) ++ "," ++
(show . getReminderMinute $ r) ++ ","
++ getReminderText r | 185 | makeEventCSV r = (show . getReminderHour $ r) ++ "," ++
(show . getReminderMinute $ r) ++ ","
++ getReminderText r | 148 | false | true | 0 | 11 | 61 | 59 | 30 | 29 | null | null |
jparyani/capnproto-boostpython | compiler/src/Parser.hs | bsd-2-clause | unionDecl statements = do
(name, ordinal) <- nameWithOrdinal
unionKeyword
annotations <- many annotation
children <- parseBlock unionLine statements
return (UnionDecl name ordinal annotations children) | 221 | unionDecl statements = do
(name, ordinal) <- nameWithOrdinal
unionKeyword
annotations <- many annotation
children <- parseBlock unionLine statements
return (UnionDecl name ordinal annotations children) | 221 | unionDecl statements = do
(name, ordinal) <- nameWithOrdinal
unionKeyword
annotations <- many annotation
children <- parseBlock unionLine statements
return (UnionDecl name ordinal annotations children) | 221 | false | false | 0 | 9 | 43 | 65 | 29 | 36 | null | null |
leepike/copilot-c99 | src/Copilot/Compile/C99/Test/Driver.hs | bsd-3-clause | --------------------------------------------------------------------------------
ppEnvDecls :: Int -> [ExtVars] -> Doc
ppEnvDecls numIterations vars =
vcat $
[ space
, text "// External variables"
, vcat $ map ppEnvDecl vars
, space
, text "// External values"
, vcat $ map ppVals vars
... | 990 | ppEnvDecls :: Int -> [ExtVars] -> Doc
ppEnvDecls numIterations vars =
vcat $
[ space
, text "// External variables"
, vcat $ map ppEnvDecl vars
, space
, text "// External values"
, vcat $ map ppVals vars
, space
, space
]
where
ppEnvDecl :: (Name, DynamicF [] Type) -> ... | 908 | ppEnvDecls numIterations vars =
vcat $
[ space
, text "// External variables"
, vcat $ map ppEnvDecl vars
, space
, text "// External values"
, vcat $ map ppVals vars
, space
, space
]
where
ppEnvDecl :: (Name, DynamicF [] Type) -> Doc
ppEnvDecl (name, DynamicF _ t) =... | 870 | true | true | 0 | 14 | 247 | 301 | 157 | 144 | null | null |
urbanslug/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | toListClassOpKey = mkPreludeMiscIdUnique 501 | 44 | toListClassOpKey = mkPreludeMiscIdUnique 501 | 44 | toListClassOpKey = mkPreludeMiscIdUnique 501 | 44 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
corajr/adventofcode2015 | 8/Strings.hs | mit | main = do
input <- readFile "input.txt"
print $ partTwo input | 65 | main = do
input <- readFile "input.txt"
print $ partTwo input | 65 | main = do
input <- readFile "input.txt"
print $ partTwo input | 65 | false | false | 1 | 9 | 14 | 30 | 11 | 19 | null | null |
spacekitteh/smcghc | libraries/ghc-prim/GHC/Classes.hs | bsd-3-clause | not False = True | 31 | not False = True | 31 | not False = True | 31 | false | false | 0 | 4 | 18 | 10 | 4 | 6 | null | null |
braidchat/greeterbot | src/Data/Transit.hs | epl-1.0 | bi :: (a -> b) -> (a, a) -> (b, b)
bi f (x, y) = (f x, f y) | 59 | bi :: (a -> b) -> (a, a) -> (b, b)
bi f (x, y) = (f x, f y) | 59 | bi f (x, y) = (f x, f y) | 24 | false | true | 0 | 7 | 19 | 66 | 35 | 31 | null | null |
Lyapunov/haskell-programming-from-first-principles | chapter_9/my_enum_from_to.hs | mit | -- ordering is easy for Char as well
eftChar :: Char -> Char -> [Char]
eftChar x y
| x > y = []
| otherwise = x : eftChar (succ x) y | 134 | eftChar :: Char -> Char -> [Char]
eftChar x y
| x > y = []
| otherwise = x : eftChar (succ x) y | 97 | eftChar x y
| x > y = []
| otherwise = x : eftChar (succ x) y | 63 | true | true | 2 | 9 | 34 | 74 | 33 | 41 | null | null |
phischu/fragnix | tests/packages/scotty/Data.Text.Lazy.Builder.RealFloat.hs | bsd-3-clause | floatToDigits 0 = ([0], 0) | 26 | floatToDigits 0 = ([0], 0) | 26 | floatToDigits 0 = ([0], 0) | 26 | false | false | 1 | 6 | 4 | 21 | 10 | 11 | null | null |
MnO2/hindley-milner | src/HM/HigherRank.hs | bsd-3-clause | tcRho (ALam var var_ty body) (Check exp_ty)
= do { (arg_ty, body_ty) <- unifyFun exp_ty
; subsCheck arg_ty var_ty
; extendVarEnv var var_ty (checkRho body body_ty) } | 182 | tcRho (ALam var var_ty body) (Check exp_ty)
= do { (arg_ty, body_ty) <- unifyFun exp_ty
; subsCheck arg_ty var_ty
; extendVarEnv var var_ty (checkRho body body_ty) } | 182 | tcRho (ALam var var_ty body) (Check exp_ty)
= do { (arg_ty, body_ty) <- unifyFun exp_ty
; subsCheck arg_ty var_ty
; extendVarEnv var var_ty (checkRho body body_ty) } | 182 | false | false | 1 | 10 | 43 | 78 | 36 | 42 | null | null |
brendanhay/gogol | gogol-dns/gen/Network/Google/DNS/Types/Product.hs | mpl-2.0 | -- | The managed zone resources.
mzlrManagedZones :: Lens' ManagedZonesListResponse [ManagedZone]
mzlrManagedZones
= lens _mzlrManagedZones
(\ s a -> s{_mzlrManagedZones = a})
. _Default
. _Coerce | 216 | mzlrManagedZones :: Lens' ManagedZonesListResponse [ManagedZone]
mzlrManagedZones
= lens _mzlrManagedZones
(\ s a -> s{_mzlrManagedZones = a})
. _Default
. _Coerce | 183 | mzlrManagedZones
= lens _mzlrManagedZones
(\ s a -> s{_mzlrManagedZones = a})
. _Default
. _Coerce | 118 | true | true | 2 | 8 | 45 | 57 | 28 | 29 | null | null |
DavidAlphaFox/ghc | utils/haddock/haddock-library/src/Documentation/Haddock/Doc.hs | bsd-3-clause | emptyMetaDoc :: MetaDoc mod id
emptyMetaDoc = MetaDoc { _meta = emptyMeta, _doc = DocEmpty } | 92 | emptyMetaDoc :: MetaDoc mod id
emptyMetaDoc = MetaDoc { _meta = emptyMeta, _doc = DocEmpty } | 92 | emptyMetaDoc = MetaDoc { _meta = emptyMeta, _doc = DocEmpty } | 61 | false | true | 1 | 7 | 15 | 37 | 18 | 19 | null | null |
markuspf/Idris-dev | src/IRTS/CodegenC.hs | bsd-3-clause | doOp v LCrash [x] = "idris_crash(GETSTR(" ++ creg x ++ "))" | 59 | doOp v LCrash [x] = "idris_crash(GETSTR(" ++ creg x ++ "))" | 59 | doOp v LCrash [x] = "idris_crash(GETSTR(" ++ creg x ++ "))" | 59 | false | false | 0 | 7 | 10 | 30 | 13 | 17 | null | null |
merijn/parsers | src/Text/Parser/Char.hs | bsd-3-clause | -- | Parses a tab character (\'\\t\'). Returns a tab character.
tab :: CharParsing m => m Char
tab = char '\t' <?> "tab" | 120 | tab :: CharParsing m => m Char
tab = char '\t' <?> "tab" | 56 | tab = char '\t' <?> "tab" | 25 | true | true | 0 | 6 | 23 | 29 | 14 | 15 | null | null |
vladfi1/hs-misc | FactorGraph/FactorGraph.hs | mit | addFactor :: [VKey] -> ((VKey -> v) -> Double) -> FactorGraph v -> FactorGraph v
addFactor vkeys w graph@FactorGraph{..} =
FactorGraph {
variables = variables',
factors = Map.insert counter factor factors,
counter = counter + 1
} where
factor =
Factor {
vars = Set.fromList vkeys,
... | 590 | addFactor :: [VKey] -> ((VKey -> v) -> Double) -> FactorGraph v -> FactorGraph v
addFactor vkeys w graph@FactorGraph{..} =
FactorGraph {
variables = variables',
factors = Map.insert counter factor factors,
counter = counter + 1
} where
factor =
Factor {
vars = Set.fromList vkeys,
... | 590 | addFactor vkeys w graph@FactorGraph{..} =
FactorGraph {
variables = variables',
factors = Map.insert counter factor factors,
counter = counter + 1
} where
factor =
Factor {
vars = Set.fromList vkeys,
weight = w,
marginals = Map.fromList [(vkey, [(val, 1) | val <- values... | 509 | false | true | 18 | 12 | 152 | 223 | 116 | 107 | null | null |
waddlaw/TFwH | src/Ch01.hs | bsd-3-clause | -- |
--
-- song n は n 人の男が登場する歌
--
song :: Int -> String
song n = if n == 0 then ""
else song (n-1) ++ "\n" ++ verse n | 125 | song :: Int -> String
song n = if n == 0 then ""
else song (n-1) ++ "\n" ++ verse n | 90 | song n = if n == 0 then ""
else song (n-1) ++ "\n" ++ verse n | 68 | true | true | 0 | 10 | 38 | 55 | 30 | 25 | null | null |
WSCU/JSEuterpea | Euterpea Examples/SimpleEuterpea.hs | gpl-3.0 | etPitchNote _ = 0
| 18 | getPitchNote _ = 0 | 18 | getPitchNote _ = 0 | 18 | false | false | 0 | 5 | 4 | 9 | 4 | 5 | null | null |
green-haskell/ghc | compiler/cmm/CmmNode.hs | bsd-3-clause | foldExp _ (CmmBranch _) z = z | 53 | foldExp _ (CmmBranch _) z = z | 53 | foldExp _ (CmmBranch _) z = z | 53 | false | false | 1 | 6 | 30 | 21 | 9 | 12 | null | null |
josuf107/Adverb | Adverb/Common.hs | gpl-3.0 | resignedly = id | 15 | resignedly = id | 15 | resignedly = id | 15 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
janrain/heist | src/Text/Templating/Heist/Internal.hs | bsd-3-clause | loadHook :: Monad m => TemplateState m -> (TPath, InternalTemplate) -> IO (TemplateState m)
loadHook ts (tp, t) = do
t' <- runHookInternal (_onLoadHook ts) t
return $ insertTemplate tp t' ts
------------------------------------------------------------------------------
-- These are here until we can get them ... | 411 | loadHook :: Monad m => TemplateState m -> (TPath, InternalTemplate) -> IO (TemplateState m)
loadHook ts (tp, t) = do
t' <- runHookInternal (_onLoadHook ts) t
return $ insertTemplate tp t' ts
------------------------------------------------------------------------------
-- These are here until we can get them ... | 411 | loadHook ts (tp, t) = do
t' <- runHookInternal (_onLoadHook ts) t
return $ insertTemplate tp t' ts
------------------------------------------------------------------------------
-- These are here until we can get them into hexpat.
------------------------------------------------------------------------------ | 319 | false | true | 0 | 11 | 54 | 95 | 46 | 49 | null | null |
ben-schulz/Idris-dev | src/IRTS/CodegenC.hs | bsd-3-clause | bcc i (RESERVE n) = indent i ++ "RESERVE(" ++ show n ++ ");\n" | 62 | bcc i (RESERVE n) = indent i ++ "RESERVE(" ++ show n ++ ");\n" | 62 | bcc i (RESERVE n) = indent i ++ "RESERVE(" ++ show n ++ ");\n" | 62 | false | false | 2 | 7 | 13 | 39 | 16 | 23 | null | null |
simhu/cubical | CTT.hs | mit | mapOEnv :: (Val -> Val) -> OEnv -> OEnv
mapOEnv f (OEnv e o) = OEnv (mapEnv f e) o | 82 | mapOEnv :: (Val -> Val) -> OEnv -> OEnv
mapOEnv f (OEnv e o) = OEnv (mapEnv f e) o | 82 | mapOEnv f (OEnv e o) = OEnv (mapEnv f e) o | 42 | false | true | 0 | 7 | 19 | 52 | 26 | 26 | null | null |
codemac/yi-editor | src/Yi/Debug.hs | gpl-2.0 | -- | Like traceM, but returns ().
traceM_ :: Monad m => String -> m ()
traceM_ x = traceM x () | 94 | traceM_ :: Monad m => String -> m ()
traceM_ x = traceM x () | 60 | traceM_ x = traceM x () | 23 | true | true | 0 | 8 | 21 | 38 | 18 | 20 | null | null |
flowbox-public/language-c-quote | Language/C/Parser/Monad.hs | bsd-3-clause | allowAnti :: AlexPredicate
allowAnti = ifExtension antiquotationExts | 68 | allowAnti :: AlexPredicate
allowAnti = ifExtension antiquotationExts | 68 | allowAnti = ifExtension antiquotationExts | 41 | false | true | 0 | 6 | 6 | 20 | 8 | 12 | null | null |
snoyberg/ghc | compiler/utils/Pretty.hs | bsd-3-clause | -- Arg of a TextBeside is always an RDoc
textBeside_ :: TextDetails -> Int -> RDoc -> RDoc
textBeside_ = TextBeside | 115 | textBeside_ :: TextDetails -> Int -> RDoc -> RDoc
textBeside_ = TextBeside | 74 | textBeside_ = TextBeside | 24 | true | true | 0 | 7 | 20 | 24 | 13 | 11 | null | null |
lunaris/hdevtools | src/Stack.hs | mit | --------------------------------------------------------------------------------
-- | Generic Helpers
--------------------------------------------------------------------------------
splitBy :: Char -> String -> [String]
splitBy c str
| null str' = [x]
| otherwise = x : splitBy c (tail str')
where
(x, str') ... | 337 | splitBy :: Char -> String -> [String]
splitBy c str
| null str' = [x]
| otherwise = x : splitBy c (tail str')
where
(x, str') = span (c /=) str | 153 | splitBy c str
| null str' = [x]
| otherwise = x : splitBy c (tail str')
where
(x, str') = span (c /=) str | 115 | true | true | 1 | 8 | 48 | 87 | 46 | 41 | null | null |
8l/metafun | src/Metafun/Compiler.hs | gpl-3.0 | compile :: TProgram -> Compiler ()
compile (Kiff.Program typeDecls defs) = do
mapM_ output platformDefs
mapM_ compileTypeDecl builtinTys
mapM_ compileTypeDecl typeDecls
mapM_ compileDef defs
where
platformDefs = [ MPL.Def "Int" [MPL.MetaInt] [MPL.Specialization [MPL.MetaVarDecl "x" MPL.MetaInt] No... | 814 | compile :: TProgram -> Compiler ()
compile (Kiff.Program typeDecls defs) = do
mapM_ output platformDefs
mapM_ compileTypeDecl builtinTys
mapM_ compileTypeDecl typeDecls
mapM_ compileDef defs
where
platformDefs = [ MPL.Def "Int" [MPL.MetaInt] [MPL.Specialization [MPL.MetaVarDecl "x" MPL.MetaInt] No... | 814 | compile (Kiff.Program typeDecls defs) = do
mapM_ output platformDefs
mapM_ compileTypeDecl builtinTys
mapM_ compileTypeDecl typeDecls
mapM_ compileDef defs
where
platformDefs = [ MPL.Def "Int" [MPL.MetaInt] [MPL.Specialization [MPL.MetaVarDecl "x" MPL.MetaInt] Nothing [] (MPL.TyInt, MPL.VarRef "x"... | 779 | false | true | 1 | 13 | 237 | 283 | 140 | 143 | null | null |
apoco/wave-machine | src/WaveMachine/Audio/Pitch.hs | unlicense | toneFrequency :: Tone -> Int -> Double
toneFrequency tone octave = a4 * (2.0 ** (fromIntegral (toneIndex tone octave) / 12.0)) | 126 | toneFrequency :: Tone -> Int -> Double
toneFrequency tone octave = a4 * (2.0 ** (fromIntegral (toneIndex tone octave) / 12.0)) | 126 | toneFrequency tone octave = a4 * (2.0 ** (fromIntegral (toneIndex tone octave) / 12.0)) | 87 | false | true | 0 | 13 | 20 | 58 | 28 | 30 | null | null |
olsner/ghc | libraries/template-haskell/Language/Haskell/TH/PprLib.hs | bsd-3-clause | hang d1 n d2 = do d1' <- d1
d2' <- d2
return (HPJ.hang d1' n d2')
-- punctuate uses the same definition as Text.PrettyPrint | 160 | hang d1 n d2 = do d1' <- d1
d2' <- d2
return (HPJ.hang d1' n d2')
-- punctuate uses the same definition as Text.PrettyPrint | 160 | hang d1 n d2 = do d1' <- d1
d2' <- d2
return (HPJ.hang d1' n d2')
-- punctuate uses the same definition as Text.PrettyPrint | 160 | false | false | 1 | 11 | 61 | 52 | 21 | 31 | null | null |
ghcjs/jsaddle-dom | src/JSDOM/Generated/HTMLKeygenElement.hs | mit | -- | <https://developer.mozilla.org/en-US/docs/Web/API/HTMLKeygenElement.reportValidity Mozilla HTMLKeygenElement.reportValidity documentation>
reportValidity_ :: (MonadDOM m) => HTMLKeygenElement -> m ()
reportValidity_ self
= liftDOM (void (self ^. jsf "reportValidity" ())) | 279 | reportValidity_ :: (MonadDOM m) => HTMLKeygenElement -> m ()
reportValidity_ self
= liftDOM (void (self ^. jsf "reportValidity" ())) | 134 | reportValidity_ self
= liftDOM (void (self ^. jsf "reportValidity" ())) | 73 | true | true | 0 | 11 | 27 | 56 | 28 | 28 | null | null |
dbp/hs-stripe | src/Web/Stripe/Client.hs | bsd-3-clause | errorMsg :: BL.ByteString -> Maybe StripeError
errorMsg bs = join . fmap getErrorVal $ decode' bs
where
getErrorVal (Object o) = maybe Nothing (parseMaybe parseJSON) (HML.lookup "error" o)
getErrorVal _ = Nothing
-- | Attempts to parse error information provided with each error by the Stripe
-- API. In th... | 479 | errorMsg :: BL.ByteString -> Maybe StripeError
errorMsg bs = join . fmap getErrorVal $ decode' bs
where
getErrorVal (Object o) = maybe Nothing (parseMaybe parseJSON) (HML.lookup "error" o)
getErrorVal _ = Nothing
-- | Attempts to parse error information provided with each error by the Stripe
-- API. In th... | 479 | errorMsg bs = join . fmap getErrorVal $ decode' bs
where
getErrorVal (Object o) = maybe Nothing (parseMaybe parseJSON) (HML.lookup "error" o)
getErrorVal _ = Nothing
-- | Attempts to parse error information provided with each error by the Stripe
-- API. In the parsing, the error is classified as a specifi... | 432 | false | true | 0 | 8 | 92 | 93 | 45 | 48 | null | null |
tomjaguarpaw/postgresql-simple | src/Database/PostgreSQL/Simple/LargeObjects.hs | bsd-3-clause | loCreat :: Connection -> IO Oid
loCreat conn = liftPQ "loCreat" conn (\c -> PQ.loCreat c) | 89 | loCreat :: Connection -> IO Oid
loCreat conn = liftPQ "loCreat" conn (\c -> PQ.loCreat c) | 89 | loCreat conn = liftPQ "loCreat" conn (\c -> PQ.loCreat c) | 57 | false | true | 0 | 9 | 15 | 41 | 20 | 21 | null | null |
andrewMacmurray/haskell-book-solutions | src/ch14/VignenereSpec.hs | mit | vignereProp :: Property
vignereProp =
forAll keywordMessageGen
(\(message, key) -> (unvignere (vignere message key) key) == message) | 138 | vignereProp :: Property
vignereProp =
forAll keywordMessageGen
(\(message, key) -> (unvignere (vignere message key) key) == message) | 138 | vignereProp =
forAll keywordMessageGen
(\(message, key) -> (unvignere (vignere message key) key) == message) | 114 | false | true | 0 | 12 | 22 | 58 | 28 | 30 | null | null |
nevrenato/Hets_Fork | CommonLogic/Tools.hs | gpl-2.0 | prd_module :: MODULE -> Set.Set NAME
prd_module m =
case m of
Mod _ t _ -> prd_text t
Mod_ex _ _ t _ -> prd_text t | 137 | prd_module :: MODULE -> Set.Set NAME
prd_module m =
case m of
Mod _ t _ -> prd_text t
Mod_ex _ _ t _ -> prd_text t | 137 | prd_module m =
case m of
Mod _ t _ -> prd_text t
Mod_ex _ _ t _ -> prd_text t | 100 | false | true | 0 | 8 | 49 | 61 | 28 | 33 | null | null |
ghc-android/ghc | testsuite/tests/ghci/should_run/ghcirun004.hs | bsd-3-clause | 2676 = 2675 | 11 | 2676 = 2675 | 11 | 2676 = 2675 | 11 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
lennart/tidal-midi | Sound/Tidal/VolcaKeys.hs | gpl-3.0 | note = makeI oscKeys "note" | 27 | note = makeI oscKeys "note" | 27 | note = makeI oscKeys "note" | 27 | false | false | 0 | 5 | 4 | 11 | 5 | 6 | null | null |
vs-team/Papers | Before Giuseppe's PhD/Monads/ObjectiveMonad/MonadicObjects/trunk/Src/Experiments/HList.hs | mit | readonlyfield_get (ReadonlyField(get)) = get | 44 | readonlyfield_get (ReadonlyField(get)) = get | 44 | readonlyfield_get (ReadonlyField(get)) = get | 44 | false | false | 0 | 8 | 3 | 18 | 9 | 9 | null | null |
cschneid/strawpollhs | src/server/Main.hs | mit | getPool :: IO DB.ConnectionPool
getPool = do
let s = "ghci.db"
let n = 1
runStdoutLoggingT (DB.createSqlitePool s n) | 122 | getPool :: IO DB.ConnectionPool
getPool = do
let s = "ghci.db"
let n = 1
runStdoutLoggingT (DB.createSqlitePool s n) | 122 | getPool = do
let s = "ghci.db"
let n = 1
runStdoutLoggingT (DB.createSqlitePool s n) | 90 | false | true | 1 | 11 | 24 | 54 | 23 | 31 | null | null |
Pieterjaninfo/PP | FP/block1s1.hs | unlicense | mytake [] n = [] | 16 | mytake [] n = [] | 16 | mytake [] n = [] | 16 | false | false | 0 | 6 | 4 | 15 | 7 | 8 | null | null |
Soostone/bloodhound | src/Database/Bloodhound/Client.hs | bsd-3-clause | simpleAccumulator oldHits ([], _) = return (oldHits, Nothing) | 61 | simpleAccumulator oldHits ([], _) = return (oldHits, Nothing) | 61 | simpleAccumulator oldHits ([], _) = return (oldHits, Nothing) | 61 | false | false | 0 | 7 | 7 | 28 | 15 | 13 | null | null |
Helium4Haskell/helium | lib/List.hs | gpl-3.0 | isPrefixOf (x:xs) (y:ys) = x == y && isPrefixOf xs ys | 53 | isPrefixOf (x:xs) (y:ys) = x == y && isPrefixOf xs ys | 53 | isPrefixOf (x:xs) (y:ys) = x == y && isPrefixOf xs ys | 53 | false | false | 0 | 6 | 10 | 40 | 19 | 21 | null | null |
GaloisInc/saw-script | heapster-saw/src/Verifier/SAW/Heapster/archival/JudgmentTranslation/Examples.hs | bsd-3-clause | emptyInfo :: BlocksInfo EmptyCtx
emptyInfo = BlocksInfo { entryPoints = [] } | 76 | emptyInfo :: BlocksInfo EmptyCtx
emptyInfo = BlocksInfo { entryPoints = [] } | 76 | emptyInfo = BlocksInfo { entryPoints = [] } | 43 | false | true | 0 | 7 | 11 | 24 | 13 | 11 | null | null |
gnn/Hets | GUI/GtkAddSentence.hs | gpl-2.0 | addSentence :: GInfo -> Int -> DGNodeLab -> G_theory -> IO ()
addSentence gi n lbl th = do
let ln = libName gi
iSt = intState gi
ost <- readIORef iSt
let (ost', hist) = updateNodeProof ln ost (n, lbl) th
writeIORef iSt ost'
runAndLock gi $ updateGraph gi hist | 299 | addSentence :: GInfo -> Int -> DGNodeLab -> G_theory -> IO ()
addSentence gi n lbl th = do
let ln = libName gi
iSt = intState gi
ost <- readIORef iSt
let (ost', hist) = updateNodeProof ln ost (n, lbl) th
writeIORef iSt ost'
runAndLock gi $ updateGraph gi hist | 299 | addSentence gi n lbl th = do
let ln = libName gi
iSt = intState gi
ost <- readIORef iSt
let (ost', hist) = updateNodeProof ln ost (n, lbl) th
writeIORef iSt ost'
runAndLock gi $ updateGraph gi hist | 237 | false | true | 0 | 12 | 90 | 130 | 59 | 71 | null | null |
FranklinChen/hugs98-plus-Sep2006 | packages/base/Data/ByteString.hs | bsd-3-clause | {-
--
-- fuseable, but we don't want to walk the whole array.
--
find k = foldl findEFL Nothing
where findEFL a@(Just _) _ = a
findEFL _ c | k c = Just c
| otherwise = Nothing
-}
-- ---------------------------------------------------------------------
-- Sea... | 1,136 | isPrefixOf :: ByteString -> ByteString -> Bool
isPrefixOf (PS x1 s1 l1) (PS x2 s2 l2)
| l1 == 0 = True
| l2 < l1 = False
| otherwise = inlinePerformIO $ withForeignPtr x1 $ \p1 ->
withForeignPtr x2 $ \p2 -> do
i <- memcmp (p1 `plusPtr` s1) (p2 `plusPtr` s2) (fromIntegral l1)
... | 670 | isPrefixOf (PS x1 s1 l1) (PS x2 s2 l2)
| l1 == 0 = True
| l2 < l1 = False
| otherwise = inlinePerformIO $ withForeignPtr x1 $ \p1 ->
withForeignPtr x2 $ \p2 -> do
i <- memcmp (p1 `plusPtr` s1) (p2 `plusPtr` s2) (fromIntegral l1)
return $! i == 0
-- | /O(n)/ The 'isSuffix... | 623 | true | true | 4 | 11 | 301 | 179 | 93 | 86 | null | null |
nevrenato/Hets_Fork | GUI/HTkUtils.hs | gpl-2.0 | askFileNameAndSave :: String -- ^ default filename for saving the text
-> String -- ^ text to be saved
-> IO ()
askFileNameAndSave defFN txt =
do curDir <- getCurrentDirectory
selev <- newFileDialogStr "Save file" (curDir ++ '/' : defFN)
mfile <- sync selev
... | 474 | askFileNameAndSave :: String -- ^ default filename for saving the text
-> String -- ^ text to be saved
-> IO ()
askFileNameAndSave defFN txt =
do curDir <- getCurrentDirectory
selev <- newFileDialogStr "Save file" (curDir ++ '/' : defFN)
mfile <- sync selev
... | 474 | askFileNameAndSave defFN txt =
do curDir <- getCurrentDirectory
selev <- newFileDialogStr "Save file" (curDir ++ '/' : defFN)
mfile <- sync selev
maybe done saveFile mfile
where saveFile fp = writeFile fp txt
{- | returns a window displaying the given theory and the given
warning text... | 324 | false | true | 0 | 11 | 142 | 97 | 46 | 51 | null | null |
ian-ross/cabal | Cabal/Distribution/PackageDescription/Check.hs | bsd-3-clause | repoTypeDirname Monotone = ["_MTN"] | 37 | repoTypeDirname Monotone = ["_MTN"] | 37 | repoTypeDirname Monotone = ["_MTN"] | 37 | false | false | 0 | 5 | 5 | 12 | 6 | 6 | null | null |
apyrgio/ganeti | src/Ganeti/Locking/Allocation.hs | bsd-2-clause | -- | Compute the state after an onwer releases all its locks.
freeLocks :: (Lock a, Ord b) => LockAllocation a b -> b -> LockAllocation a b
freeLocks = freeLocksPredicate (const True) | 183 | freeLocks :: (Lock a, Ord b) => LockAllocation a b -> b -> LockAllocation a b
freeLocks = freeLocksPredicate (const True) | 121 | freeLocks = freeLocksPredicate (const True) | 43 | true | true | 0 | 8 | 32 | 54 | 27 | 27 | null | null |
Numberartificial/workflow | haskell-first-principles/haskell-programming-from-first-principles-master/src/Chapter9.hs | mit | {-
Ciphers
We’ll still be using Data.Char for this next exercise. You should save
these exercises in a module called Cipher because we’ll be coming
back to them in later chapters. You’ll be writing a Caesar cipher for
now, but we’ll suggest some variations on the basic program in later
chapters.
A Caesar cipher is a... | 3,422 | myOr :: [Bool] -> Bool
myOr [] = False | 44 | myOr [] = False | 21 | true | true | 0 | 6 | 664 | 24 | 13 | 11 | null | null |
gorkinovich/Haskell | Checkers/src/Console/Console.hs | mit | printSquare (SquarePiece (Black, King)) = putStr "| B " | 55 | printSquare (SquarePiece (Black, King)) = putStr "| B " | 55 | printSquare (SquarePiece (Black, King)) = putStr "| B " | 55 | false | false | 0 | 7 | 8 | 25 | 12 | 13 | null | null |
agrafix/highjson | highjson/src/Data/HighJson/Types.hs | mit | jsonParserRecord :: forall a as. AllHave FromJSON as => RecordSpec a as -> Object -> Parser a
jsonParserRecord (RecordSpec mk rflds) obj =
mk <$> loop rflds
where
loop :: forall fs. AllHave FromJSON fs => RecordFields a fs -> Parser (HVect fs)
loop flds =
case flds of
RFEmpty -... | 549 | jsonParserRecord :: forall a as. AllHave FromJSON as => RecordSpec a as -> Object -> Parser a
jsonParserRecord (RecordSpec mk rflds) obj =
mk <$> loop rflds
where
loop :: forall fs. AllHave FromJSON fs => RecordFields a fs -> Parser (HVect fs)
loop flds =
case flds of
RFEmpty -... | 549 | jsonParserRecord (RecordSpec mk rflds) obj =
mk <$> loop rflds
where
loop :: forall fs. AllHave FromJSON fs => RecordFields a fs -> Parser (HVect fs)
loop flds =
case flds of
RFEmpty -> pure HNil
f :+: fs ->
let parse =
rf_jso... | 455 | false | true | 0 | 14 | 231 | 187 | 88 | 99 | null | null |
dosenfrucht/beagle | src/Codegen.hs | gpl-2.0 | mangle s = "b_" ++ concatMap mangleChar s ++ "_b" | 49 | mangle s = "b_" ++ concatMap mangleChar s ++ "_b" | 49 | mangle s = "b_" ++ concatMap mangleChar s ++ "_b" | 49 | false | false | 0 | 7 | 9 | 22 | 10 | 12 | null | null |
termite2/tsl | Frontend/ExprOps.hs | bsd-3-clause | exprCallees s (ETernOp _ e1 e2 e3) = exprCallees s e1 ++ exprCallees s e2 ++ exprCallees s e3 | 98 | exprCallees s (ETernOp _ e1 e2 e3) = exprCallees s e1 ++ exprCallees s e2 ++ exprCallees s e3 | 98 | exprCallees s (ETernOp _ e1 e2 e3) = exprCallees s e1 ++ exprCallees s e2 ++ exprCallees s e3 | 98 | false | false | 0 | 7 | 23 | 46 | 21 | 25 | null | null |
jvilar/hrows | lib/GUI/DialogManager/Actions.hs | gpl-2.0 | isResponse :: Int32 -> ResponseType -> Bool
isResponse r = (== r) . fromIntegral . fromEnum | 91 | isResponse :: Int32 -> ResponseType -> Bool
isResponse r = (== r) . fromIntegral . fromEnum | 91 | isResponse r = (== r) . fromIntegral . fromEnum | 47 | false | true | 1 | 8 | 15 | 40 | 19 | 21 | null | null |
dsorokin/aivika-experiment | Simulation/Aivika/Experiment/Base/FinalTableView.hs | bsd-3-clause | requireFinalTableResults :: FinalTableViewState -> [String] -> IO FinalTableResults
requireFinalTableResults st names =
maybePutMVar (finalTableResults st)
(newFinalTableResults names (finalTableExperiment st)) $ \results ->
if (names /= finalTableNames results)
then error "Series with different names are retur... | 391 | requireFinalTableResults :: FinalTableViewState -> [String] -> IO FinalTableResults
requireFinalTableResults st names =
maybePutMVar (finalTableResults st)
(newFinalTableResults names (finalTableExperiment st)) $ \results ->
if (names /= finalTableNames results)
then error "Series with different names are retur... | 391 | requireFinalTableResults st names =
maybePutMVar (finalTableResults st)
(newFinalTableResults names (finalTableExperiment st)) $ \results ->
if (names /= finalTableNames results)
then error "Series with different names are returned for different runs: requireFinalTableResults"
else return results | 307 | false | true | 0 | 10 | 51 | 89 | 44 | 45 | null | null |
plaimi/blubber-server | src/Blubber/Server/ViewPort.hs | agpl-3.0 | viewPort :: World -> String -> ViewPort
viewPort w p = w `mkViewPort` p | 71 | viewPort :: World -> String -> ViewPort
viewPort w p = w `mkViewPort` p | 71 | viewPort w p = w `mkViewPort` p | 31 | false | true | 0 | 6 | 13 | 30 | 16 | 14 | null | null |
everyevery/programming_study | lgecodejam/2014-mar/a/a.hs | mit | x1 :: (Int,Int,Int,Int) -> Int
x1 (x,_,_,_) = x | 47 | x1 :: (Int,Int,Int,Int) -> Int
x1 (x,_,_,_) = x | 47 | x1 (x,_,_,_) = x | 16 | false | true | 0 | 6 | 8 | 42 | 25 | 17 | null | null |
chwthewke/passman-hs | src/Passman/Engine/Generator/Defaults.hs | bsd-3-clause | complex :: CharSpace
complex = makeCharSpace
"alphanum-symbols"
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789&\"'(-_)=#{[|\\@]}$%*<>,?;.:/!^`" | 168 | complex :: CharSpace
complex = makeCharSpace
"alphanum-symbols"
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789&\"'(-_)=#{[|\\@]}$%*<>,?;.:/!^`" | 168 | complex = makeCharSpace
"alphanum-symbols"
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789&\"'(-_)=#{[|\\@]}$%*<>,?;.:/!^`" | 147 | false | true | 0 | 5 | 15 | 16 | 8 | 8 | null | null |
choener/fgl-extras-decompositions | Data/Graph/Inductive/Query/Ear.hs | bsd-3-clause | - tree edges
treeToEdges :: Tree Node -> [Edge]
treeToEdges (Node _ []) = []
| 78 | treeToEdges :: Tree Node -> [Edge]
treeToEdges (Node _ []) = [] | 63 | treeToEdges (Node _ []) = [] | 28 | true | true | 0 | 10 | 16 | 49 | 22 | 27 | null | null |
myuon/haste-jQuery | Haste/JQuery.hs | mit | parentsUntil :: JQuery -> IO JQuery
parentsUntil (JQuery q) = JQuery <$> chain "parentsUntil" q | 95 | parentsUntil :: JQuery -> IO JQuery
parentsUntil (JQuery q) = JQuery <$> chain "parentsUntil" q | 95 | parentsUntil (JQuery q) = JQuery <$> chain "parentsUntil" q | 59 | false | true | 0 | 7 | 14 | 36 | 17 | 19 | null | null |
revnull/fixfile | src/Data/FixFile/BTree/Light.hs | lgpl-3.0 | treeNodeSize :: KnownNat n => g (BTree n k v) -> Integer
treeNodeSize = validate . natVal . p where
p :: g (BTree n k v) -> Proxy n
p _ = Proxy
validate n = if n < 2
then error "BTree branch size must be > 1."
else n | 244 | treeNodeSize :: KnownNat n => g (BTree n k v) -> Integer
treeNodeSize = validate . natVal . p where
p :: g (BTree n k v) -> Proxy n
p _ = Proxy
validate n = if n < 2
then error "BTree branch size must be > 1."
else n | 244 | treeNodeSize = validate . natVal . p where
p :: g (BTree n k v) -> Proxy n
p _ = Proxy
validate n = if n < 2
then error "BTree branch size must be > 1."
else n | 187 | false | true | 2 | 10 | 79 | 117 | 52 | 65 | null | null |
JustusAdam/haxl-local-test | src/DataSources/Actors.hs | bsd-3-clause | storeFetch
:: State StoreReq
-> Flags
-> u
-> [BlockedFetch StoreReq]
-> PerformFetch
storeFetch _ _ _ reqs =
SyncFetch $ do
logLine "Doing actor round"
threadDelay 100000
for_ reqs $ \(BlockedFetch fetch result) ->
storeValFromFetch fetch >>= putSuccess result
logLine "Finished" | 315 | storeFetch
:: State StoreReq
-> Flags
-> u
-> [BlockedFetch StoreReq]
-> PerformFetch
storeFetch _ _ _ reqs =
SyncFetch $ do
logLine "Doing actor round"
threadDelay 100000
for_ reqs $ \(BlockedFetch fetch result) ->
storeValFromFetch fetch >>= putSuccess result
logLine "Finished" | 314 | storeFetch _ _ _ reqs =
SyncFetch $ do
logLine "Doing actor round"
threadDelay 100000
for_ reqs $ \(BlockedFetch fetch result) ->
storeValFromFetch fetch >>= putSuccess result
logLine "Finished" | 218 | false | true | 0 | 12 | 76 | 106 | 46 | 60 | null | null |
madmaw/grunt-haste-compiler | test/fixtures/HelloWorld.hs | mit | main::IO()
main = test "Hello World" | 36 | main::IO()
main = test "Hello World" | 36 | main = test "Hello World" | 25 | false | true | 0 | 6 | 5 | 19 | 9 | 10 | null | null |
Gabriel439/fficxx | lib/FFICXX/Generate/Type/Class.hs | bsd-2-clause | ctypToHsTyp _c (CT CTString _) = "CString" | 42 | ctypToHsTyp _c (CT CTString _) = "CString" | 42 | ctypToHsTyp _c (CT CTString _) = "CString" | 42 | false | false | 0 | 7 | 6 | 19 | 9 | 10 | null | null |
sherwoodwang/wxHaskell | wxc/Setup.hs | lgpl-2.1 | ppDefinition :: Show a => String -> a -> String
cppDefinition name value =
"#define " ++ name ++ " " ++ show value ++ "\n"
| 127 | cppDefinition :: Show a => String -> a -> String
cppDefinition name value =
"#define " ++ name ++ " " ++ show value ++ "\n" | 126 | cppDefinition name value =
"#define " ++ name ++ " " ++ show value ++ "\n" | 77 | false | true | 0 | 8 | 30 | 50 | 24 | 26 | null | null |
DominikDitoIvosevic/Uni | IRG/src/Irg/Lab4/Shading/Shading.hs | mit | getPolyNormal :: [V4 Float] -> V4 Float
getPolyNormal [d1, d2, d3] = normalize $ vector $ (normP d1 - normP d2) `cross` (normP d1 - normP d3)
where normP = normalizePoint | 172 | getPolyNormal :: [V4 Float] -> V4 Float
getPolyNormal [d1, d2, d3] = normalize $ vector $ (normP d1 - normP d2) `cross` (normP d1 - normP d3)
where normP = normalizePoint | 172 | getPolyNormal [d1, d2, d3] = normalize $ vector $ (normP d1 - normP d2) `cross` (normP d1 - normP d3)
where normP = normalizePoint | 132 | false | true | 1 | 9 | 32 | 92 | 44 | 48 | null | null |
rbonifacio/hephaestus-pl | src/meta-hephaestus/HplProducts/Hephaestus.hs | lgpl-3.0 | xml2Configuration ::
XmlConfiguration ->
ParserResult (ConfigurationItem TransformationModel)
xml2Configuration c
= let pe = parse parseExpression "" (xmlExpression c)
ts
= [xml2Transformation (tName t) (splitAndTrim ',' (tArgs t)) |
t <- (xmlTr... | 1,716 | xml2Configuration ::
XmlConfiguration ->
ParserResult (ConfigurationItem TransformationModel)
xml2Configuration c
= let pe = parse parseExpression "" (xmlExpression c)
ts
= [xml2Transformation (tName t) (splitAndTrim ',' (tArgs t)) |
t <- (xmlTr... | 1,716 | xml2Configuration c
= let pe = parse parseExpression "" (xmlExpression c)
ts
= [xml2Transformation (tName t) (splitAndTrim ',' (tArgs t)) |
t <- (xmlTransformations c)]
pr = parseConstraint (xmlRequired c)
pp = parseConstraint (xmlProvided c)
pl = [pe, pr, pp]
... | 1,580 | false | true | 0 | 23 | 767 | 454 | 233 | 221 | null | null |
TomMD/statsd-client | src/Network/Statsd/Client.hs | bsd-3-clause | showRailed :: (Bounded i, Show i, Integral i) => i -> String
showRailed i
| fromIntegral minI > high && high > fromIntegral i = show high
| fromIntegral maxI < low && low < fromIntegral i = show low
| otherwise = show i
where
low = negate 2^64
high = 2^64 -... | 392 | showRailed :: (Bounded i, Show i, Integral i) => i -> String
showRailed i
| fromIntegral minI > high && high > fromIntegral i = show high
| fromIntegral maxI < low && low < fromIntegral i = show low
| otherwise = show i
where
low = negate 2^64
high = 2^64 -... | 392 | showRailed i
| fromIntegral minI > high && high > fromIntegral i = show high
| fromIntegral maxI < low && low < fromIntegral i = show low
| otherwise = show i
where
low = negate 2^64
high = 2^64 - 1
minI = minBound `asTypeOf` i
maxI = maxBound `... | 331 | false | true | 4 | 11 | 139 | 165 | 78 | 87 | null | null |
nh2/quickcheck | examples/Heap_ProgramAlgebraic.hs | bsd-3-clause | Nil `merge` h2 = h2 | 20 | Nil `merge` h2 = h2 | 20 | Nil `merge` h2 = h2 | 20 | false | false | 0 | 5 | 5 | 18 | 8 | 10 | null | null |
snoyberg/ghc | compiler/nativeGen/PPC/CodeGen.hs | bsd-3-clause | getRegister' _ (CmmLit (CmmInt i rep))
| Just imm <- makeImmediate rep True i
= let
code dst = unitOL (LI dst imm)
in
return (Any (intFormat rep) code) | 175 | getRegister' _ (CmmLit (CmmInt i rep))
| Just imm <- makeImmediate rep True i
= let
code dst = unitOL (LI dst imm)
in
return (Any (intFormat rep) code) | 175 | getRegister' _ (CmmLit (CmmInt i rep))
| Just imm <- makeImmediate rep True i
= let
code dst = unitOL (LI dst imm)
in
return (Any (intFormat rep) code) | 175 | false | false | 1 | 12 | 52 | 90 | 39 | 51 | null | null |
alexbaluta/courseography | dependencies/HaXml-1.25.3/src/Text/XML/HaXml/ByteStringPP.hs | gpl-3.0 | cp (Choice cs m) = parens (hcat (intersperse (text "|") (Prelude.map cp cs))) <>
modifier m | 124 | cp (Choice cs m) = parens (hcat (intersperse (text "|") (Prelude.map cp cs))) <>
modifier m | 124 | cp (Choice cs m) = parens (hcat (intersperse (text "|") (Prelude.map cp cs))) <>
modifier m | 124 | false | false | 0 | 13 | 48 | 58 | 27 | 31 | null | null |
li-zhirui/EoplLangs | src/ImplicitRefs/Evaluator.hs | bsd-3-clause | valueOf :: Expression -> Environment -> Store -> EvaluateResult
valueOf (ConstExpr x) _ _ = evalConstExpr x | 122 | valueOf :: Expression -> Environment -> Store -> EvaluateResult
valueOf (ConstExpr x) _ _ = evalConstExpr x | 122 | valueOf (ConstExpr x) _ _ = evalConstExpr x | 58 | false | true | 0 | 11 | 31 | 44 | 20 | 24 | null | null |
wjt/bustle | Bustle/StatisticsPane.hs | lgpl-2.1 | newTimeView :: IO (ListStore TimeInfo, TreeView)
newTimeView = do
timeStore <- listStoreNew []
timeView <- treeViewNewWithModel timeStore
set timeView [ treeViewHeadersVisible := True ]
nameColumn <- treeViewColumnNew
treeViewColumnSetTitle nameColumn (__ "Method")
set nameColumn [ treeViewColumnResizable... | 880 | newTimeView :: IO (ListStore TimeInfo, TreeView)
newTimeView = do
timeStore <- listStoreNew []
timeView <- treeViewNewWithModel timeStore
set timeView [ treeViewHeadersVisible := True ]
nameColumn <- treeViewColumnNew
treeViewColumnSetTitle nameColumn (__ "Method")
set nameColumn [ treeViewColumnResizable... | 880 | newTimeView = do
timeStore <- listStoreNew []
timeView <- treeViewNewWithModel timeStore
set timeView [ treeViewHeadersVisible := True ]
nameColumn <- treeViewColumnNew
treeViewColumnSetTitle nameColumn (__ "Method")
set nameColumn [ treeViewColumnResizable := True
, treeViewColumnExpand ... | 831 | false | true | 0 | 12 | 190 | 254 | 119 | 135 | null | null |
oldmanmike/ghc | compiler/typecheck/TcRnTypes.hs | bsd-3-clause | exprCtOrigin (RecordCon {}) = Shouldn'tHappenOrigin "record construction" | 77 | exprCtOrigin (RecordCon {}) = Shouldn'tHappenOrigin "record construction" | 77 | exprCtOrigin (RecordCon {}) = Shouldn'tHappenOrigin "record construction" | 77 | false | false | 0 | 6 | 10 | 20 | 9 | 11 | null | null |
ryantrinkle/ghcjs | src/Gen2/Prim.hs | mit | genPrim _ _ CopySmallArrayOp [] [s,si,d,di,n] = PrimInline [j| for(var i=`n`-1;i>=0;i--) { `d`[`di`+i] = `s`[`si`+i]; } |] | 135 | genPrim _ _ CopySmallArrayOp [] [s,si,d,di,n] = PrimInline [j| for(var i=`n`-1;i>=0;i--) { `d`[`di`+i] = `s`[`si`+i]; } |] | 135 | genPrim _ _ CopySmallArrayOp [] [s,si,d,di,n] = PrimInline [j| for(var i=`n`-1;i>=0;i--) { `d`[`di`+i] = `s`[`si`+i]; } |] | 135 | false | false | 3 | 6 | 29 | 42 | 24 | 18 | null | null |
green-haskell/ghc | compiler/stgSyn/CoreToStg.hs | bsd-3-clause | coreToTopStgRhs
:: DynFlags
-> Module
-> FreeVarsInfo -- Free var info for the scope of the binding
-> (Id,CoreExpr)
-> LneM (StgRhs, FreeVarsInfo)
coreToTopStgRhs dflags this_mod scope_fv_info (bndr, rhs)
= do { (new_rhs, rhs_fvs, _) <- coreToStgExpr rhs
; lv_i... | 1,663 | coreToTopStgRhs
:: DynFlags
-> Module
-> FreeVarsInfo -- Free var info for the scope of the binding
-> (Id,CoreExpr)
-> LneM (StgRhs, FreeVarsInfo)
coreToTopStgRhs dflags this_mod scope_fv_info (bndr, rhs)
= do { (new_rhs, rhs_fvs, _) <- coreToStgExpr rhs
; lv_in... | 1,662 | coreToTopStgRhs dflags this_mod scope_fv_info (bndr, rhs)
= do { (new_rhs, rhs_fvs, _) <- coreToStgExpr rhs
; lv_info <- freeVarsToLiveVars rhs_fvs
; let stg_rhs = mkTopStgRhs dflags this_mod rhs_fvs (mkSRT lv_info) bndr bndr_info new_rhs
stg_arity = stgRhsArity stg_rhs
; return (... | 1,466 | false | true | 6 | 12 | 517 | 277 | 145 | 132 | null | null |
ryzhyk/cocoon | cocoon/Statement.hs | apache-2.0 | statFold :: (a -> Statement -> a) -> a -> Statement -> a
statFold f acc s =
case s of
SSeq _ l r -> statFold f (statFold f acc' l) r
SPar _ l r -> statFold f (statFold f acc' l) r
SITE _ _ t e -> maybe (statFold f acc' t) (statFold f (statFold f acc' t)) e
STest _ _ ... | 591 | statFold :: (a -> Statement -> a) -> a -> Statement -> a
statFold f acc s =
case s of
SSeq _ l r -> statFold f (statFold f acc' l) r
SPar _ l r -> statFold f (statFold f acc' l) r
SITE _ _ t e -> maybe (statFold f acc' t) (statFold f (statFold f acc' t)) e
STest _ _ ... | 591 | statFold f acc s =
case s of
SSeq _ l r -> statFold f (statFold f acc' l) r
SPar _ l r -> statFold f (statFold f acc' l) r
SITE _ _ t e -> maybe (statFold f acc' t) (statFold f (statFold f acc' t)) e
STest _ _ -> acc'
SSet _ _ _ -> acc'
SSend ... | 534 | false | true | 1 | 12 | 259 | 285 | 131 | 154 | null | null |
amosr/limp-cbc | src/Numeric/Limp/Solvers/Cbc.hs | mit | solve :: (Ord z, Ord r) => Program z r IntDouble -> Either Error (Assignment z r IntDouble)
solve p
= let pc = C.program p
in S.solve pc | 141 | solve :: (Ord z, Ord r) => Program z r IntDouble -> Either Error (Assignment z r IntDouble)
solve p
= let pc = C.program p
in S.solve pc | 141 | solve p
= let pc = C.program p
in S.solve pc | 49 | false | true | 0 | 10 | 33 | 76 | 36 | 40 | null | null |
kazu-yamamoto/dns | internal/Network/DNS/Decode/Parsers.hs | bsd-3-clause | -- XXX: Include the class when implemented, or otherwise perhaps check the
-- implicit assumption that the class is classIN.
--
getQuery :: SGet Question
getQuery = Question <$> getDomain
<*> getTYPE
<* ignoreClass
where
ignoreClass = get16 | 287 | getQuery :: SGet Question
getQuery = Question <$> getDomain
<*> getTYPE
<* ignoreClass
where
ignoreClass = get16 | 159 | getQuery = Question <$> getDomain
<*> getTYPE
<* ignoreClass
where
ignoreClass = get16 | 133 | true | true | 8 | 6 | 84 | 52 | 24 | 28 | null | null |
LukaHorvat/Flow | src/Pong/Main.hs | mit | update :: Game State Update ()
update = do
withCgs_ $ BallPos . Main.advance
withCgs_ $ BallVel . bounceWall
withCgs_ $ BallVel . bouncePaddle
return () | 168 | update :: Game State Update ()
update = do
withCgs_ $ BallPos . Main.advance
withCgs_ $ BallVel . bounceWall
withCgs_ $ BallVel . bouncePaddle
return () | 168 | update = do
withCgs_ $ BallPos . Main.advance
withCgs_ $ BallVel . bounceWall
withCgs_ $ BallVel . bouncePaddle
return () | 137 | false | true | 0 | 8 | 41 | 63 | 29 | 34 | null | null |
JacquesCarette/literate-scientific-software | code/drasil-data/Data/Drasil/Concepts/Software.hs | bsd-2-clause | reusability = dcc "reusability" (nounPhraseSP "reusability")
"the use of existing assets in some form within the software product development process" | 164 | reusability = dcc "reusability" (nounPhraseSP "reusability")
"the use of existing assets in some form within the software product development process" | 164 | reusability = dcc "reusability" (nounPhraseSP "reusability")
"the use of existing assets in some form within the software product development process" | 164 | false | false | 1 | 7 | 33 | 25 | 9 | 16 | null | null |
bergmark/http2 | Network/HTTP2/RandomSkewHeap.hs | bsd-3-clause | empty :: Heap a
empty = Leaf | 28 | empty :: Heap a
empty = Leaf | 28 | empty = Leaf | 12 | false | true | 0 | 5 | 6 | 14 | 7 | 7 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.