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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
WraithM/haskell-opaleye | src/Opaleye/SqlTypes.hs | bsd-3-clause | sqlLocalTime :: Time.LocalTime -> F.Field SqlTimestamp
sqlLocalTime = P.pgLocalTime | 83 | sqlLocalTime :: Time.LocalTime -> F.Field SqlTimestamp
sqlLocalTime = P.pgLocalTime | 83 | sqlLocalTime = P.pgLocalTime | 28 | false | true | 0 | 8 | 8 | 30 | 13 | 17 | null | null |
christiaanb/ghc-typelits-extra | src/GHC/TypeLits/Extra/Solver/Unify.hs | bsd-2-clause | unifyExtra' :: ExtraOp -> ExtraOp -> UnifyResult
unifyExtra' u v
| eqFV u v
= go u v
| otherwise
= Draw
where
go a b | a == b = Win
-- The following operations commute
go (Max a b) (Max x y) = commuteResult (go a y) (go b x)
go (Min a b) (Min x y) = commuteResult (go a y) (go b x)
go (GCD ... | 773 | unifyExtra' :: ExtraOp -> ExtraOp -> UnifyResult
unifyExtra' u v
| eqFV u v
= go u v
| otherwise
= Draw
where
go a b | a == b = Win
-- The following operations commute
go (Max a b) (Max x y) = commuteResult (go a y) (go b x)
go (Min a b) (Min x y) = commuteResult (go a y) (go b x)
go (GCD ... | 773 | unifyExtra' u v
| eqFV u v
= go u v
| otherwise
= Draw
where
go a b | a == b = Win
-- The following operations commute
go (Max a b) (Max x y) = commuteResult (go a y) (go b x)
go (Min a b) (Min x y) = commuteResult (go a y) (go b x)
go (GCD a b) (GCD x y) = commuteResult (go a y) (go b x)
... | 724 | false | true | 9 | 9 | 229 | 330 | 162 | 168 | null | null |
s9gf4ult/hdbi | testsrc/sqlvalues.hs | bsd-3-clause | -- convert to Text and back
partialChecks :: (Eq a, Show a, ToSql a, FromSql a) => a -> Result
partialChecks x = x ==? (fromSql $ toSql x) | 139 | partialChecks :: (Eq a, Show a, ToSql a, FromSql a) => a -> Result
partialChecks x = x ==? (fromSql $ toSql x) | 110 | partialChecks x = x ==? (fromSql $ toSql x) | 43 | true | true | 0 | 8 | 29 | 60 | 31 | 29 | null | null |
Rotaerk/iircc | src/irc/Network/IRC/Parser.hs | bsd-3-clause | pServerName :: Parser ServerName
pServerName = pHostName | 56 | pServerName :: Parser ServerName
pServerName = pHostName | 56 | pServerName = pHostName | 23 | false | true | 0 | 5 | 6 | 14 | 7 | 7 | null | null |
stevely/hspirv | src/SpirV/Builder.hs | bsd-3-clause | -- Id 1: Result type, must be float type
-- Id 2: First operand
-- Id 3: Second operand
fSub :: TypeId -> Id -> Id -> Builder Id
fSub (TypeId i) = R.fSub i | 155 | fSub :: TypeId -> Id -> Id -> Builder Id
fSub (TypeId i) = R.fSub i | 67 | fSub (TypeId i) = R.fSub i | 26 | true | true | 0 | 11 | 34 | 48 | 23 | 25 | null | null |
I3ck/H2D | src/Path2D.hs | lgpl-3.0 | --------------------------------------------------------------------------------
intersectionsLP :: Line2D -> Path2D -> Path2D
intersectionsLP _ [] = [] | 156 | intersectionsLP :: Line2D -> Path2D -> Path2D
intersectionsLP _ [] = [] | 74 | intersectionsLP _ [] = [] | 28 | true | true | 0 | 6 | 16 | 29 | 15 | 14 | null | null |
Xandaros/MinecraftCLI | app/Main.hs | bsd-2-clause | whileM :: Monad f => f Bool -> f () -> f ()
whileM c x = c >>= \case
False -> pure ()
True -> x >> whileM c x | 117 | whileM :: Monad f => f Bool -> f () -> f ()
whileM c x = c >>= \case
False -> pure ()
True -> x >> whileM c x | 117 | whileM c x = c >>= \case
False -> pure ()
True -> x >> whileM c x | 73 | false | true | 0 | 11 | 38 | 81 | 36 | 45 | null | null |
mankyKitty/haskell-to-llvm-compiler | src/LlvmParser.hs | mit | unarydef :: Parser Expr
unarydef = do
reserved "def"
reserved "unary"
o <- op
args <- parens $ many identifier
body <- expr
return $ UnaryDef o args body | 165 | unarydef :: Parser Expr
unarydef = do
reserved "def"
reserved "unary"
o <- op
args <- parens $ many identifier
body <- expr
return $ UnaryDef o args body | 165 | unarydef = do
reserved "def"
reserved "unary"
o <- op
args <- parens $ many identifier
body <- expr
return $ UnaryDef o args body | 141 | false | true | 0 | 9 | 40 | 68 | 29 | 39 | null | null |
christiaanb/Idris-dev | src/Idris/ElabTerm.hs | bsd-3-clause | reifyTTConst (P _ n _) | n == reflm "VoidType" = return $ VoidType | 66 | reifyTTConst (P _ n _) | n == reflm "VoidType" = return $ VoidType | 66 | reifyTTConst (P _ n _) | n == reflm "VoidType" = return $ VoidType | 66 | false | false | 0 | 9 | 13 | 36 | 16 | 20 | null | null |
rahulmutt/ghcvm | libraries/base/Data/Data.hs | bsd-3-clause | -- | Gets the module of a type constructor:
-- take *.*.*... before name
tyconModule :: String -> String
tyconModule x = let (a,b) = break ((==) '.') x
in if b == ""
then b
else a ++ tyconModule' (tail b)
where
tyconModule' y = let y' = tyconModule y
... | 744 | tyconModule :: String -> String
tyconModule x = let (a,b) = break ((==) '.') x
in if b == ""
then b
else a ++ tyconModule' (tail b)
where
tyconModule' y = let y' = tyconModule y
in if y' == "" then "" else ('.':y')
------------... | 671 | tyconModule x = let (a,b) = break ((==) '.') x
in if b == ""
then b
else a ++ tyconModule' (tail b)
where
tyconModule' y = let y' = tyconModule y
in if y' == "" then "" else ('.':y')
--------------------------------------------... | 639 | true | true | 1 | 11 | 183 | 136 | 70 | 66 | null | null |
rad1al/hutton_exercises | notes_ch13.hs | gpl-2.0 | expr :: Parser Int
expr = do t <- term
do symbol "+"
e <- expr
return (t + e)
<|> return t | 139 | expr :: Parser Int
expr = do t <- term
do symbol "+"
e <- expr
return (t + e)
<|> return t | 139 | expr = do t <- term
do symbol "+"
e <- expr
return (t + e)
<|> return t | 120 | false | true | 0 | 13 | 71 | 63 | 26 | 37 | null | null |
lambdacms/lambdacms | lambdacms-media/LambdaCms/Media/Message.hs | mit | defaultMessage :: MediaMessage -> Text
defaultMessage = englishMessage | 70 | defaultMessage :: MediaMessage -> Text
defaultMessage = englishMessage | 70 | defaultMessage = englishMessage | 31 | false | true | 0 | 7 | 7 | 22 | 9 | 13 | null | null |
JoeyEremondi/haskelm-old | src/Docs.hs | bsd-3-clause | docThing :: IParser (String, D.ParseDeclaration, String)
docThing = uncommentable <|> commented <|> uncommented ""
where
uncommentable = do
ifx <- infixDecl
return ("", ifx, "")
commented = do
comment <- docComment
freshLine
uncommented comment
uncommented... | 462 | docThing :: IParser (String, D.ParseDeclaration, String)
docThing = uncommentable <|> commented <|> uncommented ""
where
uncommentable = do
ifx <- infixDecl
return ("", ifx, "")
commented = do
comment <- docComment
freshLine
uncommented comment
uncommented... | 462 | docThing = uncommentable <|> commented <|> uncommented ""
where
uncommentable = do
ifx <- infixDecl
return ("", ifx, "")
commented = do
comment <- docComment
freshLine
uncommented comment
uncommented comment = do
(src,def) <- withSource $ choice [ ... | 405 | false | true | 0 | 14 | 133 | 144 | 74 | 70 | null | null |
sherwoodwang/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/Layout.hs | lgpl-2.1 | {-----------------------------------------------------------------------------------------
primitive layouts
-----------------------------------------------------------------------------------------}
-- | (primitive) Create a labeled border around a layout (= 'StaticBox').
-- Just like a 'grid', the horizontal or ver... | 1,021 | boxed :: String -> Layout -> Layout
boxed txt' content'
= TextBox optionsDefault{ stretchV = hasvstretch, stretchH = hashstretch
, fillMode = hasfill, adjustMinSize = True }
txt' (extramargin content')
where
hasvstretch = stretchV (options content')
hashstretch = stretchH (... | 610 | boxed txt' content'
= TextBox optionsDefault{ stretchV = hasvstretch, stretchH = hashstretch
, fillMode = hasfill, adjustMinSize = True }
txt' (extramargin content')
where
hasvstretch = stretchV (options content')
hashstretch = stretchH (options content')
hasfill = if... | 574 | true | true | 4 | 12 | 214 | 179 | 88 | 91 | null | null |
mcschroeder/ghc | compiler/basicTypes/Id.hs | bsd-3-clause | setInlinePragma :: Id -> InlinePragma -> Id
setInlinePragma id prag = modifyIdInfo (`setInlinePragInfo` prag) id | 112 | setInlinePragma :: Id -> InlinePragma -> Id
setInlinePragma id prag = modifyIdInfo (`setInlinePragInfo` prag) id | 112 | setInlinePragma id prag = modifyIdInfo (`setInlinePragInfo` prag) id | 68 | false | true | 0 | 6 | 14 | 35 | 19 | 16 | null | null |
prt2121/fp101x | lab2.hs | apache-2.0 | -- ===================================
-- Ex. 1
-- ===================================
toDigitsRev :: Integer -> [Integer]
toDigitsRev n = reverse . toDigits $ n | 162 | toDigitsRev :: Integer -> [Integer]
toDigitsRev n = reverse . toDigits $ n | 74 | toDigitsRev n = reverse . toDigits $ n | 38 | true | true | 0 | 6 | 20 | 32 | 18 | 14 | null | null |
fmapfmapfmap/amazonka | amazonka-rds/gen/Network/AWS/RDS/RevokeDBSecurityGroupIngress.hs | mpl-2.0 | -- | Creates a value of 'RevokeDBSecurityGroupIngress' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'rdsgiEC2SecurityGroupOwnerId'
--
-- * 'rdsgiEC2SecurityGroupName'
--
-- * 'rdsgiCIdRIP'
--
-- * 'rdsgiEC2SecurityGroupId'
--
-- * '... | 762 | revokeDBSecurityGroupIngress
:: Text -- ^ 'rdsgiDBSecurityGroupName'
-> RevokeDBSecurityGroupIngress
revokeDBSecurityGroupIngress pDBSecurityGroupName_ =
RevokeDBSecurityGroupIngress'
{ _rdsgiEC2SecurityGroupOwnerId = Nothing
, _rdsgiEC2SecurityGroupName = Nothing
, _rdsgiCIdRIP = Nothing
, ... | 416 | revokeDBSecurityGroupIngress pDBSecurityGroupName_ =
RevokeDBSecurityGroupIngress'
{ _rdsgiEC2SecurityGroupOwnerId = Nothing
, _rdsgiEC2SecurityGroupName = Nothing
, _rdsgiCIdRIP = Nothing
, _rdsgiEC2SecurityGroupId = Nothing
, _rdsgiDBSecurityGroupName = pDBSecurityGroupName_
} | 307 | true | true | 0 | 6 | 118 | 64 | 44 | 20 | null | null |
olsner/ghc | libraries/base/Data/Traversable.hs | bsd-3-clause | fmapDefault f = runIdentity . traverse (Identity . f) | 53 | fmapDefault f = runIdentity . traverse (Identity . f) | 53 | fmapDefault f = runIdentity . traverse (Identity . f) | 53 | false | false | 0 | 8 | 8 | 23 | 11 | 12 | null | null |
urbanslug/ghc | compiler/typecheck/TcRnTypes.hs | bsd-3-clause | pprCts :: Cts -> SDoc
pprCts cts = vcat (map ppr (bagToList cts)) | 65 | pprCts :: Cts -> SDoc
pprCts cts = vcat (map ppr (bagToList cts)) | 65 | pprCts cts = vcat (map ppr (bagToList cts)) | 43 | false | true | 0 | 9 | 12 | 35 | 17 | 18 | null | null |
uuhan/Idris-dev | src/IRTS/Defunctionalise.hs | bsd-3-clause | genArgs i = sMN i "P_c" : genArgs (i + 1) | 41 | genArgs i = sMN i "P_c" : genArgs (i + 1) | 41 | genArgs i = sMN i "P_c" : genArgs (i + 1) | 41 | false | false | 1 | 8 | 10 | 32 | 13 | 19 | null | null |
facebookincubator/duckling | Duckling/Quantity/NL/Rules.hs | bsd-3-clause | rulePrecision :: Rule
rulePrecision = Rule
{ name = "ongeveer|plm|plusminus <quantity>"
, pattern =
[ regex "\\~|precies|exact|ongeveer|bijna|ongeveer"
, dimension Quantity
]
, prod = \case
(_:token:_) -> Just token
_ -> Nothing
} | 280 | rulePrecision :: Rule
rulePrecision = Rule
{ name = "ongeveer|plm|plusminus <quantity>"
, pattern =
[ regex "\\~|precies|exact|ongeveer|bijna|ongeveer"
, dimension Quantity
]
, prod = \case
(_:token:_) -> Just token
_ -> Nothing
} | 280 | rulePrecision = Rule
{ name = "ongeveer|plm|plusminus <quantity>"
, pattern =
[ regex "\\~|precies|exact|ongeveer|bijna|ongeveer"
, dimension Quantity
]
, prod = \case
(_:token:_) -> Just token
_ -> Nothing
} | 258 | false | true | 0 | 13 | 82 | 81 | 41 | 40 | null | null |
d0kt0r0/Tidal | vis/Sound/Tidal/Cycle.hs | gpl-3.0 | blankWidth = 0.015 | 18 | blankWidth = 0.015 | 18 | blankWidth = 0.015 | 18 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
xpika/mohws | src/Network/MoHWS/Configuration/Parser.hs | bsd-3-clause | p_serverName :: T st ext
p_serverName = set ConfigA.serverName $ stringLiteral | 78 | p_serverName :: T st ext
p_serverName = set ConfigA.serverName $ stringLiteral | 78 | p_serverName = set ConfigA.serverName $ stringLiteral | 53 | false | true | 0 | 6 | 10 | 31 | 13 | 18 | null | null |
CIFASIS/megadeth | Megadeth/Prim.hs | bsd-3-clause | headOf (ConT n) = n | 19 | headOf (ConT n) = n | 19 | headOf (ConT n) = n | 19 | false | false | 0 | 7 | 4 | 15 | 7 | 8 | null | null |
brendanhay/gogol | gogol-logging/gen/Network/Google/Resource/Logging/Locations/Buckets/List.hs | mpl-2.0 | -- | JSONP
lblCallback :: Lens' LocationsBucketsList (Maybe Text)
lblCallback
= lens _lblCallback (\ s a -> s{_lblCallback = a}) | 130 | lblCallback :: Lens' LocationsBucketsList (Maybe Text)
lblCallback
= lens _lblCallback (\ s a -> s{_lblCallback = a}) | 119 | lblCallback
= lens _lblCallback (\ s a -> s{_lblCallback = a}) | 64 | true | true | 0 | 9 | 21 | 48 | 25 | 23 | null | null |
aslatter/xhb | build-utils/src/Generate.hs | bsd-3-clause | fieldType :: HStructElem -> Maybe HsType
fieldType Pad{} = empty | 64 | fieldType :: HStructElem -> Maybe HsType
fieldType Pad{} = empty | 64 | fieldType Pad{} = empty | 23 | false | true | 2 | 5 | 9 | 26 | 13 | 13 | null | null |
haroldcarr/juno | src/Juno/Monitoring/EkgSnap.hs | bsd-3-clause | monitor :: Store -> Snap ()
monitor store = do
-- Juno Change!
Snap.modifyResponse $ Snap.addHeader "Access-Control-Allow-Origin" "*"
jsonHandler $ serve store
where
jsonHandler = wrapHandler "application/json"
wrapHandler fmt handler = method GET $ format fmt handler
-- | The Accept header of th... | 344 | monitor :: Store -> Snap ()
monitor store = do
-- Juno Change!
Snap.modifyResponse $ Snap.addHeader "Access-Control-Allow-Origin" "*"
jsonHandler $ serve store
where
jsonHandler = wrapHandler "application/json"
wrapHandler fmt handler = method GET $ format fmt handler
-- | The Accept header of th... | 344 | monitor store = do
-- Juno Change!
Snap.modifyResponse $ Snap.addHeader "Access-Control-Allow-Origin" "*"
jsonHandler $ serve store
where
jsonHandler = wrapHandler "application/json"
wrapHandler fmt handler = method GET $ format fmt handler
-- | The Accept header of the request.
-- HC: CHANGE | 316 | false | true | 1 | 9 | 70 | 84 | 40 | 44 | null | null |
jaanos/TPJ-2015-16 | lmh/LMH_TypeInference.hs | mit | ---------------------------------------------------------------------------
-- Unification
mgu :: Type -> Type -> TypeSubst
mgu t1 t2 = mguFind [] t1 t2 | 155 | mgu :: Type -> Type -> TypeSubst
mgu t1 t2 = mguFind [] t1 t2 | 61 | mgu t1 t2 = mguFind [] t1 t2 | 28 | true | true | 0 | 6 | 20 | 35 | 18 | 17 | null | null |
myShoggoth/shakespeare | Text/Hamlet/Parse.hs | mit | nestToDoc set (Nest (LineTag tn attrs content classes _ _) inside:rest) D3Enter ident = do
let attrs' = fixupAttrs attrs classes
let attrs'' = nonD3AttrsToDoc attrs' (baseIdent ident) D3Enter
inside' <- nestToDoc set inside D3Enter (newIdent ident True (isD3DataNode attrs') False [])
rest' <- nestToDoc ... | 1,760 | nestToDoc set (Nest (LineTag tn attrs content classes _ _) inside:rest) D3Enter ident = do
let attrs' = fixupAttrs attrs classes
let attrs'' = nonD3AttrsToDoc attrs' (baseIdent ident) D3Enter
inside' <- nestToDoc set inside D3Enter (newIdent ident True (isD3DataNode attrs') False [])
rest' <- nestToDoc ... | 1,760 | nestToDoc set (Nest (LineTag tn attrs content classes _ _) inside:rest) D3Enter ident = do
let attrs' = fixupAttrs attrs classes
let attrs'' = nonD3AttrsToDoc attrs' (baseIdent ident) D3Enter
inside' <- nestToDoc set inside D3Enter (newIdent ident True (isD3DataNode attrs') False [])
rest' <- nestToDoc ... | 1,760 | false | false | 0 | 28 | 508 | 567 | 279 | 288 | null | null |
UweSchmidt/ppl2 | src/PPL2/System/Types.hs | mit | tee :: Monad m => (a -> m ()) -> a -> m a
tee out x = out x >> return x | 71 | tee :: Monad m => (a -> m ()) -> a -> m a
tee out x = out x >> return x | 71 | tee out x = out x >> return x | 29 | false | true | 0 | 10 | 22 | 56 | 26 | 30 | null | null |
ingemaradahl/bilder | src/Compiler/Utils.hs | lgpl-3.0 | mapExpM _ e@(EVar {}) = pure e | 30 | mapExpM _ e@(EVar {}) = pure e | 30 | mapExpM _ e@(EVar {}) = pure e | 30 | false | false | 0 | 8 | 6 | 24 | 12 | 12 | null | null |
beni55/hspec | hspec-core/src/Test/Hspec/Core/Formatters/Internal.hs | mit | runFormatM :: Bool -> Bool -> Bool -> Integer -> Handle -> FormatM a -> IO a
runFormatM useColor produceHTML_ printCpuTime seed handle (FormatM action) = do
time <- getPOSIXTime
cpuTime <- if printCpuTime then Just <$> CPUTime.getCPUTime else pure Nothing
st <- newIORef (FormatterState handle useColor produceHTML... | 423 | runFormatM :: Bool -> Bool -> Bool -> Integer -> Handle -> FormatM a -> IO a
runFormatM useColor produceHTML_ printCpuTime seed handle (FormatM action) = do
time <- getPOSIXTime
cpuTime <- if printCpuTime then Just <$> CPUTime.getCPUTime else pure Nothing
st <- newIORef (FormatterState handle useColor produceHTML... | 423 | runFormatM useColor produceHTML_ printCpuTime seed handle (FormatM action) = do
time <- getPOSIXTime
cpuTime <- if printCpuTime then Just <$> CPUTime.getCPUTime else pure Nothing
st <- newIORef (FormatterState handle useColor produceHTML_ 0 0 0 [] seed cpuTime time)
evalStateT action st
-- | Increase the count... | 346 | false | true | 0 | 11 | 74 | 136 | 65 | 71 | null | null |
bramgg/99haskell | Script.hs | mit | makeObject :: Fay Object
makeObject = ffi "{}" | 46 | makeObject :: Fay Object
makeObject = ffi "{}" | 46 | makeObject = ffi "{}" | 21 | false | true | 0 | 5 | 7 | 17 | 8 | 9 | null | null |
Rydgel/advent-of-code | src/Day5.hs | bsd-3-clause | isNice2 :: String -> Bool
isNice2 s = g s && f s
where f s' = let (a, b) = everyOther s'
in any (\x -> or . zipWith (==) x $ tail x) [a, b]
g s' = or [ any ([a, b] `isInfixOf`) [c, d]
| (i, a, b) <- zip3 [0..] s' $ tail s'
, let (c, d) = _2 %~ drop 2 $ splitA... | 327 | isNice2 :: String -> Bool
isNice2 s = g s && f s
where f s' = let (a, b) = everyOther s'
in any (\x -> or . zipWith (==) x $ tail x) [a, b]
g s' = or [ any ([a, b] `isInfixOf`) [c, d]
| (i, a, b) <- zip3 [0..] s' $ tail s'
, let (c, d) = _2 %~ drop 2 $ splitA... | 327 | isNice2 s = g s && f s
where f s' = let (a, b) = everyOther s'
in any (\x -> or . zipWith (==) x $ tail x) [a, b]
g s' = or [ any ([a, b] `isInfixOf`) [c, d]
| (i, a, b) <- zip3 [0..] s' $ tail s'
, let (c, d) = _2 %~ drop 2 $ splitAt i s'] | 301 | false | true | 4 | 13 | 132 | 212 | 104 | 108 | null | null |
AndreasPK/stack | src/Stack/Types/PackageIdentifier.hs | bsd-3-clause | -- | A parser for a package-version pair.
packageIdentifierParser :: Parser PackageIdentifier
packageIdentifierParser =
do name <- packageNameParser
char '-'
version <- versionParser
return (PackageIdentifier name version)
-- | Convenient way to parse a package identifier from a 'Text'. | 305 | packageIdentifierParser :: Parser PackageIdentifier
packageIdentifierParser =
do name <- packageNameParser
char '-'
version <- versionParser
return (PackageIdentifier name version)
-- | Convenient way to parse a package identifier from a 'Text'. | 263 | packageIdentifierParser =
do name <- packageNameParser
char '-'
version <- versionParser
return (PackageIdentifier name version)
-- | Convenient way to parse a package identifier from a 'Text'. | 211 | true | true | 0 | 9 | 56 | 50 | 23 | 27 | null | null |
forsyde/forsyde-atom | src/ForSyDe/Atom/Utility/Plot.hs | bsd-3-clause | replChar :: String -- all characters in this set are replaced by '_'
-> Char -- Char to replace with
-> String -- the string where characters are replaced
-> String -- the result string with all characters replaced
replChar [] _ s = s | 264 | replChar :: String -- all characters in this set are replaced by '_'
-> Char -- Char to replace with
-> String -- the string where characters are replaced
-> String
replChar [] _ s = s | 214 | replChar [] _ s = s | 20 | true | true | 0 | 7 | 74 | 36 | 20 | 16 | null | null |
ocramz/monad-bayes | src/Control/Monad/Bayes/Weighted.hs | mit | -- | Inverse of `weight`.
unWeight :: Weight r -> LogDomain r
unWeight (Weight (Product p)) = p | 95 | unWeight :: Weight r -> LogDomain r
unWeight (Weight (Product p)) = p | 69 | unWeight (Weight (Product p)) = p | 33 | true | true | 0 | 9 | 17 | 37 | 18 | 19 | null | null |
hiteshsuthar/Haxl | tests/TestExampleDataSource.hs | bsd-3-clause | testEnv = do
-- To use a data source, we need to initialize its state:
exstate <- ExampleDataSource.initGlobalState
-- And create a StateStore object containing the states we need:
let st = stateSet exstate stateEmpty
-- Create the Env:
initEnv st () | 264 | testEnv = do
-- To use a data source, we need to initialize its state:
exstate <- ExampleDataSource.initGlobalState
-- And create a StateStore object containing the states we need:
let st = stateSet exstate stateEmpty
-- Create the Env:
initEnv st () | 264 | testEnv = do
-- To use a data source, we need to initialize its state:
exstate <- ExampleDataSource.initGlobalState
-- And create a StateStore object containing the states we need:
let st = stateSet exstate stateEmpty
-- Create the Env:
initEnv st () | 264 | false | false | 0 | 10 | 55 | 42 | 20 | 22 | null | null |
shlevy/ghc | compiler/utils/UniqSet.hs | bsd-3-clause | delOneFromUniqSet :: Uniquable a => UniqSet a -> a -> UniqSet a
delOneFromUniqSet (UniqSet s) a = UniqSet (delFromUFM s a) | 122 | delOneFromUniqSet :: Uniquable a => UniqSet a -> a -> UniqSet a
delOneFromUniqSet (UniqSet s) a = UniqSet (delFromUFM s a) | 122 | delOneFromUniqSet (UniqSet s) a = UniqSet (delFromUFM s a) | 58 | false | true | 0 | 11 | 20 | 58 | 26 | 32 | null | null |
alphalambda/codeworld | codeworld-base/src/Extras/Colors.hs | apache-2.0 | byName("aqua") = colorNamed'("#00ffff") | 39 | byName("aqua") = colorNamed'("#00ffff") | 39 | byName("aqua") = colorNamed'("#00ffff") | 39 | false | false | 0 | 6 | 2 | 18 | 9 | 9 | null | null |
samvher/translatethenews | app/TTN/Model/Language.hs | mit | langCode Russian = "ru" | 26 | langCode Russian = "ru" | 26 | langCode Russian = "ru" | 26 | false | false | 0 | 5 | 6 | 9 | 4 | 5 | null | null |
ambiata/mafia | src/Mafia/Twine/Parallel.hs | bsd-3-clause | addWorker :: (Workers a) -> Async a -> IO ()
addWorker (Workers w) r =
modifyMVar_ w $ pure . (:) r | 101 | addWorker :: (Workers a) -> Async a -> IO ()
addWorker (Workers w) r =
modifyMVar_ w $ pure . (:) r | 101 | addWorker (Workers w) r =
modifyMVar_ w $ pure . (:) r | 56 | false | true | 0 | 8 | 23 | 60 | 29 | 31 | null | null |
jsavatgy/hatupist | hatupist-103.hs | gpl-2.0 | refreshSettingsTable model newS = do
mapM
( \(i,newRow) -> listStoreSetValue model i newRow )
( zip [0..] (settingsTable newS) ) | 138 | refreshSettingsTable model newS = do
mapM
( \(i,newRow) -> listStoreSetValue model i newRow )
( zip [0..] (settingsTable newS) ) | 138 | refreshSettingsTable model newS = do
mapM
( \(i,newRow) -> listStoreSetValue model i newRow )
( zip [0..] (settingsTable newS) ) | 138 | false | false | 0 | 11 | 29 | 57 | 29 | 28 | null | null |
alexvong1995/pandoc | src/Text/Pandoc/Readers/MediaWiki.hs | gpl-2.0 | imageIdentifiers :: [MWParser ()]
imageIdentifiers = [sym (identifier ++ ":") | identifier <- identifiers]
where identifiers = ["File", "Image", "Archivo", "Datei", "Fichier",
"Bild"] | 212 | imageIdentifiers :: [MWParser ()]
imageIdentifiers = [sym (identifier ++ ":") | identifier <- identifiers]
where identifiers = ["File", "Image", "Archivo", "Datei", "Fichier",
"Bild"] | 212 | imageIdentifiers = [sym (identifier ++ ":") | identifier <- identifiers]
where identifiers = ["File", "Image", "Archivo", "Datei", "Fichier",
"Bild"] | 178 | false | true | 0 | 8 | 51 | 66 | 37 | 29 | null | null |
ykst/MetaC | Language/Meta/C/Parser.hs | mit | floatingSuffixP :: TheParser FloatingSuffix
floatingSuffixP =
FloatSuffix <$ oneOf "fF"
<|> LongDoubleSuffix <$ oneOf "lL" | 130 | floatingSuffixP :: TheParser FloatingSuffix
floatingSuffixP =
FloatSuffix <$ oneOf "fF"
<|> LongDoubleSuffix <$ oneOf "lL" | 130 | floatingSuffixP =
FloatSuffix <$ oneOf "fF"
<|> LongDoubleSuffix <$ oneOf "lL" | 86 | false | true | 0 | 8 | 22 | 32 | 15 | 17 | null | null |
equational/JL2012 | HaskellExamples/src/MEquUtl.hs | mit | incVKeySet::VKey->VKeySet->VKeySet
incVKeySet (VKey vt) c = IntMap.adjust (\ x->x+1) vt c | 89 | incVKeySet::VKey->VKeySet->VKeySet
incVKeySet (VKey vt) c = IntMap.adjust (\ x->x+1) vt c | 89 | incVKeySet (VKey vt) c = IntMap.adjust (\ x->x+1) vt c | 54 | false | true | 0 | 8 | 10 | 51 | 26 | 25 | null | null |
brendanhay/gogol | gogol-dataflow/gen/Network/Google/Dataflow/Types/Product.hs | mpl-2.0 | -- | The index (origin zero) of the parallel instruction that produces the
-- output to be consumed by this input. This index is relative to the list
-- of instructions in this input\'s instruction\'s containing MapTask.
iiProducerInstructionIndex :: Lens' InstructionInput (Maybe Int32)
iiProducerInstructionIndex
= l... | 427 | iiProducerInstructionIndex :: Lens' InstructionInput (Maybe Int32)
iiProducerInstructionIndex
= lens _iiProducerInstructionIndex
(\ s a -> s{_iiProducerInstructionIndex = a})
. mapping _Coerce | 206 | iiProducerInstructionIndex
= lens _iiProducerInstructionIndex
(\ s a -> s{_iiProducerInstructionIndex = a})
. mapping _Coerce | 139 | true | true | 0 | 10 | 70 | 57 | 30 | 27 | null | null |
twittner/tinylog | src/System/Logger.hs | mpl-2.0 | warn g = log g Warn | 20 | warn g = log g Warn | 20 | warn g = log g Warn | 20 | false | false | 0 | 5 | 6 | 14 | 6 | 8 | null | null |
ezyang/ghc | testsuite/tests/ghci/scripts/T11456.hs | bsd-3-clause | a = show @Int | 13 | a = show @Int | 13 | a = show @Int | 13 | false | false | 1 | 6 | 3 | 14 | 5 | 9 | null | null |
rueshyna/gogol | gogol-logging/gen/Network/Google/Resource/Logging/BillingAccounts/Sinks/Delete.hs | mpl-2.0 | -- | Pretty-print response.
basdPp :: Lens' BillingAccountsSinksDelete Bool
basdPp = lens _basdPp (\ s a -> s{_basdPp = a}) | 123 | basdPp :: Lens' BillingAccountsSinksDelete Bool
basdPp = lens _basdPp (\ s a -> s{_basdPp = a}) | 95 | basdPp = lens _basdPp (\ s a -> s{_basdPp = a}) | 47 | true | true | 1 | 9 | 19 | 43 | 22 | 21 | null | null |
vTurbine/ghc | compiler/coreSyn/CoreSyn.hs | bsd-3-clause | -- | Returns @True@ for value arguments, false for type args
-- NB: coercions are value arguments (zero width, to be sure,
-- like State#, but still value args).
isValArg :: Expr b -> Bool
isValArg e = not (isTypeArg e) | 219 | isValArg :: Expr b -> Bool
isValArg e = not (isTypeArg e) | 57 | isValArg e = not (isTypeArg e) | 30 | true | true | 0 | 7 | 40 | 33 | 17 | 16 | null | null |
ekr/tamarin-prover | lib/theory/src/Theory.hs | gpl-3.0 | openRuleCache :: ClosedRuleCache -> OpenRuleCache
openRuleCache = intruderRules . L.get crcRules | 96 | openRuleCache :: ClosedRuleCache -> OpenRuleCache
openRuleCache = intruderRules . L.get crcRules | 96 | openRuleCache = intruderRules . L.get crcRules | 46 | false | true | 0 | 7 | 10 | 30 | 13 | 17 | null | null |
justanotherdot/advent-linguist | 2016/Haskell/AdventOfCode/src/Day08.hs | mit | rotRow :: Integer -> Integer -> State LCDScreen ()
rotRow rowNo qty = modify (\lcd -> V.update lcd $ rotRowIxs lcd rowNo qty)
where
rotRowIxs :: LCDScreen -> Integer -> Integer -> Vector (Int, Bool)
rotRowIxs vec row amt
| row >= 6 || row < 0 = V.empty
| otherwise = V.zip ixs vec'
where
... | 563 | rotRow :: Integer -> Integer -> State LCDScreen ()
rotRow rowNo qty = modify (\lcd -> V.update lcd $ rotRowIxs lcd rowNo qty)
where
rotRowIxs :: LCDScreen -> Integer -> Integer -> Vector (Int, Bool)
rotRowIxs vec row amt
| row >= 6 || row < 0 = V.empty
| otherwise = V.zip ixs vec'
where
... | 563 | rotRow rowNo qty = modify (\lcd -> V.update lcd $ rotRowIxs lcd rowNo qty)
where
rotRowIxs :: LCDScreen -> Integer -> Integer -> Vector (Int, Bool)
rotRowIxs vec row amt
| row >= 6 || row < 0 = V.empty
| otherwise = V.zip ixs vec'
where
row' = fromIntegral row :: Int
am... | 512 | false | true | 6 | 10 | 171 | 273 | 125 | 148 | null | null |
urbanslug/ghc | compiler/typecheck/TcGenDeriv.hs | bsd-3-clause | gcast1_RDR = varQual_RDR tYPEABLE (fsLit "gcast1") | 55 | gcast1_RDR = varQual_RDR tYPEABLE (fsLit "gcast1") | 55 | gcast1_RDR = varQual_RDR tYPEABLE (fsLit "gcast1") | 55 | false | false | 0 | 7 | 10 | 17 | 8 | 9 | null | null |
brendanhay/gogol | gogol-adexchangebuyer2/gen/Network/Google/Resource/AdExchangeBuyer2/Bidders/Accounts/FilterSets/Create.hs | mpl-2.0 | -- | Whether the filter set is transient, or should be persisted
-- indefinitely. By default, filter sets are not transient. If transient,
-- it will be available for at least 1 hour after creation.
bafscIsTransient :: Lens' BiddersAccountsFilterSetsCreate (Maybe Bool)
bafscIsTransient
= lens _bafscIsTransient
... | 355 | bafscIsTransient :: Lens' BiddersAccountsFilterSetsCreate (Maybe Bool)
bafscIsTransient
= lens _bafscIsTransient
(\ s a -> s{_bafscIsTransient = a}) | 156 | bafscIsTransient
= lens _bafscIsTransient
(\ s a -> s{_bafscIsTransient = a}) | 85 | true | true | 1 | 9 | 59 | 54 | 27 | 27 | null | null |
tom-lpsd/tokyocabinet-haskell | examples/MyApp1/TokyoCabinet.hs | bsd-3-clause | new :: (TCDB tc) => IO tc
new = TC.runTCM TC.new | 48 | new :: (TCDB tc) => IO tc
new = TC.runTCM TC.new | 48 | new = TC.runTCM TC.new | 22 | false | true | 0 | 6 | 10 | 30 | 15 | 15 | null | null |
exercism/xhaskell | exercises/practice/zipper/.meta/examples/success-standard/src/Zipper.hs | mit | right (Z v l (Just (BT rv rl rr)) zt) = Just $ Z rv rl rr (R v l zt) | 68 | right (Z v l (Just (BT rv rl rr)) zt) = Just $ Z rv rl rr (R v l zt) | 68 | right (Z v l (Just (BT rv rl rr)) zt) = Just $ Z rv rl rr (R v l zt) | 68 | false | false | 0 | 10 | 20 | 61 | 29 | 32 | null | null |
kawu/data-named | src/Data/Named/Tree.hs | bsd-2-clause | -- | Map the first function over internal node value
-- and the second one over leaf value.
onEither :: (a -> c) -> (b -> d) -> Either a b -> Either c d
onEither f _ (Left x) = Left (f x) | 188 | onEither :: (a -> c) -> (b -> d) -> Either a b -> Either c d
onEither f _ (Left x) = Left (f x) | 96 | onEither f _ (Left x) = Left (f x) | 35 | true | true | 0 | 8 | 44 | 71 | 36 | 35 | null | null |
mzini/hosa | src/HoSA/Data/SizeType.hs | mit | fvarsIx :: SizeType knd Ix.Term -> [Ix.VarId]
fvarsIx = foldr (\ ix vs -> Ix.fvars ix `List.union` vs) [] | 105 | fvarsIx :: SizeType knd Ix.Term -> [Ix.VarId]
fvarsIx = foldr (\ ix vs -> Ix.fvars ix `List.union` vs) [] | 105 | fvarsIx = foldr (\ ix vs -> Ix.fvars ix `List.union` vs) [] | 59 | false | true | 0 | 10 | 18 | 64 | 31 | 33 | null | null |
hermish/courseography | app/Css/Constants.hs | gpl-3.0 | -- |Defines the color of a very soft yellow.
pastelYellow :: Color
pastelYellow = parse "#EEDD99" | 98 | pastelYellow :: Color
pastelYellow = parse "#EEDD99" | 53 | pastelYellow = parse "#EEDD99" | 30 | true | true | 0 | 6 | 16 | 21 | 9 | 12 | null | null |
ghcjs/jsaddle-dom | src/JSDOM/Generated/SourceBufferList.hs | mit | -- | <https://developer.mozilla.org/en-US/docs/Web/API/SourceBufferList.onaddsourcebuffer Mozilla SourceBufferList.onaddsourcebuffer documentation>
addsourcebuffer :: EventName SourceBufferList onaddsourcebuffer
addsourcebuffer = unsafeEventName (toJSString "addsourcebuffer") | 277 | addsourcebuffer :: EventName SourceBufferList onaddsourcebuffer
addsourcebuffer = unsafeEventName (toJSString "addsourcebuffer") | 128 | addsourcebuffer = unsafeEventName (toJSString "addsourcebuffer") | 64 | true | true | 0 | 7 | 16 | 26 | 13 | 13 | null | null |
alsonkemp/turbinado-website | Turbinado/Environment/CodeStore.hs | bsd-3-clause | getDate (CodeLoadComponentView _ d) = d | 45 | getDate (CodeLoadComponentView _ d) = d | 45 | getDate (CodeLoadComponentView _ d) = d | 45 | false | false | 0 | 7 | 11 | 17 | 8 | 9 | null | null |
bgw/hs-rpal | src/Parser/Ast.hs | gpl-3.0 | -- Extras for the standardized tree
showName (AstOp a) = "<OP:" ++ (showName $ a AstNil AstNil) ++ ">" | 102 | showName (AstOp a) = "<OP:" ++ (showName $ a AstNil AstNil) ++ ">" | 66 | showName (AstOp a) = "<OP:" ++ (showName $ a AstNil AstNil) ++ ">" | 66 | true | false | 0 | 9 | 18 | 36 | 18 | 18 | null | null |
olsner/ghc | testsuite/tests/perf/compiler/T10370.hs | bsd-3-clause | a408 :: IO (); a408 = forever $ putStrLn "a408" | 47 | a408 :: IO ()
a408 = forever $ putStrLn "a408" | 46 | a408 = forever $ putStrLn "a408" | 32 | false | true | 0 | 6 | 9 | 24 | 12 | 12 | null | null |
Axure/Earley | bench/BenchAll.hs | bsd-3-clause | treeInput :: Int -> (String, [Token])
treeInput size = (show size, tokenExpr 0 $ treeSum size) | 94 | treeInput :: Int -> (String, [Token])
treeInput size = (show size, tokenExpr 0 $ treeSum size) | 94 | treeInput size = (show size, tokenExpr 0 $ treeSum size) | 56 | false | true | 0 | 7 | 15 | 46 | 24 | 22 | null | null |
shlevy/ghc | compiler/hsSyn/HsUtils.hs | bsd-3-clause | -- Pre-typechecking
nlWildPatId :: LPat GhcTc
nlWildPatId = noLoc (WildPat placeHolderTypeTc ) | 96 | nlWildPatId :: LPat GhcTc
nlWildPatId = noLoc (WildPat placeHolderTypeTc ) | 75 | nlWildPatId = noLoc (WildPat placeHolderTypeTc ) | 49 | true | true | 0 | 7 | 13 | 24 | 12 | 12 | null | null |
nomeata/ghc | compiler/main/DynFlags.hs | bsd-3-clause | picPOpts :: DynFlags -> [String]
picPOpts dflags
| dopt Opt_PIC dflags = ["-U __PIC__", "-D__PIC__"]
| otherwise = [] | 129 | picPOpts :: DynFlags -> [String]
picPOpts dflags
| dopt Opt_PIC dflags = ["-U __PIC__", "-D__PIC__"]
| otherwise = [] | 129 | picPOpts dflags
| dopt Opt_PIC dflags = ["-U __PIC__", "-D__PIC__"]
| otherwise = [] | 96 | false | true | 1 | 8 | 30 | 53 | 25 | 28 | null | null |
jacekszymanski/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs | lgpl-2.1 | wxBITMAP_TYPE_CUR :: Int
wxBITMAP_TYPE_CUR = 5 | 46 | wxBITMAP_TYPE_CUR :: Int
wxBITMAP_TYPE_CUR = 5 | 46 | wxBITMAP_TYPE_CUR = 5 | 21 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
dragosboca/xmobar | src/Plugins/EWMH.hs | bsd-3-clause | fmt e (l :+ r) = fmt e l ++ fmt e r | 35 | fmt e (l :+ r) = fmt e l ++ fmt e r | 35 | fmt e (l :+ r) = fmt e l ++ fmt e r | 35 | false | false | 0 | 7 | 12 | 32 | 15 | 17 | null | null |
ivan-m/structured-haskell-mode | src/Main.hs | bsd-3-clause | pre :: (Typeable a) => a -> Integer -> [String]
pre x i =
case cast x of
-- <foo { <foo = 1> }> becomes <foo <{ <foo = 1> }>>
Just (RecUpdate SrcSpanInfo{srcInfoPoints=(start:_),srcInfoSpan=end} _ _)
| i == 1 ->
[spanHSE (show "RecUpdates")
"RecUpdates"
(SrcSpan... | 1,318 | pre :: (Typeable a) => a -> Integer -> [String]
pre x i =
case cast x of
-- <foo { <foo = 1> }> becomes <foo <{ <foo = 1> }>>
Just (RecUpdate SrcSpanInfo{srcInfoPoints=(start:_),srcInfoSpan=end} _ _)
| i == 1 ->
[spanHSE (show "RecUpdates")
"RecUpdates"
(SrcSpan... | 1,318 | pre x i =
case cast x of
-- <foo { <foo = 1> }> becomes <foo <{ <foo = 1> }>>
Just (RecUpdate SrcSpanInfo{srcInfoPoints=(start:_),srcInfoSpan=end} _ _)
| i == 1 ->
[spanHSE (show "RecUpdates")
"RecUpdates"
(SrcSpan (srcSpanFilename start)
... | 1,270 | false | true | 0 | 20 | 541 | 379 | 189 | 190 | null | null |
faylang/fay-server | modules/project/Demo/Serialize.hs | bsd-3-clause | printBool :: Bool -> Fay ()
printBool = ffi "console.log(%1)" | 61 | printBool :: Bool -> Fay ()
printBool = ffi "console.log(%1)" | 61 | printBool = ffi "console.log(%1)" | 33 | false | true | 0 | 7 | 9 | 23 | 11 | 12 | null | null |
arnizamani/OccamStar | ArithmeticAgentOld.hs | gpl-2.0 | 3 + 5 = 8 | 9 | 3 + 5 = 8 | 9 | 3 + 5 = 8 | 9 | false | false | 2 | 5 | 4 | 13 | 5 | 8 | null | null |
tonicebrian/tetris-haskell | src/Main.hs | gpl-3.0 | tickUI :: MVar AbstractUI -> DrawingArea -> IO()
tickUI ui canvas = do
threadDelay 1000000
aui <- takeMVar ui
putMVar ui (tick aui)
postGUIAsync $ widgetQueueDraw canvas
tickUI ui canvas
-- Handlers
-- Redraw handler | 238 | tickUI :: MVar AbstractUI -> DrawingArea -> IO()
tickUI ui canvas = do
threadDelay 1000000
aui <- takeMVar ui
putMVar ui (tick aui)
postGUIAsync $ widgetQueueDraw canvas
tickUI ui canvas
-- Handlers
-- Redraw handler | 238 | tickUI ui canvas = do
threadDelay 1000000
aui <- takeMVar ui
putMVar ui (tick aui)
postGUIAsync $ widgetQueueDraw canvas
tickUI ui canvas
-- Handlers
-- Redraw handler | 189 | false | true | 0 | 10 | 56 | 87 | 37 | 50 | null | null |
Icelandjack/lens | src/Control/Lens/Traversal.hs | bsd-3-clause | -- | 'forMOf' is a flipped version of 'mapMOf', consistent with the definition of 'forM'.
--
-- >>> forMOf both (1,3) $ \x -> [x, x + 1]
-- [(1,3),(1,4),(2,3),(2,4)]
--
-- @
-- 'forM' ≡ 'forMOf' 'traverse'
-- 'forMOf' l ≡ 'flip' ('mapMOf' l)
-- 'iforMOf' l s ≡ 'forM' l s '.' 'Indexed'
-- @
--
-- @
-- 'forMOf' :: 'Monad... | 662 | forMOf :: Profunctor p => Over p (WrappedMonad m) s t a b -> s -> p a (m b) -> m t
forMOf l a cmd = unwrapMonad (l (WrapMonad #. cmd) a) | 136 | forMOf l a cmd = unwrapMonad (l (WrapMonad #. cmd) a) | 53 | true | true | 0 | 11 | 169 | 104 | 58 | 46 | null | null |
Peaker/TraceUtils | src/Debug/TraceUtils.hs | bsd-3-clause | traceAroundVia :: (Show ishow, Show oshow) => (i -> ishow) -> (o -> oshow) -> String -> (i -> o) -> i -> o
traceAroundVia ishow oshow funcName func =
traceIdVia oshow ("output from " ++ funcName) . func .
traceIdVia ishow ("input to " ++ funcName) | 251 | traceAroundVia :: (Show ishow, Show oshow) => (i -> ishow) -> (o -> oshow) -> String -> (i -> o) -> i -> o
traceAroundVia ishow oshow funcName func =
traceIdVia oshow ("output from " ++ funcName) . func .
traceIdVia ishow ("input to " ++ funcName) | 251 | traceAroundVia ishow oshow funcName func =
traceIdVia oshow ("output from " ++ funcName) . func .
traceIdVia ishow ("input to " ++ funcName) | 144 | false | true | 0 | 11 | 50 | 108 | 56 | 52 | null | null |
michaelficarra/purescript | src/Language/PureScript/Parser/Lexer.hs | mit | prettyPrintToken (StringLiteral s) = show s | 43 | prettyPrintToken (StringLiteral s) = show s | 43 | prettyPrintToken (StringLiteral s) = show s | 43 | false | false | 0 | 7 | 5 | 18 | 8 | 10 | null | null |
brendanhay/gogol | gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Campaigns/List.hs | mpl-2.0 | -- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
clUploadType :: Lens' CampaignsList (Maybe Text)
clUploadType
= lens _clUploadType (\ s a -> s{_clUploadType = a}) | 187 | clUploadType :: Lens' CampaignsList (Maybe Text)
clUploadType
= lens _clUploadType (\ s a -> s{_clUploadType = a}) | 116 | clUploadType
= lens _clUploadType (\ s a -> s{_clUploadType = a}) | 67 | true | true | 0 | 9 | 28 | 48 | 25 | 23 | null | null |
8c6794b6/spectrofy | Spectrofy/CLI.hs | bsd-3-clause | -- --------------------------------------------------------------------------
-- Guts
parseOpts :: [String] -> ((Options, [String], [String]), Mode)
parseOpts args = case args of
"sin":rest -> (f sinOpts rest, Sin)
"fft":rest -> (f fftOpts rest, FFT)
_ -> ((defaultOptions, [], []), Sin)
where
f o ... | 412 | parseOpts :: [String] -> ((Options, [String], [String]), Mode)
parseOpts args = case args of
"sin":rest -> (f sinOpts rest, Sin)
"fft":rest -> (f fftOpts rest, FFT)
_ -> ((defaultOptions, [], []), Sin)
where
f o as = case getOpt Permute o as of
(os, ns, es) -> (foldr ($) defaultOptions os, ns... | 325 | parseOpts args = case args of
"sin":rest -> (f sinOpts rest, Sin)
"fft":rest -> (f fftOpts rest, FFT)
_ -> ((defaultOptions, [], []), Sin)
where
f o as = case getOpt Permute o as of
(os, ns, es) -> (foldr ($) defaultOptions os, ns, es) | 262 | true | true | 1 | 10 | 84 | 182 | 98 | 84 | null | null |
julienschmaltz/madl | test/src/Madl/TestNetwork.hs | mit | testValidNetwork :: Madl.MadlNetwork -> Assertion
testValidNetwork = assertString . fromMaybe "" . Madl.validMaDLNetwork | 120 | testValidNetwork :: Madl.MadlNetwork -> Assertion
testValidNetwork = assertString . fromMaybe "" . Madl.validMaDLNetwork | 120 | testValidNetwork = assertString . fromMaybe "" . Madl.validMaDLNetwork | 70 | false | true | 0 | 7 | 12 | 30 | 15 | 15 | null | null |
BartAdv/clientsession | tests/runtests.hs | bsd-2-clause | propSerialize :: MyKey -> Bool
propSerialize (MyKey key) = Right key == decode (encode key) | 91 | propSerialize :: MyKey -> Bool
propSerialize (MyKey key) = Right key == decode (encode key) | 91 | propSerialize (MyKey key) = Right key == decode (encode key) | 60 | false | true | 0 | 8 | 14 | 40 | 19 | 21 | null | null |
acowley/ghc | compiler/main/HscTypes.hs | bsd-3-clause | -- Pattern synonyms have no implicit Ids; the wrapper and matcher
-- are not "implicit"; they are simply new top-level bindings,
-- and they have their own declaration in an interface file
implicitClassThings :: Class -> [TyThing]
implicitClassThings cl
= -- Does not include default methods, because ... | 687 | implicitClassThings :: Class -> [TyThing]
implicitClassThings cl
= -- Does not include default methods, because those Ids may have
-- their own pragmas, unfoldings etc, not derived from the Class object
-- associated types
-- No extras_plus (recursive call) for the classATs, because they
-- a... | 481 | implicitClassThings cl
= -- Does not include default methods, because those Ids may have
-- their own pragmas, unfoldings etc, not derived from the Class object
-- associated types
-- No extras_plus (recursive call) for the classATs, because they
-- are only the family decls; they have no imp... | 439 | true | true | 0 | 8 | 156 | 58 | 32 | 26 | null | null |
kawamuray/ganeti | src/Ganeti/Rpc.hs | gpl-2.0 | fromJResultToRes :: J.Result a -> (a -> b) -> ERpcError b
fromJResultToRes (J.Error v) _ = Left $ JsonDecodeError v | 115 | fromJResultToRes :: J.Result a -> (a -> b) -> ERpcError b
fromJResultToRes (J.Error v) _ = Left $ JsonDecodeError v | 115 | fromJResultToRes (J.Error v) _ = Left $ JsonDecodeError v | 57 | false | true | 0 | 8 | 19 | 54 | 26 | 28 | null | null |
ocramz/petsc-hs | examples/Test2.hs | gpl-3.0 | -- PetscErrorCode DMGetCoordinates(DM dm, Vec *c)
-- Not Collective
-- Input Parameters :
-- dm : the DM
-- Output Parameter
-- c : global coordinate vector
-- Note :
-- This is a borrowed reference, so the user should NOT destroy this vector
-- Each process has only the local coordinates (does NOT have the ghost coo... | 561 | dmGetCoordinates dm =
withPtr (\c-> [C.exp| int{DMGetCoordinates($(DM dm),$(Vec*c))} |] ) >>= handleErrTup | 107 | dmGetCoordinates dm =
withPtr (\c-> [C.exp| int{DMGetCoordinates($(DM dm),$(Vec*c))} |] ) >>= handleErrTup | 107 | true | false | 0 | 9 | 86 | 40 | 27 | 13 | null | null |
OpenXT/manager | xenmgr/XenMgr/PowerManagement.hs | gpl-2.0 | pmGetSettings :: Rpc PMSettings
pmGetSettings = dbReadWithDefault PMSettings { pmLidCloseACAction = ActionNothing
, pmLidCloseBatteryAction = ActionNothing }
"/power-management" | 256 | pmGetSettings :: Rpc PMSettings
pmGetSettings = dbReadWithDefault PMSettings { pmLidCloseACAction = ActionNothing
, pmLidCloseBatteryAction = ActionNothing }
"/power-management" | 256 | pmGetSettings = dbReadWithDefault PMSettings { pmLidCloseACAction = ActionNothing
, pmLidCloseBatteryAction = ActionNothing }
"/power-management" | 224 | false | true | 0 | 7 | 96 | 33 | 18 | 15 | null | null |
fmapfmapfmap/amazonka | amazonka-elasticache/gen/Network/AWS/ElastiCache/Types/Product.hs | mpl-2.0 | -- | The frequency of the recurring charge.
rcRecurringChargeFrequency :: Lens' RecurringCharge (Maybe Text)
rcRecurringChargeFrequency = lens _rcRecurringChargeFrequency (\ s a -> s{_rcRecurringChargeFrequency = a}) | 216 | rcRecurringChargeFrequency :: Lens' RecurringCharge (Maybe Text)
rcRecurringChargeFrequency = lens _rcRecurringChargeFrequency (\ s a -> s{_rcRecurringChargeFrequency = a}) | 172 | rcRecurringChargeFrequency = lens _rcRecurringChargeFrequency (\ s a -> s{_rcRecurringChargeFrequency = a}) | 107 | true | true | 0 | 9 | 24 | 46 | 25 | 21 | null | null |
ku-fpg/scotty-crud | src/Web/Scotty/CRUD/SQL.hs | bsd-3-clause | liftTable :: ([Row] -> [Row]) -> Table Row -> Table Row
liftTable f = HashMap.fromList
. map (\ (Named key row) -> (key,row))
. map rowToNamedRow
. f
. map namedRowToRow
. map (\ (key,row)-> Named key row)
. HashMap.toList | 294 | liftTable :: ([Row] -> [Row]) -> Table Row -> Table Row
liftTable f = HashMap.fromList
. map (\ (Named key row) -> (key,row))
. map rowToNamedRow
. f
. map namedRowToRow
. map (\ (key,row)-> Named key row)
. HashMap.toList | 294 | liftTable f = HashMap.fromList
. map (\ (Named key row) -> (key,row))
. map rowToNamedRow
. f
. map namedRowToRow
. map (\ (key,row)-> Named key row)
. HashMap.toList | 238 | false | true | 6 | 9 | 111 | 133 | 64 | 69 | null | null |
astro/haskell-torrent | src/Data/ByteString/Builder.hs | bsd-2-clause | varLenAux2 [w] = putWord8 w | 28 | varLenAux2 [w] = putWord8 w | 28 | varLenAux2 [w] = putWord8 w | 28 | false | false | 0 | 6 | 5 | 15 | 7 | 8 | null | null |
mattias-lundell/timber-llvm | src/Scp.hs | bsd-3-clause | peel gf (EReq e1 e2) (EReq e1' e2') = isHomemb gf e1 e1' && isHomemb gf e2 e2' | 78 | peel gf (EReq e1 e2) (EReq e1' e2') = isHomemb gf e1 e1' && isHomemb gf e2 e2' | 78 | peel gf (EReq e1 e2) (EReq e1' e2') = isHomemb gf e1 e1' && isHomemb gf e2 e2' | 78 | false | false | 0 | 7 | 17 | 47 | 22 | 25 | null | null |
kawamuray/ganeti | src/Ganeti/Constants.hs | gpl-2.0 | defaultRbdPool :: String
defaultRbdPool = "rbd" | 47 | defaultRbdPool :: String
defaultRbdPool = "rbd" | 47 | defaultRbdPool = "rbd" | 22 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
dblia/elastic-rolling-restart | src/Elastic/RollingRestart/Client.hs | mit | nodeShutdown :: String -> IO String
nodeShutdown hname = do
let es_url = hname ++ C.esNodeShutdown
(rcode, resp) <- curlPostString es_url [] Nothing
case rcode of
CurlOK -> return resp
_ -> fail $ printf "Curl error for '%s': %s" es_url (show rcode)
-- | Wait for a node to stop responding. | 310 | nodeShutdown :: String -> IO String
nodeShutdown hname = do
let es_url = hname ++ C.esNodeShutdown
(rcode, resp) <- curlPostString es_url [] Nothing
case rcode of
CurlOK -> return resp
_ -> fail $ printf "Curl error for '%s': %s" es_url (show rcode)
-- | Wait for a node to stop responding. | 310 | nodeShutdown hname = do
let es_url = hname ++ C.esNodeShutdown
(rcode, resp) <- curlPostString es_url [] Nothing
case rcode of
CurlOK -> return resp
_ -> fail $ printf "Curl error for '%s': %s" es_url (show rcode)
-- | Wait for a node to stop responding. | 274 | false | true | 0 | 14 | 71 | 103 | 48 | 55 | null | null |
YoshikuniJujo/funpaala | samples/43_alternative/superYoshio.hs | bsd-3-clause | score :: Item -> Integer
score Shell = 50 | 41 | score :: Item -> Integer
score Shell = 50 | 41 | score Shell = 50 | 16 | false | true | 0 | 5 | 8 | 18 | 9 | 9 | null | null |
lambdax-x/payback | src/Payback.hs | mit | updateDebts :: Debts -> Transaction -> Debts
updateDebts debts trans = foldl addDebt debts $ debtors trans
where
addDebt :: Debts -> (User, Amount) -> Debts
addDebt currentDebts (usr, amt)
| source trans == usr = currentDebts
| otherwise =
M.insertWith combine... | 617 | updateDebts :: Debts -> Transaction -> Debts
updateDebts debts trans = foldl addDebt debts $ debtors trans
where
addDebt :: Debts -> (User, Amount) -> Debts
addDebt currentDebts (usr, amt)
| source trans == usr = currentDebts
| otherwise =
M.insertWith combine... | 617 | updateDebts debts trans = foldl addDebt debts $ debtors trans
where
addDebt :: Debts -> (User, Amount) -> Debts
addDebt currentDebts (usr, amt)
| source trans == usr = currentDebts
| otherwise =
M.insertWith combine (usr, source trans) [amt] currentDebts
... | 572 | false | true | 2 | 11 | 202 | 263 | 130 | 133 | null | null |
erikd/hs-tls | core/Network/TLS/Handshake/Client.hs | bsd-3-clause | handshakeClientWith _ _ _ = throwCore $ Error_Protocol ("unexpected handshake message received in handshakeClientWith", True, HandshakeFailure) | 162 | handshakeClientWith _ _ _ = throwCore $ Error_Protocol ("unexpected handshake message received in handshakeClientWith", True, HandshakeFailure) | 162 | handshakeClientWith _ _ _ = throwCore $ Error_Protocol ("unexpected handshake message received in handshakeClientWith", True, HandshakeFailure) | 162 | false | false | 1 | 7 | 34 | 28 | 14 | 14 | null | null |
christinem/courseography | app/DevelopmentConfig.hs | gpl-3.0 | -- | The relative path to the directory containing all of the generated CSS files.
genCssPath :: String
genCssPath = "./public/style/" | 134 | genCssPath :: String
genCssPath = "./public/style/" | 51 | genCssPath = "./public/style/" | 30 | true | true | 0 | 4 | 20 | 12 | 7 | 5 | null | null |
diku-dk/futhark | src/Futhark/IR/Primitive.hs | isc | cmpOpType (CmpUlt t) = IntType t | 32 | cmpOpType (CmpUlt t) = IntType t | 32 | cmpOpType (CmpUlt t) = IntType t | 32 | false | false | 0 | 7 | 5 | 18 | 8 | 10 | null | null |
marcellussiegburg/autotool | yesod/Handler/Aufgabe/Forms.hs | gpl-2.0 | hochladenForm :: ServerUrl -> AufgabeTyp -> Maybe VorlageName -> AufgabeKonfiguration -> AufgabeFormDaten -> Form (ServerUrl, AufgabeTyp, Maybe VorlageName, AufgabeKonfiguration, AufgabeFormDaten, FileInfo)
hochladenForm server typ vorlage konfiguration einstellungen =
identifyForm (getId HochladenForm) $ renderBoots... | 883 | hochladenForm :: ServerUrl -> AufgabeTyp -> Maybe VorlageName -> AufgabeKonfiguration -> AufgabeFormDaten -> Form (ServerUrl, AufgabeTyp, Maybe VorlageName, AufgabeKonfiguration, AufgabeFormDaten, FileInfo)
hochladenForm server typ vorlage konfiguration einstellungen =
identifyForm (getId HochladenForm) $ renderBoots... | 883 | hochladenForm server typ vorlage konfiguration einstellungen =
identifyForm (getId HochladenForm) $ renderBootstrap3 BootstrapBasicForm $ (,,,,,)
<$> areq hiddenField (bfs $ server) {fsName = Just $ getId ServerForm} (Just server)
<*> areq hiddenField (bfs $ typ) {fsName = Just $ getId AufgabeTypForm} (Just typ)
... | 676 | false | true | 17 | 12 | 127 | 338 | 171 | 167 | null | null |
haroldcarr/learn-haskell-coq-ml-etc | haskell/book/2009-Real_World_Haskell/Parse.hs | unlicense | parse :: Parse a -> L.ByteString -> Either String a
parse parser initState
= case runParse parser (ParseState initState 0) of
Left err -> Left err
Right (result, _) -> Right result
-- record syntax, updates and pattern matching 241/281
-- creates a new ParseState identical to initState but... | 348 | parse :: Parse a -> L.ByteString -> Either String a
parse parser initState
= case runParse parser (ParseState initState 0) of
Left err -> Left err
Right (result, _) -> Right result
-- record syntax, updates and pattern matching 241/281
-- creates a new ParseState identical to initState but... | 348 | parse parser initState
= case runParse parser (ParseState initState 0) of
Left err -> Left err
Right (result, _) -> Right result
-- record syntax, updates and pattern matching 241/281
-- creates a new ParseState identical to initState but with new offset field value | 296 | false | true | 0 | 9 | 83 | 87 | 41 | 46 | null | null |
andorp/grin | grin/src/Grin/PrettyLint.hs | bsd-3-clause | keyword :: String -> Doc
keyword = yellow . text | 48 | keyword :: String -> Doc
keyword = yellow . text | 48 | keyword = yellow . text | 23 | false | true | 1 | 7 | 9 | 27 | 11 | 16 | null | null |
simonmichael/hledger | hledger-lib/Hledger/Reports/ReportOptions.hs | gpl-3.0 | conversionOpFromRawOpts :: RawOpts -> Maybe ConversionOp
conversionOpFromRawOpts rawopts
| isJust costFlag && balancecalcopt rawopts == CalcGain = usageError "--gain cannot be combined with --cost"
| otherwise = costFlag
where
costFlag = lastMay $ collectopts conversionopfromrawopt rawopts
conversiono... | 667 | conversionOpFromRawOpts :: RawOpts -> Maybe ConversionOp
conversionOpFromRawOpts rawopts
| isJust costFlag && balancecalcopt rawopts == CalcGain = usageError "--gain cannot be combined with --cost"
| otherwise = costFlag
where
costFlag = lastMay $ collectopts conversionopfromrawopt rawopts
conversiono... | 667 | conversionOpFromRawOpts rawopts
| isJust costFlag && balancecalcopt rawopts == CalcGain = usageError "--gain cannot be combined with --cost"
| otherwise = costFlag
where
costFlag = lastMay $ collectopts conversionopfromrawopt rawopts
conversionopfromrawopt (n,v) -- option name, value
| n == "B"... | 610 | false | true | 1 | 10 | 189 | 149 | 73 | 76 | null | null |
netogallo/polyvariant | src/Analysis/Types/Annotation.hs | bsd-3-clause | algebra :: Monad m => Algebra m Annotation Annotation
algebra = Algebra{
fvar = \_ x -> return $ Var x,
fabs = \_ v s -> return $ Abs v s,
flabel = \_ l -> return $ Label l,
funion = \_ a b -> return $ Union a b,
fapp = \_ a b -> return $ App a b,
fempty = const (return Empty)
} | 293 | algebra :: Monad m => Algebra m Annotation Annotation
algebra = Algebra{
fvar = \_ x -> return $ Var x,
fabs = \_ v s -> return $ Abs v s,
flabel = \_ l -> return $ Label l,
funion = \_ a b -> return $ Union a b,
fapp = \_ a b -> return $ App a b,
fempty = const (return Empty)
} | 293 | algebra = Algebra{
fvar = \_ x -> return $ Var x,
fabs = \_ v s -> return $ Abs v s,
flabel = \_ l -> return $ Label l,
funion = \_ a b -> return $ Union a b,
fapp = \_ a b -> return $ App a b,
fempty = const (return Empty)
} | 239 | false | true | 0 | 10 | 82 | 164 | 84 | 80 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.