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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
kmate/HaRe | old/testing/removeDef/C2_TokOut.hs | bsd-3-clause | anotherFun [] = 0 | 17 | anotherFun [] = 0 | 17 | anotherFun [] = 0 | 17 | false | false | 0 | 6 | 3 | 11 | 5 | 6 | null | null |
codeclimate/popeye | src/Popeye/CLI.hs | mit | run :: IO ()
run = do
opts <- getOptions
lgr <- newLogger (if oDebug opts then Debug else Error) stderr
env <- set envLogger lgr <$> newEnv Discover
runResourceT . runAWS env $ do
users <- (++)
<$> getUsers (oGroups opts)
<*> mapM getUser (oUsers opts)
mapM_ out... | 333 | run :: IO ()
run = do
opts <- getOptions
lgr <- newLogger (if oDebug opts then Debug else Error) stderr
env <- set envLogger lgr <$> newEnv Discover
runResourceT . runAWS env $ do
users <- (++)
<$> getUsers (oGroups opts)
<*> mapM getUser (oUsers opts)
mapM_ out... | 333 | run = do
opts <- getOptions
lgr <- newLogger (if oDebug opts then Debug else Error) stderr
env <- set envLogger lgr <$> newEnv Discover
runResourceT . runAWS env $ do
users <- (++)
<$> getUsers (oGroups opts)
<*> mapM getUser (oUsers opts)
mapM_ outputUser users | 320 | false | true | 0 | 16 | 107 | 133 | 60 | 73 | null | null |
mettekou/ghc | compiler/types/Coercion.hs | bsd-3-clause | ppr_co p (SubCo co) = pprPrefixApp p (text "Sub") [pprParendCo co] | 74 | ppr_co p (SubCo co) = pprPrefixApp p (text "Sub") [pprParendCo co] | 74 | ppr_co p (SubCo co) = pprPrefixApp p (text "Sub") [pprParendCo co] | 74 | false | false | 0 | 7 | 18 | 36 | 17 | 19 | null | null |
fpco/esqueleto | src/Database/Esqueleto/Internal/Sql.hs | bsd-3-clause | to8 :: ((a,b),(c,d),(e,f),(g,h)) -> (a,b,c,d,e,f,g,h)
to8 ((a,b),(c,d),(e,f),(g,h)) = (a,b,c,d,e,f,g,h) | 103 | to8 :: ((a,b),(c,d),(e,f),(g,h)) -> (a,b,c,d,e,f,g,h)
to8 ((a,b),(c,d),(e,f),(g,h)) = (a,b,c,d,e,f,g,h) | 103 | to8 ((a,b),(c,d),(e,f),(g,h)) = (a,b,c,d,e,f,g,h) | 49 | false | true | 0 | 7 | 8 | 142 | 90 | 52 | null | null |
andorp/bead | src/Bead/Persistence/SQL/Assessment.hs | bsd-3-clause | loadAssessment :: Domain.AssessmentKey -> Persist Domain.Assessment
loadAssessment key = do
mAsg <- get (toEntityKey key)
return $!
maybe (persistError "loadAssessment" $ "No assessment is found. " ++ show key)
toDomainValue
mAsg | 252 | loadAssessment :: Domain.AssessmentKey -> Persist Domain.Assessment
loadAssessment key = do
mAsg <- get (toEntityKey key)
return $!
maybe (persistError "loadAssessment" $ "No assessment is found. " ++ show key)
toDomainValue
mAsg | 252 | loadAssessment key = do
mAsg <- get (toEntityKey key)
return $!
maybe (persistError "loadAssessment" $ "No assessment is found. " ++ show key)
toDomainValue
mAsg | 184 | false | true | 0 | 12 | 53 | 72 | 33 | 39 | null | null |
CindyLinz/Haskell.js | trans/src/Desugar/String.hs | mit | deStringName (Symbol l string) = Symbol (id l) (id string) | 58 | deStringName (Symbol l string) = Symbol (id l) (id string) | 58 | deStringName (Symbol l string) = Symbol (id l) (id string) | 58 | false | false | 0 | 7 | 9 | 34 | 16 | 18 | null | null |
bitemyapp/hpp | src/Hpp/Expr.hs | bsd-3-clause | rpnToExpr (s1:s2:ss) (PBinOp o : es) = rpnToExpr (EBinOp o s2 s1 : ss) es | 73 | rpnToExpr (s1:s2:ss) (PBinOp o : es) = rpnToExpr (EBinOp o s2 s1 : ss) es | 73 | rpnToExpr (s1:s2:ss) (PBinOp o : es) = rpnToExpr (EBinOp o s2 s1 : ss) es | 73 | false | false | 0 | 8 | 14 | 51 | 25 | 26 | null | null |
meoblast001/lexical-analyser-generator | src/Main.hs | mit | displayInfo :: FilePath -> IO ()
displayInfo filename = do
fileHandle <- openFile filename ReadMode
contents <- hGetContents fileHandle
either (putStrLn . show) displayRulesInfo (parse contents)
hClose fileHandle | 220 | displayInfo :: FilePath -> IO ()
displayInfo filename = do
fileHandle <- openFile filename ReadMode
contents <- hGetContents fileHandle
either (putStrLn . show) displayRulesInfo (parse contents)
hClose fileHandle | 220 | displayInfo filename = do
fileHandle <- openFile filename ReadMode
contents <- hGetContents fileHandle
either (putStrLn . show) displayRulesInfo (parse contents)
hClose fileHandle | 187 | false | true | 0 | 9 | 35 | 74 | 33 | 41 | null | null |
shlevy/ghc | compiler/cmm/PprC.hs | bsd-3-clause | pprTempDecl :: LocalReg -> SDoc
pprTempDecl l@(LocalReg _ rep)
= hcat [ machRepCType rep, space, pprLocalReg l, semi ] | 120 | pprTempDecl :: LocalReg -> SDoc
pprTempDecl l@(LocalReg _ rep)
= hcat [ machRepCType rep, space, pprLocalReg l, semi ] | 120 | pprTempDecl l@(LocalReg _ rep)
= hcat [ machRepCType rep, space, pprLocalReg l, semi ] | 88 | false | true | 3 | 7 | 20 | 54 | 27 | 27 | null | null |
lukemaurer/sequent-core | src/Language/SequentCore/WiredIn.hs | bsd-3-clause | -- | Form the type of a continuation accepting a value of the given type.
mkKontTy :: Type -> Type
mkKontTy ty = mkTyConApp kontTyCon [typeKind ty, ty] | 151 | mkKontTy :: Type -> Type
mkKontTy ty = mkTyConApp kontTyCon [typeKind ty, ty] | 77 | mkKontTy ty = mkTyConApp kontTyCon [typeKind ty, ty] | 52 | true | true | 0 | 7 | 27 | 33 | 17 | 16 | null | null |
peterokagey/haskellOEIS | src/Sandbox/SymmetricGroup3.hs | apache-2.0 | comp :: Permutation -> Permutation -> Permutation
comp [a,b,c] p = [p !! a, p !! b, p !! c] | 91 | comp :: Permutation -> Permutation -> Permutation
comp [a,b,c] p = [p !! a, p !! b, p !! c] | 91 | comp [a,b,c] p = [p !! a, p !! b, p !! c] | 41 | false | true | 0 | 6 | 19 | 54 | 30 | 24 | null | null |
dysinger/amazonka | amazonka-cloudwatch-logs/gen/Network/AWS/CloudWatchLogs/Types.hs | mpl-2.0 | lsCreationTime :: Lens' LogStream (Maybe Natural)
lsCreationTime = lens _lsCreationTime (\s a -> s { _lsCreationTime = a }) . mapping _Nat | 138 | lsCreationTime :: Lens' LogStream (Maybe Natural)
lsCreationTime = lens _lsCreationTime (\s a -> s { _lsCreationTime = a }) . mapping _Nat | 138 | lsCreationTime = lens _lsCreationTime (\s a -> s { _lsCreationTime = a }) . mapping _Nat | 88 | false | true | 0 | 10 | 21 | 52 | 27 | 25 | null | null |
innovimax/bond | compiler/Bond/Lexer.hs | mit | parens = P.parens lexer | 28 | parens = P.parens lexer | 28 | parens = P.parens lexer | 28 | false | false | 1 | 5 | 8 | 15 | 5 | 10 | null | null |
triplepointfive/hogldev | tutorial24/ShadowMapTechnique.hs | mit | enableShadowMapTechnique :: ShadowMapTechnique -> IO ()
enableShadowMapTechnique ShadowMapTechnique{..} = enableTechnique lProgram | 130 | enableShadowMapTechnique :: ShadowMapTechnique -> IO ()
enableShadowMapTechnique ShadowMapTechnique{..} = enableTechnique lProgram | 130 | enableShadowMapTechnique ShadowMapTechnique{..} = enableTechnique lProgram | 74 | false | true | 0 | 7 | 10 | 32 | 15 | 17 | null | null |
epsilonhalbe/rendezvous | src/Data.hs | mit | yesLbl :: Html
yesLbl = h1 ! A.style "margin: 0px"
$ label ! class_ "label label-success label-lg pull-right"
! A.style "width: 171.4218px;"
$ faIcon "check" | 209 | yesLbl :: Html
yesLbl = h1 ! A.style "margin: 0px"
$ label ! class_ "label label-success label-lg pull-right"
! A.style "width: 171.4218px;"
$ faIcon "check" | 209 | yesLbl = h1 ! A.style "margin: 0px"
$ label ! class_ "label label-success label-lg pull-right"
! A.style "width: 171.4218px;"
$ faIcon "check" | 194 | false | true | 4 | 8 | 76 | 55 | 23 | 32 | null | null |
rgleichman/glance | test/UnitTests.hs | gpl-3.0 | letTests :: Test
letTests = TestList [
TestLabel "letTests1" $ assertEqualSyntaxGraphs [
"y = f 1",
"y = let x = 1 in f x",
"y = let {b = a; a = 1} in f b"
]
,
assertEqualSyntaxGraphs [
"y = 2",
"y = let z = 2 in z",
"y = let {z = 2; z2 = z} in z2"
]
,
assertEqu... | 1,759 | letTests :: Test
letTests = TestList [
TestLabel "letTests1" $ assertEqualSyntaxGraphs [
"y = f 1",
"y = let x = 1 in f x",
"y = let {b = a; a = 1} in f b"
]
,
assertEqualSyntaxGraphs [
"y = 2",
"y = let z = 2 in z",
"y = let {z = 2; z2 = z} in z2"
]
,
assertEqu... | 1,759 | letTests = TestList [
TestLabel "letTests1" $ assertEqualSyntaxGraphs [
"y = f 1",
"y = let x = 1 in f x",
"y = let {b = a; a = 1} in f b"
]
,
assertEqualSyntaxGraphs [
"y = 2",
"y = let z = 2 in z",
"y = let {z = 2; z2 = z} in z2"
]
,
assertEqualSyntaxGraphs [
... | 1,742 | false | true | 0 | 9 | 654 | 160 | 100 | 60 | null | null |
Teaspot-Studio/Urho3D-Haskell | src/Graphics/Urho3D/UI/ListView.hs | mit | listViewGetSelectOnClickEnd :: (Parent ListView a, Pointer ptr a, MonadIO m)
=> ptr -- ^ Pointer to listView or ascentor
-> m Bool
listViewGetSelectOnClickEnd p = liftIO $ do
let ptr = parentPointer p
toBool <$> [C.exp| int {(int)$(ListView* ptr)->GetSelectOnClickEnd()} |]
-- | Return whether hierarchy mode en... | 386 | listViewGetSelectOnClickEnd :: (Parent ListView a, Pointer ptr a, MonadIO m)
=> ptr -- ^ Pointer to listView or ascentor
-> m Bool
listViewGetSelectOnClickEnd p = liftIO $ do
let ptr = parentPointer p
toBool <$> [C.exp| int {(int)$(ListView* ptr)->GetSelectOnClickEnd()} |]
-- | Return whether hierarchy mode en... | 386 | listViewGetSelectOnClickEnd p = liftIO $ do
let ptr = parentPointer p
toBool <$> [C.exp| int {(int)$(ListView* ptr)->GetSelectOnClickEnd()} |]
-- | Return whether hierarchy mode enabled.
-- bool GetHierarchyMode() const { return hierarchyMode_; } | 251 | false | true | 0 | 11 | 63 | 79 | 41 | 38 | null | null |
mgsloan/slogger | Slog.hs | bsd-3-clause | persistData :: MonadIO m => LogData -> m (Maybe LogDataOffset)
persistData (LogData []) = return Nothing | 104 | persistData :: MonadIO m => LogData -> m (Maybe LogDataOffset)
persistData (LogData []) = return Nothing | 104 | persistData (LogData []) = return Nothing | 41 | false | true | 0 | 9 | 15 | 49 | 22 | 27 | null | null |
vikraman/ghc | compiler/deSugar/DsArrows.hs | bsd-3-clause | dsRecCmd
:: DsCmdEnv -- arrow combinators
-> IdSet -- set of local vars available to this statement
-> [CmdLStmt Id] -- list of statements inside the RecCmd
-> [Id] -- list of vars defined here and used later
-> [HsExpr Id] ... | 2,947 | dsRecCmd
:: DsCmdEnv -- arrow combinators
-> IdSet -- set of local vars available to this statement
-> [CmdLStmt Id] -- list of statements inside the RecCmd
-> [Id] -- list of vars defined here and used later
-> [HsExpr Id] ... | 2,907 | dsRecCmd ids local_vars stmts later_ids later_rets rec_ids rec_rets = do
let
later_id_set = mkVarSet later_ids
rec_id_set = mkVarSet rec_ids
local_vars' = rec_id_set `unionVarSet` later_id_set `unionVarSet` local_vars
-- mk_pair_fn = \ (out_ids) -> ((later_rets),(rec_rets))
core_la... | 2,247 | true | true | 0 | 16 | 948 | 503 | 257 | 246 | null | null |
mydaum/cabal | Cabal/Distribution/Verbosity.hs | bsd-3-clause | intToVerbosity :: Int -> Maybe Verbosity
intToVerbosity 0 = Just (mkVerbosity Silent) | 85 | intToVerbosity :: Int -> Maybe Verbosity
intToVerbosity 0 = Just (mkVerbosity Silent) | 85 | intToVerbosity 0 = Just (mkVerbosity Silent) | 44 | false | true | 0 | 7 | 11 | 30 | 14 | 16 | null | null |
ExternalReality/features | src/Ticket/Query.hs | bsd-3-clause | allClients :: Query
allClients = [sql| SELECT * FROM client |] | 62 | allClients :: Query
allClients = [sql| SELECT * FROM client |] | 62 | allClients = [sql| SELECT * FROM client |] | 42 | false | true | 0 | 6 | 10 | 22 | 11 | 11 | null | null |
wouwouwou/2017_module_8 | src/haskell/PP-project-2017/Test.hs | apache-2.0 | gen :: String -> IO ()
gen name = do
a <- readFile $ testConversion name
putStr $
sprILprpr $
codeGen' ((Map.fromList testAll)Map.!(testConversion name)) $
checker $
pTreeToAst $
parse grammar Program $
toTokenList $
tokenizer a | 292 | gen :: String -> IO ()
gen name = do
a <- readFile $ testConversion name
putStr $
sprILprpr $
codeGen' ((Map.fromList testAll)Map.!(testConversion name)) $
checker $
pTreeToAst $
parse grammar Program $
toTokenList $
tokenizer a | 292 | gen name = do
a <- readFile $ testConversion name
putStr $
sprILprpr $
codeGen' ((Map.fromList testAll)Map.!(testConversion name)) $
checker $
pTreeToAst $
parse grammar Program $
toTokenList $
tokenizer a | 269 | false | true | 0 | 18 | 100 | 102 | 48 | 54 | null | null |
dahlia/nirum | src/Nirum/Constructs/Docs.hs | gpl-3.0 | docsAnnotationName :: Identifier
docsAnnotationName = "docs" | 60 | docsAnnotationName :: Identifier
docsAnnotationName = "docs" | 60 | docsAnnotationName = "docs" | 27 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
energyflowanalysis/efa-2.1 | attic/demo/symbolicArith/Main.hs | bsd-3-clause | two :: SimpleTerm
two = Const 2 | 31 | two :: SimpleTerm
two = Const 2 | 31 | two = Const 2 | 13 | false | true | 0 | 6 | 6 | 20 | 8 | 12 | null | null |
kaitanie/irt | src/SedRunner.hs | bsd-3-clause | sedCommandArgs SedCommentAsserts = ["s/^\\s*assert/\\/\\/ assert/g"] | 68 | sedCommandArgs SedCommentAsserts = ["s/^\\s*assert/\\/\\/ assert/g"] | 68 | sedCommandArgs SedCommentAsserts = ["s/^\\s*assert/\\/\\/ assert/g"] | 68 | false | false | 0 | 5 | 4 | 12 | 6 | 6 | null | null |
GaloisInc/galua | galua-dbg/src/Galua/Debugger/View.hs | mit | tag :: String -> JS.Pair
tag x = "tag" .= x | 43 | tag :: String -> JS.Pair
tag x = "tag" .= x | 43 | tag x = "tag" .= x | 18 | false | true | 0 | 6 | 10 | 24 | 12 | 12 | null | null |
alexandersgreen/hoodlums | Arch/Main.hs | apache-2.0 | combine :: [Word8] -> [Word16]
combine [] = [] | 46 | combine :: [Word8] -> [Word16]
combine [] = [] | 46 | combine [] = [] | 15 | false | true | 0 | 6 | 8 | 32 | 16 | 16 | null | null |
gcampax/ghc | compiler/rename/RnTypes.hs | bsd-3-clause | warnUnusedForAlls :: SDoc -> LHsTyVarBndrs RdrName -> [RdrName] -> TcM ()
warnUnusedForAlls in_doc bound mentioned_rdrs
= whenWOptM Opt_WarnUnusedMatches $
mapM_ add_warn bound_but_not_used
where
bound_names = hsLTyVarLocNames bound
bound_but_not_used = filterOut ((`elem` mentioned_rdrs) . unLoc)... | 487 | warnUnusedForAlls :: SDoc -> LHsTyVarBndrs RdrName -> [RdrName] -> TcM ()
warnUnusedForAlls in_doc bound mentioned_rdrs
= whenWOptM Opt_WarnUnusedMatches $
mapM_ add_warn bound_but_not_used
where
bound_names = hsLTyVarLocNames bound
bound_but_not_used = filterOut ((`elem` mentioned_rdrs) . unLoc)... | 487 | warnUnusedForAlls in_doc bound mentioned_rdrs
= whenWOptM Opt_WarnUnusedMatches $
mapM_ add_warn bound_but_not_used
where
bound_names = hsLTyVarLocNames bound
bound_but_not_used = filterOut ((`elem` mentioned_rdrs) . unLoc) bound_names
add_warn (L loc tv)
= addWarnAt loc $
vcat... | 413 | false | true | 2 | 11 | 112 | 140 | 70 | 70 | null | null |
cgroza/HsRegex | HsRegex.hs | gpl-3.0 | -- appends to current collection of matches.
addPos :: Int -> Regex ()
addPos p = modify $ \(RegexS f g t (ps:psCol)) -> RegexS f g t ((p:ps):psCol) | 148 | addPos :: Int -> Regex ()
addPos p = modify $ \(RegexS f g t (ps:psCol)) -> RegexS f g t ((p:ps):psCol) | 103 | addPos p = modify $ \(RegexS f g t (ps:psCol)) -> RegexS f g t ((p:ps):psCol) | 77 | true | true | 2 | 10 | 28 | 80 | 40 | 40 | null | null |
nevrenato/Hets_Fork | CASL/Morphism.hs | gpl-2.0 | statSymbMapItems :: Sign f e -> Maybe (Sign f e) -> [SYMB_MAP_ITEMS]
-> Result RawSymbolMap
statSymbMapItems sig msig sl = do
let st (Symb_map_items kind l _) = do
appendDiags $ checkSymbList l
fmap concat $ mapM (symbOrMapToRaw sig msig kind) l
getSort rsy = case rsy of
ASymbol (Symbo... | 690 | statSymbMapItems :: Sign f e -> Maybe (Sign f e) -> [SYMB_MAP_ITEMS]
-> Result RawSymbolMap
statSymbMapItems sig msig sl = do
let st (Symb_map_items kind l _) = do
appendDiags $ checkSymbList l
fmap concat $ mapM (symbOrMapToRaw sig msig kind) l
getSort rsy = case rsy of
ASymbol (Symbo... | 690 | statSymbMapItems sig msig sl = do
let st (Symb_map_items kind l _) = do
appendDiags $ checkSymbList l
fmap concat $ mapM (symbOrMapToRaw sig msig kind) l
getSort rsy = case rsy of
ASymbol (Symbol i SortAsItemType) -> Just i
_ -> Nothing
getImplicit rsy = case rsy of
... | 596 | false | true | 0 | 15 | 199 | 249 | 115 | 134 | null | null |
mavenraven/github | samples/Issues/CreateIssue.hs | bsd-3-clause | main = do
let auth = Github.GithubBasicAuth "user" "password"
newiss = (Github.newIssue "A new issue") {
Github.newIssueBody = Just "Issue description text goes here"
}
possibleIssue <- Github.createIssue auth "thoughtbot" "paperclip" newiss
putStrLn $ either (\e -> "Error: " ++ show e)
... | 381 | main = do
let auth = Github.GithubBasicAuth "user" "password"
newiss = (Github.newIssue "A new issue") {
Github.newIssueBody = Just "Issue description text goes here"
}
possibleIssue <- Github.createIssue auth "thoughtbot" "paperclip" newiss
putStrLn $ either (\e -> "Error: " ++ show e)
... | 381 | main = do
let auth = Github.GithubBasicAuth "user" "password"
newiss = (Github.newIssue "A new issue") {
Github.newIssueBody = Just "Issue description text goes here"
}
possibleIssue <- Github.createIssue auth "thoughtbot" "paperclip" newiss
putStrLn $ either (\e -> "Error: " ++ show e)
... | 381 | false | false | 0 | 13 | 111 | 95 | 46 | 49 | null | null |
josuf107/Adverb | Adverb/Common.hs | gpl-3.0 | cherishedly = id | 16 | cherishedly = id | 16 | cherishedly = id | 16 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
noughtmare/yi | yi-keymap-vim/src/Yi/Keymap/Vim/Digraph.hs | gpl-2.0 | -- KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK
switch '*' '5' = '\x309D' | 69 | switch '*' '5' = '\x309D' | 25 | switch '*' '5' = '\x309D' | 25 | true | false | 0 | 5 | 9 | 12 | 6 | 6 | null | null |
snoyberg/ghc | compiler/cmm/CmmType.hs | bsd-3-clause | vec8b16 = vec 8 b16 | 19 | vec8b16 = vec 8 b16 | 19 | vec8b16 = vec 8 b16 | 19 | false | false | 0 | 5 | 4 | 11 | 5 | 6 | null | null |
Lythimus/lptv | sites/all/modules/jgm-pandoc-8be6cc2/src/Text/Pandoc/Writers/MediaWiki.hs | gpl-2.0 | -- | Convert Pandoc to MediaWiki.
writeMediaWiki :: WriterOptions -> Pandoc -> String
writeMediaWiki opts document =
evalState (pandocToMediaWiki opts document)
(WriterState { stNotes = False, stListLevel = [], stUseTags = False }) | 247 | writeMediaWiki :: WriterOptions -> Pandoc -> String
writeMediaWiki opts document =
evalState (pandocToMediaWiki opts document)
(WriterState { stNotes = False, stListLevel = [], stUseTags = False }) | 213 | writeMediaWiki opts document =
evalState (pandocToMediaWiki opts document)
(WriterState { stNotes = False, stListLevel = [], stUseTags = False }) | 161 | true | true | 0 | 9 | 48 | 63 | 35 | 28 | null | null |
christiaanb/SoOSiM | examples/Twente/CodeDeployer.hs | mit | componentBehaviourWithIds :: DeployerState -> ComponentInput -> CodeDeployerDeps -> SimM DeployerState
componentBehaviourWithIds state (ComponentMsg caller contents) deps
| Just (DeployBlock name code node) <- deployerAction
= do rsp <- invoke Nothing deps (toDyn (Compile code (nodeArch node)))
invoke Nothin... | 437 | componentBehaviourWithIds :: DeployerState -> ComponentInput -> CodeDeployerDeps -> SimM DeployerState
componentBehaviourWithIds state (ComponentMsg caller contents) deps
| Just (DeployBlock name code node) <- deployerAction
= do rsp <- invoke Nothing deps (toDyn (Compile code (nodeArch node)))
invoke Nothin... | 437 | componentBehaviourWithIds state (ComponentMsg caller contents) deps
| Just (DeployBlock name code node) <- deployerAction
= do rsp <- invoke Nothing deps (toDyn (Compile code (nodeArch node)))
invoke Nothing caller (toDyn name)
return state
| otherwise
= return state
where deployerAction = fromDy... | 334 | false | true | 0 | 16 | 75 | 146 | 66 | 80 | null | null |
rueshyna/gogol | gogol-android-publisher/gen/Network/Google/AndroidPublisher/Types/Product.hs | mpl-2.0 | -- | Device CPU model e.g. \"MSM8974\"
dmCPUModel :: Lens' DeviceMetadata (Maybe Text)
dmCPUModel
= lens _dmCPUModel (\ s a -> s{_dmCPUModel = a}) | 148 | dmCPUModel :: Lens' DeviceMetadata (Maybe Text)
dmCPUModel
= lens _dmCPUModel (\ s a -> s{_dmCPUModel = a}) | 109 | dmCPUModel
= lens _dmCPUModel (\ s a -> s{_dmCPUModel = a}) | 61 | true | true | 0 | 9 | 25 | 48 | 25 | 23 | null | null |
phischu/fragnix | tests/packages/scotty/Data.Vector.Generic.hs | bsd-3-clause | minimum = Bundle.foldl1' min . stream | 37 | minimum = Bundle.foldl1' min . stream | 37 | minimum = Bundle.foldl1' min . stream | 37 | false | false | 0 | 7 | 5 | 15 | 7 | 8 | null | null |
divipp/lensref | src/LensRef/Demo/SevenGUIs.hs | bsd-3-clause | grey = 37 | 12 | grey = 37 | 12 | grey = 37 | 12 | false | false | 1 | 5 | 5 | 10 | 3 | 7 | null | null |
leshchevds/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | opPrioDefault :: Int
opPrioDefault = opPrioNormal | 49 | opPrioDefault :: Int
opPrioDefault = opPrioNormal | 49 | opPrioDefault = opPrioNormal | 28 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
trskop/yx | src/YX/Paths.hs | bsd-3-clause | yxShellStuff :: FilePath -> EnvironmentName -> Shell -> FilePath
yxShellStuff root = (yxStuffPath (Just root) .) . ShellStuff | 125 | yxShellStuff :: FilePath -> EnvironmentName -> Shell -> FilePath
yxShellStuff root = (yxStuffPath (Just root) .) . ShellStuff | 125 | yxShellStuff root = (yxStuffPath (Just root) .) . ShellStuff | 60 | false | true | 0 | 9 | 17 | 43 | 22 | 21 | null | null |
FranklinChen/Haskell-Pipes-Library | src/Pipes/Prelude.hs | bsd-3-clause | {- $pipes
Use ('>->') to connect 'Producer's, 'Pipe's, and 'Consumer's:
>>> runEffect $ P.stdinLn >-> P.takeWhile (/= "quit") >-> P.stdoutLn
Test<Enter>
Test
ABC<Enter>
ABC
quit<Enter>
>>>
-}
{-| Apply a function to all values flowing downstream
> map id = cat
>
> map (g . f) = map f >-> map g
-}
map :: Monad m... | 384 | map :: Monad m => (a -> b) -> Pipe a b m r
map f = for cat (\a -> yield (f a)) | 78 | map f = for cat (\a -> yield (f a)) | 35 | true | true | 0 | 10 | 85 | 71 | 34 | 37 | null | null |
marcelosousa/poet | src/Util/Generic.hs | gpl-2.0 | safeLookup :: (Eq k, H.HashTable h, Hashable k) => String -> h s k b -> k -> ST s b
safeLookup err ht k = do
mv <- H.lookup ht k
case mv of
Nothing -> error $ "safeLookup: " ++ err
Just v -> return v | 213 | safeLookup :: (Eq k, H.HashTable h, Hashable k) => String -> h s k b -> k -> ST s b
safeLookup err ht k = do
mv <- H.lookup ht k
case mv of
Nothing -> error $ "safeLookup: " ++ err
Just v -> return v | 213 | safeLookup err ht k = do
mv <- H.lookup ht k
case mv of
Nothing -> error $ "safeLookup: " ++ err
Just v -> return v | 129 | false | true | 0 | 11 | 61 | 112 | 53 | 59 | null | null |
endJunction/settleDyn | src/Config.hs | gpl-3.0 | exportEveryStep = _exportEveryStep $ unsafePerformIO getOptions | 63 | exportEveryStep = _exportEveryStep $ unsafePerformIO getOptions | 63 | exportEveryStep = _exportEveryStep $ unsafePerformIO getOptions | 63 | false | false | 3 | 5 | 5 | 17 | 6 | 11 | null | null |
rueshyna/gogol | gogol-mirror/gen/Network/Google/Mirror/Types/Product.hs | mpl-2.0 | -- | Creates a value of 'UserAction' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'uaPayload'
--
-- * 'uaType'
userAction
:: UserAction
userAction =
UserAction'
{ _uaPayload = Nothing
, _uaType = Nothing
} | 313 | userAction
:: UserAction
userAction =
UserAction'
{ _uaPayload = Nothing
, _uaType = Nothing
} | 114 | userAction =
UserAction'
{ _uaPayload = Nothing
, _uaType = Nothing
} | 85 | true | true | 0 | 6 | 72 | 32 | 22 | 10 | null | null |
sdiehl/ghc | compiler/GHC/Cmm/ContFlowOpt.hs | bsd-3-clause | -- Note [What is shortcutting]
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
-- Consider this Cmm code:
--
-- L1: ...
-- goto L2;
-- L2: goto L3;
-- L3: ...
--
-- Here L2 is an empty block and contains only an unconditional branch
-- to L3. In this situation any block that jumps to L2 can jump
-- directly to L3:
--
-- L1: ...
... | 3,708 | cmmCfgOpts :: Bool -> CmmGraph -> CmmGraph
cmmCfgOpts split g = fst (blockConcat split g) | 89 | cmmCfgOpts split g = fst (blockConcat split g) | 46 | true | true | 0 | 8 | 796 | 144 | 122 | 22 | null | null |
kim/amazonka | amazonka-redshift/gen/Network/AWS/Redshift/Types.hs | mpl-2.0 | ns :: Text
ns = "http://redshift.amazonaws.com/doc/2012-12-01/" | 63 | ns :: Text
ns = "http://redshift.amazonaws.com/doc/2012-12-01/" | 63 | ns = "http://redshift.amazonaws.com/doc/2012-12-01/" | 52 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
frerich/pandoc | src/Text/Pandoc/Writers/LaTeX.hs | gpl-2.0 | toBabel ("de":"AT":_) = "naustrian" | 42 | toBabel ("de":"AT":_) = "naustrian" | 42 | toBabel ("de":"AT":_) = "naustrian" | 42 | false | false | 0 | 8 | 10 | 20 | 10 | 10 | null | null |
Spawek/HCPParse | src/Tokenizer.hs | mit | -- <|> universal_character_name -- NOTE: not supported
s_char_char :: Stream s m Char => ParsecT s u m String
s_char_char = do
x <- noneOf ("\"\\\n")
return [x] | 169 | s_char_char :: Stream s m Char => ParsecT s u m String
s_char_char = do
x <- noneOf ("\"\\\n")
return [x] | 113 | s_char_char = do
x <- noneOf ("\"\\\n")
return [x] | 58 | true | true | 0 | 9 | 36 | 54 | 26 | 28 | null | null |
keera-studios/hsQt | Qtc/Gui/QStandardItem.hs | bsd-2-clause | setAccessibleDescription :: QStandardItem a -> ((String)) -> IO ()
setAccessibleDescription x0 (x1)
= withObjectPtr x0 $ \cobj_x0 ->
withCWString x1 $ \cstr_x1 ->
qtc_QStandardItem_setAccessibleDescription cobj_x0 cstr_x1 | 231 | setAccessibleDescription :: QStandardItem a -> ((String)) -> IO ()
setAccessibleDescription x0 (x1)
= withObjectPtr x0 $ \cobj_x0 ->
withCWString x1 $ \cstr_x1 ->
qtc_QStandardItem_setAccessibleDescription cobj_x0 cstr_x1 | 231 | setAccessibleDescription x0 (x1)
= withObjectPtr x0 $ \cobj_x0 ->
withCWString x1 $ \cstr_x1 ->
qtc_QStandardItem_setAccessibleDescription cobj_x0 cstr_x1 | 164 | false | true | 4 | 8 | 35 | 72 | 35 | 37 | null | null |
headprogrammingczar/cabal | cabal-install/Distribution/Client/Setup.hs | bsd-3-clause | defaultGetFlags :: GetFlags
defaultGetFlags = GetFlags {
getDestDir = mempty,
getPristine = mempty,
getSourceRepository = mempty,
getVerbosity = toFlag normal
} | 203 | defaultGetFlags :: GetFlags
defaultGetFlags = GetFlags {
getDestDir = mempty,
getPristine = mempty,
getSourceRepository = mempty,
getVerbosity = toFlag normal
} | 203 | defaultGetFlags = GetFlags {
getDestDir = mempty,
getPristine = mempty,
getSourceRepository = mempty,
getVerbosity = toFlag normal
} | 175 | false | true | 0 | 7 | 63 | 40 | 24 | 16 | null | null |
dzotokan/SourceGraph | Parsing/ParseModule.hs | gpl-3.0 | getFUpdates :: [FieldUpdate] -> PState Called
getFUpdates = liftM MS.unions . mapM getFUpdate | 93 | getFUpdates :: [FieldUpdate] -> PState Called
getFUpdates = liftM MS.unions . mapM getFUpdate | 93 | getFUpdates = liftM MS.unions . mapM getFUpdate | 47 | false | true | 1 | 7 | 12 | 39 | 17 | 22 | null | null |
CDSoft/pp | src/UTF8.hs | gpl-3.0 | hWriteFileUTF8 :: Handle -> String -> IO ()
hWriteFileUTF8 handle content = do
hSetEncoding handle utf8
hPutStr handle content
-- "runrocessUTF8 cmd arg" executes "cmd args" | 182 | hWriteFileUTF8 :: Handle -> String -> IO ()
hWriteFileUTF8 handle content = do
hSetEncoding handle utf8
hPutStr handle content
-- "runrocessUTF8 cmd arg" executes "cmd args" | 182 | hWriteFileUTF8 handle content = do
hSetEncoding handle utf8
hPutStr handle content
-- "runrocessUTF8 cmd arg" executes "cmd args" | 138 | false | true | 0 | 8 | 34 | 46 | 21 | 25 | null | null |
michalkonecny/polypaver | src/Numeric/ER/RnToRm/UnitDom/ChebyshevBase/Polynom/ElementaryInner.hs | bsd-3-clause | {-|
-}
ienclSqrt ::
(B.ERRealBase b,
DomainBox box varid Int, Ord box, Show varid,
DomainIntBox boxra varid (ERInterval b),
DomainBoxMappable boxra boxras varid (ERInterval b) [ERInterval b]) =>
Int {-^ maximum polynomial degree -} ->
Int {-^ maximum term count -} ->
EffortIndex ... | 818 | ienclSqrt ::
(B.ERRealBase b,
DomainBox box varid Int, Ord box, Show varid,
DomainIntBox boxra varid (ERInterval b),
DomainBoxMappable boxra boxras varid (ERInterval b) [ERInterval b]) =>
Int {-^ maximum polynomial degree -} ->
Int {-^ maximum term count -} ->
EffortIndex {-^ for call... | 806 | ienclSqrt maxDegree maxSize ix maxIters (e@(ln, h), isDAC) =
((lnRDown,hRDown), isDAC)
where
lnRDown = chplNeg lRUp
hRDown = chplNeg hnRUp
(_, lRUp) = enclSqrt maxDegree maxSize ix maxIters (ln,chplNeg ln)
(hnRUp, _) = enclSqrt maxDegree maxSize ix maxIters (chplNeg h,h)
{-|
-} | 309 | true | true | 0 | 13 | 202 | 277 | 150 | 127 | null | null |
kenta2/retrograde | Chess.hs | agpl-3.0 | dir_bn :: Directory;
dir_bn = listArray (Piecenum 0, Piecenum 3) [king White, king Black
, bishop White
, knight White
] | 120 | dir_bn :: Directory
dir_bn = listArray (Piecenum 0, Piecenum 3) [king White, king Black
, bishop White
, knight White
] | 119 | dir_bn = listArray (Piecenum 0, Piecenum 3) [king White, king Black
, bishop White
, knight White
] | 99 | false | true | 3 | 7 | 20 | 62 | 27 | 35 | null | null |
flipstone/orville | orville-postgresql/src/Database/Orville/PostgreSQL/Internal/QueryCache.hs | mit | findRecordsCached ::
(MonadThrow m, MonadOrville conn m, Ord key)
=> TableDefinition readEntity writeEntity key
-> [key]
-> QueryCached m (Map.Map key readEntity)
findRecordsCached tableDef keys = do
let
primKey = tablePrimaryKey tableDef
mkEntry record = (tableGetKey tableDef record, record)
re... | 437 | findRecordsCached ::
(MonadThrow m, MonadOrville conn m, Ord key)
=> TableDefinition readEntity writeEntity key
-> [key]
-> QueryCached m (Map.Map key readEntity)
findRecordsCached tableDef keys = do
let
primKey = tablePrimaryKey tableDef
mkEntry record = (tableGetKey tableDef record, record)
re... | 437 | findRecordsCached tableDef keys = do
let
primKey = tablePrimaryKey tableDef
mkEntry record = (tableGetKey tableDef record, record)
recordList <- selectCached tableDef (where_ $ primaryKeyIn primKey keys)
pure $ Map.fromList (map mkEntry recordList) | 263 | false | true | 0 | 12 | 79 | 148 | 71 | 77 | null | null |
SFML-haskell/SFML | src/SFML/Audio/Sound.hs | mit | -- CSFML_AUDIO_API sfSound* sfSound_create(void);
-- | Create a new sound by copying an existing one.
copySound :: Sound -> IO Sound
copySound = sfSound_copy | 159 | copySound :: Sound -> IO Sound
copySound = sfSound_copy | 55 | copySound = sfSound_copy | 24 | true | true | 0 | 7 | 25 | 26 | 12 | 14 | null | null |
wjt/bustle | Bustle/Loader/Pcap.hs | lgpl-2.1 | bustlifyNOC :: (BusName, Maybe BusName, Maybe BusName)
-> B.NOC
bustlifyNOC ns@(name, oldOwner, newOwner)
| isUnique name =
case (oldOwner, newOwner) of
(Nothing, Just _) -> B.Connected (uniquify name)
(Just _, Nothing) -> B.Disconnected (uniquify name)
... | 796 | bustlifyNOC :: (BusName, Maybe BusName, Maybe BusName)
-> B.NOC
bustlifyNOC ns@(name, oldOwner, newOwner)
| isUnique name =
case (oldOwner, newOwner) of
(Nothing, Just _) -> B.Connected (uniquify name)
(Just _, Nothing) -> B.Disconnected (uniquify name)
... | 796 | bustlifyNOC ns@(name, oldOwner, newOwner)
| isUnique name =
case (oldOwner, newOwner) of
(Nothing, Just _) -> B.Connected (uniquify name)
(Just _, Nothing) -> B.Disconnected (uniquify name)
_ -> error $ "wtf: NOC" ++ show ns
| otherwise = B.Nam... | 720 | false | true | 1 | 12 | 263 | 300 | 151 | 149 | null | null |
nevrenato/Hets_Fork | CASL/AS_Basic_CASL.hs | gpl-2.0 | conjunct :: [FORMULA f] -> FORMULA f
conjunct fs = conjunctRange fs nullRange | 77 | conjunct :: [FORMULA f] -> FORMULA f
conjunct fs = conjunctRange fs nullRange | 77 | conjunct fs = conjunctRange fs nullRange | 40 | false | true | 0 | 7 | 12 | 32 | 15 | 17 | null | null |
nuttycom/haskoin | Network/Haskoin/Script/Parser.hs | unlicense | -- | Returns True if the input script is spending a public key hash.
isSpendPKHash :: ScriptInput -> Bool
isSpendPKHash (RegularInput (SpendPKHash _ _)) = True | 159 | isSpendPKHash :: ScriptInput -> Bool
isSpendPKHash (RegularInput (SpendPKHash _ _)) = True | 90 | isSpendPKHash (RegularInput (SpendPKHash _ _)) = True | 53 | true | true | 0 | 11 | 25 | 39 | 18 | 21 | null | null |
spechub/Hets | Isabelle/IsaParse.hs | gpl-2.0 | nameref :: Parser String -- sort
nameref = longident <|> symident <|> isaString <|> nat | 87 | nameref :: Parser String
nameref = longident <|> symident <|> isaString <|> nat | 79 | nameref = longident <|> symident <|> isaString <|> nat | 54 | true | true | 0 | 7 | 14 | 27 | 14 | 13 | null | null |
bobatkey/Forvie | src/Data/FiniteStateMachine/RegexpDerivatives.hs | bsd-3-clause | nZero :: Regexp alphabet
nZero = NAlt S.empty | 45 | nZero :: Regexp alphabet
nZero = NAlt S.empty | 45 | nZero = NAlt S.empty | 20 | false | true | 0 | 6 | 7 | 25 | 10 | 15 | null | null |
creichert/wai | warp/Network/Wai/Handler/Warp/Recv.hs | mit | makePlainReceiveN :: Socket -> ByteString -> IO (BufSize -> IO ByteString)
makePlainReceiveN s bs0 = do
ref <- newIORef bs0
pool <- newBufferPool
return $ receiveN ref (receive s pool) (receiveBuf s) | 211 | makePlainReceiveN :: Socket -> ByteString -> IO (BufSize -> IO ByteString)
makePlainReceiveN s bs0 = do
ref <- newIORef bs0
pool <- newBufferPool
return $ receiveN ref (receive s pool) (receiveBuf s) | 211 | makePlainReceiveN s bs0 = do
ref <- newIORef bs0
pool <- newBufferPool
return $ receiveN ref (receive s pool) (receiveBuf s) | 136 | false | true | 0 | 11 | 43 | 87 | 39 | 48 | null | null |
ryantm/ghc | compiler/cmm/CmmMachOp.hs | bsd-3-clause | maybeInvertComparison :: MachOp -> Maybe MachOp
maybeInvertComparison op
= case op of -- None of these Just cases include floating point
MO_Eq r -> Just (MO_Ne r)
MO_Ne r -> Just (MO_Eq r)
MO_U_Lt r -> Just (MO_U_Ge r)
MO_U_Gt r -> Just (MO_U_Le r)
MO_U_Le r -> Just (MO_U_... | 701 | maybeInvertComparison :: MachOp -> Maybe MachOp
maybeInvertComparison op
= case op of -- None of these Just cases include floating point
MO_Eq r -> Just (MO_Ne r)
MO_Ne r -> Just (MO_Eq r)
MO_U_Lt r -> Just (MO_U_Ge r)
MO_U_Gt r -> Just (MO_U_Le r)
MO_U_Le r -> Just (MO_U_... | 701 | maybeInvertComparison op
= case op of -- None of these Just cases include floating point
MO_Eq r -> Just (MO_Ne r)
MO_Ne r -> Just (MO_Eq r)
MO_U_Lt r -> Just (MO_U_Ge r)
MO_U_Gt r -> Just (MO_U_Le r)
MO_U_Le r -> Just (MO_U_Gt r)
MO_U_Ge r -> Just (MO_U_Lt r)
... | 653 | false | true | 0 | 10 | 199 | 215 | 99 | 116 | null | null |
hy-zhang/parser | Haskell/src/FullRef.hs | bsd-3-clause | parseTmAssign :: NewParser TmAssign fs
parseTmAssign e p = chainlR (keyword ":=" >> p) TmAssign e p | 99 | parseTmAssign :: NewParser TmAssign fs
parseTmAssign e p = chainlR (keyword ":=" >> p) TmAssign e p | 99 | parseTmAssign e p = chainlR (keyword ":=" >> p) TmAssign e p | 60 | false | true | 0 | 8 | 16 | 40 | 19 | 21 | null | null |
energyflowanalysis/efa-2.1 | examples/advanced/energy/src/Modules/Output/Plot.hs | bsd-3-clause | dotPNG :: String -> Int -> FilePath -> DotGraph Text -> IO ()
dotPNG = dot Draw.png "png" | 89 | dotPNG :: String -> Int -> FilePath -> DotGraph Text -> IO ()
dotPNG = dot Draw.png "png" | 89 | dotPNG = dot Draw.png "png" | 27 | false | true | 0 | 10 | 17 | 42 | 20 | 22 | null | null |
mpickering/ghc-exactprint | src/Language/Haskell/GHC/ExactPrint/Utils.hs | bsd-3-clause | -- | "Subtract" two @DeltaPos@ from each other, in the sense of calculating the
-- remaining delta for the second after the first has been applied.
-- invariant : if c = a `addDP` b
-- then a `stepDP` c == b
--
-- Cases where first DP is <= than second
-- > DP (0, 1) `addDP` DP (0, 2) == DP (0, 1)
-- > DP (... | 1,182 | stepDP :: DeltaPos -> DeltaPos -> DeltaPos
stepDP (DP (a,b)) (DP (c,d))
| (a,b) == (c,d) = DP (a,b)
| a == c = if b < d then DP (0,d - b)
else if d == 0
then DP (1,0)
-- else DP (0,1)
else DP (c,d)
| a < c... | 360 | stepDP (DP (a,b)) (DP (c,d))
| (a,b) == (c,d) = DP (a,b)
| a == c = if b < d then DP (0,d - b)
else if d == 0
then DP (1,0)
-- else DP (0,1)
else DP (c,d)
| a < c = DP (c - a,d)
| otherwise = DP (1,d) | 317 | true | true | 1 | 11 | 388 | 215 | 122 | 93 | null | null |
alasconnect/auth0 | src/Auth0/Authentication/WS.hs | apache-2.0 | wsMetaDataApi ::
Text
-> ClientM Text
type WSAllApi
= "wsfed"
:> ( WSApi
:<|> WSMetaDataApi
) | 118 | wsMetaDataApi ::
Text
-> ClientM Text
type WSAllApi
= "wsfed"
:> ( WSApi
:<|> WSMetaDataApi
) | 118 | wsMetaDataApi ::
Text
-> ClientM Text
type WSAllApi
= "wsfed"
:> ( WSApi
:<|> WSMetaDataApi
) | 118 | false | false | 2 | 7 | 40 | 34 | 16 | 18 | null | null |
apyrgio/snf-ganeti | test/hs/Test/Ganeti/Utils.hs | bsd-2-clause | -- | Tests that 'niceSort' and 'niceSortKey' are equivalent.
prop_niceSortKey_equiv :: Property
prop_niceSortKey_equiv =
forAll (resize 20 arbitrary) $ \names ->
forAll (vectorOf (length names) (arbitrary::Gen Int)) $ \numbers ->
let n_sorted = niceSort names in
conjoin
[ printTestCase "key id" $ n_sorted ==?... | 619 | prop_niceSortKey_equiv :: Property
prop_niceSortKey_equiv =
forAll (resize 20 arbitrary) $ \names ->
forAll (vectorOf (length names) (arbitrary::Gen Int)) $ \numbers ->
let n_sorted = niceSort names in
conjoin
[ printTestCase "key id" $ n_sorted ==? niceSortKey id names
, printTestCase "key rev" $ niceSort ... | 558 | prop_niceSortKey_equiv =
forAll (resize 20 arbitrary) $ \names ->
forAll (vectorOf (length names) (arbitrary::Gen Int)) $ \numbers ->
let n_sorted = niceSort names in
conjoin
[ printTestCase "key id" $ n_sorted ==? niceSortKey id names
, printTestCase "key rev" $ niceSort (map reverse names) ==?
... | 523 | true | true | 0 | 13 | 175 | 175 | 85 | 90 | null | null |
sdiehl/ghc | compiler/basicTypes/Name.hs | bsd-3-clause | nameModule_maybe _ = Nothing | 61 | nameModule_maybe _ = Nothing | 61 | nameModule_maybe _ = Nothing | 61 | false | false | 0 | 4 | 36 | 10 | 4 | 6 | null | null |
kumasento/accelerate | Data/Array/Accelerate/AST.hs | bsd-3-clause | prjElt _ _ = $internalError "prjElt" "inconsistent valuation" | 87 | prjElt _ _ = $internalError "prjElt" "inconsistent valuation" | 87 | prjElt _ _ = $internalError "prjElt" "inconsistent valuation" | 87 | false | false | 0 | 6 | 33 | 17 | 7 | 10 | null | null |
brodyberg/Notes | ProjectRosalind.hsproj/LearnHaskell/lib/HaskellBook/MoreBottomChapter9.hs | mit | -- More Bottom Question 6
-- From Chapter7Exercises.hs
-- foldBool' :: (Ord a) => a -> a -> Bool -> a
-- foldBool' x y b
-- | b = x
-- | otherwise = y
reverser' :: [Integer] -> [Integer]
reverser' = map (\x -> bool x (-x) (x == 3)) | 238 | reverser' :: [Integer] -> [Integer]
reverser' = map (\x -> bool x (-x) (x == 3)) | 80 | reverser' = map (\x -> bool x (-x) (x == 3)) | 44 | true | true | 0 | 10 | 58 | 57 | 34 | 23 | null | null |
coolhacks/scripts-hacks | examples/shellcheck-master/ShellCheck/Parser.hs | mit | prop_readSingleQuoted4 = isWarning readNormalWord "'it's" | 57 | prop_readSingleQuoted4 = isWarning readNormalWord "'it's" | 57 | prop_readSingleQuoted4 = isWarning readNormalWord "'it's" | 57 | false | false | 0 | 5 | 4 | 11 | 5 | 6 | null | null |
tamarin-prover/tamarin-prover | lib/theory/src/Theory/Constraint/Solver/Heuristics.hs | gpl-3.0 | charToGoalRankingDiff :: Char -> GoalRanking
charToGoalRankingDiff c = fromMaybe
(error $ render $ sep $ map text $ lines $ "Unknown goal ranking '" ++ [c]
++ "'. Use one of the following:\n" ++ listGoalRankingsDiff)
$ charToGoalRankingDiffMay c | 261 | charToGoalRankingDiff :: Char -> GoalRanking
charToGoalRankingDiff c = fromMaybe
(error $ render $ sep $ map text $ lines $ "Unknown goal ranking '" ++ [c]
++ "'. Use one of the following:\n" ++ listGoalRankingsDiff)
$ charToGoalRankingDiffMay c | 261 | charToGoalRankingDiff c = fromMaybe
(error $ render $ sep $ map text $ lines $ "Unknown goal ranking '" ++ [c]
++ "'. Use one of the following:\n" ++ listGoalRankingsDiff)
$ charToGoalRankingDiffMay c | 216 | false | true | 0 | 15 | 53 | 69 | 34 | 35 | null | null |
kojiromike/Idris-dev | src/Idris/AbsSyntaxTree.hs | bsd-3-clause | -- | Transform the FCs in a PTerm. The first function transforms the
-- general-purpose FCs, and the second transforms those that are used
-- for semantic source highlighting, so they can be treated specially.
mapPDeclFC :: (FC -> FC) -> (FC -> FC) -> PDecl -> PDecl
mapPDeclFC f g (PFix fc fixity ops) =
PFix (f fc)... | 331 | mapPDeclFC :: (FC -> FC) -> (FC -> FC) -> PDecl -> PDecl
mapPDeclFC f g (PFix fc fixity ops) =
PFix (f fc) fixity ops | 121 | mapPDeclFC f g (PFix fc fixity ops) =
PFix (f fc) fixity ops | 64 | true | true | 0 | 11 | 64 | 78 | 38 | 40 | null | null |
marcinmrotek/zoom-refs | src/Control/Concurrent/STM/MultiTVar.hs | bsd-3-clause | writeMultiTVar :: MultiTVar a -> a -> STM ()
writeMultiTVar (MultiTVar v t) a = modifyTVar' v $ cloneTraversal t .~ a | 117 | writeMultiTVar :: MultiTVar a -> a -> STM ()
writeMultiTVar (MultiTVar v t) a = modifyTVar' v $ cloneTraversal t .~ a | 117 | writeMultiTVar (MultiTVar v t) a = modifyTVar' v $ cloneTraversal t .~ a | 72 | false | true | 0 | 8 | 21 | 54 | 25 | 29 | null | null |
erochest/bakers12 | tests/Test/Bakers12/System/Enumerators.hs | bsd-3-clause | assertRmMissingKeepExistingFiles :: Assertion
assertRmMissingKeepExistingFiles =
assertPipe "assertRmMissingKeepExistingFiles" input input removeMissingFiles
where input = ["bakers12.cabal", "LICENSE"] | 209 | assertRmMissingKeepExistingFiles :: Assertion
assertRmMissingKeepExistingFiles =
assertPipe "assertRmMissingKeepExistingFiles" input input removeMissingFiles
where input = ["bakers12.cabal", "LICENSE"] | 209 | assertRmMissingKeepExistingFiles =
assertPipe "assertRmMissingKeepExistingFiles" input input removeMissingFiles
where input = ["bakers12.cabal", "LICENSE"] | 163 | false | true | 0 | 5 | 22 | 34 | 18 | 16 | null | null |
sdiehl/ghc | libraries/base/GHC/Storable.hs | bsd-3-clause | writeWord32OffPtr (Ptr a) (I# i) (W32# x)
= IO $ \s -> case writeWord32OffAddr# a i x s of s2 -> (# s2, () #) | 114 | writeWord32OffPtr (Ptr a) (I# i) (W32# x)
= IO $ \s -> case writeWord32OffAddr# a i x s of s2 -> (# s2, () #) | 114 | writeWord32OffPtr (Ptr a) (I# i) (W32# x)
= IO $ \s -> case writeWord32OffAddr# a i x s of s2 -> (# s2, () #) | 114 | false | false | 0 | 11 | 29 | 66 | 33 | 33 | null | null |
hvr/hoopl | src/Compiler/Hoopl/Block.hs | bsd-3-clause | blockJoinAny (NothingC, m, JustC l) = BlockOC m l | 53 | blockJoinAny (NothingC, m, JustC l) = BlockOC m l | 53 | blockJoinAny (NothingC, m, JustC l) = BlockOC m l | 53 | false | false | 0 | 7 | 12 | 26 | 13 | 13 | null | null |
swistak35/fgj_interpreter | main_fgj.hs | mit | object_generic = KlassGeneric "Object" [] | 41 | object_generic = KlassGeneric "Object" [] | 41 | object_generic = KlassGeneric "Object" [] | 41 | false | false | 1 | 6 | 4 | 16 | 6 | 10 | null | null |
OS2World/DEV-UTIL-HUGS | libraries/Graphics/Rendering/OpenGL/GL/Antialiasing.hs | bsd-3-clause | --------------------------------------------------------------------------------
sampleBuffers :: GettableStateVar GLsizei
sampleBuffers = antialiasingInfo GetSampleBuffers | 173 | sampleBuffers :: GettableStateVar GLsizei
sampleBuffers = antialiasingInfo GetSampleBuffers | 91 | sampleBuffers = antialiasingInfo GetSampleBuffers | 49 | true | true | 0 | 5 | 9 | 18 | 9 | 9 | null | null |
Debaerdm/L3-MIAGE | Programmation Fonctionnel/TP/TP1/sommeDeXaY.hs | mit | -- Function ++
plus' :: [a] -> [a] -> [a]
plus' [] ys = ys | 58 | plus' :: [a] -> [a] -> [a]
plus' [] ys = ys | 43 | plus' [] ys = ys | 16 | true | true | 0 | 7 | 14 | 36 | 20 | 16 | null | null |
syallop/NonZero | Data/NonZero/Vector.hs | gpl-3.0 | -- | Zip together two equally sized 'Vector's.
zip :: Vector n a -> Vector n b -> Vector n (a,b)
zip (Only a) (Only b) = Only (a,b) | 133 | zip :: Vector n a -> Vector n b -> Vector n (a,b)
zip (Only a) (Only b) = Only (a,b) | 86 | zip (Only a) (Only b) = Only (a,b) | 36 | true | true | 0 | 10 | 30 | 71 | 35 | 36 | null | null |
geophf/1HaskellADay | exercises/HAD/Y2020/M12/D15/Exercise.hs | mit | newCapsDir :: FilePath
newCapsDir = "Y2020/M12/D15/" | 52 | newCapsDir :: FilePath
newCapsDir = "Y2020/M12/D15/" | 52 | newCapsDir = "Y2020/M12/D15/" | 29 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
Cortlandd/haskell-opencv | test/test.hs | bsd-3-clause | eye_m33 :: (Num e) => M33 e
eye_m23 = V2 (V3 1 0 0) (V3 0 1 0) | 63 | eye_m33 :: (Num e) => M33 e
eye_m23 = V2 (V3 1 0 0) (V3 0 1 0) | 62 | eye_m23 = V2 (V3 1 0 0) (V3 0 1 0) | 34 | false | true | 0 | 7 | 18 | 48 | 24 | 24 | null | null |
ekmett/doctest | src/Location.hs | mit | -- | Discard location information.
unLoc :: Located a -> a
unLoc (Located _ a) = a | 82 | unLoc :: Located a -> a
unLoc (Located _ a) = a | 47 | unLoc (Located _ a) = a | 23 | true | true | 0 | 7 | 16 | 30 | 15 | 15 | null | null |
kayhide/renkon | src/Renkon/Command/List.hs | bsd-3-clause | displayItemSimple :: Config -> FilePath -> IO ()
displayItemSimple config exe = do
withColor Green $ do
fprint (indent 2 % string % ln) . (takeGeneratorName config) $ exe | 176 | displayItemSimple :: Config -> FilePath -> IO ()
displayItemSimple config exe = do
withColor Green $ do
fprint (indent 2 % string % ln) . (takeGeneratorName config) $ exe | 176 | displayItemSimple config exe = do
withColor Green $ do
fprint (indent 2 % string % ln) . (takeGeneratorName config) $ exe | 127 | false | true | 0 | 16 | 34 | 73 | 34 | 39 | null | null |
cbare/Etudes | haskell/haskell-99-problems.hs | apache-2.0 | select _ _ = Nothing | 20 | select _ _ = Nothing | 20 | select _ _ = Nothing | 20 | false | false | 0 | 5 | 4 | 11 | 5 | 6 | null | null |
adyxax/hsircd | Ircd/Core.hs | bsd-3-clause | initIrcd :: Config -> IO IrcdEnv
initIrcd config = do
ircdState <- newMVar defaultIrcdState
liftIO $ infoM "Ircd.Core" "Binding server"
mySockets <- mapM initSocket $ configListen config
let tlsConfig = configTLS config
tls <- if tlsOn tlsConfig
then (do
liftIO $ infoM "I... | 843 | initIrcd :: Config -> IO IrcdEnv
initIrcd config = do
ircdState <- newMVar defaultIrcdState
liftIO $ infoM "Ircd.Core" "Binding server"
mySockets <- mapM initSocket $ configListen config
let tlsConfig = configTLS config
tls <- if tlsOn tlsConfig
then (do
liftIO $ infoM "I... | 843 | initIrcd config = do
ircdState <- newMVar defaultIrcdState
liftIO $ infoM "Ircd.Core" "Binding server"
mySockets <- mapM initSocket $ configListen config
let tlsConfig = configTLS config
tls <- if tlsOn tlsConfig
then (do
liftIO $ infoM "Ircd.Core" "TLS init"
... | 810 | false | true | 0 | 14 | 333 | 210 | 102 | 108 | null | null |
alexander-at-github/eta | compiler/ETA/SimplStg/UnariseStg.hs | bsd-3-clause | unariseIds :: UnariseEnv -> [Id] -> [Id]
unariseIds rho = concatMap (unariseId rho) | 83 | unariseIds :: UnariseEnv -> [Id] -> [Id]
unariseIds rho = concatMap (unariseId rho) | 83 | unariseIds rho = concatMap (unariseId rho) | 42 | false | true | 0 | 7 | 12 | 37 | 19 | 18 | null | null |
glutamate/vishnu | Vishnu/Lib/Common.hs | bsd-3-clause | runVisM :: [String] -> VisM a -> IO a
runVisM args vm = do
gotoHomeDir
let (margs, optargs) = partition ((/='-') . head) args
e <- doesFileExist ".vishnu.json"
if e
then runVisMfromFile ".vishnu.json" vm (margs, optargs)
else do e <- doesFileExist "Dropbox/.vishnu.json"
if e
... | 524 | runVisM :: [String] -> VisM a -> IO a
runVisM args vm = do
gotoHomeDir
let (margs, optargs) = partition ((/='-') . head) args
e <- doesFileExist ".vishnu.json"
if e
then runVisMfromFile ".vishnu.json" vm (margs, optargs)
else do e <- doesFileExist "Dropbox/.vishnu.json"
if e
... | 524 | runVisM args vm = do
gotoHomeDir
let (margs, optargs) = partition ((/='-') . head) args
e <- doesFileExist ".vishnu.json"
if e
then runVisMfromFile ".vishnu.json" vm (margs, optargs)
else do e <- doesFileExist "Dropbox/.vishnu.json"
if e
then runVisMfromFile "Dropbox/.vi... | 486 | false | true | 0 | 14 | 153 | 159 | 77 | 82 | null | null |
jelly/loggerbot | logger.hs | gpl-3.0 | admin = "foo" | 13 | admin = "foo" | 13 | admin = "foo" | 13 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
ksaveljev/hake-2 | src/CVarVariables.hs | bsd-3-clause | clTestLightsCVar = CVar.getExisting "cl_testlights" | 63 | clTestLightsCVar = CVar.getExisting "cl_testlights" | 63 | clTestLightsCVar = CVar.getExisting "cl_testlights" | 63 | false | false | 0 | 6 | 15 | 11 | 5 | 6 | null | null |
Siprj/mmum | src/Img.hs | bsd-3-clause | getImgFromFile :: FilePath -> IO (Either String RGB)
getImgFromFile path = fmap (toRGB . convertRGB8) <$> readImage path
where
toRGB :: Image PixelRGB8 -> RGB
toRGB (Image w h pixels) = RGB
{ rgb = matrix h w $ \(y,x) -> unsafePixelAt pixels
$ ((y - 1) * w * 3) + (x - 1) * 3
} | 315 | getImgFromFile :: FilePath -> IO (Either String RGB)
getImgFromFile path = fmap (toRGB . convertRGB8) <$> readImage path
where
toRGB :: Image PixelRGB8 -> RGB
toRGB (Image w h pixels) = RGB
{ rgb = matrix h w $ \(y,x) -> unsafePixelAt pixels
$ ((y - 1) * w * 3) + (x - 1) * 3
} | 315 | getImgFromFile path = fmap (toRGB . convertRGB8) <$> readImage path
where
toRGB :: Image PixelRGB8 -> RGB
toRGB (Image w h pixels) = RGB
{ rgb = matrix h w $ \(y,x) -> unsafePixelAt pixels
$ ((y - 1) * w * 3) + (x - 1) * 3
} | 262 | false | true | 0 | 17 | 95 | 160 | 78 | 82 | null | null |
snoyberg/ghc | compiler/coreSyn/MkCore.hs | bsd-3-clause | patErrorName = err_nm "patError" patErrorIdKey pAT_ERROR_ID | 80 | patErrorName = err_nm "patError" patErrorIdKey pAT_ERROR_ID | 80 | patErrorName = err_nm "patError" patErrorIdKey pAT_ERROR_ID | 80 | false | false | 0 | 5 | 26 | 13 | 6 | 7 | null | null |
Philonous/d-bus | src/DBus/Wire.hs | mit | getDBV' (SDBusSimpleType STypeObjectPath) = DBVObjectPath . objectPath <$> getText | 82 | getDBV' (SDBusSimpleType STypeObjectPath) = DBVObjectPath . objectPath <$> getText | 82 | getDBV' (SDBusSimpleType STypeObjectPath) = DBVObjectPath . objectPath <$> getText | 82 | false | false | 0 | 7 | 8 | 23 | 11 | 12 | null | null |
olsner/ghc | compiler/typecheck/TcRnTypes.hs | bsd-3-clause | tyCoFVsOfBag :: (a -> FV) -> Bag a -> FV
tyCoFVsOfBag tvs_of = foldrBag (unionFV . tvs_of) emptyFV | 98 | tyCoFVsOfBag :: (a -> FV) -> Bag a -> FV
tyCoFVsOfBag tvs_of = foldrBag (unionFV . tvs_of) emptyFV | 98 | tyCoFVsOfBag tvs_of = foldrBag (unionFV . tvs_of) emptyFV | 57 | false | true | 0 | 7 | 17 | 44 | 22 | 22 | null | null |
hesselink/haskell-opaleye | src/Opaleye/Internal/HaskellDB/Sql/Default.hs | bsd-3-clause | showBinOp OpLike = "LIKE" | 32 | showBinOp OpLike = "LIKE" | 32 | showBinOp OpLike = "LIKE" | 32 | false | false | 0 | 5 | 10 | 9 | 4 | 5 | null | null |
plaprade/aeson | benchmarks/Typed/TH.hs | bsd-3-clause | encodeViaValue :: Result -> L.ByteString
encodeViaValue = encode | 64 | encodeViaValue :: Result -> L.ByteString
encodeViaValue = encode | 64 | encodeViaValue = encode | 23 | false | true | 0 | 6 | 7 | 17 | 9 | 8 | null | null |
Happy0/haskellscrabble | test/Tests/LetterBagTest.hs | gpl-3.0 | bagFromTilesProperty :: [Tile] -> Property
bagFromTilesProperty inputTiles = monadicIO $
do
bag <- run $ bagFromTiles inputTiles
let LetterBag resultingTiles numTiles generator validLetters = bag
Q.assert $ numTiles == (length inputTiles) && resultingTiles == inputTiles | 304 | bagFromTilesProperty :: [Tile] -> Property
bagFromTilesProperty inputTiles = monadicIO $
do
bag <- run $ bagFromTiles inputTiles
let LetterBag resultingTiles numTiles generator validLetters = bag
Q.assert $ numTiles == (length inputTiles) && resultingTiles == inputTiles | 300 | bagFromTilesProperty inputTiles = monadicIO $
do
bag <- run $ bagFromTiles inputTiles
let LetterBag resultingTiles numTiles generator validLetters = bag
Q.assert $ numTiles == (length inputTiles) && resultingTiles == inputTiles | 257 | false | true | 0 | 12 | 68 | 85 | 40 | 45 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.