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 exp') DeclQuant _ quant' decl exp' -> IDeclPExp (desugarQuant quant') [desugarDecl False decl] (dpe exp') EIff _ exp0 exp' -> dop iIff [exp0, exp'] EImplies _ exp0 exp' -> dop iImpl [exp0, exp'] EImpliesElse _ exp0 exp1 exp' -> dop iIfThenElse [exp0, exp1, exp'] EOr _ exp0 exp' -> dop iOr [exp0, exp'] EXor _ exp0 exp' -> dop iXor [exp0, exp'] EAnd _ exp0 exp' -> dop iAnd [exp0, exp'] ENeg _ exp' -> dop iNot [exp'] QuantExp _ quant' exp' -> IDeclPExp (desugarQuant quant') [] (desugarExp exp') ELt _ exp0 exp' -> dop iLt [exp0, exp'] EGt _ exp0 exp' -> dop iGt [exp0, exp'] EEq _ exp0 exp' -> dop iEq [exp0, exp'] ELte _ exp0 exp' -> dop iLte [exp0, exp'] EGte _ exp0 exp' -> dop iGte [exp0, exp'] ENeq _ exp0 exp' -> dop iNeq [exp0, exp'] EIn _ exp0 exp' -> dop iIn [exp0, exp'] ENin _ exp0 exp' -> dop iNin [exp0, exp'] EAdd _ exp0 exp' -> dop iPlus [exp0, exp'] ESub _ exp0 exp' -> dop iSub [exp0, exp'] EMul _ exp0 exp' -> dop iMul [exp0, exp'] EDiv _ exp0 exp' -> dop iDiv [exp0, exp'] ECSetExp _ exp' -> dop iCSet [exp'] ESumSetExp _ exp' -> dop iSumSet [exp'] EMinExp _ exp' -> dop iMin [exp'] EGMax _ exp' -> dop iGMax [exp'] EGMin _ exp' -> dop iGMin [exp'] EInt _ n -> IInt $ mkInteger n EDouble _ (PosDouble n) -> IDouble $ read $ snd n EStr _ (PosString str) -> IStr $ snd str ESetExp _ sexp -> desugarSetExp' sexp where dop = desugarOp desugarExp dpe = desugarPath.desugarExp
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 exp') DeclQuant _ quant' decl exp' -> IDeclPExp (desugarQuant quant') [desugarDecl False decl] (dpe exp') EIff _ exp0 exp' -> dop iIff [exp0, exp'] EImplies _ exp0 exp' -> dop iImpl [exp0, exp'] EImpliesElse _ exp0 exp1 exp' -> dop iIfThenElse [exp0, exp1, exp'] EOr _ exp0 exp' -> dop iOr [exp0, exp'] EXor _ exp0 exp' -> dop iXor [exp0, exp'] EAnd _ exp0 exp' -> dop iAnd [exp0, exp'] ENeg _ exp' -> dop iNot [exp'] QuantExp _ quant' exp' -> IDeclPExp (desugarQuant quant') [] (desugarExp exp') ELt _ exp0 exp' -> dop iLt [exp0, exp'] EGt _ exp0 exp' -> dop iGt [exp0, exp'] EEq _ exp0 exp' -> dop iEq [exp0, exp'] ELte _ exp0 exp' -> dop iLte [exp0, exp'] EGte _ exp0 exp' -> dop iGte [exp0, exp'] ENeq _ exp0 exp' -> dop iNeq [exp0, exp'] EIn _ exp0 exp' -> dop iIn [exp0, exp'] ENin _ exp0 exp' -> dop iNin [exp0, exp'] EAdd _ exp0 exp' -> dop iPlus [exp0, exp'] ESub _ exp0 exp' -> dop iSub [exp0, exp'] EMul _ exp0 exp' -> dop iMul [exp0, exp'] EDiv _ exp0 exp' -> dop iDiv [exp0, exp'] ECSetExp _ exp' -> dop iCSet [exp'] ESumSetExp _ exp' -> dop iSumSet [exp'] EMinExp _ exp' -> dop iMin [exp'] EGMax _ exp' -> dop iGMax [exp'] EGMin _ exp' -> dop iGMin [exp'] EInt _ n -> IInt $ mkInteger n EDouble _ (PosDouble n) -> IDouble $ read $ snd n EStr _ (PosString str) -> IStr $ snd str ESetExp _ sexp -> desugarSetExp' sexp where dop = desugarOp desugarExp dpe = desugarPath.desugarExp
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' decl exp' -> IDeclPExp (desugarQuant quant') [desugarDecl False decl] (dpe exp') EIff _ exp0 exp' -> dop iIff [exp0, exp'] EImplies _ exp0 exp' -> dop iImpl [exp0, exp'] EImpliesElse _ exp0 exp1 exp' -> dop iIfThenElse [exp0, exp1, exp'] EOr _ exp0 exp' -> dop iOr [exp0, exp'] EXor _ exp0 exp' -> dop iXor [exp0, exp'] EAnd _ exp0 exp' -> dop iAnd [exp0, exp'] ENeg _ exp' -> dop iNot [exp'] QuantExp _ quant' exp' -> IDeclPExp (desugarQuant quant') [] (desugarExp exp') ELt _ exp0 exp' -> dop iLt [exp0, exp'] EGt _ exp0 exp' -> dop iGt [exp0, exp'] EEq _ exp0 exp' -> dop iEq [exp0, exp'] ELte _ exp0 exp' -> dop iLte [exp0, exp'] EGte _ exp0 exp' -> dop iGte [exp0, exp'] ENeq _ exp0 exp' -> dop iNeq [exp0, exp'] EIn _ exp0 exp' -> dop iIn [exp0, exp'] ENin _ exp0 exp' -> dop iNin [exp0, exp'] EAdd _ exp0 exp' -> dop iPlus [exp0, exp'] ESub _ exp0 exp' -> dop iSub [exp0, exp'] EMul _ exp0 exp' -> dop iMul [exp0, exp'] EDiv _ exp0 exp' -> dop iDiv [exp0, exp'] ECSetExp _ exp' -> dop iCSet [exp'] ESumSetExp _ exp' -> dop iSumSet [exp'] EMinExp _ exp' -> dop iMin [exp'] EGMax _ exp' -> dop iGMax [exp'] EGMin _ exp' -> dop iGMin [exp'] EInt _ n -> IInt $ mkInteger n EDouble _ (PosDouble n) -> IDouble $ read $ snd n EStr _ (PosString str) -> IStr $ snd str ESetExp _ sexp -> desugarSetExp' sexp where dop = desugarOp desugarExp dpe = desugarPath.desugarExp
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] -> Instance.Instance -> Node.Node -> T.OpResult (Metric, Node.Node) 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') -- | Allocate an instance on a given node.
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 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') -- | Allocate an instance on a given node.
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') -- | Allocate an instance on a given node.
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) (adjustRadiusForSlope (Radius 10) (slopeAdjustedForVerticalAngle (PosXSlope 0) (PosYSlope 0) (xyQuadrantAngle 10))) (Angle 10)--(xyQuadrantAngle 10) (slopeAdjustedForVerticalAngle (PosXSlope 0) (PosYSlope 0) (xyQuadrantAngle 10)) ) -} --was simplified 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) --(adjustRadiusForSlope (Radius 10) (slopeAdjustedForVerticalAngle (PosXSlope 0) (PosYSlope 0) (xyQuadrantAngle 10))) (Angle 10)--(xyQuadrantAngle 10) (PosXSlope 0) (PosYSlope 0) --(slopeAdjustedForVerticalAngle (PosXSlope 0) (PosYSlope 0) (xyQuadrantAngle 10)) )
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) --(adjustRadiusForSlope (Radius 10) (slopeAdjustedForVerticalAngle (PosXSlope 0) (PosYSlope 0) (xyQuadrantAngle 10))) (Angle 10)--(xyQuadrantAngle 10) (PosXSlope 0) (PosYSlope 0) --(slopeAdjustedForVerticalAngle (PosXSlope 0) (PosYSlope 0) (xyQuadrantAngle 10)) )
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) --(adjustRadiusForSlope (Radius 10) (slopeAdjustedForVerticalAngle (PosXSlope 0) (PosYSlope 0) (xyQuadrantAngle 10))) (Angle 10)--(xyQuadrantAngle 10) (PosXSlope 0) (PosYSlope 0) --(slopeAdjustedForVerticalAngle (PosXSlope 0) (PosYSlope 0) (xyQuadrantAngle 10)) )
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 return $ str : deepStrs
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 return $ str : deepStrs
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" hideById "budget-container" createOptionsByIdWithRefresh ["generation"] t gen <- getElementById "generation" propagateAction gen (commonEvent generation) [onFocus, onKeyUp]
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" hideById "budget-container" createOptionsByIdWithRefresh ["generation"] t gen <- getElementById "generation" propagateAction gen (commonEvent generation) [onFocus, onKeyUp]
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" hideById "budget-container" createOptionsByIdWithRefresh ["generation"] t gen <- getElementById "generation" propagateAction gen (commonEvent generation) [onFocus, onKeyUp]
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 28 66 33 13 80 " ,"24 47 32 60 99 03 45 02 44 75 33 53 78 36 84 20 35 17 12 50 " ,"32 98 81 28 64 23 67 10 26 38 40 67 59 54 70 66 18 38 64 70 " ,"67 26 20 68 02 62 12 20 95 63 94 39 63 08 40 91 66 49 94 21 " ,"24 55 58 05 66 73 99 26 97 17 78 78 96 83 14 88 34 89 63 72 " ,"21 36 23 09 75 00 76 44 20 45 35 14 00 61 33 97 34 31 33 95 " ,"78 17 53 28 22 75 31 67 15 94 03 80 04 62 16 14 09 53 56 92 " ,"16 39 05 42 96 35 31 47 55 58 88 24 00 17 54 24 36 29 85 57 " ,"86 56 00 48 35 71 89 07 05 44 44 37 44 60 21 58 51 54 17 58 " ,"19 80 81 68 05 94 47 69 28 73 92 13 86 52 17 77 04 89 55 40 " ,"04 52 08 83 97 35 99 16 07 97 57 32 16 26 26 79 33 27 98 66 " ,"88 36 68 87 57 62 20 72 03 46 33 67 46 55 12 32 63 93 53 69 " ,"04 42 16 73 38 25 39 11 24 94 72 18 08 46 29 32 40 62 76 36 " ,"20 69 36 41 72 30 23 88 34 62 99 69 82 67 59 85 74 04 36 16 " ,"20 73 35 29 78 31 90 01 74 31 49 71 48 86 81 16 23 57 05 54 " ,"01 70 54 71 83 51 54 69 16 92 33 48 61 43 52 01 89 19 67 48 " ]
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 28 66 33 13 80 " ,"24 47 32 60 99 03 45 02 44 75 33 53 78 36 84 20 35 17 12 50 " ,"32 98 81 28 64 23 67 10 26 38 40 67 59 54 70 66 18 38 64 70 " ,"67 26 20 68 02 62 12 20 95 63 94 39 63 08 40 91 66 49 94 21 " ,"24 55 58 05 66 73 99 26 97 17 78 78 96 83 14 88 34 89 63 72 " ,"21 36 23 09 75 00 76 44 20 45 35 14 00 61 33 97 34 31 33 95 " ,"78 17 53 28 22 75 31 67 15 94 03 80 04 62 16 14 09 53 56 92 " ,"16 39 05 42 96 35 31 47 55 58 88 24 00 17 54 24 36 29 85 57 " ,"86 56 00 48 35 71 89 07 05 44 44 37 44 60 21 58 51 54 17 58 " ,"19 80 81 68 05 94 47 69 28 73 92 13 86 52 17 77 04 89 55 40 " ,"04 52 08 83 97 35 99 16 07 97 57 32 16 26 26 79 33 27 98 66 " ,"88 36 68 87 57 62 20 72 03 46 33 67 46 55 12 32 63 93 53 69 " ,"04 42 16 73 38 25 39 11 24 94 72 18 08 46 29 32 40 62 76 36 " ,"20 69 36 41 72 30 23 88 34 62 99 69 82 67 59 85 74 04 36 16 " ,"20 73 35 29 78 31 90 01 74 31 49 71 48 86 81 16 23 57 05 54 " ,"01 70 54 71 83 51 54 69 16 92 33 48 61 43 52 01 89 19 67 48 " ]
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 28 66 33 13 80 " ,"24 47 32 60 99 03 45 02 44 75 33 53 78 36 84 20 35 17 12 50 " ,"32 98 81 28 64 23 67 10 26 38 40 67 59 54 70 66 18 38 64 70 " ,"67 26 20 68 02 62 12 20 95 63 94 39 63 08 40 91 66 49 94 21 " ,"24 55 58 05 66 73 99 26 97 17 78 78 96 83 14 88 34 89 63 72 " ,"21 36 23 09 75 00 76 44 20 45 35 14 00 61 33 97 34 31 33 95 " ,"78 17 53 28 22 75 31 67 15 94 03 80 04 62 16 14 09 53 56 92 " ,"16 39 05 42 96 35 31 47 55 58 88 24 00 17 54 24 36 29 85 57 " ,"86 56 00 48 35 71 89 07 05 44 44 37 44 60 21 58 51 54 17 58 " ,"19 80 81 68 05 94 47 69 28 73 92 13 86 52 17 77 04 89 55 40 " ,"04 52 08 83 97 35 99 16 07 97 57 32 16 26 26 79 33 27 98 66 " ,"88 36 68 87 57 62 20 72 03 46 33 67 46 55 12 32 63 93 53 69 " ,"04 42 16 73 38 25 39 11 24 94 72 18 08 46 29 32 40 62 76 36 " ,"20 69 36 41 72 30 23 88 34 62 99 69 82 67 59 85 74 04 36 16 " ,"20 73 35 29 78 31 90 01 74 31 49 71 48 86 81 16 23 57 05 54 " ,"01 70 54 71 83 51 54 69 16 92 33 48 61 43 52 01 89 19 67 48 " ]
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, sandbox and user install types. configUserInstall = toFlag False, configInstallDirs = installDirs }, savedUserInstallDirs = installDirs, savedGlobalInstallDirs = installDirs, savedGlobalFlags = mempty { globalLogsDir = toFlag $ sandboxDir </> "logs", -- Is this right? cabal-dev uses the global world file. globalWorldFile = toFlag $ sandboxDir </> "world" } } where installDirs = sandboxInstallDirs sandboxDir -- | 'commonPackageEnvironmentConfig' wrapped inside a 'PackageEnvironment'.
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, sandbox and user install types. configUserInstall = toFlag False, configInstallDirs = installDirs }, savedUserInstallDirs = installDirs, savedGlobalInstallDirs = installDirs, savedGlobalFlags = mempty { globalLogsDir = toFlag $ sandboxDir </> "logs", -- Is this right? cabal-dev uses the global world file. globalWorldFile = toFlag $ sandboxDir </> "world" } } where installDirs = sandboxInstallDirs sandboxDir -- | 'commonPackageEnvironmentConfig' wrapped inside a 'PackageEnvironment'.
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 = toFlag False, configInstallDirs = installDirs }, savedUserInstallDirs = installDirs, savedGlobalInstallDirs = installDirs, savedGlobalFlags = mempty { globalLogsDir = toFlag $ sandboxDir </> "logs", -- Is this right? cabal-dev uses the global world file. globalWorldFile = toFlag $ sandboxDir </> "world" } } where installDirs = sandboxInstallDirs sandboxDir -- | 'commonPackageEnvironmentConfig' wrapped inside a 'PackageEnvironment'.
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. -- This distinction is not required for names. eData = nub $ edgeData . veEdge <$> (h : sames) eData' = case eData of [DataStructureEdge ParentEdge] -> Just InnerEdge [DataStructureEdge ParentEdge, ScopeEdge] -> Just SameLevelEdge [ScopeEdge, DataStructureEdge ParentEdge] -> Just SameLevelEdge [ScopeEdge] -> Just SameLevelEdge [DataStructureEdge LogicalEdge] -> Nothing l -> failure (sformat ("Could not understand combination "%shown) l) res = case eData' of Just v -> (h { veEdge = e { edgeData = v } }) : rest Nothing -> rest in res
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. -- This distinction is not required for names. eData = nub $ edgeData . veEdge <$> (h : sames) eData' = case eData of [DataStructureEdge ParentEdge] -> Just InnerEdge [DataStructureEdge ParentEdge, ScopeEdge] -> Just SameLevelEdge [ScopeEdge, DataStructureEdge ParentEdge] -> Just SameLevelEdge [ScopeEdge] -> Just SameLevelEdge [DataStructureEdge LogicalEdge] -> Nothing l -> failure (sformat ("Could not understand combination "%shown) l) res = case eData' of Just v -> (h { veEdge = e { edgeData = v } }) : rest Nothing -> rest in res
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. -- This distinction is not required for names. eData = nub $ edgeData . veEdge <$> (h : sames) eData' = case eData of [DataStructureEdge ParentEdge] -> Just InnerEdge [DataStructureEdge ParentEdge, ScopeEdge] -> Just SameLevelEdge [ScopeEdge, DataStructureEdge ParentEdge] -> Just SameLevelEdge [ScopeEdge] -> Just SameLevelEdge [DataStructureEdge LogicalEdge] -> Nothing l -> failure (sformat ("Could not understand combination "%shown) l) res = case eData' of Just v -> (h { veEdge = e { edgeData = v } }) : rest Nothing -> rest in res
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 $ m --------------------------------------- -- Deterministic (one-result) solver --------------------------------------- -- Entry; starts solving at left-top corner.
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 --------------------------------------- -- Entry; starts solving at left-top corner.
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 --------------------------------------- -- Entry; starts solving at left-top corner.
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, _ipBindings = Nothing}
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 (s+6) putWord64be (s+7) putWord64be (s+8) putWord64be (s+9) putWord64be (s+10) putWord64be (s+11) putWord64be (s+12) putWord64be (s+13) putWord64be (s+14) putWord64be (s+15) loop (s+16) (n-16) ------------------------------------------------------------------------
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 (s+6) putWord64be (s+7) putWord64be (s+8) putWord64be (s+9) putWord64be (s+10) putWord64be (s+11) putWord64be (s+12) putWord64be (s+13) putWord64be (s+14) putWord64be (s+15) loop (s+16) (n-16) ------------------------------------------------------------------------
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 (s+6) putWord64be (s+7) putWord64be (s+8) putWord64be (s+9) putWord64be (s+10) putWord64be (s+11) putWord64be (s+12) putWord64be (s+13) putWord64be (s+14) putWord64be (s+15) loop (s+16) (n-16) ------------------------------------------------------------------------
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 " <> dualTypOf z <> " " <> tmp z "zero" <> ", " <> coVar' y <> ",1\n" Bot z -> stmt "" Up z x@(xn,t) t' -> def ("define " <> cFun xfun t xnparam (ptr envStruct <+> "%env")<> braces (stmt mempty <> -- load the environment into variables mconcat [stmt (tmp v "ptr" <> " = getelementptr " <> envStruct <> ", " <> ptr envStruct <+> "%env, i32 0, i32 " <> num i) <> stmt (dcl' v <> "= load " <> typOf v <> ", " <> ptr (typOf v) <+> tmp v "ptr") | (v,i) <- zip env' [(0::Int)..]] <> -- FIXME: here, free the *closure* that we entered t'c )) <> stmts [tmp z "mem" <> " = call i8*" <+> cCall "@malloc" ["i64 666" {- FIXME -} ] -- allocate the closure ,tmp z "clo" <> " = bitcast i8* " <> tmp z "mem" <+> "to" <+> ptr cloTyp -- calculate the pointer to the code ,tmp z "code_0" ~=~ "getelementptr " <> cloTyp <> ", " <> ptr cloTyp <+> tmp z "clo" <> ", i32 0, i32 0" -- cast it ,tmp z "code" ~=~ "bitcast " <> ptr unknownFunTyp <+> tmp z "code_0" <> " to " <> ptr funTyp -- write the pointer ,"store " <> funTyp <+> lit xfun <> ", " <> ptr funTyp <> tmp z "code" ] <> -- write the environment stmts (concat [[tmp v "ptr" <> " = getelementptr " <> cloTyp <> ", " <> ptr cloTyp <+> tmp z "clo" <> ", i32 0, i32 1, i32 " <> num i ,"store " <> var' v <> ", " <> ptr (typOf v) <+> tmp v "ptr"] | (v,i) <- zip env' [0..]]) <> stmt (dcl' z <> " = bitcast " <> ptr cloTyp <+> tmp z "clo" <> " to " <> dualTypOf z) where xfun = "@" ++ (quoteVar $ fresh xn "fun") t'c@(Code _ env _ _ _) = compile t' env' = nubBy ((==) `on` fst) (env \\\ [xn]) envStruct = struct $ map snd env' cloTyp = cloType envStruct t unknownFunTyp = unknownFunType t funTyp = funType envStruct t xnparam = "%" ++ quoteVar xn ------------------ -- Top-level
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 " <> dualTypOf z <> " " <> tmp z "zero" <> ", " <> coVar' y <> ",1\n" Bot z -> stmt "" Up z x@(xn,t) t' -> def ("define " <> cFun xfun t xnparam (ptr envStruct <+> "%env")<> braces (stmt mempty <> -- load the environment into variables mconcat [stmt (tmp v "ptr" <> " = getelementptr " <> envStruct <> ", " <> ptr envStruct <+> "%env, i32 0, i32 " <> num i) <> stmt (dcl' v <> "= load " <> typOf v <> ", " <> ptr (typOf v) <+> tmp v "ptr") | (v,i) <- zip env' [(0::Int)..]] <> -- FIXME: here, free the *closure* that we entered t'c )) <> stmts [tmp z "mem" <> " = call i8*" <+> cCall "@malloc" ["i64 666" {- FIXME -} ] -- allocate the closure ,tmp z "clo" <> " = bitcast i8* " <> tmp z "mem" <+> "to" <+> ptr cloTyp -- calculate the pointer to the code ,tmp z "code_0" ~=~ "getelementptr " <> cloTyp <> ", " <> ptr cloTyp <+> tmp z "clo" <> ", i32 0, i32 0" -- cast it ,tmp z "code" ~=~ "bitcast " <> ptr unknownFunTyp <+> tmp z "code_0" <> " to " <> ptr funTyp -- write the pointer ,"store " <> funTyp <+> lit xfun <> ", " <> ptr funTyp <> tmp z "code" ] <> -- write the environment stmts (concat [[tmp v "ptr" <> " = getelementptr " <> cloTyp <> ", " <> ptr cloTyp <+> tmp z "clo" <> ", i32 0, i32 1, i32 " <> num i ,"store " <> var' v <> ", " <> ptr (typOf v) <+> tmp v "ptr"] | (v,i) <- zip env' [0..]]) <> stmt (dcl' z <> " = bitcast " <> ptr cloTyp <+> tmp z "clo" <> " to " <> dualTypOf z) where xfun = "@" ++ (quoteVar $ fresh xn "fun") t'c@(Code _ env _ _ _) = compile t' env' = nubBy ((==) `on` fst) (env \\\ [xn]) envStruct = struct $ map snd env' cloTyp = cloType envStruct t unknownFunTyp = unknownFunType t funTyp = funType envStruct t xnparam = "%" ++ quoteVar xn ------------------ -- Top-level
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" <> ", " <> coVar' y <> ",1\n" Bot z -> stmt "" Up z x@(xn,t) t' -> def ("define " <> cFun xfun t xnparam (ptr envStruct <+> "%env")<> braces (stmt mempty <> -- load the environment into variables mconcat [stmt (tmp v "ptr" <> " = getelementptr " <> envStruct <> ", " <> ptr envStruct <+> "%env, i32 0, i32 " <> num i) <> stmt (dcl' v <> "= load " <> typOf v <> ", " <> ptr (typOf v) <+> tmp v "ptr") | (v,i) <- zip env' [(0::Int)..]] <> -- FIXME: here, free the *closure* that we entered t'c )) <> stmts [tmp z "mem" <> " = call i8*" <+> cCall "@malloc" ["i64 666" {- FIXME -} ] -- allocate the closure ,tmp z "clo" <> " = bitcast i8* " <> tmp z "mem" <+> "to" <+> ptr cloTyp -- calculate the pointer to the code ,tmp z "code_0" ~=~ "getelementptr " <> cloTyp <> ", " <> ptr cloTyp <+> tmp z "clo" <> ", i32 0, i32 0" -- cast it ,tmp z "code" ~=~ "bitcast " <> ptr unknownFunTyp <+> tmp z "code_0" <> " to " <> ptr funTyp -- write the pointer ,"store " <> funTyp <+> lit xfun <> ", " <> ptr funTyp <> tmp z "code" ] <> -- write the environment stmts (concat [[tmp v "ptr" <> " = getelementptr " <> cloTyp <> ", " <> ptr cloTyp <+> tmp z "clo" <> ", i32 0, i32 1, i32 " <> num i ,"store " <> var' v <> ", " <> ptr (typOf v) <+> tmp v "ptr"] | (v,i) <- zip env' [0..]]) <> stmt (dcl' z <> " = bitcast " <> ptr cloTyp <+> tmp z "clo" <> " to " <> dualTypOf z) where xfun = "@" ++ (quoteVar $ fresh xn "fun") t'c@(Code _ env _ _ _) = compile t' env' = nubBy ((==) `on` fst) (env \\\ [xn]) envStruct = struct $ map snd env' cloTyp = cloType envStruct t unknownFunTyp = unknownFunType t funTyp = funType envStruct t xnparam = "%" ++ quoteVar xn ------------------ -- Top-level
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? Or, taking all of the above into account, does it make sense for the rows of the packet to be an empty list (as we have already parsed the articles, so why repeat that step?), and save the information of the megapacket then store the NEW and UPDATED articles separately? We'll look at these questions further tomorrow. --} {-- BONUS ----------------------------------------------------------------- Put it all together into an app that spits out a status of the numbers of new, updated, and redundant articles from a REST endpoint pull. --} main' :: [String] -> IO () main' [] = errmsg
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 (bidx-10) ARight -> menuRun $ tsksListMenu' oacts (bidx+10) otherwise -> fail "unmatched action from the org submenu"
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 (bidx-10) ARight -> menuRun $ tsksListMenu' oacts (bidx+10) otherwise -> fail "unmatched action from the org submenu"
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) otherwise -> fail "unmatched action from the org submenu"
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 res <- mapM (uncurry interactSet) sorted maybeContinue <- confirmPrompt "Last chance to back out. Are you sure you want to continue?" if maybeContinue then sequence_ $ map (uncurry makeAction) $ concat res else return () -- quit where interactSet :: Hash -> Files -> IO [(FilePath, Action)] interactSet h fs = do size <- getFileSize $ B.unpack $ head fs putStrLn $ "\nFound " ++ (show (length fs)) ++ " duplicate files (Size: " ++ (show size) ++ "; Hash " ++ (show h) ++ ")." sequence_ $ map print fs putStrLn "" res <- interactChoices h fs [] return res interactChoices :: Hash -> Files -> [(FilePath, Action)] -> IO [(FilePath, Action)] interactChoices _ [] acc = return acc interactChoices h (f:fs) acc = do let file = B.unpack f action <- readEvalPrintLoop file case action of KeepRest -> return $ map (\f -> (B.unpack f, Keep)) (f:fs) ++ acc SkipRest -> return $ map (\f -> (B.unpack f, Skip)) (f:fs) ++ acc DeleteRest -> return $ map (\f -> (B.unpack f, Delete)) (f:fs) ++ acc otherwise -> interactChoices h fs $ (file,action):acc readEvalPrintLoop :: FilePath -> IO Action readEvalPrintLoop f = do maybeChar <- readChar $ f ++ " >> " case maybeChar of '\EOT' -> exitWith ExitSuccess -- EOF / control-d 'q' -> exitWith ExitSuccess 's' -> return Skip 'S' -> return SkipRest ' ' -> return Keep '\n' -> return KeepRest 'd' -> return Delete 'D' -> return DeleteRest 'm' -> do new <- readline "Enter new full path: " case new of Nothing -> do {putStrLn ""; res <- readEvalPrintLoop f; return res} Just "" -> do {putStrLn ""; res <- readEvalPrintLoop f; return res} Just n -> return $ Move n 'h' -> do putStrLn "User input not valid." putStrLn showUsage res <- readEvalPrintLoop f return res _ -> do putStrLn "User input not valid." putStrLn showUsage res <- readEvalPrintLoop f return res
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 res <- mapM (uncurry interactSet) sorted maybeContinue <- confirmPrompt "Last chance to back out. Are you sure you want to continue?" if maybeContinue then sequence_ $ map (uncurry makeAction) $ concat res else return () -- quit where interactSet :: Hash -> Files -> IO [(FilePath, Action)] interactSet h fs = do size <- getFileSize $ B.unpack $ head fs putStrLn $ "\nFound " ++ (show (length fs)) ++ " duplicate files (Size: " ++ (show size) ++ "; Hash " ++ (show h) ++ ")." sequence_ $ map print fs putStrLn "" res <- interactChoices h fs [] return res interactChoices :: Hash -> Files -> [(FilePath, Action)] -> IO [(FilePath, Action)] interactChoices _ [] acc = return acc interactChoices h (f:fs) acc = do let file = B.unpack f action <- readEvalPrintLoop file case action of KeepRest -> return $ map (\f -> (B.unpack f, Keep)) (f:fs) ++ acc SkipRest -> return $ map (\f -> (B.unpack f, Skip)) (f:fs) ++ acc DeleteRest -> return $ map (\f -> (B.unpack f, Delete)) (f:fs) ++ acc otherwise -> interactChoices h fs $ (file,action):acc readEvalPrintLoop :: FilePath -> IO Action readEvalPrintLoop f = do maybeChar <- readChar $ f ++ " >> " case maybeChar of '\EOT' -> exitWith ExitSuccess -- EOF / control-d 'q' -> exitWith ExitSuccess 's' -> return Skip 'S' -> return SkipRest ' ' -> return Keep '\n' -> return KeepRest 'd' -> return Delete 'D' -> return DeleteRest 'm' -> do new <- readline "Enter new full path: " case new of Nothing -> do {putStrLn ""; res <- readEvalPrintLoop f; return res} Just "" -> do {putStrLn ""; res <- readEvalPrintLoop f; return res} Just n -> return $ Move n 'h' -> do putStrLn "User input not valid." putStrLn showUsage res <- readEvalPrintLoop f return res _ -> do putStrLn "User input not valid." putStrLn showUsage res <- readEvalPrintLoop f return res
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 interactSet) sorted maybeContinue <- confirmPrompt "Last chance to back out. Are you sure you want to continue?" if maybeContinue then sequence_ $ map (uncurry makeAction) $ concat res else return () -- quit where interactSet :: Hash -> Files -> IO [(FilePath, Action)] interactSet h fs = do size <- getFileSize $ B.unpack $ head fs putStrLn $ "\nFound " ++ (show (length fs)) ++ " duplicate files (Size: " ++ (show size) ++ "; Hash " ++ (show h) ++ ")." sequence_ $ map print fs putStrLn "" res <- interactChoices h fs [] return res interactChoices :: Hash -> Files -> [(FilePath, Action)] -> IO [(FilePath, Action)] interactChoices _ [] acc = return acc interactChoices h (f:fs) acc = do let file = B.unpack f action <- readEvalPrintLoop file case action of KeepRest -> return $ map (\f -> (B.unpack f, Keep)) (f:fs) ++ acc SkipRest -> return $ map (\f -> (B.unpack f, Skip)) (f:fs) ++ acc DeleteRest -> return $ map (\f -> (B.unpack f, Delete)) (f:fs) ++ acc otherwise -> interactChoices h fs $ (file,action):acc readEvalPrintLoop :: FilePath -> IO Action readEvalPrintLoop f = do maybeChar <- readChar $ f ++ " >> " case maybeChar of '\EOT' -> exitWith ExitSuccess -- EOF / control-d 'q' -> exitWith ExitSuccess 's' -> return Skip 'S' -> return SkipRest ' ' -> return Keep '\n' -> return KeepRest 'd' -> return Delete 'D' -> return DeleteRest 'm' -> do new <- readline "Enter new full path: " case new of Nothing -> do {putStrLn ""; res <- readEvalPrintLoop f; return res} Just "" -> do {putStrLn ""; res <- readEvalPrintLoop f; return res} Just n -> return $ Move n 'h' -> do putStrLn "User input not valid." putStrLn showUsage res <- readEvalPrintLoop f return res _ -> do putStrLn "User input not valid." putStrLn showUsage res <- readEvalPrintLoop f return res
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 neither this -- parameter is set nor a default task list was specified at registration time -- then a fault will be returned. The specified string must not start or end -- with whitespace. It must not contain a ':' (colon), '/' (slash), '|' (vertical -- bar), or any control characters (\u0000-\u001f | \u007f - \u009f). Also, it -- must not contain the literal string quotarnquot. swe1TaskList :: Lens' StartWorkflowExecution (Maybe TaskList) swe1TaskList = lens _swe1TaskList (\s a -> s { _swe1TaskList = a })
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 expression. The list of sorts parameterized in this module expression. The development graph thus far. -}
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 expression. The list of sorts parameterized in this module expression. The development graph thus far. -}
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 this module expression. The development graph thus far. -}
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 level "" "" v )
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 level "" "" v )
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) [] . wants . filter filterPeeledTags . filter filterRefs where wants = mapMaybe toObjId first acc obj = acc ++ ["want " ++ obj ++ " " ++ unwords capabilities] additional acc obj = acc ++ ["want " ++ obj] filterPeeledTags = not . isSuffixOf "^{}" . C.unpack . ref filterRefs line = let r = C.unpack $ ref line predicates = map ($ r) [isPrefixOf "refs/tags/", isPrefixOf "refs/heads/"] in or predicates
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 = mapMaybe toObjId first acc obj = acc ++ ["want " ++ obj ++ " " ++ unwords capabilities] additional acc obj = acc ++ ["want " ++ obj] filterPeeledTags = not . isSuffixOf "^{}" . C.unpack . ref filterRefs line = let r = C.unpack $ ref line predicates = map ($ r) [isPrefixOf "refs/tags/", isPrefixOf "refs/heads/"] in or predicates
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 obj = acc ++ ["want " ++ obj ++ " " ++ unwords capabilities] additional acc obj = acc ++ ["want " ++ obj] filterPeeledTags = not . isSuffixOf "^{}" . C.unpack . ref filterRefs line = let r = C.unpack $ ref line predicates = map ($ r) [isPrefixOf "refs/tags/", isPrefixOf "refs/heads/"] in or predicates
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 $ 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' -- or 'StackOverflow'.
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 result or fails with 'NonTemination' -- or 'StackOverflow'.
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' -- or 'StackOverflow'.
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) , ("<latent vol> gallon", "n?gh?al(ú|u)i?n" , TVolume.Gallon) ]
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) , ("<latent vol> gallon", "n?gh?al(ú|u)i?n" , TVolume.Gallon) ]
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(ú|u)i?n" , TVolume.Gallon) ]
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 "People" @ -}
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 "People" @ -}
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, "-22" ~: hexInteger "-22" @?= -0x22, "333" ~: hexInteger "333" @?= 0x333, "+333" ~: hexInteger "+333" @?= 0x333, "-333" ~: hexInteger "-333" @?= -0x333, "4444" ~: hexInteger "4444" @?= 0x4444, "+4444" ~: hexInteger "+4444" @?= 0x4444, "-4444" ~: hexInteger "-4444" @?= -0x4444, "55555" ~: hexInteger "55555" @?= 0x55555, "+55555" ~: hexInteger "+55555" @?= 0x55555, "-55555" ~: hexInteger "-55555" @?= -0x55555, "666666" ~: hexInteger "666666" @?= 0x666666, "+666666" ~: hexInteger "+666666" @?= 0x666666, "-666666" ~: hexInteger "-666666" @?= -0x666666, "7777777" ~: hexInteger "7777777" @?= 0x7777777, "+7777777" ~: hexInteger "+7777777" @?= 0x7777777, "-7777777" ~: hexInteger "-7777777" @?= -0x7777777, "88888888" ~: hexInteger "88888888" @?= 0x88888888, "+88888888" ~: hexInteger "+88888888" @?= 0x88888888, "-88888888" ~: hexInteger "-88888888" @?= -0x88888888, "999999999" ~: hexInteger "999999999" @?= 0x999999999, "+999999999" ~: hexInteger "+999999999" @?= 0x999999999, "-999999999" ~: hexInteger "-999999999" @?= -0x999999999, "aaaaaaaaaa" ~: hexInteger "aaaaaaaaaa" @?= 0xaaaaaaaaaa, "+aaaaaaaaaa" ~: hexInteger "+aaaaaaaaaa" @?= 0xaaaaaaaaaa, "-aaaaaaaaaa" ~: hexInteger "-aaaaaaaaaa" @?= -0xaaaaaaaaaa, "bbbbbbbbbbb" ~: hexInteger "bbbbbbbbbbb" @?= 0xbbbbbbbbbbb, "+bbbbbbbbbbb" ~: hexInteger "+bbbbbbbbbbb" @?= 0xbbbbbbbbbbb, "-bbbbbbbbbbb" ~: hexInteger "-bbbbbbbbbbb" @?= -0xbbbbbbbbbbb, "cccccccccccc" ~: hexInteger "cccccccccccc" @?= 0xcccccccccccc, "+cccccccccccc" ~: hexInteger "+cccccccccccc" @?= 0xcccccccccccc, "-cccccccccccc" ~: hexInteger "-cccccccccccc" @?= -0xcccccccccccc, "ddddddddddddd" ~: hexInteger "ddddddddddddd" @?= 0xddddddddddddd, "+ddddddddddddd" ~: hexInteger "+ddddddddddddd" @?= 0xddddddddddddd, "-ddddddddddddd" ~: hexInteger "-ddddddddddddd" @?= -0xddddddddddddd, "eeeeeeeeeeeeee" ~: hexInteger "eeeeeeeeeeeeee" @?= 0xeeeeeeeeeeeeee, "+eeeeeeeeeeeeee" ~: hexInteger "+eeeeeeeeeeeeee" @?= 0xeeeeeeeeeeeeee, "-eeeeeeeeeeeeee" ~: hexInteger "-eeeeeeeeeeeeee" @?= -0xeeeeeeeeeeeeee, "fffffffffffffff" ~: hexInteger "fffffffffffffff" @?= 0xfffffffffffffff, "+fffffffffffffff" ~: hexInteger "+fffffffffffffff" @?= 0xfffffffffffffff, "-fffffffffffffff" ~: hexInteger "-fffffffffffffff" @?= -0xfffffffffffffff ]
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, "-22" ~: hexInteger "-22" @?= -0x22, "333" ~: hexInteger "333" @?= 0x333, "+333" ~: hexInteger "+333" @?= 0x333, "-333" ~: hexInteger "-333" @?= -0x333, "4444" ~: hexInteger "4444" @?= 0x4444, "+4444" ~: hexInteger "+4444" @?= 0x4444, "-4444" ~: hexInteger "-4444" @?= -0x4444, "55555" ~: hexInteger "55555" @?= 0x55555, "+55555" ~: hexInteger "+55555" @?= 0x55555, "-55555" ~: hexInteger "-55555" @?= -0x55555, "666666" ~: hexInteger "666666" @?= 0x666666, "+666666" ~: hexInteger "+666666" @?= 0x666666, "-666666" ~: hexInteger "-666666" @?= -0x666666, "7777777" ~: hexInteger "7777777" @?= 0x7777777, "+7777777" ~: hexInteger "+7777777" @?= 0x7777777, "-7777777" ~: hexInteger "-7777777" @?= -0x7777777, "88888888" ~: hexInteger "88888888" @?= 0x88888888, "+88888888" ~: hexInteger "+88888888" @?= 0x88888888, "-88888888" ~: hexInteger "-88888888" @?= -0x88888888, "999999999" ~: hexInteger "999999999" @?= 0x999999999, "+999999999" ~: hexInteger "+999999999" @?= 0x999999999, "-999999999" ~: hexInteger "-999999999" @?= -0x999999999, "aaaaaaaaaa" ~: hexInteger "aaaaaaaaaa" @?= 0xaaaaaaaaaa, "+aaaaaaaaaa" ~: hexInteger "+aaaaaaaaaa" @?= 0xaaaaaaaaaa, "-aaaaaaaaaa" ~: hexInteger "-aaaaaaaaaa" @?= -0xaaaaaaaaaa, "bbbbbbbbbbb" ~: hexInteger "bbbbbbbbbbb" @?= 0xbbbbbbbbbbb, "+bbbbbbbbbbb" ~: hexInteger "+bbbbbbbbbbb" @?= 0xbbbbbbbbbbb, "-bbbbbbbbbbb" ~: hexInteger "-bbbbbbbbbbb" @?= -0xbbbbbbbbbbb, "cccccccccccc" ~: hexInteger "cccccccccccc" @?= 0xcccccccccccc, "+cccccccccccc" ~: hexInteger "+cccccccccccc" @?= 0xcccccccccccc, "-cccccccccccc" ~: hexInteger "-cccccccccccc" @?= -0xcccccccccccc, "ddddddddddddd" ~: hexInteger "ddddddddddddd" @?= 0xddddddddddddd, "+ddddddddddddd" ~: hexInteger "+ddddddddddddd" @?= 0xddddddddddddd, "-ddddddddddddd" ~: hexInteger "-ddddddddddddd" @?= -0xddddddddddddd, "eeeeeeeeeeeeee" ~: hexInteger "eeeeeeeeeeeeee" @?= 0xeeeeeeeeeeeeee, "+eeeeeeeeeeeeee" ~: hexInteger "+eeeeeeeeeeeeee" @?= 0xeeeeeeeeeeeeee, "-eeeeeeeeeeeeee" ~: hexInteger "-eeeeeeeeeeeeee" @?= -0xeeeeeeeeeeeeee, "fffffffffffffff" ~: hexInteger "fffffffffffffff" @?= 0xfffffffffffffff, "+fffffffffffffff" ~: hexInteger "+fffffffffffffff" @?= 0xfffffffffffffff, "-fffffffffffffff" ~: hexInteger "-fffffffffffffff" @?= -0xfffffffffffffff ]
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, "-22" ~: hexInteger "-22" @?= -0x22, "333" ~: hexInteger "333" @?= 0x333, "+333" ~: hexInteger "+333" @?= 0x333, "-333" ~: hexInteger "-333" @?= -0x333, "4444" ~: hexInteger "4444" @?= 0x4444, "+4444" ~: hexInteger "+4444" @?= 0x4444, "-4444" ~: hexInteger "-4444" @?= -0x4444, "55555" ~: hexInteger "55555" @?= 0x55555, "+55555" ~: hexInteger "+55555" @?= 0x55555, "-55555" ~: hexInteger "-55555" @?= -0x55555, "666666" ~: hexInteger "666666" @?= 0x666666, "+666666" ~: hexInteger "+666666" @?= 0x666666, "-666666" ~: hexInteger "-666666" @?= -0x666666, "7777777" ~: hexInteger "7777777" @?= 0x7777777, "+7777777" ~: hexInteger "+7777777" @?= 0x7777777, "-7777777" ~: hexInteger "-7777777" @?= -0x7777777, "88888888" ~: hexInteger "88888888" @?= 0x88888888, "+88888888" ~: hexInteger "+88888888" @?= 0x88888888, "-88888888" ~: hexInteger "-88888888" @?= -0x88888888, "999999999" ~: hexInteger "999999999" @?= 0x999999999, "+999999999" ~: hexInteger "+999999999" @?= 0x999999999, "-999999999" ~: hexInteger "-999999999" @?= -0x999999999, "aaaaaaaaaa" ~: hexInteger "aaaaaaaaaa" @?= 0xaaaaaaaaaa, "+aaaaaaaaaa" ~: hexInteger "+aaaaaaaaaa" @?= 0xaaaaaaaaaa, "-aaaaaaaaaa" ~: hexInteger "-aaaaaaaaaa" @?= -0xaaaaaaaaaa, "bbbbbbbbbbb" ~: hexInteger "bbbbbbbbbbb" @?= 0xbbbbbbbbbbb, "+bbbbbbbbbbb" ~: hexInteger "+bbbbbbbbbbb" @?= 0xbbbbbbbbbbb, "-bbbbbbbbbbb" ~: hexInteger "-bbbbbbbbbbb" @?= -0xbbbbbbbbbbb, "cccccccccccc" ~: hexInteger "cccccccccccc" @?= 0xcccccccccccc, "+cccccccccccc" ~: hexInteger "+cccccccccccc" @?= 0xcccccccccccc, "-cccccccccccc" ~: hexInteger "-cccccccccccc" @?= -0xcccccccccccc, "ddddddddddddd" ~: hexInteger "ddddddddddddd" @?= 0xddddddddddddd, "+ddddddddddddd" ~: hexInteger "+ddddddddddddd" @?= 0xddddddddddddd, "-ddddddddddddd" ~: hexInteger "-ddddddddddddd" @?= -0xddddddddddddd, "eeeeeeeeeeeeee" ~: hexInteger "eeeeeeeeeeeeee" @?= 0xeeeeeeeeeeeeee, "+eeeeeeeeeeeeee" ~: hexInteger "+eeeeeeeeeeeeee" @?= 0xeeeeeeeeeeeeee, "-eeeeeeeeeeeeee" ~: hexInteger "-eeeeeeeeeeeeee" @?= -0xeeeeeeeeeeeeee, "fffffffffffffff" ~: hexInteger "fffffffffffffff" @?= 0xfffffffffffffff, "+fffffffffffffff" ~: hexInteger "+fffffffffffffff" @?= 0xfffffffffffffff, "-fffffffffffffff" ~: hexInteger "-fffffffffffffff" @?= -0xfffffffffffffff ]
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