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
justinethier/husk-scheme
hs-src/Language/Scheme/Core.hs
mit
eval env cont val@(Vector _) = continueEval env cont val Nothing
64
eval env cont val@(Vector _) = continueEval env cont val Nothing
64
eval env cont val@(Vector _) = continueEval env cont val Nothing
64
false
false
0
8
10
31
15
16
null
null
jwiegley/ghc-release
utils/haddock/src/Haddock/Backends/Xhtml/Decl.hs
gpl-3.0
ppFunLhType unicode qual ty = ppr_mono_ty pREC_FUN ty unicode qual
67
ppFunLhType unicode qual ty = ppr_mono_ty pREC_FUN ty unicode qual
67
ppFunLhType unicode qual ty = ppr_mono_ty pREC_FUN ty unicode qual
67
false
false
0
5
10
22
10
12
null
null
Axure/elm-compiler
src/Validate.hs
bsd-3-clause
extractValues :: D.ValidDecl -> ([A.Located String], [A.Located String]) extractValues (A.A (region, _) decl) = case decl of D.Definition (Valid.Definition pattern _ _) -> ( Pattern.boundVars pattern , [] ) D.Datatype name _ ctors -> ( map (A.A region . fst) ctors , [A...
721
extractValues :: D.ValidDecl -> ([A.Located String], [A.Located String]) extractValues (A.A (region, _) decl) = case decl of D.Definition (Valid.Definition pattern _ _) -> ( Pattern.boundVars pattern , [] ) D.Datatype name _ ctors -> ( map (A.A region . fst) ctors , [A...
721
extractValues (A.A (region, _) decl) = case decl of D.Definition (Valid.Definition pattern _ _) -> ( Pattern.boundVars pattern , [] ) D.Datatype name _ ctors -> ( map (A.A region . fst) ctors , [A.A region name] ) D.TypeAlias name _ (A.A _ (Type.RRecord _ ...
648
false
true
0
13
277
303
156
147
null
null
eddywestbrook/hobbits
src/Data/Binding/Hobbits/QQ.hs
bsd-3-clause
-- | Helper function to apply an expression to multiple arguments appEMulti :: Exp -> [Exp] -> Exp appEMulti = foldl AppE
121
appEMulti :: Exp -> [Exp] -> Exp appEMulti = foldl AppE
55
appEMulti = foldl AppE
22
true
true
0
7
21
26
14
12
null
null
rzil/honours
LeavittPathAlgebras/Example15.hs
mit
f2 = edge2 "f"
14
f2 = edge2 "f"
14
f2 = edge2 "f"
14
false
false
1
5
3
13
4
9
null
null
cdepillabout/ssh
src/SSH/Session.hs
bsd-3-clause
newChannelID :: Session Word32 newChannelID = gets ssChannels >>= return . findNext . M.keys where findNext :: [Word32] -> Word32 findNext ks = head . filter (not . (`elem` ks)) $ [0..]
195
newChannelID :: Session Word32 newChannelID = gets ssChannels >>= return . findNext . M.keys where findNext :: [Word32] -> Word32 findNext ks = head . filter (not . (`elem` ks)) $ [0..]
195
newChannelID = gets ssChannels >>= return . findNext . M.keys where findNext :: [Word32] -> Word32 findNext ks = head . filter (not . (`elem` ks)) $ [0..]
164
false
true
1
10
41
90
44
46
null
null
ghcjs/jsaddle-dom
src/JSDOM/Generated/WebGLRenderingContextBase.hs
mit
-- | <https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContextBase.getProgramParameter Mozilla WebGLRenderingContextBase.getProgramParameter documentation> getProgramParameter_ :: (MonadDOM m, IsWebGLRenderingContextBase self) => self -> Maybe WebGLProgram -> G...
518
getProgramParameter_ :: (MonadDOM m, IsWebGLRenderingContextBase self) => self -> Maybe WebGLProgram -> GLenum -> m () getProgramParameter_ self program pname = liftDOM (void ((toWebGLRenderingContextBase self) ^. jsf "getProgramParameter" [toJSVa...
347
getProgramParameter_ self program pname = liftDOM (void ((toWebGLRenderingContextBase self) ^. jsf "getProgramParameter" [toJSVal program, toJSVal pname]))
184
true
true
0
12
111
98
47
51
null
null
thasenpusch/scheme
syntax.hs
isc
numberIsExactInt :: Number -> Bool numberIsExactInt (LComplex x) = imagPart x == 0 && case realPart x of LInexact _ -> False LExact y -> isInt y
152
numberIsExactInt :: Number -> Bool numberIsExactInt (LComplex x) = imagPart x == 0 && case realPart x of LInexact _ -> False LExact y -> isInt y
152
numberIsExactInt (LComplex x) = imagPart x == 0 && case realPart x of LInexact _ -> False LExact y -> isInt y
117
false
true
0
9
34
63
29
34
null
null
geophf/1HaskellADay
exercises/HAD/Y2017/M01/D09/Exercise.hs
mit
pers2JSON :: Person -> ByteString pers2JSON pers = undefined
60
pers2JSON :: Person -> ByteString pers2JSON pers = undefined
60
pers2JSON pers = undefined
26
false
true
0
7
8
24
10
14
null
null
yupferris/write-you-a-haskell
chapter9/happy/Eval.hs
mit
binop Eql (VInt a) (VInt b) = return $ VBool (a==b)
51
binop Eql (VInt a) (VInt b) = return $ VBool (a==b)
51
binop Eql (VInt a) (VInt b) = return $ VBool (a==b)
51
false
false
0
8
10
41
19
22
null
null
erantapaa/test-spelling
src/Dictionary.hs
bsd-3-clause
backup db p | p <= 0 = 0 | BS.index db (p-1) == '\n' = p | otherwise = backup db (p-1)
127
backup db p | p <= 0 = 0 | BS.index db (p-1) == '\n' = p | otherwise = backup db (p-1)
127
backup db p | p <= 0 = 0 | BS.index db (p-1) == '\n' = p | otherwise = backup db (p-1)
127
false
false
1
11
63
73
34
39
null
null
koengit/zeldspar
tests/Examples.hs
bsd-3-clause
main = return ()
16
main = return ()
16
main = return ()
16
false
false
1
6
3
14
5
9
null
null
gridaphobe/ghc
compiler/types/Coercion.hs
bsd-3-clause
-- Note, mkAppCo is careful to maintain invariants regarding -- where Refl constructors appear; see the comments in the definition -- of Coercion and the Note [Refl invariant] in TyCoRep. -- | Applies multiple 'Coercion's to another 'Coercion', from left to right. -- See also 'mkAppCo'. mkAppCos :: Coercion -...
394
mkAppCos :: Coercion -> [Coercion] -> Coercion mkAppCos co1 cos = foldl mkAppCo co1 cos
105
mkAppCos co1 cos = foldl mkAppCo co1 cos
40
true
true
0
7
79
39
22
17
null
null
keera-studios/hssdl
Graphics/UI/SDL/Utilities.hs
bsd-3-clause
fromBitmask :: (Bounded a,Enum a b,Bits b,Num b) => b -> [a] fromBitmask mask = foldr worker [] lst where lst = enumFromTo minBound maxBound worker v = if (mask .&. fromEnum v) /= 0 then (:) v else id {- toBitmaskW :: (UnsignedEnum a) => [a] -> Word32 to...
634
fromBitmask :: (Bounded a,Enum a b,Bits b,Num b) => b -> [a] fromBitmask mask = foldr worker [] lst where lst = enumFromTo minBound maxBound worker v = if (mask .&. fromEnum v) /= 0 then (:) v else id {- toBitmaskW :: (UnsignedEnum a) => [a] -> Word32 to...
634
fromBitmask mask = foldr worker [] lst where lst = enumFromTo minBound maxBound worker v = if (mask .&. fromEnum v) /= 0 then (:) v else id {- toBitmaskW :: (UnsignedEnum a) => [a] -> Word32 toBitmaskW = foldr (.|.) 0 . map fromEnumW fromBitmaskW :: (Bo...
573
false
true
2
9
228
123
57
66
null
null
olorin/amazonka
amazonka-redshift/gen/Network/AWS/Redshift/Types/Product.hs
mpl-2.0
-- | The anticipated utilization of the reserved node, as defined in the -- reserved node offering. rnOfferingType :: Lens' ReservedNode (Maybe Text) rnOfferingType = lens _rnOfferingType (\ s a -> s{_rnOfferingType = a})
221
rnOfferingType :: Lens' ReservedNode (Maybe Text) rnOfferingType = lens _rnOfferingType (\ s a -> s{_rnOfferingType = a})
121
rnOfferingType = lens _rnOfferingType (\ s a -> s{_rnOfferingType = a})
71
true
true
0
9
33
47
26
21
null
null
zachsully/hakaru
haskell/Language/Hakaru/Parser/Parser.hs
bsd-3-clause
let_expr :: Parser (AST' Text) let_expr = localIndentation Ge (absoluteIndentation (try (Let <$> identifier <* reservedOp "=") <*> localIndentation Gt expr) <*> absoluteIndentation expr)
194
let_expr :: Parser (AST' Text) let_expr = localIndentation Ge (absoluteIndentation (try (Let <$> identifier <* reservedOp "=") <*> localIndentation Gt expr) <*> absoluteIndentation expr)
194
let_expr = localIndentation Ge (absoluteIndentation (try (Let <$> identifier <* reservedOp "=") <*> localIndentation Gt expr) <*> absoluteIndentation expr)
163
false
true
2
14
31
75
32
43
null
null
snoyberg/ghc
compiler/utils/Util.hs
bsd-3-clause
mapAccumL2 :: (s1 -> s2 -> a -> (s1, s2, b)) -> s1 -> s2 -> [a] -> (s1, s2, [b]) mapAccumL2 f s1 s2 xs = (s1', s2', ys) where ((s1', s2'), ys) = mapAccumL (\(s1, s2) x -> case f s1 s2 x of (s1', s2', y) -> ((s1', s2'), y)) (s1...
328
mapAccumL2 :: (s1 -> s2 -> a -> (s1, s2, b)) -> s1 -> s2 -> [a] -> (s1, s2, [b]) mapAccumL2 f s1 s2 xs = (s1', s2', ys) where ((s1', s2'), ys) = mapAccumL (\(s1, s2) x -> case f s1 s2 x of (s1', s2', y) -> ((s1', s2'), y)) (s1...
328
mapAccumL2 f s1 s2 xs = (s1', s2', ys) where ((s1', s2'), ys) = mapAccumL (\(s1, s2) x -> case f s1 s2 x of (s1', s2', y) -> ((s1', s2'), y)) (s1, s2) xs
247
false
true
0
12
149
171
99
72
null
null
markflorisson/hpack
testrepo/bytestring-0.10.4.1/Data/ByteString/Internal.hs
bsd-3-clause
-- for Hugs, NHC etc unsafeDupablePerformIO :: IO a -> a unsafeDupablePerformIO = unsafePerformIO
97
unsafeDupablePerformIO :: IO a -> a unsafeDupablePerformIO = unsafePerformIO
76
unsafeDupablePerformIO = unsafePerformIO
40
true
true
0
6
13
19
10
9
null
null
svenssonjoel/EmbArBB
Intel/ArBB/Backend/ArBB/CodeGen.hs
bsd-3-clause
isOpDynamic Scatter = True
26
isOpDynamic Scatter = True
26
isOpDynamic Scatter = True
26
false
false
0
5
3
9
4
5
null
null
grnet/snf-ganeti
src/Ganeti/OpParams.hs
bsd-2-clause
pClusterOsParamsPrivate :: Field pClusterOsParamsPrivate = withDoc "Cluster-wide private OS parameter defaults" . renameField "ClusterOsParamsPrivate" . optionalField $ -- This field needs an unique name to aid Python deserialization simpleField "osparams_private_cluster" [t| GenericContainer String (JSOb...
346
pClusterOsParamsPrivate :: Field pClusterOsParamsPrivate = withDoc "Cluster-wide private OS parameter defaults" . renameField "ClusterOsParamsPrivate" . optionalField $ -- This field needs an unique name to aid Python deserialization simpleField "osparams_private_cluster" [t| GenericContainer String (JSOb...
346
pClusterOsParamsPrivate = withDoc "Cluster-wide private OS parameter defaults" . renameField "ClusterOsParamsPrivate" . optionalField $ -- This field needs an unique name to aid Python deserialization simpleField "osparams_private_cluster" [t| GenericContainer String (JSObject (Private JSValue)) |]
313
false
true
0
8
50
40
21
19
null
null
vikraman/ghc
compiler/basicTypes/Literal.hs
bsd-3-clause
litTag (MachStr _) = 2
30
litTag (MachStr _) = 2
30
litTag (MachStr _) = 2
30
false
false
0
6
12
16
7
9
null
null
bergey/plots
src/Plots/Types/Others.hs
bsd-3-clause
linerangevPlot :: (Typeable b, Renderable (Path V2 Double) b, MonadState (Axis b c Double) m, BaseSpace c ~ V2) => (Double, Double) -> Double -> m () linerangevPlot a s = linePlot (createlinerangev a s)
240
linerangevPlot :: (Typeable b, Renderable (Path V2 Double) b, MonadState (Axis b c Double) m, BaseSpace c ~ V2) => (Double, Double) -> Double -> m () linerangevPlot a s = linePlot (createlinerangev a s)
240
linerangevPlot a s = linePlot (createlinerangev a s)
53
false
true
0
9
72
100
50
50
null
null
rubenpieters/gre-project
shared/src/GameState.hs
bsd-3-clause
newTimersAndEffs :: [Timer] -> ([(CardEffect, Origin)], [Timer]) newTimersAndEffs ts = partitionEithers $ tick <$> ts
117
newTimersAndEffs :: [Timer] -> ([(CardEffect, Origin)], [Timer]) newTimersAndEffs ts = partitionEithers $ tick <$> ts
117
newTimersAndEffs ts = partitionEithers $ tick <$> ts
52
false
true
0
10
14
53
28
25
null
null
brendanhay/gogol
gogol-dfareporting/gen/Network/Google/DFAReporting/Types/Product.hs
mpl-2.0
-- | Client billing code of this project. pClientBillingCode :: Lens' Project (Maybe Text) pClientBillingCode = lens _pClientBillingCode (\ s a -> s{_pClientBillingCode = a})
182
pClientBillingCode :: Lens' Project (Maybe Text) pClientBillingCode = lens _pClientBillingCode (\ s a -> s{_pClientBillingCode = a})
140
pClientBillingCode = lens _pClientBillingCode (\ s a -> s{_pClientBillingCode = a})
91
true
true
1
9
32
51
25
26
null
null
davdar/darailude
ghci-load/GHCILoad.hs
bsd-3-clause
extensionFlags ∷ BuildInfo → String extensionFlags = intercalate " " . map (\ s → "-X" ++ extensionCommand s) . defaultExtensions
129
extensionFlags ∷ BuildInfo → String extensionFlags = intercalate " " . map (\ s → "-X" ++ extensionCommand s) . defaultExtensions
129
extensionFlags = intercalate " " . map (\ s → "-X" ++ extensionCommand s) . defaultExtensions
93
false
true
0
11
20
44
22
22
null
null
anchor/snaplet-httpauth
test/SnapletTestsResponse.hs
bsd-3-clause
suite :: Spec suite = do describe "no auth" $ it "fetches a page without auth" $ req "/pub" "get" Nothing Nothing >>= expectHttpCode HT.ok200 describe "ifheader auth" $ do it "prompts for auth when none is provided" $ req "/ifheader" "get" Nothing Nothing >>=...
1,355
suite :: Spec suite = do describe "no auth" $ it "fetches a page without auth" $ req "/pub" "get" Nothing Nothing >>= expectHttpCode HT.ok200 describe "ifheader auth" $ do it "prompts for auth when none is provided" $ req "/ifheader" "get" Nothing Nothing >>=...
1,355
suite = do describe "no auth" $ it "fetches a page without auth" $ req "/pub" "get" Nothing Nothing >>= expectHttpCode HT.ok200 describe "ifheader auth" $ do it "prompts for auth when none is provided" $ req "/ifheader" "get" Nothing Nothing >>= e...
1,341
false
true
0
16
397
311
140
171
null
null
quyse/flaw
flaw-visual/Flaw/Visual.hs
mit
xyY2xyz :: (OfScalarType a, Vectorized a, Fractional a) => Node (Vec3 a) -> Program (Node (Vec3 a)) xyY2xyz xyY = temp $ cvec111 (z_ xyY * x_ xyY / y_ xyY) (z_ xyY) (z_ xyY * (1 - x_ xyY - y_ xyY) / y_ xyY)
212
xyY2xyz :: (OfScalarType a, Vectorized a, Fractional a) => Node (Vec3 a) -> Program (Node (Vec3 a)) xyY2xyz xyY = temp $ cvec111 (z_ xyY * x_ xyY / y_ xyY) (z_ xyY) (z_ xyY * (1 - x_ xyY - y_ xyY) / y_ xyY)
212
xyY2xyz xyY = temp $ cvec111 (z_ xyY * x_ xyY / y_ xyY) (z_ xyY) (z_ xyY * (1 - x_ xyY - y_ xyY) / y_ xyY)
112
false
true
0
12
51
141
65
76
null
null
randen/cabal
Cabal/Distribution/Simple/Compiler.hs
bsd-3-clause
extensionToFlag :: Compiler -> Extension -> Maybe Flag extensionToFlag comp ext = lookup ext (compilerExtensions comp)
118
extensionToFlag :: Compiler -> Extension -> Maybe Flag extensionToFlag comp ext = lookup ext (compilerExtensions comp)
118
extensionToFlag comp ext = lookup ext (compilerExtensions comp)
63
false
true
0
7
15
38
18
20
null
null
farrellm/advent-2016
src/Day24.hs
mit
moves :: MazeMap -> Grid -> MazeState -> [MazeState] moves m g MazeState {..} = do n <- opens g _position let (r, c) = n q = m ! r ! c [MazeState n (S.delete q _remaining)]
184
moves :: MazeMap -> Grid -> MazeState -> [MazeState] moves m g MazeState {..} = do n <- opens g _position let (r, c) = n q = m ! r ! c [MazeState n (S.delete q _remaining)]
184
moves m g MazeState {..} = do n <- opens g _position let (r, c) = n q = m ! r ! c [MazeState n (S.delete q _remaining)]
131
false
true
0
12
49
106
51
55
null
null
snoyberg/ghc
compiler/typecheck/TcType.hs
bsd-3-clause
tcSplitPredFunTy_maybe (FunTy arg res) | isPredTy arg = Just (arg, res)
73
tcSplitPredFunTy_maybe (FunTy arg res) | isPredTy arg = Just (arg, res)
73
tcSplitPredFunTy_maybe (FunTy arg res) | isPredTy arg = Just (arg, res)
73
false
false
0
8
12
35
16
19
null
null
martinra/hlinear
src/HLinear/Hook/EchelonForm/Row.hs
gpl-3.0
sumRow :: EchelonFormRow a -> Vector a -> EchelonFormRow a sumRow (EchelonFormRow o v) v' = EchelonFormRow o $ v <> v'
118
sumRow :: EchelonFormRow a -> Vector a -> EchelonFormRow a sumRow (EchelonFormRow o v) v' = EchelonFormRow o $ v <> v'
118
sumRow (EchelonFormRow o v) v' = EchelonFormRow o $ v <> v'
59
false
true
0
7
21
52
24
28
null
null
olsner/ghc
compiler/typecheck/TcDerivUtils.hs
bsd-3-clause
isDerivSpecAnyClass (DerivSpecAnyClass{}) = True
48
isDerivSpecAnyClass (DerivSpecAnyClass{}) = True
48
isDerivSpecAnyClass (DerivSpecAnyClass{}) = True
48
false
false
0
7
3
16
8
8
null
null
Qu4tro/CP
CP.hs
mit
istl = (swap -|- swap) . distr . swap
38
distl = (swap -|- swap) . distr . swap
38
distl = (swap -|- swap) . distr . swap
38
false
false
2
6
9
25
11
14
null
null
rahulmutt/ghcvm
compiler/Eta/TypeCheck/TcEvidence.hs
bsd-3-clause
mkTcSymCo (TcSymCo co) = co
30
mkTcSymCo (TcSymCo co) = co
30
mkTcSymCo (TcSymCo co) = co
30
false
false
0
7
7
15
7
8
null
null
ghcjs/jsaddle-dom
src/JSDOM/Generated/FontFace.hs
mit
-- | <https://developer.mozilla.org/en-US/docs/Web/API/FontFace.unicodeRange Mozilla FontFace.unicodeRange documentation> getUnicodeRange :: (MonadDOM m, FromJSString result) => FontFace -> m result getUnicodeRange self = liftDOM ((self ^. js "unicodeRange") >>= fromJSValUnchecked)
301
getUnicodeRange :: (MonadDOM m, FromJSString result) => FontFace -> m result getUnicodeRange self = liftDOM ((self ^. js "unicodeRange") >>= fromJSValUnchecked)
178
getUnicodeRange self = liftDOM ((self ^. js "unicodeRange") >>= fromJSValUnchecked)
85
true
true
0
10
45
57
29
28
null
null
ihc/futhark
src/Language/Futhark/Attributes.hs
isc
maskAliases (Record ets) (RecordDiet ds) = Record $ M.intersectionWith maskAliases ets ds
91
maskAliases (Record ets) (RecordDiet ds) = Record $ M.intersectionWith maskAliases ets ds
91
maskAliases (Record ets) (RecordDiet ds) = Record $ M.intersectionWith maskAliases ets ds
91
false
false
0
7
13
36
17
19
null
null
urbanslug/ghc
compiler/prelude/THNames.hs
bsd-3-clause
rationalLIdKey = mkPreludeMiscIdUnique 227
45
rationalLIdKey = mkPreludeMiscIdUnique 227
45
rationalLIdKey = mkPreludeMiscIdUnique 227
45
false
false
1
5
6
12
4
8
null
null
hamishmack/haskell-gi
lib/Data/GI/GIR/Arg.hs
lgpl-2.1
parseScope "async" = return ScopeTypeAsync
42
parseScope "async" = return ScopeTypeAsync
42
parseScope "async" = return ScopeTypeAsync
42
false
false
0
5
4
12
5
7
null
null
izimbra/PLT2014
mini/haskell/AnnotatingTypeChecker.hs
gpl-2.0
lookupVar :: Env -> Ident -> Err Type lookupVar [] x = fail $ "Unknown variable " ++ printTree x ++ "."
103
lookupVar :: Env -> Ident -> Err Type lookupVar [] x = fail $ "Unknown variable " ++ printTree x ++ "."
103
lookupVar [] x = fail $ "Unknown variable " ++ printTree x ++ "."
65
false
true
2
9
21
50
22
28
null
null
ezyang/ghc
compiler/nativeGen/SPARC/Ppr.hs
bsd-3-clause
pprInstr (FxTOy format1 format2 reg1 reg2) = hcat [ text "\tf", ptext (case format1 of II32 -> sLit "ito" FF32 -> sLit "sto" FF64 -> sLit "dto" _ -> panic "SPARC.Ppr.pprInstr.FxToY: no match"), ptext (case format2 of ...
553
pprInstr (FxTOy format1 format2 reg1 reg2) = hcat [ text "\tf", ptext (case format1 of II32 -> sLit "ito" FF32 -> sLit "sto" FF64 -> sLit "dto" _ -> panic "SPARC.Ppr.pprInstr.FxToY: no match"), ptext (case format2 of ...
553
pprInstr (FxTOy format1 format2 reg1 reg2) = hcat [ text "\tf", ptext (case format1 of II32 -> sLit "ito" FF32 -> sLit "sto" FF64 -> sLit "dto" _ -> panic "SPARC.Ppr.pprInstr.FxToY: no match"), ptext (case format2 of ...
553
false
false
0
12
241
152
72
80
null
null
leventdinckal/haskell-nvd3
src/Graphics/NVD3/Writer.hs
bsd-3-clause
b :: Text -> B.Builder b = B.fromLazyText
41
b :: Text -> B.Builder b = B.fromLazyText
41
b = B.fromLazyText
18
false
true
0
8
7
26
11
15
null
null
mgsloan/lenq
src/Language/Lenq.hs
bsd-3-clause
-- | Convenience function to build a bijection quasi-quoter configuration from -- stuff that's convertible to expressions. See "Language.Haskell.TH.Build". mkLenqConf :: (Convertible a ExpQ, Convertible b ExpQ, Convertible c ExpQ) => a -> b -> c -> LenqConf mkLenqConf c g s = LenqConf (convert c) (convert...
335
mkLenqConf :: (Convertible a ExpQ, Convertible b ExpQ, Convertible c ExpQ) => a -> b -> c -> LenqConf mkLenqConf c g s = LenqConf (convert c) (convert g) (convert s)
176
mkLenqConf c g s = LenqConf (convert c) (convert g) (convert s)
63
true
true
0
8
63
84
43
41
null
null
ulricha/dsh
src/Database/DSH/VSL/Opt/Rewrite/Redundant.hs
bsd-3-clause
-------------------------------------------------------------------------------- -- Rewrites that deal with nested structures and propagation vectors. -------------------------------------------------------------------------------- -- Eliminating operators whose output is not required -- notReqNumber ::VSLRule TExpr ...
2,052
selectCartProd ::VSLRule TExpr TExpr () selectCartProd q = $(dagPatMatch 'q "R1 (Select p (R1 ((q1) CartProduct (q2))))" [| do TBinApp (SBRelOp op) e1 e2 <- return $(v "p") -- The left operand column has to be from the left input, the -- right operand from the right input. predica...
816
selectCartProd q = $(dagPatMatch 'q "R1 (Select p (R1 ((q1) CartProduct (q2))))" [| do TBinApp (SBRelOp op) e1 e2 <- return $(v "p") -- The left operand column has to be from the left input, the -- right operand from the right input. predicate $ idxOnly (== First) e1 predi...
776
true
true
0
7
502
60
42
18
null
null
ganeti/ganeti
src/Ganeti/Locking/Locks.hs
bsd-2-clause
-- | Obtain the ClientID from its JSON representation. clientIdFromJSON :: J.JSValue -> J.Result ClientId clientIdFromJSON (J.JSArray [clienttp, J.JSString lf, pid]) = ClientId <$> J.readJSON clienttp <*> pure (J.fromJSString lf) <*> liftM fromIntegral (J.readJSON pid :: J.Result Integer)
302
clientIdFromJSON :: J.JSValue -> J.Result ClientId clientIdFromJSON (J.JSArray [clienttp, J.JSString lf, pid]) = ClientId <$> J.readJSON clienttp <*> pure (J.fromJSString lf) <*> liftM fromIntegral (J.readJSON pid :: J.Result Integer)
247
clientIdFromJSON (J.JSArray [clienttp, J.JSString lf, pid]) = ClientId <$> J.readJSON clienttp <*> pure (J.fromJSString lf) <*> liftM fromIntegral (J.readJSON pid :: J.Result Integer)
196
true
true
5
12
50
106
51
55
null
null
pepeiborra/yices-0.0.0.12
Math/SMT/Yices/Syntax.hs
bsd-3-clause
showCmdY (DEFTYP tname Nothing) = paren $ showString "define-type " . showString tname
86
showCmdY (DEFTYP tname Nothing) = paren $ showString "define-type " . showString tname
86
showCmdY (DEFTYP tname Nothing) = paren $ showString "define-type " . showString tname
86
false
false
0
7
12
32
14
18
null
null
bartavelle/pcre-utils
Text/Regex/PCRE/ByteString/Utils.hs
bsd-3-clause
regexpUnmatched :: [RegexpSplit a] -> [a] regexpUnmatched = regexpAll . filter (not . isMatched)
96
regexpUnmatched :: [RegexpSplit a] -> [a] regexpUnmatched = regexpAll . filter (not . isMatched)
96
regexpUnmatched = regexpAll . filter (not . isMatched)
54
false
true
0
8
13
38
20
18
null
null
DarrenMowat/blackbox
tests/results/SplitTests.hs
unlicense
test0 (Just x) = 0
18
test0 (Just x) = 0
18
test0 (Just x) = 0
18
false
false
0
6
4
16
7
9
null
null
dmp1ce/Haskell-Programming-Exercises
Chapter 14/addition/Addition.hs
unlicense
genBool :: Gen Bool genBool = choose (False, True)
50
genBool :: Gen Bool genBool = choose (False, True)
50
genBool = choose (False, True)
30
false
true
0
6
8
23
12
11
null
null
AlexeyRaga/eta
compiler/ETA/Prelude/PrimOp.hs
bsd-3-clause
primOpInfo UnsafeThawArrayOp = mkGenPrimOp (fsLit "unsafeThawArray#") [alphaTyVar, deltaTyVar] [mkArrayPrimTy alphaTy, mkStatePrimTy deltaTy] ((mkTupleTy UnboxedTuple [mkStatePrimTy deltaTy, mkMutableArrayPrimTy deltaTy alphaTy]))
231
primOpInfo UnsafeThawArrayOp = mkGenPrimOp (fsLit "unsafeThawArray#") [alphaTyVar, deltaTyVar] [mkArrayPrimTy alphaTy, mkStatePrimTy deltaTy] ((mkTupleTy UnboxedTuple [mkStatePrimTy deltaTy, mkMutableArrayPrimTy deltaTy alphaTy]))
231
primOpInfo UnsafeThawArrayOp = mkGenPrimOp (fsLit "unsafeThawArray#") [alphaTyVar, deltaTyVar] [mkArrayPrimTy alphaTy, mkStatePrimTy deltaTy] ((mkTupleTy UnboxedTuple [mkStatePrimTy deltaTy, mkMutableArrayPrimTy deltaTy alphaTy]))
231
false
false
0
10
19
68
34
34
null
null
damoxc/ganeti
src/Ganeti/HTools/Program/Hcheck.hs
gpl-2.0
-- | Data showed per group. groupData :: [(String, String)] groupData = commonData ++ [("SCORE", "Group score")]
112
groupData :: [(String, String)] groupData = commonData ++ [("SCORE", "Group score")]
84
groupData = commonData ++ [("SCORE", "Group score")]
52
true
true
0
7
16
34
21
13
null
null
mumuki/mulang
src/Language/Mulang/Ast/Visitor.hs
gpl-3.0
extractTerminal Self = True
42
extractTerminal Self = True
42
extractTerminal Self = True
42
false
false
0
5
18
9
4
5
null
null
elben/typing-haskell-in-haskell
StaticPrelude.hs
bsd-3-clause
tEither = TCon (Tycon "Either" (Kfun Star (Kfun Star Star)))
62
tEither = TCon (Tycon "Either" (Kfun Star (Kfun Star Star)))
62
tEither = TCon (Tycon "Either" (Kfun Star (Kfun Star Star)))
62
false
false
0
11
11
33
16
17
null
null
ohua-dev/ohua-core
test-tools/src/Ohua/Test/DFGraph.hs
epl-1.0
isIsomorphic :: (Eq a, Ord b) => Gr a b -> Gr a b -> Bool isIsomorphic gr1 gr2 = isJust $ isomorphicMapping gr1 gr2
115
isIsomorphic :: (Eq a, Ord b) => Gr a b -> Gr a b -> Bool isIsomorphic gr1 gr2 = isJust $ isomorphicMapping gr1 gr2
115
isIsomorphic gr1 gr2 = isJust $ isomorphicMapping gr1 gr2
57
false
true
0
8
24
58
28
30
null
null
perryleo/sicp
ch1/sicpc1e41.hs
mit
-- Increase one number by 1 inc x = x + 1
41
inc x = x + 1
13
inc x = x + 1
13
true
false
3
5
11
19
7
12
null
null
sgillespie/ghc
compiler/typecheck/TcGenDeriv.hs
bsd-3-clause
prefix_RDR = dataQual_RDR gENERICS (fsLit "Prefix")
55
prefix_RDR = dataQual_RDR gENERICS (fsLit "Prefix")
55
prefix_RDR = dataQual_RDR gENERICS (fsLit "Prefix")
55
false
false
0
7
9
17
8
9
null
null
OS2World/DEV-UTIL-HUGS
oldlib/LeftistHeap.hs
bsd-3-clause
size :: Ord a => Heap a -> Int size h = sz h 0 where sz E i = i sz (L _ _ a b) i = sz a (sz b (i + 1))
112
size :: Ord a => Heap a -> Int size h = sz h 0 where sz E i = i sz (L _ _ a b) i = sz a (sz b (i + 1))
112
size h = sz h 0 where sz E i = i sz (L _ _ a b) i = sz a (sz b (i + 1))
81
false
true
1
9
45
87
42
45
null
null
phischu/fragnix
tests/packages/scotty/Data.ByteString.Unsafe.hs
bsd-3-clause
-- | /O(1)/ 'unsafePackAddressLen' provides constant-time construction of -- 'ByteString's, which is ideal for string literals. It packs a sequence -- of bytes into a @ByteString@, given a raw 'Addr#' to the string, and -- the length of the string. -- -- This function is /unsafe/ in two ways: -- -- * the length argumen...
790
unsafePackAddressLen :: Int -> Addr# -> IO ByteString unsafePackAddressLen len addr# = do p <- newForeignPtr_ (Ptr addr#) return $ PS p 0 len
150
unsafePackAddressLen len addr# = do p <- newForeignPtr_ (Ptr addr#) return $ PS p 0 len
96
true
true
0
10
144
74
43
31
null
null
olsner/ghc
testsuite/tests/programs/life_space_leak/Main.hs
bsd-3-clause
map1 f (C1 x xs) = C1 (f x) (map1 f xs)
39
map1 f (C1 x xs) = C1 (f x) (map1 f xs)
39
map1 f (C1 x xs) = C1 (f x) (map1 f xs)
39
false
false
0
7
11
40
18
22
null
null
kawamuray/ganeti
src/Ganeti/HTools/Cluster.hs
gpl-2.0
-- | Given a list of commands, prefix them with @gnt-instance@ and -- also beautify the display a little. formatJob :: Int -> Int -> (Int, MoveJob) -> [String] formatJob jsn jsl (sn, (_, _, _, cmds)) = let out = printf " echo job %d/%d" jsn sn: printf " check": map (" gnt-instance " ++) cmd...
419
formatJob :: Int -> Int -> (Int, MoveJob) -> [String] formatJob jsn jsl (sn, (_, _, _, cmds)) = let out = printf " echo job %d/%d" jsn sn: printf " check": map (" gnt-instance " ++) cmds in if sn == 1 then ["", printf "echo jobset %d, %d jobs" jsn jsl] ++ out else out
313
formatJob jsn jsl (sn, (_, _, _, cmds)) = let out = printf " echo job %d/%d" jsn sn: printf " check": map (" gnt-instance " ++) cmds in if sn == 1 then ["", printf "echo jobset %d, %d jobs" jsn jsl] ++ out else out
259
true
true
0
11
120
126
69
57
null
null
brendanhay/gogol
gogol-sheets/gen/Network/Google/Sheets/Types/Product.hs
mpl-2.0
-- | The criteria for showing\/hiding values per column. The map\'s key is -- the column index, and the value is the criteria for that column. This -- field is deprecated in favor of filter_specs. bfCriteria :: Lens' BasicFilter (Maybe BasicFilterCriteria) bfCriteria = lens _bfCriteria (\ s a -> s{_bfCriteria = a})
318
bfCriteria :: Lens' BasicFilter (Maybe BasicFilterCriteria) bfCriteria = lens _bfCriteria (\ s a -> s{_bfCriteria = a})
121
bfCriteria = lens _bfCriteria (\ s a -> s{_bfCriteria = a})
61
true
true
1
9
53
54
27
27
null
null
strburst/haskell-stuff
surjectionLatex.hs
mit
-- This experiment generates LaTex code representing the Stirling number of the -- second kind, which is the number of surjections from m things to k things main = do input <- getLine let m = read (words input !! 0) k = read (words input !! 1) putStrLn $ surjectionLatex m k
294
main = do input <- getLine let m = read (words input !! 0) k = read (words input !! 1) putStrLn $ surjectionLatex m k
137
main = do input <- getLine let m = read (words input !! 0) k = read (words input !! 1) putStrLn $ surjectionLatex m k
137
true
false
0
13
72
67
32
35
null
null
ghcjs/jsaddle-dom
src/JSDOM/Generated/HTMLDivElement.hs
mit
-- | <https://developer.mozilla.org/en-US/docs/Web/API/HTMLDivElement.align Mozilla HTMLDivElement.align documentation> getAlign :: (MonadDOM m, FromJSString result) => HTMLDivElement -> m result getAlign self = liftDOM ((self ^. js "align") >>= fromJSValUnchecked)
277
getAlign :: (MonadDOM m, FromJSString result) => HTMLDivElement -> m result getAlign self = liftDOM ((self ^. js "align") >>= fromJSValUnchecked)
156
getAlign self = liftDOM ((self ^. js "align") >>= fromJSValUnchecked)
71
true
true
0
10
38
57
29
28
null
null
unisonweb/platform
parser-typechecker/src/Unison/Runtime/Pattern.hs
mit
builtinCase :: Set Reference builtinCase = Set.fromList [ Rf.intRef , Rf.natRef , Rf.floatRef , Rf.textRef , Rf.charRef ]
135
builtinCase :: Set Reference builtinCase = Set.fromList [ Rf.intRef , Rf.natRef , Rf.floatRef , Rf.textRef , Rf.charRef ]
135
builtinCase = Set.fromList [ Rf.intRef , Rf.natRef , Rf.floatRef , Rf.textRef , Rf.charRef ]
106
false
true
0
6
31
46
24
22
null
null
rueshyna/gogol
gogol-compute/gen/Network/Google/Compute/Types/Product.hs
mpl-2.0
-- | Creates a value of 'VPNTunnelsScopedList' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'vtslVPNTunnels' -- -- * 'vtslWarning' vpnTunnelsScopedList :: VPNTunnelsScopedList vpnTunnelsScopedList = VPNTunnelsScopedList' ...
383
vpnTunnelsScopedList :: VPNTunnelsScopedList vpnTunnelsScopedList = VPNTunnelsScopedList' { _vtslVPNTunnels = Nothing , _vtslWarning = Nothing }
164
vpnTunnelsScopedList = VPNTunnelsScopedList' { _vtslVPNTunnels = Nothing , _vtslWarning = Nothing }
115
true
true
0
7
72
42
24
18
null
null
8l/barrelfish
hake/ARMv7.hs
mit
cxxlinker = ArchDefaults.cxxlinker arch cxxcompiler
51
cxxlinker = ArchDefaults.cxxlinker arch cxxcompiler
51
cxxlinker = ArchDefaults.cxxlinker arch cxxcompiler
51
false
false
1
6
4
16
6
10
null
null
black0range/BufferedSocket
Network/BufferedSocket/Reader.hs
mit
readTextLazy:: BS.BufferedSocket -> BS.ReadSize -> IO TL.Text readTextLazy bSocket readSize = do byteData <- BS.readLazy bSocket readSize return $ ENCL.decodeUtf8With (ENCERROR.replace '\xfffd') byteData
211
readTextLazy:: BS.BufferedSocket -> BS.ReadSize -> IO TL.Text readTextLazy bSocket readSize = do byteData <- BS.readLazy bSocket readSize return $ ENCL.decodeUtf8With (ENCERROR.replace '\xfffd') byteData
211
readTextLazy bSocket readSize = do byteData <- BS.readLazy bSocket readSize return $ ENCL.decodeUtf8With (ENCERROR.replace '\xfffd') byteData
149
false
true
0
11
30
69
32
37
null
null
mightymoose/liquidhaskell
src/Language/Haskell/Liquid/PrettyPrint.hs
bsd-3-clause
ppr_rty_fun bb prefix t = prefix <+> ppr_rty_fun' bb t
56
ppr_rty_fun bb prefix t = prefix <+> ppr_rty_fun' bb t
56
ppr_rty_fun bb prefix t = prefix <+> ppr_rty_fun' bb t
56
false
false
0
6
11
22
10
12
null
null
ekr/tamarin-prover
lib/utils/src/Utils/Misc.hs
gpl-3.0
-- | @noDuplicates xs@ returns @True@ if the list @xs@ contains no duplicates noDuplicates :: (Ord a) => [a] -> Bool noDuplicates xs = all ((==1).length) . group . sort $ xs
173
noDuplicates :: (Ord a) => [a] -> Bool noDuplicates xs = all ((==1).length) . group . sort $ xs
95
noDuplicates xs = all ((==1).length) . group . sort $ xs
56
true
true
0
11
31
55
30
25
null
null
romac/mental
src/Mental/Tree/Untyped.hs
bsd-3-clause
getPos :: UntypedTree -> SourcePos getPos (pos :< _) = pos
58
getPos :: UntypedTree -> SourcePos getPos (pos :< _) = pos
58
getPos (pos :< _) = pos
23
false
true
0
9
10
31
14
17
null
null
zeyuanxy/hacker-rank
practice/fp/persistent-ds/minimum-multiple/minimum-multiple.hs
mit
query :: SegmentTree (M.Map Int Int) -> Int -> Int -> M.Map Int Int query Empty _ _ = getValue Empty
100
query :: SegmentTree (M.Map Int Int) -> Int -> Int -> M.Map Int Int query Empty _ _ = getValue Empty
100
query Empty _ _ = getValue Empty
32
false
true
0
9
20
58
26
32
null
null
ttylec/QLogic
src/QLogic/GeneralBoxes.hs
gpl-3.0
two :: a -> a -> Two a two a b = Two (a, b)
43
two :: a -> a -> Two a two a b = Two (a, b)
43
two a b = Two (a, b)
20
false
true
0
8
14
40
19
21
null
null
mplamann/magic-spieler
src/CardSelector.hs
mit
selectYouControl cID (CardTarget tID) = (==) <$> playerControllingCard cID <*> playerControllingCard tID
106
selectYouControl cID (CardTarget tID) = (==) <$> playerControllingCard cID <*> playerControllingCard tID
106
selectYouControl cID (CardTarget tID) = (==) <$> playerControllingCard cID <*> playerControllingCard tID
106
false
false
0
7
13
33
16
17
null
null
brunjlar/pell
Math/NumberTheory/Pell/PQa.hs
mit
reduced :: Integer -> Integer -> Integer -> Bool reduced x y dd | y > 0 = (dd >= y - x) && (dd < x + y) && (dd >= x) | otherwise = (dd < y - x) && (dd >= x + y) && (dd < x)
187
reduced :: Integer -> Integer -> Integer -> Bool reduced x y dd | y > 0 = (dd >= y - x) && (dd < x + y) && (dd >= x) | otherwise = (dd < y - x) && (dd >= x + y) && (dd < x)
187
reduced x y dd | y > 0 = (dd >= y - x) && (dd < x + y) && (dd >= x) | otherwise = (dd < y - x) && (dd >= x + y) && (dd < x)
138
false
true
0
10
65
131
65
66
null
null
purebred-mua/purebred
src/Purebred/Storage/Notmuch.hs
agpl-3.0
applyTagOp :: (ManageTags a) => TagOp -> a -> a applyTagOp (AddTag t) = addTags [t]
83
applyTagOp :: (ManageTags a) => TagOp -> a -> a applyTagOp (AddTag t) = addTags [t]
83
applyTagOp (AddTag t) = addTags [t]
35
false
true
0
7
15
43
22
21
null
null
DougBurke/swish
tests/RDFProofTest.hs
lgpl-2.1
simple6b :: RDFGraph simple6b = mkGr2 [ "_:Si3 rel:son pers:Ol4 ; \n" , " rel:son pers:Lo4 . \n" ]
146
simple6b :: RDFGraph simple6b = mkGr2 [ "_:Si3 rel:son pers:Ol4 ; \n" , " rel:son pers:Lo4 . \n" ]
146
simple6b = mkGr2 [ "_:Si3 rel:son pers:Ol4 ; \n" , " rel:son pers:Lo4 . \n" ]
125
false
true
0
6
66
20
11
9
null
null
rhaps0dy/nlp-labs
src/Classify.hs
mit
classifyWords :: M.Map T.Text T.Text -> [T.Text] -> [(T.Text, T.Text)] classifyWords m = map (\w -> (w, fromMaybe unknown $ M.lookup w m))
138
classifyWords :: M.Map T.Text T.Text -> [T.Text] -> [(T.Text, T.Text)] classifyWords m = map (\w -> (w, fromMaybe unknown $ M.lookup w m))
138
classifyWords m = map (\w -> (w, fromMaybe unknown $ M.lookup w m))
67
false
true
0
11
22
82
43
39
null
null
glguy/irc-core
src/Client/View/Mentions.hs
isc
-- | Generate the list of message lines marked important ordered by -- time. Each run of lines from the same channel will be grouped -- together. Messages are headed by their window, network, and channel. mentionsViewLines :: Int -> ClientState -> [Image'] mentionsViewLines w st = addMarkers w st entries where d...
744
mentionsViewLines :: Int -> ClientState -> [Image'] mentionsViewLines w st = addMarkers w st entries where detail = view clientDetailView st padAmt = view (clientConfig . configNickPadding) st palette = clientPalette st filt | clientIsFiltered st = clientFilter st (view wlText) | otherw...
539
mentionsViewLines w st = addMarkers w st entries where detail = view clientDetailView st padAmt = view (clientConfig . configNickPadding) st palette = clientPalette st filt | clientIsFiltered st = clientFilter st (view wlText) | otherwise = filter (\x -> WLImportant == view wl...
487
true
true
2
11
183
179
91
88
null
null
AndressaUmetsu/PapaEhPop
huffman/Huffman.hs
mit
removeDups (x:xs) | x `elem` xs = removeDups xs | otherwise = x : removeDups xs
94
removeDups (x:xs) | x `elem` xs = removeDups xs | otherwise = x : removeDups xs
94
removeDups (x:xs) | x `elem` xs = removeDups xs | otherwise = x : removeDups xs
94
false
false
1
8
30
45
22
23
null
null
sqd/haskell-C89-interpreter
Parse.hs
mit
spanParseStruct :: [String] -> (StructDefinition, [String]) spanParseStruct ("struct":name:x) = (StructDef name vars, rest) where (body, rest') = fst' extract $ spanBracket "{" "}" x vars = foldl (\l (Declaration (VarDecl type_ n _)) -> (type_, n):l ) [] $ parseCtlFlow body rest = case rest' of ";":...
369
spanParseStruct :: [String] -> (StructDefinition, [String]) spanParseStruct ("struct":name:x) = (StructDef name vars, rest) where (body, rest') = fst' extract $ spanBracket "{" "}" x vars = foldl (\l (Declaration (VarDecl type_ n _)) -> (type_, n):l ) [] $ parseCtlFlow body rest = case rest' of ";":...
369
spanParseStruct ("struct":name:x) = (StructDef name vars, rest) where (body, rest') = fst' extract $ spanBracket "{" "}" x vars = foldl (\l (Declaration (VarDecl type_ n _)) -> (type_, n):l ) [] $ parseCtlFlow body rest = case rest' of ";":xs -> xs t:";":xs -> [name, t, ";"] ++ xs
309
false
true
0
14
83
181
97
84
null
null
mcschroeder/smc
Formula.hs
mit
ors :: [Formula] -> Formula ors [] = Lit (Pos 0)
52
ors :: [Formula] -> Formula ors [] = Lit (Pos 0)
52
ors [] = Lit (Pos 0)
24
false
true
0
8
14
37
17
20
null
null
snapframework/snap-core
test/Snap/Util/FileUploads/Tests.hs
bsd-3-clause
testSuccessUtf8Filename :: Test testSuccessUtf8Filename = testCase "fileUploads/utf8-filename" $ harness tmpdir hndl utf8FilenameBody where tmpdir = "tempdir3" hndl = do xs <- handleFileUploads tmpdir defaultUploadPolicy ...
606
testSuccessUtf8Filename :: Test testSuccessUtf8Filename = testCase "fileUploads/utf8-filename" $ harness tmpdir hndl utf8FilenameBody where tmpdir = "tempdir3" hndl = do xs <- handleFileUploads tmpdir defaultUploadPolicy ...
606
testSuccessUtf8Filename = testCase "fileUploads/utf8-filename" $ harness tmpdir hndl utf8FilenameBody where tmpdir = "tempdir3" hndl = do xs <- handleFileUploads tmpdir defaultUploadPolicy (const $ allowWithMax...
574
false
true
2
14
203
105
50
55
null
null
Motions/motions
src/Bio/Motions/PDB/Backend.hs
apache-2.0
getMove' :: MonadIO m => PDBReader -> Dump -> m (Maybe Move) getMove' reader dump = eitherFail "PDB read error: " . runExceptT $ getFrame reader >>= mapM (either diffError return . diffDumps dump) where diffError e = throwError $ "adjacent frames don't match: " ++ e
277
getMove' :: MonadIO m => PDBReader -> Dump -> m (Maybe Move) getMove' reader dump = eitherFail "PDB read error: " . runExceptT $ getFrame reader >>= mapM (either diffError return . diffDumps dump) where diffError e = throwError $ "adjacent frames don't match: " ++ e
277
getMove' reader dump = eitherFail "PDB read error: " . runExceptT $ getFrame reader >>= mapM (either diffError return . diffDumps dump) where diffError e = throwError $ "adjacent frames don't match: " ++ e
216
false
true
0
10
57
95
44
51
null
null
spechub/Hets
Comorphisms/KnownProvers.hs
gpl-2.0
-- | a map of known prover names implemanting a GUI interface knownProversGUI :: Result KnownProversMap knownProversGUI = knownProversWithKind ProveGUI
151
knownProversGUI :: Result KnownProversMap knownProversGUI = knownProversWithKind ProveGUI
89
knownProversGUI = knownProversWithKind ProveGUI
47
true
true
0
5
19
18
9
9
null
null
notae/haskell-exercise
cp/TypedCP.hs
bsd-3-clause
f3 :: FDValue a => a -> String f3 a = show a ++ ":" ++ show (a == a)
68
f3 :: FDValue a => a -> String f3 a = show a ++ ":" ++ show (a == a)
68
f3 a = show a ++ ":" ++ show (a == a)
37
false
true
4
8
19
53
23
30
null
null
smlsharp/smlsharp
benchmark/benchmarks_parallel/nqueen/nqueen_ghc_par.hs
mit
rep size cutOff n = do t1 <- getCurrentTime r <- evaluate $ doit cutOff size t2 <- getCurrentTime putStrLn $ " - {result: " ++ show 0 ++ ", time: " ++ show (t2 `diffUTCTime` t1) ++ "}" rep size cutOff (n - 1)
246
rep size cutOff n = do t1 <- getCurrentTime r <- evaluate $ doit cutOff size t2 <- getCurrentTime putStrLn $ " - {result: " ++ show 0 ++ ", time: " ++ show (t2 `diffUTCTime` t1) ++ "}" rep size cutOff (n - 1)
246
rep size cutOff n = do t1 <- getCurrentTime r <- evaluate $ doit cutOff size t2 <- getCurrentTime putStrLn $ " - {result: " ++ show 0 ++ ", time: " ++ show (t2 `diffUTCTime` t1) ++ "}" rep size cutOff (n - 1)
246
false
false
0
11
82
98
46
52
null
null
pranjaltale16/codeworld
codeworld-compiler/src/CodeWorld/Compile/Stages.hs
apache-2.0
isGoodExpAppRhs _ = False
25
isGoodExpAppRhs _ = False
25
isGoodExpAppRhs _ = False
25
false
false
0
5
3
9
4
5
null
null
shlevy/ghc
compiler/nativeGen/PPC/CodeGen.hs
bsd-3-clause
genCCall' :: DynFlags -> GenCCallPlatform -> ForeignTarget -- function to call -> [CmmFormal] -- where to put the result -> [CmmActual] -- arguments (of mixed type) -> NatM InstrBlock {- The PowerPC calling convention for Darwin/Mac OS X is described in Apple's ...
24,130
genCCall' :: DynFlags -> GenCCallPlatform -> ForeignTarget -- function to call -> [CmmFormal] -- where to put the result -> [CmmActual] -- arguments (of mixed type) -> NatM InstrBlock genCCall' dflags gcp target dest_regs args = ASSERT(not $ any (`elem` [II16]) $ map c...
21,709
genCCall' dflags gcp target dest_regs args = ASSERT(not $ any (`elem` [II16]) $ map cmmTypeFormat argReps) -- we rely on argument promotion in the codeGen do (finalStack,passArgumentsCode,usedRegs) <- passArguments (zip args argReps) ...
21,476
true
true
208
29
11,848
4,350
2,213
2,137
null
null
Athas/Sindre
Sindre/Compiler.hs
mit
runtimeError :: Compiler m (String -> Execution m a) runtimeError = do pos <- position <$> asks currentPos return $ \s -> fail $ pos ++ s
155
runtimeError :: Compiler m (String -> Execution m a) runtimeError = do pos <- position <$> asks currentPos return $ \s -> fail $ pos ++ s
155
runtimeError = do pos <- position <$> asks currentPos return $ \s -> fail $ pos ++ s
102
false
true
1
10
44
66
30
36
null
null
haskell-opengl/OpenGLRaw
src/Graphics/GL/Functions/F30.hs
bsd-3-clause
ptr_glVertexAttrib4dvARB :: FunPtr (GLuint -> Ptr GLdouble -> IO ()) ptr_glVertexAttrib4dvARB = unsafePerformIO $ getCommand "glVertexAttrib4dvARB"
147
ptr_glVertexAttrib4dvARB :: FunPtr (GLuint -> Ptr GLdouble -> IO ()) ptr_glVertexAttrib4dvARB = unsafePerformIO $ getCommand "glVertexAttrib4dvARB"
147
ptr_glVertexAttrib4dvARB = unsafePerformIO $ getCommand "glVertexAttrib4dvARB"
78
false
true
0
10
15
40
19
21
null
null
cornell-pl/HsAdapton
weak-hashtables/benchmark/src/Criterion/Collection/Main.hs
bsd-3-clause
-- Fixme: fold chart output into config and generalize to other post-processing -- functions (like alternative chart types and CSV output) runBenchmark :: (NFData op) => MeasurementMode -> WorkloadMode -> Benchmark op -> CriterionCollectionConfig -> Maybe...
801
runBenchmark :: (NFData op) => MeasurementMode -> WorkloadMode -> Benchmark op -> CriterionCollectionConfig -> Maybe FilePath -> IO () runBenchmark mMode wMode benchmark (Cfg cfg logPlot) fp = withConfig cfg $ do rng <- liftIO $ R.wi...
662
runBenchmark mMode wMode benchmark (Cfg cfg logPlot) fp = withConfig cfg $ do rng <- liftIO $ R.withSystemRandom (\r -> return r :: IO GenIO) env <- measureEnvironment plotData <- takeSamples mMode wMode benchmark env rng liftIO $ mkChart logPlot (benchmarkName benchmark) fp plotData lift...
449
true
true
0
13
202
180
86
94
null
null
lambdageek/insomnia
src/Insomnia/Typecheck/Expr.hs
bsd-3-clause
unifyAnn _ _ = return ()
24
unifyAnn _ _ = return ()
24
unifyAnn _ _ = return ()
24
false
false
0
6
5
16
7
9
null
null
ezyang/ghc
compiler/cmm/Hoopl/Label.hs
bsd-3-clause
lookupFact :: Label -> FactBase f -> Maybe f lookupFact = mapLookup
67
lookupFact :: Label -> FactBase f -> Maybe f lookupFact = mapLookup
67
lookupFact = mapLookup
22
false
true
0
8
11
31
13
18
null
null
raphaelmor/99HaskellProblems
1-10.hs
mit
myLength (x:xs) = 1 + (myLength xs)
35
myLength (x:xs) = 1 + (myLength xs)
35
myLength (x:xs) = 1 + (myLength xs)
35
false
false
0
7
6
26
13
13
null
null
Baranowski/SourceGraph
Analyse.hs
gpl-3.0
mods = (dg', R.Bold txt) where dg' = DG "legend_mods" (Text "Module Import") dg dg = mkLegendGraph ns es nAs = [shape Tab, fillColor defaultNodeColor] ns = [ (1, toLabel m1 : nAs) , (2, toLabel m2 : nAs) ] m1 = "Foo" m2 = "Bar" es = [(1,2,[])] tx...
544
mods = (dg', R.Bold txt) where dg' = DG "legend_mods" (Text "Module Import") dg dg = mkLegendGraph ns es nAs = [shape Tab, fillColor defaultNodeColor] ns = [ (1, toLabel m1 : nAs) , (2, toLabel m2 : nAs) ] m1 = "Foo" m2 = "Bar" es = [(1,2,[])] tx...
544
mods = (dg', R.Bold txt) where dg' = DG "legend_mods" (Text "Module Import") dg dg = mkLegendGraph ns es nAs = [shape Tab, fillColor defaultNodeColor] ns = [ (1, toLabel m1 : nAs) , (2, toLabel m2 : nAs) ] m1 = "Foo" m2 = "Bar" es = [(1,2,[])] tx...
544
false
false
7
9
253
182
95
87
null
null
pbrisbin/renters-reality
Handler/Feed.hs
bsd-2-clause
feedFromRecords records@(r:_) = rssFeed Feed { feedAuthor = "Patrick Brisbin" , feedTitle = "Renters' reality" , feedDescription = "Recent reviews on rentersreality.com" , feedLanguage = "en-us" , feedLinkSelf = FeedR , feedLinkHome = RootR ...
445
feedFromRecords records@(r:_) = rssFeed Feed { feedAuthor = "Patrick Brisbin" , feedTitle = "Renters' reality" , feedDescription = "Recent reviews on rentersreality.com" , feedLanguage = "en-us" , feedLinkSelf = FeedR , feedLinkHome = RootR ...
445
feedFromRecords records@(r:_) = rssFeed Feed { feedAuthor = "Patrick Brisbin" , feedTitle = "Renters' reality" , feedDescription = "Recent reviews on rentersreality.com" , feedLanguage = "en-us" , feedLinkSelf = FeedR , feedLinkHome = RootR ...
445
false
false
0
9
153
88
51
37
null
null
haskell-infra/cloudflare
src/CloudFlare.hs
bsd-3-clause
purgeFile :: Account -> Zone -> Text -> IO (Either Text ()) purgeFile a z url = postCf k a "zone_file_purge" [ "z" := z, "url" := url ] where k _ = return () -------------------------------------------------------------------------------- -- Internals -- | Utility to post to Cloudflare API endpoints and pass respon...
379
purgeFile :: Account -> Zone -> Text -> IO (Either Text ()) purgeFile a z url = postCf k a "zone_file_purge" [ "z" := z, "url" := url ] where k _ = return () -------------------------------------------------------------------------------- -- Internals -- | Utility to post to Cloudflare API endpoints and pass respon...
379
purgeFile a z url = postCf k a "zone_file_purge" [ "z" := z, "url" := url ] where k _ = return () -------------------------------------------------------------------------------- -- Internals -- | Utility to post to Cloudflare API endpoints and pass responses to -- continuations. Returns 'Left' if an error occurs.
319
false
true
0
11
62
85
44
41
null
null
input-output-hk/pos-haskell-prototype
wallet/src/Cardano/Wallet/Kernel/DB/HdWallet.hs
mit
{------------------------------------------------------------------------------- Zoom to existing parts of a HD wallet -------------------------------------------------------------------------------} zoomHdRootId :: forall f e a. CanZoom f => (UnknownHdRoot -> e) -> HdRootId ->...
515
zoomHdRootId :: forall f e a. CanZoom f => (UnknownHdRoot -> e) -> HdRootId -> f e HdRoot a -> f e HdWallets a zoomHdRootId embedErr rootId = zoomDef err (hdWalletsRoots . at rootId) where err :: f e HdWallets a err = missing $ embedErr (UnknownHdRoot rootId)
312
zoomHdRootId embedErr rootId = zoomDef err (hdWalletsRoots . at rootId) where err :: f e HdWallets a err = missing $ embedErr (UnknownHdRoot rootId)
162
true
true
0
10
113
112
56
56
null
null
spechub/Hets
HasCASL/AsUtils.hs
gpl-2.0
expected :: Pretty a => a -> a -> String expected a b = "\n expected: " ++ showDoc a "\n found: " ++ showDoc b "\n"
128
expected :: Pretty a => a -> a -> String expected a b = "\n expected: " ++ showDoc a "\n found: " ++ showDoc b "\n"
128
expected a b = "\n expected: " ++ showDoc a "\n found: " ++ showDoc b "\n"
87
false
true
4
9
39
57
24
33
null
null
sheyll/isobmff-builder
src/Data/ByteString/Mp4/AudioStreaming.hs
bsd-3-clause
sampleCountDuration :: DashAacInit -> Word32 -> Word64 sampleCountDuration (DashAacInit _ _ _ _ _c) r = fromIntegral r
120
sampleCountDuration :: DashAacInit -> Word32 -> Word64 sampleCountDuration (DashAacInit _ _ _ _ _c) r = fromIntegral r
120
sampleCountDuration (DashAacInit _ _ _ _ _c) r = fromIntegral r
65
false
true
0
10
19
47
21
26
null
null
florianpilz/autotool
src/Graph/TSP/Search.hs
gpl-2.0
inbound :: ( Num w, Ord w, ToDoc w ) => State w -> Tropic w inbound s = sum $ do (x,False) <- assocs $ has_input s return $ minimum $ Infinite : do (y,False) <- assocs $ has_output s return $ dist s ! (x,y)
256
inbound :: ( Num w, Ord w, ToDoc w ) => State w -> Tropic w inbound s = sum $ do (x,False) <- assocs $ has_input s return $ minimum $ Infinite : do (y,False) <- assocs $ has_output s return $ dist s ! (x,y)
256
inbound s = sum $ do (x,False) <- assocs $ has_input s return $ minimum $ Infinite : do (y,False) <- assocs $ has_output s return $ dist s ! (x,y)
187
false
true
0
13
96
124
61
63
null
null