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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
gridaphobe/ghc | compiler/nativeGen/X86/Ppr.hs | bsd-3-clause | pprFormat_x87 :: Format -> SDoc
pprFormat_x87 x
= ptext $ case x of
FF32 -> sLit "s"
FF64 -> sLit "l"
FF80 -> sLit "t"
_ -> panic "X86.Ppr.pprFormat_x87" | 226 | pprFormat_x87 :: Format -> SDoc
pprFormat_x87 x
= ptext $ case x of
FF32 -> sLit "s"
FF64 -> sLit "l"
FF80 -> sLit "t"
_ -> panic "X86.Ppr.pprFormat_x87" | 226 | pprFormat_x87 x
= ptext $ case x of
FF32 -> sLit "s"
FF64 -> sLit "l"
FF80 -> sLit "t"
_ -> panic "X86.Ppr.pprFormat_x87" | 194 | false | true | 6 | 7 | 101 | 71 | 30 | 41 | null | null |
ssaavedra/liquidhaskell | src/Language/Haskell/Liquid/Types/PrettyPrint.hs | bsd-3-clause | ppr_rtype bb p t@(RFun _ _ _ r)
= ppTy r $ maybeParen p FunPrec $ ppr_rty_fun bb empty t | 90 | ppr_rtype bb p t@(RFun _ _ _ r)
= ppTy r $ maybeParen p FunPrec $ ppr_rty_fun bb empty t | 90 | ppr_rtype bb p t@(RFun _ _ _ r)
= ppTy r $ maybeParen p FunPrec $ ppr_rty_fun bb empty t | 90 | false | false | 0 | 8 | 21 | 51 | 24 | 27 | null | null |
mgold/Elm | src/AST/Expression/Canonical.hs | bsd-3-clause | defCons :: Def -> SortedDefs -> SortedDefs
defCons def@(Def _ (A.A _ pattern) _ _) sortedDefs =
case (pattern, sortedDefs) of
(Pattern.Var "main", NoMain defs) ->
YesMain [] def defs
(_, NoMain defs) ->
NoMain (def : defs)
(_, YesMain defs main rest) ->
YesMain (def : defs) main rest | 318 | defCons :: Def -> SortedDefs -> SortedDefs
defCons def@(Def _ (A.A _ pattern) _ _) sortedDefs =
case (pattern, sortedDefs) of
(Pattern.Var "main", NoMain defs) ->
YesMain [] def defs
(_, NoMain defs) ->
NoMain (def : defs)
(_, YesMain defs main rest) ->
YesMain (def : defs) main rest | 318 | defCons def@(Def _ (A.A _ pattern) _ _) sortedDefs =
case (pattern, sortedDefs) of
(Pattern.Var "main", NoMain defs) ->
YesMain [] def defs
(_, NoMain defs) ->
NoMain (def : defs)
(_, YesMain defs main rest) ->
YesMain (def : defs) main rest | 275 | false | true | 6 | 11 | 83 | 147 | 75 | 72 | null | null |
jwiegley/ghc-release | libraries/hoopl/src/Compiler/Hoopl/XUtil.hs | gpl-3.0 | mapBodyFacts :: (Monad m)
=> (Graph n C C -> Fact C f -> m (Graph n C C, Fact C f, MaybeO C f))
-> (Body n -> FactBase f -> m (Body n, FactBase f))
-- ^ Internal utility; should not escape
mapBodyFacts anal b f = anal (GMany NothingO b NothingO) f >>= bodyFacts
where -- the type constraint is needed for the pattern match;
-- if it were not, we would use do-notation here.
bodyFacts :: Monad m => (Graph n C C, Fact C f, MaybeO C f) -> m (Body n, Fact C f)
bodyFacts (GMany NothingO body NothingO, fb, NothingO) = return (body, fb)
{-
Can't write:
do (GMany NothingO body NothingO, fb, NothingO) <- anal (....) f
return (body, fb)
because we need an explicit type signature in order to do the GADT
pattern matches on NothingO
-}
-- | Forward dataflow analysis and rewriting for the special case of a
-- graph open at the entry. This special case relieves the client
-- from having to specify a type signature for 'NothingO', which beginners
-- might find confusing and experts might find annoying. | 1,058 | mapBodyFacts :: (Monad m)
=> (Graph n C C -> Fact C f -> m (Graph n C C, Fact C f, MaybeO C f))
-> (Body n -> FactBase f -> m (Body n, FactBase f))
mapBodyFacts anal b f = anal (GMany NothingO b NothingO) f >>= bodyFacts
where -- the type constraint is needed for the pattern match;
-- if it were not, we would use do-notation here.
bodyFacts :: Monad m => (Graph n C C, Fact C f, MaybeO C f) -> m (Body n, Fact C f)
bodyFacts (GMany NothingO body NothingO, fb, NothingO) = return (body, fb)
{-
Can't write:
do (GMany NothingO body NothingO, fb, NothingO) <- anal (....) f
return (body, fb)
because we need an explicit type signature in order to do the GADT
pattern matches on NothingO
-}
-- | Forward dataflow analysis and rewriting for the special case of a
-- graph open at the entry. This special case relieves the client
-- from having to specify a type signature for 'NothingO', which beginners
-- might find confusing and experts might find annoying. | 1,017 | mapBodyFacts anal b f = anal (GMany NothingO b NothingO) f >>= bodyFacts
where -- the type constraint is needed for the pattern match;
-- if it were not, we would use do-notation here.
bodyFacts :: Monad m => (Graph n C C, Fact C f, MaybeO C f) -> m (Body n, Fact C f)
bodyFacts (GMany NothingO body NothingO, fb, NothingO) = return (body, fb)
{-
Can't write:
do (GMany NothingO body NothingO, fb, NothingO) <- anal (....) f
return (body, fb)
because we need an explicit type signature in order to do the GADT
pattern matches on NothingO
-}
-- | Forward dataflow analysis and rewriting for the special case of a
-- graph open at the entry. This special case relieves the client
-- from having to specify a type signature for 'NothingO', which beginners
-- might find confusing and experts might find annoying. | 854 | true | true | 0 | 14 | 251 | 246 | 123 | 123 | null | null |
lostbean/VirMat | src/VirMat/Core/FlexMicro.hs | gpl-3.0 | renderSubOne :: Int -> Vector Vec2D -> Vector (Vector Int) -> Maybe (VTK Vec2D)
renderSubOne n vs es =
(\(ps, ts) -> mkUGVTK "FlexMicro" (V.convert ps) ts [] [])
<$> getSubOneTriangulation n vs es | 200 | renderSubOne :: Int -> Vector Vec2D -> Vector (Vector Int) -> Maybe (VTK Vec2D)
renderSubOne n vs es =
(\(ps, ts) -> mkUGVTK "FlexMicro" (V.convert ps) ts [] [])
<$> getSubOneTriangulation n vs es | 200 | renderSubOne n vs es =
(\(ps, ts) -> mkUGVTK "FlexMicro" (V.convert ps) ts [] [])
<$> getSubOneTriangulation n vs es | 120 | false | true | 2 | 10 | 37 | 100 | 49 | 51 | null | null |
chrisnc/hvx | src/HVX/Internal/TestUtil.hs | bsd-3-clause | smallNonIntPowersGreaterThanOne :: Gen Double
smallNonIntPowersGreaterThanOne =
arbitrary `suchThat` \x -> x > 1 && x <= 20 && not (isInteger x) | 146 | smallNonIntPowersGreaterThanOne :: Gen Double
smallNonIntPowersGreaterThanOne =
arbitrary `suchThat` \x -> x > 1 && x <= 20 && not (isInteger x) | 146 | smallNonIntPowersGreaterThanOne =
arbitrary `suchThat` \x -> x > 1 && x <= 20 && not (isInteger x) | 100 | false | true | 0 | 10 | 22 | 50 | 26 | 24 | null | null |
zaxtax/hakaru | haskell/Language/Hakaru/Pretty/Concrete.hs | bsd-3-clause | ppSCon p (Summate _ _) = \(e1 :* e2 :* e3 :* End) ->
let (vars, types, body) = ppBinder2 e3 in
parens True $
[ PP.text "summate"
<+> toDoc vars
<+> PP.text "from"
<+> (toDoc $ ppArg e1)
<+> PP.text "to"
<+> (toDoc $ ppArg e2)
<> PP.colon <> PP.space
, PP.nest 1 (toDoc body)
] | 332 | ppSCon p (Summate _ _) = \(e1 :* e2 :* e3 :* End) ->
let (vars, types, body) = ppBinder2 e3 in
parens True $
[ PP.text "summate"
<+> toDoc vars
<+> PP.text "from"
<+> (toDoc $ ppArg e1)
<+> PP.text "to"
<+> (toDoc $ ppArg e2)
<> PP.colon <> PP.space
, PP.nest 1 (toDoc body)
] | 332 | ppSCon p (Summate _ _) = \(e1 :* e2 :* e3 :* End) ->
let (vars, types, body) = ppBinder2 e3 in
parens True $
[ PP.text "summate"
<+> toDoc vars
<+> PP.text "from"
<+> (toDoc $ ppArg e1)
<+> PP.text "to"
<+> (toDoc $ ppArg e2)
<> PP.colon <> PP.space
, PP.nest 1 (toDoc body)
] | 332 | false | false | 0 | 18 | 112 | 159 | 78 | 81 | null | null |
spechub/Hets | OWL2/ColonKeywords.hs | gpl-2.0 | annotationsC :: String
annotationsC = "Annotations:" | 52 | annotationsC :: String
annotationsC = "Annotations:" | 52 | annotationsC = "Annotations:" | 29 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
swamp-agr/carbuyer-advisor | fay/TextAdvise.hs | mit | addGen :: T.Text -> Maybe (T.Text, T.Text, T.Text, T.Text) -> Fay ()
addGen tab g = case g of
Nothing -> return ()
Just gid -> createRow "link" tab gid | 155 | addGen :: T.Text -> Maybe (T.Text, T.Text, T.Text, T.Text) -> Fay ()
addGen tab g = case g of
Nothing -> return ()
Just gid -> createRow "link" tab gid | 155 | addGen tab g = case g of
Nothing -> return ()
Just gid -> createRow "link" tab gid | 86 | false | true | 0 | 9 | 33 | 89 | 43 | 46 | null | null |
seereason/stringsearch | Data/ByteString/Lazy/Search/KMP.hs | bsd-3-clause | indices :: S.ByteString -- ^ Strict pattern to find
-> L.ByteString -- ^ Lazy string to search
-> [Int64] -- ^ Offsets of matches
indices = indicesL | 181 | indices :: S.ByteString -- ^ Strict pattern to find
-> L.ByteString -- ^ Lazy string to search
-> [Int64]
indices = indicesL | 148 | indices = indicesL | 18 | true | true | 0 | 9 | 59 | 36 | 18 | 18 | null | null |
srhb/quickcheck | examples/Heap_ProgramAlgebraic.hs | bsd-3-clause | heap (FromList xs) = fromList xs | 36 | heap (FromList xs) = fromList xs | 36 | heap (FromList xs) = fromList xs | 36 | false | false | 0 | 6 | 9 | 19 | 8 | 11 | null | null |
michalkonecny/aern | aern-fnreps/src/Main.hs | bsd-3-clause | main = undefined | 16 | main = undefined | 16 | main = undefined | 16 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
randen/cabal | cabal-install/Distribution/Client/Setup.hs | bsd-3-clause | listCommand :: CommandUI ListFlags
listCommand = CommandUI {
commandName = "list",
commandSynopsis = "List packages matching a search string.",
commandDescription = Just $ \_ -> wrapText $
"List all packages, or all packages matching one of the search"
++ " strings.\n"
++ "\n"
++ "If there is a sandbox in the current directory and "
++ "config:ignore-sandbox is False, use the sandbox package database. "
++ "Otherwise, use the package database specified with --package-db. "
++ "If not specified, use the user package database.\n",
commandNotes = Just $ \pname ->
"Examples:\n"
++ " " ++ pname ++ " list pandoc\n"
++ " Will find pandoc, pandoc-citeproc, pandoc-lens, ...\n",
commandUsage = usageAlternatives "list" [ "[FLAGS]"
, "[FLAGS] STRINGS"],
commandDefaultFlags = defaultListFlags,
commandOptions = \_ -> [
optionVerbosity listVerbosity (\v flags -> flags { listVerbosity = v })
, option [] ["installed"]
"Only print installed packages"
listInstalled (\v flags -> flags { listInstalled = v })
trueArg
, option [] ["simple-output"]
"Print in a easy-to-parse format"
listSimpleOutput (\v flags -> flags { listSimpleOutput = v })
trueArg
, option "" ["package-db"]
( "Append the given package database to the list of package"
++ " databases used (to satisfy dependencies and register into)."
++ " May be a specific file, 'global' or 'user'. The initial list"
++ " is ['global'], ['global', 'user'], or ['global', $sandbox],"
++ " depending on context. Use 'clear' to reset the list to empty."
++ " See the user guide for details.")
listPackageDBs (\v flags -> flags { listPackageDBs = v })
(reqArg' "DB" readPackageDbList showPackageDbList)
]
} | 2,038 | listCommand :: CommandUI ListFlags
listCommand = CommandUI {
commandName = "list",
commandSynopsis = "List packages matching a search string.",
commandDescription = Just $ \_ -> wrapText $
"List all packages, or all packages matching one of the search"
++ " strings.\n"
++ "\n"
++ "If there is a sandbox in the current directory and "
++ "config:ignore-sandbox is False, use the sandbox package database. "
++ "Otherwise, use the package database specified with --package-db. "
++ "If not specified, use the user package database.\n",
commandNotes = Just $ \pname ->
"Examples:\n"
++ " " ++ pname ++ " list pandoc\n"
++ " Will find pandoc, pandoc-citeproc, pandoc-lens, ...\n",
commandUsage = usageAlternatives "list" [ "[FLAGS]"
, "[FLAGS] STRINGS"],
commandDefaultFlags = defaultListFlags,
commandOptions = \_ -> [
optionVerbosity listVerbosity (\v flags -> flags { listVerbosity = v })
, option [] ["installed"]
"Only print installed packages"
listInstalled (\v flags -> flags { listInstalled = v })
trueArg
, option [] ["simple-output"]
"Print in a easy-to-parse format"
listSimpleOutput (\v flags -> flags { listSimpleOutput = v })
trueArg
, option "" ["package-db"]
( "Append the given package database to the list of package"
++ " databases used (to satisfy dependencies and register into)."
++ " May be a specific file, 'global' or 'user'. The initial list"
++ " is ['global'], ['global', 'user'], or ['global', $sandbox],"
++ " depending on context. Use 'clear' to reset the list to empty."
++ " See the user guide for details.")
listPackageDBs (\v flags -> flags { listPackageDBs = v })
(reqArg' "DB" readPackageDbList showPackageDbList)
]
} | 2,038 | listCommand = CommandUI {
commandName = "list",
commandSynopsis = "List packages matching a search string.",
commandDescription = Just $ \_ -> wrapText $
"List all packages, or all packages matching one of the search"
++ " strings.\n"
++ "\n"
++ "If there is a sandbox in the current directory and "
++ "config:ignore-sandbox is False, use the sandbox package database. "
++ "Otherwise, use the package database specified with --package-db. "
++ "If not specified, use the user package database.\n",
commandNotes = Just $ \pname ->
"Examples:\n"
++ " " ++ pname ++ " list pandoc\n"
++ " Will find pandoc, pandoc-citeproc, pandoc-lens, ...\n",
commandUsage = usageAlternatives "list" [ "[FLAGS]"
, "[FLAGS] STRINGS"],
commandDefaultFlags = defaultListFlags,
commandOptions = \_ -> [
optionVerbosity listVerbosity (\v flags -> flags { listVerbosity = v })
, option [] ["installed"]
"Only print installed packages"
listInstalled (\v flags -> flags { listInstalled = v })
trueArg
, option [] ["simple-output"]
"Print in a easy-to-parse format"
listSimpleOutput (\v flags -> flags { listSimpleOutput = v })
trueArg
, option "" ["package-db"]
( "Append the given package database to the list of package"
++ " databases used (to satisfy dependencies and register into)."
++ " May be a specific file, 'global' or 'user'. The initial list"
++ " is ['global'], ['global', 'user'], or ['global', $sandbox],"
++ " depending on context. Use 'clear' to reset the list to empty."
++ " See the user guide for details.")
listPackageDBs (\v flags -> flags { listPackageDBs = v })
(reqArg' "DB" readPackageDbList showPackageDbList)
]
} | 2,002 | false | true | 0 | 15 | 645 | 310 | 174 | 136 | null | null |
Lexer747/Haskell-Fractals | Core/CoreIO.hs | gpl-3.0 | -- |A function which takes a FullFigure and writes it to a file
publishFullFigure_dep :: FullFigure -> IO ()
publishFullFigure_dep fig = writeFile "Output.svg" $ writeFullFigure_dep fig | 185 | publishFullFigure_dep :: FullFigure -> IO ()
publishFullFigure_dep fig = writeFile "Output.svg" $ writeFullFigure_dep fig | 121 | publishFullFigure_dep fig = writeFile "Output.svg" $ writeFullFigure_dep fig | 76 | true | true | 0 | 7 | 26 | 34 | 16 | 18 | null | null |
fhsjaagshs/niagra | src/Data/Niagra/Selector/Tags.hs | mit | h5 :: Selector
h5 = "h5" | 24 | h5 :: Selector
h5 = "h5" | 24 | h5 = "h5" | 9 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
MasseR/xmonadcontrib | XMonad/Actions/Search.hs | bsd-3-clause | -- | Like 'search', but for use with the X selection; it grabs the selection,
-- passes it to a given searchEngine and opens it in a given browser.
selectSearchBrowser :: Browser -> SearchEngine -> X ()
selectSearchBrowser browser (SearchEngine _ site) = search browser site =<< getSelection | 293 | selectSearchBrowser :: Browser -> SearchEngine -> X ()
selectSearchBrowser browser (SearchEngine _ site) = search browser site =<< getSelection | 143 | selectSearchBrowser browser (SearchEngine _ site) = search browser site =<< getSelection | 88 | true | true | 0 | 8 | 49 | 48 | 24 | 24 | null | null |
kfish/zoom-cache | Data/Iteratee/ZoomCache.hs | bsd-2-clause | -- | An iteratee of zoom-cache data, after global and track headers
-- have been read, or if the 'CacheFile' has been acquired elsewhere.
enumBlock :: (Functor m, MonadIO m)
=> CacheFile
-> I.Enumeratee (Offset ByteString) [Offset Block] m a
enumBlock = I.unfoldConvStreamCheck I.eneeCheckIfDonePass iterBlock | 329 | enumBlock :: (Functor m, MonadIO m)
=> CacheFile
-> I.Enumeratee (Offset ByteString) [Offset Block] m a
enumBlock = I.unfoldConvStreamCheck I.eneeCheckIfDonePass iterBlock | 191 | enumBlock = I.unfoldConvStreamCheck I.eneeCheckIfDonePass iterBlock | 67 | true | true | 0 | 9 | 64 | 64 | 33 | 31 | null | null |
danr/hipspec | testsuite/prod/zeno_version/PropT24.hs | gpl-3.0 | qrevflat ((x:xs):xss) acc = qrevflat (xs:xss) (x:acc) | 53 | qrevflat ((x:xs):xss) acc = qrevflat (xs:xss) (x:acc) | 53 | qrevflat ((x:xs):xss) acc = qrevflat (xs:xss) (x:acc) | 53 | false | false | 0 | 9 | 6 | 44 | 23 | 21 | null | null |
ekmett/ghc | compiler/codeGen/StgCmmPrim.hs | bsd-3-clause | translateOp _ (VecRemOp WordVec n w) = Just (MO_VU_Rem n w) | 61 | translateOp _ (VecRemOp WordVec n w) = Just (MO_VU_Rem n w) | 61 | translateOp _ (VecRemOp WordVec n w) = Just (MO_VU_Rem n w) | 61 | false | false | 0 | 7 | 12 | 32 | 15 | 17 | null | null |
brendanhay/gogol | gogol-plus-domains/gen/Network/Google/PlusDomains/Types/Product.hs | mpl-2.0 | -- | The content (text) as provided by the author, which is stored without
-- any HTML formatting. When creating or updating an activity, this value
-- must be supplied as plain text in the request.
aoOriginalContent :: Lens' ActivityObject (Maybe Text)
aoOriginalContent
= lens _aoOriginalContent
(\ s a -> s{_aoOriginalContent = a}) | 342 | aoOriginalContent :: Lens' ActivityObject (Maybe Text)
aoOriginalContent
= lens _aoOriginalContent
(\ s a -> s{_aoOriginalContent = a}) | 143 | aoOriginalContent
= lens _aoOriginalContent
(\ s a -> s{_aoOriginalContent = a}) | 88 | true | true | 0 | 9 | 60 | 50 | 27 | 23 | null | null |
meimisaki/FingerTree | test/Main.hs | mit | prop_SeqMonadAssociativity :: Eq a => (a -> Seq a) -> (a -> Seq a) -> Seq a -> Bool
prop_SeqMonadAssociativity f g xs =
((xs >>= f) >>= g) == (xs >>= (\x -> f x >>= g)) | 172 | prop_SeqMonadAssociativity :: Eq a => (a -> Seq a) -> (a -> Seq a) -> Seq a -> Bool
prop_SeqMonadAssociativity f g xs =
((xs >>= f) >>= g) == (xs >>= (\x -> f x >>= g)) | 172 | prop_SeqMonadAssociativity f g xs =
((xs >>= f) >>= g) == (xs >>= (\x -> f x >>= g)) | 88 | false | true | 1 | 11 | 41 | 107 | 53 | 54 | null | null |
GaloisInc/halvm-ghc | libraries/template-haskell/Language/Haskell/TH/Lib.hs | bsd-3-clause | newtypeD :: CxtQ -> Name -> [TyVarBndr] -> Maybe Kind -> ConQ -> CxtQ -> DecQ
newtypeD ctxt tc tvs ksig con derivs =
do
ctxt1 <- ctxt
con1 <- con
derivs1 <- derivs
return (NewtypeD ctxt1 tc tvs ksig con1 derivs1) | 230 | newtypeD :: CxtQ -> Name -> [TyVarBndr] -> Maybe Kind -> ConQ -> CxtQ -> DecQ
newtypeD ctxt tc tvs ksig con derivs =
do
ctxt1 <- ctxt
con1 <- con
derivs1 <- derivs
return (NewtypeD ctxt1 tc tvs ksig con1 derivs1) | 230 | newtypeD ctxt tc tvs ksig con derivs =
do
ctxt1 <- ctxt
con1 <- con
derivs1 <- derivs
return (NewtypeD ctxt1 tc tvs ksig con1 derivs1) | 152 | false | true | 0 | 10 | 59 | 103 | 47 | 56 | null | null |
ekmett/ghc | compiler/cmm/PprC.hs | bsd-3-clause | machRepCType :: CmmType -> SDoc
machRepCType ty | isFloatType ty = machRep_F_CType w
| otherwise = machRep_U_CType w
where
w = typeWidth ty | 194 | machRepCType :: CmmType -> SDoc
machRepCType ty | isFloatType ty = machRep_F_CType w
| otherwise = machRep_U_CType w
where
w = typeWidth ty | 194 | machRepCType ty | isFloatType ty = machRep_F_CType w
| otherwise = machRep_U_CType w
where
w = typeWidth ty | 162 | false | true | 2 | 8 | 77 | 59 | 24 | 35 | null | null |
UCSD-PL/nano-smt | Language/Nano/SMT/Misc.hs | bsd-3-clause | colorPhaseLn c msg = colorStrLn c . wrapStars . (msg ++) | 57 | colorPhaseLn c msg = colorStrLn c . wrapStars . (msg ++) | 57 | colorPhaseLn c msg = colorStrLn c . wrapStars . (msg ++) | 57 | false | false | 0 | 7 | 11 | 26 | 13 | 13 | null | null |
cullina/Extractor | src/RandomStream.hs | bsd-3-clause | takeRS n (In f) = NotDone $ \a -> takeRS n (f a) | 52 | takeRS n (In f) = NotDone $ \a -> takeRS n (f a) | 52 | takeRS n (In f) = NotDone $ \a -> takeRS n (f a) | 52 | false | false | 0 | 9 | 16 | 39 | 18 | 21 | null | null |
bitemyapp/ghc | compiler/typecheck/TcEvidence.hs | bsd-3-clause | isEqVar :: Var -> Bool
-- Is lifted coercion variable (only!)
isEqVar v = case tyConAppTyCon_maybe (varType v) of
Just tc -> tc `hasKey` eqTyConKey
Nothing -> False | 194 | isEqVar :: Var -> Bool
isEqVar v = case tyConAppTyCon_maybe (varType v) of
Just tc -> tc `hasKey` eqTyConKey
Nothing -> False | 155 | isEqVar v = case tyConAppTyCon_maybe (varType v) of
Just tc -> tc `hasKey` eqTyConKey
Nothing -> False | 132 | true | true | 0 | 8 | 57 | 53 | 27 | 26 | null | null |
wavewave/evchain | lib/HEP/Automation/EventChain/SpecDSL.hs | gpl-3.0 | -- | antiproton
antiproton :: [PDGID]
antiproton = jet | 57 | antiproton :: [PDGID]
antiproton = jet | 38 | antiproton = jet | 16 | true | true | 0 | 7 | 11 | 22 | 10 | 12 | null | null |
andorp/hs-bluesnap | src/Bluesnap/API/Response.hs | gpl-3.0 | elementToXMLPeriod_frequency :: Xsd.XsdString -> [Content ()]
elementToXMLPeriod_frequency = schemaTypeToXML "period-frequency" | 127 | elementToXMLPeriod_frequency :: Xsd.XsdString -> [Content ()]
elementToXMLPeriod_frequency = schemaTypeToXML "period-frequency" | 127 | elementToXMLPeriod_frequency = schemaTypeToXML "period-frequency" | 65 | false | true | 0 | 8 | 9 | 28 | 14 | 14 | null | null |
kolmodin/cabal | cabal-install/Distribution/Client/FileMonitor.hs | bsd-3-clause | -- | Monitor a single file for changes, based on its modification time.
-- The monitored file is considered to have changed if it no longer
-- exists or if its modification time has changed.
--
monitorFile :: FilePath -> MonitorFilePath
monitorFile = MonitorFile FileModTime DirNotExists | 287 | monitorFile :: FilePath -> MonitorFilePath
monitorFile = MonitorFile FileModTime DirNotExists | 93 | monitorFile = MonitorFile FileModTime DirNotExists | 50 | true | true | 0 | 5 | 45 | 24 | 14 | 10 | null | null |
freizl/freizl.github.com-old | src/Hakyll/Core/Compiler.hs | bsd-3-clause | getRoute :: Identifier -> Compiler (Maybe FilePath)
getRoute identifier = do
provider <- compilerProvider <$> compilerAsk
routes <- compilerRoutes <$> compilerAsk
-- Note that this makes us dependend on that identifier: when the metadata
-- of that item changes, the route may change, hence we have to recompile
(mfp, um) <- compilerUnsafeIO $ runRoutes routes provider identifier
when um $ compilerTellDependencies [IdentifierDependency identifier]
return mfp
--------------------------------------------------------------------------------
-- | Get the body of the underlying resource | 618 | getRoute :: Identifier -> Compiler (Maybe FilePath)
getRoute identifier = do
provider <- compilerProvider <$> compilerAsk
routes <- compilerRoutes <$> compilerAsk
-- Note that this makes us dependend on that identifier: when the metadata
-- of that item changes, the route may change, hence we have to recompile
(mfp, um) <- compilerUnsafeIO $ runRoutes routes provider identifier
when um $ compilerTellDependencies [IdentifierDependency identifier]
return mfp
--------------------------------------------------------------------------------
-- | Get the body of the underlying resource | 618 | getRoute identifier = do
provider <- compilerProvider <$> compilerAsk
routes <- compilerRoutes <$> compilerAsk
-- Note that this makes us dependend on that identifier: when the metadata
-- of that item changes, the route may change, hence we have to recompile
(mfp, um) <- compilerUnsafeIO $ runRoutes routes provider identifier
when um $ compilerTellDependencies [IdentifierDependency identifier]
return mfp
--------------------------------------------------------------------------------
-- | Get the body of the underlying resource | 566 | false | true | 0 | 10 | 106 | 102 | 49 | 53 | null | null |
llllllllll/befunge | Befunge/Doublefunge.hs | gpl-2.0 | readAll (Right st) = readNext st >>= readAll . incPointer | 57 | readAll (Right st) = readNext st >>= readAll . incPointer | 57 | readAll (Right st) = readNext st >>= readAll . incPointer | 57 | false | false | 0 | 7 | 9 | 26 | 12 | 14 | null | null |
phaazon/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/Tokens.hs | bsd-3-clause | gl_NORMAL_MAP_NV :: GLenum
gl_NORMAL_MAP_NV = 0x8511 | 52 | gl_NORMAL_MAP_NV :: GLenum
gl_NORMAL_MAP_NV = 0x8511 | 52 | gl_NORMAL_MAP_NV = 0x8511 | 25 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
tjakway/ghcjvm | compiler/simplCore/SimplEnv.hs | bsd-3-clause | extendTvSubst :: SimplEnv -> TyVar -> Type -> SimplEnv
extendTvSubst env@(SimplEnv {seTvSubst = tsubst}) var res
= ASSERT( isTyVar var )
env {seTvSubst = extendVarEnv tsubst var res} | 188 | extendTvSubst :: SimplEnv -> TyVar -> Type -> SimplEnv
extendTvSubst env@(SimplEnv {seTvSubst = tsubst}) var res
= ASSERT( isTyVar var )
env {seTvSubst = extendVarEnv tsubst var res} | 188 | extendTvSubst env@(SimplEnv {seTvSubst = tsubst}) var res
= ASSERT( isTyVar var )
env {seTvSubst = extendVarEnv tsubst var res} | 133 | false | true | 0 | 10 | 33 | 76 | 38 | 38 | null | null |
Concomitant/LambdaHack | Game/LambdaHack/Client/AI/ConditionClient.hs | bsd-3-clause | benAvailableItems :: MonadClient m
=> ActorId
-> (Maybe Int -> ItemFull -> Actor -> [ItemFull] -> Bool)
-> [CStore]
-> m [( (Maybe (Int, Int), (Int, CStore))
, (ItemId, ItemFull) )]
benAvailableItems aid permitted cstores = do
cops <- getsState scops
itemToF <- itemToFullClient
b <- getsState $ getActorBody aid
activeItems <- activeItemsClient aid
fact <- getsState $ (EM.! bfid b) . sfactionD
condAnyFoeAdj <- condAnyFoeAdjM aid
condLightBetrays <- condLightBetraysM aid
condTgtEnemyPresent <- condTgtEnemyPresentM aid
condNotCalmEnough <- condNotCalmEnoughM aid
let ben cstore bag =
[ ((benefit, (k, cstore)), (iid, itemFull))
| (iid, kit@(k, _)) <- EM.assocs bag
, let itemFull = itemToF iid kit
benefit = totalUsefulness cops b activeItems fact itemFull
hind = hinders condAnyFoeAdj condLightBetrays
condTgtEnemyPresent condNotCalmEnough
b activeItems itemFull
, permitted (fst <$> benefit) itemFull b activeItems
&& (cstore /= CEqp || hind) ]
benCStore cs = do
bag <- getsState $ getActorBag aid cs
return $! ben cs bag
perBag <- mapM benCStore cstores
return $ concat perBag
-- keep it lazy
-- TODO: also take into account dynamic lights *not* wielded by the actor | 1,447 | benAvailableItems :: MonadClient m
=> ActorId
-> (Maybe Int -> ItemFull -> Actor -> [ItemFull] -> Bool)
-> [CStore]
-> m [( (Maybe (Int, Int), (Int, CStore))
, (ItemId, ItemFull) )]
benAvailableItems aid permitted cstores = do
cops <- getsState scops
itemToF <- itemToFullClient
b <- getsState $ getActorBody aid
activeItems <- activeItemsClient aid
fact <- getsState $ (EM.! bfid b) . sfactionD
condAnyFoeAdj <- condAnyFoeAdjM aid
condLightBetrays <- condLightBetraysM aid
condTgtEnemyPresent <- condTgtEnemyPresentM aid
condNotCalmEnough <- condNotCalmEnoughM aid
let ben cstore bag =
[ ((benefit, (k, cstore)), (iid, itemFull))
| (iid, kit@(k, _)) <- EM.assocs bag
, let itemFull = itemToF iid kit
benefit = totalUsefulness cops b activeItems fact itemFull
hind = hinders condAnyFoeAdj condLightBetrays
condTgtEnemyPresent condNotCalmEnough
b activeItems itemFull
, permitted (fst <$> benefit) itemFull b activeItems
&& (cstore /= CEqp || hind) ]
benCStore cs = do
bag <- getsState $ getActorBag aid cs
return $! ben cs bag
perBag <- mapM benCStore cstores
return $ concat perBag
-- keep it lazy
-- TODO: also take into account dynamic lights *not* wielded by the actor | 1,447 | benAvailableItems aid permitted cstores = do
cops <- getsState scops
itemToF <- itemToFullClient
b <- getsState $ getActorBody aid
activeItems <- activeItemsClient aid
fact <- getsState $ (EM.! bfid b) . sfactionD
condAnyFoeAdj <- condAnyFoeAdjM aid
condLightBetrays <- condLightBetraysM aid
condTgtEnemyPresent <- condTgtEnemyPresentM aid
condNotCalmEnough <- condNotCalmEnoughM aid
let ben cstore bag =
[ ((benefit, (k, cstore)), (iid, itemFull))
| (iid, kit@(k, _)) <- EM.assocs bag
, let itemFull = itemToF iid kit
benefit = totalUsefulness cops b activeItems fact itemFull
hind = hinders condAnyFoeAdj condLightBetrays
condTgtEnemyPresent condNotCalmEnough
b activeItems itemFull
, permitted (fst <$> benefit) itemFull b activeItems
&& (cstore /= CEqp || hind) ]
benCStore cs = do
bag <- getsState $ getActorBag aid cs
return $! ben cs bag
perBag <- mapM benCStore cstores
return $ concat perBag
-- keep it lazy
-- TODO: also take into account dynamic lights *not* wielded by the actor | 1,169 | false | true | 5 | 14 | 453 | 417 | 212 | 205 | null | null |
haroldcarr/learn-haskell-coq-ml-etc | haskell/topic/trees-that-grow-and-shrink/2018-06-vaibhav-sagar-trees-that-shrink/X_1.hs | unlicense | ex3 :: Expr Int
ex3 = desugarAndDeBruijn Map.empty ex3' | 55 | ex3 :: Expr Int
ex3 = desugarAndDeBruijn Map.empty ex3' | 55 | ex3 = desugarAndDeBruijn Map.empty ex3' | 39 | false | true | 1 | 6 | 8 | 24 | 10 | 14 | null | null |
nfrisby/yoko | Data/Yoko/TH.hs | bsd-2-clause | pat_exp :: Name -> Name -> Int -> (Pat, Exp)
pat_exp np ne k = (ConP np $ map VarP ns,
foldl ((. VarE) . AppE) (ConE ne) ns) where
ns = [ mkName $ "x" ++ show i | i <- [0..k - 1] ] | 201 | pat_exp :: Name -> Name -> Int -> (Pat, Exp)
pat_exp np ne k = (ConP np $ map VarP ns,
foldl ((. VarE) . AppE) (ConE ne) ns) where
ns = [ mkName $ "x" ++ show i | i <- [0..k - 1] ] | 201 | pat_exp np ne k = (ConP np $ map VarP ns,
foldl ((. VarE) . AppE) (ConE ne) ns) where
ns = [ mkName $ "x" ++ show i | i <- [0..k - 1] ] | 156 | false | true | 0 | 11 | 66 | 116 | 61 | 55 | null | null |
thielema/optparse-applicative | tests/Tests.hs | bsd-3-clause | case_issue_47 :: Assertion
case_issue_47 = do
let p = nullOption (long "test" <> reader r <> value 9) :: Parser Int
r _ = readerError "error message"
result = run (info p idm) ["--test", "x"]
assertError result $ \(ParserFailure err) -> do
let text = head . lines . fst . err $ "test"
assertBool "no error message"
("error message" `isInfixOf` text) | 388 | case_issue_47 :: Assertion
case_issue_47 = do
let p = nullOption (long "test" <> reader r <> value 9) :: Parser Int
r _ = readerError "error message"
result = run (info p idm) ["--test", "x"]
assertError result $ \(ParserFailure err) -> do
let text = head . lines . fst . err $ "test"
assertBool "no error message"
("error message" `isInfixOf` text) | 388 | case_issue_47 = do
let p = nullOption (long "test" <> reader r <> value 9) :: Parser Int
r _ = readerError "error message"
result = run (info p idm) ["--test", "x"]
assertError result $ \(ParserFailure err) -> do
let text = head . lines . fst . err $ "test"
assertBool "no error message"
("error message" `isInfixOf` text) | 361 | false | true | 0 | 17 | 100 | 147 | 72 | 75 | null | null |
GaloisInc/saw-script | heapster-saw/src/Verifier/SAW/Heapster/RustTypes.hs | bsd-3-clause | layoutArgShapeByVal Rust (PExpr_ExShape mb_sh) =
existsArgLayout <$> mbM (fmap (layoutArgShapeByVal Rust) mb_sh) | 114 | layoutArgShapeByVal Rust (PExpr_ExShape mb_sh) =
existsArgLayout <$> mbM (fmap (layoutArgShapeByVal Rust) mb_sh) | 114 | layoutArgShapeByVal Rust (PExpr_ExShape mb_sh) =
existsArgLayout <$> mbM (fmap (layoutArgShapeByVal Rust) mb_sh) | 114 | false | false | 0 | 10 | 13 | 38 | 18 | 20 | null | null |
keithodulaigh/Hets | Framework/WriteLogicUtils.hs | gpl-2.0 | prefixBy :: String -> [String] -> [String]
prefixBy s = map (s ++) | 66 | prefixBy :: String -> [String] -> [String]
prefixBy s = map (s ++) | 66 | prefixBy s = map (s ++) | 23 | false | true | 0 | 7 | 12 | 35 | 19 | 16 | null | null |
meiersi/blaze-builder | Blaze/ByteString/Builder/Html/Utf8.hs | bsd-3-clause | -- | /O(1)./ Serialize a HTML escaped Unicode character using the UTF-8
-- encoding.
--
fromHtmlEscapedChar :: Char -> Builder
fromHtmlEscapedChar = fromWriteSingleton writeHtmlEscapedChar | 188 | fromHtmlEscapedChar :: Char -> Builder
fromHtmlEscapedChar = fromWriteSingleton writeHtmlEscapedChar | 100 | fromHtmlEscapedChar = fromWriteSingleton writeHtmlEscapedChar | 61 | true | true | 0 | 7 | 23 | 27 | 13 | 14 | null | null |
denibertovic/haskell | kubernetes/lib/Kubernetes/OpenAPI/ModelLens.hs | bsd-3-clause | -- | 'v1beta2DeploymentConditionMessage' Lens
v1beta2DeploymentConditionMessageL :: Lens_' V1beta2DeploymentCondition (Maybe Text)
v1beta2DeploymentConditionMessageL f V1beta2DeploymentCondition{..} = (\v1beta2DeploymentConditionMessage -> V1beta2DeploymentCondition { v1beta2DeploymentConditionMessage, ..} ) <$> f v1beta2DeploymentConditionMessage | 349 | v1beta2DeploymentConditionMessageL :: Lens_' V1beta2DeploymentCondition (Maybe Text)
v1beta2DeploymentConditionMessageL f V1beta2DeploymentCondition{..} = (\v1beta2DeploymentConditionMessage -> V1beta2DeploymentCondition { v1beta2DeploymentConditionMessage, ..} ) <$> f v1beta2DeploymentConditionMessage | 303 | v1beta2DeploymentConditionMessageL f V1beta2DeploymentCondition{..} = (\v1beta2DeploymentConditionMessage -> V1beta2DeploymentCondition { v1beta2DeploymentConditionMessage, ..} ) <$> f v1beta2DeploymentConditionMessage | 218 | true | true | 0 | 8 | 23 | 57 | 30 | 27 | null | null |
tbarnetlamb/hyphen | hyphen/lowlevel_src/HsType.hs | gpl-2.0 | -- | Main way of making an HsType from the 'true' fields, the head and
-- the tail. As mentioned in the docstring for HsType itself, not all
-- combinations of a head and a tail will be legal (some fail to
-- Kind-check); in case of failure, this function gives a nice,
-- monadic error message.
mkHsTypeSafe :: Either TyCon (Var, Kind) -> [HsType] -> Either ErrMsg HsType
mkHsTypeSafe head tail = let
thash = case head of (Left c) -> hash (c, tail)
(Right v) -> hash (("tyvar", v), tail)
fvMaps = headVars head : zipWith tailVars [1..] tail
headVars (Right (v,k)) = Map.fromList [(v, Right (k,"in the head of the new type"))]
headVars _ = Map.empty
tailVars i hst = let f k = Right (k, "in argument " ++ show i ++ "of the new type")
in f <$> typeFreeVars hst
fvMap = foldl (Map.unionWithKey combine) Map.empty fvMaps
combine _ a@(Left _) _ = a
combine _ _ a@(Left _) = a
combine v a@(Right (k1, r1)) (Right (k2, r2))
| k1 == k2 = a
| otherwise = Left (
"Error in attempting to construct type " ++ T.unpack name ++ "; type variable " ++
T.unpack (getVar v) ++ " has kind " ++ kindString k1 ++
" " ++ r1 ++ ", but has kind " ++ kindString k2 ++ " " ++ r2 ++ ".")
(errMsgIntro, headKind) = case head of
(Left c) -> ("Type constructor " ++ T.unpack (tyConName c), tyConKind c)
(Right (Var v, k)) -> ("Type variable " ++ T.unpack v, k )
resultKind = Kind . drop (length tail) . kindArgKinds $ headKind
kindArityCheck :: Either ErrMsg ()
kindArityCheck = let
arity = (length (kindArgKinds headKind)) :: Int
in when (arity < length tail) $ report (
errMsgIntro ++ " applied to too many type variables. It has kind " ++
kindString headKind ++ ", so should be applied to at most " ++ show arity ++
"arguments; instead, it is applied to the " ++ show (length tail :: Int) ++
" arguments " ++ (unwords $ map (T.unpack . typeName) tail) ++ ".")
argKindCheck :: Int -> Kind -> Kind -> Either ErrMsg ()
argKindCheck i kExpected kActual
= unless (kExpected == kActual) $ report (
errMsgIntro ++ " has kind " ++ kindString headKind ++ ", so its parameter number "
++ show i ++ " should have kind " ++ kindString kExpected ++ " but the actual "
++ "parameter " ++ T.unpack (typeName (tail !! (i - 1))) ++ " has kind "
++ kindString kActual)
name | either isTupTyCon (const False) head = bracket (
T.intercalate (T.pack ", ") (map typeName tail))
| either isListTyCon (const False) head = T.concat [
T.pack "[", T.intercalate (T.pack ", ") (map typeName tail), T.pack "]"]
| head == Left fnTyCon = T.concat $ case tail of
[frty, toty] ->
if typeHead frty == Left fnTyCon
then [bracketedTypeName frty, T.pack " -> ", typeName toty]
else [typeName frty, T.pack " -> ", typeName toty]
| otherwise = let headName (Left c) = tyConFullName c
headName (Right (Var v, k)) = v
in T.unwords (headName head:map bracketedTypeName tail)
in do kindArityCheck
sequence $ zipWith3 argKindCheck [1..] (kindArgKinds headKind) (map typeKind tail)
fvs <- Data.Traversable.mapM (either report (return . fst)) fvMap
return $ HsType thash (force head) tail resultKind fvs name
-- | Is this type monomorphic (free of type variables)? | 3,573 | mkHsTypeSafe :: Either TyCon (Var, Kind) -> [HsType] -> Either ErrMsg HsType
mkHsTypeSafe head tail = let
thash = case head of (Left c) -> hash (c, tail)
(Right v) -> hash (("tyvar", v), tail)
fvMaps = headVars head : zipWith tailVars [1..] tail
headVars (Right (v,k)) = Map.fromList [(v, Right (k,"in the head of the new type"))]
headVars _ = Map.empty
tailVars i hst = let f k = Right (k, "in argument " ++ show i ++ "of the new type")
in f <$> typeFreeVars hst
fvMap = foldl (Map.unionWithKey combine) Map.empty fvMaps
combine _ a@(Left _) _ = a
combine _ _ a@(Left _) = a
combine v a@(Right (k1, r1)) (Right (k2, r2))
| k1 == k2 = a
| otherwise = Left (
"Error in attempting to construct type " ++ T.unpack name ++ "; type variable " ++
T.unpack (getVar v) ++ " has kind " ++ kindString k1 ++
" " ++ r1 ++ ", but has kind " ++ kindString k2 ++ " " ++ r2 ++ ".")
(errMsgIntro, headKind) = case head of
(Left c) -> ("Type constructor " ++ T.unpack (tyConName c), tyConKind c)
(Right (Var v, k)) -> ("Type variable " ++ T.unpack v, k )
resultKind = Kind . drop (length tail) . kindArgKinds $ headKind
kindArityCheck :: Either ErrMsg ()
kindArityCheck = let
arity = (length (kindArgKinds headKind)) :: Int
in when (arity < length tail) $ report (
errMsgIntro ++ " applied to too many type variables. It has kind " ++
kindString headKind ++ ", so should be applied to at most " ++ show arity ++
"arguments; instead, it is applied to the " ++ show (length tail :: Int) ++
" arguments " ++ (unwords $ map (T.unpack . typeName) tail) ++ ".")
argKindCheck :: Int -> Kind -> Kind -> Either ErrMsg ()
argKindCheck i kExpected kActual
= unless (kExpected == kActual) $ report (
errMsgIntro ++ " has kind " ++ kindString headKind ++ ", so its parameter number "
++ show i ++ " should have kind " ++ kindString kExpected ++ " but the actual "
++ "parameter " ++ T.unpack (typeName (tail !! (i - 1))) ++ " has kind "
++ kindString kActual)
name | either isTupTyCon (const False) head = bracket (
T.intercalate (T.pack ", ") (map typeName tail))
| either isListTyCon (const False) head = T.concat [
T.pack "[", T.intercalate (T.pack ", ") (map typeName tail), T.pack "]"]
| head == Left fnTyCon = T.concat $ case tail of
[frty, toty] ->
if typeHead frty == Left fnTyCon
then [bracketedTypeName frty, T.pack " -> ", typeName toty]
else [typeName frty, T.pack " -> ", typeName toty]
| otherwise = let headName (Left c) = tyConFullName c
headName (Right (Var v, k)) = v
in T.unwords (headName head:map bracketedTypeName tail)
in do kindArityCheck
sequence $ zipWith3 argKindCheck [1..] (kindArgKinds headKind) (map typeKind tail)
fvs <- Data.Traversable.mapM (either report (return . fst)) fvMap
return $ HsType thash (force head) tail resultKind fvs name
-- | Is this type monomorphic (free of type variables)? | 3,276 | mkHsTypeSafe head tail = let
thash = case head of (Left c) -> hash (c, tail)
(Right v) -> hash (("tyvar", v), tail)
fvMaps = headVars head : zipWith tailVars [1..] tail
headVars (Right (v,k)) = Map.fromList [(v, Right (k,"in the head of the new type"))]
headVars _ = Map.empty
tailVars i hst = let f k = Right (k, "in argument " ++ show i ++ "of the new type")
in f <$> typeFreeVars hst
fvMap = foldl (Map.unionWithKey combine) Map.empty fvMaps
combine _ a@(Left _) _ = a
combine _ _ a@(Left _) = a
combine v a@(Right (k1, r1)) (Right (k2, r2))
| k1 == k2 = a
| otherwise = Left (
"Error in attempting to construct type " ++ T.unpack name ++ "; type variable " ++
T.unpack (getVar v) ++ " has kind " ++ kindString k1 ++
" " ++ r1 ++ ", but has kind " ++ kindString k2 ++ " " ++ r2 ++ ".")
(errMsgIntro, headKind) = case head of
(Left c) -> ("Type constructor " ++ T.unpack (tyConName c), tyConKind c)
(Right (Var v, k)) -> ("Type variable " ++ T.unpack v, k )
resultKind = Kind . drop (length tail) . kindArgKinds $ headKind
kindArityCheck :: Either ErrMsg ()
kindArityCheck = let
arity = (length (kindArgKinds headKind)) :: Int
in when (arity < length tail) $ report (
errMsgIntro ++ " applied to too many type variables. It has kind " ++
kindString headKind ++ ", so should be applied to at most " ++ show arity ++
"arguments; instead, it is applied to the " ++ show (length tail :: Int) ++
" arguments " ++ (unwords $ map (T.unpack . typeName) tail) ++ ".")
argKindCheck :: Int -> Kind -> Kind -> Either ErrMsg ()
argKindCheck i kExpected kActual
= unless (kExpected == kActual) $ report (
errMsgIntro ++ " has kind " ++ kindString headKind ++ ", so its parameter number "
++ show i ++ " should have kind " ++ kindString kExpected ++ " but the actual "
++ "parameter " ++ T.unpack (typeName (tail !! (i - 1))) ++ " has kind "
++ kindString kActual)
name | either isTupTyCon (const False) head = bracket (
T.intercalate (T.pack ", ") (map typeName tail))
| either isListTyCon (const False) head = T.concat [
T.pack "[", T.intercalate (T.pack ", ") (map typeName tail), T.pack "]"]
| head == Left fnTyCon = T.concat $ case tail of
[frty, toty] ->
if typeHead frty == Left fnTyCon
then [bracketedTypeName frty, T.pack " -> ", typeName toty]
else [typeName frty, T.pack " -> ", typeName toty]
| otherwise = let headName (Left c) = tyConFullName c
headName (Right (Var v, k)) = v
in T.unwords (headName head:map bracketedTypeName tail)
in do kindArityCheck
sequence $ zipWith3 argKindCheck [1..] (kindArgKinds headKind) (map typeKind tail)
fvs <- Data.Traversable.mapM (either report (return . fst)) fvMap
return $ HsType thash (force head) tail resultKind fvs name
-- | Is this type monomorphic (free of type variables)? | 3,199 | true | true | 0 | 25 | 1,053 | 1,218 | 606 | 612 | null | null |
agrafix/legoDSL | NXT/VM/Interpretation.hs | bsd-3-clause | runT funMap env (CastOp "cast2float" val) =
do evaluated <- runT funMap env val
case evaluated of
NInt i -> return $ NFloat $ fromIntegral i
_ -> error "Invalid cast." | 200 | runT funMap env (CastOp "cast2float" val) =
do evaluated <- runT funMap env val
case evaluated of
NInt i -> return $ NFloat $ fromIntegral i
_ -> error "Invalid cast." | 200 | runT funMap env (CastOp "cast2float" val) =
do evaluated <- runT funMap env val
case evaluated of
NInt i -> return $ NFloat $ fromIntegral i
_ -> error "Invalid cast." | 200 | false | false | 0 | 11 | 63 | 72 | 32 | 40 | null | null |
Teaspot-Studio/Urho3D-Haskell | src/Graphics/Urho3D/Graphics/OctreeQuery.hs | mit | rayOctreeQueryGetRay :: (Parent RayOctreeQuery a, Pointer ptr a, MonadIO m)
=> ptr -- ^ Pointer to RayOctreeQuery of ascentor
-> m Ray
rayOctreeQueryGetRay p = liftIO $ do
let ptr = parentPointer p
peek =<< [C.exp| Ray* { &$(RayOctreeQuery* ptr)->ray_ } |]
-- | Write ray of ray octree query | 300 | rayOctreeQueryGetRay :: (Parent RayOctreeQuery a, Pointer ptr a, MonadIO m)
=> ptr -- ^ Pointer to RayOctreeQuery of ascentor
-> m Ray
rayOctreeQueryGetRay p = liftIO $ do
let ptr = parentPointer p
peek =<< [C.exp| Ray* { &$(RayOctreeQuery* ptr)->ray_ } |]
-- | Write ray of ray octree query | 300 | rayOctreeQueryGetRay p = liftIO $ do
let ptr = parentPointer p
peek =<< [C.exp| Ray* { &$(RayOctreeQuery* ptr)->ray_ } |]
-- | Write ray of ray octree query | 161 | false | true | 0 | 11 | 58 | 78 | 40 | 38 | null | null |
Lythimus/lptv | sites/all/modules/jgm-pandoc-8be6cc2/src/Text/Pandoc/Readers/TeXMath.hs | gpl-2.0 | expToInlines (ESub x y) = do
x' <- expToInlines x
y' <- expToInlines y
return $ x' ++ [Subscript y'] | 106 | expToInlines (ESub x y) = do
x' <- expToInlines x
y' <- expToInlines y
return $ x' ++ [Subscript y'] | 106 | expToInlines (ESub x y) = do
x' <- expToInlines x
y' <- expToInlines y
return $ x' ++ [Subscript y'] | 106 | false | false | 0 | 9 | 25 | 55 | 24 | 31 | null | null |
athanclark/sets | src/Data/Set/Ordered/Unique/With.hs | mit | (\\) :: Ord k => SetWith k a -> SetWith k a -> SetWith k a
(SetWith (f,xs)) \\ (SetWith (_,ys)) = SetWith (f, Map.difference xs ys) | 131 | (\\) :: Ord k => SetWith k a -> SetWith k a -> SetWith k a
(SetWith (f,xs)) \\ (SetWith (_,ys)) = SetWith (f, Map.difference xs ys) | 131 | (SetWith (f,xs)) \\ (SetWith (_,ys)) = SetWith (f, Map.difference xs ys) | 72 | false | true | 0 | 13 | 26 | 92 | 46 | 46 | null | null |
lrassaby/harmlang | examples/first.hs | mit | testQuasiQuotingWhitespace2 = let
got = [hl| [A@7:4]
|]
should = [Note (Pitch (PitchClass 0) (Octave 4)) (Time 7 4)]
in
TestCase $ assertEqual "QuasiQuoting Whitespace 2" should got | 204 | testQuasiQuotingWhitespace2 = let
got = [hl| [A@7:4]
|]
should = [Note (Pitch (PitchClass 0) (Octave 4)) (Time 7 4)]
in
TestCase $ assertEqual "QuasiQuoting Whitespace 2" should got | 204 | testQuasiQuotingWhitespace2 = let
got = [hl| [A@7:4]
|]
should = [Note (Pitch (PitchClass 0) (Octave 4)) (Time 7 4)]
in
TestCase $ assertEqual "QuasiQuoting Whitespace 2" should got | 204 | false | false | 0 | 14 | 50 | 73 | 38 | 35 | null | null |
fultonms/artificial-intelligence | a2/parkingB.hs | mit | -- moves all cars in the parking lot
-- takes a board
-- returns a list of boards resulting from moving
moveCars :: Board -> [Board]
moveCars (B (c,p)) = moveCarsPrev c [] p | 173 | moveCars :: Board -> [Board]
moveCars (B (c,p)) = moveCarsPrev c [] p | 69 | moveCars (B (c,p)) = moveCarsPrev c [] p | 40 | true | true | 0 | 10 | 33 | 50 | 26 | 24 | null | null |
JacquesCarette/literate-scientific-software | code/drasil-code/Language/Drasil/Code/DataDesc.hs | bsd-2-clause | getDataInputs (Line lp _) = getPatternInputs lp | 47 | getDataInputs (Line lp _) = getPatternInputs lp | 47 | getDataInputs (Line lp _) = getPatternInputs lp | 47 | false | false | 0 | 7 | 6 | 20 | 9 | 11 | null | null |
CGenie/hgeometry | src/Data/Geometry/Line.hs | bsd-3-clause | isSimpleLine _ = False | 36 | isSimpleLine _ = False | 36 | isSimpleLine _ = False | 36 | false | false | 0 | 4 | 17 | 10 | 4 | 6 | null | null |
geophf/1HaskellADay | exercises/HAD/Y2018/M04/D13/Solution.hs | mit | packetReader :: PageNumber -> PageNumber -> Tries -> IO ()
packetReader n m t =
if n > m
then putStrLn "Done"
else if t > 3
then error ("Tried three times at offset " ++ show n ++ "; quitting")
else readPacket n >>= either (savePacket n m) (errOut n m t) | 279 | packetReader :: PageNumber -> PageNumber -> Tries -> IO ()
packetReader n m t =
if n > m
then putStrLn "Done"
else if t > 3
then error ("Tried three times at offset " ++ show n ++ "; quitting")
else readPacket n >>= either (savePacket n m) (errOut n m t) | 279 | packetReader n m t =
if n > m
then putStrLn "Done"
else if t > 3
then error ("Tried three times at offset " ++ show n ++ "; quitting")
else readPacket n >>= either (savePacket n m) (errOut n m t) | 220 | false | true | 0 | 11 | 77 | 109 | 54 | 55 | null | null |
nevrenato/Hets_Fork | Comorphisms/HasCASL2THF0.hs | gpl-2.0 | genIdConstantMap :: Env -> Result IdConstantMap
genIdConstantMap e = foldM (\ icm (i, _) -> do
c <- transTypeId i
return $ Map.insert i c icm)
Map.empty (Map.toList (HCLe.typeMap e)) | 210 | genIdConstantMap :: Env -> Result IdConstantMap
genIdConstantMap e = foldM (\ icm (i, _) -> do
c <- transTypeId i
return $ Map.insert i c icm)
Map.empty (Map.toList (HCLe.typeMap e)) | 210 | genIdConstantMap e = foldM (\ icm (i, _) -> do
c <- transTypeId i
return $ Map.insert i c icm)
Map.empty (Map.toList (HCLe.typeMap e)) | 162 | false | true | 0 | 12 | 57 | 90 | 43 | 47 | null | null |
ulricha/algebra-sql | src/Database/Algebra/SQL/Render/Query.hs | bsd-3-clause | -- | Compute scale for the SQL decimal type
computeScale :: Int -> Int -> Int
computeScale l e
| e == 0 = l
| e > 0 && l > e = l - e
| e > 0 = 0
| otherwise = l + negate e | 201 | computeScale :: Int -> Int -> Int
computeScale l e
| e == 0 = l
| e > 0 && l > e = l - e
| e > 0 = 0
| otherwise = l + negate e | 157 | computeScale l e
| e == 0 = l
| e > 0 && l > e = l - e
| e > 0 = 0
| otherwise = l + negate e | 123 | true | true | 2 | 10 | 79 | 89 | 43 | 46 | null | null |
t3476/heukarya | src/AI/Heukarya/Test.hs | bsd-3-clause | testMutated23 = testJungle2 >>= \z ->
mutateJungle (mkStdGen 13) 5 testGene z 0.5 | 84 | testMutated23 = testJungle2 >>= \z ->
mutateJungle (mkStdGen 13) 5 testGene z 0.5 | 84 | testMutated23 = testJungle2 >>= \z ->
mutateJungle (mkStdGen 13) 5 testGene z 0.5 | 84 | false | false | 0 | 9 | 15 | 32 | 16 | 16 | null | null |
hsinhuang/codebase | FP101x/lab3.hs | gpl-2.0 | sumSquares' :: Integer -> Integer
sumSquares' x = sum . uncurry squares' $ (x, x) | 81 | sumSquares' :: Integer -> Integer
sumSquares' x = sum . uncurry squares' $ (x, x) | 81 | sumSquares' x = sum . uncurry squares' $ (x, x) | 47 | false | true | 0 | 7 | 14 | 35 | 18 | 17 | null | null |
input-output-hk/cardano-sl | generator/src/Pos/Generator/BlockEvent/DSL.hs | apache-2.0 | runBlockEventGenT
:: BlockTxpGenMode g ctx m
=> Genesis.Config
-> TxpConfiguration
-> AllSecrets
-> GenesisWStakeholders
-> BlockEventGenT g m ()
-> RandT g m BlockScenario
runBlockEventGenT genesisConfig txpConfig secrets genStakeholders m = do
(annotations, preBlockScenario) <- runBlockEventGenT' m
genBlocksInStructure genesisConfig txpConfig secrets genStakeholders annotations preBlockScenario | 435 | runBlockEventGenT
:: BlockTxpGenMode g ctx m
=> Genesis.Config
-> TxpConfiguration
-> AllSecrets
-> GenesisWStakeholders
-> BlockEventGenT g m ()
-> RandT g m BlockScenario
runBlockEventGenT genesisConfig txpConfig secrets genStakeholders m = do
(annotations, preBlockScenario) <- runBlockEventGenT' m
genBlocksInStructure genesisConfig txpConfig secrets genStakeholders annotations preBlockScenario | 435 | runBlockEventGenT genesisConfig txpConfig secrets genStakeholders m = do
(annotations, preBlockScenario) <- runBlockEventGenT' m
genBlocksInStructure genesisConfig txpConfig secrets genStakeholders annotations preBlockScenario | 234 | false | true | 0 | 13 | 79 | 108 | 50 | 58 | null | null |
timthelion/fenfire | Fenfire/RDF.hs | gpl-2.0 | fromRDFPair :: Node -> FromRdfM a -> Node -> FromRdfM b -> FromRdfM (a,b)
fromRDFPair p1 f1 p2 f2 g n = do
n1 <- query (n, p1, X) g; n2 <- query (n, p2, X) g
v1 <- f1 g n1; v2 <- f2 g n2; return (v1,v2) | 210 | fromRDFPair :: Node -> FromRdfM a -> Node -> FromRdfM b -> FromRdfM (a,b)
fromRDFPair p1 f1 p2 f2 g n = do
n1 <- query (n, p1, X) g; n2 <- query (n, p2, X) g
v1 <- f1 g n1; v2 <- f2 g n2; return (v1,v2) | 210 | fromRDFPair p1 f1 p2 f2 g n = do
n1 <- query (n, p1, X) g; n2 <- query (n, p2, X) g
v1 <- f1 g n1; v2 <- f2 g n2; return (v1,v2) | 136 | false | true | 0 | 11 | 56 | 141 | 69 | 72 | null | null |
gridaphobe/ghc | testsuite/tests/dependent/should_compile/dynamic-paper.hs | bsd-3-clause | frontEnd = undefined | 20 | frontEnd = undefined | 20 | frontEnd = undefined | 20 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
ml9951/ThreadScope | papers/haskell_symposium_2009/sumEuler/SumEuler0.hs | bsd-3-clause | -------------------------------------------------------------------------------
main :: IO ()
main
= do putStrLn "SumEuler0 (sequential)"
performGC
t0 <- getClockTime
pseq result1 (return ())
t1 <- getClockTime
putStrLn ("fib time: " ++ show (secDiff t0 t1))
t2 <- getClockTime
pseq result2 (return ())
t3 <- getClockTime
putStrLn ("sumEuler time: " ++ show (secDiff t2 t3))
------------------------------------------------------------------------------- | 536 | main :: IO ()
main
= do putStrLn "SumEuler0 (sequential)"
performGC
t0 <- getClockTime
pseq result1 (return ())
t1 <- getClockTime
putStrLn ("fib time: " ++ show (secDiff t0 t1))
t2 <- getClockTime
pseq result2 (return ())
t3 <- getClockTime
putStrLn ("sumEuler time: " ++ show (secDiff t2 t3))
------------------------------------------------------------------------------- | 452 | main
= do putStrLn "SumEuler0 (sequential)"
performGC
t0 <- getClockTime
pseq result1 (return ())
t1 <- getClockTime
putStrLn ("fib time: " ++ show (secDiff t0 t1))
t2 <- getClockTime
pseq result2 (return ())
t3 <- getClockTime
putStrLn ("sumEuler time: " ++ show (secDiff t2 t3))
------------------------------------------------------------------------------- | 438 | true | true | 0 | 12 | 132 | 137 | 61 | 76 | null | null |
HJvT/GeBoP | Halma.hs | bsd-3-clause | teps :: Properties -> Player -> [(Int, Int)]
steps pr p = steppos (pos pr p)
where
steppos 0 = [( 1, 1), ( 1, 0), ( 0, -1), (-1, -1)]
steppos 1 = [( 0, 1), ( 1, 1), ( 1, 0), ( 0, -1)]
steppos 2 = [(-1, 0), ( 0, 1), ( 1, 1), ( 1, 0)]
steppos 3 = [(-1, -1), (-1, 0), ( 0, 1), ( 1, 1)]
steppos 4 = [( 0, -1), (-1, -1), (-1, 0), ( 0, 1)]
steppos 5 = [( 1, 0), ( 0, -1), (-1, -1), (-1, 0)]
steppos _ = error "steps: Unexpected value"
{-
jumps :: [(Int, Int)]
jumps = map (\(x, y) -> (2 * x, 2 * y)) halfjumps
-}
| 554 | steps :: Properties -> Player -> [(Int, Int)]
steps pr p = steppos (pos pr p)
where
steppos 0 = [( 1, 1), ( 1, 0), ( 0, -1), (-1, -1)]
steppos 1 = [( 0, 1), ( 1, 1), ( 1, 0), ( 0, -1)]
steppos 2 = [(-1, 0), ( 0, 1), ( 1, 1), ( 1, 0)]
steppos 3 = [(-1, -1), (-1, 0), ( 0, 1), ( 1, 1)]
steppos 4 = [( 0, -1), (-1, -1), (-1, 0), ( 0, 1)]
steppos 5 = [( 1, 0), ( 0, -1), (-1, -1), (-1, 0)]
steppos _ = error "steps: Unexpected value"
{-
jumps :: [(Int, Int)]
jumps = map (\(x, y) -> (2 * x, 2 * y)) halfjumps
-} | 554 | steps pr p = steppos (pos pr p)
where
steppos 0 = [( 1, 1), ( 1, 0), ( 0, -1), (-1, -1)]
steppos 1 = [( 0, 1), ( 1, 1), ( 1, 0), ( 0, -1)]
steppos 2 = [(-1, 0), ( 0, 1), ( 1, 1), ( 1, 0)]
steppos 3 = [(-1, -1), (-1, 0), ( 0, 1), ( 1, 1)]
steppos 4 = [( 0, -1), (-1, -1), (-1, 0), ( 0, 1)]
steppos 5 = [( 1, 0), ( 0, -1), (-1, -1), (-1, 0)]
steppos _ = error "steps: Unexpected value"
{-
jumps :: [(Int, Int)]
jumps = map (\(x, y) -> (2 * x, 2 * y)) halfjumps
-} | 508 | false | true | 6 | 10 | 172 | 379 | 215 | 164 | null | null |
dmcclean/HaTeX | Text/LaTeX/Base/Parser.hs | bsd-3-clause | comment :: Parser LaTeX
comment = do
_ <- char '%'
c <- takeTill (== '\n')
e <- atEnd
unless e (char '\n' >>= \_ -> return ())
return $ TeXComment c
------------------------------------------------------------------------
-- Helpers
------------------------------------------------------------------------ | 319 | comment :: Parser LaTeX
comment = do
_ <- char '%'
c <- takeTill (== '\n')
e <- atEnd
unless e (char '\n' >>= \_ -> return ())
return $ TeXComment c
------------------------------------------------------------------------
-- Helpers
------------------------------------------------------------------------ | 319 | comment = do
_ <- char '%'
c <- takeTill (== '\n')
e <- atEnd
unless e (char '\n' >>= \_ -> return ())
return $ TeXComment c
------------------------------------------------------------------------
-- Helpers
------------------------------------------------------------------------ | 295 | false | true | 1 | 13 | 49 | 90 | 41 | 49 | null | null |
kosmoskatten/linx-gateway | src/Network/Linx/Gateway.hs | mit | hunt :: Gateway -> String -> Signal -> IO (Maybe Pid)
hunt gw client signal' = do
reply <- expectPayload (handle gw)
=<< talkGateway (handle gw) (mkHuntRequest signal' (mkCString client))
let pid' = pid reply
return $
case pid' of
Pid 0 -> Nothing
_ -> Just pid'
-- | Ask the gateway server to execute a receive call with the
-- specified timeout value. If no signal is received within the time
-- the value of 'Nothing' is returned. | 464 | hunt :: Gateway -> String -> Signal -> IO (Maybe Pid)
hunt gw client signal' = do
reply <- expectPayload (handle gw)
=<< talkGateway (handle gw) (mkHuntRequest signal' (mkCString client))
let pid' = pid reply
return $
case pid' of
Pid 0 -> Nothing
_ -> Just pid'
-- | Ask the gateway server to execute a receive call with the
-- specified timeout value. If no signal is received within the time
-- the value of 'Nothing' is returned. | 464 | hunt gw client signal' = do
reply <- expectPayload (handle gw)
=<< talkGateway (handle gw) (mkHuntRequest signal' (mkCString client))
let pid' = pid reply
return $
case pid' of
Pid 0 -> Nothing
_ -> Just pid'
-- | Ask the gateway server to execute a receive call with the
-- specified timeout value. If no signal is received within the time
-- the value of 'Nothing' is returned. | 410 | false | true | 0 | 14 | 110 | 133 | 62 | 71 | null | null |
acfoltzer/text-register-machine | Language/TRM/Base.hs | bsd-3-clause | snocReg :: Register -> Letter -> Map Register Word -> Map Register Word
snocReg r l regs = Map.insertWith (flip (++)) r (W [l]) regs | 132 | snocReg :: Register -> Letter -> Map Register Word -> Map Register Word
snocReg r l regs = Map.insertWith (flip (++)) r (W [l]) regs | 132 | snocReg r l regs = Map.insertWith (flip (++)) r (W [l]) regs | 60 | false | true | 0 | 8 | 24 | 68 | 34 | 34 | null | null |
eijian/raytracer | test/Main-t7.hs | bsd-3-clause | main :: IO ()
main = do
let v1 = initVec 2.1 4.5 8.2
let v2 = initVec 1.1 2.5 7.2
let s = 4.7
tryN "noop " (\x -> v1) ntry
tryN "new " (\x -> genVec x) ntry
tryN "add " (\x -> vadd (genVec x) v2) ntry
tryN "sub " (\x -> vsub (genVec x) v2) ntry
tryN "scale" (\x -> vscale s (genVec x)) ntry
tryN "dot " (\x -> initVec (dot (genVec x) v2) 0 0) ntry
tryN "cross" (\x -> cross (genVec x) v2) ntry | 418 | main :: IO ()
main = do
let v1 = initVec 2.1 4.5 8.2
let v2 = initVec 1.1 2.5 7.2
let s = 4.7
tryN "noop " (\x -> v1) ntry
tryN "new " (\x -> genVec x) ntry
tryN "add " (\x -> vadd (genVec x) v2) ntry
tryN "sub " (\x -> vsub (genVec x) v2) ntry
tryN "scale" (\x -> vscale s (genVec x)) ntry
tryN "dot " (\x -> initVec (dot (genVec x) v2) 0 0) ntry
tryN "cross" (\x -> cross (genVec x) v2) ntry | 418 | main = do
let v1 = initVec 2.1 4.5 8.2
let v2 = initVec 1.1 2.5 7.2
let s = 4.7
tryN "noop " (\x -> v1) ntry
tryN "new " (\x -> genVec x) ntry
tryN "add " (\x -> vadd (genVec x) v2) ntry
tryN "sub " (\x -> vsub (genVec x) v2) ntry
tryN "scale" (\x -> vscale s (genVec x)) ntry
tryN "dot " (\x -> initVec (dot (genVec x) v2) 0 0) ntry
tryN "cross" (\x -> cross (genVec x) v2) ntry | 404 | false | true | 0 | 14 | 115 | 251 | 120 | 131 | null | null |
sdiehl/pretty-latex | Text/Latex.hs | mit | arcsin = undefined | 18 | arcsin = undefined | 18 | arcsin = undefined | 18 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
wavewave/lhc-analysis-collection | analysis/XQLD_sqonly_ATLAS0L2to6JMETAnalysis.hs | gpl-3.0 | nbsmlimit = [ (CL, 51)
, (EL, 77)
, (AM, 24)
, (A'M, 28)
, (CM, 17)
, (EM, 11)
, (AT, 3.1)
, (BT, 3.0)
, (CT, 16)
, (DT, 9.6)
, (ET, 12) ] | 265 | nbsmlimit = [ (CL, 51)
, (EL, 77)
, (AM, 24)
, (A'M, 28)
, (CM, 17)
, (EM, 11)
, (AT, 3.1)
, (BT, 3.0)
, (CT, 16)
, (DT, 9.6)
, (ET, 12) ] | 265 | nbsmlimit = [ (CL, 51)
, (EL, 77)
, (AM, 24)
, (A'M, 28)
, (CM, 17)
, (EM, 11)
, (AT, 3.1)
, (BT, 3.0)
, (CT, 16)
, (DT, 9.6)
, (ET, 12) ] | 265 | false | false | 0 | 6 | 162 | 105 | 69 | 36 | null | null |
spell-music/temporal-music-notation | src/Temporal/Music/Score.hs | bsd-3-clause | dwnr = dwn wnr | 14 | dwnr = dwn wnr | 14 | dwnr = dwn wnr | 14 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
rueshyna/gogol | gogol-containerbuilder/gen/Network/Google/Resource/Cloudbuild/Projects/Builds/Create.hs | mpl-2.0 | -- | Creates a value of 'ProjectsBuildsCreate' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'pXgafv'
--
-- * 'pUploadProtocol'
--
-- * 'pPp'
--
-- * 'pAccessToken'
--
-- * 'pUploadType'
--
-- * 'pPayload'
--
-- * 'pBearerToken'
--
-- * 'pProjectId'
--
-- * 'pCallback'
projectsBuildsCreate
:: Build -- ^ 'pPayload'
-> Text -- ^ 'pProjectId'
-> ProjectsBuildsCreate
projectsBuildsCreate pPPayload_ pPProjectId_ =
ProjectsBuildsCreate'
{ _pXgafv = Nothing
, _pUploadProtocol = Nothing
, _pPp = True
, _pAccessToken = Nothing
, _pUploadType = Nothing
, _pPayload = pPPayload_
, _pBearerToken = Nothing
, _pProjectId = pPProjectId_
, _pCallback = Nothing
} | 796 | projectsBuildsCreate
:: Build -- ^ 'pPayload'
-> Text -- ^ 'pProjectId'
-> ProjectsBuildsCreate
projectsBuildsCreate pPPayload_ pPProjectId_ =
ProjectsBuildsCreate'
{ _pXgafv = Nothing
, _pUploadProtocol = Nothing
, _pPp = True
, _pAccessToken = Nothing
, _pUploadType = Nothing
, _pPayload = pPPayload_
, _pBearerToken = Nothing
, _pProjectId = pPProjectId_
, _pCallback = Nothing
} | 439 | projectsBuildsCreate pPPayload_ pPProjectId_ =
ProjectsBuildsCreate'
{ _pXgafv = Nothing
, _pUploadProtocol = Nothing
, _pPp = True
, _pAccessToken = Nothing
, _pUploadType = Nothing
, _pPayload = pPPayload_
, _pBearerToken = Nothing
, _pProjectId = pPProjectId_
, _pCallback = Nothing
} | 331 | true | true | 0 | 8 | 176 | 112 | 74 | 38 | null | null |
fmapfmapfmap/amazonka | amazonka-kms/gen/Network/AWS/KMS/ListKeyPolicies.hs | mpl-2.0 | -- | Creates a value of 'ListKeyPoliciesResponse' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'lkprsPolicyNames'
--
-- * 'lkprsTruncated'
--
-- * 'lkprsNextMarker'
--
-- * 'lkprsResponseStatus'
listKeyPoliciesResponse
:: Int -- ^ 'lkprsResponseStatus'
-> ListKeyPoliciesResponse
listKeyPoliciesResponse pResponseStatus_ =
ListKeyPoliciesResponse'
{ _lkprsPolicyNames = Nothing
, _lkprsTruncated = Nothing
, _lkprsNextMarker = Nothing
, _lkprsResponseStatus = pResponseStatus_
} | 598 | listKeyPoliciesResponse
:: Int -- ^ 'lkprsResponseStatus'
-> ListKeyPoliciesResponse
listKeyPoliciesResponse pResponseStatus_ =
ListKeyPoliciesResponse'
{ _lkprsPolicyNames = Nothing
, _lkprsTruncated = Nothing
, _lkprsNextMarker = Nothing
, _lkprsResponseStatus = pResponseStatus_
} | 315 | listKeyPoliciesResponse pResponseStatus_ =
ListKeyPoliciesResponse'
{ _lkprsPolicyNames = Nothing
, _lkprsTruncated = Nothing
, _lkprsNextMarker = Nothing
, _lkprsResponseStatus = pResponseStatus_
} | 222 | true | true | 0 | 7 | 106 | 65 | 40 | 25 | null | null |
vadimjprokopev/Thesis | Haskell/Derivative/Derivative.hs | mit | derive (Cos a) = Product (Neg (Sin a)) (derive a) | 49 | derive (Cos a) = Product (Neg (Sin a)) (derive a) | 49 | derive (Cos a) = Product (Neg (Sin a)) (derive a) | 49 | false | false | 0 | 9 | 9 | 38 | 18 | 20 | null | null |
brendanhay/gogol | gogol-dataflow/gen/Network/Google/Dataflow/Types/Product.hs | mpl-2.0 | -- | Fully qualified source image for disks.
wpDiskSourceImage :: Lens' WorkerPool (Maybe Text)
wpDiskSourceImage
= lens _wpDiskSourceImage
(\ s a -> s{_wpDiskSourceImage = a}) | 184 | wpDiskSourceImage :: Lens' WorkerPool (Maybe Text)
wpDiskSourceImage
= lens _wpDiskSourceImage
(\ s a -> s{_wpDiskSourceImage = a}) | 139 | wpDiskSourceImage
= lens _wpDiskSourceImage
(\ s a -> s{_wpDiskSourceImage = a}) | 88 | true | true | 0 | 9 | 32 | 48 | 25 | 23 | null | null |
flyrry/phonypony | src/Vindinium/Runner/SDLVindinium.hs | mit | generateBackground :: Tileset -> Board -> [Sprite]
generateBackground tileset board = map tileToSprite (boardTiles board)
where
-- TODO: generate a better background with border, water and stuff
tileToSprite _ = getSprite tileset "plain" | 247 | generateBackground :: Tileset -> Board -> [Sprite]
generateBackground tileset board = map tileToSprite (boardTiles board)
where
-- TODO: generate a better background with border, water and stuff
tileToSprite _ = getSprite tileset "plain" | 247 | generateBackground tileset board = map tileToSprite (boardTiles board)
where
-- TODO: generate a better background with border, water and stuff
tileToSprite _ = getSprite tileset "plain" | 196 | false | true | 0 | 7 | 42 | 60 | 28 | 32 | null | null |
Proclivis/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs | lgpl-2.1 | wxSQL_NO_NULLS :: Int
wxSQL_NO_NULLS = 0 | 40 | wxSQL_NO_NULLS :: Int
wxSQL_NO_NULLS = 0 | 40 | wxSQL_NO_NULLS = 0 | 18 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
databrary/databrary | src/View/Template.hs | agpl-3.0 | htmlHeader :: Maybe BSB.Builder -> JSOpt -> H.Html
htmlHeader canon hasjs = do
forM_ canon $ \c ->
H.link
H.! HA.rel "canonical"
H.! HA.href (builderValue c)
H.link
H.! HA.rel "shortcut icon"
H.! HA.href (builderValue $ actionURL Nothing webFile (Just $ staticPath ["icons", "favicon.png"]) [])
H.link
H.! HA.rel "start"
H.! actionLink viewRoot HTML hasjs
-- forM_ ["news", "about", "access", "community"] $ \l -> H.link
forM_ ["about", "support"] $ \l -> H.link
H.! HA.rel l
H.! HA.href ("//databrary.org/" <> l <> ".html") | 574 | htmlHeader :: Maybe BSB.Builder -> JSOpt -> H.Html
htmlHeader canon hasjs = do
forM_ canon $ \c ->
H.link
H.! HA.rel "canonical"
H.! HA.href (builderValue c)
H.link
H.! HA.rel "shortcut icon"
H.! HA.href (builderValue $ actionURL Nothing webFile (Just $ staticPath ["icons", "favicon.png"]) [])
H.link
H.! HA.rel "start"
H.! actionLink viewRoot HTML hasjs
-- forM_ ["news", "about", "access", "community"] $ \l -> H.link
forM_ ["about", "support"] $ \l -> H.link
H.! HA.rel l
H.! HA.href ("//databrary.org/" <> l <> ".html") | 574 | htmlHeader canon hasjs = do
forM_ canon $ \c ->
H.link
H.! HA.rel "canonical"
H.! HA.href (builderValue c)
H.link
H.! HA.rel "shortcut icon"
H.! HA.href (builderValue $ actionURL Nothing webFile (Just $ staticPath ["icons", "favicon.png"]) [])
H.link
H.! HA.rel "start"
H.! actionLink viewRoot HTML hasjs
-- forM_ ["news", "about", "access", "community"] $ \l -> H.link
forM_ ["about", "support"] $ \l -> H.link
H.! HA.rel l
H.! HA.href ("//databrary.org/" <> l <> ".html") | 523 | false | true | 0 | 16 | 129 | 229 | 109 | 120 | null | null |
neosam/esge | src/Esge/Base.hs | bsd-3-clause | showRoomAction :: EC.Action ()
showRoomAction = do
ingame <- EC.getIngame
let room = currRoom ingame
roomText = ER.title room ++ "\n" ++
ER.desc room ++ "\n" ++
"Exits: " ++ (unwords $ ER.exitNames room)
EC.setIngameResponseA "output" roomText
-- | Show individual | 323 | showRoomAction :: EC.Action ()
showRoomAction = do
ingame <- EC.getIngame
let room = currRoom ingame
roomText = ER.title room ++ "\n" ++
ER.desc room ++ "\n" ++
"Exits: " ++ (unwords $ ER.exitNames room)
EC.setIngameResponseA "output" roomText
-- | Show individual | 323 | showRoomAction = do
ingame <- EC.getIngame
let room = currRoom ingame
roomText = ER.title room ++ "\n" ++
ER.desc room ++ "\n" ++
"Exits: " ++ (unwords $ ER.exitNames room)
EC.setIngameResponseA "output" roomText
-- | Show individual | 292 | false | true | 0 | 17 | 99 | 103 | 47 | 56 | null | null |
susisu/Grassy | src/Language/Grass/Transpiler/Untyped/Transformation.hs | bsd-3-clause | plantDefs :: [DefInfo] -> [Def] -> Optimizer -> CharSet -> Transf String
plantDefs ctx defs opt cs = do
term <- transfDefs ctx defs opt
case term of
IxApp _ _ -> plantTerm cs (prefix term)
IxLet (IxApp _ _) _ -> plantTerm cs (prefix term)
_ -> plantTerm cs term
where
prefix term = IxLet (IxAbs (IxVar 0)) (shift 0 1 term) | 382 | plantDefs :: [DefInfo] -> [Def] -> Optimizer -> CharSet -> Transf String
plantDefs ctx defs opt cs = do
term <- transfDefs ctx defs opt
case term of
IxApp _ _ -> plantTerm cs (prefix term)
IxLet (IxApp _ _) _ -> plantTerm cs (prefix term)
_ -> plantTerm cs term
where
prefix term = IxLet (IxAbs (IxVar 0)) (shift 0 1 term) | 382 | plantDefs ctx defs opt cs = do
term <- transfDefs ctx defs opt
case term of
IxApp _ _ -> plantTerm cs (prefix term)
IxLet (IxApp _ _) _ -> plantTerm cs (prefix term)
_ -> plantTerm cs term
where
prefix term = IxLet (IxAbs (IxVar 0)) (shift 0 1 term) | 309 | false | true | 0 | 12 | 122 | 167 | 79 | 88 | null | null |
benjaminselfridge/logix | src/Calculi.hs | bsd-3-clause | c = FormPat "C" | 15 | c = FormPat "C" | 15 | c = FormPat "C" | 15 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
rueshyna/gogol | gogol-blogger/gen/Network/Google/Resource/Blogger/Posts/List.hs | mpl-2.0 | -- | Sort search results
pllOrderBy :: Lens' PostsList PostsListOrderBy
pllOrderBy
= lens _pllOrderBy (\ s a -> s{_pllOrderBy = a}) | 133 | pllOrderBy :: Lens' PostsList PostsListOrderBy
pllOrderBy
= lens _pllOrderBy (\ s a -> s{_pllOrderBy = a}) | 108 | pllOrderBy
= lens _pllOrderBy (\ s a -> s{_pllOrderBy = a}) | 61 | true | true | 0 | 9 | 22 | 42 | 22 | 20 | null | null |
rahulmutt/ghcvm | compiler/Eta/Prelude/PrimOp.hs | bsd-3-clause | primOpInfo Word64SrlOp =
mkGenPrimOp (fsLit "uncheckedShiftRL64#") [] [word64PrimTy, intPrimTy] word64PrimTy | 118 | primOpInfo Word64SrlOp =
mkGenPrimOp (fsLit "uncheckedShiftRL64#") [] [word64PrimTy, intPrimTy] word64PrimTy | 118 | primOpInfo Word64SrlOp =
mkGenPrimOp (fsLit "uncheckedShiftRL64#") [] [word64PrimTy, intPrimTy] word64PrimTy | 118 | false | false | 0 | 7 | 19 | 32 | 16 | 16 | null | null |
sethfowler/pygmalion | src/Pygmalion/Index/Command.hs | bsd-3-clause | cleanPath :: FilePath -> FilePath -> FilePath
cleanPath _ p@('=' : _) = p | 73 | cleanPath :: FilePath -> FilePath -> FilePath
cleanPath _ p@('=' : _) = p | 73 | cleanPath _ p@('=' : _) = p | 27 | false | true | 0 | 8 | 13 | 34 | 18 | 16 | null | null |
supki/directory-layout | src/System/Directory/Layout/Internal.hs | bsd-3-clause | -- | Set the file group by groupname
--
-- >>> let layout = file "foo" & group ?~ groupname "wheel"
groupname :: String -> Group
groupname = Groupname | 150 | groupname :: String -> Group
groupname = Groupname | 50 | groupname = Groupname | 21 | true | true | 0 | 5 | 28 | 18 | 11 | 7 | null | null |
ancientlanguage/haskell-analysis | prepare/src/Prepare/Decompose.hs | mit | decomposeChar '\x1EB4' = "\x0041\x0306\x0303" | 45 | decomposeChar '\x1EB4' = "\x0041\x0306\x0303" | 45 | decomposeChar '\x1EB4' = "\x0041\x0306\x0303" | 45 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
phischu/fragnix | builtins/base/Data.List.NonEmpty.hs | bsd-3-clause | -- | @'span' p xs@ returns the longest prefix of @xs@ that satisfies
-- @p@, together with the remainder of the stream.
--
-- > 'span' p xs == ('takeWhile' p xs, 'dropWhile' p xs)
-- > xs == ys ++ zs where (ys, zs) = 'span' p xs
span :: (a -> Bool) -> NonEmpty a -> ([a], [a])
span p = List.span p . toList | 306 | span :: (a -> Bool) -> NonEmpty a -> ([a], [a])
span p = List.span p . toList | 77 | span p = List.span p . toList | 29 | true | true | 0 | 8 | 66 | 58 | 33 | 25 | null | null |
fredmorcos/attic | projects/pet/archive/pet_haskell_args/Extra/Tuple.hs | isc | fst3 :: (a, b, c) -> a
fst3 (v, _, _) = v | 41 | fst3 :: (a, b, c) -> a
fst3 (v, _, _) = v | 41 | fst3 (v, _, _) = v | 18 | false | true | 0 | 8 | 12 | 42 | 22 | 20 | null | null |
seereason/ghcjs | src/Gen2/Prim.hs | mit | genPrim _ _ CloneSmallArrayOp [r] [a,o,n] = PrimInline [j| `r` = `a`.slice(`o`,`o`+`n`); |] | 108 | genPrim _ _ CloneSmallArrayOp [r] [a,o,n] = PrimInline [j| `r` = `a`.slice(`o`,`o`+`n`); |] | 108 | genPrim _ _ CloneSmallArrayOp [r] [a,o,n] = PrimInline [j| `r` = `a`.slice(`o`,`o`+`n`); |] | 108 | false | false | 0 | 6 | 29 | 36 | 21 | 15 | null | null |
NickAger/LearningHaskell | haskellForMacMiscPlayground/MonadTransformers.hsproj/MonadTransformers.hs | mit | maybeToEither :: MonadError e m =>
e -- ^ (Left e) will be returned if the Maybe value is Nothing
-> Maybe a -- ^ (Right a) will be returned if this is (Just a)
-> m a
maybeToEither errorval Nothing = throwError errorval | 301 | maybeToEither :: MonadError e m =>
e -- ^ (Left e) will be returned if the Maybe value is Nothing
-> Maybe a -- ^ (Right a) will be returned if this is (Just a)
-> m a
maybeToEither errorval Nothing = throwError errorval | 301 | maybeToEither errorval Nothing = throwError errorval | 52 | false | true | 0 | 8 | 124 | 44 | 21 | 23 | null | null |
sergv/vector | Data/Vector/Fusion/Stream/Monadic.hs | bsd-3-clause | drop n (Stream step t) = Stream step' (t, Just n)
where
{-# INLINE_INNER step' #-}
step' (s, Just i) | i > 0 = liftM (\r ->
case r of
Yield _ s' -> Skip (s', Just (i-1))
Skip s' -> Skip (s', Just i)
Done -> Done
) (step s)
| otherwise = return $ Skip (s, Nothing)
step' (s, Nothing) = liftM (\r ->
case r of
Yield x s' -> Yield x (s', Nothing)
Skip s' -> Skip (s', Nothing)
Done -> Done
) (step s)
-- Mapping
-- ------- | 788 | drop n (Stream step t) = Stream step' (t, Just n)
where
{-# INLINE_INNER step' #-}
step' (s, Just i) | i > 0 = liftM (\r ->
case r of
Yield _ s' -> Skip (s', Just (i-1))
Skip s' -> Skip (s', Just i)
Done -> Done
) (step s)
| otherwise = return $ Skip (s, Nothing)
step' (s, Nothing) = liftM (\r ->
case r of
Yield x s' -> Yield x (s', Nothing)
Skip s' -> Skip (s', Nothing)
Done -> Done
) (step s)
-- Mapping
-- ------- | 788 | drop n (Stream step t) = Stream step' (t, Just n)
where
{-# INLINE_INNER step' #-}
step' (s, Just i) | i > 0 = liftM (\r ->
case r of
Yield _ s' -> Skip (s', Just (i-1))
Skip s' -> Skip (s', Just i)
Done -> Done
) (step s)
| otherwise = return $ Skip (s, Nothing)
step' (s, Nothing) = liftM (\r ->
case r of
Yield x s' -> Yield x (s', Nothing)
Skip s' -> Skip (s', Nothing)
Done -> Done
) (step s)
-- Mapping
-- ------- | 788 | false | false | 0 | 16 | 462 | 255 | 127 | 128 | null | null |
brendanhay/gogol | gogol-sheets/gen/Network/Google/Sheets/Types/Product.hs | mpl-2.0 | -- | The ID of the filter view.
fvFilterViewId :: Lens' FilterView (Maybe Int32)
fvFilterViewId
= lens _fvFilterViewId
(\ s a -> s{_fvFilterViewId = a})
. mapping _Coerce | 184 | fvFilterViewId :: Lens' FilterView (Maybe Int32)
fvFilterViewId
= lens _fvFilterViewId
(\ s a -> s{_fvFilterViewId = a})
. mapping _Coerce | 152 | fvFilterViewId
= lens _fvFilterViewId
(\ s a -> s{_fvFilterViewId = a})
. mapping _Coerce | 103 | true | true | 2 | 8 | 41 | 60 | 28 | 32 | null | null |
Jinxit/firestone | src/Firestone/Game.hs | mit | start :: State Game ()
start = do
zoom p1 $ do
zoom hero increaseMana
activeMinions.traversed.isSleepy .= False
replicateM_ 4 drawCard
zoom p2 $ replicateM_ 4 drawCard | 199 | start :: State Game ()
start = do
zoom p1 $ do
zoom hero increaseMana
activeMinions.traversed.isSleepy .= False
replicateM_ 4 drawCard
zoom p2 $ replicateM_ 4 drawCard | 199 | start = do
zoom p1 $ do
zoom hero increaseMana
activeMinions.traversed.isSleepy .= False
replicateM_ 4 drawCard
zoom p2 $ replicateM_ 4 drawCard | 176 | false | true | 0 | 12 | 58 | 70 | 30 | 40 | null | null |
SwiftsNamesake/BattleHack-2015 | src/BattleHack/Piano.hs | mit | -- |
-- TODO: Refactor
-- TODO: Use Unicode (?)
notenameFromKeyIndex :: Int -> String
notenameFromKeyIndex i = ["C", "C#", "D", "D#", "E", "F", "F#", "G", "G#", "A", "A#", "B"] !! mod i 12 | 188 | notenameFromKeyIndex :: Int -> String
notenameFromKeyIndex i = ["C", "C#", "D", "D#", "E", "F", "F#", "G", "G#", "A", "A#", "B"] !! mod i 12 | 140 | notenameFromKeyIndex i = ["C", "C#", "D", "D#", "E", "F", "F#", "G", "G#", "A", "A#", "B"] !! mod i 12 | 102 | true | true | 0 | 6 | 33 | 69 | 41 | 28 | null | null |
JeanJoskin/JsLib | src/Language/JsLib/StringUtil.hs | bsd-3-clause | readNumeric :: String -> Double
readNumeric s | head s == '.' = read ('0':s)
| last s == '.' = read (s ++ "0")
| otherwise = read s | 163 | readNumeric :: String -> Double
readNumeric s | head s == '.' = read ('0':s)
| last s == '.' = read (s ++ "0")
| otherwise = read s | 163 | readNumeric s | head s == '.' = read ('0':s)
| last s == '.' = read (s ++ "0")
| otherwise = read s | 131 | false | true | 0 | 9 | 61 | 79 | 36 | 43 | null | null |
positiondev/periodic | example/Main.hs | isc | main = do rconn <- R.connect R.defaultConnectInfo
scheduler <- create (Name "default") rconn (CheckInterval (Seconds 1)) (LockTimeout (Seconds 1000)) T.putStrLn
addTask scheduler "print-hello-job" (Every (Seconds 10)) (T.putStrLn "hello")
addTask scheduler "print-bye-job" (Every (Seconds 1)) (T.putStrLn "bye")
forkIO (run scheduler)
forkIO (run scheduler)
forever (threadDelay 1000000) | 447 | main = do rconn <- R.connect R.defaultConnectInfo
scheduler <- create (Name "default") rconn (CheckInterval (Seconds 1)) (LockTimeout (Seconds 1000)) T.putStrLn
addTask scheduler "print-hello-job" (Every (Seconds 10)) (T.putStrLn "hello")
addTask scheduler "print-bye-job" (Every (Seconds 1)) (T.putStrLn "bye")
forkIO (run scheduler)
forkIO (run scheduler)
forever (threadDelay 1000000) | 447 | main = do rconn <- R.connect R.defaultConnectInfo
scheduler <- create (Name "default") rconn (CheckInterval (Seconds 1)) (LockTimeout (Seconds 1000)) T.putStrLn
addTask scheduler "print-hello-job" (Every (Seconds 10)) (T.putStrLn "hello")
addTask scheduler "print-bye-job" (Every (Seconds 1)) (T.putStrLn "bye")
forkIO (run scheduler)
forkIO (run scheduler)
forever (threadDelay 1000000) | 447 | false | false | 0 | 12 | 104 | 170 | 78 | 92 | null | null |
ml9951/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | -- Classes Generic and Generic1, Datatype, Constructor and Selector
genClassName, gen1ClassName, datatypeClassName, constructorClassName,
selectorClassName :: Name
genClassName = clsQual gHC_GENERICS (fsLit "Generic") genClassKey | 233 | genClassName, gen1ClassName, datatypeClassName, constructorClassName,
selectorClassName :: Name
genClassName = clsQual gHC_GENERICS (fsLit "Generic") genClassKey | 165 | genClassName = clsQual gHC_GENERICS (fsLit "Generic") genClassKey | 67 | true | true | 0 | 7 | 26 | 33 | 21 | 12 | null | null |
ssaavedra/liquidhaskell | benchmarks/esop2013-submission/Base.hs | bsd-3-clause | -- | /O(n+m)/. Intersection with a combining function.
--
-- > intersectionWith (++) (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (7, "C")]) == singleton 5 "aA"
{-@ intersectionWith :: (Ord k) => (a -> b -> c) -> OMap k a -> OMap k b -> OMap k c @-}
intersectionWith :: Ord k => (a -> b -> c) -> Map k a -> Map k b -> Map k c
intersectionWith f m1 m2
= intersectionWithKey (\_ x y -> f x y) m1 m2 | 407 | intersectionWith :: Ord k => (a -> b -> c) -> Map k a -> Map k b -> Map k c
intersectionWith f m1 m2
= intersectionWithKey (\_ x y -> f x y) m1 m2 | 148 | intersectionWith f m1 m2
= intersectionWithKey (\_ x y -> f x y) m1 m2 | 72 | true | true | 0 | 10 | 90 | 97 | 47 | 50 | null | null |
christiaanb/Idris-dev | src/Idris/REPL.hs | bsd-3-clause | getCPU :: Opt -> Maybe String
getCPU (TargetCPU x) = Just x | 59 | getCPU :: Opt -> Maybe String
getCPU (TargetCPU x) = Just x | 59 | getCPU (TargetCPU x) = Just x | 29 | false | true | 0 | 9 | 11 | 35 | 15 | 20 | null | null |
mcmaniac/ghc | compiler/codeGen/CgForeignCall.hs | bsd-3-clause | stgCurrentNursery = CmmReg currentNursery | 41 | stgCurrentNursery = CmmReg currentNursery | 41 | stgCurrentNursery = CmmReg currentNursery | 41 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
agentm/project-m36 | src/bin/benchmark/Basic.hs | unlicense | joinRel = bgroup "join" [joinIdenticalRelations100] | 51 | joinRel = bgroup "join" [joinIdenticalRelations100] | 51 | joinRel = bgroup "join" [joinIdenticalRelations100] | 51 | false | false | 1 | 5 | 4 | 18 | 7 | 11 | null | null |
bitemyapp/wreq | Network/Wreq/Internal.hs | bsd-3-clause | prepare :: (Request -> IO Request) -> Options -> String -> IO Request
prepare modify opts url = do
signRequest =<< modify =<< frob <$> HTTP.parseUrl url
where
frob req = req & Lens.requestHeaders %~ (headers opts ++)
& setQuery opts
& setAuth opts
& setProxy opts
& setCheckStatus opts
& setRedirects opts
& Lens.cookieJar .~ cookies opts
signRequest :: Request -> IO Request
signRequest = maybe return f $ auth opts
where
f (AWSAuth versn key secret) = AWS.signRequest versn key secret
f (OAuth1 consumerToken consumerSecret token secret) = OAuth1.signRequest consumerToken consumerSecret token secret
f _ = return | 775 | prepare :: (Request -> IO Request) -> Options -> String -> IO Request
prepare modify opts url = do
signRequest =<< modify =<< frob <$> HTTP.parseUrl url
where
frob req = req & Lens.requestHeaders %~ (headers opts ++)
& setQuery opts
& setAuth opts
& setProxy opts
& setCheckStatus opts
& setRedirects opts
& Lens.cookieJar .~ cookies opts
signRequest :: Request -> IO Request
signRequest = maybe return f $ auth opts
where
f (AWSAuth versn key secret) = AWS.signRequest versn key secret
f (OAuth1 consumerToken consumerSecret token secret) = OAuth1.signRequest consumerToken consumerSecret token secret
f _ = return | 775 | prepare modify opts url = do
signRequest =<< modify =<< frob <$> HTTP.parseUrl url
where
frob req = req & Lens.requestHeaders %~ (headers opts ++)
& setQuery opts
& setAuth opts
& setProxy opts
& setCheckStatus opts
& setRedirects opts
& Lens.cookieJar .~ cookies opts
signRequest :: Request -> IO Request
signRequest = maybe return f $ auth opts
where
f (AWSAuth versn key secret) = AWS.signRequest versn key secret
f (OAuth1 consumerToken consumerSecret token secret) = OAuth1.signRequest consumerToken consumerSecret token secret
f _ = return | 705 | false | true | 0 | 14 | 258 | 236 | 112 | 124 | null | null |
ancientlanguage/haskell-analysis | grammar/src/Grammar/Common/Decompose.hs | mit | decomposeChar '\x03D4' = "\x03D2\x0308" | 39 | decomposeChar '\x03D4' = "\x03D2\x0308" | 39 | decomposeChar '\x03D4' = "\x03D2\x0308" | 39 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
trskop/cabal | Cabal/Distribution/System.hs | bsd-3-clause | osAliases :: ClassificationStrictness -> OS -> [String]
osAliases Permissive Windows = ["mingw32", "win32", "cygwin32"] | 119 | osAliases :: ClassificationStrictness -> OS -> [String]
osAliases Permissive Windows = ["mingw32", "win32", "cygwin32"] | 119 | osAliases Permissive Windows = ["mingw32", "win32", "cygwin32"] | 63 | false | true | 0 | 7 | 13 | 36 | 20 | 16 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.