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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
rahulmutt/ghcvm | compiler/Eta/HsSyn/HsTypes.hs | bsd-3-clause | -- | Does this 'HsTyVarBndr' come with an explicit kind annotation?
isHsKindedTyVar :: HsTyVarBndr name -> Bool
isHsKindedTyVar (UserTyVar {}) = False | 152 | isHsKindedTyVar :: HsTyVarBndr name -> Bool
isHsKindedTyVar (UserTyVar {}) = False | 84 | isHsKindedTyVar (UserTyVar {}) = False | 40 | true | true | 0 | 7 | 23 | 29 | 15 | 14 | null | null |
ingemaradahl/bilder | src/TypeChecker/Renamer/Utils.hs | lgpl-3.0 | lookupAlias ∷ String → TCM String
lookupAlias s = do
as ← gets aliases
case lookupAlias' as of
Just alias' → return alias'
Nothing → debugError $ "ALIAS " ++ s ++ "NOT FOUND"
where
lookupAlias' ∷ [Aliases] → Maybe String
lookupAlias' [] = Nothing
lookupAlias' (a:as) =
case Map.lookup s a of
... | 378 | lookupAlias ∷ String → TCM String
lookupAlias s = do
as ← gets aliases
case lookupAlias' as of
Just alias' → return alias'
Nothing → debugError $ "ALIAS " ++ s ++ "NOT FOUND"
where
lookupAlias' ∷ [Aliases] → Maybe String
lookupAlias' [] = Nothing
lookupAlias' (a:as) =
case Map.lookup s a of
... | 378 | lookupAlias s = do
as ← gets aliases
case lookupAlias' as of
Just alias' → return alias'
Nothing → debugError $ "ALIAS " ++ s ++ "NOT FOUND"
where
lookupAlias' ∷ [Aliases] → Maybe String
lookupAlias' [] = Nothing
lookupAlias' (a:as) =
case Map.lookup s a of
Just alias' → Just alias'
N... | 344 | false | true | 0 | 12 | 96 | 146 | 68 | 78 | null | null |
CarstenKoenig/YouVote | src/server/Application.hs | bsd-3-clause | getAdrPart (SockAddrCan nr) = show nr | 37 | getAdrPart (SockAddrCan nr) = show nr | 37 | getAdrPart (SockAddrCan nr) = show nr | 37 | false | false | 0 | 7 | 5 | 18 | 8 | 10 | null | null |
joshuaunderwood7/beeHive | StringUtil.hs | gpl-3.0 | replaceFirstSubString :: [Char] -> [Char] -> [Char] -> [Char]
replaceFirstSubString _ _ [] = [] | 95 | replaceFirstSubString :: [Char] -> [Char] -> [Char] -> [Char]
replaceFirstSubString _ _ [] = [] | 95 | replaceFirstSubString _ _ [] = [] | 33 | false | true | 0 | 10 | 14 | 52 | 26 | 26 | null | null |
nablaa/hchesslib | test/Chess/TestUtils.hs | gpl-2.0 | game :: String -> GameState
game = fromJust . readFEN | 53 | game :: String -> GameState
game = fromJust . readFEN | 53 | game = fromJust . readFEN | 25 | false | true | 0 | 7 | 9 | 26 | 11 | 15 | null | null |
spinda/liquidhaskell | tests/gsoc15/unknown/pos/HasElem.hs | bsd-3-clause | hasElem :: Eq a => a -> L a -> Bool
hasElem x Nil = False | 57 | hasElem :: Eq a => a -> L a -> Bool
hasElem x Nil = False | 57 | hasElem x Nil = False | 21 | false | true | 0 | 8 | 15 | 34 | 16 | 18 | null | null |
Arguggi/irc-log | frontend/src/Main.hs | gpl-3.0 | buildRow :: (MonadWidget t m) => PrivMsg -> m ()
buildRow msg = elClass "tr" "logrow" $ do
el "td" (text . showDate $ timestamp msg)
let md5Hash :: MD5 = hash . encodeUtf8 . nickname $ msg
let nickColor = "#" <> T.take 6 (T.pack . show $ md5Hash)
elAttr "td" ("style" =: ("color: " <> nickColor)) (text $... | 367 | buildRow :: (MonadWidget t m) => PrivMsg -> m ()
buildRow msg = elClass "tr" "logrow" $ do
el "td" (text . showDate $ timestamp msg)
let md5Hash :: MD5 = hash . encodeUtf8 . nickname $ msg
let nickColor = "#" <> T.take 6 (T.pack . show $ md5Hash)
elAttr "td" ("style" =: ("color: " <> nickColor)) (text $... | 367 | buildRow msg = elClass "tr" "logrow" $ do
el "td" (text . showDate $ timestamp msg)
let md5Hash :: MD5 = hash . encodeUtf8 . nickname $ msg
let nickColor = "#" <> T.take 6 (T.pack . show $ md5Hash)
elAttr "td" ("style" =: ("color: " <> nickColor)) (text $ nickname msg)
el "td" (text $ message msg) | 318 | false | true | 2 | 16 | 87 | 183 | 85 | 98 | null | null |
atomb/dalvik | Dalvik/Printer.hs | bsd-3-clause | typeStr Char = "char" | 21 | typeStr Char = "char" | 21 | typeStr Char = "char" | 21 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
sashabu/libcspm | src/CSPM/Evaluator/ValueSet.hs | bsd-3-clause | fastUnDotCartProduct :: ValueSet -> Value -> Maybe [ValueSet]
fastUnDotCartProduct (CartesianProduct s CartDot) _ = Just s | 122 | fastUnDotCartProduct :: ValueSet -> Value -> Maybe [ValueSet]
fastUnDotCartProduct (CartesianProduct s CartDot) _ = Just s | 122 | fastUnDotCartProduct (CartesianProduct s CartDot) _ = Just s | 60 | false | true | 0 | 8 | 15 | 41 | 20 | 21 | null | null |
BsAsHaskell/workshop-1 | src/Intro.hs | bsd-3-clause | -- Usamos `data` para definir un nuevo tipo de datos.
-- Todos los tipos deben empezar con mayúscula, y el nombre de este tipo es `Persona`.
-- El constructor de este tipo toma dos argumentos: Uno de tipo `String` y otro de tipo `Int`.
-- En este caso vamos a usarlos para representar el nombre y el poder de una persona... | 479 | maria = Persona "Maria" 32 | 26 | maria = Persona "Maria" 32 | 26 | true | false | 1 | 5 | 90 | 22 | 12 | 10 | null | null |
tphyahoo/haskoin | haskoin-core/Network/Haskoin/Util.hs | unlicense | fromLeft _ = error "Either.fromLeft: Right" | 43 | fromLeft _ = error "Either.fromLeft: Right" | 43 | fromLeft _ = error "Either.fromLeft: Right" | 43 | false | false | 0 | 5 | 5 | 12 | 5 | 7 | null | null |
tomahawkins/powerpc | Language/PowerPC/Simulator.hs | bsd-3-clause | rotateLN :: Int -> Integer -> Integer -> Integer
rotateLN carryBit a n | n <= 0 = a
| otherwise = rotateLN carryBit (if testBit a' carryBit then setBit a' 0 else a') (n - 1)
where
a' = shiftL a 1 | 221 | rotateLN :: Int -> Integer -> Integer -> Integer
rotateLN carryBit a n | n <= 0 = a
| otherwise = rotateLN carryBit (if testBit a' carryBit then setBit a' 0 else a') (n - 1)
where
a' = shiftL a 1 | 221 | rotateLN carryBit a n | n <= 0 = a
| otherwise = rotateLN carryBit (if testBit a' carryBit then setBit a' 0 else a') (n - 1)
where
a' = shiftL a 1 | 172 | false | true | 0 | 9 | 68 | 97 | 47 | 50 | null | null |
stevely/hspirv | src/SpirV/Builder.hs | bsd-3-clause | -- Id 1: Result type, must be 32 bit integer
-- Id 2: q (see docs)
-- Id 3: ND range, must be struct built with buildNDRange
-- Id 4: Number of events, must be signed 32 bit integer
-- Id 5: Wait events, must be pointer to device events
-- Id 6: Retained events, must be pointer to device events
-- Id 7: Invoke, must be... | 671 | enqueueKernel :: TypeId -> Id -> KernelEnqueueFlags -> NDRangeId -> Id -> Id
-> Id -> Id -> Id -> Id -> Id -> [Id] -> Builder Id
enqueueKernel (TypeId i) q kef (NDRangeId n) = R.enqueueKernel i q kef n | 215 | enqueueKernel (TypeId i) q kef (NDRangeId n) = R.enqueueKernel i q kef n | 72 | true | true | 0 | 20 | 149 | 112 | 60 | 52 | null | null |
jfeltz/tasty-integrate | src/Data/Suite.hs | bsd-2-clause | fromGroupExp _ = Left "unable to match group expression" | 56 | fromGroupExp _ = Left "unable to match group expression" | 56 | fromGroupExp _ = Left "unable to match group expression" | 56 | false | false | 0 | 5 | 8 | 13 | 5 | 8 | null | null |
cdxr/haskell-interface | src/Data/Interface/Name.hs | bsd-3-clause | -- | A default `QualContext` that removes the qualifier from some primitives
-- provided by GHC, such as "Int".
defQualContext :: QualContext
defQualContext = QualContext Set.empty True | 185 | defQualContext :: QualContext
defQualContext = QualContext Set.empty True | 73 | defQualContext = QualContext Set.empty True | 43 | true | true | 0 | 6 | 26 | 20 | 11 | 9 | null | null |
takoeight0821/malgo | src/Malgo/Rename/Pass.hs | bsd-3-clause | rnType (TyVar pos x) = TyVar pos <$> lookupTypeName pos x | 57 | rnType (TyVar pos x) = TyVar pos <$> lookupTypeName pos x | 57 | rnType (TyVar pos x) = TyVar pos <$> lookupTypeName pos x | 57 | false | false | 0 | 7 | 10 | 29 | 13 | 16 | null | null |
Shou/KawaiiBot-hs | KawaiiBot/Utils.hs | gpl-2.0 | -- | Case insensitive `isInfixOf' function limited to `String's.
insIsInfixOf :: String -> String -> Bool
insIsInfixOf xs ys = f xs xs ys
where f _ [] _ = True
f _ _ [] = False
f o (x:xs) (y:ys) | [x] `insEq` [y] = f o xs ys
| otherwise = f o o ys
-- | Are all `Char's digits... | 321 | insIsInfixOf :: String -> String -> Bool
insIsInfixOf xs ys = f xs xs ys
where f _ [] _ = True
f _ _ [] = False
f o (x:xs) (y:ys) | [x] `insEq` [y] = f o xs ys
| otherwise = f o o ys
-- | Are all `Char's digits? | 256 | insIsInfixOf xs ys = f xs xs ys
where f _ [] _ = True
f _ _ [] = False
f o (x:xs) (y:ys) | [x] `insEq` [y] = f o xs ys
| otherwise = f o o ys
-- | Are all `Char's digits? | 215 | true | true | 5 | 8 | 107 | 127 | 66 | 61 | null | null |
drhodes/jade2hdl | jade-decode/src/Jade/Decode/Util.hs | bsd-3-clause | contains a b = DL.isInfixOf b a | 31 | contains a b = DL.isInfixOf b a | 31 | contains a b = DL.isInfixOf b a | 31 | false | false | 0 | 6 | 6 | 19 | 8 | 11 | null | null |
a143753/AOJ | 0538.hs | apache-2.0 | cnt ('I':xs) =
let n = cnt' 0 xs
r = drop (2*n) xs
in
n:(cnt r) | 78 | cnt ('I':xs) =
let n = cnt' 0 xs
r = drop (2*n) xs
in
n:(cnt r) | 78 | cnt ('I':xs) =
let n = cnt' 0 xs
r = drop (2*n) xs
in
n:(cnt r) | 78 | false | false | 2 | 11 | 31 | 63 | 29 | 34 | null | null |
bruno-cadorette/AdventOfCode | Day 16/Day16.hs | mit | part1 aunts = foldr (removeWrongAunts (==)) aunts mfcsamData | 60 | part1 aunts = foldr (removeWrongAunts (==)) aunts mfcsamData | 60 | part1 aunts = foldr (removeWrongAunts (==)) aunts mfcsamData | 60 | false | false | 1 | 7 | 7 | 28 | 12 | 16 | null | null |
mpickering/hlint | src/Language/Haskell/HLint3.hs | bsd-3-clause | -- | Given a function to load a module (typically 'readSettingsFile'), and a module to start from
-- (defaults to @HLint.HLint@) find the information from all settings files.
findSettings :: (String -> IO (FilePath, Maybe String)) -> Maybe String -> IO ([Fixity], [Classify], [Either HintBuiltin HintRule])
findSetting... | 1,537 | findSettings :: (String -> IO (FilePath, Maybe String)) -> Maybe String -> IO ([Fixity], [Classify], [Either HintBuiltin HintRule])
findSettings load start = do
(file,contents) <- load $ fromMaybe "HLint.HLint" start
let flags = addInfix defaultParseFlags
res <- parseModuleEx flags file contents
case re... | 1,360 | findSettings load start = do
(file,contents) <- load $ fromMaybe "HLint.HLint" start
let flags = addInfix defaultParseFlags
res <- parseModuleEx flags file contents
case res of
Left (ParseError sl msg err) ->
error $ "Settings parse failure at " ++ showSrcLoc sl ++ ": " ++ msg ++ "\n... | 1,228 | true | true | 6 | 18 | 396 | 489 | 248 | 241 | null | null |
scturtle/turtlelang | Codegen.hs | unlicense | addDefn :: Definition -> LLVM ()
addDefn d = do
defs <- gets moduleDefinitions
modify $ \s -> s { moduleDefinitions = defs ++ [d] } | 135 | addDefn :: Definition -> LLVM ()
addDefn d = do
defs <- gets moduleDefinitions
modify $ \s -> s { moduleDefinitions = defs ++ [d] } | 135 | addDefn d = do
defs <- gets moduleDefinitions
modify $ \s -> s { moduleDefinitions = defs ++ [d] } | 102 | false | true | 0 | 12 | 29 | 60 | 30 | 30 | null | null |
jfischoff/maxent | tests/Main.hs | bsd-3-clause | pg (Left x) = print x | 22 | pg (Left x) = print x | 22 | pg (Left x) = print x | 22 | false | false | 0 | 7 | 6 | 18 | 8 | 10 | null | null |
oldmanmike/ghc | compiler/nativeGen/X86/Ppr.hs | bsd-3-clause | -- zero-extension only needs to extend to 32 bits: on x86_64,
-- the remaining zero-extension to 64 bits is automatic, and the 32-bit
-- instruction is shorter.
pprInstr (MOVSxL formats src dst)
= sdocWithPlatform $ \platform ->
pprFormatOpOpCoerce (sLit "movs") formats (archWordFormat (target32B... | 341 | pprInstr (MOVSxL formats src dst)
= sdocWithPlatform $ \platform ->
pprFormatOpOpCoerce (sLit "movs") formats (archWordFormat (target32Bit platform)) src dst | 163 | pprInstr (MOVSxL formats src dst)
= sdocWithPlatform $ \platform ->
pprFormatOpOpCoerce (sLit "movs") formats (archWordFormat (target32Bit platform)) src dst | 163 | true | false | 0 | 11 | 68 | 60 | 31 | 29 | null | null |
Lotterleben/meisel.hs | src/Iterationsgleichungen.hs | gpl-3.0 | -- gehe davon aus dass xEnd das maximum für x ist...
-- main = print (euler 0.001 0.2)
f' x y = 10 - 500 * y + 500 * x | 120 | f' x y = 10 - 500 * y + 500 * x | 31 | f' x y = 10 - 500 * y + 500 * x | 31 | true | false | 4 | 5 | 32 | 36 | 15 | 21 | null | null |
xu-hao/QueryArrow | QueryArrow-db-filesystem/src/QueryArrow/FileSystem/Commands.hs | bsd-3-clause | interpret (FindDirsByHost n next) = do
(hostmap, _) <- lift ask
let hostmap' = filter (\((host2, _), _) -> n == host2) hostmap
fs <- concat <$> mapM (\(_, ia) -> interpreter ia LAllDirs) hostmap'
next fs | 216 | interpret (FindDirsByHost n next) = do
(hostmap, _) <- lift ask
let hostmap' = filter (\((host2, _), _) -> n == host2) hostmap
fs <- concat <$> mapM (\(_, ia) -> interpreter ia LAllDirs) hostmap'
next fs | 216 | interpret (FindDirsByHost n next) = do
(hostmap, _) <- lift ask
let hostmap' = filter (\((host2, _), _) -> n == host2) hostmap
fs <- concat <$> mapM (\(_, ia) -> interpreter ia LAllDirs) hostmap'
next fs | 216 | false | false | 0 | 14 | 49 | 112 | 57 | 55 | null | null |
aisamanra/matterhorn | src/Events.hs | bsd-3-clause | formatError (NoSuchScript name) =
"No script named " <> name <> " was found" | 80 | formatError (NoSuchScript name) =
"No script named " <> name <> " was found" | 80 | formatError (NoSuchScript name) =
"No script named " <> name <> " was found" | 80 | false | false | 2 | 6 | 17 | 25 | 11 | 14 | null | null |
keera-studios/hsQt | Qtc/Gui/QGraphicsSceneMouseEvent.hs | bsd-2-clause | qsetButtonDownPos :: QGraphicsSceneMouseEvent a -> ((MouseButton, QPointF t2)) -> IO ()
qsetButtonDownPos x0 (x1, x2)
= withObjectPtr x0 $ \cobj_x0 ->
withObjectPtr x2 $ \cobj_x2 ->
qtc_QGraphicsSceneMouseEvent_setButtonDownPos cobj_x0 (toCLong $ qEnum_toInt x1) cobj_x2 | 280 | qsetButtonDownPos :: QGraphicsSceneMouseEvent a -> ((MouseButton, QPointF t2)) -> IO ()
qsetButtonDownPos x0 (x1, x2)
= withObjectPtr x0 $ \cobj_x0 ->
withObjectPtr x2 $ \cobj_x2 ->
qtc_QGraphicsSceneMouseEvent_setButtonDownPos cobj_x0 (toCLong $ qEnum_toInt x1) cobj_x2 | 280 | qsetButtonDownPos x0 (x1, x2)
= withObjectPtr x0 $ \cobj_x0 ->
withObjectPtr x2 $ \cobj_x2 ->
qtc_QGraphicsSceneMouseEvent_setButtonDownPos cobj_x0 (toCLong $ qEnum_toInt x1) cobj_x2 | 192 | false | true | 4 | 9 | 42 | 98 | 47 | 51 | null | null |
gromakovsky/Orchid | src/Orchid/TailAccumulator.hs | mit | changeReturnAlmostTailDo _ _ = error "changeReturnAlmostTailDo" | 63 | changeReturnAlmostTailDo _ _ = error "changeReturnAlmostTailDo" | 63 | changeReturnAlmostTailDo _ _ = error "changeReturnAlmostTailDo" | 63 | false | false | 0 | 5 | 5 | 14 | 6 | 8 | null | null |
olsner/ghc | compiler/prelude/THNames.hs | bsd-3-clause | lamEName = libFun (fsLit "lamE") lamEIdKey | 56 | lamEName = libFun (fsLit "lamE") lamEIdKey | 56 | lamEName = libFun (fsLit "lamE") lamEIdKey | 56 | false | false | 0 | 7 | 19 | 17 | 8 | 9 | null | null |
phischu/fragnix | tests/packages/scotty/System.Posix.Files.hs | bsd-3-clause | -- -----------------------------------------------------------------------------
-- chown()
-- | @setOwnerAndGroup path uid gid@ changes the owner and group of @path@ to
-- @uid@ and @gid@, respectively.
--
-- If @uid@ or @gid@ is specified as -1, then that ID is not changed.
--
-- Note: calls @chown@.
setOwnerAndGrou... | 498 | setOwnerAndGroup :: FilePath -> UserID -> GroupID -> IO ()
setOwnerAndGroup name uid gid = do
withFilePath name $ \s ->
throwErrnoPathIfMinus1_ "setOwnerAndGroup" name (c_chown s uid gid) | 193 | setOwnerAndGroup name uid gid = do
withFilePath name $ \s ->
throwErrnoPathIfMinus1_ "setOwnerAndGroup" name (c_chown s uid gid) | 134 | true | true | 0 | 11 | 78 | 75 | 40 | 35 | null | null |
brownplt/strobe-old | src/BrownPLT/TypedJS/TypeTheory.hs | bsd-2-clause | canonizeArgType (ArgType args (Just opt)) = do
args <- mapM canonize args
opt <- canonize opt
return (ArgType args (Just opt)) | 132 | canonizeArgType (ArgType args (Just opt)) = do
args <- mapM canonize args
opt <- canonize opt
return (ArgType args (Just opt)) | 132 | canonizeArgType (ArgType args (Just opt)) = do
args <- mapM canonize args
opt <- canonize opt
return (ArgType args (Just opt)) | 132 | false | false | 0 | 11 | 26 | 65 | 29 | 36 | null | null |
sapek/pandoc | src/Text/Pandoc/Readers/LaTeX.hs | gpl-2.0 | inlineGroup :: LP Inlines
inlineGroup = do
ils <- grouped inline
if isNull ils
then return mempty
else return $ spanWith nullAttr ils
-- we need the span so we can detitlecase bibtex entries;
-- we need to know when something is {C}apitalized | 276 | inlineGroup :: LP Inlines
inlineGroup = do
ils <- grouped inline
if isNull ils
then return mempty
else return $ spanWith nullAttr ils
-- we need the span so we can detitlecase bibtex entries;
-- we need to know when something is {C}apitalized | 276 | inlineGroup = do
ils <- grouped inline
if isNull ils
then return mempty
else return $ spanWith nullAttr ils
-- we need the span so we can detitlecase bibtex entries;
-- we need to know when something is {C}apitalized | 250 | false | true | 0 | 9 | 76 | 52 | 25 | 27 | null | null |
barrucadu/spec | Test/CoCo/Gen.hs | mit | -- | Generate the next tier.
stepGenerator :: (Typeable s, Ord o, Ord x)
=> (Ann s o x -> Ann s o x -> Schema s -> Bool)
-- ^ Annotation of first expr, annotation of second expr, combined expr.
-> Generator s o x -> Generator s o x
stepGenerator check g = g { tiers = tiers', sofar = sofar', pures = pures', forbid... | 2,659 | stepGenerator :: (Typeable s, Ord o, Ord x)
=> (Ann s o x -> Ann s o x -> Schema s -> Bool)
-- ^ Annotation of first expr, annotation of second expr, combined expr.
-> Generator s o x -> Generator s o x
stepGenerator check g = g { tiers = tiers', sofar = sofar', pures = pures', forbiddens = forbiddens' } where
... | 2,630 | stepGenerator check g = g { tiers = tiers', sofar = sofar', pures = pures', forbiddens = forbiddens' } where
sofar' = sofar g + 1
tiers' = merge
[ tiers g
, M.singleton sofar' funAps
, M.singleton sofar' binds
]
pures' =
let new = filter isPure . map fst . S.toList $ M.findWithDefault S.empty ... | 2,421 | true | true | 11 | 24 | 741 | 1,047 | 526 | 521 | null | null |
begriffs/hscope | HScope.hs | bsd-3-clause | handleQuery _ _ = return () | 27 | handleQuery _ _ = return () | 27 | handleQuery _ _ = return () | 27 | false | false | 0 | 6 | 5 | 16 | 7 | 9 | null | null |
ppenzin/neko-lib-hs | src/lib/Binary/Neko/Instructions.hs | bsd-2-clause | opcode (Hash) = (54, Nothing) | 37 | opcode (Hash) = (54, Nothing) | 37 | opcode (Hash) = (54, Nothing) | 37 | false | false | 0 | 6 | 12 | 18 | 10 | 8 | null | null |
seckcoder/lang-learn | haskell/lambda-calculus/src/Lambda-Calculus.hs | unlicense | runEval3 :: Env -> Eval3 a -> Either String a
runEval3 env ev = runIdentity (runExceptT (runReaderT ev env)) | 108 | runEval3 :: Env -> Eval3 a -> Either String a
runEval3 env ev = runIdentity (runExceptT (runReaderT ev env)) | 108 | runEval3 env ev = runIdentity (runExceptT (runReaderT ev env)) | 62 | false | true | 0 | 9 | 18 | 53 | 24 | 29 | null | null |
bgold-cosmos/Tidal | bench/Speed/Tidal/PatternB.hs | gpl-3.0 | withResultArcB :: [Benchmark]
withResultArcB =
[ bgroup "withResultArc" [
bench "wqa med" $ whnf (withResultArc arcFunc) wqaMed
, bench "wqa big" $ whnf (withResultArc arcFunc) wqaBig ]
] | 202 | withResultArcB :: [Benchmark]
withResultArcB =
[ bgroup "withResultArc" [
bench "wqa med" $ whnf (withResultArc arcFunc) wqaMed
, bench "wqa big" $ whnf (withResultArc arcFunc) wqaBig ]
] | 202 | withResultArcB =
[ bgroup "withResultArc" [
bench "wqa med" $ whnf (withResultArc arcFunc) wqaMed
, bench "wqa big" $ whnf (withResultArc arcFunc) wqaBig ]
] | 172 | false | true | 0 | 11 | 42 | 64 | 32 | 32 | null | null |
robbertkrebbers/fewdigits | Data/Real/ICReal.hs | bsd-2-clause | erf (CReal i x) = CReal (intervalErf i) (CReal.realErrorFunction x) | 67 | erf (CReal i x) = CReal (intervalErf i) (CReal.realErrorFunction x) | 67 | erf (CReal i x) = CReal (intervalErf i) (CReal.realErrorFunction x) | 67 | false | false | 0 | 8 | 9 | 38 | 17 | 21 | null | null |
romanb/amazonka | amazonka-swf/gen/Network/AWS/SWF/ListClosedWorkflowExecutions.hs | mpl-2.0 | -- | If a 'NextPageToken' was returned by a previous call, there are more results
-- available. To retrieve the next page of results, make the call again using
-- the returned token in 'nextPageToken'. Keep all other arguments unchanged.
--
-- The configured 'maximumPageSize' determines how many results can be returned... | 497 | lcweNextPageToken :: Lens' ListClosedWorkflowExecutions (Maybe Text)
lcweNextPageToken =
lens _lcweNextPageToken (\s a -> s { _lcweNextPageToken = a }) | 155 | lcweNextPageToken =
lens _lcweNextPageToken (\s a -> s { _lcweNextPageToken = a }) | 86 | true | true | 0 | 9 | 79 | 51 | 30 | 21 | null | null |
snoyberg/ghc | compiler/llvmGen/Llvm/Types.hs | bsd-3-clause | getStatType (LMAdd t _) = getStatType t | 47 | getStatType (LMAdd t _) = getStatType t | 47 | getStatType (LMAdd t _) = getStatType t | 47 | false | false | 0 | 6 | 14 | 21 | 9 | 12 | null | null |
jeffreyrosenbluth/Cards | src/DSL.hs | bsd-3-clause | comma :: Parser String
comma = symbol "," | 41 | comma :: Parser String
comma = symbol "," | 41 | comma = symbol "," | 18 | false | true | 0 | 5 | 7 | 17 | 8 | 9 | null | null |
minoki/LambdaQuest | src/LambdaQuest/SystemFsub/Coercion.hs | bsd-3-clause | mapTerm :: [Binding] -> Term -> Either String (F.Term, Type)
mapTerm ctx (TPrimValue v) = return $ (F.TPrimValue v, TC.primTypeOf v) | 132 | mapTerm :: [Binding] -> Term -> Either String (F.Term, Type)
mapTerm ctx (TPrimValue v) = return $ (F.TPrimValue v, TC.primTypeOf v) | 132 | mapTerm ctx (TPrimValue v) = return $ (F.TPrimValue v, TC.primTypeOf v) | 71 | false | true | 0 | 9 | 20 | 66 | 34 | 32 | null | null |
rueshyna/gogol | gogol-dataflow/gen/Network/Google/Dataflow/Types/Product.hs | mpl-2.0 | -- | Zero or more side inputs.
pdiSideInputs :: Lens' ParDoInstruction [SideInputInfo]
pdiSideInputs
= lens _pdiSideInputs
(\ s a -> s{_pdiSideInputs = a})
. _Default
. _Coerce | 196 | pdiSideInputs :: Lens' ParDoInstruction [SideInputInfo]
pdiSideInputs
= lens _pdiSideInputs
(\ s a -> s{_pdiSideInputs = a})
. _Default
. _Coerce | 165 | pdiSideInputs
= lens _pdiSideInputs
(\ s a -> s{_pdiSideInputs = a})
. _Default
. _Coerce | 109 | true | true | 3 | 8 | 46 | 59 | 28 | 31 | null | null |
Soostone/snaplet-persistent | src/Snap/Snaplet/Persistent.hs | bsd-3-clause | withPool :: MonadIO m
=> ConnectionPool
-> SqlPersistM a -> m a
withPool cp f = liftIO . runResourceT . runNoLoggingT $ runSqlPool f cp | 153 | withPool :: MonadIO m
=> ConnectionPool
-> SqlPersistM a -> m a
withPool cp f = liftIO . runResourceT . runNoLoggingT $ runSqlPool f cp | 153 | withPool cp f = liftIO . runResourceT . runNoLoggingT $ runSqlPool f cp | 71 | false | true | 0 | 9 | 42 | 58 | 26 | 32 | null | null |
olorin/amazonka | amazonka-iam/test/Test/AWS/Gen/IAM.hs | mpl-2.0 | testResyncMFADeviceResponse :: ResyncMFADeviceResponse -> TestTree
testResyncMFADeviceResponse = res
"ResyncMFADeviceResponse"
"fixture/ResyncMFADeviceResponse.proto"
iAM
(Proxy :: Proxy ResyncMFADevice) | 219 | testResyncMFADeviceResponse :: ResyncMFADeviceResponse -> TestTree
testResyncMFADeviceResponse = res
"ResyncMFADeviceResponse"
"fixture/ResyncMFADeviceResponse.proto"
iAM
(Proxy :: Proxy ResyncMFADevice) | 219 | testResyncMFADeviceResponse = res
"ResyncMFADeviceResponse"
"fixture/ResyncMFADeviceResponse.proto"
iAM
(Proxy :: Proxy ResyncMFADevice) | 152 | false | true | 0 | 6 | 30 | 36 | 17 | 19 | null | null |
sleepomeno/snooker-statistics | src/Markdown.hs | apache-2.0 | winsF player = L.Fold (\ nr match -> if matchWinner match == player then nr + 1 else nr) 0 Prelude.id | 101 | winsF player = L.Fold (\ nr match -> if matchWinner match == player then nr + 1 else nr) 0 Prelude.id | 101 | winsF player = L.Fold (\ nr match -> if matchWinner match == player then nr + 1 else nr) 0 Prelude.id | 101 | false | false | 0 | 10 | 20 | 49 | 25 | 24 | null | null |
vTurbine/ghc | compiler/iface/IfaceType.hs | bsd-3-clause | pprParendIfaceCoercion = ppr_co TyConPrec | 41 | pprParendIfaceCoercion = ppr_co TyConPrec | 41 | pprParendIfaceCoercion = ppr_co TyConPrec | 41 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
danr/hipspec | testsuite/prod/zeno_version/PropT40.hs | gpl-3.0 | (S x) + y = S (x + y) | 21 | (S x) + y = S (x + y) | 21 | (S x) + y = S (x + y) | 21 | false | false | 0 | 7 | 8 | 28 | 13 | 15 | null | null |
rahulmutt/ghcvm | compiler/Eta/Core/TrieMap.hs | bsd-3-clause | xtInt :: Int -> XT a -> IntMap.IntMap a -> IntMap.IntMap a
xtInt k f m = IntMap.alter f k m | 91 | xtInt :: Int -> XT a -> IntMap.IntMap a -> IntMap.IntMap a
xtInt k f m = IntMap.alter f k m | 91 | xtInt k f m = IntMap.alter f k m | 32 | false | true | 0 | 9 | 20 | 52 | 24 | 28 | null | null |
TOSPIO/yi | src/library/Yi/Buffer/TextUnit.hs | gpl-2.0 | -- | Generic move operation
-- Warning: moving To the (OutsideBound, Backward) bound of Document is impossible (offset -1!)
-- @genMoveB u b d@: move in direction d until encountering boundary b or unit u. See 'genAtBoundaryB' for boundary explanation.
genMoveB :: TextUnit -> (Direction, BoundarySide) -> Direction -> B... | 411 | genMoveB :: TextUnit -> (Direction, BoundarySide) -> Direction -> BufferM ()
genMoveB Document (Forward,InsideBound) Forward = moveTo =<< subtract 1 <$> sizeB | 158 | genMoveB Document (Forward,InsideBound) Forward = moveTo =<< subtract 1 <$> sizeB | 81 | true | true | 0 | 9 | 61 | 61 | 33 | 28 | null | null |
HIPERFIT/language-c-quote | Language/C/Quote/OpenCL.hs | bsd-3-clause | cexp = quasiquote exts typenames P.parseExp | 45 | cexp = quasiquote exts typenames P.parseExp | 45 | cexp = quasiquote exts typenames P.parseExp | 45 | false | false | 0 | 6 | 7 | 15 | 7 | 8 | null | null |
dagit/helisp | src/Parser2.hs | bsd-3-clause | escape :: Parser Char
escape = do { char '\\';
a <- anyChar;
return a; } | 100 | escape :: Parser Char
escape = do { char '\\';
a <- anyChar;
return a; } | 100 | escape = do { char '\\';
a <- anyChar;
return a; } | 78 | false | true | 0 | 8 | 43 | 44 | 20 | 24 | null | null |
elliottt/dang | src/Dang/Syntax/Location.hs | bsd-3-clause | interactive :: Source
interactive = T.pack "<interactive>" | 59 | interactive :: Source
interactive = T.pack "<interactive>" | 59 | interactive = T.pack "<interactive>" | 37 | false | true | 0 | 6 | 7 | 16 | 8 | 8 | null | null |
reflex-frp/reflex-dom | reflex-dom-core/src/Reflex/Dom/Builder/Class.hs | bsd-3-clause | liftElement :: LiftDomBuilder t f m => Text -> ElementConfig er t (DomBuilderSpace m) -> f m a -> f m (Element er (DomBuilderSpace m) t, a)
liftElement elementTag cfg child = liftWithStateless $ \run -> element elementTag cfg $ run child | 237 | liftElement :: LiftDomBuilder t f m => Text -> ElementConfig er t (DomBuilderSpace m) -> f m a -> f m (Element er (DomBuilderSpace m) t, a)
liftElement elementTag cfg child = liftWithStateless $ \run -> element elementTag cfg $ run child | 237 | liftElement elementTag cfg child = liftWithStateless $ \run -> element elementTag cfg $ run child | 97 | false | true | 0 | 13 | 41 | 104 | 50 | 54 | null | null |
quchen/shaking-up-ghc | src/Rules/Actions.hs | bsd-3-clause | runConfigure :: FilePath -> [CmdOption] -> [String] -> Action ()
runConfigure dir opts args = do
need [dir -/- "configure"]
putBuild $ "| Run configure in " ++ dir ++ "..."
quietly $ cmd Shell (EchoStdout False) [Cwd dir] "bash configure" opts' args
where
-- Always configure with bash.
-... | 444 | runConfigure :: FilePath -> [CmdOption] -> [String] -> Action ()
runConfigure dir opts args = do
need [dir -/- "configure"]
putBuild $ "| Run configure in " ++ dir ++ "..."
quietly $ cmd Shell (EchoStdout False) [Cwd dir] "bash configure" opts' args
where
-- Always configure with bash.
-... | 444 | runConfigure dir opts args = do
need [dir -/- "configure"]
putBuild $ "| Run configure in " ++ dir ++ "..."
quietly $ cmd Shell (EchoStdout False) [Cwd dir] "bash configure" opts' args
where
-- Always configure with bash.
-- This also injects /bin/bash into `libtool`, instead of /bin/sh
... | 379 | false | true | 0 | 10 | 105 | 123 | 61 | 62 | null | null |
ekmett/ghc | compiler/llvmGen/LlvmCodeGen/CodeGen.hs | bsd-3-clause | genSwitch :: CmmExpr -> [Maybe BlockId] -> LlvmM StmtData
genSwitch cond maybe_ids = do
(vc, stmts, top) <- exprToVar cond
let ty = getVarType vc
let pairs = [ (ix, id) | (ix,Just id) <- zip [0..] maybe_ids ]
let labels = map (\(ix, b) -> (mkIntLit ty ix, blockIdToLlvm b)) pairs
-- out of range is ... | 829 | genSwitch :: CmmExpr -> [Maybe BlockId] -> LlvmM StmtData
genSwitch cond maybe_ids = do
(vc, stmts, top) <- exprToVar cond
let ty = getVarType vc
let pairs = [ (ix, id) | (ix,Just id) <- zip [0..] maybe_ids ]
let labels = map (\(ix, b) -> (mkIntLit ty ix, blockIdToLlvm b)) pairs
-- out of range is ... | 829 | genSwitch cond maybe_ids = do
(vc, stmts, top) <- exprToVar cond
let ty = getVarType vc
let pairs = [ (ix, id) | (ix,Just id) <- zip [0..] maybe_ids ]
let labels = map (\(ix, b) -> (mkIntLit ty ix, blockIdToLlvm b)) pairs
-- out of range is undefied, so lets just branch to first label
let (_, d... | 771 | false | true | 0 | 14 | 172 | 211 | 111 | 100 | null | null |
ksaveljev/hNES | NES/EmulatorHelpers.hs | mit | setOverflowFlag :: MonadEmulator m => Bool -> m ()
setOverflowFlag = setFlag OF | 79 | setOverflowFlag :: MonadEmulator m => Bool -> m ()
setOverflowFlag = setFlag OF | 79 | setOverflowFlag = setFlag OF | 28 | false | true | 0 | 8 | 12 | 30 | 14 | 16 | null | null |
SAdams601/HaRe | old/testing/removeCon/M1.hs | bsd-3-clause | l = k | 5 | l = k | 5 | l = k | 5 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
guoy34/ampersand | src/Database/Design/Ampersand/ADL1/Expression.hs | gpl-3.0 | exprRad2list r = [r] | 31 | exprRad2list r = [r] | 31 | exprRad2list r = [r] | 31 | false | false | 1 | 5 | 14 | 15 | 6 | 9 | null | null |
dan-t/layers | src/Convert/ToFileData.hs | bsd-3-clause | toEntity E.Star {E.starId = id, E.starPosition = pos} =
FD.Star id (V.toTuple pos) | 85 | toEntity E.Star {E.starId = id, E.starPosition = pos} =
FD.Star id (V.toTuple pos) | 85 | toEntity E.Star {E.starId = id, E.starPosition = pos} =
FD.Star id (V.toTuple pos) | 85 | false | false | 1 | 8 | 15 | 52 | 24 | 28 | null | null |
quietspace/Backhand | backhand/test/Test.hs | mit | genChannelId :: Gen ChannelId
genChannelId = ChannelId <$> arbitrarySizedBoundedIntegral | 88 | genChannelId :: Gen ChannelId
genChannelId = ChannelId <$> arbitrarySizedBoundedIntegral | 88 | genChannelId = ChannelId <$> arbitrarySizedBoundedIntegral | 58 | false | true | 0 | 5 | 8 | 18 | 9 | 9 | null | null |
VictorCMiraldo/mmm | MMM/Examples/Results/Folder.hs | mit | folderTR :: (Strong m) => (MMM m (Stack, Stack) () ())
folderTR = (f2m (p1 . _a5))
.! (runm_ (extl stackPUSH))
.! (f2m _a4)
.! (runm_ (extr stackPOP))
.! (f2m _a3)
.! (runm (f2m (\ _pure0 -> _pure0)))
.! (f2m _a2)
.! (runm1 (extr stac... | 938 | folderTR :: (Strong m) => (MMM m (Stack, Stack) () ())
folderTR = (f2m (p1 . _a5))
.! (runm_ (extl stackPUSH))
.! (f2m _a4)
.! (runm_ (extr stackPOP))
.! (f2m _a3)
.! (runm (f2m (\ _pure0 -> _pure0)))
.! (f2m _a2)
.! (runm1 (extr stac... | 938 | folderTR = (f2m (p1 . _a5))
.! (runm_ (extl stackPUSH))
.! (f2m _a4)
.! (runm_ (extr stackPOP))
.! (f2m _a3)
.! (runm (f2m (\ _pure0 -> _pure0)))
.! (f2m _a2)
.! (runm1 (extr stackTOP)
.! (f2m _a1))
... | 883 | false | true | 0 | 17 | 396 | 351 | 192 | 159 | null | null |
oprdyn/technique | lib/Technique/Builtins.hs | mit | -- the '+' operation
builtinProcedureCombineValues :: Function
builtinProcedureCombineValues =
Primitive
emptyProcedure
{ procedureName = Identifier "combine_values",
procedureInput = [Type "*", Type "*"],
procedureOutput = [Type "*"],
procedureTitle = Just (Markdown "Combine Two Val... | 474 | builtinProcedureCombineValues :: Function
builtinProcedureCombineValues =
Primitive
emptyProcedure
{ procedureName = Identifier "combine_values",
procedureInput = [Type "*", Type "*"],
procedureOutput = [Type "*"],
procedureTitle = Just (Markdown "Combine Two Values"),
proced... | 453 | builtinProcedureCombineValues =
Primitive
emptyProcedure
{ procedureName = Identifier "combine_values",
procedureInput = [Type "*", Type "*"],
procedureOutput = [Type "*"],
procedureTitle = Just (Markdown "Combine Two Values"),
procedureDescription = Just (Markdown "Combine t... | 411 | true | true | 0 | 10 | 104 | 88 | 48 | 40 | null | null |
Codas/yesod-form-materialize | Yesod/Form/Materialize/Fields.hs | mit | -- | Creates an input with @type="checkbox"@ for selecting multiple options.
matCheckboxesField :: (Eq a, RenderMessage site FormMessage)
=> HandlerT site IO (OptionList a) -> ColSize -> Field (HandlerT site IO) [a]
matCheckboxesField ioptlist col =
(multiSelectField ioptlist) { fieldView = view ... | 940 | matCheckboxesField :: (Eq a, RenderMessage site FormMessage)
=> HandlerT site IO (OptionList a) -> ColSize -> Field (HandlerT site IO) [a]
matCheckboxesField ioptlist col =
(multiSelectField ioptlist) { fieldView = view }
where view theId name attrs val isReq =
do opts <- fmap olOpt... | 863 | matCheckboxesField ioptlist col =
(multiSelectField ioptlist) { fieldView = view }
where view theId name attrs val isReq =
do opts <- fmap olOptions $ handlerToWidget ioptlist
let optselected (Left _) _ = False
optselected (Right vals) opt = (optionInternalValue opt) ... | 705 | true | true | 0 | 12 | 224 | 176 | 90 | 86 | null | null |
sestrella/stack-template | src/StackTemplate.hs | bsd-3-clause | getFiles :: IO [FilePath]
getFiles = getCurrentDirectory >>= getDirectoryContents >>= filterM doesFileExist | 107 | getFiles :: IO [FilePath]
getFiles = getCurrentDirectory >>= getDirectoryContents >>= filterM doesFileExist | 107 | getFiles = getCurrentDirectory >>= getDirectoryContents >>= filterM doesFileExist | 81 | false | true | 0 | 7 | 11 | 33 | 15 | 18 | null | null |
EduPH/Problemas | Bowling/test/Tests.hs | gpl-3.0 | main = defaultMain bowlingSuite | 31 | main = defaultMain bowlingSuite | 31 | main = defaultMain bowlingSuite | 31 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
philopon/arib | src/Data/Arib/PSI/Internal.hs | bsd-3-clause | singlePSI :: (Monad m, PSI a) => PSITag a -> Conduit (PESPSI L.ByteString) m a
singlePSI t = awaitForever $ \r -> when (untag t $ pesPsiProgramId r) $
case getPSI t (pesPsiPayload r) of
[] -> return ()
m -> mapM_ yield m
| 242 | singlePSI :: (Monad m, PSI a) => PSITag a -> Conduit (PESPSI L.ByteString) m a
singlePSI t = awaitForever $ \r -> when (untag t $ pesPsiProgramId r) $
case getPSI t (pesPsiPayload r) of
[] -> return ()
m -> mapM_ yield m
| 242 | singlePSI t = awaitForever $ \r -> when (untag t $ pesPsiProgramId r) $
case getPSI t (pesPsiPayload r) of
[] -> return ()
m -> mapM_ yield m
| 163 | false | true | 2 | 11 | 65 | 124 | 58 | 66 | null | null |
notcome/ImplFP | src/Language/Core/Printer.hs | mit | {-
case l of
0 x xs -> add 1 (length xs)
1 -> 0
-}
lenCore = ECase (EVar "l")
[(0, ["x", "xs"], EApp (EApp (EVar "add") (ENum 1)) (EApp (EVar "length") (EVar "xs")))
,(1, [], ENum 0)] | 219 | lenCore = ECase (EVar "l")
[(0, ["x", "xs"], EApp (EApp (EVar "add") (ENum 1)) (EApp (EVar "length") (EVar "xs")))
,(1, [], ENum 0)] | 164 | lenCore = ECase (EVar "l")
[(0, ["x", "xs"], EApp (EApp (EVar "add") (ENum 1)) (EApp (EVar "length") (EVar "xs")))
,(1, [], ENum 0)] | 164 | true | false | 0 | 12 | 74 | 98 | 53 | 45 | null | null |
wavewave/madgraph-auto-dataset | src/HEP/Automation/MadGraph/Dataset/Set20110411set1.hs | gpl-3.0 | zptasklist :: ScriptSetup -> ClusterSetup ZpHFull -> [WorkSetup ZpHFull]
zptasklist ssetup csetup =
[ WS ssetup (psetup_zphfull_ttbar)
(rsetupGen p NoMatch NoUserCutDef NoPGS 10000 num)
csetup
(WebDAVRemoteDir "mc/TeVatronFor3/ZpHFull0411ScanTTBar")
| p <- zpHFullParamSet , num <- sets ... | 323 | zptasklist :: ScriptSetup -> ClusterSetup ZpHFull -> [WorkSetup ZpHFull]
zptasklist ssetup csetup =
[ WS ssetup (psetup_zphfull_ttbar)
(rsetupGen p NoMatch NoUserCutDef NoPGS 10000 num)
csetup
(WebDAVRemoteDir "mc/TeVatronFor3/ZpHFull0411ScanTTBar")
| p <- zpHFullParamSet , num <- sets ... | 323 | zptasklist ssetup csetup =
[ WS ssetup (psetup_zphfull_ttbar)
(rsetupGen p NoMatch NoUserCutDef NoPGS 10000 num)
csetup
(WebDAVRemoteDir "mc/TeVatronFor3/ZpHFull0411ScanTTBar")
| p <- zpHFullParamSet , num <- sets ] | 250 | false | true | 0 | 9 | 70 | 93 | 45 | 48 | null | null |
EchoTeam/harlson | Query.hs | bsd-2-clause | readQueryByType _h "STOP" = return Stop | 39 | readQueryByType _h "STOP" = return Stop | 39 | readQueryByType _h "STOP" = return Stop | 39 | false | false | 0 | 5 | 5 | 14 | 6 | 8 | null | null |
brendanhay/gogol | gogol-shopping-content/gen/Network/Google/Resource/Content/Regionalinventory/Custombatch.hs | mpl-2.0 | -- | Upload protocol for media (e.g. \"raw\", \"multipart\").
rccUploadProtocol :: Lens' RegionalinventoryCustombatch (Maybe Text)
rccUploadProtocol
= lens _rccUploadProtocol
(\ s a -> s{_rccUploadProtocol = a}) | 219 | rccUploadProtocol :: Lens' RegionalinventoryCustombatch (Maybe Text)
rccUploadProtocol
= lens _rccUploadProtocol
(\ s a -> s{_rccUploadProtocol = a}) | 157 | rccUploadProtocol
= lens _rccUploadProtocol
(\ s a -> s{_rccUploadProtocol = a}) | 88 | true | true | 0 | 8 | 33 | 49 | 25 | 24 | null | null |
rueshyna/gogol | gogol-shopping-content/gen/Network/Google/ShoppingContent/Types/Product.hs | mpl-2.0 | -- | Issue identifier.
asdqiId :: Lens' AccountStatusDataQualityIssue (Maybe Text)
asdqiId = lens _asdqiId (\ s a -> s{_asdqiId = a}) | 133 | asdqiId :: Lens' AccountStatusDataQualityIssue (Maybe Text)
asdqiId = lens _asdqiId (\ s a -> s{_asdqiId = a}) | 110 | asdqiId = lens _asdqiId (\ s a -> s{_asdqiId = a}) | 50 | true | true | 1 | 9 | 20 | 49 | 25 | 24 | null | null |
prasmussen/glot-www | Glot/DockerRun.hs | mit | formatError :: Error -> String
formatError err =
case err of
ParseUrlError ->
"Invalid docker-run url"
HttpException exception ->
case exception of
Req.JsonHttpException reason ->
"Failed to decode json response from docker-run: " <> reaso... | 4,345 | formatError :: Error -> String
formatError err =
case err of
ParseUrlError ->
"Invalid docker-run url"
HttpException exception ->
case exception of
Req.JsonHttpException reason ->
"Failed to decode json response from docker-run: " <> reaso... | 4,345 | formatError err =
case err of
ParseUrlError ->
"Invalid docker-run url"
HttpException exception ->
case exception of
Req.JsonHttpException reason ->
"Failed to decode json response from docker-run: " <> reason
Req.VanillaH... | 4,314 | false | true | 6 | 18 | 2,146 | 403 | 190 | 213 | null | null |
juhp/gtk2hs | gtk/Graphics/UI/Gtk/ModelView/TreeStore.hs | lgpl-3.0 | -- | The invalid tree iterator.
--
invalidIter :: TreeIter
invalidIter = TreeIter 0 0 0 0 | 89 | invalidIter :: TreeIter
invalidIter = TreeIter 0 0 0 0 | 54 | invalidIter = TreeIter 0 0 0 0 | 30 | true | true | 0 | 5 | 16 | 22 | 12 | 10 | null | null |
fmapfmapfmap/amazonka | amazonka-s3/gen/Network/AWS/S3/Types/Product.hs | mpl-2.0 | -- | Creates a value of 'IndexDocument' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'idSuffix'
indexDocument
:: Text -- ^ 'idSuffix'
-> IndexDocument
indexDocument pSuffix_ =
IndexDocument'
{ _idSuffix = pSuffix_
... | 323 | indexDocument
:: Text -- ^ 'idSuffix'
-> IndexDocument
indexDocument pSuffix_ =
IndexDocument'
{ _idSuffix = pSuffix_
} | 139 | indexDocument pSuffix_ =
IndexDocument'
{ _idSuffix = pSuffix_
} | 76 | true | true | 0 | 7 | 70 | 41 | 22 | 19 | null | null |
dservgun/erp | src/common/Country.hs | gpl-3.0 | getURL :: Country -> Maybe URL
getURL (Country _ _ url _) = importURL url | 73 | getURL :: Country -> Maybe URL
getURL (Country _ _ url _) = importURL url | 73 | getURL (Country _ _ url _) = importURL url | 42 | false | true | 0 | 6 | 14 | 40 | 18 | 22 | null | null |
mbernat/aoc16-haskell | src/Day8.hs | bsd-3-clause | row :: Parser Operation
row = mkRow
<$ string "rotate row y="
<*> many1 digit
<* string " by "
<*> many1 digit
where
mkRow x y = RotateRow (read x) (read y) | 178 | row :: Parser Operation
row = mkRow
<$ string "rotate row y="
<*> many1 digit
<* string " by "
<*> many1 digit
where
mkRow x y = RotateRow (read x) (read y) | 178 | row = mkRow
<$ string "rotate row y="
<*> many1 digit
<* string " by "
<*> many1 digit
where
mkRow x y = RotateRow (read x) (read y) | 154 | false | true | 11 | 7 | 54 | 91 | 39 | 52 | null | null |
rwbarton/rw | Crawl/Messages.hs | bsd-3-clause | messagesOf :: R.Event t A.Value -> R.Event t Message
messagesOf input = R.filterApply ((\turn -> (>= turn) . _msgTurn) <$> latestTurn) rawMessages
where rawMessages = rawMessagesOf input
latestTurn = R.stepper 0 (_msgTurn <$> rawMessages) | 248 | messagesOf :: R.Event t A.Value -> R.Event t Message
messagesOf input = R.filterApply ((\turn -> (>= turn) . _msgTurn) <$> latestTurn) rawMessages
where rawMessages = rawMessagesOf input
latestTurn = R.stepper 0 (_msgTurn <$> rawMessages) | 248 | messagesOf input = R.filterApply ((\turn -> (>= turn) . _msgTurn) <$> latestTurn) rawMessages
where rawMessages = rawMessagesOf input
latestTurn = R.stepper 0 (_msgTurn <$> rawMessages) | 195 | false | true | 1 | 11 | 43 | 94 | 48 | 46 | null | null |
kcsongor/generic-lens | generic-optics/test/Spec.hs | bsd-3-clause | sum2TypePrism :: Prism Sum2 Sum2 Int Int
sum2TypePrism = _Typed @Int | 68 | sum2TypePrism :: Prism Sum2 Sum2 Int Int
sum2TypePrism = _Typed @Int | 68 | sum2TypePrism = _Typed @Int | 27 | false | true | 0 | 6 | 10 | 31 | 13 | 18 | null | null |
decomputed/decomputed.com | site.hs | apache-2.0 | --------------------------------------------------------------------------------
postCtx :: Context String
postCtx =
dateField "date" "%B %e, %Y" `mappend`
defaultContext | 178 | postCtx :: Context String
postCtx =
dateField "date" "%B %e, %Y" `mappend`
defaultContext | 97 | postCtx =
dateField "date" "%B %e, %Y" `mappend`
defaultContext | 71 | true | true | 1 | 6 | 21 | 31 | 14 | 17 | null | null |
AKST/tokenify | src/Text/Tokenify/DSL.hs | mit | -- | Creates a response which will ignore a regex
ignore :: Regex s -> Token s a
ignore r = (r, Response.Ignore) | 112 | ignore :: Regex s -> Token s a
ignore r = (r, Response.Ignore) | 62 | ignore r = (r, Response.Ignore) | 31 | true | true | 0 | 6 | 22 | 35 | 18 | 17 | null | null |
amccausl/Swish | Swish/HaskellRDF/N3ParserTest.hs | lgpl-2.1 | name01 = "name" | 18 | name01 = "name" | 18 | name01 = "name" | 18 | false | false | 0 | 4 | 5 | 6 | 3 | 3 | null | null |
DavidAlphaFox/ghc | utils/haddock/haddock-library/vendor/attoparsec-0.12.1.1/Data/Attoparsec/Combinator.hs | bsd-3-clause | -- | A version of 'liftM2' that is strict in the result of its first
-- action.
liftM2' :: (Monad m) => (a -> b -> c) -> m a -> m b -> m c
liftM2' f a b = do
!x <- a
y <- b
return (f x y)
| 194 | liftM2' :: (Monad m) => (a -> b -> c) -> m a -> m b -> m c
liftM2' f a b = do
!x <- a
y <- b
return (f x y)
| 114 | liftM2' f a b = do
!x <- a
y <- b
return (f x y)
| 55 | true | true | 0 | 10 | 58 | 94 | 44 | 50 | null | null |
TOSPIO/yi | src/library/Yi/Types.hs | gpl-2.0 | unsafeWithEditor :: Config -> MVar YiVar -> EditorM a -> IO a
unsafeWithEditor cfg r f = modifyMVar r $ \var -> do
let e = yiEditor var
let (e',a) = runEditor cfg f e
-- Make sure that the result of runEditor is evaluated before
-- replacing the editor state. Otherwise, we might replace e
-- with an exception... | 552 | unsafeWithEditor :: Config -> MVar YiVar -> EditorM a -> IO a
unsafeWithEditor cfg r f = modifyMVar r $ \var -> do
let e = yiEditor var
let (e',a) = runEditor cfg f e
-- Make sure that the result of runEditor is evaluated before
-- replacing the editor state. Otherwise, we might replace e
-- with an exception... | 552 | unsafeWithEditor cfg r f = modifyMVar r $ \var -> do
let e = yiEditor var
let (e',a) = runEditor cfg f e
-- Make sure that the result of runEditor is evaluated before
-- replacing the editor state. Otherwise, we might replace e
-- with an exception-producing thunk, which makes it impossible
-- to look at or... | 490 | false | true | 0 | 13 | 117 | 124 | 65 | 59 | null | null |
oldmanmike/ghc | compiler/deSugar/Coverage.hs | bsd-3-clause | addTickHsExpr (HsLet (L l binds) e) =
bindLocals (collectLocalBinders binds) $
liftM2 (HsLet . L l)
(addTickHsLocalBinds binds) -- to think about: !patterns.
(addTickLHsExprLetBody e) | 237 | addTickHsExpr (HsLet (L l binds) e) =
bindLocals (collectLocalBinders binds) $
liftM2 (HsLet . L l)
(addTickHsLocalBinds binds) -- to think about: !patterns.
(addTickLHsExprLetBody e) | 237 | addTickHsExpr (HsLet (L l binds) e) =
bindLocals (collectLocalBinders binds) $
liftM2 (HsLet . L l)
(addTickHsLocalBinds binds) -- to think about: !patterns.
(addTickLHsExprLetBody e) | 237 | false | false | 0 | 9 | 78 | 68 | 33 | 35 | null | null |
tismith/tlisp | write-yourself-a-scheme/listings/listing6.2.hs | mit | showVal :: LispVal -> String
showVal (String contents) = "\"" ++ contents ++ "\"" | 81 | showVal :: LispVal -> String
showVal (String contents) = "\"" ++ contents ++ "\"" | 81 | showVal (String contents) = "\"" ++ contents ++ "\"" | 52 | false | true | 0 | 7 | 13 | 32 | 16 | 16 | null | null |
geocurnoff/nikki | src/Sorts/Box.hs | lgpl-3.0 | -- Configuration
names =
("box-wood-small", 125) :
("box-wood-large", 360) : -- 370
[] | 99 | names =
("box-wood-small", 125) :
("box-wood-large", 360) : -- 370
[] | 81 | names =
("box-wood-small", 125) :
("box-wood-large", 360) : -- 370
[] | 81 | true | false | 1 | 7 | 25 | 33 | 18 | 15 | null | null |
DaMSL/K3 | examples/analysis/FusionHarness.hs | apache-2.0 | doPurity :: K3 Declaration -> K3 Declaration
doPurity p = let (np,e) = runConsolidatedAnalysis p
in runPurity e np | 127 | doPurity :: K3 Declaration -> K3 Declaration
doPurity p = let (np,e) = runConsolidatedAnalysis p
in runPurity e np | 127 | doPurity p = let (np,e) = runConsolidatedAnalysis p
in runPurity e np | 82 | false | true | 0 | 9 | 31 | 50 | 23 | 27 | null | null |
bitemyapp/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | vfInstance :: String
vfInstance = "instance" | 44 | vfInstance :: String
vfInstance = "instance" | 44 | vfInstance = "instance" | 23 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
swift-nav/libsbp | haskell/src/SwiftNav/SBP/Types.hs | lgpl-3.0 | checkCrc :: Msg -> Word16
checkCrc Msg {..} =
crc16 $ toLazyByteString $
word16LE _msgSBPType <>
word16LE _msgSBPSender <>
word8 _msgSBPLen <>
byteString _msgSBPPayload | 194 | checkCrc :: Msg -> Word16
checkCrc Msg {..} =
crc16 $ toLazyByteString $
word16LE _msgSBPType <>
word16LE _msgSBPSender <>
word8 _msgSBPLen <>
byteString _msgSBPPayload | 194 | checkCrc Msg {..} =
crc16 $ toLazyByteString $
word16LE _msgSBPType <>
word16LE _msgSBPSender <>
word8 _msgSBPLen <>
byteString _msgSBPPayload | 168 | false | true | 12 | 5 | 49 | 53 | 27 | 26 | null | null |
recursion-ninja/megaparsec | Text/Megaparsec.hs | bsd-2-clause | -- | Return both the result of a parse and the list of tokens that were
-- consumed during parsing. This relies on the change of the
-- 'stateTokensProcessed' value to evaluate how many tokens were consumed.
-- If you mess with it manually in the argument parser, prepare for
-- troubles.
--
-- @since 5.3.0
match :: Mo... | 829 | match :: MonadParsec e s m => m a -> m (Tokens s, a)
match p = do
tp <- getTokensProcessed
s <- getInput
r <- p
tp' <- getTokensProcessed
-- NOTE The 'fromJust' call here should never fail because if the stream
-- is empty before 'p' (the only case when 'takeN_' can return 'Nothing'
-- as per its inv... | 520 | match p = do
tp <- getTokensProcessed
s <- getInput
r <- p
tp' <- getTokensProcessed
-- NOTE The 'fromJust' call here should never fail because if the stream
-- is empty before 'p' (the only case when 'takeN_' can return 'Nothing'
-- as per its invariants), (tp' - tp) won't be greater than 0, and in ... | 467 | true | true | 0 | 13 | 179 | 121 | 64 | 57 | null | null |
pseudonom/phantheck | phantheck/src/GHC/Type/Test/Plugin.hs | gpl-3.0 | -- If we get a success and a failure, it's nonsensical
initialize :: FilePath -> TcPluginM (TyCons, Mode)
initialize testFile = do
tyCons <- fromJustTyCons <$> getPhantheckConstructors
tcPluginIO (lookupEnv "PHANTHECK_IN_PROGRESS") >>= \case
Nothing -> do
fileBeingChecked <- unpackFS . srcSpanFile . tcl_... | 1,171 | initialize :: FilePath -> TcPluginM (TyCons, Mode)
initialize testFile = do
tyCons <- fromJustTyCons <$> getPhantheckConstructors
tcPluginIO (lookupEnv "PHANTHECK_IN_PROGRESS") >>= \case
Nothing -> do
fileBeingChecked <- unpackFS . srcSpanFile . tcl_loc . snd <$> getEnvs
tcPluginIO . defaultErrorHan... | 1,115 | initialize testFile = do
tyCons <- fromJustTyCons <$> getPhantheckConstructors
tcPluginIO (lookupEnv "PHANTHECK_IN_PROGRESS") >>= \case
Nothing -> do
fileBeingChecked <- unpackFS . srcSpanFile . tcl_loc . snd <$> getEnvs
tcPluginIO . defaultErrorHandler defaultFatalMessager defaultFlushOut . runGhcT... | 1,064 | true | true | 2 | 21 | 246 | 306 | 139 | 167 | null | null |
fatuhoku/haskell-ball-mosaic | src/Main.hs | mit | randomColorIO = do
let randGLdouble = randomIO >>= return . glflt
r <- randGLdouble
g <- randGLdouble
b <- randGLdouble
a <- randGLdouble
let a' = a/2
return $ Color4 r g b a'
-- Application entry point.
-- The withGlfw environment ensures that initialisation and termination of Glfw
-- is done.
-- Simila... | 535 | randomColorIO = do
let randGLdouble = randomIO >>= return . glflt
r <- randGLdouble
g <- randGLdouble
b <- randGLdouble
a <- randGLdouble
let a' = a/2
return $ Color4 r g b a'
-- Application entry point.
-- The withGlfw environment ensures that initialisation and termination of Glfw
-- is done.
-- Simila... | 535 | randomColorIO = do
let randGLdouble = randomIO >>= return . glflt
r <- randGLdouble
g <- randGLdouble
b <- randGLdouble
a <- randGLdouble
let a' = a/2
return $ Color4 r g b a'
-- Application entry point.
-- The withGlfw environment ensures that initialisation and termination of Glfw
-- is done.
-- Simila... | 535 | false | false | 0 | 11 | 103 | 87 | 43 | 44 | null | null |
sdiehl/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | -- Typeable KindReps for some common cases
starKindRepName, starArrStarKindRepName, starArrStarArrStarKindRepName :: Name
starKindRepName = varQual gHC_TYPES (fsLit "krep$*") starKindRepKey | 212 | starKindRepName, starArrStarKindRepName, starArrStarArrStarKindRepName :: Name
starKindRepName = varQual gHC_TYPES (fsLit "krep$*") starKindRepKey | 169 | starKindRepName = varQual gHC_TYPES (fsLit "krep$*") starKindRepKey | 90 | true | true | 0 | 7 | 41 | 29 | 17 | 12 | null | null |
modeswitch/barrelfish | hake/Main.hs | mit | resolveRelativePaths o (Rule tokens) root
= Rule [ resolveRelativePath o t root | t <- tokens ] | 99 | resolveRelativePaths o (Rule tokens) root
= Rule [ resolveRelativePath o t root | t <- tokens ] | 99 | resolveRelativePaths o (Rule tokens) root
= Rule [ resolveRelativePath o t root | t <- tokens ] | 99 | false | false | 0 | 8 | 20 | 40 | 19 | 21 | null | null |
unisonweb/platform | parser-typechecker/src/Unison/Runtime/Builtin.hs | mit | boxTo0 :: ForeignOp
boxTo0 = inBx arg result (TCon Ty.unitRef 0 [])
where
(arg, result) = fresh2
-- a -> b ->{E} () | 122 | boxTo0 :: ForeignOp
boxTo0 = inBx arg result (TCon Ty.unitRef 0 [])
where
(arg, result) = fresh2
-- a -> b ->{E} () | 122 | boxTo0 = inBx arg result (TCon Ty.unitRef 0 [])
where
(arg, result) = fresh2
-- a -> b ->{E} () | 102 | false | true | 0 | 8 | 29 | 48 | 25 | 23 | null | null |
vladimir-ipatov/ganeti | src/Ganeti/Hs2Py/OpDoc.hs | gpl-2.0 | opGroupVerifyDisks :: String
opGroupVerifyDisks =
"Verifies the status of all disks in a node group.\n\
\\n\
\ Result: a tuple of three elements:\n\
\ - dict of node names with issues (values: error msg)\n\
\ - list of instances with degraded disks (that should be activated)\n\
\ - dict of instances with mi... | 816 | opGroupVerifyDisks :: String
opGroupVerifyDisks =
"Verifies the status of all disks in a node group.\n\
\\n\
\ Result: a tuple of three elements:\n\
\ - dict of node names with issues (values: error msg)\n\
\ - list of instances with degraded disks (that should be activated)\n\
\ - dict of instances with mi... | 816 | opGroupVerifyDisks =
"Verifies the status of all disks in a node group.\n\
\\n\
\ Result: a tuple of three elements:\n\
\ - dict of node names with issues (values: error msg)\n\
\ - list of instances with degraded disks (that should be activated)\n\
\ - dict of instances with missing logical volumes (values... | 787 | false | true | 0 | 4 | 155 | 11 | 6 | 5 | null | null |
blajzer/dispatch | Language/Dispatch/Parser.hs | bsd-3-clause | parseSymbol :: GenParser Char st A.Param
parseSymbol =
do symbol <- identifier
return $ translateSymbols $ A.Symbol symbol | 134 | parseSymbol :: GenParser Char st A.Param
parseSymbol =
do symbol <- identifier
return $ translateSymbols $ A.Symbol symbol | 134 | parseSymbol =
do symbol <- identifier
return $ translateSymbols $ A.Symbol symbol | 93 | false | true | 0 | 9 | 29 | 43 | 20 | 23 | null | null |
lukexi/stack | src/Stack/Setup.hs | bsd-3-clause | chunksOverTime :: (Monoid a, MonadIO m) => NominalDiffTime -> Conduit a m a
chunksOverTime diff = do
currentTime <- liftIO getCurrentTime
evalStateC (currentTime, mempty) go
where
-- State is a tuple of:
-- * the last time a yield happened (or the beginning of the sink)
-- * the accumulated awaits... | 750 | chunksOverTime :: (Monoid a, MonadIO m) => NominalDiffTime -> Conduit a m a
chunksOverTime diff = do
currentTime <- liftIO getCurrentTime
evalStateC (currentTime, mempty) go
where
-- State is a tuple of:
-- * the last time a yield happened (or the beginning of the sink)
-- * the accumulated awaits... | 750 | chunksOverTime diff = do
currentTime <- liftIO getCurrentTime
evalStateC (currentTime, mempty) go
where
-- State is a tuple of:
-- * the last time a yield happened (or the beginning of the sink)
-- * the accumulated awaits since the last yield
go = await >>= \case
Nothing -> do
(... | 674 | false | true | 0 | 14 | 232 | 200 | 99 | 101 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.