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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
bens/libmpd-haskell | src/Network/MPD/Applicative/Database.hs | lgpl-2.1 | listAllInfo :: Path -> Command [LsResult]
listAllInfo = lsInfo' "listallinfo" | 77 | listAllInfo :: Path -> Command [LsResult]
listAllInfo = lsInfo' "listallinfo" | 77 | listAllInfo = lsInfo' "listallinfo" | 35 | false | true | 0 | 8 | 9 | 30 | 13 | 17 | null | null |
joelburget/frankenstein | src/Planetary/Core/Typecheck.hs | bsd-3-clause | withPolyty :: Text -> PolytypeI -> TcM' a -> TcM' a
withPolyty name pty = local (& varTypes . at name ?~ Right pty) | 115 | withPolyty :: Text -> PolytypeI -> TcM' a -> TcM' a
withPolyty name pty = local (& varTypes . at name ?~ Right pty) | 115 | withPolyty name pty = local (& varTypes . at name ?~ Right pty) | 63 | false | true | 0 | 9 | 23 | 55 | 26 | 29 | null | null |
koba-e964/hayashii-mcc | zekamashi/Emit.hs | bsd-3-clause | emitTerm _ (TRet v) = do
sub <- emitSub Tail (SId v)
return $ sub ++ [Ret rtmp rlr] | 87 | emitTerm _ (TRet v) = do
sub <- emitSub Tail (SId v)
return $ sub ++ [Ret rtmp rlr] | 87 | emitTerm _ (TRet v) = do
sub <- emitSub Tail (SId v)
return $ sub ++ [Ret rtmp rlr] | 87 | false | false | 0 | 10 | 22 | 54 | 25 | 29 | null | null |
momomimachli/Hedsql | src/Database/Hedsql/Drivers/PostgreSQL/Constructor.hs | gpl-3.0 | -- Public.
{-|
DEFAULT instruction when used to insert a DEFAULT value.
For example:
> INSERT INTO films Values (DEFAULT, 'Bananas', 88, '1971-07-13', 'Comedy');
-}
default_ :: Value a PostgreSQL
default_ = DefaultVal | 218 | default_ :: Value a PostgreSQL
default_ = DefaultVal | 52 | default_ = DefaultVal | 21 | true | true | 0 | 5 | 33 | 18 | 10 | 8 | null | null |
dvolk/hoodie | Main.hs | gpl-3.0 | withReverse :: Update () -> Update ()
withReverse upact = do
setAttribute AttributeReverse True
upact
setAttribute AttributeReverse False | 143 | withReverse :: Update () -> Update ()
withReverse upact = do
setAttribute AttributeReverse True
upact
setAttribute AttributeReverse False | 143 | withReverse upact = do
setAttribute AttributeReverse True
upact
setAttribute AttributeReverse False | 105 | false | true | 0 | 8 | 23 | 51 | 21 | 30 | null | null |
juodaspaulius/clafer-old-customBNFC | src/Language/Clafer/Intermediate/Desugarer.hs | mit | desugarExp' :: Exp -> IExp
desugarExp' x = case x of
DeclAllDisj _ decl exp' ->
IDeclPExp IAll [desugarDecl True decl] (dpe exp')
DeclAll _ decl exp' -> IDeclPExp IAll [desugarDecl False decl] (dpe exp')
DeclQuantDisj _ quant' decl exp' ->
IDeclPExp (desugarQuant quant') [desugarDecl True decl] (dpe e... | 1,824 | desugarExp' :: Exp -> IExp
desugarExp' x = case x of
DeclAllDisj _ decl exp' ->
IDeclPExp IAll [desugarDecl True decl] (dpe exp')
DeclAll _ decl exp' -> IDeclPExp IAll [desugarDecl False decl] (dpe exp')
DeclQuantDisj _ quant' decl exp' ->
IDeclPExp (desugarQuant quant') [desugarDecl True decl] (dpe e... | 1,824 | desugarExp' x = case x of
DeclAllDisj _ decl exp' ->
IDeclPExp IAll [desugarDecl True decl] (dpe exp')
DeclAll _ decl exp' -> IDeclPExp IAll [desugarDecl False decl] (dpe exp')
DeclQuantDisj _ quant' decl exp' ->
IDeclPExp (desugarQuant quant') [desugarDecl True decl] (dpe exp')
DeclQuant _ quant' d... | 1,797 | false | true | 5 | 7 | 453 | 796 | 419 | 377 | null | null |
unisonweb/platform | parser-typechecker/src/Unison/Codebase/Watch.hs | mit | untilJust :: Monad m => m (Maybe a) -> m a
untilJust act = act >>= maybe (untilJust act) return | 95 | untilJust :: Monad m => m (Maybe a) -> m a
untilJust act = act >>= maybe (untilJust act) return | 95 | untilJust act = act >>= maybe (untilJust act) return | 52 | false | true | 0 | 9 | 19 | 52 | 24 | 28 | null | null |
fmthoma/ghc | compiler/coreSyn/MkCore.hs | bsd-3-clause | wrapFloat :: FloatBind -> CoreExpr -> CoreExpr
wrapFloat (FloatLet defns) body = Let defns body | 101 | wrapFloat :: FloatBind -> CoreExpr -> CoreExpr
wrapFloat (FloatLet defns) body = Let defns body | 101 | wrapFloat (FloatLet defns) body = Let defns body | 54 | false | true | 0 | 10 | 20 | 40 | 18 | 22 | null | null |
I3ck/H2D | src/Path2D.hs | lgpl-3.0 | removeCloserTo :: Path2D -> Vec2D -> Double -> Path2D
removeCloserTo [] _ _ = [] | 83 | removeCloserTo :: Path2D -> Vec2D -> Double -> Path2D
removeCloserTo [] _ _ = [] | 83 | removeCloserTo [] _ _ = [] | 29 | false | true | 0 | 7 | 17 | 34 | 17 | 17 | null | null |
oldmanmike/ghc | compiler/prelude/TysWiredIn.hs | bsd-3-clause | mkTupleTy Boxed tys = mkTyConApp (tupleTyCon Boxed (length tys)) tys | 71 | mkTupleTy Boxed tys = mkTyConApp (tupleTyCon Boxed (length tys)) tys | 71 | mkTupleTy Boxed tys = mkTyConApp (tupleTyCon Boxed (length tys)) tys | 71 | false | false | 1 | 9 | 12 | 35 | 14 | 21 | null | null |
wjzz/GoStat | src/Server.hs | bsd-3-clause | rebuildUrlMaker :: Language -> String
rebuildUrlMaker lang = printf "/rebuild?lang=%s" lang | 91 | rebuildUrlMaker :: Language -> String
rebuildUrlMaker lang = printf "/rebuild?lang=%s" lang | 91 | rebuildUrlMaker lang = printf "/rebuild?lang=%s" lang | 53 | false | true | 0 | 5 | 10 | 23 | 11 | 12 | null | null |
UweSchmidt/ppl2 | src/PPL2.hs | mit | subi e1 e2 = expr2 # ("subi", (e1, e2)) | 39 | subi e1 e2 = expr2 # ("subi", (e1, e2)) | 39 | subi e1 e2 = expr2 # ("subi", (e1, e2)) | 39 | false | false | 0 | 7 | 8 | 27 | 15 | 12 | null | null |
leshchevds/ganeti | src/Ganeti/HTools/Dedicated.hs | bsd-2-clause | -- | Given the test instances and an instance to be placed, compute
-- the lost allocations metrics for that node, together with the
-- modified node. Return Bad if it is not possible to place the
-- instance on that node.
lostAllocationsMetric :: Alg.AlgorithmOptions
-> [Instance.Instance]
... | 801 | lostAllocationsMetric :: Alg.AlgorithmOptions
-> [Instance.Instance]
-> Instance.Instance
-> Node.Node
-> T.OpResult (Metric, Node.Node)
lostAllocationsMetric opts insts inst node = do
let allocVec = allocationVector insts
b... | 578 | lostAllocationsMetric opts insts inst node = do
let allocVec = allocationVector insts
before = allocVec node
force = Alg.algIgnoreSoftErrors opts
node' <- Node.addPriEx force node inst
let after = allocVec node'
disk = Node.fDsk node'
return ((zipWith (-) before after, disk), node')
-- | Allo... | 353 | true | true | 0 | 11 | 220 | 160 | 82 | 78 | null | null |
Sokal21/GoblinBurner | src/Mannager.hs | bsd-3-clause | length' :: [a] -> Integer
length' [] = 0 | 40 | length' :: [a] -> Integer
length' [] = 0 | 40 | length' [] = 0 | 14 | false | true | 0 | 6 | 8 | 27 | 13 | 14 | null | null |
DougBurke/swish | tests/VarBindingTest.hs | lgpl-2.1 | vbab :: VarBinding String Int
vbab = makeVarBinding [("a",1),("b",2)] | 72 | vbab :: VarBinding String Int
vbab = makeVarBinding [("a",1),("b",2)] | 72 | vbab = makeVarBinding [("a",1),("b",2)] | 42 | false | true | 0 | 7 | 11 | 37 | 21 | 16 | null | null |
termite2/tsl | Abstract/ACFA2HAST.hs | bsd-3-clause | compileFormulaLoc (FEq av1 av2) = H.EqVar (getAbsVar av1) (getAbsVar av2) | 80 | compileFormulaLoc (FEq av1 av2) = H.EqVar (getAbsVar av1) (getAbsVar av2) | 80 | compileFormulaLoc (FEq av1 av2) = H.EqVar (getAbsVar av1) (getAbsVar av2) | 80 | false | false | 0 | 7 | 16 | 36 | 17 | 19 | null | null |
UBMLtonGroup/timberc | src/Core.hs | bsd-3-clause | monoRestrict _ _ (ETempl _ _ _ _) = False | 41 | monoRestrict _ _ (ETempl _ _ _ _) = False | 41 | monoRestrict _ _ (ETempl _ _ _ _) = False | 41 | false | false | 1 | 6 | 9 | 26 | 11 | 15 | null | null |
ssaavedra/liquidhaskell | src/Language/Haskell/Liquid/Types/RefType.hs | bsd-3-clause | subsFree _ _ _ t@(RExprArg _)
= t | 35 | subsFree _ _ _ t@(RExprArg _)
= t | 35 | subsFree _ _ _ t@(RExprArg _)
= t | 35 | false | false | 2 | 7 | 9 | 28 | 11 | 17 | null | null |
ekalosak/haskell-practice | Pr46.hs | lgpl-3.0 | table :: (Bool -> Bool -> Bool) -> IO()
table f = mapM_ putStrLn [show(fst x) ++ " " ++ show(snd x) ++ " " ++
show(f (fst x) (snd x)) | x <- lcs] | 150 | table :: (Bool -> Bool -> Bool) -> IO()
table f = mapM_ putStrLn [show(fst x) ++ " " ++ show(snd x) ++ " " ++
show(f (fst x) (snd x)) | x <- lcs] | 150 | table f = mapM_ putStrLn [show(fst x) ++ " " ++ show(snd x) ++ " " ++
show(f (fst x) (snd x)) | x <- lcs] | 110 | false | true | 0 | 13 | 39 | 107 | 52 | 55 | null | null |
heathweiss/Tricad | src/Tests/MathPolarTest.hs | gpl-2.0 | {-
createCornerPointTestR10PosX0PosY0XY10 = TestCase $ assertEqual
"createCornerPointTestR10PosX0PosY0XY10 this is the first non-exhaust failure"
( F4 ( Point 1.7364817766693033 (-9.84807753012208) 0 ))
(createCornerPoint
(F4)
(Point{x_axis=0, y_axis=0, z_axis=0})
(Radius 10)
(adjustRadiusFor... | 1,147 | createCornerPointTestR10PosX0PosY0XY10 = TestCase $ assertEqual
"createCornerPointTestR10PosX0PosY0XY10 this is the first non-exhaust failure"
( F4 ( Point 1.7364817766693033 (-9.84807753012208) 0 ))
(createCornerPoint
(F4)
(Point{x_axis=0, y_axis=0, z_axis=0})
(Radius 10)
--(adjustRadiusForSlo... | 580 | createCornerPointTestR10PosX0PosY0XY10 = TestCase $ assertEqual
"createCornerPointTestR10PosX0PosY0XY10 this is the first non-exhaust failure"
( F4 ( Point 1.7364817766693033 (-9.84807753012208) 0 ))
(createCornerPoint
(F4)
(Point{x_axis=0, y_axis=0, z_axis=0})
(Radius 10)
--(adjustRadiusForSlo... | 580 | true | false | 0 | 10 | 184 | 111 | 61 | 50 | null | null |
Teaspot-Studio/GPipe-Core | src/Graphics/GPipe/Internal/Format.hs | mit | getGlInternalFormat R32UI = GL_R32UI | 36 | getGlInternalFormat R32UI = GL_R32UI | 36 | getGlInternalFormat R32UI = GL_R32UI | 36 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
sebastiaanvisser/frp-js | src/Browser/Element.hs | bsd-3-clause | getElem Document = "document" | 29 | getElem Document = "document" | 29 | getElem Document = "document" | 29 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
ganeti-github-testing/ganeti-test-1 | src/Ganeti/Constants.hs | bsd-2-clause | hvMemPath :: String
hvMemPath = "mem_path" | 42 | hvMemPath :: String
hvMemPath = "mem_path" | 42 | hvMemPath = "mem_path" | 22 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
andreasfrom/minerunner | main.hs | mit | pointInCircle :: Point -> Point -> Float -> Bool
pointInCircle p c r = dist p c <= r | 84 | pointInCircle :: Point -> Point -> Float -> Bool
pointInCircle p c r = dist p c <= r | 84 | pointInCircle p c r = dist p c <= r | 35 | false | true | 0 | 9 | 18 | 45 | 20 | 25 | null | null |
sebassimoes/haskell-bayesian | src/Bayesian/BayesianNetwork.hs | bsd-3-clause | variable :: String -> Domain -> BNBuilder Variable
variable label domain =
return $ createVariable label domain | 113 | variable :: String -> Domain -> BNBuilder Variable
variable label domain =
return $ createVariable label domain | 113 | variable label domain =
return $ createVariable label domain | 62 | false | true | 0 | 7 | 18 | 36 | 17 | 19 | null | null |
haru2036/nagato | samples/tester.hs | apache-2.0 | loadClassStrings :: [String] -> IO [String]
loadClassStrings settingFiles = do
if length settingFiles == 1
then do
str <- NagatoIO.loadPlainText $ head settingFiles
return [str]
else do
str <- NagatoIO.loadPlainText $ head settingFiles
deepStrs <- loadClassStrings $ drop 1 settingFiles... | 350 | loadClassStrings :: [String] -> IO [String]
loadClassStrings settingFiles = do
if length settingFiles == 1
then do
str <- NagatoIO.loadPlainText $ head settingFiles
return [str]
else do
str <- NagatoIO.loadPlainText $ head settingFiles
deepStrs <- loadClassStrings $ drop 1 settingFiles... | 350 | loadClassStrings settingFiles = do
if length settingFiles == 1
then do
str <- NagatoIO.loadPlainText $ head settingFiles
return [str]
else do
str <- NagatoIO.loadPlainText $ head settingFiles
deepStrs <- loadClassStrings $ drop 1 settingFiles
return $ str : deepStrs | 306 | false | true | 0 | 12 | 84 | 113 | 53 | 60 | null | null |
joozek78/stack | src/Stack/SDist.hs | bsd-3-clause | normalizePath :: FilePath -> (Maybe FilePath)
normalizePath = fmap FP.joinPath . go . FP.splitDirectories . FP.normalise
where
go [] = Just []
go ("..":_) = Nothing
go (_:"..":xs) = go xs
go (x:xs) = (x :) <$> go xs | 233 | normalizePath :: FilePath -> (Maybe FilePath)
normalizePath = fmap FP.joinPath . go . FP.splitDirectories . FP.normalise
where
go [] = Just []
go ("..":_) = Nothing
go (_:"..":xs) = go xs
go (x:xs) = (x :) <$> go xs | 233 | normalizePath = fmap FP.joinPath . go . FP.splitDirectories . FP.normalise
where
go [] = Just []
go ("..":_) = Nothing
go (_:"..":xs) = go xs
go (x:xs) = (x :) <$> go xs | 187 | false | true | 3 | 9 | 56 | 121 | 62 | 59 | null | null |
mcmaniac/ghc | compiler/cmm/CmmType.hs | bsd-3-clause | widthInBits :: Width -> Int
widthInBits W8 = 8 | 48 | widthInBits :: Width -> Int
widthInBits W8 = 8 | 48 | widthInBits W8 = 8 | 20 | false | true | 0 | 7 | 10 | 24 | 10 | 14 | null | null |
swamp-agr/carbuyer-advisor | fay/Widget.hs | mit | processMultipleGens _ t = do
-- get message for generation to be friendly for user
showById "generation-help"
v <- generationMessage
elem <- getElementById "generation-help-msg"
setInner elem v
-- hiding budget widget and showing generation widget
enableById "generation"
showById "generation-container"... | 501 | processMultipleGens _ t = do
-- get message for generation to be friendly for user
showById "generation-help"
v <- generationMessage
elem <- getElementById "generation-help-msg"
setInner elem v
-- hiding budget widget and showing generation widget
enableById "generation"
showById "generation-container"... | 501 | processMultipleGens _ t = do
-- get message for generation to be friendly for user
showById "generation-help"
v <- generationMessage
elem <- getElementById "generation-help-msg"
setInner elem v
-- hiding budget widget and showing generation widget
enableById "generation"
showById "generation-container"... | 501 | false | false | 0 | 9 | 78 | 105 | 45 | 60 | null | null |
bertdouglas/euler-haskell | 001-050/11a.hs | mit | grid =
["08 02 22 97 38 15 00 40 00 75 04 05 07 78 52 12 50 77 91 08 "
,"49 49 99 40 17 81 18 57 60 87 17 40 98 43 69 48 04 56 62 00 "
,"81 49 31 73 55 79 14 29 93 71 40 67 53 88 30 03 49 13 36 65 "
,"52 70 95 23 04 60 11 42 69 24 68 56 01 32 56 71 37 02 36 91 "
,"22 31 16 71 51 67 63 89 41 92 36 54 22 40 40 ... | 1,330 | grid =
["08 02 22 97 38 15 00 40 00 75 04 05 07 78 52 12 50 77 91 08 "
,"49 49 99 40 17 81 18 57 60 87 17 40 98 43 69 48 04 56 62 00 "
,"81 49 31 73 55 79 14 29 93 71 40 67 53 88 30 03 49 13 36 65 "
,"52 70 95 23 04 60 11 42 69 24 68 56 01 32 56 71 37 02 36 91 "
,"22 31 16 71 51 67 63 89 41 92 36 54 22 40 40 ... | 1,330 | grid =
["08 02 22 97 38 15 00 40 00 75 04 05 07 78 52 12 50 77 91 08 "
,"49 49 99 40 17 81 18 57 60 87 17 40 98 43 69 48 04 56 62 00 "
,"81 49 31 73 55 79 14 29 93 71 40 67 53 88 30 03 49 13 36 65 "
,"52 70 95 23 04 60 11 42 69 24 68 56 01 32 56 71 37 02 36 91 "
,"22 31 16 71 51 67 63 89 41 92 36 54 22 40 40 ... | 1,330 | false | false | 1 | 5 | 464 | 69 | 43 | 26 | null | null |
themoritz/cabal | cabal-install/Distribution/Client/Sandbox/PackageEnvironment.hs | bsd-3-clause | commonPackageEnvironmentConfig :: FilePath -> SavedConfig
commonPackageEnvironmentConfig sandboxDir =
mempty {
savedConfigureFlags = mempty {
-- TODO: Currently, we follow cabal-dev and set 'user-install: False' in
-- the config file. In the future we may want to distinguish between
-- global... | 879 | commonPackageEnvironmentConfig :: FilePath -> SavedConfig
commonPackageEnvironmentConfig sandboxDir =
mempty {
savedConfigureFlags = mempty {
-- TODO: Currently, we follow cabal-dev and set 'user-install: False' in
-- the config file. In the future we may want to distinguish between
-- global... | 879 | commonPackageEnvironmentConfig sandboxDir =
mempty {
savedConfigureFlags = mempty {
-- TODO: Currently, we follow cabal-dev and set 'user-install: False' in
-- the config file. In the future we may want to distinguish between
-- global, sandbox and user install types.
configUserInstall... | 821 | false | true | 1 | 10 | 197 | 116 | 65 | 51 | null | null |
cartazio/omega | src/Parser/ParseToken.hs | bsd-3-clause | heReservedNames
| caseSensitive tokenDef = sortedNames
| otherwise = map (map toLower) sortedNames
where
sortedNames = sort (reservedNames tokenDef)
--------------------------------------------
-- Haskell style combinators
| 260 | theReservedNames
| caseSensitive tokenDef = sortedNames
| otherwise = map (map toLower) sortedNames
where
sortedNames = sort (reservedNames tokenDef)
--------------------------------------------
-- Haskell style combinators | 260 | theReservedNames
| caseSensitive tokenDef = sortedNames
| otherwise = map (map toLower) sortedNames
where
sortedNames = sort (reservedNames tokenDef)
--------------------------------------------
-- Haskell style combinators | 260 | false | false | 2 | 7 | 61 | 51 | 25 | 26 | null | null |
nushio3/ghc | libraries/base/GHC/Exts.hs | bsd-3-clause | groupWith :: Ord b => (a -> b) -> [a] -> [[a]]
groupWith f xs = build (\c n -> groupByFB c n (\x y -> f x == f y) (sortWith f xs)) | 130 | groupWith :: Ord b => (a -> b) -> [a] -> [[a]]
groupWith f xs = build (\c n -> groupByFB c n (\x y -> f x == f y) (sortWith f xs)) | 130 | groupWith f xs = build (\c n -> groupByFB c n (\x y -> f x == f y) (sortWith f xs)) | 83 | false | true | 0 | 12 | 33 | 103 | 51 | 52 | null | null |
FranklinChen/Idris-dev | src/Idris/AbsSyntaxTree.hs | bsd-3-clause | -- | Get pretty printing options from the big options record.
ppOption :: IOption -> PPOption
ppOption opt = PPOption {
ppopt_impl = opt_showimp opt
, ppopt_pinames = False
, ppopt_depth = opt_printdepth opt
, ppopt_desugarnats = opt_desugarnats opt
} | 263 | ppOption :: IOption -> PPOption
ppOption opt = PPOption {
ppopt_impl = opt_showimp opt
, ppopt_pinames = False
, ppopt_depth = opt_printdepth opt
, ppopt_desugarnats = opt_desugarnats opt
} | 201 | ppOption opt = PPOption {
ppopt_impl = opt_showimp opt
, ppopt_pinames = False
, ppopt_depth = opt_printdepth opt
, ppopt_desugarnats = opt_desugarnats opt
} | 169 | true | true | 0 | 7 | 51 | 54 | 30 | 24 | null | null |
tjhunter/karps | haskell/src/Spark/Core/Internal/PathsUntyped.hs | apache-2.0 | _cleanEdges (h : t) =
let vid = vertexId (veEndVertex h)
others = [ve | ve <- t, (vertexId . veEndVertex $ ve) /= vid]
sames = [ve | ve <- t, (vertexId . veEndVertex $ ve) == vid]
rest = _cleanEdges others
e = veEdge h
-- If there multiple edges between nodes, they are dropped.
-- ... | 940 | _cleanEdges (h : t) =
let vid = vertexId (veEndVertex h)
others = [ve | ve <- t, (vertexId . veEndVertex $ ve) /= vid]
sames = [ve | ve <- t, (vertexId . veEndVertex $ ve) == vid]
rest = _cleanEdges others
e = veEdge h
-- If there multiple edges between nodes, they are dropped.
-- ... | 940 | _cleanEdges (h : t) =
let vid = vertexId (veEndVertex h)
others = [ve | ve <- t, (vertexId . veEndVertex $ ve) /= vid]
sames = [ve | ve <- t, (vertexId . veEndVertex $ ve) == vid]
rest = _cleanEdges others
e = veEdge h
-- If there multiple edges between nodes, they are dropped.
-- ... | 940 | false | false | 0 | 17 | 265 | 303 | 158 | 145 | null | null |
MateVM/harpy | Harpy/X86CodeGen.hs | gpl-2.0 | x86_alu_reg8_reg8 opc dreg reg is_dreg_h is_reg_h =
do emit8 ((opc `shiftL` 3) + 2)
x86_reg8_emit dreg reg is_dreg_h is_reg_h | 136 | x86_alu_reg8_reg8 opc dreg reg is_dreg_h is_reg_h =
do emit8 ((opc `shiftL` 3) + 2)
x86_reg8_emit dreg reg is_dreg_h is_reg_h | 136 | x86_alu_reg8_reg8 opc dreg reg is_dreg_h is_reg_h =
do emit8 ((opc `shiftL` 3) + 2)
x86_reg8_emit dreg reg is_dreg_h is_reg_h | 136 | false | false | 0 | 11 | 29 | 51 | 25 | 26 | null | null |
dermesser/Yadoku | Sudoku.hs | mit | ---------------------------
-- Example entry function
---------------------------
iosolve :: Sudoku -> IO ()
iosolve s = do
let sys = solve s
case sys of
Left e -> putStrLn "" >> putStrLn e >> putStrLn (toString s)
Right m -> putStrLn . toString $ ... | 485 | iosolve :: Sudoku -> IO ()
iosolve s = do
let sys = solve s
case sys of
Left e -> putStrLn "" >> putStrLn e >> putStrLn (toString s)
Right m -> putStrLn . toString $ m
---------------------------------------
-- Deterministic (one-result) solver
--... | 403 | iosolve s = do
let sys = solve s
case sys of
Left e -> putStrLn "" >> putStrLn e >> putStrLn (toString s)
Right m -> putStrLn . toString $ m
---------------------------------------
-- Deterministic (one-result) solver
-----------------------------... | 376 | true | true | 1 | 16 | 130 | 99 | 48 | 51 | null | null |
prl-tokyo/bigul-configuration-adaptation | Transformations/src/Generics/BiGUL/Interpreter.hs | mit | -- for a list of unmatched view, create a source list.
createSourceList :: MonadError' ErrorInfo m => [v] -> (v -> m s) -> (s -> m Bool) -> (s -> v -> m s) -> (s -> v -> m Bool) -> m [s]
createSourceList [] create p elemPut matchCond = return [] | 250 | createSourceList :: MonadError' ErrorInfo m => [v] -> (v -> m s) -> (s -> m Bool) -> (s -> v -> m s) -> (s -> v -> m Bool) -> m [s]
createSourceList [] create p elemPut matchCond = return [] | 195 | createSourceList [] create p elemPut matchCond = return [] | 63 | true | true | 0 | 14 | 58 | 116 | 58 | 58 | null | null |
brendanhay/gogol | gogol-binaryauthorization/gen/Network/Google/BinaryAuthorization/Types/Product.hs | mpl-2.0 | -- | Creates a value of 'IAMPolicy' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ipEtag'
--
-- * 'ipVersion'
--
-- * 'ipBindings'
iamPolicy
:: IAMPolicy
iamPolicy =
IAMPolicy' {_ipEtag = Nothing, _ipVersion = Nothing, _ipBind... | 335 | iamPolicy
:: IAMPolicy
iamPolicy =
IAMPolicy' {_ipEtag = Nothing, _ipVersion = Nothing, _ipBindings = Nothing} | 116 | iamPolicy =
IAMPolicy' {_ipEtag = Nothing, _ipVersion = Nothing, _ipBindings = Nothing} | 89 | true | true | 0 | 6 | 62 | 40 | 28 | 12 | null | null |
rahulmutt/ghcvm | compiler/Eta/Prelude/PrimOp.hs | bsd-3-clause | primOpCanFail ReadByteArrayOp_WideChar = True | 45 | primOpCanFail ReadByteArrayOp_WideChar = True | 45 | primOpCanFail ReadByteArrayOp_WideChar = True | 45 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
dmagyar/scurry | src/Scurry/State.hs | bsd-3-clause | getMAC :: StateRef -> IO (Maybe MACAddr)
getMAC = extract (peerMAC . scurryMyRecord) | 84 | getMAC :: StateRef -> IO (Maybe MACAddr)
getMAC = extract (peerMAC . scurryMyRecord) | 84 | getMAC = extract (peerMAC . scurryMyRecord) | 43 | false | true | 0 | 9 | 12 | 39 | 18 | 21 | null | null |
ekmett/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs | lgpl-2.1 | wxPAPER_15X11 :: Int
wxPAPER_15X11 = 46 | 39 | wxPAPER_15X11 :: Int
wxPAPER_15X11 = 46 | 39 | wxPAPER_15X11 = 46 | 18 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
triplepointfive/cereal | tests/Benchmark.hs | bsd-3-clause | putWord64N16Big = loop 0
where loop s n | s `seq` n `seq` False = undefined
loop _ 0 = return ()
loop s n = do
putWord64be (s+0)
putWord64be (s+1)
putWord64be (s+2)
putWord64be (s+3)
putWord64be (s+4)
putWord64be (s+5)
putWord64be (... | 685 | putWord64N16Big = loop 0
where loop s n | s `seq` n `seq` False = undefined
loop _ 0 = return ()
loop s n = do
putWord64be (s+0)
putWord64be (s+1)
putWord64be (s+2)
putWord64be (s+3)
putWord64be (s+4)
putWord64be (s+5)
putWord64be (... | 685 | putWord64N16Big = loop 0
where loop s n | s `seq` n `seq` False = undefined
loop _ 0 = return ()
loop s n = do
putWord64be (s+0)
putWord64be (s+1)
putWord64be (s+2)
putWord64be (s+3)
putWord64be (s+4)
putWord64be (s+5)
putWord64be (... | 685 | false | false | 3 | 10 | 251 | 308 | 141 | 167 | null | null |
hanshoglund/hsconf | test/ReaderI.hs | bsd-3-clause | -- {{{1 iniParser
-- TBD
-- {{{1 buildConfig
-- TBD
allTests = $(testGroupGenerator) | 86 | allTests = $(testGroupGenerator) | 32 | allTests = $(testGroupGenerator) | 32 | true | false | 0 | 6 | 14 | 14 | 9 | 5 | null | null |
faylang/fay-jquery | src/JQuery.hs | bsd-3-clause | target :: Event -> Fay Element
target = ffi "%1['target']" | 58 | target :: Event -> Fay Element
target = ffi "%1['target']" | 58 | target = ffi "%1['target']" | 27 | false | true | 0 | 7 | 9 | 27 | 11 | 16 | null | null |
jyp/inox | LLVM.hs | gpl-3.0 | cocompile :: LL (String, Type) (String, Type) → C
cocompile t0 = case t0 of
Ax x y -> stmt (dcl' x <> "= add " <> var' y <> ", 0")
Par z x t' y u' ->
cocompile t' <>
cocompile u' <>
tmp z "zero" ~=~ "insertvalue " <> dualTypOf z <> " undef, " <> coVar' x <> ", 0\n" <>
dcl' z ~=~ "insertvalue " <> d... | 2,457 | cocompile :: LL (String, Type) (String, Type) → C
cocompile t0 = case t0 of
Ax x y -> stmt (dcl' x <> "= add " <> var' y <> ", 0")
Par z x t' y u' ->
cocompile t' <>
cocompile u' <>
tmp z "zero" ~=~ "insertvalue " <> dualTypOf z <> " undef, " <> coVar' x <> ", 0\n" <>
dcl' z ~=~ "insertvalue " <> d... | 2,457 | cocompile t0 = case t0 of
Ax x y -> stmt (dcl' x <> "= add " <> var' y <> ", 0")
Par z x t' y u' ->
cocompile t' <>
cocompile u' <>
tmp z "zero" ~=~ "insertvalue " <> dualTypOf z <> " undef, " <> coVar' x <> ", 0\n" <>
dcl' z ~=~ "insertvalue " <> dualTypOf z <> " " <> tmp z "zero" <> ", " <> coVa... | 2,407 | false | true | 0 | 29 | 898 | 876 | 431 | 445 | null | null |
TomMD/ghc | compiler/rename/RnTypes.hs | bsd-3-clause | extract_mb f (Just x) acc = f x acc | 35 | extract_mb f (Just x) acc = f x acc | 35 | extract_mb f (Just x) acc = f x acc | 35 | false | false | 0 | 7 | 8 | 24 | 11 | 13 | null | null |
phaazon/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/Tokens.hs | bsd-3-clause | gl_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 :: GLenum
gl_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 0x9277 | 108 | gl_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 :: GLenum
gl_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 0x9277 | 108 | gl_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 0x9277 | 53 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
geophf/1HaskellADay | exercises/HAD/Y2018/M01/D30/Solution.hs | mit | {--
Hint for megapacket. The idea here to to create a packet that fully covers the
articles/blocks found in NEW and UPDATED meaningfully.
So, rows can certainly be populated with the NEW articles but we also cannot
lose sight of the UPDATED articles. Also, what are meaningful values for count,
total, next, and prev?
... | 914 | main' :: [String] -> IO ()
main' [] = errmsg | 48 | main' [] = errmsg | 21 | true | true | 0 | 7 | 162 | 30 | 16 | 14 | null | null |
nomeata/nofib-analyse | Main.hs | bsd-3-clause | gc1time_spec = SpecP "GC(1) Time" "GC1Time" "gc1-time" (mean gc1_time) run_status mean_time_ok | 95 | gc1time_spec = SpecP "GC(1) Time" "GC1Time" "gc1-time" (mean gc1_time) run_status mean_time_ok | 95 | gc1time_spec = SpecP "GC(1) Time" "GC1Time" "gc1-time" (mean gc1_time) run_status mean_time_ok | 95 | false | false | 0 | 7 | 11 | 25 | 12 | 13 | null | null |
ejlilley/AbstractMusic | LilyParse.hs | gpl-3.0 | toLilyNoteName "aisis" = L_AISIS | 32 | toLilyNoteName "aisis" = L_AISIS | 32 | toLilyNoteName "aisis" = L_AISIS | 32 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
coffeecup-winner/gvty | Gvty/Graphics.hs | bsd-3-clause | sphere :: IORef GraphicsCache -> IO ()
sphere cache = renderPrimitive TriangleStrip $
mapM_ vertex =<< memoized cache spheresCache (\(n, m, k) -> spherePoints n m k) (32, 0.2, 3) | 184 | sphere :: IORef GraphicsCache -> IO ()
sphere cache = renderPrimitive TriangleStrip $
mapM_ vertex =<< memoized cache spheresCache (\(n, m, k) -> spherePoints n m k) (32, 0.2, 3) | 183 | sphere cache = renderPrimitive TriangleStrip $
mapM_ vertex =<< memoized cache spheresCache (\(n, m, k) -> spherePoints n m k) (32, 0.2, 3) | 144 | false | true | 0 | 9 | 35 | 82 | 42 | 40 | null | null |
Potregon/while | src/Interface/TAC.hs | gpl-3.0 | renameVariables (METHOD v1 d1 d2) vI vO =
let (Variable v1':d1':d2') = substitute ([Variable v1, d1]++d2) vI vO
in METHOD v1' d1' d2' | 137 | renameVariables (METHOD v1 d1 d2) vI vO =
let (Variable v1':d1':d2') = substitute ([Variable v1, d1]++d2) vI vO
in METHOD v1' d1' d2' | 137 | renameVariables (METHOD v1 d1 d2) vI vO =
let (Variable v1':d1':d2') = substitute ([Variable v1, d1]++d2) vI vO
in METHOD v1' d1' d2' | 137 | false | false | 0 | 13 | 26 | 79 | 38 | 41 | null | null |
robeverest/accelerate | Data/Array/Accelerate/Internal/Check.hs | bsd-3-clause | check file line kind loc msg cond x
| not (doChecks kind) || cond = x
| otherwise = error file line kind loc msg | 116 | check file line kind loc msg cond x
| not (doChecks kind) || cond = x
| otherwise = error file line kind loc msg | 116 | check file line kind loc msg cond x
| not (doChecks kind) || cond = x
| otherwise = error file line kind loc msg | 116 | false | false | 1 | 11 | 28 | 59 | 27 | 32 | null | null |
databrary/databrary | src/Model/Identity/Types.hs | agpl-3.0 | identitySuperuserFor _ _ = False | 32 | identitySuperuserFor _ _ = False | 32 | identitySuperuserFor _ _ = False | 32 | false | false | 0 | 5 | 4 | 11 | 5 | 6 | null | null |
d0kt0r0/estuary | client/src/Estuary/Render/Renderer.hs | gpl-3.0 | earlyWakeUp :: NominalDiffTime
earlyWakeUp = 0.002 | 50 | earlyWakeUp :: NominalDiffTime
earlyWakeUp = 0.002 | 50 | earlyWakeUp = 0.002 | 19 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
craffit/flexdb | src/Data/Label/Util.hs | bsd-3-clause | (>-<) :: (a :> x) -> (b :> x) -> (a :><: b) x
(>-<) = Conj | 58 | (>-<) :: (a :> x) -> (b :> x) -> (a :><: b) x
(>-<) = Conj | 58 | (>-<) = Conj | 12 | false | true | 0 | 9 | 16 | 47 | 27 | 20 | null | null |
svenssonjoel/ObsidianGFX | Obsidian/CodeGen/CompileIM.hs | bsd-3-clause | compileType (Double) = [cty| double |] | 38 | compileType (Double) = [cty| double |] | 38 | compileType (Double) = [cty| double |] | 38 | false | false | 0 | 6 | 5 | 16 | 10 | 6 | null | null |
bovinespirit/enummapmap | Data/EnumMapMap/Base.hs | bsd-3-clause | traverseWithKey_ :: (Enum k, Applicative t) =>
(k -> a -> t b) -> EMM k a -> t (EMM k b)
traverseWithKey_ f = go
where
go Nil = pure Nil
go (Tip k v) = Tip k <$> f (toEnum k) v
go (Bin p m l r) = Bin p m <$> go l <*> go r | 263 | traverseWithKey_ :: (Enum k, Applicative t) =>
(k -> a -> t b) -> EMM k a -> t (EMM k b)
traverseWithKey_ f = go
where
go Nil = pure Nil
go (Tip k v) = Tip k <$> f (toEnum k) v
go (Bin p m l r) = Bin p m <$> go l <*> go r | 263 | traverseWithKey_ f = go
where
go Nil = pure Nil
go (Tip k v) = Tip k <$> f (toEnum k) v
go (Bin p m l r) = Bin p m <$> go l <*> go r | 154 | false | true | 1 | 11 | 101 | 163 | 74 | 89 | null | null |
ghc-android/ghc | testsuite/tests/ghci/should_run/ghcirun004.hs | bsd-3-clause | 280 = 279 | 9 | 280 = 279 | 9 | 280 = 279 | 9 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
BigEndian/tasks | tasks-cli/Tasks/Cli/Menus.hs | gpl-2.0 | tsksListSubmenuHandler :: Int -> [Action Task] -> IO [Action Task]
tsksListSubmenuHandler bidx (lact:oacts) =
-- lact represents the action chosen on the org menu by the user
case lact of
Quit t -> return oacts
Unmodified t -> return oacts
ALeft -> menuRun $ tsksListMenu' oacts (bid... | 454 | tsksListSubmenuHandler :: Int -> [Action Task] -> IO [Action Task]
tsksListSubmenuHandler bidx (lact:oacts) =
-- lact represents the action chosen on the org menu by the user
case lact of
Quit t -> return oacts
Unmodified t -> return oacts
ALeft -> menuRun $ tsksListMenu' oacts (bid... | 454 | tsksListSubmenuHandler bidx (lact:oacts) =
-- lact represents the action chosen on the org menu by the user
case lact of
Quit t -> return oacts
Unmodified t -> return oacts
ALeft -> menuRun $ tsksListMenu' oacts (bidx-10)
ARight -> menuRun $ tsksListMenu' oacts (bidx+10)... | 387 | false | true | 0 | 11 | 120 | 128 | 62 | 66 | null | null |
pithyless/hlean | hlean.hs | bsd-3-clause | interactMenu :: DB -> IO ()
interactMenu db =
do putStrLn $ "Total Found " ++ (show (M.size db)) ++ " duplicate sets."
putStrLn $ take 30 $ repeat '='
sorted <- sortFiles $ M.assocs db
if ((length sorted) == 0)
then return () -- quit
else do
putStr $ showUsage
... | 2,719 | interactMenu :: DB -> IO ()
interactMenu db =
do putStrLn $ "Total Found " ++ (show (M.size db)) ++ " duplicate sets."
putStrLn $ take 30 $ repeat '='
sorted <- sortFiles $ M.assocs db
if ((length sorted) == 0)
then return () -- quit
else do
putStr $ showUsage
... | 2,719 | interactMenu db =
do putStrLn $ "Total Found " ++ (show (M.size db)) ++ " duplicate sets."
putStrLn $ take 30 $ repeat '='
sorted <- sortFiles $ M.assocs db
if ((length sorted) == 0)
then return () -- quit
else do
putStr $ showUsage
res <- mapM (uncurry i... | 2,691 | false | true | 54 | 17 | 1,038 | 761 | 395 | 366 | null | null |
bos/wreq | tests/UnitTests.hs | bsd-3-clause | -- Tests that httpbin.org doesn't support.
localTests verb site = commonTestsWith verb site <> [
testCase "oauth2 Bearer" $ getOAuth2 verb "Bearer" oauth2Bearer site
, testCase "oauth2 token" $ getOAuth2 verb "token" oauth2Token site
] | 243 | localTests verb site = commonTestsWith verb site <> [
testCase "oauth2 Bearer" $ getOAuth2 verb "Bearer" oauth2Bearer site
, testCase "oauth2 token" $ getOAuth2 verb "token" oauth2Token site
] | 200 | localTests verb site = commonTestsWith verb site <> [
testCase "oauth2 Bearer" $ getOAuth2 verb "Bearer" oauth2Bearer site
, testCase "oauth2 token" $ getOAuth2 verb "token" oauth2Token site
] | 200 | true | false | 1 | 9 | 42 | 64 | 28 | 36 | null | null |
pxqr/tracy | src/Graphics/Tracy/V3.hs | mit | distance :: V3 -> V3 -> Double
distance v u = len (v - u) | 57 | distance :: V3 -> V3 -> Double
distance v u = len (v - u) | 57 | distance v u = len (v - u) | 26 | false | true | 0 | 8 | 14 | 40 | 18 | 22 | null | null |
TiloWiklund/pinot | src/Databricks.hs | bsd-3-clause | texInlineMath :: Delimiter
texInlineMath = ("$", "$") | 53 | texInlineMath :: Delimiter
texInlineMath = ("$", "$") | 53 | texInlineMath = ("$", "$") | 26 | false | true | 0 | 6 | 6 | 24 | 11 | 13 | null | null |
dysinger/amazonka | amazonka-swf/gen/Network/AWS/SWF/StartWorkflowExecution.hs | mpl-2.0 | -- | The task list to use for the decision tasks generated for this workflow
-- execution. This overrides the 'defaultTaskList' specified when registering the
-- workflow type.
--
-- A task list for this workflow execution must be specified either as a
-- default for the workflow type or through this parameter. If neit... | 827 | swe1TaskList :: Lens' StartWorkflowExecution (Maybe TaskList)
swe1TaskList = lens _swe1TaskList (\s a -> s { _swe1TaskList = a }) | 129 | swe1TaskList = lens _swe1TaskList (\s a -> s { _swe1TaskList = a }) | 67 | true | true | 1 | 9 | 138 | 61 | 35 | 26 | null | null |
mariefarrell/Hets | Maude/Maude2DG.hs | gpl-2.0 | tokenNode :: Token -> TokenInfoMap -> Node
tokenNode t m = n where
(n, _, _, _, _) = getProcInfo t m
{- | Data structure used to parse module expressions, it keeps:
The identifier of the module expression.
The map with the information associated with each module expression.
The morphism associated to the module expr... | 421 | tokenNode :: Token -> TokenInfoMap -> Node
tokenNode t m = n where
(n, _, _, _, _) = getProcInfo t m
{- | Data structure used to parse module expressions, it keeps:
The identifier of the module expression.
The map with the information associated with each module expression.
The morphism associated to the module expr... | 421 | tokenNode t m = n where
(n, _, _, _, _) = getProcInfo t m
{- | Data structure used to parse module expressions, it keeps:
The identifier of the module expression.
The map with the information associated with each module expression.
The morphism associated to the module expression.
The list of sorts parameterized in ... | 378 | false | true | 0 | 7 | 73 | 53 | 29 | 24 | null | null |
da-x/lamdu | bottlelib/Data/Vector/Vector2.hs | gpl-3.0 | curry :: (Vector2 a -> b) -> a -> a -> b
curry f x y = f (Vector2 x y) | 70 | curry :: (Vector2 a -> b) -> a -> a -> b
curry f x y = f (Vector2 x y) | 70 | curry f x y = f (Vector2 x y) | 29 | false | true | 0 | 9 | 20 | 56 | 26 | 30 | null | null |
brendanhay/gogol | gogol-file/gen/Network/Google/File/Types/Product.hs | mpl-2.0 | -- | Server-specified ETag for the instance resource to prevent simultaneous
-- updates from overwriting each other.
iEtag :: Lens' Instance (Maybe Text)
iEtag = lens _iEtag (\ s a -> s{_iEtag = a}) | 198 | iEtag :: Lens' Instance (Maybe Text)
iEtag = lens _iEtag (\ s a -> s{_iEtag = a}) | 81 | iEtag = lens _iEtag (\ s a -> s{_iEtag = a}) | 44 | true | true | 0 | 9 | 33 | 47 | 26 | 21 | null | null |
ryzhyk/cocoon | cocoon/NetKAT/NetKAT.hs | apache-2.0 | ppHeaderVal op (NKEthDst mac) = pp "ethDst" <+> pp op <+> ppMAC mac | 73 | ppHeaderVal op (NKEthDst mac) = pp "ethDst" <+> pp op <+> ppMAC mac | 73 | ppHeaderVal op (NKEthDst mac) = pp "ethDst" <+> pp op <+> ppMAC mac | 73 | false | false | 0 | 7 | 18 | 34 | 15 | 19 | null | null |
jepst/CloudHaskell | Remote/Channel.hs | bsd-3-clause | mergePortsRR :: (Serializable a) => [ReceivePort a] -> ProcessM (ReceivePort a)
mergePortsRR chns = do channelCheckPids chns
tv <- liftIO $ newTVarIO [(\node -> receiveChannelImpl node chn) | chn <- chns]
return $ ReceivePortRR tv | 276 | mergePortsRR :: (Serializable a) => [ReceivePort a] -> ProcessM (ReceivePort a)
mergePortsRR chns = do channelCheckPids chns
tv <- liftIO $ newTVarIO [(\node -> receiveChannelImpl node chn) | chn <- chns]
return $ ReceivePortRR tv | 276 | mergePortsRR chns = do channelCheckPids chns
tv <- liftIO $ newTVarIO [(\node -> receiveChannelImpl node chn) | chn <- chns]
return $ ReceivePortRR tv | 196 | false | true | 0 | 14 | 80 | 101 | 47 | 54 | null | null |
mainland/nikola | src/Data/Vector/CUDA/UnboxedForeign.hs | bsd-3-clause | headM = G.headM | 15 | headM = G.headM | 15 | headM = G.headM | 15 | false | false | 1 | 6 | 2 | 12 | 4 | 8 | null | null |
jwiegley/hnix | src/Nix/Render/Frame.hs | bsd-3-clause | renderExecFrame
:: (MonadReader e m, Has e Options, MonadFile m, MonadCitedThunks t f m)
=> NixLevel
-> ExecFrame t f m
-> m [Doc ann]
renderExecFrame level = \case
Assertion ann v ->
fmap (: [])
$ renderLocation ann
=<< ( (\d -> fillSep ["Assertion failed:", d])
<$> renderValue ... | 345 | renderExecFrame
:: (MonadReader e m, Has e Options, MonadFile m, MonadCitedThunks t f m)
=> NixLevel
-> ExecFrame t f m
-> m [Doc ann]
renderExecFrame level = \case
Assertion ann v ->
fmap (: [])
$ renderLocation ann
=<< ( (\d -> fillSep ["Assertion failed:", d])
<$> renderValue ... | 345 | renderExecFrame level = \case
Assertion ann v ->
fmap (: [])
$ renderLocation ann
=<< ( (\d -> fillSep ["Assertion failed:", d])
<$> renderValue level "" "" v
) | 202 | false | true | 0 | 15 | 103 | 144 | 71 | 73 | null | null |
skeskinen/neflEFortress | Utils.hs | mit | addDirI :: Dir -> Int -> Point -> Point
addDirI DUp i = _2 +~ i | 67 | addDirI :: Dir -> Int -> Point -> Point
addDirI DUp i = _2 +~ i | 67 | addDirI DUp i = _2 +~ i | 27 | false | true | 0 | 7 | 19 | 32 | 16 | 16 | null | null |
fcharlie/hgit | src/Git/Remote/Operations.hs | bsd-3-clause | -- PKT-LINE("want" SP obj-id SP capability-list LF)
-- PKT-LINE("want" SP obj-id LF)
createNegotiationRequest :: [String] -> [PacketLine] -> String
createNegotiationRequest capabilities = concatMap (++ "") . nub . map (pktLine . (++ "\n")) . foldl' (\acc e -> if null acc then first acc e else additional acc e) [] . wan... | 957 | createNegotiationRequest :: [String] -> [PacketLine] -> String
createNegotiationRequest capabilities = concatMap (++ "") . nub . map (pktLine . (++ "\n")) . foldl' (\acc e -> if null acc then first acc e else additional acc e) [] . wants . filter filterPeeledTags . filter filterRefs
where wants ... | 872 | createNegotiationRequest capabilities = concatMap (++ "") . nub . map (pktLine . (++ "\n")) . foldl' (\acc e -> if null acc then first acc e else additional acc e) [] . wants . filter filterPeeledTags . filter filterRefs
where wants = mapMaybe toObjId
first acc... | 809 | true | true | 4 | 14 | 365 | 266 | 133 | 133 | null | null |
oldmanmike/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | thenIOName = varQual gHC_BASE (fsLit "thenIO") thenIOIdKey | 68 | thenIOName = varQual gHC_BASE (fsLit "thenIO") thenIOIdKey | 68 | thenIOName = varQual gHC_BASE (fsLit "thenIO") thenIOIdKey | 68 | false | false | 0 | 7 | 16 | 19 | 9 | 10 | null | null |
AlexeyRaga/eta | compiler/ETA/Prelude/PrimOp.hs | bsd-3-clause | primOpHasSideEffects ParAtRelOp = True | 38 | primOpHasSideEffects ParAtRelOp = True | 38 | primOpHasSideEffects ParAtRelOp = True | 38 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
unsw-comp4181/accelerate-c-stub | Data/Array/Accelerate/C/Exp.hs | bsd-3-clause | -- 'head (prjEnv idx aenv)' is the shape variable
linearIndexToC _aenv _arr _ix = error "D.A.A.C.Exp.linearIndexToC: array variable expected" | 141 | linearIndexToC _aenv _arr _ix = error "D.A.A.C.Exp.linearIndexToC: array variable expected" | 91 | linearIndexToC _aenv _arr _ix = error "D.A.A.C.Exp.linearIndexToC: array variable expected" | 91 | true | false | 0 | 5 | 18 | 17 | 8 | 9 | null | null |
knrafto/blc | tests/Infinite.hs | bsd-3-clause | -- | @'timeOut' t action@ returns @'Just' a@ if action evaluates to @a@ in
-- under @t@ milliseconds, and returns 'Nothing' if the computation timed
-- out.
timeOut :: Int -> IO a -> IO (Maybe a)
timeOut t action = do
v <- newEmptyMVar
runner <- forkIO $ action >>= putMVar v . Just
reaper <- forkIO $ thread... | 537 | timeOut :: Int -> IO a -> IO (Maybe a)
timeOut t action = do
v <- newEmptyMVar
runner <- forkIO $ action >>= putMVar v . Just
reaper <- forkIO $ threadDelay t >> putMVar v Nothing
result <- takeMVar v
killThread runner
killThread reaper
return result
-- | Return 'True' if the value yields a... | 380 | timeOut t action = do
v <- newEmptyMVar
runner <- forkIO $ action >>= putMVar v . Just
reaper <- forkIO $ threadDelay t >> putMVar v Nothing
result <- takeMVar v
killThread runner
killThread reaper
return result
-- | Return 'True' if the value yields a result or fails with 'NonTemination'
-... | 341 | true | true | 0 | 11 | 120 | 126 | 56 | 70 | null | null |
farrellm/advent | src/Day8.hs | mit | input = readFile "input/day8.txt" | 33 | input = readFile "input/day8.txt" | 33 | input = readFile "input/day8.txt" | 33 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
facebookincubator/duckling | Duckling/Volume/GA/Rules.hs | bsd-3-clause | volumes :: [(Text, String, TVolume.Unit)]
volumes = [ ("<latent vol> ml", "m(l\\.?|h?illil(í|i)t(ea|i)r)"
, TVolume.Millilitre)
, ("<vol> hectoliters" , "heictil(í|i)t(ea|i)r"
, TVolume.Hectolitre)
, ("<vol> liters", "(l(í|i)t(ea|i)r|l\\.?)"
, TVolume.Litre)
... | 410 | volumes :: [(Text, String, TVolume.Unit)]
volumes = [ ("<latent vol> ml", "m(l\\.?|h?illil(í|i)t(ea|i)r)"
, TVolume.Millilitre)
, ("<vol> hectoliters" , "heictil(í|i)t(ea|i)r"
, TVolume.Hectolitre)
, ("<vol> liters", "(l(í|i)t(ea|i)r|l\\.?)"
, TVolume.Litre)
... | 410 | volumes = [ ("<latent vol> ml", "m(l\\.?|h?illil(í|i)t(ea|i)r)"
, TVolume.Millilitre)
, ("<vol> hectoliters" , "heictil(í|i)t(ea|i)r"
, TVolume.Hectolitre)
, ("<vol> liters", "(l(í|i)t(ea|i)r|l\\.?)"
, TVolume.Litre)
, ("<latent vol> gallon", "n?gh?al(ú|... | 368 | false | true | 0 | 7 | 122 | 81 | 51 | 30 | null | null |
input-output-hk/cardano-sl-explorer | src/Pos/Explorer/Web/TestServer.hs | mit | testAddressSummary
:: CAddress
-> Handler (Either ExplorerError CAddressSummary)
testAddressSummary _ = pure . pure $ sampleAddressSummary | 147 | testAddressSummary
:: CAddress
-> Handler (Either ExplorerError CAddressSummary)
testAddressSummary _ = pure . pure $ sampleAddressSummary | 147 | testAddressSummary _ = pure . pure $ sampleAddressSummary | 58 | false | true | 0 | 9 | 24 | 42 | 19 | 23 | null | null |
momomimachli/Hedsql | tests/Database/Hedsql/Statements/Select.hs | gpl-3.0 | select3Tuple :: Select [(String, String, Int)] dbVendor
select3Tuple =
select (c1, c2, c3)
|> from "People"
|> end
where
c1 = col "firstName" (varchar 256)
c2 = col "lastName" (varchar 256)
c3 = col "age" integer
{-|
@
SELECT
"firstName",
"lastName",
"age",
"title"
FROM ... | 333 | select3Tuple :: Select [(String, String, Int)] dbVendor
select3Tuple =
select (c1, c2, c3)
|> from "People"
|> end
where
c1 = col "firstName" (varchar 256)
c2 = col "lastName" (varchar 256)
c3 = col "age" integer
{-|
@
SELECT
"firstName",
"lastName",
"age",
"title"
FROM ... | 333 | select3Tuple =
select (c1, c2, c3)
|> from "People"
|> end
where
c1 = col "firstName" (varchar 256)
c2 = col "lastName" (varchar 256)
c3 = col "age" integer
{-|
@
SELECT
"firstName",
"lastName",
"age",
"title"
FROM "People"
@
-} | 277 | false | true | 5 | 8 | 95 | 116 | 53 | 63 | null | null |
helsinki-frp/yampy-cube | src/Input.hs | bsd-3-clause | initAppInput :: AppInput
initAppInput = AppInput { inpMousePos = (0, 0)
, inpMouseLeft = Nothing
, inpMouseRight = Nothing
, inpKeyPressed = Nothing
, inpQuit = False
} | 297 | initAppInput :: AppInput
initAppInput = AppInput { inpMousePos = (0, 0)
, inpMouseLeft = Nothing
, inpMouseRight = Nothing
, inpKeyPressed = Nothing
, inpQuit = False
} | 297 | initAppInput = AppInput { inpMousePos = (0, 0)
, inpMouseLeft = Nothing
, inpMouseRight = Nothing
, inpKeyPressed = Nothing
, inpQuit = False
} | 272 | false | true | 0 | 7 | 156 | 49 | 31 | 18 | null | null |
bitemyapp/email-validate-hs | tests/Main.hs | bsd-3-clause | main :: IO ()
main = defaultMain tests | 38 | main :: IO ()
main = defaultMain tests | 38 | main = defaultMain tests | 24 | false | true | 0 | 7 | 7 | 25 | 10 | 15 | null | null |
rueshyna/gogol | gogol-slides/gen/Network/Google/Slides/Types/Product.hs | mpl-2.0 | -- | The units for magnitude.
dUnit :: Lens' Dimension (Maybe DimensionUnit)
dUnit = lens _dUnit (\ s a -> s{_dUnit = a}) | 121 | dUnit :: Lens' Dimension (Maybe DimensionUnit)
dUnit = lens _dUnit (\ s a -> s{_dUnit = a}) | 91 | dUnit = lens _dUnit (\ s a -> s{_dUnit = a}) | 44 | true | true | 0 | 9 | 22 | 46 | 25 | 21 | null | null |
sagi-schein/curvelib | src/CurveLib.hs | mit | colinear [p] = error "cannot check colinearity for a singleton list" | 69 | colinear [p] = error "cannot check colinearity for a singleton list" | 69 | colinear [p] = error "cannot check colinearity for a singleton list" | 69 | false | false | 0 | 5 | 11 | 16 | 7 | 9 | null | null |
Michaelt293/lipase | src/FattyAcid.hs | bsd-3-clause | c21s :: [FattyAcid]
c21s = FattyAcid . FattyAcyl 21 <$> [0, 1] | 62 | c21s :: [FattyAcid]
c21s = FattyAcid . FattyAcyl 21 <$> [0, 1] | 62 | c21s = FattyAcid . FattyAcyl 21 <$> [0, 1] | 42 | false | true | 3 | 7 | 11 | 39 | 18 | 21 | null | null |
yjwen/hada | src/Main.hs | lgpl-3.0 | defaultParam :: Param
defaultParam = Param Nothing DefaultOutF "" "" "" | 71 | defaultParam :: Param
defaultParam = Param Nothing DefaultOutF "" "" "" | 71 | defaultParam = Param Nothing DefaultOutF "" "" "" | 49 | false | true | 0 | 5 | 10 | 22 | 11 | 11 | null | null |
ezrakilty/narc | Database/Narc/Type.hs | bsd-2-clause | occurs x (TList t) = x `occurs` t | 34 | occurs x (TList t) = x `occurs` t | 34 | occurs x (TList t) = x `occurs` t | 34 | false | false | 0 | 6 | 8 | 25 | 12 | 13 | null | null |
rueshyna/gogol | gogol-analytics/gen/Network/Google/Analytics/Types/Product.hs | mpl-2.0 | -- | Link for this web property.
wSelfLink :: Lens' WebProperty (Maybe Text)
wSelfLink
= lens _wSelfLink (\ s a -> s{_wSelfLink = a}) | 135 | wSelfLink :: Lens' WebProperty (Maybe Text)
wSelfLink
= lens _wSelfLink (\ s a -> s{_wSelfLink = a}) | 102 | wSelfLink
= lens _wSelfLink (\ s a -> s{_wSelfLink = a}) | 58 | true | true | 0 | 9 | 25 | 48 | 25 | 23 | null | null |
sdiehl/ghc | compiler/simplCore/SimplMonad.hs | bsd-3-clause | freeTick :: Tick -> SimplM ()
-- Record a tick, but don't add to the total tick count, which is
-- used to decide when nothing further has happened
freeTick t
= SM (\_st_env us sc -> let sc' = doFreeSimplTick t sc
in sc' `seq` return ((), us, sc')) | 278 | freeTick :: Tick -> SimplM ()
freeTick t
= SM (\_st_env us sc -> let sc' = doFreeSimplTick t sc
in sc' `seq` return ((), us, sc')) | 160 | freeTick t
= SM (\_st_env us sc -> let sc' = doFreeSimplTick t sc
in sc' `seq` return ((), us, sc')) | 130 | true | true | 0 | 13 | 79 | 81 | 41 | 40 | null | null |
mr/gazelle | src/Network/Gazelle.hs | mit | sessionCJ :: CookieJar -> CookieJar
sessionCJ = CJ . filter ((== "session") . cookie_name) . expose | 99 | sessionCJ :: CookieJar -> CookieJar
sessionCJ = CJ . filter ((== "session") . cookie_name) . expose | 99 | sessionCJ = CJ . filter ((== "session") . cookie_name) . expose | 63 | false | true | 0 | 10 | 15 | 37 | 20 | 17 | null | null |
revnull/fixfile | src/Data/FixFile/Tree23.hs | lgpl-3.0 | -- | 'FTransaction' version of 'deleteSet'.
deleteSetT :: (Serialize k, Ord k, f ~ Tree23 (Set k)) =>
k -> Transaction (Ref f) s ()
deleteSetT k = alterT (deleteSet k) | 171 | deleteSetT :: (Serialize k, Ord k, f ~ Tree23 (Set k)) =>
k -> Transaction (Ref f) s ()
deleteSetT k = alterT (deleteSet k) | 127 | deleteSetT k = alterT (deleteSet k) | 35 | true | true | 0 | 11 | 34 | 80 | 38 | 42 | null | null |
roberth/uu-helium | test/correct/PMC8.hs | gpl-3.0 | main :: Int
main = lengte (filter even [1..1000]) | 49 | main :: Int
main = lengte (filter even [1..1000]) | 49 | main = lengte (filter even [1..1000]) | 37 | false | true | 0 | 8 | 8 | 34 | 15 | 19 | null | null |
saltlang/compiler-toolbox | test/Tests/Text/Numbers.hs | bsd-3-clause | testHexInteger = [
"0" ~: hexInteger "0" @?= 0x0,
"+0" ~: hexInteger "+0" @?= 0x0,
"-0" ~: hexInteger "-0" @?= 0x0,
"1" ~: hexInteger "1" @?= 0x1,
"+1" ~: hexInteger "+1" @?= 0x1,
"-1" ~: hexInteger "-1" @?= -0x1,
"22" ~: hexInteger "22" @?= 0x22,
"+22" ~: hexInteger "+22" @?= 0x22,
... | 2,725 | testHexInteger = [
"0" ~: hexInteger "0" @?= 0x0,
"+0" ~: hexInteger "+0" @?= 0x0,
"-0" ~: hexInteger "-0" @?= 0x0,
"1" ~: hexInteger "1" @?= 0x1,
"+1" ~: hexInteger "+1" @?= 0x1,
"-1" ~: hexInteger "-1" @?= -0x1,
"22" ~: hexInteger "22" @?= 0x22,
"+22" ~: hexInteger "+22" @?= 0x22,
... | 2,725 | testHexInteger = [
"0" ~: hexInteger "0" @?= 0x0,
"+0" ~: hexInteger "+0" @?= 0x0,
"-0" ~: hexInteger "-0" @?= 0x0,
"1" ~: hexInteger "1" @?= 0x1,
"+1" ~: hexInteger "+1" @?= 0x1,
"-1" ~: hexInteger "-1" @?= -0x1,
"22" ~: hexInteger "22" @?= 0x22,
"+22" ~: hexInteger "+22" @?= 0x22,
... | 2,725 | false | false | 1 | 9 | 485 | 712 | 354 | 358 | null | null |
m4lvin/robbed | src/Data/ROBDD/Types.hs | bsd-3-clause | (BDD _ _ _ _ _) `bddCmp` One = LT | 33 | (BDD _ _ _ _ _) `bddCmp` One = LT | 33 | (BDD _ _ _ _ _) `bddCmp` One = LT | 33 | false | false | 0 | 7 | 9 | 28 | 14 | 14 | null | null |
ndmitchell/hlint | src/Hint/NumLiteral.hs | bsd-3-clause | suggestUnderscore _ = mempty | 28 | suggestUnderscore _ = mempty | 28 | suggestUnderscore _ = mempty | 28 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
michalkonecny/polypaver | src/Numeric/ER/RnToRm/BisectionTree.hs | bsd-3-clause | {-|
Apply a function to all values, thus creating a list of new trees.
-}
mapMultiLeaves ::
(BisectionTree box varid d v1 -> [BisectionTree box varid d v2]) ->
BisectionTree box varid d v1 ->
[BisectionTree box varid d v2]
mapMultiLeaves f bistr@(Leaf _ domB val) =
f bistr | 295 | mapMultiLeaves ::
(BisectionTree box varid d v1 -> [BisectionTree box varid d v2]) ->
BisectionTree box varid d v1 ->
[BisectionTree box varid d v2]
mapMultiLeaves f bistr@(Leaf _ domB val) =
f bistr | 215 | mapMultiLeaves f bistr@(Leaf _ domB val) =
f bistr | 54 | true | true | 0 | 9 | 70 | 90 | 45 | 45 | null | null |
frenetic-lang/netcore-1.0 | src/Frenetic/NetCore/Util.hs | bsd-3-clause | size (Sequence p1 p2) = size p1 + size p2 + 1 | 45 | size (Sequence p1 p2) = size p1 + size p2 + 1 | 45 | size (Sequence p1 p2) = size p1 + size p2 + 1 | 45 | false | false | 0 | 7 | 11 | 31 | 14 | 17 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.