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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ezyang/ghc
|
compiler/coreSyn/MkCore.hs
|
bsd-3-clause
|
-- | The unit expression
unitExpr :: CoreExpr
unitExpr = Var unitDataConId
| 74
|
unitExpr :: CoreExpr
unitExpr = Var unitDataConId
| 49
|
unitExpr = Var unitDataConId
| 28
| true
| true
| 0
| 6
| 11
| 22
| 9
| 13
| null | null |
isovector/haystack
|
src/Haystack/Types.hs
|
bsd-3-clause
|
showError (MissingRow c) =
"one of the csv files (not sure which) is missing a row"
++ "\n\tthis usually means something exists in one but doesn't in another"
++ "\n\tthe column being searched is " ++ show c
| 223
|
showError (MissingRow c) =
"one of the csv files (not sure which) is missing a row"
++ "\n\tthis usually means something exists in one but doesn't in another"
++ "\n\tthe column being searched is " ++ show c
| 223
|
showError (MissingRow c) =
"one of the csv files (not sure which) is missing a row"
++ "\n\tthis usually means something exists in one but doesn't in another"
++ "\n\tthe column being searched is " ++ show c
| 223
| false
| false
| 4
| 6
| 53
| 33
| 14
| 19
| null | null |
charringer/gonimo-back
|
src/Gonimo/Server/AuthHandlers.hs
|
agpl-3.0
|
createFamily :: AuthServerConstraint r => FamilyName -> Eff r FamilyId
createFamily n = do
-- no authorization: - any valid user can create a family.
now <- getCurrentTime
uid <- askAccountId
runDb $ do
fid <- Db.insert Family {
familyName = n
, familyCreated = now
, familyLastAccessed = now
}
Db.insert_ FamilyAccount {
familyAccountAccountId = uid
, familyAccountFamilyId = fid
, familyAccountJoined = now
, familyAccountInvitedBy = Nothing
}
return fid
| 529
|
createFamily :: AuthServerConstraint r => FamilyName -> Eff r FamilyId
createFamily n = do
-- no authorization: - any valid user can create a family.
now <- getCurrentTime
uid <- askAccountId
runDb $ do
fid <- Db.insert Family {
familyName = n
, familyCreated = now
, familyLastAccessed = now
}
Db.insert_ FamilyAccount {
familyAccountAccountId = uid
, familyAccountFamilyId = fid
, familyAccountJoined = now
, familyAccountInvitedBy = Nothing
}
return fid
| 529
|
createFamily n = do
-- no authorization: - any valid user can create a family.
now <- getCurrentTime
uid <- askAccountId
runDb $ do
fid <- Db.insert Family {
familyName = n
, familyCreated = now
, familyLastAccessed = now
}
Db.insert_ FamilyAccount {
familyAccountAccountId = uid
, familyAccountFamilyId = fid
, familyAccountJoined = now
, familyAccountInvitedBy = Nothing
}
return fid
| 457
| false
| true
| 0
| 13
| 144
| 124
| 64
| 60
| null | null |
slspeek/hephem
|
src/HEphem/Data.hs
|
gpl-3.0
|
description :: SkyObject -> String
description (Star(BrightStar f b c hr _ _ _ m _ _ _)) =
case f of Nothing -> if b == "" then if c == "" then printf "HR# %v Mag %.1f" hr m
else printf "%s HR# %v Mag %.1f" c hr m
else printf "%s %s HR# %v Mag %.1f" b c hr m
Just fl -> printf "%d %s %s HR# %v Mag %.1f" fl b c hr m
| 418
|
description :: SkyObject -> String
description (Star(BrightStar f b c hr _ _ _ m _ _ _)) =
case f of Nothing -> if b == "" then if c == "" then printf "HR# %v Mag %.1f" hr m
else printf "%s HR# %v Mag %.1f" c hr m
else printf "%s %s HR# %v Mag %.1f" b c hr m
Just fl -> printf "%d %s %s HR# %v Mag %.1f" fl b c hr m
| 418
|
description (Star(BrightStar f b c hr _ _ _ m _ _ _)) =
case f of Nothing -> if b == "" then if c == "" then printf "HR# %v Mag %.1f" hr m
else printf "%s HR# %v Mag %.1f" c hr m
else printf "%s %s HR# %v Mag %.1f" b c hr m
Just fl -> printf "%d %s %s HR# %v Mag %.1f" fl b c hr m
| 383
| false
| true
| 0
| 10
| 181
| 133
| 66
| 67
| null | null |
meiersi/scyther-proof
|
src/Scyther/Facts.hs
|
gpl-3.0
|
-- | Gets a component of the facts.
getsFacts :: (Facts -> a) -> ChainRuleM a
getsFacts f = gets (f . crsFacts)
| 111
|
getsFacts :: (Facts -> a) -> ChainRuleM a
getsFacts f = gets (f . crsFacts)
| 75
|
getsFacts f = gets (f . crsFacts)
| 33
| true
| true
| 0
| 8
| 22
| 44
| 21
| 23
| null | null |
beni55/ghcjs
|
src/Gen2/Optimizer.hs
|
mit
|
isConstOrVar :: Expr -> Bool
isConstOrVar x = isConst x || isVar x
| 66
|
isConstOrVar :: Expr -> Bool
isConstOrVar x = isConst x || isVar x
| 66
|
isConstOrVar x = isConst x || isVar x
| 37
| false
| true
| 0
| 6
| 12
| 28
| 13
| 15
| null | null |
FPtje/elm-marshall
|
src/Elm/Marshall/Internal/App.hs
|
mit
|
-- | Get an Elm app reference from a global variable Use this if the elm app is
-- defined elsewhere in the html file that also includes ghcjs. Make sure this
-- function is run after the app is defined of course. See https://guide.elm-
-- lang.org/interop/javascript.html#step-1-embed-in-html
fromGlobalApp :: String -> IO ElmApp
fromGlobalApp appName = [js| window[ `appName ] |] >>= pure . ElmApp
| 399
|
fromGlobalApp :: String -> IO ElmApp
fromGlobalApp appName = [js| window[ `appName ] |] >>= pure . ElmApp
| 105
|
fromGlobalApp appName = [js| window[ `appName ] |] >>= pure . ElmApp
| 68
| true
| true
| 0
| 6
| 64
| 37
| 22
| 15
| null | null |
homam/babelbay-ma-parseit
|
src/XMLSerialization.hs
|
bsd-3-clause
|
courseToXml :: String -> Course -> Element
courseToXml key course = let intro = courseIntro course in Element
(unqual "BookSummary")
[]
(map Elem $ [
emptyElement "meta" [
("id", show $ courseId intro)
, ("key", key)
, ("viewType", "BabelbayQA")
]
, textElement "Title" (courseTitle intro)
, collElement "introduction" [
textElement "title" (courseIntroTitle intro)
, courseIntroFlashcard1AnswerToXml (courseIntroFC1 intro)
, courseIntroFlashcard2AnswerToXml (courseIntroFC2 intro)
]
] ++ map chapterToXml (courseChapters course))
Nothing
| 618
|
courseToXml :: String -> Course -> Element
courseToXml key course = let intro = courseIntro course in Element
(unqual "BookSummary")
[]
(map Elem $ [
emptyElement "meta" [
("id", show $ courseId intro)
, ("key", key)
, ("viewType", "BabelbayQA")
]
, textElement "Title" (courseTitle intro)
, collElement "introduction" [
textElement "title" (courseIntroTitle intro)
, courseIntroFlashcard1AnswerToXml (courseIntroFC1 intro)
, courseIntroFlashcard2AnswerToXml (courseIntroFC2 intro)
]
] ++ map chapterToXml (courseChapters course))
Nothing
| 618
|
courseToXml key course = let intro = courseIntro course in Element
(unqual "BookSummary")
[]
(map Elem $ [
emptyElement "meta" [
("id", show $ courseId intro)
, ("key", key)
, ("viewType", "BabelbayQA")
]
, textElement "Title" (courseTitle intro)
, collElement "introduction" [
textElement "title" (courseIntroTitle intro)
, courseIntroFlashcard1AnswerToXml (courseIntroFC1 intro)
, courseIntroFlashcard2AnswerToXml (courseIntroFC2 intro)
]
] ++ map chapterToXml (courseChapters course))
Nothing
| 575
| false
| true
| 0
| 13
| 148
| 191
| 94
| 97
| null | null |
eklavya/Idris-dev
|
src/Idris/AbsSyntaxTree.hs
|
bsd-3-clause
|
highestFC (PQuasiquote _ _) = Nothing
| 43
|
highestFC (PQuasiquote _ _) = Nothing
| 43
|
highestFC (PQuasiquote _ _) = Nothing
| 43
| false
| false
| 0
| 7
| 11
| 17
| 8
| 9
| null | null |
rfranek/duckling
|
Duckling/Time/PL/Rules.hs
|
bsd-3-clause
|
ruleEomendOfMonth :: Rule
ruleEomendOfMonth = Rule
{ name = "EOM|End of month"
, pattern =
[ regex "(na |w )?(koniec|ko(n|\x0144)ca|ko(n|\x0144)cu|ko(n|\x0144)cowi|ko(n|\x0144)cem|ko(n|\x0144)c(o|\x00f3)wke) (miesi(a|\x0105)ca|msc)"
]
, prod = \_ -> tt $ cycleNth TG.Month 1
}
| 292
|
ruleEomendOfMonth :: Rule
ruleEomendOfMonth = Rule
{ name = "EOM|End of month"
, pattern =
[ regex "(na |w )?(koniec|ko(n|\x0144)ca|ko(n|\x0144)cu|ko(n|\x0144)cowi|ko(n|\x0144)cem|ko(n|\x0144)c(o|\x00f3)wke) (miesi(a|\x0105)ca|msc)"
]
, prod = \_ -> tt $ cycleNth TG.Month 1
}
| 292
|
ruleEomendOfMonth = Rule
{ name = "EOM|End of month"
, pattern =
[ regex "(na |w )?(koniec|ko(n|\x0144)ca|ko(n|\x0144)cu|ko(n|\x0144)cowi|ko(n|\x0144)cem|ko(n|\x0144)c(o|\x00f3)wke) (miesi(a|\x0105)ca|msc)"
]
, prod = \_ -> tt $ cycleNth TG.Month 1
}
| 266
| false
| true
| 0
| 11
| 48
| 57
| 31
| 26
| null | null |
lu-fennell/nix-env-rebuild
|
src/Nix/Commands.hs
|
gpl-3.0
|
nixCmdArgs NixQueryLocal = ["-q", "--out-path"]
| 47
|
nixCmdArgs NixQueryLocal = ["-q", "--out-path"]
| 47
|
nixCmdArgs NixQueryLocal = ["-q", "--out-path"]
| 47
| false
| false
| 0
| 5
| 4
| 15
| 8
| 7
| null | null |
zepto-lang/zepto-js
|
src/Zepto/Primitives/ListPrimitives.hs
|
gpl-2.0
|
buildString badArgList = throwError $ NumArgs 1 badArgList
| 58
|
buildString badArgList = throwError $ NumArgs 1 badArgList
| 58
|
buildString badArgList = throwError $ NumArgs 1 badArgList
| 58
| false
| false
| 0
| 6
| 7
| 18
| 8
| 10
| null | null |
imccoy/utopia
|
src/Run.hs
|
mit
|
runProjection :: [Lam.BindingWithId CodeDbId] -> (Either [Error] (Eval.Val CodeDbId))
runProjection bindingsWithIds = eval bindingsWithIds Map.empty
| 148
|
runProjection :: [Lam.BindingWithId CodeDbId] -> (Either [Error] (Eval.Val CodeDbId))
runProjection bindingsWithIds = eval bindingsWithIds Map.empty
| 148
|
runProjection bindingsWithIds = eval bindingsWithIds Map.empty
| 62
| false
| true
| 0
| 10
| 14
| 55
| 27
| 28
| null | null |
energyflowanalysis/efa-2.1
|
demo/additiveTermsStatic/Main.hs
|
bsd-3-clause
|
eta0, eta1 :: XIdx.Eta Node
eta0 = XIdx.eta node0 node1
| 55
|
eta0, eta1 :: XIdx.Eta Node
eta0 = XIdx.eta node0 node1
| 55
|
eta0 = XIdx.eta node0 node1
| 27
| false
| true
| 2
| 6
| 9
| 29
| 13
| 16
| null | null |
alphaHeavy/hlint
|
src/Hint/Match.hs
|
gpl-2.0
|
readRule :: Setting -> [Setting]
readRule m@MatchExp{lhs=(fmapAn -> lhs), rhs=(fmapAn -> rhs), side=(fmap fmapAn -> side)} =
(:) m{lhs=lhs,side=side,rhs=rhs} $ fromMaybe [] $ do
(l,v1) <- dotVersion lhs
(r,v2) <- dotVersion rhs
guard $ v1 == v2 && l /= [] && r /= [] && v1 `notElem` vars side
return [m{lhs=dotApps l, rhs=dotApps r, side=side}
,m{lhs=dotApps (l++[toNamed v1]), rhs=dotApps (r++[toNamed v1]), side=side}]
| 471
|
readRule :: Setting -> [Setting]
readRule m@MatchExp{lhs=(fmapAn -> lhs), rhs=(fmapAn -> rhs), side=(fmap fmapAn -> side)} =
(:) m{lhs=lhs,side=side,rhs=rhs} $ fromMaybe [] $ do
(l,v1) <- dotVersion lhs
(r,v2) <- dotVersion rhs
guard $ v1 == v2 && l /= [] && r /= [] && v1 `notElem` vars side
return [m{lhs=dotApps l, rhs=dotApps r, side=side}
,m{lhs=dotApps (l++[toNamed v1]), rhs=dotApps (r++[toNamed v1]), side=side}]
| 471
|
readRule m@MatchExp{lhs=(fmapAn -> lhs), rhs=(fmapAn -> rhs), side=(fmap fmapAn -> side)} =
(:) m{lhs=lhs,side=side,rhs=rhs} $ fromMaybe [] $ do
(l,v1) <- dotVersion lhs
(r,v2) <- dotVersion rhs
guard $ v1 == v2 && l /= [] && r /= [] && v1 `notElem` vars side
return [m{lhs=dotApps l, rhs=dotApps r, side=side}
,m{lhs=dotApps (l++[toNamed v1]), rhs=dotApps (r++[toNamed v1]), side=side}]
| 438
| false
| true
| 0
| 16
| 113
| 273
| 149
| 124
| null | null |
luisnavarrodelangel/InnerEar
|
src/InnerEar/Widgets/Config.hs
|
gpl-3.0
|
constructSoundSource :: Map String AudioBuffer -> SoundSourceConfigOption -> BufferStatus -> IO SoundSource
constructSoundSource _ (Spec spec dur) _ = return $ SourceLoaded spec dur
| 181
|
constructSoundSource :: Map String AudioBuffer -> SoundSourceConfigOption -> BufferStatus -> IO SoundSource
constructSoundSource _ (Spec spec dur) _ = return $ SourceLoaded spec dur
| 181
|
constructSoundSource _ (Spec spec dur) _ = return $ SourceLoaded spec dur
| 73
| false
| true
| 0
| 8
| 23
| 55
| 26
| 29
| null | null |
acowley/ghc
|
compiler/main/DynFlags.hs
|
bsd-3-clause
|
mkFlag :: TurnOnFlag -- ^ True <=> it should be turned on
-> String -- ^ The flag prefix
-> (flag -> DynP ()) -- ^ What to do when the flag is found
-> FlagSpec flag -- ^ Specification of this particular flag
-> Flag (CmdLineP DynFlags)
mkFlag turn_on flagPrefix f (FlagSpec name flag extra_action mode)
= Flag (flagPrefix ++ name) (NoArg (f flag >> extra_action turn_on)) mode
| 447
|
mkFlag :: TurnOnFlag -- ^ True <=> it should be turned on
-> String -- ^ The flag prefix
-> (flag -> DynP ()) -- ^ What to do when the flag is found
-> FlagSpec flag -- ^ Specification of this particular flag
-> Flag (CmdLineP DynFlags)
mkFlag turn_on flagPrefix f (FlagSpec name flag extra_action mode)
= Flag (flagPrefix ++ name) (NoArg (f flag >> extra_action turn_on)) mode
| 447
|
mkFlag turn_on flagPrefix f (FlagSpec name flag extra_action mode)
= Flag (flagPrefix ++ name) (NoArg (f flag >> extra_action turn_on)) mode
| 144
| false
| true
| 0
| 11
| 138
| 109
| 55
| 54
| null | null |
olsner/ghc
|
testsuite/tests/perf/compiler/T10370.hs
|
bsd-3-clause
|
a284 :: IO (); a284 = forever $ putStrLn "a284"
| 47
|
a284 :: IO ()
a284 = forever $ putStrLn "a284"
| 46
|
a284 = forever $ putStrLn "a284"
| 32
| false
| true
| 0
| 6
| 9
| 24
| 12
| 12
| null | null |
goldfirere/singletons
|
singletons-th/src/Data/Singletons/TH/Util.hs
|
bsd-3-clause
|
extractTvbName (DKindedTV n _ _) = n
| 36
|
extractTvbName (DKindedTV n _ _) = n
| 36
|
extractTvbName (DKindedTV n _ _) = n
| 36
| false
| false
| 0
| 7
| 6
| 19
| 9
| 10
| null | null |
strepo/hiccup
|
Proc/Util.hs
|
lgpl-2.1
|
(.<-) r v = io $ (writeIORef r) v
| 33
|
(.<-) r v = io $ (writeIORef r) v
| 33
|
(.<-) r v = io $ (writeIORef r) v
| 33
| false
| false
| 0
| 8
| 8
| 26
| 13
| 13
| null | null |
wfleming/advent-of-code-2016
|
2016/src/D10Lib.hs
|
bsd-3-clause
|
destIdP :: Parser Dest
destIdP = do
d <- destTypeP
void $ space
n <- number
return (d n)
| 104
|
destIdP :: Parser Dest
destIdP = do
d <- destTypeP
void $ space
n <- number
return (d n)
| 104
|
destIdP = do
d <- destTypeP
void $ space
n <- number
return (d n)
| 81
| false
| true
| 0
| 9
| 34
| 47
| 21
| 26
| null | null |
TOSPIO/yi
|
src/library/Yi/Keymap/Emacs/KillRing.hs
|
gpl-2.0
|
-- | C-k
killLineE :: Maybe Int -> YiM ()
killLineE Nothing = withCurrentBuffer killRestOfLine
| 95
|
killLineE :: Maybe Int -> YiM ()
killLineE Nothing = withCurrentBuffer killRestOfLine
| 86
|
killLineE Nothing = withCurrentBuffer killRestOfLine
| 53
| true
| true
| 0
| 7
| 15
| 30
| 14
| 16
| null | null |
vdweegen/UvA-Software_Testing
|
Lab3/Final/Exercises.hs
|
gpl-3.0
|
cnf2cls (Prop a) = [[a]]
| 24
|
cnf2cls (Prop a) = [[a]]
| 24
|
cnf2cls (Prop a) = [[a]]
| 24
| false
| false
| 0
| 6
| 4
| 22
| 11
| 11
| null | null |
wdanilo/haskell-language-c
|
src/Language/C/Analysis/Export.hs
|
bsd-3-clause
|
exportArraySize (UnknownArraySize complete) = CNoArrSize complete
| 65
|
exportArraySize (UnknownArraySize complete) = CNoArrSize complete
| 65
|
exportArraySize (UnknownArraySize complete) = CNoArrSize complete
| 65
| false
| false
| 0
| 7
| 5
| 18
| 8
| 10
| null | null |
dicomgrid/dicom-haskell-library
|
src/Data/DICOM/Dictionary.hs
|
gpl-3.0
|
group0018commentsret :: String -> Element
group0018commentsret = sh $ tag (TagGroup 0x0018) (TagElement 0x4000)
| 111
|
group0018commentsret :: String -> Element
group0018commentsret = sh $ tag (TagGroup 0x0018) (TagElement 0x4000)
| 111
|
group0018commentsret = sh $ tag (TagGroup 0x0018) (TagElement 0x4000)
| 69
| false
| true
| 2
| 7
| 13
| 43
| 19
| 24
| null | null |
brendanhay/gogol
|
gogol-adexperiencereport/gen/Network/Google/Resource/AdExperienceReport/Sites/Get.hs
|
mpl-2.0
|
-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
sgUploadType :: Lens' SitesGet (Maybe Text)
sgUploadType
= lens _sgUploadType (\ s a -> s{_sgUploadType = a})
| 182
|
sgUploadType :: Lens' SitesGet (Maybe Text)
sgUploadType
= lens _sgUploadType (\ s a -> s{_sgUploadType = a})
| 111
|
sgUploadType
= lens _sgUploadType (\ s a -> s{_sgUploadType = a})
| 67
| true
| true
| 1
| 9
| 28
| 50
| 25
| 25
| null | null |
benweitzman/quick-schema
|
src/Data/Json/Schema/Types.hs
|
mit
|
stripSuffix :: Text -> Text
stripSuffix s
| "=" `isSuffixOf` s = dropEnd 1 s
| "?" `isSuffixOf` s = dropEnd 1 s
| "/" `isSuffixOf` s = dropEnd 1 s
| otherwise = s
| 178
|
stripSuffix :: Text -> Text
stripSuffix s
| "=" `isSuffixOf` s = dropEnd 1 s
| "?" `isSuffixOf` s = dropEnd 1 s
| "/" `isSuffixOf` s = dropEnd 1 s
| otherwise = s
| 178
|
stripSuffix s
| "=" `isSuffixOf` s = dropEnd 1 s
| "?" `isSuffixOf` s = dropEnd 1 s
| "/" `isSuffixOf` s = dropEnd 1 s
| otherwise = s
| 150
| false
| true
| 3
| 8
| 50
| 83
| 41
| 42
| null | null |
spechub/Hets
|
TPTP/Parser.hs
|
gpl-2.0
|
-- <fof_and_formula> ::= <fof_unitary_formula> & <fof_unitary_formula> |
-- <fof_and_formula> & <fof_unitary_formula>
fof_and_formula :: FOF_unitary_formula -> CharParser st FOF_and_formula
fof_and_formula f = parserTrace "fof_and_formula" (do
try andT
fs <- fof_unitary_formula `sepBy1` andT
return $ f : fs
<?> "fof_and_formula"
)
| 380
|
fof_and_formula :: FOF_unitary_formula -> CharParser st FOF_and_formula
fof_and_formula f = parserTrace "fof_and_formula" (do
try andT
fs <- fof_unitary_formula `sepBy1` andT
return $ f : fs
<?> "fof_and_formula"
)
| 230
|
fof_and_formula f = parserTrace "fof_and_formula" (do
try andT
fs <- fof_unitary_formula `sepBy1` andT
return $ f : fs
<?> "fof_and_formula"
)
| 158
| true
| true
| 0
| 11
| 86
| 67
| 33
| 34
| null | null |
mightymoose/liquidhaskell
|
benchmarks/ghc-7.4.1/MVar.hs
|
bsd-3-clause
|
newMVar :: a -> IO (MVar a)
newMVar value =
newEmptyMVar >>= \ mvar ->
putMVar mvar value >>
return mvar
| 124
|
newMVar :: a -> IO (MVar a)
newMVar value =
newEmptyMVar >>= \ mvar ->
putMVar mvar value >>
return mvar
| 124
|
newMVar value =
newEmptyMVar >>= \ mvar ->
putMVar mvar value >>
return mvar
| 96
| false
| true
| 0
| 9
| 40
| 54
| 24
| 30
| null | null |
beni55/fay
|
examples/CodeWorld.hs
|
bsd-3-clause
|
mouseToElementX :: Event -> Fay Double
mouseToElementX = ffi "window.mouseToElementX(%1)"
| 89
|
mouseToElementX :: Event -> Fay Double
mouseToElementX = ffi "window.mouseToElementX(%1)"
| 89
|
mouseToElementX = ffi "window.mouseToElementX(%1)"
| 50
| false
| true
| 0
| 6
| 9
| 21
| 10
| 11
| null | null |
farrellm/advent-2016
|
src/Day11.hs
|
mit
|
result2 =
runEitherT $
do i <- EitherT (parseOnly (parser `sepBy1` endOfLine) <$> input)
let fs = fromFloors i
fs' =
adjustMap
(<> setFromList
[ Left (Gen "elerium")
, Right (Chip "elerium")
, Left (Gen "dilithium")
, Right (Chip "dilithium")
])
1
fs
-- pure (take 1 $ loop 14 (0, [(1, fs')]) mempty)
pure (take 1 $ loop' 14 (0, [(1, fs')]) (0, mempty))
-- pure fs'
| 543
|
result2 =
runEitherT $
do i <- EitherT (parseOnly (parser `sepBy1` endOfLine) <$> input)
let fs = fromFloors i
fs' =
adjustMap
(<> setFromList
[ Left (Gen "elerium")
, Right (Chip "elerium")
, Left (Gen "dilithium")
, Right (Chip "dilithium")
])
1
fs
-- pure (take 1 $ loop 14 (0, [(1, fs')]) mempty)
pure (take 1 $ loop' 14 (0, [(1, fs')]) (0, mempty))
-- pure fs'
| 543
|
result2 =
runEitherT $
do i <- EitherT (parseOnly (parser `sepBy1` endOfLine) <$> input)
let fs = fromFloors i
fs' =
adjustMap
(<> setFromList
[ Left (Gen "elerium")
, Right (Chip "elerium")
, Left (Gen "dilithium")
, Right (Chip "dilithium")
])
1
fs
-- pure (take 1 $ loop 14 (0, [(1, fs')]) mempty)
pure (take 1 $ loop' 14 (0, [(1, fs')]) (0, mempty))
-- pure fs'
| 543
| false
| false
| 0
| 17
| 245
| 164
| 85
| 79
| null | null |
audreyt/stringtable-atom
|
src/StringTable/AtomMap.hs
|
bsd-3-clause
|
keys :: AtomMap a -> [Atom]
keys = Prelude.map unsafeIntToAtom . IM.keys . fromAtomMap
| 86
|
keys :: AtomMap a -> [Atom]
keys = Prelude.map unsafeIntToAtom . IM.keys . fromAtomMap
| 86
|
keys = Prelude.map unsafeIntToAtom . IM.keys . fromAtomMap
| 58
| false
| true
| 0
| 8
| 13
| 36
| 18
| 18
| null | null |
abstools/abs-haskell-formal
|
benchmarks/4_logarithms_range/progs/2500.hs
|
bsd-3-clause
|
(x:n:base:i:next:nn:obj:f:max_val:log_val:the_end) = [0..]
| 58
|
(x:n:base:i:next:nn:obj:f:max_val:log_val:the_end) = [0..]
| 58
|
(x:n:base:i:next:nn:obj:f:max_val:log_val:the_end) = [0..]
| 58
| false
| false
| 0
| 15
| 2
| 53
| 27
| 26
| null | null |
Charlesetc/haskell-parsing
|
src/Pear/Operator/Concrete.hs
|
bsd-3-clause
|
plus, minus, times, divide, exponnt :: Parser (Binary Ast)
plus =
(reservedOp "+") >> (return $ Binary (binaryfunction "+") 0 L)
| 131
|
plus, minus, times, divide, exponnt :: Parser (Binary Ast)
plus =
(reservedOp "+") >> (return $ Binary (binaryfunction "+") 0 L)
| 131
|
plus =
(reservedOp "+") >> (return $ Binary (binaryfunction "+") 0 L)
| 72
| false
| true
| 0
| 10
| 23
| 58
| 33
| 25
| null | null |
bjornbm/network
|
Network.hs
|
bsd-3-clause
|
catchIO = Exception.catch
| 25
|
catchIO = Exception.catch
| 25
|
catchIO = Exception.catch
| 25
| false
| false
| 0
| 5
| 2
| 8
| 4
| 4
| null | null |
ml9951/ghc
|
libraries/pastm/bench/linked-list/ordered-linked-list.hs
|
bsd-3-clause
|
--add :: Ord a => ListHandle a -> a -> IO()
add :: ListHandle Int -> Int -> IO()
add (ListHandle hd size) v = do s <- readIORef size; atomically (addLoop hd) ; atomicModifyIORef size (\s -> (s+1, ()))
where
addLoop l = do
raw <- readTVar l
case raw of
Head n -> addLoop n
Null -> do
newNull <- newTVar Null
writeTVar l (Node v newNull)
Node v' n ->
if v > v'
then addLoop n
else do
newNode <- newTVar (Node v' n)
writeTVar l (Node v newNode)
--find :: Eq a => ListHandle a -> a -> IO Bool
| 738
|
add :: ListHandle Int -> Int -> IO()
add (ListHandle hd size) v = do s <- readIORef size; atomically (addLoop hd) ; atomicModifyIORef size (\s -> (s+1, ()))
where
addLoop l = do
raw <- readTVar l
case raw of
Head n -> addLoop n
Null -> do
newNull <- newTVar Null
writeTVar l (Node v newNull)
Node v' n ->
if v > v'
then addLoop n
else do
newNode <- newTVar (Node v' n)
writeTVar l (Node v newNode)
--find :: Eq a => ListHandle a -> a -> IO Bool
| 694
|
add (ListHandle hd size) v = do s <- readIORef size; atomically (addLoop hd) ; atomicModifyIORef size (\s -> (s+1, ()))
where
addLoop l = do
raw <- readTVar l
case raw of
Head n -> addLoop n
Null -> do
newNull <- newTVar Null
writeTVar l (Node v newNull)
Node v' n ->
if v > v'
then addLoop n
else do
newNode <- newTVar (Node v' n)
writeTVar l (Node v newNode)
--find :: Eq a => ListHandle a -> a -> IO Bool
| 657
| true
| true
| 0
| 18
| 354
| 232
| 107
| 125
| null | null |
bitemyapp/amqp
|
Network/AMQP.hs
|
bsd-3-clause
|
publishMsg :: Channel -> Text -> Text -> Message -> IO ()
publishMsg chan exchange routingKey msg = publishMsg' chan exchange routingKey False msg
| 146
|
publishMsg :: Channel -> Text -> Text -> Message -> IO ()
publishMsg chan exchange routingKey msg = publishMsg' chan exchange routingKey False msg
| 146
|
publishMsg chan exchange routingKey msg = publishMsg' chan exchange routingKey False msg
| 88
| false
| true
| 0
| 10
| 23
| 52
| 25
| 27
| null | null |
danr/hipspec
|
testsuite/prod/zeno_version/PropT13.hs
|
gpl-3.0
|
drop (S x) (_:xs) = drop x xs
| 29
|
drop (S x) (_:xs) = drop x xs
| 29
|
drop (S x) (_:xs) = drop x xs
| 29
| false
| false
| 0
| 6
| 7
| 32
| 14
| 18
| null | null |
brendanhay/gogol
|
gogol-bigquery/gen/Network/Google/BigQuery/Types/Product.hs
|
mpl-2.0
|
-- | Required. The type of routine.
rRoutineType :: Lens' Routine (Maybe RoutineRoutineType)
rRoutineType
= lens _rRoutineType (\ s a -> s{_rRoutineType = a})
| 160
|
rRoutineType :: Lens' Routine (Maybe RoutineRoutineType)
rRoutineType
= lens _rRoutineType (\ s a -> s{_rRoutineType = a})
| 124
|
rRoutineType
= lens _rRoutineType (\ s a -> s{_rRoutineType = a})
| 67
| true
| true
| 0
| 9
| 25
| 48
| 25
| 23
| null | null |
MasseR/xmonadcontrib
|
XMonad/Actions/DynamicWorkspaces.hs
|
bsd-3-clause
|
addHiddenWorkspace' :: i -> l -> StackSet i l a sid sd -> StackSet i l a sid sd
addHiddenWorkspace' newtag l s@(StackSet { hidden = ws }) = s { hidden = Workspace newtag l Nothing:ws }
| 184
|
addHiddenWorkspace' :: i -> l -> StackSet i l a sid sd -> StackSet i l a sid sd
addHiddenWorkspace' newtag l s@(StackSet { hidden = ws }) = s { hidden = Workspace newtag l Nothing:ws }
| 184
|
addHiddenWorkspace' newtag l s@(StackSet { hidden = ws }) = s { hidden = Workspace newtag l Nothing:ws }
| 104
| false
| true
| 0
| 10
| 37
| 86
| 44
| 42
| null | null |
ardumont/haskell-lab
|
src/Huffman.hs
|
gpl-2.0
|
mergeCodeTables :: CodeTable -> CodeTable -> CodeTable
mergeCodeTables = union
| 78
|
mergeCodeTables :: CodeTable -> CodeTable -> CodeTable
mergeCodeTables = union
| 78
|
mergeCodeTables = union
| 23
| false
| true
| 0
| 8
| 9
| 26
| 11
| 15
| null | null |
Gabriel439/Haskell-Pipes-Library
|
src/Pipes/Prelude.hs
|
bsd-3-clause
|
{-| @(elem a p)@ returns 'True' if @p@ has an element equal to @a@, 'False'
otherwise
-}
elem :: (Monad m, Eq a) => a -> Producer a m () -> m Bool
elem a = any (a ==)
| 170
|
elem :: (Monad m, Eq a) => a -> Producer a m () -> m Bool
elem a = any (a ==)
| 77
|
elem a = any (a ==)
| 19
| true
| true
| 0
| 9
| 42
| 57
| 29
| 28
| null | null |
dmvianna/haskellbook
|
src/Ch15-Semigroups.hs
|
unlicense
|
testAccB :: (Eq a, Eq b, Semigroup a, Semigroup b) =>
AccumulateBoth a b -> AccumulateBoth a b -> Bool
testAccB x x' = case (x, x') of
(AccumulateBoth(Failure a),
AccumulateBoth(Success _)) -> x <> x' == AccumulateBoth(Failure a)
(AccumulateBoth(Success _),
AccumulateBoth(Failure a)) -> x <> x' == AccumulateBoth(Failure a)
(AccumulateBoth(Failure a),
AccumulateBoth(Failure a')) -> x <> x' == AccumulateBoth(Failure (a <> a'))
(AccumulateBoth(Success a),
AccumulateBoth(Success a')) -> x <> x' == AccumulateBoth(Success (a <> a'))
| 564
|
testAccB :: (Eq a, Eq b, Semigroup a, Semigroup b) =>
AccumulateBoth a b -> AccumulateBoth a b -> Bool
testAccB x x' = case (x, x') of
(AccumulateBoth(Failure a),
AccumulateBoth(Success _)) -> x <> x' == AccumulateBoth(Failure a)
(AccumulateBoth(Success _),
AccumulateBoth(Failure a)) -> x <> x' == AccumulateBoth(Failure a)
(AccumulateBoth(Failure a),
AccumulateBoth(Failure a')) -> x <> x' == AccumulateBoth(Failure (a <> a'))
(AccumulateBoth(Success a),
AccumulateBoth(Success a')) -> x <> x' == AccumulateBoth(Success (a <> a'))
| 564
|
testAccB x x' = case (x, x') of
(AccumulateBoth(Failure a),
AccumulateBoth(Success _)) -> x <> x' == AccumulateBoth(Failure a)
(AccumulateBoth(Success _),
AccumulateBoth(Failure a)) -> x <> x' == AccumulateBoth(Failure a)
(AccumulateBoth(Failure a),
AccumulateBoth(Failure a')) -> x <> x' == AccumulateBoth(Failure (a <> a'))
(AccumulateBoth(Success a),
AccumulateBoth(Success a')) -> x <> x' == AccumulateBoth(Success (a <> a'))
| 449
| false
| true
| 0
| 13
| 107
| 278
| 137
| 141
| null | null |
ku-fpg/kansas-amber
|
System/Hardware/Haskino/Compiler.hs
|
bsd-3-clause
|
compileExpr :: Expr a -> String
compileExpr LitUnit = "0"
| 57
|
compileExpr :: Expr a -> String
compileExpr LitUnit = "0"
| 57
|
compileExpr LitUnit = "0"
| 25
| false
| true
| 0
| 6
| 9
| 21
| 10
| 11
| null | null |
geophf/1HaskellADay
|
exercises/HAD/Y2018/M07/D03/Solution.hs
|
mit
|
graphMeBAYBEE :: Endpoint -> Codex -> IO String
graphMeBAYBEE endpt = cyphIt endpt . codex2Rels
| 95
|
graphMeBAYBEE :: Endpoint -> Codex -> IO String
graphMeBAYBEE endpt = cyphIt endpt . codex2Rels
| 95
|
graphMeBAYBEE endpt = cyphIt endpt . codex2Rels
| 47
| false
| true
| 1
| 8
| 14
| 38
| 16
| 22
| null | null |
rahulmutt/ghcvm
|
compiler/Eta/Utils/ExtsCompat46.hs
|
bsd-3-clause
|
leAddr# :: Addr# -> Addr# -> Bool
leAddr# a b = isTrue# (a `E.leAddr#` b)
| 73
|
leAddr# :: Addr# -> Addr# -> Bool
leAddr# a b = isTrue# (a `E.leAddr#` b)
| 73
|
leAddr# a b = isTrue# (a `E.leAddr#` b)
| 39
| false
| true
| 0
| 8
| 14
| 44
| 21
| 23
| null | null |
event/spim
|
MIMEDir.hs
|
agpl-3.0
|
contentsKinds :: MIMEDirContents -> [String]
contentsKinds c = concat (map
(\ v -> case v of
Left _ -> []
Right dir -> nestedKinds dir) {- mutual recursion could be
changed here to plain `kind dir` as mime-dirs has 2 level nesting in practice -}
(Map.elems c))
| 385
|
contentsKinds :: MIMEDirContents -> [String]
contentsKinds c = concat (map
(\ v -> case v of
Left _ -> []
Right dir -> nestedKinds dir) {- mutual recursion could be
changed here to plain `kind dir` as mime-dirs has 2 level nesting in practice -}
(Map.elems c))
| 385
|
contentsKinds c = concat (map
(\ v -> case v of
Left _ -> []
Right dir -> nestedKinds dir) {- mutual recursion could be
changed here to plain `kind dir` as mime-dirs has 2 level nesting in practice -}
(Map.elems c))
| 340
| false
| true
| 0
| 13
| 171
| 76
| 38
| 38
| null | null |
plow-technologies/distributed-simple-cell
|
tests/Tests.hs
|
mit
|
testInsertLotsGet' :: (UrlList urllist) => LocalStoreM '[] urllist TestCellEntry ()
testInsertLotsGet' = do
entries <- liftIO $ mapM (const makeRandomTestCellEntry) [1..100]
entryIdx <- liftIO $ getStdRandom $ randomR (0, length entries - 1)
let entry = entries !! entryIdx
void $ withStores entries (const $ const $ return ())
eResult <- withStore (unvalueTestCellEntry $ entry) $ \_lifter store -> do
entry' <- getLocalStore store
liftIO $ entry @=? entry'
either (liftIO . assertFailure) (const $ return ()) eResult
| 538
|
testInsertLotsGet' :: (UrlList urllist) => LocalStoreM '[] urllist TestCellEntry ()
testInsertLotsGet' = do
entries <- liftIO $ mapM (const makeRandomTestCellEntry) [1..100]
entryIdx <- liftIO $ getStdRandom $ randomR (0, length entries - 1)
let entry = entries !! entryIdx
void $ withStores entries (const $ const $ return ())
eResult <- withStore (unvalueTestCellEntry $ entry) $ \_lifter store -> do
entry' <- getLocalStore store
liftIO $ entry @=? entry'
either (liftIO . assertFailure) (const $ return ()) eResult
| 538
|
testInsertLotsGet' = do
entries <- liftIO $ mapM (const makeRandomTestCellEntry) [1..100]
entryIdx <- liftIO $ getStdRandom $ randomR (0, length entries - 1)
let entry = entries !! entryIdx
void $ withStores entries (const $ const $ return ())
eResult <- withStore (unvalueTestCellEntry $ entry) $ \_lifter store -> do
entry' <- getLocalStore store
liftIO $ entry @=? entry'
either (liftIO . assertFailure) (const $ return ()) eResult
| 454
| false
| true
| 0
| 13
| 97
| 212
| 102
| 110
| null | null |
futufeld/eclogues
|
eclogues-mock/src/Eclogues/Monitoring/Cluster.hs
|
bsd-3-clause
|
stateSatisfy :: Status -> Maybe Satisfiability
stateSatisfy status = bool (Just Satisfiable) Nothing $ Job.isPendingStage (status ^. Job.stage)
| 143
|
stateSatisfy :: Status -> Maybe Satisfiability
stateSatisfy status = bool (Just Satisfiable) Nothing $ Job.isPendingStage (status ^. Job.stage)
| 143
|
stateSatisfy status = bool (Just Satisfiable) Nothing $ Job.isPendingStage (status ^. Job.stage)
| 96
| false
| true
| 0
| 9
| 17
| 50
| 24
| 26
| null | null |
joelchelliah/diy-lang-haskell
|
test/parts/Test_7_UsingTheLanguage.hs
|
bsd-3-clause
|
testingLength :: TestTree
testingLength = testCase
"\n Test 7.8 - The `length` function. \n\
\ Count the number of elements in the list" $ do
env <- stdLibEnv
mapM_ (assertInterpretWithEnvironment env)
[ ("5", "(length '(1 2 3 4 5))" )
, ("3", "(length '(#t '(1 2 3) 'foo-bar))")
, ("0", "(length '())" )
]
| 373
|
testingLength :: TestTree
testingLength = testCase
"\n Test 7.8 - The `length` function. \n\
\ Count the number of elements in the list" $ do
env <- stdLibEnv
mapM_ (assertInterpretWithEnvironment env)
[ ("5", "(length '(1 2 3 4 5))" )
, ("3", "(length '(#t '(1 2 3) 'foo-bar))")
, ("0", "(length '())" )
]
| 373
|
testingLength = testCase
"\n Test 7.8 - The `length` function. \n\
\ Count the number of elements in the list" $ do
env <- stdLibEnv
mapM_ (assertInterpretWithEnvironment env)
[ ("5", "(length '(1 2 3 4 5))" )
, ("3", "(length '(#t '(1 2 3) 'foo-bar))")
, ("0", "(length '())" )
]
| 347
| false
| true
| 0
| 10
| 120
| 66
| 36
| 30
| null | null |
keera-studios/hsQt
|
Qtc/Gui/QTextCharFormat.hs
|
bsd-2-clause
|
underlineStyle :: QTextCharFormat a -> (()) -> IO (UnderlineStyle)
underlineStyle x0 ()
= withQEnumResult $
withObjectPtr x0 $ \cobj_x0 ->
qtc_QTextCharFormat_underlineStyle cobj_x0
| 191
|
underlineStyle :: QTextCharFormat a -> (()) -> IO (UnderlineStyle)
underlineStyle x0 ()
= withQEnumResult $
withObjectPtr x0 $ \cobj_x0 ->
qtc_QTextCharFormat_underlineStyle cobj_x0
| 191
|
underlineStyle x0 ()
= withQEnumResult $
withObjectPtr x0 $ \cobj_x0 ->
qtc_QTextCharFormat_underlineStyle cobj_x0
| 124
| false
| true
| 0
| 8
| 31
| 59
| 29
| 30
| null | null |
ghc-android/ghc
|
compiler/prelude/PrelNames.hs
|
bsd-3-clause
|
gHC_STABLE = mkBaseModule (fsLit "GHC.Stable")
| 51
|
gHC_STABLE = mkBaseModule (fsLit "GHC.Stable")
| 51
|
gHC_STABLE = mkBaseModule (fsLit "GHC.Stable")
| 51
| false
| false
| 0
| 7
| 9
| 15
| 7
| 8
| null | null |
juhp/stack
|
src/Stack/Constants.hs
|
bsd-3-clause
|
relFileSetupMacrosH :: Path Rel File
relFileSetupMacrosH = $(mkRelFile "setup_macros.h")
| 88
|
relFileSetupMacrosH :: Path Rel File
relFileSetupMacrosH = $(mkRelFile "setup_macros.h")
| 88
|
relFileSetupMacrosH = $(mkRelFile "setup_macros.h")
| 51
| false
| true
| 0
| 8
| 8
| 29
| 12
| 17
| null | null |
ledyba/Jinzamomi
|
src/Jinzamomi/Driver.hs
|
gpl-3.0
|
execute None = errorM tag "Please specify driver"
| 49
|
execute None = errorM tag "Please specify driver"
| 49
|
execute None = errorM tag "Please specify driver"
| 49
| false
| false
| 0
| 5
| 7
| 14
| 6
| 8
| null | null |
tidalcycles/Tidal
|
src/Sound/Tidal/Transition.hs
|
gpl-3.0
|
mortal lifespan release now (p:_) = overlay (filterWhen (<(now+lifespan)) p) (filterWhen (>= (now+lifespan)) (fadeOutFrom (now + lifespan) release p))
| 150
|
mortal lifespan release now (p:_) = overlay (filterWhen (<(now+lifespan)) p) (filterWhen (>= (now+lifespan)) (fadeOutFrom (now + lifespan) release p))
| 150
|
mortal lifespan release now (p:_) = overlay (filterWhen (<(now+lifespan)) p) (filterWhen (>= (now+lifespan)) (fadeOutFrom (now + lifespan) release p))
| 150
| false
| false
| 0
| 11
| 18
| 82
| 44
| 38
| null | null |
facebookincubator/duckling
|
Duckling/Distance/HR/Rules.hs
|
bsd-3-clause
|
ruleDistCentimetar :: Rule
ruleDistCentimetar = Rule
{ name = "<dist> centimetar"
, pattern =
[ dimension Distance
, regex "cm|centimeta?ra?"
]
, prod = \tokens -> case tokens of
(Token Distance dd:_) ->
Just . Token Distance $ withUnit TDistance.Centimetre dd
_ -> Nothing
}
| 315
|
ruleDistCentimetar :: Rule
ruleDistCentimetar = Rule
{ name = "<dist> centimetar"
, pattern =
[ dimension Distance
, regex "cm|centimeta?ra?"
]
, prod = \tokens -> case tokens of
(Token Distance dd:_) ->
Just . Token Distance $ withUnit TDistance.Centimetre dd
_ -> Nothing
}
| 315
|
ruleDistCentimetar = Rule
{ name = "<dist> centimetar"
, pattern =
[ dimension Distance
, regex "cm|centimeta?ra?"
]
, prod = \tokens -> case tokens of
(Token Distance dd:_) ->
Just . Token Distance $ withUnit TDistance.Centimetre dd
_ -> Nothing
}
| 288
| false
| true
| 0
| 14
| 84
| 98
| 51
| 47
| null | null |
sdiehl/ghc
|
libraries/template-haskell/Language/Haskell/TH/Lib/Internal.hs
|
bsd-3-clause
|
sigT :: Quote m => m Type -> m Kind -> m Type
sigT t k
= do
t' <- t
k' <- k
pure $ SigT t' k'
| 113
|
sigT :: Quote m => m Type -> m Kind -> m Type
sigT t k
= do
t' <- t
k' <- k
pure $ SigT t' k'
| 113
|
sigT t k
= do
t' <- t
k' <- k
pure $ SigT t' k'
| 67
| false
| true
| 0
| 8
| 48
| 66
| 29
| 37
| null | null |
GaloisInc/pads-haskell
|
Examples/First.hs
|
bsd-3-clause
|
test_intRangeLow = mkTestCase "IntRangeLow" expect_intRangeLow result_intRangeLow
| 83
|
test_intRangeLow = mkTestCase "IntRangeLow" expect_intRangeLow result_intRangeLow
| 83
|
test_intRangeLow = mkTestCase "IntRangeLow" expect_intRangeLow result_intRangeLow
| 83
| false
| false
| 0
| 5
| 7
| 13
| 6
| 7
| null | null |
andyarvanitis/Idris-dev
|
src/Idris/Core/TT.hs
|
bsd-3-clause
|
-- | Like 'bindAll', but the 'Binder's are 'TT' terms instead.
-- The first argument is a function to map @TT@ terms to @Binder@s.
-- This function might often be something like 'Lam', which directly
-- constructs a @Binder@ from a @TT@ term.
bindTyArgs :: (TT n -> Binder (TT n)) -> [(n, TT n)] -> TT n -> TT n
bindTyArgs b xs = bindAll (map (\ (n, ty) -> (n, b ty)) xs)
| 371
|
bindTyArgs :: (TT n -> Binder (TT n)) -> [(n, TT n)] -> TT n -> TT n
bindTyArgs b xs = bindAll (map (\ (n, ty) -> (n, b ty)) xs)
| 128
|
bindTyArgs b xs = bindAll (map (\ (n, ty) -> (n, b ty)) xs)
| 59
| true
| true
| 0
| 11
| 74
| 108
| 56
| 52
| null | null |
athanclark/Idris-dev
|
src/Idris/Reflection.hs
|
bsd-3-clause
|
-- | Prefix a name with the "Language.Reflection.Elab" namespace
tacN :: String -> Name
tacN str = sNS (sUN str) ["Elab", "Reflection", "Language"]
| 147
|
tacN :: String -> Name
tacN str = sNS (sUN str) ["Elab", "Reflection", "Language"]
| 82
|
tacN str = sNS (sUN str) ["Elab", "Reflection", "Language"]
| 59
| true
| true
| 0
| 7
| 22
| 42
| 22
| 20
| null | null |
brendanhay/gogol
|
gogol-adexchangebuyer2/gen/Network/Google/AdExchangeBuyer2/Types/Product.hs
|
mpl-2.0
|
-- | List of rows, with counts of filtered bids aggregated by filtering
-- reason (i.e. creative status).
lfbrCreativeStatusRows :: Lens' ListFilteredBidsResponse [CreativeStatusRow]
lfbrCreativeStatusRows
= lens _lfbrCreativeStatusRows
(\ s a -> s{_lfbrCreativeStatusRows = a})
. _Default
. _Coerce
| 319
|
lfbrCreativeStatusRows :: Lens' ListFilteredBidsResponse [CreativeStatusRow]
lfbrCreativeStatusRows
= lens _lfbrCreativeStatusRows
(\ s a -> s{_lfbrCreativeStatusRows = a})
. _Default
. _Coerce
| 213
|
lfbrCreativeStatusRows
= lens _lfbrCreativeStatusRows
(\ s a -> s{_lfbrCreativeStatusRows = a})
. _Default
. _Coerce
| 136
| true
| true
| 3
| 8
| 57
| 60
| 29
| 31
| null | null |
fmapfmapfmap/amazonka
|
amazonka-cognito-identity/gen/Network/AWS/CognitoIdentity/ListIdentities.hs
|
mpl-2.0
|
-- | The maximum number of identities to return.
liMaxResults :: Lens' ListIdentities Natural
liMaxResults = lens _liMaxResults (\ s a -> s{_liMaxResults = a}) . _Nat
| 166
|
liMaxResults :: Lens' ListIdentities Natural
liMaxResults = lens _liMaxResults (\ s a -> s{_liMaxResults = a}) . _Nat
| 117
|
liMaxResults = lens _liMaxResults (\ s a -> s{_liMaxResults = a}) . _Nat
| 72
| true
| true
| 0
| 10
| 26
| 44
| 24
| 20
| null | null |
pparkkin/eta
|
compiler/ETA/Prelude/PrimOp.hs
|
bsd-3-clause
|
tagOf_PrimOp ReadByteArrayOp_Addr = _ILIT(201)
| 46
|
tagOf_PrimOp ReadByteArrayOp_Addr = _ILIT(201)
| 46
|
tagOf_PrimOp ReadByteArrayOp_Addr = _ILIT(201)
| 46
| false
| false
| 0
| 6
| 3
| 15
| 7
| 8
| null | null |
brendanhay/gogol
|
gogol-civicinfo/gen/Network/Google/CivicInfo/Types/Product.hs
|
mpl-2.0
|
-- | Longitude of the location, in degrees east of the Prime Meridian. Note
-- this field may not be available for some locations.
plLongitude :: Lens' PollingLocation (Maybe Double)
plLongitude
= lens _plLongitude (\ s a -> s{_plLongitude = a}) .
mapping _Coerce
| 271
|
plLongitude :: Lens' PollingLocation (Maybe Double)
plLongitude
= lens _plLongitude (\ s a -> s{_plLongitude = a}) .
mapping _Coerce
| 140
|
plLongitude
= lens _plLongitude (\ s a -> s{_plLongitude = a}) .
mapping _Coerce
| 88
| true
| true
| 3
| 8
| 51
| 64
| 29
| 35
| null | null |
Mahdi89/eTeak
|
src/Main.hs
|
bsd-3-clause
|
plotUsage :: [PlotOption] -> String -> IO ()
plotUsage opts message = do
header
subOptionsUsage plotOptionUsage opts "-p" message
exitFailure
| 169
|
plotUsage :: [PlotOption] -> String -> IO ()
plotUsage opts message = do
header
subOptionsUsage plotOptionUsage opts "-p" message
exitFailure
| 165
|
plotUsage opts message = do
header
subOptionsUsage plotOptionUsage opts "-p" message
exitFailure
| 120
| false
| true
| 0
| 9
| 47
| 51
| 23
| 28
| null | null |
vTurbine/ghc
|
compiler/basicTypes/OccName.hs
|
bsd-3-clause
|
mkDataOcc :: String -> OccName
mkDataOcc = mkOccName dataName
| 61
|
mkDataOcc :: String -> OccName
mkDataOcc = mkOccName dataName
| 61
|
mkDataOcc = mkOccName dataName
| 30
| false
| true
| 0
| 7
| 8
| 24
| 10
| 14
| null | null |
aaronc/Idris-dev
|
src/Idris/Core/TT.hs
|
bsd-3-clause
|
trun :: FC -> TC a -> TC a
trun fc (OK a) = OK a
| 51
|
trun :: FC -> TC a -> TC a
trun fc (OK a) = OK a
| 51
|
trun fc (OK a) = OK a
| 24
| false
| true
| 0
| 10
| 18
| 44
| 19
| 25
| null | null |
achirkin/mooc-images
|
src/Handler/Home.hs
|
mit
|
maybeOffset :: Maybe Text -> Int
maybeOffset Nothing = 0
| 56
|
maybeOffset :: Maybe Text -> Int
maybeOffset Nothing = 0
| 56
|
maybeOffset Nothing = 0
| 23
| false
| true
| 0
| 6
| 9
| 21
| 10
| 11
| null | null |
snoyberg/ghc
|
testsuite/tests/concurrent/prog001/Thread.hs
|
bsd-3-clause
|
t2 :: MVar Int -> Stream -> Stream -> IO()
t2 m (0:0:x) (b:1:0:y) = putMVar m 30
| 80
|
t2 :: MVar Int -> Stream -> Stream -> IO()
t2 m (0:0:x) (b:1:0:y) = putMVar m 30
| 80
|
t2 m (0:0:x) (b:1:0:y) = putMVar m 30
| 37
| false
| true
| 0
| 13
| 17
| 74
| 35
| 39
| null | null |
vikraman/ghc
|
compiler/deSugar/DsBinds.hs
|
bsd-3-clause
|
------------------------
ds_lhs_binds :: LHsBinds Id -> DsM ([Id], [(Id,CoreExpr)])
ds_lhs_binds binds
= do { ds_bs <- mapBagM dsLHsBind binds
; return (foldBag (\(a, a') (b, b') -> (a ++ b, a' ++ b'))
id ([], []) ds_bs) }
| 258
|
ds_lhs_binds :: LHsBinds Id -> DsM ([Id], [(Id,CoreExpr)])
ds_lhs_binds binds
= do { ds_bs <- mapBagM dsLHsBind binds
; return (foldBag (\(a, a') (b, b') -> (a ++ b, a' ++ b'))
id ([], []) ds_bs) }
| 231
|
ds_lhs_binds binds
= do { ds_bs <- mapBagM dsLHsBind binds
; return (foldBag (\(a, a') (b, b') -> (a ++ b, a' ++ b'))
id ([], []) ds_bs) }
| 172
| true
| true
| 0
| 14
| 73
| 127
| 69
| 58
| null | null |
vTurbine/ghc
|
compiler/rename/RnBinds.hs
|
bsd-3-clause
|
misplacedSigErr :: LSig Name -> RnM ()
misplacedSigErr (L loc sig)
= addErrAt loc $
sep [text "Misplaced" <+> hsSigDoc sig <> colon, ppr sig]
| 147
|
misplacedSigErr :: LSig Name -> RnM ()
misplacedSigErr (L loc sig)
= addErrAt loc $
sep [text "Misplaced" <+> hsSigDoc sig <> colon, ppr sig]
| 147
|
misplacedSigErr (L loc sig)
= addErrAt loc $
sep [text "Misplaced" <+> hsSigDoc sig <> colon, ppr sig]
| 108
| false
| true
| 0
| 10
| 30
| 67
| 31
| 36
| null | null |
cwgreene/javaclassreader
|
src/Main.hs
|
mit
|
readJCF = do
magic <- getWord32be
minor <- getWord16be
major <- getWord16be
constant_pool_count <- getWord16be
constant_pool <- getConstantPool (fromIntegral constant_pool_count)
access_flags <- getWord16be
this_class <- getWord16be
super_class <- getWord16be
interfaces_count <- getWord16be
interfaces <- getInterfaces (fromIntegral interfaces_count)
fields_count <- getWord16be
fields <- getFields (fromIntegral fields_count)
methods_count <- getWord16be
methods <- getMethods (fromIntegral methods_count)
attributes_count <- getWord16be
attributes <- getAttributes (fromIntegral attributes_count)
return (ClassFile (Hex32 magic) minor major
constant_pool
access_flags
this_class
super_class
interfaces
fields
methods
attributes)
| 863
|
readJCF = do
magic <- getWord32be
minor <- getWord16be
major <- getWord16be
constant_pool_count <- getWord16be
constant_pool <- getConstantPool (fromIntegral constant_pool_count)
access_flags <- getWord16be
this_class <- getWord16be
super_class <- getWord16be
interfaces_count <- getWord16be
interfaces <- getInterfaces (fromIntegral interfaces_count)
fields_count <- getWord16be
fields <- getFields (fromIntegral fields_count)
methods_count <- getWord16be
methods <- getMethods (fromIntegral methods_count)
attributes_count <- getWord16be
attributes <- getAttributes (fromIntegral attributes_count)
return (ClassFile (Hex32 magic) minor major
constant_pool
access_flags
this_class
super_class
interfaces
fields
methods
attributes)
| 863
|
readJCF = do
magic <- getWord32be
minor <- getWord16be
major <- getWord16be
constant_pool_count <- getWord16be
constant_pool <- getConstantPool (fromIntegral constant_pool_count)
access_flags <- getWord16be
this_class <- getWord16be
super_class <- getWord16be
interfaces_count <- getWord16be
interfaces <- getInterfaces (fromIntegral interfaces_count)
fields_count <- getWord16be
fields <- getFields (fromIntegral fields_count)
methods_count <- getWord16be
methods <- getMethods (fromIntegral methods_count)
attributes_count <- getWord16be
attributes <- getAttributes (fromIntegral attributes_count)
return (ClassFile (Hex32 magic) minor major
constant_pool
access_flags
this_class
super_class
interfaces
fields
methods
attributes)
| 863
| false
| false
| 0
| 11
| 206
| 201
| 89
| 112
| null | null |
dfordivam/lava
|
Lava/Fixit.hs
|
bsd-3-clause
|
proveFile :: FilePath -> IO () -> IO ProofResult
proveFile file before =
do putStr "Fixit: "
before
putStr "... "
system ("rm -f " ++ verifyDir ++ "/fixit.lock")
lavadir <- getLavaDir
x <- system ( lavadir
++ "/Scripts/fixit.wrapper "
++ file
++ " -showTime -dir=forward -sat=prove"
)
let res = case x of
ExitSuccess -> Valid
ExitFailure 1 -> Indeterminate
ExitFailure _ -> Falsifiable
putStrLn (show res ++ ".")
return res
----------------------------------------------------------------
-- the end.
| 661
|
proveFile :: FilePath -> IO () -> IO ProofResult
proveFile file before =
do putStr "Fixit: "
before
putStr "... "
system ("rm -f " ++ verifyDir ++ "/fixit.lock")
lavadir <- getLavaDir
x <- system ( lavadir
++ "/Scripts/fixit.wrapper "
++ file
++ " -showTime -dir=forward -sat=prove"
)
let res = case x of
ExitSuccess -> Valid
ExitFailure 1 -> Indeterminate
ExitFailure _ -> Falsifiable
putStrLn (show res ++ ".")
return res
----------------------------------------------------------------
-- the end.
| 661
|
proveFile file before =
do putStr "Fixit: "
before
putStr "... "
system ("rm -f " ++ verifyDir ++ "/fixit.lock")
lavadir <- getLavaDir
x <- system ( lavadir
++ "/Scripts/fixit.wrapper "
++ file
++ " -showTime -dir=forward -sat=prove"
)
let res = case x of
ExitSuccess -> Valid
ExitFailure 1 -> Indeterminate
ExitFailure _ -> Falsifiable
putStrLn (show res ++ ".")
return res
----------------------------------------------------------------
-- the end.
| 612
| false
| true
| 0
| 14
| 236
| 162
| 72
| 90
| null | null |
robertclancy/tapl
|
arith/ArithParser.hs
|
gpl-2.0
|
parens :: Parser a -> Parser a
parens p = do char '('
r <- p
char ')'
return r
| 120
|
parens :: Parser a -> Parser a
parens p = do char '('
r <- p
char ')'
return r
| 120
|
parens p = do char '('
r <- p
char ')'
return r
| 89
| false
| true
| 0
| 8
| 61
| 54
| 21
| 33
| null | null |
fmapfmapfmap/amazonka
|
amazonka-swf/gen/Network/AWS/SWF/Types/Product.hs
|
mpl-2.0
|
-- | __Required.__ The unique ID of the timer.
--
-- The specified string must not start or end with whitespace. It must not
-- contain a ':' (colon), '\/' (slash), '|' (vertical bar), or any control
-- characters (\\u0000-\\u001f | \\u007f - \\u009f). Also, it must not
-- contain the literal string quotarnquot.
stdaTimerId :: Lens' StartTimerDecisionAttributes Text
stdaTimerId = lens _stdaTimerId (\ s a -> s{_stdaTimerId = a})
| 431
|
stdaTimerId :: Lens' StartTimerDecisionAttributes Text
stdaTimerId = lens _stdaTimerId (\ s a -> s{_stdaTimerId = a})
| 117
|
stdaTimerId = lens _stdaTimerId (\ s a -> s{_stdaTimerId = a})
| 62
| true
| true
| 0
| 9
| 69
| 45
| 27
| 18
| null | null |
alang9/deque
|
Data/Deque/NonCat.hs
|
bsd-3-clause
|
combine f@(GY _ _) ls@(TinyH B5{}) = BigY f N ls
| 48
|
combine f@(GY _ _) ls@(TinyH B5{}) = BigY f N ls
| 48
|
combine f@(GY _ _) ls@(TinyH B5{}) = BigY f N ls
| 48
| false
| false
| 0
| 9
| 10
| 42
| 21
| 21
| null | null |
jsavatgy/xroads-game
|
code/circle-area-demo.hs
|
gpl-2.0
|
angles1 n = [i * (tau/n) | i <- [0..n-1]]
| 41
|
angles1 n = [i * (tau/n) | i <- [0..n-1]]
| 41
|
angles1 n = [i * (tau/n) | i <- [0..n-1]]
| 41
| false
| false
| 0
| 9
| 9
| 40
| 21
| 19
| null | null |
nevrenato/HetsAlloy
|
Maude/Maude2DG.hs
|
gpl-2.0
|
{- | qualifies the symbols in the theory imported with the parameter name
given as first parameter -}
createQualificationTh2Mod :: Token -> Symbols -> [Renaming]
createQualificationTh2Mod _ [] = []
| 197
|
createQualificationTh2Mod :: Token -> Symbols -> [Renaming]
createQualificationTh2Mod _ [] = []
| 95
|
createQualificationTh2Mod _ [] = []
| 35
| true
| true
| 0
| 7
| 29
| 32
| 17
| 15
| null | null |
andreagenso/java2scala
|
src/J2s/Ast/Semantic.hs
|
apache-2.0
|
sem_BlockStatement_BlockStatementClassDeclarationEnumDeclaration = BlockStatementClassDeclarationEnumDeclaration
| 112
|
sem_BlockStatement_BlockStatementClassDeclarationEnumDeclaration = BlockStatementClassDeclarationEnumDeclaration
| 112
|
sem_BlockStatement_BlockStatementClassDeclarationEnumDeclaration = BlockStatementClassDeclarationEnumDeclaration
| 112
| false
| false
| 0
| 4
| 2
| 6
| 3
| 3
| null | null |
jasdennison/scrabble-solver
|
tests/Board_Test.hs
|
bsd-3-clause
|
tests :: TestTree
tests = testGroup "Board tests" [unitTests]
| 61
|
tests :: TestTree
tests = testGroup "Board tests" [unitTests]
| 61
|
tests = testGroup "Board tests" [unitTests]
| 43
| false
| true
| 0
| 6
| 8
| 19
| 10
| 9
| null | null |
byorgey/Idris-dev
|
src/Idris/REPL.hs
|
bsd-3-clause
|
classInfo :: ClassInfo -> Idris ()
classInfo ci = do iputStrLn "Methods:\n"
mapM_ dumpMethod (class_methods ci)
iputStrLn ""
iputStrLn "Instances:\n"
mapM_ dumpInstance (class_instances ci)
iResult ""
| 290
|
classInfo :: ClassInfo -> Idris ()
classInfo ci = do iputStrLn "Methods:\n"
mapM_ dumpMethod (class_methods ci)
iputStrLn ""
iputStrLn "Instances:\n"
mapM_ dumpInstance (class_instances ci)
iResult ""
| 290
|
classInfo ci = do iputStrLn "Methods:\n"
mapM_ dumpMethod (class_methods ci)
iputStrLn ""
iputStrLn "Instances:\n"
mapM_ dumpInstance (class_instances ci)
iResult ""
| 255
| false
| true
| 0
| 9
| 115
| 75
| 31
| 44
| null | null |
peterokagey/haskellOEIS
|
src/External/A161527.hs
|
apache-2.0
|
a161527 :: Int -> Integer
a161527 n = a161527_list !! (n-1)
| 59
|
a161527 :: Int -> Integer
a161527 n = a161527_list !! (n-1)
| 59
|
a161527 n = a161527_list !! (n-1)
| 33
| false
| true
| 0
| 7
| 10
| 29
| 15
| 14
| null | null |
green-haskell/ghc
|
compiler/deSugar/Coverage.hs
|
bsd-3-clause
|
addTickHsCmd :: HsCmd Id -> TM (HsCmd Id)
addTickHsCmd (HsCmdLam matchgroup) =
liftM HsCmdLam (addTickCmdMatchGroup matchgroup)
| 135
|
addTickHsCmd :: HsCmd Id -> TM (HsCmd Id)
addTickHsCmd (HsCmdLam matchgroup) =
liftM HsCmdLam (addTickCmdMatchGroup matchgroup)
| 135
|
addTickHsCmd (HsCmdLam matchgroup) =
liftM HsCmdLam (addTickCmdMatchGroup matchgroup)
| 93
| false
| true
| 0
| 8
| 23
| 47
| 22
| 25
| null | null |
spire/spire
|
src/Spire/Canonical/Checker.hs
|
bsd-3-clause
|
checkV VTT _ = throwError "Ill-typed!"
| 52
|
checkV VTT _ = throwError "Ill-typed!"
| 52
|
checkV VTT _ = throwError "Ill-typed!"
| 52
| false
| false
| 0
| 5
| 19
| 14
| 6
| 8
| null | null |
Fuuzetsu/yi
|
yi-keymap-vim/src/Yi/Keymap/Vim/StateUtils.hs
|
gpl-2.0
|
modifyStateE :: (VimState -> VimState) -> EditorM ()
modifyStateE f = do
currentState <- getEditorDyn
putEditorDyn $ f currentState
| 139
|
modifyStateE :: (VimState -> VimState) -> EditorM ()
modifyStateE f = do
currentState <- getEditorDyn
putEditorDyn $ f currentState
| 139
|
modifyStateE f = do
currentState <- getEditorDyn
putEditorDyn $ f currentState
| 86
| false
| true
| 0
| 8
| 26
| 47
| 22
| 25
| null | null |
ckaestne/CIDE
|
CIDE_Language_Haskell/test/WSP/Webserver/ConfigParser.hs
|
gpl-3.0
|
p_userDir
= do { str <- p_lit_or_string;
return (\ c -> c{userDir = str})}
| 89
|
p_userDir
= do { str <- p_lit_or_string;
return (\ c -> c{userDir = str})}
| 89
|
p_userDir
= do { str <- p_lit_or_string;
return (\ c -> c{userDir = str})}
| 89
| false
| false
| 1
| 12
| 28
| 42
| 21
| 21
| null | null |
rahulmutt/ghcvm
|
compiler/Eta/Prelude/PrelNames.hs
|
bsd-3-clause
|
breakpointAutoName= varQual gHC_BASE (fsLit "breakpointAuto") breakpointAutoIdKey
| 81
|
breakpointAutoName= varQual gHC_BASE (fsLit "breakpointAuto") breakpointAutoIdKey
| 81
|
breakpointAutoName= varQual gHC_BASE (fsLit "breakpointAuto") breakpointAutoIdKey
| 81
| false
| false
| 0
| 7
| 5
| 19
| 9
| 10
| null | null |
tmishima/Hinecraft
|
Hinecraft/Hinecraft.hs
|
apache-2.0
|
runHinecraft :: Handls
-> IO ()
runHinecraft resouce@(glfwHdl,guiRes) = do
home <- getHomeDirectory
!tvHdl <- initTitleModeView home guiRes
!wvHdl <- initWorldView home
!dtHdl <- initData home
!sHdl <- initSunProcess
_ <- getDeltTime glfwHdl
mainLoop (TitleModeState (0::Double) False False False)
plstat (InitModeState 0.0)
TitleMode (dtHdl,tvHdl,wvHdl) sHdl dbgInfo
exitData dtHdl
where
!plstat = PlayModeState
{ usrStat = UserStatus
{ userPos = (0.0,16 * 4 + 1,0.0)
, userRot = (0.0,0.0,0.0)
, palletIndex = 0
, userVel = (0.0,0.0,0.0)
}
, drgdrpMd = Nothing
, drgSta = Nothing
, curPos = Nothing
, pallet = replicate 9 airBlockID
}
dbgInfo = DebugInfo 0 []
showUsrStat ustat = unwords ["pos = ",prtStr x, prtStr y, prtStr z,
"rot = ",prtStr r, prtStr s]
where
prtStr v | abs v < 0.1 = "0.0"
| otherwise = (take 5) $ show v
(x,y,z) = userPos $ usrStat ustat
(r,s,_) = userRot $ usrStat ustat
mainLoop tmstat' plstat' iniMode' runMode (dtHdl,tvHdl,wvHdl)
sHdl dbgInfo' = do
pollGLFW
--threadDelay 10000
threadDelay 5000
dt <- getDeltTime glfwHdl
exitflg' <- getExitReqGLFW glfwHdl
sunDeg <- getSunDeg sHdl
!(ntmstat',niniMode',nplstat',runMode') <- mainProcess
resouce tmstat' iniMode' plstat' dtHdl runMode wvHdl dt
tglWin <- getScreenModeKeyOpe glfwHdl
let !newfps = ((fps dbgInfo') * 9.0 / 10.0) + ((1.0 / dt) / 10)
!dmsg1 = showUsrStat nplstat'
!dmsg2 = unwords [ "sun deg = ", take 5 $ show sunDeg ]
!newDbgInfo = DebugInfo newfps [dmsg1 , dmsg2]
if tglWin
then toggleFullScreenMode glfwHdl
else do
drawView resouce ntmstat' niniMode' nplstat'
runMode' tvHdl wvHdl sunDeg
newDbgInfo
swapBuff glfwHdl
if exitflg' || isQuit ntmstat'
then return ()
else mainLoop ntmstat' nplstat' niniMode' runMode'
(dtHdl,tvHdl,wvHdl) sHdl newDbgInfo
| 2,292
|
runHinecraft :: Handls
-> IO ()
runHinecraft resouce@(glfwHdl,guiRes) = do
home <- getHomeDirectory
!tvHdl <- initTitleModeView home guiRes
!wvHdl <- initWorldView home
!dtHdl <- initData home
!sHdl <- initSunProcess
_ <- getDeltTime glfwHdl
mainLoop (TitleModeState (0::Double) False False False)
plstat (InitModeState 0.0)
TitleMode (dtHdl,tvHdl,wvHdl) sHdl dbgInfo
exitData dtHdl
where
!plstat = PlayModeState
{ usrStat = UserStatus
{ userPos = (0.0,16 * 4 + 1,0.0)
, userRot = (0.0,0.0,0.0)
, palletIndex = 0
, userVel = (0.0,0.0,0.0)
}
, drgdrpMd = Nothing
, drgSta = Nothing
, curPos = Nothing
, pallet = replicate 9 airBlockID
}
dbgInfo = DebugInfo 0 []
showUsrStat ustat = unwords ["pos = ",prtStr x, prtStr y, prtStr z,
"rot = ",prtStr r, prtStr s]
where
prtStr v | abs v < 0.1 = "0.0"
| otherwise = (take 5) $ show v
(x,y,z) = userPos $ usrStat ustat
(r,s,_) = userRot $ usrStat ustat
mainLoop tmstat' plstat' iniMode' runMode (dtHdl,tvHdl,wvHdl)
sHdl dbgInfo' = do
pollGLFW
--threadDelay 10000
threadDelay 5000
dt <- getDeltTime glfwHdl
exitflg' <- getExitReqGLFW glfwHdl
sunDeg <- getSunDeg sHdl
!(ntmstat',niniMode',nplstat',runMode') <- mainProcess
resouce tmstat' iniMode' plstat' dtHdl runMode wvHdl dt
tglWin <- getScreenModeKeyOpe glfwHdl
let !newfps = ((fps dbgInfo') * 9.0 / 10.0) + ((1.0 / dt) / 10)
!dmsg1 = showUsrStat nplstat'
!dmsg2 = unwords [ "sun deg = ", take 5 $ show sunDeg ]
!newDbgInfo = DebugInfo newfps [dmsg1 , dmsg2]
if tglWin
then toggleFullScreenMode glfwHdl
else do
drawView resouce ntmstat' niniMode' nplstat'
runMode' tvHdl wvHdl sunDeg
newDbgInfo
swapBuff glfwHdl
if exitflg' || isQuit ntmstat'
then return ()
else mainLoop ntmstat' nplstat' niniMode' runMode'
(dtHdl,tvHdl,wvHdl) sHdl newDbgInfo
| 2,292
|
runHinecraft resouce@(glfwHdl,guiRes) = do
home <- getHomeDirectory
!tvHdl <- initTitleModeView home guiRes
!wvHdl <- initWorldView home
!dtHdl <- initData home
!sHdl <- initSunProcess
_ <- getDeltTime glfwHdl
mainLoop (TitleModeState (0::Double) False False False)
plstat (InitModeState 0.0)
TitleMode (dtHdl,tvHdl,wvHdl) sHdl dbgInfo
exitData dtHdl
where
!plstat = PlayModeState
{ usrStat = UserStatus
{ userPos = (0.0,16 * 4 + 1,0.0)
, userRot = (0.0,0.0,0.0)
, palletIndex = 0
, userVel = (0.0,0.0,0.0)
}
, drgdrpMd = Nothing
, drgSta = Nothing
, curPos = Nothing
, pallet = replicate 9 airBlockID
}
dbgInfo = DebugInfo 0 []
showUsrStat ustat = unwords ["pos = ",prtStr x, prtStr y, prtStr z,
"rot = ",prtStr r, prtStr s]
where
prtStr v | abs v < 0.1 = "0.0"
| otherwise = (take 5) $ show v
(x,y,z) = userPos $ usrStat ustat
(r,s,_) = userRot $ usrStat ustat
mainLoop tmstat' plstat' iniMode' runMode (dtHdl,tvHdl,wvHdl)
sHdl dbgInfo' = do
pollGLFW
--threadDelay 10000
threadDelay 5000
dt <- getDeltTime glfwHdl
exitflg' <- getExitReqGLFW glfwHdl
sunDeg <- getSunDeg sHdl
!(ntmstat',niniMode',nplstat',runMode') <- mainProcess
resouce tmstat' iniMode' plstat' dtHdl runMode wvHdl dt
tglWin <- getScreenModeKeyOpe glfwHdl
let !newfps = ((fps dbgInfo') * 9.0 / 10.0) + ((1.0 / dt) / 10)
!dmsg1 = showUsrStat nplstat'
!dmsg2 = unwords [ "sun deg = ", take 5 $ show sunDeg ]
!newDbgInfo = DebugInfo newfps [dmsg1 , dmsg2]
if tglWin
then toggleFullScreenMode glfwHdl
else do
drawView resouce ntmstat' niniMode' nplstat'
runMode' tvHdl wvHdl sunDeg
newDbgInfo
swapBuff glfwHdl
if exitflg' || isQuit ntmstat'
then return ()
else mainLoop ntmstat' nplstat' niniMode' runMode'
(dtHdl,tvHdl,wvHdl) sHdl newDbgInfo
| 2,246
| false
| true
| 43
| 16
| 819
| 684
| 346
| 338
| null | null |
rubenmoor/skull
|
skull-server/src/Game/Moves.hs
|
mit
|
playSkull :: Agent -> Agent
playSkull agent = agent & aHand . hHasSkull .~ False
& aStack . stCards %~ (:) (Card Skull FaceDown)
| 152
|
playSkull :: Agent -> Agent
playSkull agent = agent & aHand . hHasSkull .~ False
& aStack . stCards %~ (:) (Card Skull FaceDown)
| 152
|
playSkull agent = agent & aHand . hHasSkull .~ False
& aStack . stCards %~ (:) (Card Skull FaceDown)
| 124
| false
| true
| 0
| 10
| 47
| 55
| 28
| 27
| null | null |
barrucadu/cabal-info
|
cabal-info/Fields.hs
|
mit
|
getSourceRepoField "type" = maybe "" display . repoType
| 59
|
getSourceRepoField "type" = maybe "" display . repoType
| 59
|
getSourceRepoField "type" = maybe "" display . repoType
| 59
| false
| false
| 0
| 6
| 11
| 18
| 8
| 10
| null | null |
fpco/hlint
|
src/HSE/Util.hs
|
bsd-3-clause
|
---------------------------------------------------------------------
-- SRCLOC EQUALITY
-- enforce all being on S, as otherwise easy to =~= on a Just, and get the wrong functor
x /=~= y = not $ x =~= y
| 204
|
x /=~= y = not $ x =~= y
| 24
|
x /=~= y = not $ x =~= y
| 24
| true
| false
| 7
| 5
| 33
| 33
| 16
| 17
| null | null |
ezyang/ghc
|
libraries/base/Data/Either.hs
|
bsd-3-clause
|
fromLeft a _ = a
| 23
|
fromLeft a _ = a
| 23
|
fromLeft a _ = a
| 23
| false
| false
| 0
| 5
| 11
| 11
| 5
| 6
| null | null |
prl-tokyo/bigul-configuration-adaptation
|
Transformations/src/BiFlux/DTD/TypeDef.hs
|
mit
|
ppRepStructGenericProd :: String -> [StructType] -> Doc
ppRepStructGenericProd modname [x] = ppRepStructGeneric modname x
| 124
|
ppRepStructGenericProd :: String -> [StructType] -> Doc
ppRepStructGenericProd modname [x] = ppRepStructGeneric modname x
| 124
|
ppRepStructGenericProd modname [x] = ppRepStructGeneric modname x
| 68
| false
| true
| 0
| 7
| 16
| 35
| 18
| 17
| null | null |
brendanhay/gogol
|
gogol-healthcare/gen/Network/Google/Healthcare/Types/Product.hs
|
mpl-2.0
|
-- | Creates a value of 'ConsentStore' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'csName'
--
-- * 'csLabels'
--
-- * 'csEnableConsentCreateOnUpdate'
--
-- * 'csDefaultConsentTtl'
consentStore
:: ConsentStore
consentStore =
ConsentStore'
{ _csName = Nothing
, _csLabels = Nothing
, _csEnableConsentCreateOnUpdate = Nothing
, _csDefaultConsentTtl = Nothing
}
| 473
|
consentStore
:: ConsentStore
consentStore =
ConsentStore'
{ _csName = Nothing
, _csLabels = Nothing
, _csEnableConsentCreateOnUpdate = Nothing
, _csDefaultConsentTtl = Nothing
}
| 203
|
consentStore =
ConsentStore'
{ _csName = Nothing
, _csLabels = Nothing
, _csEnableConsentCreateOnUpdate = Nothing
, _csDefaultConsentTtl = Nothing
}
| 170
| true
| true
| 0
| 7
| 94
| 58
| 36
| 22
| null | null |
ghcjs/jsaddle-dom
|
src/JSDOM/Generated/HTMLInputElement.hs
|
mit
|
-- | <https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement.width Mozilla HTMLInputElement.width documentation>
setWidth :: (MonadDOM m) => HTMLInputElement -> Word -> m ()
setWidth self val = liftDOM (self ^. jss "width" (toJSVal val))
| 249
|
setWidth :: (MonadDOM m) => HTMLInputElement -> Word -> m ()
setWidth self val = liftDOM (self ^. jss "width" (toJSVal val))
| 124
|
setWidth self val = liftDOM (self ^. jss "width" (toJSVal val))
| 63
| true
| true
| 0
| 10
| 28
| 60
| 30
| 30
| null | null |
plaimi/authochan
|
test/Authochan/Tests/Message.hs
|
agpl-3.0
|
validatedNonce :: Client -> SignedMessage -> Property
validatedNonce c m =
verifyMessage c m === mfilter (> clientNonce c) (Just $ smNonce m)
| 143
|
validatedNonce :: Client -> SignedMessage -> Property
validatedNonce c m =
verifyMessage c m === mfilter (> clientNonce c) (Just $ smNonce m)
| 143
|
validatedNonce c m =
verifyMessage c m === mfilter (> clientNonce c) (Just $ smNonce m)
| 89
| false
| true
| 0
| 9
| 24
| 55
| 27
| 28
| null | null |
AlexanderPankiv/ghc
|
compiler/prelude/THNames.hs
|
bsd-3-clause
|
-- data Safety = ...
unsafeName, safeName, interruptibleName :: Name
unsafeName = libFun (fsLit "unsafe") unsafeIdKey
| 121
|
unsafeName, safeName, interruptibleName :: Name
unsafeName = libFun (fsLit "unsafe") unsafeIdKey
| 100
|
unsafeName = libFun (fsLit "unsafe") unsafeIdKey
| 52
| true
| true
| 4
| 7
| 19
| 39
| 16
| 23
| null | null |
shlevy/ghc
|
compiler/basicTypes/VarEnv.hs
|
bsd-3-clause
|
filterDVarEnv :: (a -> Bool) -> DVarEnv a -> DVarEnv a
filterDVarEnv = filterUDFM
| 86
|
filterDVarEnv :: (a -> Bool) -> DVarEnv a -> DVarEnv a
filterDVarEnv = filterUDFM
| 86
|
filterDVarEnv = filterUDFM
| 26
| false
| true
| 0
| 7
| 18
| 32
| 16
| 16
| null | null |
WojciechKarpiel/cayley-dickson
|
src/Lib.hs
|
bsd-3-clause
|
cdSignum :: (CDOps a) => CDNum a -> CDNum a --todo czy na pewno poprawne matematycznie?
cdSignum a = cdDivide (cdMultiply a a) (cdNormSqr a)
| 140
|
cdSignum :: (CDOps a) => CDNum a -> CDNum a
cdSignum a = cdDivide (cdMultiply a a) (cdNormSqr a)
| 96
|
cdSignum a = cdDivide (cdMultiply a a) (cdNormSqr a)
| 52
| true
| true
| 0
| 7
| 24
| 53
| 26
| 27
| null | null |
JustinUnger/haskell-book
|
ch24/ch24-learn.hs
|
mit
|
two' :: Parser b
two' = two >> stop
| 35
|
two' :: Parser b
two' = two >> stop
| 35
|
two' = two >> stop
| 18
| false
| true
| 2
| 6
| 8
| 25
| 10
| 15
| null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.