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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
haskoin/haskoin | src/Haskoin/Block/Headers.hs | unlicense | -- | Validate a list of continuous block headers and import them to the
-- block chain. Return 'Left' on failure with error information.
connectBlocks :: BlockHeaders m
=> Network
-> Timestamp -- ^ current time
-> [BlockHeader]
-> m (Either String [BlockNode... | 363 | connectBlocks :: BlockHeaders m
=> Network
-> Timestamp -- ^ current time
-> [BlockHeader]
-> m (Either String [BlockNode])
connectBlocks _ _ [] = return $ Right [] | 226 | connectBlocks _ _ [] = return $ Right [] | 40 | true | true | 0 | 12 | 113 | 68 | 35 | 33 | null | null |
zaxtax/hakaru | haskell/Language/Hakaru/Evaluation/DisintegrationMonad.hs | bsd-3-clause | fromName name typ (i:is) = fromName name (SArray typ) is P.! i | 62 | fromName name typ (i:is) = fromName name (SArray typ) is P.! i | 62 | fromName name typ (i:is) = fromName name (SArray typ) is P.! i | 62 | false | false | 0 | 8 | 11 | 39 | 19 | 20 | null | null |
bgold-cosmos/Tidal | src/Sound/Tidal/UI.hs | gpl-3.0 | -- Calculates a whole cycle, rotates it, then constrains events to the original query arc
_rot :: Ord a => Int -> Pattern a -> Pattern a
_rot i pat = splitQueries $ pat {query = \st -> f st (query pat (st {arc = wholeCycle (arc st)}))}
where -- TODO maybe events with the same arc (part+whole) should be
-- gro... | 1,247 | _rot :: Ord a => Int -> Pattern a -> Pattern a
_rot i pat = splitQueries $ pat {query = \st -> f st (query pat (st {arc = wholeCycle (arc st)}))}
where -- TODO maybe events with the same arc (part+whole) should be
-- grouped together in the rotation?
f st es = constrainEvents (arc st) $ shiftValues $ ... | 1,157 | _rot i pat = splitQueries $ pat {query = \st -> f st (query pat (st {arc = wholeCycle (arc st)}))}
where -- TODO maybe events with the same arc (part+whole) should be
-- grouped together in the rotation?
f st es = constrainEvents (arc st) $ shiftValues $ sort $ defragParts es
shiftValues es | ... | 1,110 | true | true | 0 | 17 | 432 | 410 | 203 | 207 | null | null |
reinvdwoerd/lisp | src/Types.hs | mit | showFn :: Fn -> String
showFn FnRecord { fnType = fnType, isMacro = isMacro } =
case fnType of
Primitive {} ->
"<primitive " ++ (if isMacro then "macro" else "function") ++ ">"
Lisp {params = params, varargs = varargs, body = body} ->
"(lambda " ++ showParams params varargs ++ " " ++ showListCont... | 337 | showFn :: Fn -> String
showFn FnRecord { fnType = fnType, isMacro = isMacro } =
case fnType of
Primitive {} ->
"<primitive " ++ (if isMacro then "macro" else "function") ++ ">"
Lisp {params = params, varargs = varargs, body = body} ->
"(lambda " ++ showParams params varargs ++ " " ++ showListCont... | 337 | showFn FnRecord { fnType = fnType, isMacro = isMacro } =
case fnType of
Primitive {} ->
"<primitive " ++ (if isMacro then "macro" else "function") ++ ">"
Lisp {params = params, varargs = varargs, body = body} ->
"(lambda " ++ showParams params varargs ++ " " ++ showListContents body ++ ")" | 314 | false | true | 0 | 12 | 81 | 117 | 63 | 54 | null | null |
geocurnoff/nikki | src/Physics/Chipmunk/ContactRef.hs | lgpl-3.0 | kPreSolve ref (Watch _ _ f) permeability = do
(shapeA, shapeB) <- shapes
liftIO $ modifyIORefM ref (f shapeA shapeB)
return $ isSolidInPresolve permeability
| 169 | mkPreSolve ref (Watch _ _ f) permeability = do
(shapeA, shapeB) <- shapes
liftIO $ modifyIORefM ref (f shapeA shapeB)
return $ isSolidInPresolve permeability | 169 | mkPreSolve ref (Watch _ _ f) permeability = do
(shapeA, shapeB) <- shapes
liftIO $ modifyIORefM ref (f shapeA shapeB)
return $ isSolidInPresolve permeability | 169 | false | false | 0 | 10 | 36 | 66 | 31 | 35 | null | null |
fmapfmapfmap/amazonka | amazonka-codecommit/gen/Network/AWS/CodeCommit/ListRepositories.hs | mpl-2.0 | -- | An enumeration token that allows the operation to batch the results of
-- the operation. Batch sizes are 1,000 for list repository operations.
-- When the client sends the token back to AWS CodeCommit, another page of
-- 1,000 records is retrieved.
lrNextToken :: Lens' ListRepositories (Maybe Text)
lrNextToken = l... | 367 | lrNextToken :: Lens' ListRepositories (Maybe Text)
lrNextToken = lens _lrNextToken (\ s a -> s{_lrNextToken = a}) | 113 | lrNextToken = lens _lrNextToken (\ s a -> s{_lrNextToken = a}) | 62 | true | true | 0 | 9 | 60 | 49 | 28 | 21 | null | null |
spacekitteh/smcghc | compiler/nativeGen/X86/CodeGen.hs | bsd-3-clause | getNonClobberedOperand :: CmmExpr -> NatM (Operand, InstrBlock)
getNonClobberedOperand (CmmLit lit) = do
use_sse2 <- sse2Enabled
if use_sse2 && isSuitableFloatingPointLit lit
then do
let CmmFloat _ w = lit
Amode addr code <- memConstant (widthInBytes w) lit
return (OpAddr addr, code)
else... | 549 | getNonClobberedOperand :: CmmExpr -> NatM (Operand, InstrBlock)
getNonClobberedOperand (CmmLit lit) = do
use_sse2 <- sse2Enabled
if use_sse2 && isSuitableFloatingPointLit lit
then do
let CmmFloat _ w = lit
Amode addr code <- memConstant (widthInBytes w) lit
return (OpAddr addr, code)
else... | 549 | getNonClobberedOperand (CmmLit lit) = do
use_sse2 <- sse2Enabled
if use_sse2 && isSuitableFloatingPointLit lit
then do
let CmmFloat _ w = lit
Amode addr code <- memConstant (widthInBytes w) lit
return (OpAddr addr, code)
else do
is32Bit <- is32BitPlatform
dflags <- getDynFlags
if i... | 485 | false | true | 0 | 17 | 113 | 194 | 90 | 104 | null | null |
lukemaurer/sequent-core | src/Language/SequentCore/LiftLambdas.hs | bsd-3-clause | doLiftsF (Cast co) = return $ Cast co | 37 | doLiftsF (Cast co) = return $ Cast co | 37 | doLiftsF (Cast co) = return $ Cast co | 37 | false | false | 0 | 7 | 7 | 22 | 10 | 12 | null | null |
shlevy/ghc | compiler/typecheck/TcRnTypes.hs | bsd-3-clause | newImplication :: Implication
newImplication
= Implic { -- These fields must be initialisad
ic_tclvl = panic "newImplic:tclvl"
, ic_binds = panic "newImplic:binds"
, ic_info = panic "newImplic:info"
, ic_env = panic "newImplic:env"
-- The rest have sensib... | 598 | newImplication :: Implication
newImplication
= Implic { -- These fields must be initialisad
ic_tclvl = panic "newImplic:tclvl"
, ic_binds = panic "newImplic:binds"
, ic_info = panic "newImplic:info"
, ic_env = panic "newImplic:env"
-- The rest have sensib... | 598 | newImplication
= Implic { -- These fields must be initialisad
ic_tclvl = panic "newImplic:tclvl"
, ic_binds = panic "newImplic:binds"
, ic_info = panic "newImplic:info"
, ic_env = panic "newImplic:env"
-- The rest have sensible default values
,... | 568 | false | true | 0 | 8 | 231 | 107 | 61 | 46 | null | null |
adamsmasher/EMA | Macro.hs | gpl-3.0 | expandMacro :: Macro -> [Expr] -> Int -> [Line]
expandMacro (Macro params lines) args lineNum =
map (substituteArgs params args lineNum) lines | 144 | expandMacro :: Macro -> [Expr] -> Int -> [Line]
expandMacro (Macro params lines) args lineNum =
map (substituteArgs params args lineNum) lines | 144 | expandMacro (Macro params lines) args lineNum =
map (substituteArgs params args lineNum) lines | 96 | false | true | 0 | 11 | 23 | 65 | 31 | 34 | null | null |
astynax/enhask | draft.hs | mit | -- | takes a set of nodes and nodelists and flattens them
flattenNodesColl = undefined | 86 | flattenNodesColl = undefined | 28 | flattenNodesColl = undefined | 28 | true | false | 0 | 4 | 14 | 7 | 4 | 3 | null | null |
asivitz/Hickory | Hickory/Utils/DirectX.hs | mit | parseMaterial = parseNamedSection "Material" $ \name ->
Material <$> parseColorRGBA
<*> terminate anySignedNumber
<*> parseColorRGB
<*> parseColorRGB | 192 | parseMaterial = parseNamedSection "Material" $ \name ->
Material <$> parseColorRGBA
<*> terminate anySignedNumber
<*> parseColorRGB
<*> parseColorRGB | 192 | parseMaterial = parseNamedSection "Material" $ \name ->
Material <$> parseColorRGBA
<*> terminate anySignedNumber
<*> parseColorRGB
<*> parseColorRGB | 192 | false | false | 0 | 10 | 59 | 37 | 18 | 19 | null | null |
vialette/ppattern | src/Data/Algorithm/PPattern/List.hs | mit | isUpDown ((x, x') : xs) = x < x' && isDownUp xs | 47 | isUpDown ((x, x') : xs) = x < x' && isDownUp xs | 47 | isUpDown ((x, x') : xs) = x < x' && isDownUp xs | 47 | false | false | 0 | 8 | 11 | 33 | 17 | 16 | null | null |
denibertovic/haskell | kubernetes/lib/Kubernetes/OpenAPI/ModelLens.hs | bsd-3-clause | -- | 'v1beta1StorageClassListItems' Lens
v1beta1StorageClassListItemsL :: Lens_' V1beta1StorageClassList ([V1beta1StorageClass])
v1beta1StorageClassListItemsL f V1beta1StorageClassList{..} = (\v1beta1StorageClassListItems -> V1beta1StorageClassList { v1beta1StorageClassListItems, ..} ) <$> f v1beta1StorageClassListItem... | 321 | v1beta1StorageClassListItemsL :: Lens_' V1beta1StorageClassList ([V1beta1StorageClass])
v1beta1StorageClassListItemsL f V1beta1StorageClassList{..} = (\v1beta1StorageClassListItems -> V1beta1StorageClassList { v1beta1StorageClassListItems, ..} ) <$> f v1beta1StorageClassListItems | 280 | v1beta1StorageClassListItemsL f V1beta1StorageClassList{..} = (\v1beta1StorageClassListItems -> V1beta1StorageClassList { v1beta1StorageClassListItems, ..} ) <$> f v1beta1StorageClassListItems | 192 | true | true | 0 | 8 | 22 | 57 | 31 | 26 | null | null |
ambiata/highlighting-kate | Text/Highlighting/Kate/Syntax/Mips.hs | gpl-2.0 | regex_'23'2e'2a'24 = compileRegex True "#.*$" | 45 | regex_'23'2e'2a'24 = compileRegex True "#.*$" | 45 | regex_'23'2e'2a'24 = compileRegex True "#.*$" | 45 | false | false | 0 | 5 | 4 | 11 | 5 | 6 | null | null |
nh2/WashNGo | WASH/HTML/HTMLMonad.hs | bsd-3-clause | iframe = mkElement "iframe" | 31 | iframe = mkElement "iframe" | 31 | iframe = mkElement "iframe" | 31 | false | false | 0 | 5 | 7 | 9 | 4 | 5 | null | null |
nomicflux/threals | src/Threal/Comps.hs | gpl-2.0 | cfGreenBlue x y = not $ compGreenBlue x y || compGreenBlue y x | 62 | cfGreenBlue x y = not $ compGreenBlue x y || compGreenBlue y x | 62 | cfGreenBlue x y = not $ compGreenBlue x y || compGreenBlue y x | 62 | false | false | 0 | 7 | 12 | 29 | 13 | 16 | null | null |
vincenthz/hs-foundation | basement/Basement/PrimType.hs | bsd-3-clause | sizeRecast :: forall a b . (PrimType a, PrimType b) => CountOf a -> CountOf b
sizeRecast sz = CountOf (bytes `Prelude.quot` szB)
where !szA = primSizeInBytes (Proxy :: Proxy a)
!(CountOf szB) = primSizeInBytes (Proxy :: Proxy b)
!(CountOf bytes) = sizeOfE szA sz
| 295 | sizeRecast :: forall a b . (PrimType a, PrimType b) => CountOf a -> CountOf b
sizeRecast sz = CountOf (bytes `Prelude.quot` szB)
where !szA = primSizeInBytes (Proxy :: Proxy a)
!(CountOf szB) = primSizeInBytes (Proxy :: Proxy b)
!(CountOf bytes) = sizeOfE szA sz
| 295 | sizeRecast sz = CountOf (bytes `Prelude.quot` szB)
where !szA = primSizeInBytes (Proxy :: Proxy a)
!(CountOf szB) = primSizeInBytes (Proxy :: Proxy b)
!(CountOf bytes) = sizeOfE szA sz
| 217 | false | true | 2 | 9 | 77 | 125 | 63 | 62 | null | null |
goldfirere/singletons | singletons-base/tests/compile-and-dump/InsertionSort/InsertionSortImp.hs | bsd-3-clause | fromNat :: Nat -> Int
fromNat Zero = 0 | 38 | fromNat :: Nat -> Int
fromNat Zero = 0 | 38 | fromNat Zero = 0 | 16 | false | true | 0 | 5 | 8 | 18 | 9 | 9 | null | null |
GaloisInc/galua | galua-rts/src/Galua/FunId.hs | mit | -- | This 'FunId' does not refer to any function.
noFun :: FunId
noFun = FunId BS.empty | 87 | noFun :: FunId
noFun = FunId BS.empty | 37 | noFun = FunId BS.empty | 22 | true | true | 0 | 6 | 16 | 24 | 10 | 14 | null | null |
brownplt/ovid | src/Data/Zipper.hs | bsd-2-clause | canGoDown :: Location a -> Bool
canGoDown (Location (Node _ []) _) = False | 74 | canGoDown :: Location a -> Bool
canGoDown (Location (Node _ []) _) = False | 74 | canGoDown (Location (Node _ []) _) = False | 42 | false | true | 0 | 10 | 13 | 39 | 19 | 20 | null | null |
hermish/courseography | app/Util/Happstack.hs | gpl-3.0 | -- | Creates a JSON response.
createJSONResponse :: ToJSON a => a -> Response
createJSONResponse x = toResponseBS (BS.pack "application/json") (encodeJSON x)
where
encodeJSON :: ToJSON a => a -> BSL.ByteString
encodeJSON = BSL.filter (/= '\\') . encode | 272 | createJSONResponse :: ToJSON a => a -> Response
createJSONResponse x = toResponseBS (BS.pack "application/json") (encodeJSON x)
where
encodeJSON :: ToJSON a => a -> BSL.ByteString
encodeJSON = BSL.filter (/= '\\') . encode | 242 | createJSONResponse x = toResponseBS (BS.pack "application/json") (encodeJSON x)
where
encodeJSON :: ToJSON a => a -> BSL.ByteString
encodeJSON = BSL.filter (/= '\\') . encode | 194 | true | true | 0 | 9 | 57 | 96 | 44 | 52 | null | null |
IAlexKnight/Code | learn_and_pra/Haskell/Pra1.hs | apache-2.0 | the_last = last cons_string | 27 | the_last = last cons_string | 27 | the_last = last cons_string | 27 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
DougBurke/swish | tests/RDFProofContextTest.hs | lgpl-2.1 | -- Rule with member property test, match forwards and backwards
-- rdfcp1 = "?x ?c ?y . " => "?c rdf:type rdf:Property ."
-- where:
-- (isMemberProp "?c")
--
rdfcp :: RDFRule
rdfcp = getRule "rs_rdf:cp1" | 218 | rdfcp :: RDFRule
rdfcp = getRule "rs_rdf:cp1" | 46 | rdfcp = getRule "rs_rdf:cp1" | 29 | true | true | 0 | 5 | 50 | 19 | 12 | 7 | null | null |
acowley/ghc | compiler/main/DynFlags.hs | bsd-3-clause | -- | These @-f\<blah\>@ flags can all be reversed with @-fno-\<blah\>@
fWarningFlags :: [FlagSpec WarningFlag]
fWarningFlags = [
-- See Note [Updating flag description in the User's Guide]
-- See Note [Supporting CLI completion]
-- Please keep the list of flags below sorted alphabetically
flagSpec "warn-alternative-l... | 4,460 | fWarningFlags :: [FlagSpec WarningFlag]
fWarningFlags = [
-- See Note [Updating flag description in the User's Guide]
-- See Note [Supporting CLI completion]
-- Please keep the list of flags below sorted alphabetically
flagSpec "warn-alternative-layout-rule-transitional"
Opt_Warn... | 4,389 | fWarningFlags = [
-- See Note [Updating flag description in the User's Guide]
-- See Note [Supporting CLI completion]
-- Please keep the list of flags below sorted alphabetically
flagSpec "warn-alternative-layout-rule-transitional"
Opt_WarnAlternativeLayoutRuleTransitional,
fla... | 4,349 | true | true | 0 | 9 | 997 | 483 | 245 | 238 | null | null |
continuouspi/cpiwb | CPi/Signals.hs | gpl-3.0 | test19 = shiftSig (1,2) tConjP2Q == tShift12ConjP2Q | 51 | test19 = shiftSig (1,2) tConjP2Q == tShift12ConjP2Q | 51 | test19 = shiftSig (1,2) tConjP2Q == tShift12ConjP2Q | 51 | false | false | 0 | 7 | 6 | 21 | 11 | 10 | null | null |
brendanhay/gogol | gogol-plus/gen/Network/Google/Plus/Types/Product.hs | mpl-2.0 | -- | The content (text) as provided by the author, stored without any HTML
-- formatting. When creating or updating a comment, this value must be
-- supplied as plain text in the request.
coOriginalContent :: Lens' CommentObject (Maybe Text)
coOriginalContent
= lens _coOriginalContent
(\ s a -> s{_coOriginalCon... | 330 | coOriginalContent :: Lens' CommentObject (Maybe Text)
coOriginalContent
= lens _coOriginalContent
(\ s a -> s{_coOriginalContent = a}) | 142 | coOriginalContent
= lens _coOriginalContent
(\ s a -> s{_coOriginalContent = a}) | 88 | true | true | 0 | 8 | 58 | 51 | 27 | 24 | null | null |
emilaxelsson/feldspar-io | tests/Examples.hs | bsd-3-clause | main = Demo.testAll | 19 | main = Demo.testAll | 19 | main = Demo.testAll | 19 | false | false | 1 | 6 | 2 | 12 | 4 | 8 | null | null |
uduki/hsQt | Qtc/ClassTypes/Core.hs | bsd-2-clause | qCast_QRect :: Object a -> IO (QRect ())
qCast_QRect _qobj
= return (objectCast _qobj) | 88 | qCast_QRect :: Object a -> IO (QRect ())
qCast_QRect _qobj
= return (objectCast _qobj) | 88 | qCast_QRect _qobj
= return (objectCast _qobj) | 47 | false | true | 0 | 9 | 15 | 41 | 19 | 22 | null | null |
ekmett/ghc | compiler/utils/GraphOps.hs | bsd-3-clause | addNode :: Uniquable k
=> k -> Node k cls color
-> Graph k cls color -> Graph k cls color
addNode k node graph
= let
-- add back conflict edges from other nodes to this one
map_conflict
= foldUniqSet
(adjustUFM_C (\n -> n { nodeConflicts = addOne... | 807 | addNode :: Uniquable k
=> k -> Node k cls color
-> Graph k cls color -> Graph k cls color
addNode k node graph
= let
-- add back conflict edges from other nodes to this one
map_conflict
= foldUniqSet
(adjustUFM_C (\n -> n { nodeConflicts = addOneT... | 806 | addNode k node graph
= let
-- add back conflict edges from other nodes to this one
map_conflict
= foldUniqSet
(adjustUFM_C (\n -> n { nodeConflicts = addOneToUniqSet (nodeConflicts n) k}))
(graphMap graph)
(nodeConf... | 700 | false | true | 0 | 18 | 338 | 197 | 98 | 99 | null | null |
markuspf/Idris-dev | src/Idris/Core/TT.hs | bsd-3-clause | rigMult Rig1 Rig1 = Rig1 | 24 | rigMult Rig1 Rig1 = Rig1 | 24 | rigMult Rig1 Rig1 = Rig1 | 24 | false | false | 1 | 5 | 4 | 16 | 5 | 11 | null | null |
ankhers/haskell-ide-engine | src/Haskell/Ide/Engine/Transport/JsonHttp.hs | bsd-3-clause | serverSwaggerUi :: FilePath -> Server SwaggerUi
-- serverSwaggerUi = serveDirectory "/home/alanz/mysrc/github/alanz/haskell-ide-engine/swagger-ui"
serverSwaggerUi path = serveDirectory (path ++ "/swagger-ui") | 208 | serverSwaggerUi :: FilePath -> Server SwaggerUi
serverSwaggerUi path = serveDirectory (path ++ "/swagger-ui") | 109 | serverSwaggerUi path = serveDirectory (path ++ "/swagger-ui") | 61 | true | true | 0 | 7 | 17 | 32 | 16 | 16 | null | null |
39aldo39/klfc | src/Ahk.hs | gpl-3.0 | printSend ∷ Blind → String → [String] → [String]
printSend _ _ [] = [] | 70 | printSend ∷ Blind → String → [String] → [String]
printSend _ _ [] = [] | 70 | printSend _ _ [] = [] | 21 | false | true | 0 | 8 | 14 | 40 | 21 | 19 | null | null |
davbaumgartner/tex-tables | TexTables/Utils.hs | bsd-3-clause | -- |Joins the element
join :: [a] -> [[a]] -> [a]
join d = concat . intersperse d | 83 | join :: [a] -> [[a]] -> [a]
join d = concat . intersperse d | 59 | join d = concat . intersperse d | 31 | true | true | 5 | 9 | 19 | 53 | 26 | 27 | null | null |
drhodes/jade2hdl | jade-decode/src/Jade/Decode/ModTest.hs | bsd-3-clause | acretePower filename mt lineNum line =
case parse power filename line of
Left msg -> mt
Right p -> mt { modPower = Just p } | 133 | acretePower filename mt lineNum line =
case parse power filename line of
Left msg -> mt
Right p -> mt { modPower = Just p } | 133 | acretePower filename mt lineNum line =
case parse power filename line of
Left msg -> mt
Right p -> mt { modPower = Just p } | 133 | false | false | 0 | 10 | 35 | 58 | 26 | 32 | null | null |
mxswd/swift-gen | src/CodeGen.hs | bsd-3-clause | foldup x = [x] | 14 | foldup x = [x] | 14 | foldup x = [x] | 14 | false | false | 1 | 5 | 3 | 15 | 6 | 9 | null | null |
ezyang/ghc | libraries/base/Data/OldList.hs | bsd-3-clause | -- See Note [INLINE unfoldr]
unfoldr f b0 = build (\c n ->
let go b = case f b of
Just (a, new_b) -> a `c` go new_b
Nothing -> n
in go b0) | 180 | unfoldr f b0 = build (\c n ->
let go b = case f b of
Just (a, new_b) -> a `c` go new_b
Nothing -> n
in go b0) | 151 | unfoldr f b0 = build (\c n ->
let go b = case f b of
Just (a, new_b) -> a `c` go new_b
Nothing -> n
in go b0) | 151 | true | false | 0 | 16 | 76 | 79 | 39 | 40 | null | null |
Airtnp/Freshman_Simple_Haskell_Lib | Idioms/Extensions.hs | mit | sort :: Ord a => [a] -> [a]
sort = let ?cmp = compare in sortBy' | 64 | sort :: Ord a => [a] -> [a]
sort = let ?cmp = compare in sortBy' | 64 | sort = let ?cmp = compare in sortBy' | 36 | false | true | 0 | 8 | 15 | 39 | 20 | 19 | null | null |
PipocaQuemada/ermine | src/Ermine/Pretty/Pattern.hs | bsd-2-clause | prettyPat' path (AsP p) prec kt = h <$> varPP (leafPP path)
<*> prettyPat' path p 12 kt
where h l r = parensIf (prec > 12) $ l <> text "@" <> r | 188 | prettyPat' path (AsP p) prec kt = h <$> varPP (leafPP path)
<*> prettyPat' path p 12 kt
where h l r = parensIf (prec > 12) $ l <> text "@" <> r | 188 | prettyPat' path (AsP p) prec kt = h <$> varPP (leafPP path)
<*> prettyPat' path p 12 kt
where h l r = parensIf (prec > 12) $ l <> text "@" <> r | 188 | false | false | 2 | 9 | 78 | 94 | 40 | 54 | null | null |
juodaspaulius/bclafer_old | src/Language/Clafer/Intermediate/Desugarer.hs | mit | desugarExInteger (PosExIntegerAst s) = -1 | 41 | desugarExInteger (PosExIntegerAst s) = -1 | 41 | desugarExInteger (PosExIntegerAst s) = -1 | 41 | false | false | 0 | 7 | 4 | 17 | 8 | 9 | null | null |
micxjo/hs-multiaddr | src/Network/Multiaddr.hs | bsd-3-clause | addrPartB :: MultiaddrPart -> Builder
addrPartB (IPv4 ip) = fromText "/ip4/" <> ipv4AddrB ip | 92 | addrPartB :: MultiaddrPart -> Builder
addrPartB (IPv4 ip) = fromText "/ip4/" <> ipv4AddrB ip | 92 | addrPartB (IPv4 ip) = fromText "/ip4/" <> ipv4AddrB ip | 54 | false | true | 0 | 7 | 13 | 34 | 16 | 18 | null | null |
fffej/HS-Poker | LookupPatternMatch.hs | bsd-3-clause | getValueFromProduct 1094951 = 4982 | 34 | getValueFromProduct 1094951 = 4982 | 34 | getValueFromProduct 1094951 = 4982 | 34 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
haroldcarr/learn-haskell-coq-ml-etc | haskell/playpen/anyhow/src/Lib.hs | unlicense | (.^.) :: Monad m
=> m (Either l r)
-> (l -> l)
-> m (Either l r)
(.^.) er1 fl = er1 >>= \case
Left e -> pure (Left (fl e))
r -> pure r
------------------------------------------------------------------------------
-- application | 256 | (.^.) :: Monad m
=> m (Either l r)
-> (l -> l)
-> m (Either l r)
(.^.) er1 fl = er1 >>= \case
Left e -> pure (Left (fl e))
r -> pure r
------------------------------------------------------------------------------
-- application | 256 | (.^.) er1 fl = er1 >>= \case
Left e -> pure (Left (fl e))
r -> pure r
------------------------------------------------------------------------------
-- application | 173 | false | true | 0 | 13 | 66 | 105 | 53 | 52 | null | null |
brendanhay/gogol | gogol-securitycenter/gen/Network/Google/Resource/SecurityCenter/Organizations/NotificationConfigs/Delete.hs | mpl-2.0 | -- | V1 error format.
oncdXgafv :: Lens' OrganizationsNotificationConfigsDelete (Maybe Xgafv)
oncdXgafv
= lens _oncdXgafv (\ s a -> s{_oncdXgafv = a}) | 152 | oncdXgafv :: Lens' OrganizationsNotificationConfigsDelete (Maybe Xgafv)
oncdXgafv
= lens _oncdXgafv (\ s a -> s{_oncdXgafv = a}) | 130 | oncdXgafv
= lens _oncdXgafv (\ s a -> s{_oncdXgafv = a}) | 58 | true | true | 0 | 9 | 23 | 48 | 25 | 23 | null | null |
adamrk/scheme2luac | src/Macro.hs | bsd-3-clause | -- | zipWith, but we take values from the longer list after the shorter list has
-- ended.
--
extZipWith :: (a -> a -> a) -> [a] -> [a] -> [a]
extZipWith f (b:bs) (c:cs) = f b c : extZipWith f bs cs | 198 | extZipWith :: (a -> a -> a) -> [a] -> [a] -> [a]
extZipWith f (b:bs) (c:cs) = f b c : extZipWith f bs cs | 104 | extZipWith f (b:bs) (c:cs) = f b c : extZipWith f bs cs | 55 | true | true | 0 | 8 | 44 | 83 | 45 | 38 | null | null |
urbanslug/ghc | testsuite/tests/codeGen/should_run/cgrun064.hs | bsd-3-clause | writeArray :: MArray s a -> Int -> a -> ST s ()
writeArray marr i@(I# i#) a
| i < 0 || i >= len =
error $ "bounds error, offset " ++ show i ++ ", length " ++ show len
| otherwise = ST $ \ s# ->
case writeArray# (unMArray marr) i# a s# of
s2# -> (# s2#, () #)
where len = lengthMArray marr | 312 | writeArray :: MArray s a -> Int -> a -> ST s ()
writeArray marr i@(I# i#) a
| i < 0 || i >= len =
error $ "bounds error, offset " ++ show i ++ ", length " ++ show len
| otherwise = ST $ \ s# ->
case writeArray# (unMArray marr) i# a s# of
s2# -> (# s2#, () #)
where len = lengthMArray marr | 312 | writeArray marr i@(I# i#) a
| i < 0 || i >= len =
error $ "bounds error, offset " ++ show i ++ ", length " ++ show len
| otherwise = ST $ \ s# ->
case writeArray# (unMArray marr) i# a s# of
s2# -> (# s2#, () #)
where len = lengthMArray marr | 264 | false | true | 24 | 7 | 93 | 148 | 76 | 72 | null | null |
yugr/sudoku | src/CNF.hs | mit | parse_minisat_assigns [] = Left "error in .cnf file: missing variable assignments" | 82 | parse_minisat_assigns [] = Left "error in .cnf file: missing variable assignments" | 82 | parse_minisat_assigns [] = Left "error in .cnf file: missing variable assignments" | 82 | false | false | 0 | 5 | 10 | 15 | 6 | 9 | null | null |
anchor/rados-timestore | lib/TimeStore/Index.hs | bsd-3-clause | -- | First result, and then the remainder that is later than that.
splitRemainder :: Time -> Index -> ((Epoch, Bucket), Index)
splitRemainder (Time t) (Index m) =
let (left, middle, right) = Map.splitLookup (Epoch t) m
first = case middle of
Just n -> if Map.null left -- Corner case, leftmost en... | 479 | splitRemainder :: Time -> Index -> ((Epoch, Bucket), Index)
splitRemainder (Time t) (Index m) =
let (left, middle, right) = Map.splitLookup (Epoch t) m
first = case middle of
Just n -> if Map.null left -- Corner case, leftmost entry
then (Epoch t, n)
... | 412 | splitRemainder (Time t) (Index m) =
let (left, middle, right) = Map.splitLookup (Epoch t) m
first = case middle of
Just n -> if Map.null left -- Corner case, leftmost entry
then (Epoch t, n)
else Map.findMax left
Nothing -> Map.findMax ... | 352 | true | true | 0 | 14 | 155 | 149 | 78 | 71 | null | null |
lukexi/ghc | libraries/base/System/IO.hs | bsd-3-clause | readFile :: FilePath -> IO String
readFile name = openFile name ReadMode >>= hGetContents | 99 | readFile :: FilePath -> IO String
readFile name = openFile name ReadMode >>= hGetContents | 99 | readFile name = openFile name ReadMode >>= hGetContents | 58 | false | true | 2 | 7 | 23 | 38 | 16 | 22 | null | null |
spechub/Hets | CASL/ToDoc.hs | gpl-2.0 | isJunct :: FORMULA f -> Bool
isJunct f = case f of
Junction {} -> True
_ -> isAnyImpl f
-- true for non-final | 118 | isJunct :: FORMULA f -> Bool
isJunct f = case f of
Junction {} -> True
_ -> isAnyImpl f
-- true for non-final | 118 | isJunct f = case f of
Junction {} -> True
_ -> isAnyImpl f
-- true for non-final | 89 | false | true | 0 | 8 | 32 | 50 | 23 | 27 | null | null |
nomeata/codeworld | codeworld-prediction/src/CodeWorld/Prediction.hs | apache-2.0 | advanceFuture :: StepFun s -> AnimationRate -> Timestamp -> Future s -> Future s
advanceFuture step rate target f
| M.null toPerform = f
| otherwise =
advanceCommitted step rate $
f { current = current', pending = pending', future = future' }
where
hasHappened t = t <= target
(toPerfor... | 538 | advanceFuture :: StepFun s -> AnimationRate -> Timestamp -> Future s -> Future s
advanceFuture step rate target f
| M.null toPerform = f
| otherwise =
advanceCommitted step rate $
f { current = current', pending = pending', future = future' }
where
hasHappened t = t <= target
(toPerfor... | 538 | advanceFuture step rate target f
| M.null toPerform = f
| otherwise =
advanceCommitted step rate $
f { current = current', pending = pending', future = future' }
where
hasHappened t = t <= target
(toPerform, future') = M.spanAntitone (hasHappened . fst) (future f)
pending' = pend... | 457 | false | true | 3 | 10 | 128 | 177 | 89 | 88 | null | null |
brendanhay/gogol | gogol-resourcemanager/gen/Network/Google/ResourceManager/Types/Product.hs | mpl-2.0 | -- | Creates a value of 'UndeleteProjectMetadata' with the minimum fields required to make a request.
--
undeleteProjectMetadata
:: UndeleteProjectMetadata
undeleteProjectMetadata = UndeleteProjectMetadata' | 210 | undeleteProjectMetadata
:: UndeleteProjectMetadata
undeleteProjectMetadata = UndeleteProjectMetadata' | 105 | undeleteProjectMetadata = UndeleteProjectMetadata' | 50 | true | true | 1 | 5 | 26 | 17 | 8 | 9 | null | null |
capital-match/hdo | src/Network/DO/Commands.hs | mit | -- smart constructors
listKeys :: DO [Key]
listKeys = ListKeys P.id | 67 | listKeys :: DO [Key]
listKeys = ListKeys P.id | 45 | listKeys = ListKeys P.id | 24 | true | true | 0 | 7 | 10 | 29 | 13 | 16 | null | null |
kmate/HaRe | old/testing/asPatterns/A7.hs | bsd-3-clause | main :: BTree Int
main = buildtree [3,1,2] | 42 | main :: BTree Int
main = buildtree [3,1,2] | 42 | main = buildtree [3,1,2] | 24 | false | true | 0 | 6 | 7 | 31 | 15 | 16 | null | null |
ezyang/ghc | testsuite/tests/typecheck/should_compile/T10195.hs | bsd-3-clause | magic :: (Bar m m') => c m zp -> Foo m zp (c m' zq)
-- Weird test case: (Bar m m') is simplifiable
magic = undefined | 116 | magic :: (Bar m m') => c m zp -> Foo m zp (c m' zq)
magic = undefined | 69 | magic = undefined | 17 | true | true | 0 | 9 | 27 | 47 | 24 | 23 | null | null |
haskell-opengl/OpenGLRaw | src/Graphics/GL/Functions/F27.hs | bsd-3-clause | -- glTextureView ---------------------------------------------------------------
-- | Manual page for <https://www.opengl.org/sdk/docs/man4/html/glTextureView.xhtml OpenGL 4.x>.
glTextureView
:: MonadIO m
=> GLuint -- ^ @texture@.
-> GLenum -- ^ @target@ of type [TextureTarget](Graphics-GL-Groups.html#TextureTar... | 683 | glTextureView
:: MonadIO m
=> GLuint -- ^ @texture@.
-> GLenum -- ^ @target@ of type [TextureTarget](Graphics-GL-Groups.html#TextureTarget).
-> GLuint -- ^ @origtexture@.
-> GLenum -- ^ @internalformat@ of type [InternalFormat](Graphics-GL-Groups.html#InternalFormat).
-> GLuint -- ^ @minlevel@.
-> GLuint ... | 504 | glTextureView v1 v2 v3 v4 v5 v6 v7 v8 = liftIO $ dyn826 ptr_glTextureView v1 v2 v3 v4 v5 v6 v7 v8 | 97 | true | true | 0 | 16 | 106 | 109 | 57 | 52 | null | null |
ganeti-github-testing/ganeti-test-1 | src/Ganeti/Constants.hs | bsd-2-clause | -- * File backend driver
fdBlktap :: String
fdBlktap = Types.fileDriverToRaw FileBlktap | 88 | fdBlktap :: String
fdBlktap = Types.fileDriverToRaw FileBlktap | 62 | fdBlktap = Types.fileDriverToRaw FileBlktap | 43 | true | true | 0 | 6 | 12 | 17 | 9 | 8 | null | null |
xpika/mohws | src/Network/MoHWS/Utility.hs | bsd-3-clause | -----------------------------------------------------------------------------
-- Exception utils
-- | Catch IO Errors for which a given predicate is true.
catchSomeIOErrors :: (IOError -> Bool) -> IO a -> (IOError -> IO a) -> IO a
catchSomeIOErrors p =
catchJust (\e -> toMaybe (p e) e) | 290 | catchSomeIOErrors :: (IOError -> Bool) -> IO a -> (IOError -> IO a) -> IO a
catchSomeIOErrors p =
catchJust (\e -> toMaybe (p e) e) | 134 | catchSomeIOErrors p =
catchJust (\e -> toMaybe (p e) e) | 58 | true | true | 0 | 11 | 45 | 79 | 39 | 40 | null | null |
brendanhay/gogol | gogol-serviceconsumermanagement/gen/Network/Google/Resource/ServiceConsumerManagement/Services/TenancyUnits/DeleteProject.hs | mpl-2.0 | -- | Required. Name of the tenancy unit. Such as
-- \'services\/service.googleapis.com\/projects\/12345\/tenancyUnits\/abcd\'.
studpName :: Lens' ServicesTenancyUnitsDeleteProject Text
studpName
= lens _studpName (\ s a -> s{_studpName = a}) | 243 | studpName :: Lens' ServicesTenancyUnitsDeleteProject Text
studpName
= lens _studpName (\ s a -> s{_studpName = a}) | 116 | studpName
= lens _studpName (\ s a -> s{_studpName = a}) | 58 | true | true | 1 | 9 | 29 | 47 | 23 | 24 | null | null |
vscharf/Mach7 | media/papers/OpenPatternMatching/artifact/code/exp.hs | bsd-3-clause | eval :: Expr -> Int
eval (Value n) = n | 44 | eval :: Expr -> Int
eval (Value n) = n | 43 | eval (Value n) = n | 23 | false | true | 0 | 9 | 15 | 30 | 13 | 17 | null | null |
reinvdwoerd/lisp | src/Primitives.hs | mit | --
-- numBoolBinop :: (Integer -> Integer -> Bool) -> [LispVal] -> LispVal
-- numBoolBinop op params = Val.Bool $ foldl1 op $ map unpackNum params
--
-- boolBoolBinop :: (Bool -> Bool -> Bool) -> [LispVal] -> LispVal
-- boolBoolBinop op params = Val.Bool $ foldl1 op $ map unpackBool params
-- Unpack
unpackNum :: Lisp... | 359 | unpackNum :: LispVal -> Integer
unpackNum (Number n) = n | 56 | unpackNum (Number n) = n | 24 | true | true | 0 | 6 | 65 | 35 | 20 | 15 | null | null |
39aldo39/klfc | src/Tmk.hs | gpl-3.0 | isTmkModifier ∷ TmkLetter → Bool
isTmkModifier (TmkModifier _) = True | 69 | isTmkModifier ∷ TmkLetter → Bool
isTmkModifier (TmkModifier _) = True | 69 | isTmkModifier (TmkModifier _) = True | 36 | false | true | 0 | 7 | 9 | 24 | 12 | 12 | null | null |
thoughtbot/yesod-auth-oauth2 | src/Yesod/Auth/OAuth2/Nylas.hs | mit | oauth2Nylas :: YesodAuth m => Text -> Text -> AuthPlugin m
oauth2Nylas clientId clientSecret =
authOAuth2 pluginName oauth $ \manager token -> do
req <- applyBasicAuth (encodeUtf8 $ atoken $ accessToken token) ""
<$> parseRequest "https://api.nylas.com/account"
resp <- httpLbs req manage... | 1,931 | oauth2Nylas :: YesodAuth m => Text -> Text -> AuthPlugin m
oauth2Nylas clientId clientSecret =
authOAuth2 pluginName oauth $ \manager token -> do
req <- applyBasicAuth (encodeUtf8 $ atoken $ accessToken token) ""
<$> parseRequest "https://api.nylas.com/account"
resp <- httpLbs req manage... | 1,931 | oauth2Nylas clientId clientSecret =
authOAuth2 pluginName oauth $ \manager token -> do
req <- applyBasicAuth (encodeUtf8 $ atoken $ accessToken token) ""
<$> parseRequest "https://api.nylas.com/account"
resp <- httpLbs req manager
let userResponse = responseBody resp
-- ... | 1,872 | false | true | 0 | 16 | 713 | 303 | 157 | 146 | null | null |
ananthakumaran/webify | src/TTF.hs | mit | glyphId :: CmapTable -> Int -> Int
glyphId CmapFormat0{c0GlyphIDs = glyphIds} n | n >= 0 && n < 256 = fromIntegral $ glyphIds !! n
| otherwise = 0 | 191 | glyphId :: CmapTable -> Int -> Int
glyphId CmapFormat0{c0GlyphIDs = glyphIds} n | n >= 0 && n < 256 = fromIntegral $ glyphIds !! n
| otherwise = 0 | 191 | glyphId CmapFormat0{c0GlyphIDs = glyphIds} n | n >= 0 && n < 256 = fromIntegral $ glyphIds !! n
| otherwise = 0 | 156 | false | true | 0 | 10 | 74 | 68 | 33 | 35 | null | null |
plow-technologies/keter-node | src/Keter/Node/Configuration.hs | bsd-3-clause | decodeKeterNodeStanzaConfig :: FilePath -> IO ( Either ParseException KeterNodeStanzaConfig)
decodeKeterNodeStanzaConfig = decodeFileRelative | 141 | decodeKeterNodeStanzaConfig :: FilePath -> IO ( Either ParseException KeterNodeStanzaConfig)
decodeKeterNodeStanzaConfig = decodeFileRelative | 141 | decodeKeterNodeStanzaConfig = decodeFileRelative | 48 | false | true | 0 | 8 | 11 | 26 | 13 | 13 | null | null |
DaMSL/K3 | src/Language/K3/Utils/Logger/Generators.hs | apache-2.0 | {-|
A set of logging functions for the current module. These logging functions
are generated as follows:
* Inline logging functions of the form @_debugI@ with type
@String -> a -> a@. The priority of the message is described
by the function name; the logger's name is the same as the module's name.... | 948 | loggingFunctions :: Q [Dec]
loggingFunctions = loggerGenerator "" | 65 | loggingFunctions = loggerGenerator "" | 37 | true | true | 0 | 6 | 222 | 21 | 11 | 10 | null | null |
emmanueltouzery/cigale-timesheet | src/EventProviders/Skype.hs | mit | fetchConversations :: SkypeConfigRecord -> ExceptT String IO [Text]
fetchConversations cfg = fmap (fromSql . head) <$>
lift (quickSkypeQuery' cfg "select distinct displayname from conversations order by lower(displayname)" []) | 230 | fetchConversations :: SkypeConfigRecord -> ExceptT String IO [Text]
fetchConversations cfg = fmap (fromSql . head) <$>
lift (quickSkypeQuery' cfg "select distinct displayname from conversations order by lower(displayname)" []) | 230 | fetchConversations cfg = fmap (fromSql . head) <$>
lift (quickSkypeQuery' cfg "select distinct displayname from conversations order by lower(displayname)" []) | 162 | false | true | 0 | 9 | 31 | 57 | 28 | 29 | null | null |
ganeti/ganeti | src/Ganeti/OpCodes.hs | bsd-2-clause | opSummaryVal OpTestAllocator { opIallocator = s } =
-- FIXME: Python doesn't handle None fields well, so we have behave the same
Just $ maybe "None" fromNonEmpty s | 167 | opSummaryVal OpTestAllocator { opIallocator = s } =
-- FIXME: Python doesn't handle None fields well, so we have behave the same
Just $ maybe "None" fromNonEmpty s | 167 | opSummaryVal OpTestAllocator { opIallocator = s } =
-- FIXME: Python doesn't handle None fields well, so we have behave the same
Just $ maybe "None" fromNonEmpty s | 167 | false | false | 0 | 8 | 31 | 30 | 15 | 15 | null | null |
hanshoglund/guido | src/Guido.hs | bsd-3-clause | -- |
-- Initialises the Guido Engine. Must be called before any attempt to read a Guido file or to use the
-- Guido Factory. The given device must be used throghout the session.
initialize' :: InitParams -> IO ()
initialize' = flip with $ (checkErr () =<<) . cInit | 265 | initialize' :: InitParams -> IO ()
initialize' = flip with $ (checkErr () =<<) . cInit | 86 | initialize' = flip with $ (checkErr () =<<) . cInit | 51 | true | true | 0 | 9 | 50 | 43 | 23 | 20 | null | null |
konn/leport | leport-web/fay-shared/FayCompat.hs | bsd-3-clause | eventData :: Event -> a
eventData = ffi "JSON.parse(%1.data)" | 61 | eventData :: Event -> a
eventData = ffi "JSON.parse(%1.data)" | 61 | eventData = ffi "JSON.parse(%1.data)" | 37 | false | true | 0 | 5 | 8 | 18 | 9 | 9 | null | null |
donatello/minio-hs | src/Network/Minio/Utils.hs | apache-2.0 | httpLbs :: (R.MonadThrow m, MonadIO m)
=> NC.Request -> NC.Manager
-> m (NC.Response LByteString)
httpLbs req mgr = do
respE <- liftIO $ tryHttpEx $ NC.httpLbs req mgr
resp <- either throwM return respE
unless (isSuccessStatus $ NC.responseStatus resp) $
case contentTypeMay resp of
Just ... | 794 | httpLbs :: (R.MonadThrow m, MonadIO m)
=> NC.Request -> NC.Manager
-> m (NC.Response LByteString)
httpLbs req mgr = do
respE <- liftIO $ tryHttpEx $ NC.httpLbs req mgr
resp <- either throwM return respE
unless (isSuccessStatus $ NC.responseStatus resp) $
case contentTypeMay resp of
Just ... | 794 | httpLbs req mgr = do
respE <- liftIO $ tryHttpEx $ NC.httpLbs req mgr
resp <- either throwM return respE
unless (isSuccessStatus $ NC.responseStatus resp) $
case contentTypeMay resp of
Just "application/xml" -> do
sErr <- parseErrResponse $ NC.responseBody resp
throwM sErr
_ -> th... | 680 | false | true | 0 | 16 | 212 | 276 | 126 | 150 | null | null |
jaalonso/I1M-Cod-Temas | src/Tema_13/Vida.hs | gpl-2.0 | limpiaPantalla :: IO ()
limpiaPantalla = putStr "\ESC[2J" | 57 | limpiaPantalla :: IO ()
limpiaPantalla = putStr "\ESC[2J" | 57 | limpiaPantalla = putStr "\ESC[2J" | 33 | false | true | 0 | 7 | 7 | 25 | 10 | 15 | null | null |
0xfaded/websockets | tests/haskell/Network/WebSockets/Tests.hs | bsd-3-clause | arbitraryFragmentation :: BL.ByteString -> Gen [BL.ByteString]
arbitraryFragmentation bs = arbitraryFragmentation' bs
where
len :: Int
len = fromIntegral $ BL.length bs
arbitraryFragmentation' bs' = do
-- TODO: we currently can't send packets of length 0. We should
-- investigate why (rega... | 530 | arbitraryFragmentation :: BL.ByteString -> Gen [BL.ByteString]
arbitraryFragmentation bs = arbitraryFragmentation' bs
where
len :: Int
len = fromIntegral $ BL.length bs
arbitraryFragmentation' bs' = do
-- TODO: we currently can't send packets of length 0. We should
-- investigate why (rega... | 530 | arbitraryFragmentation bs = arbitraryFragmentation' bs
where
len :: Int
len = fromIntegral $ BL.length bs
arbitraryFragmentation' bs' = do
-- TODO: we currently can't send packets of length 0. We should
-- investigate why (regardless of the spec).
n <- QC.choose (1, len - 1)
... | 467 | false | true | 2 | 14 | 151 | 151 | 75 | 76 | null | null |
ardfard/dagang | test/TestImport.hs | mit | runHandler :: Handler a -> YesodExample App a
runHandler handler = do
app <- getTestYesod
fakeHandlerGetLogger appLogger app handler | 140 | runHandler :: Handler a -> YesodExample App a
runHandler handler = do
app <- getTestYesod
fakeHandlerGetLogger appLogger app handler | 140 | runHandler handler = do
app <- getTestYesod
fakeHandlerGetLogger appLogger app handler | 94 | false | true | 0 | 7 | 26 | 43 | 19 | 24 | null | null |
HJvT/com | System/Win32/Com/Exception.hs | bsd-3-clause | sTG_S_MULTIPLEOPENS :: HRESULT
sTG_S_MULTIPLEOPENS = word32ToInt32 (0x00030204 ::Word32) | 88 | sTG_S_MULTIPLEOPENS :: HRESULT
sTG_S_MULTIPLEOPENS = word32ToInt32 (0x00030204 ::Word32) | 88 | sTG_S_MULTIPLEOPENS = word32ToInt32 (0x00030204 ::Word32) | 57 | false | true | 0 | 6 | 7 | 26 | 12 | 14 | null | null |
redongjun/haskellschool | homework/HW05/HW05.hs | unlicense | getFlow :: [Transaction] -> Map String Integer
getFlow = foldr flows Map.empty
where flows t = Map.insertWith (+) (to t) (amount t) .
Map.insertWith (+) (from t) (negate $ amount t)
-- Exercise 6 ----------------------------------------- | 258 | getFlow :: [Transaction] -> Map String Integer
getFlow = foldr flows Map.empty
where flows t = Map.insertWith (+) (to t) (amount t) .
Map.insertWith (+) (from t) (negate $ amount t)
-- Exercise 6 ----------------------------------------- | 258 | getFlow = foldr flows Map.empty
where flows t = Map.insertWith (+) (to t) (amount t) .
Map.insertWith (+) (from t) (negate $ amount t)
-- Exercise 6 ----------------------------------------- | 211 | false | true | 0 | 9 | 55 | 95 | 49 | 46 | null | null |
kc1212/enigma-hs | Crypto/Enigma/Helper.hs | mit | kperm k xs = [x:ys | x <- xs, ys <- kperm (k-1) (delete x xs)] | 62 | kperm k xs = [x:ys | x <- xs, ys <- kperm (k-1) (delete x xs)] | 62 | kperm k xs = [x:ys | x <- xs, ys <- kperm (k-1) (delete x xs)] | 62 | false | false | 0 | 10 | 15 | 54 | 27 | 27 | null | null |
brendanhay/gogol | gogol-resourcemanager/gen/Network/Google/Resource/CloudResourceManager/Folders/Create.hs | mpl-2.0 | -- | Upload protocol for media (e.g. \"raw\", \"multipart\").
fcUploadProtocol :: Lens' FoldersCreate (Maybe Text)
fcUploadProtocol
= lens _fcUploadProtocol
(\ s a -> s{_fcUploadProtocol = a}) | 200 | fcUploadProtocol :: Lens' FoldersCreate (Maybe Text)
fcUploadProtocol
= lens _fcUploadProtocol
(\ s a -> s{_fcUploadProtocol = a}) | 138 | fcUploadProtocol
= lens _fcUploadProtocol
(\ s a -> s{_fcUploadProtocol = a}) | 85 | true | true | 0 | 9 | 33 | 48 | 25 | 23 | null | null |
ollef/Grempa | examples/Ex3FunLex.hs | bsd-3-clause | go :: (String -> Tok) -> (Char -> Bool) -> String -> [Tok]
go c p xs = let (v, rest) = span p xs in c v : lexToks rest | 118 | go :: (String -> Tok) -> (Char -> Bool) -> String -> [Tok]
go c p xs = let (v, rest) = span p xs in c v : lexToks rest | 118 | go c p xs = let (v, rest) = span p xs in c v : lexToks rest | 59 | false | true | 0 | 9 | 30 | 84 | 41 | 43 | null | null |
kevin-li-195/books | lib/Renewal/LibraryScraper.hs | bsd-3-clause | -- | The entire header
header :: Parser [String]
header = between tr tr headerElems | 83 | header :: Parser [String]
header = between tr tr headerElems | 60 | header = between tr tr headerElems | 34 | true | true | 0 | 6 | 14 | 25 | 13 | 12 | null | null |
thalerjonathan/phd | public/towards/SugarScape/experimental/chapter2/src/SugarScape/Simulation.hs | gpl-3.0 | initSimulationOpt (Just seed) params = return $ initSimulationSeed seed params | 78 | initSimulationOpt (Just seed) params = return $ initSimulationSeed seed params | 78 | initSimulationOpt (Just seed) params = return $ initSimulationSeed seed params | 78 | false | false | 0 | 7 | 9 | 26 | 12 | 14 | null | null |
sordina/IndentationParser | src/Main.hs | mit | main :: IO ()
main = interact (IP.renderF . IP.parse) | 53 | main :: IO ()
main = interact (IP.renderF . IP.parse) | 53 | main = interact (IP.renderF . IP.parse) | 39 | false | true | 0 | 8 | 9 | 30 | 15 | 15 | null | null |
jean-edouard/manager | xec/xec.hs | gpl-2.0 | introspect :: DBusConnection -> Location -> IO Object
introspect c loc =
return . mkObject =<< (call_ c (fromString $ service loc) $
DBusCall (fromString $ object loc) "Introspect" (Just "org.freedesktop.DBus.Introspectable") [])
where
mkObject r = case returnBody r of
[ DBusString str ] ->
ca... | 484 | introspect :: DBusConnection -> Location -> IO Object
introspect c loc =
return . mkObject =<< (call_ c (fromString $ service loc) $
DBusCall (fromString $ object loc) "Introspect" (Just "org.freedesktop.DBus.Introspectable") [])
where
mkObject r = case returnBody r of
[ DBusString str ] ->
ca... | 484 | introspect c loc =
return . mkObject =<< (call_ c (fromString $ service loc) $
DBusCall (fromString $ object loc) "Introspect" (Just "org.freedesktop.DBus.Introspectable") [])
where
mkObject r = case returnBody r of
[ DBusString str ] ->
case fromXml ( TL.fromChunks [TE.decodeUtf8 $ ustringToB... | 430 | false | true | 0 | 14 | 122 | 170 | 81 | 89 | null | null |
trygvis/hledger | hledger/Hledger/Cli/Main.hs | gpl-3.0 | run opts args =
run opts args
where
run opts _
| Help `elem` opts = putStr usage_cli
| Version `elem` opts = putStrLn $ progversionstr progname_cli
| BinaryFilename `elem` opts = putStrLn $ binaryfilename progname_cli
run _ [] = argsEr... | 1,063 | run opts args =
run opts args
where
run opts _
| Help `elem` opts = putStr usage_cli
| Version `elem` opts = putStrLn $ progversionstr progname_cli
| BinaryFilename `elem` opts = putStrLn $ binaryfilename progname_cli
run _ [] = argsEr... | 1,063 | run opts args =
run opts args
where
run opts _
| Help `elem` opts = putStr usage_cli
| Version `elem` opts = putStrLn $ progversionstr progname_cli
| BinaryFilename `elem` opts = putStrLn $ binaryfilename progname_cli
run _ [] = argsEr... | 1,063 | false | false | 0 | 10 | 334 | 334 | 164 | 170 | null | null |
robstewart57/Gps2HtmlReport | Data/GPS/Gps2HtmlReport/DrawOsm.hs | bsd-3-clause | maxNumAutoTiles = 32 | 20 | maxNumAutoTiles = 32 | 20 | maxNumAutoTiles = 32 | 20 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
yliu120/K3 | src/Language/K3/Analysis/SEffects/Inference.hs | apache-2.0 | fsetAll :: FEnv -> Identifier -> [K3 Effect] -> FEnv
fsetAll env x l = Map.insert x l env | 89 | fsetAll :: FEnv -> Identifier -> [K3 Effect] -> FEnv
fsetAll env x l = Map.insert x l env | 89 | fsetAll env x l = Map.insert x l env | 36 | false | true | 0 | 9 | 18 | 45 | 22 | 23 | null | null |
rkoeninger/GameCom | src/lib/Base.hs | mit | (|>) :: a -> (a -> b) -> b
(|>) x f = f x | 41 | (|>) :: a -> (a -> b) -> b
(|>) x f = f x | 41 | (|>) x f = f x | 14 | false | true | 0 | 9 | 14 | 44 | 22 | 22 | null | null |
haskell-opengl/OpenGLRaw | src/Graphics/GL/Functions/F05.hs | bsd-3-clause | -- glDeleteBuffersARB ----------------------------------------------------------
-- | This command is an alias for 'glDeleteBuffers'.
glDeleteBuffersARB
:: MonadIO m
=> GLsizei -- ^ @n@.
-> Ptr GLuint -- ^ @buffers@ pointing to @n@ elements of type @GLuint@.
-> m ()
glDeleteBuffersARB v1 v2 = liftIO $ dyn200 p... | 347 | glDeleteBuffersARB
:: MonadIO m
=> GLsizei -- ^ @n@.
-> Ptr GLuint -- ^ @buffers@ pointing to @n@ elements of type @GLuint@.
-> m ()
glDeleteBuffersARB v1 v2 = liftIO $ dyn200 ptr_glDeleteBuffersARB v1 v2 | 212 | glDeleteBuffersARB v1 v2 = liftIO $ dyn200 ptr_glDeleteBuffersARB v1 v2 | 71 | true | true | 0 | 10 | 55 | 58 | 28 | 30 | null | null |
stefanocerruti/haskell-primer-alpha | src/Playground14.hs | bsd-3-clause | threeLetterMessage :: [ThreeLetterAlphabet]
threeLetterMessage = [Alpha,Alpha,Beta,Alpha,Kappa] | 95 | threeLetterMessage :: [ThreeLetterAlphabet]
threeLetterMessage = [Alpha,Alpha,Beta,Alpha,Kappa] | 95 | threeLetterMessage = [Alpha,Alpha,Beta,Alpha,Kappa] | 51 | false | true | 0 | 5 | 5 | 29 | 18 | 11 | null | null |
zjhmale/HMF | src/BP/Ast.hs | bsd-3-clause | stringOfTerm :: Term -> String
stringOfTerm t = case t of
Ident n -> n
Lambda v b -> "λ" ++ v ++ " → " ++ stringOfTerm b
--Function
Function name params body rtnType -> "ƒ " ++ name ++ "(" ++ intercalate ", " (map stringOfParam params) ++ ") → "
... | 1,324 | stringOfTerm :: Term -> String
stringOfTerm t = case t of
Ident n -> n
Lambda v b -> "λ" ++ v ++ " → " ++ stringOfTerm b
--Function
Function name params body rtnType -> "ƒ " ++ name ++ "(" ++ intercalate ", " (map stringOfParam params) ++ ") → "
... | 1,324 | stringOfTerm t = case t of
Ident n -> n
Lambda v b -> "λ" ++ v ++ " → " ++ stringOfTerm b
--Function
Function name params body rtnType -> "ƒ " ++ name ++ "(" ++ intercalate ", " (map stringOfParam params) ++ ") → "
... | 1,293 | false | true | 0 | 14 | 709 | 352 | 163 | 189 | null | null |
ryota-ka/yo-slack-adapter | src/Web/YoSlackAdapter.hs | bsd-3-clause | slackMessageForYo :: Yo -> Message
slackMessageForYo yo =
defMessage `withAttachments` attachments
`withText` text
`withUnfurlLinks` True
`withUsername` "Yo"
where
attachments = maybeToList $ flip withFallback text <$> attachmentForYo yo
tex... | 336 | slackMessageForYo :: Yo -> Message
slackMessageForYo yo =
defMessage `withAttachments` attachments
`withText` text
`withUnfurlLinks` True
`withUsername` "Yo"
where
attachments = maybeToList $ flip withFallback text <$> attachmentForYo yo
tex... | 336 | slackMessageForYo yo =
defMessage `withAttachments` attachments
`withText` text
`withUnfurlLinks` True
`withUsername` "Yo"
where
attachments = maybeToList $ flip withFallback text <$> attachmentForYo yo
text = textForYo yo | 301 | false | true | 0 | 9 | 110 | 73 | 40 | 33 | null | null |
paholg/dotfiles | home/xmonad.hs | gpl-2.0 | red = "#f2241f" | 19 | red = "#f2241f" | 19 | red = "#f2241f" | 19 | false | false | 1 | 5 | 6 | 10 | 3 | 7 | null | null |
ditto-lang/ditto | src/Ditto/Funify.hs | gpl-3.0 | funify' xs a1 a2 = convStatic (Just []) a1 a2 | 45 | funify' xs a1 a2 = convStatic (Just []) a1 a2 | 45 | funify' xs a1 a2 = convStatic (Just []) a1 a2 | 45 | false | false | 0 | 8 | 9 | 28 | 13 | 15 | null | null |
vincenthz/hs-foundation | foundation/tests/Test/Foundation/String/Base64.hs | bsd-3-clause | isPeriod :: Word8 -> Bool
isPeriod w = w == 46 | 46 | isPeriod :: Word8 -> Bool
isPeriod w = w == 46 | 46 | isPeriod w = w == 46 | 20 | false | true | 0 | 5 | 10 | 22 | 11 | 11 | null | null |
Cahu/krpc-hs | src/KRPCHS/SpaceCenter.hs | gpl-3.0 | vesselResourcesInDecoupleStage :: KRPCHS.SpaceCenter.Vessel -> Data.Int.Int32 -> Bool -> RPCContext (KRPCHS.SpaceCenter.Resources)
vesselResourcesInDecoupleStage thisArg stageArg cumulativeArg = do
let r = makeRequest "SpaceCenter" "Vessel_ResourcesInDecoupleStage" [makeArgument 0 thisArg, makeArgument 1 stageArg, ... | 398 | vesselResourcesInDecoupleStage :: KRPCHS.SpaceCenter.Vessel -> Data.Int.Int32 -> Bool -> RPCContext (KRPCHS.SpaceCenter.Resources)
vesselResourcesInDecoupleStage thisArg stageArg cumulativeArg = do
let r = makeRequest "SpaceCenter" "Vessel_ResourcesInDecoupleStage" [makeArgument 0 thisArg, makeArgument 1 stageArg, ... | 398 | vesselResourcesInDecoupleStage thisArg stageArg cumulativeArg = do
let r = makeRequest "SpaceCenter" "Vessel_ResourcesInDecoupleStage" [makeArgument 0 thisArg, makeArgument 1 stageArg, makeArgument 2 cumulativeArg]
res <- sendRequest r
processResponse res | 267 | false | true | 0 | 13 | 48 | 106 | 50 | 56 | null | null |
brendanhay/gogol | gogol-iam/gen/Network/Google/Resource/IAM/Projects/Locations/WorkLoadIdentityPools/Providers/List.hs | mpl-2.0 | -- | OAuth access token.
plwlipplAccessToken :: Lens' ProjectsLocationsWorkLoadIdentityPoolsProvidersList (Maybe Text)
plwlipplAccessToken
= lens _plwlipplAccessToken
(\ s a -> s{_plwlipplAccessToken = a}) | 213 | plwlipplAccessToken :: Lens' ProjectsLocationsWorkLoadIdentityPoolsProvidersList (Maybe Text)
plwlipplAccessToken
= lens _plwlipplAccessToken
(\ s a -> s{_plwlipplAccessToken = a}) | 188 | plwlipplAccessToken
= lens _plwlipplAccessToken
(\ s a -> s{_plwlipplAccessToken = a}) | 94 | true | true | 0 | 9 | 29 | 46 | 25 | 21 | null | null |
anton-k/sharc-timbre | src/Sharc/Instruments/TrumpetBach.hs | bsd-3-clause | note10 :: Note
note10 = Note
(Pitch 440.0 57 "a4")
11
(Range
(NoteRange
(NoteRangeAmplitude 7920.0 18 3.49)
(NoteRangeHarmonicFreq 1 440.0))
(NoteRange
(NoteRangeAmplitude 2200.0 5 3927.0)
(NoteRangeHarmonicFreq 22 9680.0)))
[Harmonic 1 (-1... | 964 | note10 :: Note
note10 = Note
(Pitch 440.0 57 "a4")
11
(Range
(NoteRange
(NoteRangeAmplitude 7920.0 18 3.49)
(NoteRangeHarmonicFreq 1 440.0))
(NoteRange
(NoteRangeAmplitude 2200.0 5 3927.0)
(NoteRangeHarmonicFreq 22 9680.0)))
[Harmonic 1 (-1... | 964 | note10 = Note
(Pitch 440.0 57 "a4")
11
(Range
(NoteRange
(NoteRangeAmplitude 7920.0 18 3.49)
(NoteRangeHarmonicFreq 1 440.0))
(NoteRange
(NoteRangeAmplitude 2200.0 5 3927.0)
(NoteRangeHarmonicFreq 22 9680.0)))
[Harmonic 1 (-1.815) 2511.36
... | 949 | false | true | 0 | 10 | 279 | 363 | 185 | 178 | null | null |
owestphal/LootLanguage | src/Category.hs | bsd-3-clause | implementPrimCat :: PrimCat -> String
implementPrimCat (ItemLevel ord n) = orderedParameter "ItemLevel" ord n | 109 | implementPrimCat :: PrimCat -> String
implementPrimCat (ItemLevel ord n) = orderedParameter "ItemLevel" ord n | 109 | implementPrimCat (ItemLevel ord n) = orderedParameter "ItemLevel" ord n | 71 | false | true | 0 | 7 | 13 | 33 | 16 | 17 | null | null |
oldmanmike/ghc | compiler/main/DynFlags.hs | bsd-3-clause | pgm_libtool :: DynFlags -> String
pgm_libtool dflags = sPgm_libtool (settings dflags) | 95 | pgm_libtool :: DynFlags -> String
pgm_libtool dflags = sPgm_libtool (settings dflags) | 95 | pgm_libtool dflags = sPgm_libtool (settings dflags) | 51 | false | true | 0 | 7 | 20 | 29 | 13 | 16 | null | null |
cutsea110/sig | sig-api/TechnicalIndicators/EMA.hs | bsd-3-clause | ema2 :: Fractional v =>
(Int, Int) -> [(k, Maybe v)] -> ([(k, Maybe v)], [(k, Maybe v)])
ema2 ps = pair collector . para averageN ps | 137 | ema2 :: Fractional v =>
(Int, Int) -> [(k, Maybe v)] -> ([(k, Maybe v)], [(k, Maybe v)])
ema2 ps = pair collector . para averageN ps | 137 | ema2 ps = pair collector . para averageN ps | 43 | false | true | 0 | 11 | 31 | 89 | 48 | 41 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.