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
uuhan/Idris-dev
src/Idris/Reflection.hs
bsd-3-clause
fromTTMaybe x = Nothing
32
fromTTMaybe x = Nothing
32
fromTTMaybe x = Nothing
32
false
false
0
5
12
9
4
5
null
null
alanz/Blobs
lib/DData/Set.hs
lgpl-2.1
{-------------------------------------------------------------------- Utilities --------------------------------------------------------------------} foldlStrict f z xs = case xs of [] -> z (x:xx) -> let z' = f z x in seq z' (foldlStrict f z' xx) {--------------------------------------------------...
526
foldlStrict f z xs = case xs of [] -> z (x:xx) -> let z' = f z x in seq z' (foldlStrict f z' xx) {-------------------------------------------------------------------- Debugging --------------------------------------------------------------------} -- | /O(n)/. Show the tree that implements the set....
374
foldlStrict f z xs = case xs of [] -> z (x:xx) -> let z' = f z x in seq z' (foldlStrict f z' xx) {-------------------------------------------------------------------- Debugging --------------------------------------------------------------------} -- | /O(n)/. Show the tree that implements the set....
374
true
false
2
9
75
75
37
38
null
null
plow-technologies/roc-translator
src/Protocol/ROC/PointTypes/PointType98.hs
bsd-3-clause
pointType98Parser :: Get PointType98 pointType98Parser = do idTag <- getByteString 40 miscStorage1 <- getIeeeFloat32 miscStorage2 <- getIeeeFloat32 miscStorage3 <- getIeeeFloat32 miscStorage4 <- getIeeeFloat32 miscStorage5 <- getIeee...
2,673
pointType98Parser :: Get PointType98 pointType98Parser = do idTag <- getByteString 40 miscStorage1 <- getIeeeFloat32 miscStorage2 <- getIeeeFloat32 miscStorage3 <- getIeeeFloat32 miscStorage4 <- getIeeeFloat32 miscStorage5 <- getIeee...
2,673
pointType98Parser = do idTag <- getByteString 40 miscStorage1 <- getIeeeFloat32 miscStorage2 <- getIeeeFloat32 miscStorage3 <- getIeeeFloat32 miscStorage4 <- getIeeeFloat32 miscStorage5 <- getIeeeFloat32 miscStorage6 <...
2,636
false
true
0
8
871
421
187
234
null
null
Lysxia/twentyseven
src/Rubik/Cube/Cubie/Internal.hs
mit
unsafeCornerOrien' = CornerOrien . U.fromList
45
unsafeCornerOrien' = CornerOrien . U.fromList
45
unsafeCornerOrien' = CornerOrien . U.fromList
45
false
false
0
6
4
12
6
6
null
null
green-haskell/ghc
compiler/hsSyn/HsPat.hs
bsd-3-clause
looksLazyLPat (L _ (VarPat {})) = False
50
looksLazyLPat (L _ (VarPat {})) = False
50
looksLazyLPat (L _ (VarPat {})) = False
50
false
false
0
8
17
25
12
13
null
null
christiaanb/ghc
compiler/typecheck/TcEvidence.hs
bsd-3-clause
evTermCoercion :: EvTerm -> TcCoercion -- Applied only to EvTerms of type (s~t) -- See Note [Coercion evidence terms] evTermCoercion (EvId v) = mkTcCoVarCo v
164
evTermCoercion :: EvTerm -> TcCoercion evTermCoercion (EvId v) = mkTcCoVarCo v
85
evTermCoercion (EvId v) = mkTcCoVarCo v
46
true
true
0
7
31
29
15
14
null
null
zaxtax/hakaru
haskell/Language/Hakaru/Pretty/Maple.hs
bsd-3-clause
mapleTypeDFun SIdent = showString "Ident"
45
mapleTypeDFun SIdent = showString "Ident"
45
mapleTypeDFun SIdent = showString "Ident"
45
false
false
0
5
8
13
5
8
null
null
brendanhay/gogol
gogol-resourcemanager/gen/Network/Google/Resource/CloudResourceManager/Liens/Delete.hs
mpl-2.0
-- | Creates a value of 'LiensDelete' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'ldXgafv' -- -- * 'ldUploadProtocol' -- -- * 'ldAccessToken' -- -- * 'ldUploadType' -- -- * 'ldName' -- -- * 'ldCallback' liensDelete :: Text -- ...
566
liensDelete :: Text -- ^ 'ldName' -> LiensDelete liensDelete pLdName_ = LiensDelete' { _ldXgafv = Nothing , _ldUploadProtocol = Nothing , _ldAccessToken = Nothing , _ldUploadType = Nothing , _ldName = pLdName_ , _ldCallback = Nothing }
273
liensDelete pLdName_ = LiensDelete' { _ldXgafv = Nothing , _ldUploadProtocol = Nothing , _ldAccessToken = Nothing , _ldUploadType = Nothing , _ldName = pLdName_ , _ldCallback = Nothing }
216
true
true
0
7
128
81
52
29
null
null
ilyasergey/GHC-XAppFix
compiler/main/DynFlags.hs
bsd-3-clause
showHscTargetFlag HscLlvm = "-fllvm"
43
showHscTargetFlag HscLlvm = "-fllvm"
43
showHscTargetFlag HscLlvm = "-fllvm"
43
false
false
0
5
10
9
4
5
null
null
mightymoose/liquidhaskell
benchmarks/llrbtree-0.1.1/Data/Set/LLRBTree.hs
bsd-3-clause
mergeEQ t1@(Node _ h l x r) t2 | h == h2' = Node R (h+1) t1 m t2' | isRed l = Node R (h+1) (turnB l) x (Node B h r m t2') | otherwise = Node B h (turnR t1) m t2' where m = minimum t2 t2' = deleteMin t2 h2' = height t2'
242
mergeEQ t1@(Node _ h l x r) t2 | h == h2' = Node R (h+1) t1 m t2' | isRed l = Node R (h+1) (turnB l) x (Node B h r m t2') | otherwise = Node B h (turnR t1) m t2' where m = minimum t2 t2' = deleteMin t2 h2' = height t2'
242
mergeEQ t1@(Node _ h l x r) t2 | h == h2' = Node R (h+1) t1 m t2' | isRed l = Node R (h+1) (turnB l) x (Node B h r m t2') | otherwise = Node B h (turnR t1) m t2' where m = minimum t2 t2' = deleteMin t2 h2' = height t2'
242
false
false
2
8
81
155
76
79
null
null
philopon/haskell-purescript-binding
Language/PureScript/Binding/TH.hs
mit
bUnwords :: [Builder] -> Builder bUnwords = mconcat . intersperse (singleton ' ')
81
bUnwords :: [Builder] -> Builder bUnwords = mconcat . intersperse (singleton ' ')
81
bUnwords = mconcat . intersperse (singleton ' ')
48
false
true
0
8
12
31
16
15
null
null
sol/process-conduit
System/Process/QQ.hs
bsd-3-clause
def :: QuasiQuoter def = QuasiQuoter { quoteExp = undefined , quotePat = undefined , quoteType = undefined , quoteDec = undefined }
144
def :: QuasiQuoter def = QuasiQuoter { quoteExp = undefined , quotePat = undefined , quoteType = undefined , quoteDec = undefined }
144
def = QuasiQuoter { quoteExp = undefined , quotePat = undefined , quoteType = undefined , quoteDec = undefined }
125
false
true
0
7
35
47
25
22
null
null
vikraman/ghc
compiler/codeGen/StgCmmEnv.hs
bsd-3-clause
idToReg :: DynFlags -> NonVoid Id -> LocalReg -- Make a register from an Id, typically a function argument, -- free variable, or case binder -- -- We re-use the Unique from the Id to make it easier to see what is going on -- -- By now the Ids should be uniquely named; else one would worry -- about accidental collision ...
559
idToReg :: DynFlags -> NonVoid Id -> LocalReg idToReg dflags (NonVoid id) = LocalReg (idUnique id) (case idPrimRep id of VoidRep -> pprPanic "idToReg" (ppr id) _ -> primRepCmmType dflags (idPrimRep id))
285
idToReg dflags (NonVoid id) = LocalReg (idUnique id) (case idPrimRep id of VoidRep -> pprPanic "idToReg" (ppr id) _ -> primRepCmmType dflags (idPrimRep id))
239
true
true
0
12
168
99
50
49
null
null
keithodulaigh/Hets
CASL/Simplify.hs
gpl-2.0
simplifyTerm :: Ord f => (f -> f) -> TERM f -> TERM f simplifyTerm = foldTerm . simplifyRecord
94
simplifyTerm :: Ord f => (f -> f) -> TERM f -> TERM f simplifyTerm = foldTerm . simplifyRecord
94
simplifyTerm = foldTerm . simplifyRecord
40
false
true
0
8
18
43
21
22
null
null
GaloisInc/halvm-ghc
compiler/main/DynFlags.hs
bsd-3-clause
pgm_a :: DynFlags -> (String,[Option]) pgm_a dflags = sPgm_a (settings dflags)
94
pgm_a :: DynFlags -> (String,[Option]) pgm_a dflags = sPgm_a (settings dflags)
94
pgm_a dflags = sPgm_a (settings dflags)
39
false
true
0
7
26
36
19
17
null
null
flipstone/glados
src/Handler/Helpers/Resource.hs
mit
defaultActions :: ResourceActions a defaultActions = ResourceActions { resActionList = notAvailable , resActionNew = notAvailable , resActionEdit = const notAvailable , resActionShow = const notAvailable , resActionCreate = notAvailable , resActionUpdate = const notAvailable , resActionDelete = const no...
434
defaultActions :: ResourceActions a defaultActions = ResourceActions { resActionList = notAvailable , resActionNew = notAvailable , resActionEdit = const notAvailable , resActionShow = const notAvailable , resActionCreate = notAvailable , resActionUpdate = const notAvailable , resActionDelete = const no...
434
defaultActions = ResourceActions { resActionList = notAvailable , resActionNew = notAvailable , resActionEdit = const notAvailable , resActionShow = const notAvailable , resActionCreate = notAvailable , resActionUpdate = const notAvailable , resActionDelete = const notAvailable } where notAvaila...
398
false
true
0
7
75
91
51
40
null
null
ctford/Idris-Elba-dev
src/IRTS/Java/ASTBuilding.hs
bsd-3-clause
extendWithNull :: [Exp] -> Int -> [Exp] extendWithNull exps additionalZeros = exps ++ (replicate additionalZeros (Lit $ Null))
128
extendWithNull :: [Exp] -> Int -> [Exp] extendWithNull exps additionalZeros = exps ++ (replicate additionalZeros (Lit $ Null))
128
extendWithNull exps additionalZeros = exps ++ (replicate additionalZeros (Lit $ Null))
88
false
true
2
9
19
56
27
29
null
null
tbarnetlamb/hyphen
hyphen/lowlevel_src/Hyphen.hs
gpl-2.0
atomicReadIORef :: IORef a -> IO a atomicReadIORef ior = atomicModifyIORef ior (\ val -> (val, val))
100
atomicReadIORef :: IORef a -> IO a atomicReadIORef ior = atomicModifyIORef ior (\ val -> (val, val))
100
atomicReadIORef ior = atomicModifyIORef ior (\ val -> (val, val))
65
false
true
0
8
16
47
23
24
null
null
thulishuang/Compiler
src/Parser.hs
bsd-3-clause
getStat :: Either String Statement -> Statement getStat (Left errStr) = Skip
76
getStat :: Either String Statement -> Statement getStat (Left errStr) = Skip
76
getStat (Left errStr) = Skip
28
false
true
0
7
11
29
14
15
null
null
tmcgilchrist/scheme
src/Scheme/RTS.hs
bsd-3-clause
runIOThrows :: IOThrowsError Text -> IO Text runIOThrows action = runErrorT (trapError action) >>= return . extractValue where extractValue (Right val) = val extractValue (Left _) = "error"
199
runIOThrows :: IOThrowsError Text -> IO Text runIOThrows action = runErrorT (trapError action) >>= return . extractValue where extractValue (Right val) = val extractValue (Left _) = "error"
199
runIOThrows action = runErrorT (trapError action) >>= return . extractValue where extractValue (Right val) = val extractValue (Left _) = "error"
154
false
true
0
9
37
72
34
38
null
null
pjones/xmonad-test
vendor/xmonad/src/XMonad/Core.hs
bsd-2-clause
-- | True if the given window is the root window isRoot :: Window -> X Bool isRoot w = (w==) <$> asks theRoot
109
isRoot :: Window -> X Bool isRoot w = (w==) <$> asks theRoot
60
isRoot w = (w==) <$> asks theRoot
33
true
true
0
6
23
33
17
16
null
null
seL4/capDL-tool
CapDL/PrintC.hs
bsd-2-clause
showCap objs (UntypedCap id) _ _ _ = "{.type = CDL_UntypedCap, .obj_id = " ++ showObjID objs id ++ "}"
106
showCap objs (UntypedCap id) _ _ _ = "{.type = CDL_UntypedCap, .obj_id = " ++ showObjID objs id ++ "}"
106
showCap objs (UntypedCap id) _ _ _ = "{.type = CDL_UntypedCap, .obj_id = " ++ showObjID objs id ++ "}"
106
false
false
0
7
23
36
17
19
null
null
rgrinberg/wai
warp/Network/Wai/Handler/Warp/Types.hs
mit
readLeftoverSource :: Source -> IO ByteString readLeftoverSource (Source ref _) = readIORef ref
95
readLeftoverSource :: Source -> IO ByteString readLeftoverSource (Source ref _) = readIORef ref
95
readLeftoverSource (Source ref _) = readIORef ref
49
false
true
0
7
12
32
15
17
null
null
GaloisInc/saw-script
cryptol-saw-core/src/Verifier/SAW/Cryptol/Monadify.hs
bsd-3-clause
topRetType :: MonadifyM OpenTerm topRetType = monStTopRetType <$> ask
69
topRetType :: MonadifyM OpenTerm topRetType = monStTopRetType <$> ask
69
topRetType = monStTopRetType <$> ask
36
false
true
0
5
8
18
9
9
null
null
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/enumFromThen_2.hs
mit
primCmpInt (Neg Zero) (Neg Zero) = EQ
37
primCmpInt (Neg Zero) (Neg Zero) = EQ
37
primCmpInt (Neg Zero) (Neg Zero) = EQ
37
false
false
0
7
6
23
11
12
null
null
zhiyuanshi/fcore
backend/archive/ClosureFNew.hs
bsd-2-clause
isSimpleExpr (Lit _) = True
35
isSimpleExpr (Lit _) = True
35
isSimpleExpr (Lit _) = True
35
false
false
0
6
12
16
7
9
null
null
giorgidze/Hydra
examples/BouncingBall.hs
bsd-3-clause
bouncingBall :: Body -> SR Body bouncingBall b = switch (freeFall b) [fun| (x,_) -> x |] (\(x,v) -> bouncingBall (x,-v))
120
bouncingBall :: Body -> SR Body bouncingBall b = switch (freeFall b) [fun| (x,_) -> x |] (\(x,v) -> bouncingBall (x,-v))
120
bouncingBall b = switch (freeFall b) [fun| (x,_) -> x |] (\(x,v) -> bouncingBall (x,-v))
88
false
true
0
10
20
68
36
32
null
null
nushio3/formura
src/Formura/Parser.hs
mit
program :: WithCommandLineOption => P Program program = do ps <- choice [Left <$> specialDeclaration, Right <$> statementCompound] `sepEndBy` statementDelimiter let (decls, stmts) = partitionEithers ps let mnc = unsafePerformIO $ readYamlDef defaultNumericalConfig ncFilePath nc0 <- case mnc of No...
1,055
program :: WithCommandLineOption => P Program program = do ps <- choice [Left <$> specialDeclaration, Right <$> statementCompound] `sepEndBy` statementDelimiter let (decls, stmts) = partitionEithers ps let mnc = unsafePerformIO $ readYamlDef defaultNumericalConfig ncFilePath nc0 <- case mnc of No...
1,055
program = do ps <- choice [Left <$> specialDeclaration, Right <$> statementCompound] `sepEndBy` statementDelimiter let (decls, stmts) = partitionEithers ps let mnc = unsafePerformIO $ readYamlDef defaultNumericalConfig ncFilePath nc0 <- case mnc of Nothing -> raiseErr $ failed $ "cannot parse num...
1,009
false
true
0
15
216
342
169
173
null
null
rueshyna/gogol
gogol-sheets/gen/Network/Google/Sheets/Types/Product.hs
mpl-2.0
-- | The ID of the named range. nrNamedRangeId :: Lens' NamedRange (Maybe Text) nrNamedRangeId = lens _nrNamedRangeId (\ s a -> s{_nrNamedRangeId = a})
159
nrNamedRangeId :: Lens' NamedRange (Maybe Text) nrNamedRangeId = lens _nrNamedRangeId (\ s a -> s{_nrNamedRangeId = a})
127
nrNamedRangeId = lens _nrNamedRangeId (\ s a -> s{_nrNamedRangeId = a})
79
true
true
1
9
32
51
25
26
null
null
DougBurke/swish
tests/RDFGraphTest.hs
lgpl-2.1
hyphen :: String -> String -> String hyphen a b = a ++ "-" ++ b
63
hyphen :: String -> String -> String hyphen a b = a ++ "-" ++ b
63
hyphen a b = a ++ "-" ++ b
26
false
true
0
6
15
32
16
16
null
null
jaugustosaba/haskell-jit
Jit.hs
gpl-2.0
littleEndian :: Word64 -> [Word8] littleEndian n = map getByte [0 .. 7] where getByte i = fromIntegral $ 0xFF .&. (n `shiftR` (8 * i))
141
littleEndian :: Word64 -> [Word8] littleEndian n = map getByte [0 .. 7] where getByte i = fromIntegral $ 0xFF .&. (n `shiftR` (8 * i))
141
littleEndian n = map getByte [0 .. 7] where getByte i = fromIntegral $ 0xFF .&. (n `shiftR` (8 * i))
107
false
true
0
9
32
66
36
30
null
null
rueshyna/gogol
gogol-spectrum/gen/Network/Google/Spectrum/Types/Product.hs
mpl-2.0
-- | The PAWS version. Must be exactly 1.0. Required field. prrVersion :: Lens' PawsRegisterResponse (Maybe Text) prrVersion = lens _prrVersion (\ s a -> s{_prrVersion = a})
175
prrVersion :: Lens' PawsRegisterResponse (Maybe Text) prrVersion = lens _prrVersion (\ s a -> s{_prrVersion = a})
115
prrVersion = lens _prrVersion (\ s a -> s{_prrVersion = a})
61
true
true
1
9
29
52
25
27
null
null
sseefried/shady-gen
src/Shady/Language/Type.hs
agpl-3.0
-- TODO: Maybe define a class & method for the various typed equality -- functions, with a nice infix method name. -- | Yields 'Just' 'Refl' if type-compatible /and/ equal. Otherwise 'Nothing'. (=:=) :: forall f a b. (HasType a, HasType b, SynEq f) => f a -> f b -> Maybe (a :=: b) fa =:= fb = case typeOf1 ...
466
(=:=) :: forall f a b. (HasType a, HasType b, SynEq f) => f a -> f b -> Maybe (a :=: b) fa =:= fb = case typeOf1 fa `tyEq` typeOf1 fb of Just Refl -> if fa =-= fb then Just Refl else Nothing Nothing -> Nothing -- | Same type and syntactically equal
270
fa =:= fb = case typeOf1 fa `tyEq` typeOf1 fb of Just Refl -> if fa =-= fb then Just Refl else Nothing Nothing -> Nothing -- | Same type and syntactically equal
173
true
true
3
13
111
111
61
50
null
null
koterpillar/labyrinth
src/Labyrinth/Action.hs
mit
playerAt :: Monad m => Position -> PlayerId -> LabState m Bool playerAt pos i = do pp <- use (player i . position) return $ pos == pp
141
playerAt :: Monad m => Position -> PlayerId -> LabState m Bool playerAt pos i = do pp <- use (player i . position) return $ pos == pp
141
playerAt pos i = do pp <- use (player i . position) return $ pos == pp
78
false
true
0
11
36
67
31
36
null
null
yihuang/cabal-install
Distribution/Client/Dependency/TopDown.hs
bsd-3-clause
listOf disp [x0] = disp x0
26
listOf disp [x0] = disp x0
26
listOf disp [x0] = disp x0
26
false
false
0
5
5
19
8
11
null
null
erebe/hmailfilter
src/Parser.hs
bsd-3-clause
parseHeader :: HashMap HeaderName [Header] -> Parser (HashMap HeaderName [Header]) parseHeader acc = do hname <- parseHeaderName hcontent <- parseHeaderContent -- Force evaluation of hcontent in order to be able to be -- lazy for the prettyFormat without penality (Header will not be evaluated) let ...
436
parseHeader :: HashMap HeaderName [Header] -> Parser (HashMap HeaderName [Header]) parseHeader acc = do hname <- parseHeaderName hcontent <- parseHeaderContent -- Force evaluation of hcontent in order to be able to be -- lazy for the prettyFormat without penality (Header will not be evaluated) let ...
436
parseHeader acc = do hname <- parseHeaderName hcontent <- parseHeaderContent -- Force evaluation of hcontent in order to be able to be -- lazy for the prettyFormat without penality (Header will not be evaluated) let !hcontent' = hcontent return $! insertWith (<>) hname [Header hname (prettyForm...
353
false
true
0
12
84
99
48
51
null
null
phaazon/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/Tokens.hs
bsd-3-clause
gl_COLOR_BUFFER_BIT1_QCOM :: GLbitfield gl_COLOR_BUFFER_BIT1_QCOM = 0x00000002
78
gl_COLOR_BUFFER_BIT1_QCOM :: GLbitfield gl_COLOR_BUFFER_BIT1_QCOM = 0x00000002
78
gl_COLOR_BUFFER_BIT1_QCOM = 0x00000002
38
false
true
0
4
5
11
6
5
null
null
nilthehuman/H-99
Logic.hs
unlicense
-- Problem 46 myAnd :: Bool -> Bool -> Bool myAnd True True = True
66
myAnd :: Bool -> Bool -> Bool myAnd True True = True
52
myAnd True True = True
22
true
true
0
8
14
31
14
17
null
null
pparkkin/eta
compiler/ETA/Prelude/PrelNames.hs
bsd-3-clause
printIdKey = mkPreludeMiscIdUnique 37
56
printIdKey = mkPreludeMiscIdUnique 37
56
printIdKey = mkPreludeMiscIdUnique 37
56
false
false
0
5
22
9
4
5
null
null
brendanhay/gogol
gogol-cloudkms/gen/Network/Google/CloudKMS/Types/Product.hs
mpl-2.0
-- | A message digest produced with the SHA-256 algorithm. dSha256 :: Lens' Digest (Maybe ByteString) dSha256 = lens _dSha256 (\ s a -> s{_dSha256 = a}) . mapping _Bytes
177
dSha256 :: Lens' Digest (Maybe ByteString) dSha256 = lens _dSha256 (\ s a -> s{_dSha256 = a}) . mapping _Bytes
118
dSha256 = lens _dSha256 (\ s a -> s{_dSha256 = a}) . mapping _Bytes
75
true
true
0
10
37
55
28
27
null
null
michaelt/remorse
Remorse/Free/Prelude.hs
bsd-3-clause
-- --------------- -- sum -- --------------- sum :: Free (Of Int) () -> Int sum = fold (unkurry (+)) (const 0)
111
sum :: Free (Of Int) () -> Int sum = fold (unkurry (+)) (const 0)
65
sum = fold (unkurry (+)) (const 0)
34
true
true
3
7
21
60
27
33
null
null
jonaprieto/athena
src/Athena/Utils/PrettyPrint.hs
mit
flatten other = other
27
flatten other = other
27
flatten other = other
27
false
false
0
4
9
9
4
5
null
null
d0kt0r0/Tidal
src/Sound/Tidal/old/Tempo.hs
gpl-3.0
cpsUtils = do (cpsSetter, _, currentTime) <- cpsUtils' return (cpsSetter, currentTime) -- Backwards compatibility
128
cpsUtils = do (cpsSetter, _, currentTime) <- cpsUtils' return (cpsSetter, currentTime) -- Backwards compatibility
128
cpsUtils = do (cpsSetter, _, currentTime) <- cpsUtils' return (cpsSetter, currentTime) -- Backwards compatibility
128
false
false
1
9
28
39
19
20
null
null
d0kt0r0/estuary
client/src/Estuary/Languages/Hydra/Parser.hs
gpl-3.0
decimal = P.decimal tokenParser
31
decimal = P.decimal tokenParser
31
decimal = P.decimal tokenParser
31
false
false
0
6
3
11
5
6
null
null
ezyang/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
gHC_TYPENATS = mkBaseModule (fsLit "GHC.TypeNats")
53
gHC_TYPENATS = mkBaseModule (fsLit "GHC.TypeNats")
53
gHC_TYPENATS = mkBaseModule (fsLit "GHC.TypeNats")
53
false
false
1
7
7
18
7
11
null
null
nushio3/ghc
compiler/coreSyn/CoreSyn.hs
bsd-3-clause
rhssOfAlts :: [Alt b] -> [Expr b] rhssOfAlts alts = [e | (_,_,e) <- alts]
73
rhssOfAlts :: [Alt b] -> [Expr b] rhssOfAlts alts = [e | (_,_,e) <- alts]
73
rhssOfAlts alts = [e | (_,_,e) <- alts]
39
false
true
0
8
14
50
27
23
null
null
spinda/liquidhaskell
src/Language/Haskell/Liquid/Desugar710/DsBinds.hs
bsd-3-clause
-------------------------------------- dsTcEvBinds :: TcEvBinds -> DsM [CoreBind] dsTcEvBinds (TcEvBinds {}) = panic "dsEvBinds"
128
dsTcEvBinds :: TcEvBinds -> DsM [CoreBind] dsTcEvBinds (TcEvBinds {}) = panic "dsEvBinds"
89
dsTcEvBinds (TcEvBinds {}) = panic "dsEvBinds"
46
true
true
1
8
12
39
19
20
null
null
sbidin/sdl2-ttf
src/SDL/Font.hs
mit
-- | Renders 'Text' using the /quick and dirty/ method. -- -- Is the fastest of the rendering methods, but results in text that isn't as -- /smooth/. solid :: MonadIO m => Font -> Color -> Text -> m SDL.Surface solid (Font font) (V4 r g b a) text = fmap unmanaged . throwIfNull "SDL.Font.solid" "TTF_RenderUNICODE_...
478
solid :: MonadIO m => Font -> Color -> Text -> m SDL.Surface solid (Font font) (V4 r g b a) text = fmap unmanaged . throwIfNull "SDL.Font.solid" "TTF_RenderUNICODE_Solid" . liftIO . withText text $ \ptr -> with (SDL.Raw.Color r g b a) $ \fg -> SDL.Raw.Font.renderUNICODE_Solid font (castPtr...
328
solid (Font font) (V4 r g b a) text = fmap unmanaged . throwIfNull "SDL.Font.solid" "TTF_RenderUNICODE_Solid" . liftIO . withText text $ \ptr -> with (SDL.Raw.Color r g b a) $ \fg -> SDL.Raw.Font.renderUNICODE_Solid font (castPtr ptr) fg
267
true
true
2
12
108
147
72
75
null
null
mightymoose/liquidhaskell
src/Language/Haskell/Liquid/Parse.hs
bsd-3-clause
bareArgP vv = bareAtomP (refDefP vv) <|> parens bareTypeP
61
bareArgP vv = bareAtomP (refDefP vv) <|> parens bareTypeP
61
bareArgP vv = bareAtomP (refDefP vv) <|> parens bareTypeP
61
false
false
3
7
12
28
13
15
null
null
mrd/camfort
src/Camfort/Specification/Units/InferenceFrontend.hs
apache-2.0
debugLogging :: UnitSolver () debugLogging = whenDebug $ do (tell . unlines . map (\ (ConEq u1 u2) -> " ***AbsConstraint: " ++ show (flattenUnits u1) ++ " === " ++ show (flattenUnits u2) ++ "\n")) =<< extractConstraints pf <- gets usProgramFile cons <- usConstraints `fmap` get vum <- usVarUnitMap `fmap...
2,956
debugLogging :: UnitSolver () debugLogging = whenDebug $ do (tell . unlines . map (\ (ConEq u1 u2) -> " ***AbsConstraint: " ++ show (flattenUnits u1) ++ " === " ++ show (flattenUnits u2) ++ "\n")) =<< extractConstraints pf <- gets usProgramFile cons <- usConstraints `fmap` get vum <- usVarUnitMap `fmap...
2,956
debugLogging = whenDebug $ do (tell . unlines . map (\ (ConEq u1 u2) -> " ***AbsConstraint: " ++ show (flattenUnits u1) ++ " === " ++ show (flattenUnits u2) ++ "\n")) =<< extractConstraints pf <- gets usProgramFile cons <- usConstraints `fmap` get vum <- usVarUnitMap `fmap` get tell . unlines $ [ "...
2,926
false
true
0
23
614
949
455
494
null
null
kawamuray/ganeti
src/Ganeti/Luxi.hs
gpl-2.0
parseSubmitJobResult :: JSValue -> ErrorResult JobId parseSubmitJobResult (JSArray [JSBool True, v]) = case J.readJSON v of J.Error msg -> Bad $ LuxiError msg J.Ok v' -> Ok v'
185
parseSubmitJobResult :: JSValue -> ErrorResult JobId parseSubmitJobResult (JSArray [JSBool True, v]) = case J.readJSON v of J.Error msg -> Bad $ LuxiError msg J.Ok v' -> Ok v'
185
parseSubmitJobResult (JSArray [JSBool True, v]) = case J.readJSON v of J.Error msg -> Bad $ LuxiError msg J.Ok v' -> Ok v'
132
false
true
0
9
37
77
36
41
null
null
damianfral/soundchorden
src/Note.hs
mit
changePitch :: Int -> Note -> Note changePitch x note | x < 0 = changePitch (12 + x) note | otherwise = (head <$> allNotesFrom note) !! x
160
changePitch :: Int -> Note -> Note changePitch x note | x < 0 = changePitch (12 + x) note | otherwise = (head <$> allNotesFrom note) !! x
160
changePitch x note | x < 0 = changePitch (12 + x) note | otherwise = (head <$> allNotesFrom note) !! x
125
false
true
0
9
51
69
33
36
null
null
niexshao/Exercises
src/Euler96-Sudoku/sudoku1.hs
bsd-3-clause
indexCol i puz = [index i j puz | j <- [0..8]]
46
indexCol i puz = [index i j puz | j <- [0..8]]
46
indexCol i puz = [index i j puz | j <- [0..8]]
46
false
false
0
8
11
35
17
18
null
null
glutamate/cmdtheline
doc/examples/cp.hs
mit
cpTerm = cp <$> dry <*> filesExist sources <*> validPath dest where dry = value $ flag (optInfo [ "dry", "d" ]) { optName = "DRY" , optDoc = "Perform a dry run. Print what would be copied, but do not " ++ "copy it." } sources = nonEmpty $ revPosLeft 0 [] posInfo { pos...
619
cpTerm = cp <$> dry <*> filesExist sources <*> validPath dest where dry = value $ flag (optInfo [ "dry", "d" ]) { optName = "DRY" , optDoc = "Perform a dry run. Print what would be copied, but do not " ++ "copy it." } sources = nonEmpty $ revPosLeft 0 [] posInfo { pos...
619
cpTerm = cp <$> dry <*> filesExist sources <*> validPath dest where dry = value $ flag (optInfo [ "dry", "d" ]) { optName = "DRY" , optDoc = "Perform a dry run. Print what would be copied, but do not " ++ "copy it." } sources = nonEmpty $ revPosLeft 0 [] posInfo { pos...
619
false
false
0
10
227
135
73
62
null
null
athanclark/urlencoded-simple
src/Data/URLEncoded.hs
bsd-3-clause
decode20A :: Parser (Either Char [PercentHex]) decode20A = eitherP notReserved (many1 percentHex)
97
decode20A :: Parser (Either Char [PercentHex]) decode20A = eitherP notReserved (many1 percentHex)
97
decode20A = eitherP notReserved (many1 percentHex)
50
false
true
2
7
11
43
18
25
null
null
ruicc/haskell-protocol-buffers
Text/ProtocolBuffers/WireMessage.hs
apache-2.0
toWireType 4 = 0
18
toWireType 4 = 0
18
toWireType 4 = 0
18
false
false
1
5
5
13
4
9
null
null
fpco/cabal
Cabal/Distribution/Simple/Build.hs
bsd-3-clause
benchmarkExeV10asExe Benchmark{} _ = error "benchmarkExeV10asExe: wrong kind"
77
benchmarkExeV10asExe Benchmark{} _ = error "benchmarkExeV10asExe: wrong kind"
77
benchmarkExeV10asExe Benchmark{} _ = error "benchmarkExeV10asExe: wrong kind"
77
false
false
1
5
7
20
8
12
null
null
keent/stack
src/main/Main.hs
bsd-3-clause
execCmd :: ExecOpts -> GlobalOpts -> IO () execCmd ExecOpts {..} go@GlobalOpts{..} = case eoExtra of ExecOptsPlain -> do (cmd, args) <- case (eoCmd, eoArgs) of (ExecCmd cmd, args) -> return (cmd, args) (ExecGhc, args) -> return ("ghc", args) (Ex...
2,396
execCmd :: ExecOpts -> GlobalOpts -> IO () execCmd ExecOpts {..} go@GlobalOpts{..} = case eoExtra of ExecOptsPlain -> do (cmd, args) <- case (eoCmd, eoArgs) of (ExecCmd cmd, args) -> return (cmd, args) (ExecGhc, args) -> return ("ghc", args) (Ex...
2,396
execCmd ExecOpts {..} go@GlobalOpts{..} = case eoExtra of ExecOptsPlain -> do (cmd, args) <- case (eoCmd, eoArgs) of (ExecCmd cmd, args) -> return (cmd, args) (ExecGhc, args) -> return ("ghc", args) (ExecRunGhc, args) -> return ("runghc", args) ...
2,353
false
true
1
23
945
592
293
299
null
null
mightymoose/liquidhaskell
benchmarks/vector-0.10.0.1/Data/Vector/Fusion/Stream/Monadic.nocpp.hs
bsd-3-clause
concatMap f = concatMapM (return . f)
37
concatMap f = concatMapM (return . f)
37
concatMap f = concatMapM (return . f)
37
false
false
1
7
6
23
9
14
null
null
GaloisInc/ivory-tower-stm32
ivory-bsp-stm32/src/Ivory/BSP/ARMv7M/SysTick.hs
bsd-3-clause
clock_start_timer :: Ref 'Global ('Stored Uint64) -> Def('[]':->()) clock_start_timer elapsedTicks = proc "clock_start_timer" $ body $ do store elapsedTicks 0 -- | Get the elapsed time in microseconds since 'clock_start_timer' -- was called. This only works if 'clock_set_interval_in_us' or -- 'clock_set_interval_in_...
424
clock_start_timer :: Ref 'Global ('Stored Uint64) -> Def('[]':->()) clock_start_timer elapsedTicks = proc "clock_start_timer" $ body $ do store elapsedTicks 0 -- | Get the elapsed time in microseconds since 'clock_start_timer' -- was called. This only works if 'clock_set_interval_in_us' or -- 'clock_set_interval_in_...
424
clock_start_timer elapsedTicks = proc "clock_start_timer" $ body $ do store elapsedTicks 0 -- | Get the elapsed time in microseconds since 'clock_start_timer' -- was called. This only works if 'clock_set_interval_in_us' or -- 'clock_set_interval_in_ms' has been called. -- -- XXX: These should really be in the echro...
356
false
true
0
10
63
75
38
37
null
null
joehillen/aura
src/Aura/Utils.hs
gpl-3.0
groupPkgs' :: ([a],[b],[c]) -> ([a],[b],[c]) -> ([a],[b],[c]) groupPkgs' (ps,as,os) (p,a,o) = (p ++ ps, a ++ as, o ++ os)
121
groupPkgs' :: ([a],[b],[c]) -> ([a],[b],[c]) -> ([a],[b],[c]) groupPkgs' (ps,as,os) (p,a,o) = (p ++ ps, a ++ as, o ++ os)
121
groupPkgs' (ps,as,os) (p,a,o) = (p ++ ps, a ++ as, o ++ os)
59
false
true
0
10
19
123
73
50
null
null
kadena-io/pact
src-ghc/Pact/Bench.hs
bsd-3-clause
benchNFIO :: NFData a => String -> IO a -> Benchmark benchNFIO bname = bench bname . nfIO
89
benchNFIO :: NFData a => String -> IO a -> Benchmark benchNFIO bname = bench bname . nfIO
89
benchNFIO bname = bench bname . nfIO
36
false
true
1
9
17
46
19
27
null
null
jstolarek/ghc
compiler/nativeGen/X86/Ppr.hs
bsd-3-clause
pprGInstr (GCOS sz _ _ src dst) = pprSizeRegReg (sLit "gcos") sz src dst
72
pprGInstr (GCOS sz _ _ src dst) = pprSizeRegReg (sLit "gcos") sz src dst
72
pprGInstr (GCOS sz _ _ src dst) = pprSizeRegReg (sLit "gcos") sz src dst
72
false
false
0
7
13
38
18
20
null
null
sarahn/ganeti
src/Ganeti/JQueue.hs
gpl-2.0
extractOpSummary (InvalidOpCode (JSObject o)) = case fromObjWithDefault (fromJSObject o) "OP_ID" ("OP_" ++ invalidOp) of Just s -> drop 3 s -- drop the OP_ prefix Nothing -> invalidOp
193
extractOpSummary (InvalidOpCode (JSObject o)) = case fromObjWithDefault (fromJSObject o) "OP_ID" ("OP_" ++ invalidOp) of Just s -> drop 3 s -- drop the OP_ prefix Nothing -> invalidOp
193
extractOpSummary (InvalidOpCode (JSObject o)) = case fromObjWithDefault (fromJSObject o) "OP_ID" ("OP_" ++ invalidOp) of Just s -> drop 3 s -- drop the OP_ prefix Nothing -> invalidOp
193
false
false
3
9
37
65
32
33
null
null
artuuge/IHaskell
ipython-kernel/src/IHaskell/IPython/Message/Writer.hs
mit
emptyList :: [Int] emptyList = []
33
emptyList :: [Int] emptyList = []
33
emptyList = []
14
false
true
0
5
5
16
9
7
null
null
IreneKnapp/Faction
faction/Distribution/Client/Dependency/Modular/Preference.hs
bsd-3-clause
lpreferEasyGoalChoices :: Tree a -> Tree a lpreferEasyGoalChoices = trav go where go (GoalChoiceF xs) = GoalChoiceF (P.sortBy (comparing lchoices) xs) go x = x -- | Variant of 'preferEasyGoalChoices'. -- -- I first thought that using a paramorphism might be faster here, -- but it doesn't seem ...
343
lpreferEasyGoalChoices :: Tree a -> Tree a lpreferEasyGoalChoices = trav go where go (GoalChoiceF xs) = GoalChoiceF (P.sortBy (comparing lchoices) xs) go x = x -- | Variant of 'preferEasyGoalChoices'. -- -- I first thought that using a paramorphism might be faster here, -- but it doesn't seem ...
343
lpreferEasyGoalChoices = trav go where go (GoalChoiceF xs) = GoalChoiceF (P.sortBy (comparing lchoices) xs) go x = x -- | Variant of 'preferEasyGoalChoices'. -- -- I first thought that using a paramorphism might be faster here, -- but it doesn't seem to make any difference.
300
false
true
1
9
77
71
36
35
null
null
tjakway/ghcjvm
compiler/typecheck/TcRnTypes.hs
bsd-3-clause
mkModDeps :: [(ModuleName, IsBootInterface)] -> ModuleNameEnv (ModuleName, IsBootInterface) mkModDeps deps = foldl add emptyUFM deps where add env elt@(m,_) = addToUFM env m elt
219
mkModDeps :: [(ModuleName, IsBootInterface)] -> ModuleNameEnv (ModuleName, IsBootInterface) mkModDeps deps = foldl add emptyUFM deps where add env elt@(m,_) = addToUFM env m elt
219
mkModDeps deps = foldl add emptyUFM deps where add env elt@(m,_) = addToUFM env m elt
117
false
true
0
8
65
80
39
41
null
null
suhailshergill/hakaru
Tests/Metropolis.hs
bsd-3-clause
test_normal :: IO [Double] test_normal = mcmc (unconditioned (normal 1 3)) []
77
test_normal :: IO [Double] test_normal = mcmc (unconditioned (normal 1 3)) []
77
test_normal = mcmc (unconditioned (normal 1 3)) []
50
false
true
0
9
11
38
19
19
null
null
EmilGedda/hattis
src/Hattis/Network.hs
bsd-3-clause
parseFinished :: MonadIO m => IOStateArrow () XmlTree XmlTree -> m (SubmissionProgress -> SubmissionProgress) parseFinished doc = liftIO $ do let runtime = hasName "td" >>> hasAttrValue "class" (isInfixOf "runtime") txt <- runX $ doc >>> deep runtime //> getText status <- parseStatu...
721
parseFinished :: MonadIO m => IOStateArrow () XmlTree XmlTree -> m (SubmissionProgress -> SubmissionProgress) parseFinished doc = liftIO $ do let runtime = hasName "td" >>> hasAttrValue "class" (isInfixOf "runtime") txt <- runX $ doc >>> deep runtime //> getText status <- parseStatu...
721
parseFinished doc = liftIO $ do let runtime = hasName "td" >>> hasAttrValue "class" (isInfixOf "runtime") txt <- runX $ doc >>> deep runtime //> getText status <- parseStatus doc return . Finished (findscore status) . fromMaybe "Unknown time" $ flip (++) ...
611
false
true
0
15
241
244
116
128
null
null
loskutov/logic-hw
HW1/Main.hs
mit
main :: IO () main = printAnnotationList =<< annotateFile =<< head <$> getArgs
78
main :: IO () main = printAnnotationList =<< annotateFile =<< head <$> getArgs
78
main = printAnnotationList =<< annotateFile =<< head <$> getArgs
64
false
true
0
7
12
28
14
14
null
null
energyflowanalysis/efa-2.1
examples/advanced/energy/src/Modules/NonIO.hs
bsd-3-clause
iterationWithBestStates :: (RealFloat a, Show node, Show a, Node.C node, Arith.Constant a, UV.Unbox a, Arith.ZeroTestable a) => Params.System node a -> Params.Optimisation node [] Sweep.Sweep UV.Vector a -> Params.Simulation node [] a -> Type.EnvResult node (Sweep.Sweep UV.Vector a) -> [Loop.EtaLoopItem node...
588
iterationWithBestStates :: (RealFloat a, Show node, Show a, Node.C node, Arith.Constant a, UV.Unbox a, Arith.ZeroTestable a) => Params.System node a -> Params.Optimisation node [] Sweep.Sweep UV.Vector a -> Params.Simulation node [] a -> Type.EnvResult node (Sweep.Sweep UV.Vector a) -> [Loop.EtaLoopItem node...
569
iterationWithBestStates sysParams optParams simParams initEnv = Loop.iterateEtaWhile sysParams optParams simParams initEnv Balance.StateForcingOff
146
false
true
0
14
96
216
106
110
null
null
thulishuang/Compiler
src/Parser.hs
bsd-3-clause
evalCons :: ExprVal -> (ExprVal, ExprVal) evalCons (ExprCons pair) = pair
73
evalCons :: ExprVal -> (ExprVal, ExprVal) evalCons (ExprCons pair) = pair
73
evalCons (ExprCons pair) = pair
31
false
true
0
7
10
30
16
14
null
null
diku-dk/futhark
src/Futhark/CodeGen/Backends/SimpleRep.hs
isc
-- | Return an expression multiplying together the given expressions. -- If an empty list is given, the expression @1@ is returned. cproduct :: [C.Exp] -> C.Exp cproduct [] = [C.cexp|1|]
186
cproduct :: [C.Exp] -> C.Exp cproduct [] = [C.cexp|1|]
54
cproduct [] = [C.cexp|1|]
25
true
true
0
7
30
35
21
14
null
null
ckaestne/CIDE
CIDE_Language_Haskell/test/FGL-layout/Graph/Inductive/Query/ArtPoint.hs
gpl-3.0
------------------------------------------------------------------------------ -- Returns the low number for a node in a subtree. ------------------------------------------------------------------------------ getLow :: LOWTree Int -> Int getLow (Brc (_,_,l) _) = l
268
getLow :: LOWTree Int -> Int getLow (Brc (_,_,l) _) = l
55
getLow (Brc (_,_,l) _) = l
26
true
true
0
10
28
47
24
23
null
null
thinkpad20/oneormore
src/Data/OneOrMore/Operators.hs
mit
(++) :: OneOrMore a -> OneOrMore a -> OneOrMore a One x ++ ys = More x ys
73
(++) :: OneOrMore a -> OneOrMore a -> OneOrMore a One x ++ ys = More x ys
73
One x ++ ys = More x ys
23
false
true
0
7
17
44
20
24
null
null
beni55/haste-compiler
libraries/ghc-7.10/base/Data/Maybe.hs
bsd-3-clause
-- | The 'catMaybes' function takes a list of 'Maybe's and returns -- a list of all the 'Just' values. -- -- ==== __Examples__ -- -- Basic usage: -- -- >>> catMaybes [Just 1, Nothing, Just 3] -- [1,3] -- -- When constructing a list of 'Maybe' values, 'catMaybes' can be used -- to return all of the \"success\" results (...
693
catMaybes :: [Maybe a] -> [a] catMaybes ls = [x | Just x <- ls]
76
catMaybes ls = [x | Just x <- ls]
33
true
true
0
8
148
63
41
22
null
null
brendanhay/gogol
gogol-dataflow/gen/Network/Google/Dataflow/Types/Product.hs
mpl-2.0
-- | Creates a value of 'ComputationTopology' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'ctStateFamilies' -- -- * 'ctInputs' -- -- * 'ctKeyRanges' -- -- * 'ctOutputs' -- -- * 'ctComputationId' -- -- * 'ctSystemStageName' computat...
592
computationTopology :: ComputationTopology computationTopology = ComputationTopology' { _ctStateFamilies = Nothing , _ctInputs = Nothing , _ctKeyRanges = Nothing , _ctOutputs = Nothing , _ctComputationId = Nothing , _ctSystemStageName = Nothing }
280
computationTopology = ComputationTopology' { _ctStateFamilies = Nothing , _ctInputs = Nothing , _ctKeyRanges = Nothing , _ctOutputs = Nothing , _ctComputationId = Nothing , _ctSystemStageName = Nothing }
233
true
true
0
6
118
64
46
18
null
null
Kyly/liquidhaskell
src/Language/Haskell/Liquid/RefType.hs
bsd-3-clause
toType (RAppTy t (RExprArg _) _) = toType t
45
toType (RAppTy t (RExprArg _) _) = toType t
45
toType (RAppTy t (RExprArg _) _) = toType t
45
false
false
0
8
10
29
13
16
null
null
DanielSchiavini/ampersand
src/Database/Design/Ampersand/Core/ToMeta.hs
gpl-3.0
string2Meta :: Options -> String -> String string2Meta opts str = if metaTablesHaveUnderscore opts then show ("__"++unquoted++"__") else str where unquoted | length str < 2 = str | head str == '"' && last str == '"' = reverse . tail . reverse . tail $ str ...
343
string2Meta :: Options -> String -> String string2Meta opts str = if metaTablesHaveUnderscore opts then show ("__"++unquoted++"__") else str where unquoted | length str < 2 = str | head str == '"' && last str == '"' = reverse . tail . reverse . tail $ str ...
343
string2Meta opts str = if metaTablesHaveUnderscore opts then show ("__"++unquoted++"__") else str where unquoted | length str < 2 = str | head str == '"' && last str == '"' = reverse . tail . reverse . tail $ str | otherwise = str
300
false
true
1
11
121
125
60
65
null
null
athanclark/Idris-dev
src/Idris/Reflection.hs
bsd-3-clause
reifyTTConstApp f (Constant c@(B8 _)) | f == reflm "B8" = return $ c
85
reifyTTConstApp f (Constant c@(B8 _)) | f == reflm "B8" = return $ c
85
reifyTTConstApp f (Constant c@(B8 _)) | f == reflm "B8" = return $ c
85
false
false
0
10
30
43
20
23
null
null
sgillespie/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
realFracClassName = clsQual gHC_REAL (fsLit "RealFrac") realFracClassKey
78
realFracClassName = clsQual gHC_REAL (fsLit "RealFrac") realFracClassKey
78
realFracClassName = clsQual gHC_REAL (fsLit "RealFrac") realFracClassKey
78
false
false
0
7
12
19
9
10
null
null
thoughtpolice/hs-nacl
tests/SecretBox.hs
bsd-3-clause
-------------------------------------------------------------------------------- -- Authenticated secret-key encryption secretboxProp :: (SecretKey SecretBox -> Nonce SecretBox -> Bool) -> Property secretboxProp k = ioProperty $ liftM2 k randomKey randomNonce
260
secretboxProp :: (SecretKey SecretBox -> Nonce SecretBox -> Bool) -> Property secretboxProp k = ioProperty $ liftM2 k randomKey randomNonce
139
secretboxProp k = ioProperty $ liftM2 k randomKey randomNonce
61
true
true
0
9
25
48
24
24
null
null
rranelli/rrfuncprog
week5/lab.hs
unlicense
-- =================================== -- Ex. 3 -- =================================== funkyMap :: (a -> b) -> (a -> b) -> [a] -> [b] funkyMap _ _ [] = []
155
funkyMap :: (a -> b) -> (a -> b) -> [a] -> [b] funkyMap _ _ [] = []
67
funkyMap _ _ [] = []
20
true
true
0
8
26
57
32
25
null
null
kfish/ui-command
UI/Command/App.hs
bsd-3-clause
-- | Get the application arguments appArgs :: (Default config) => App config [String] appArgs = asks appContextArgs
115
appArgs :: (Default config) => App config [String] appArgs = asks appContextArgs
80
appArgs = asks appContextArgs
29
true
true
0
8
17
38
18
20
null
null
ghc-android/ghc
testsuite/tests/ghci/should_run/ghcirun004.hs
bsd-3-clause
2468 = 2467
11
2468 = 2467
11
2468 = 2467
11
false
false
1
5
2
10
3
7
null
null
kawamuray/ganeti
src/Ganeti/Constants.hs
gpl-2.0
runpartsRun :: Int runpartsRun = 1
34
runpartsRun :: Int runpartsRun = 1
34
runpartsRun = 1
15
false
true
0
4
5
11
6
5
null
null
dbp/positionsites
src/Handler/API.hs
bsd-3-clause
apiListSetDataExisting :: SiteUser -> Site -> Int -> Text -> Int -> Item -> Data -> FieldSpec -> AppHandler () apiListSetDataExisting user site item_id field idx item _dat spec' = apiExistingDataHandler user site field item spec' $ \id' fld -> modifyListFieldElems fld (updateAt idx (DataFieldData (Just id')))
316
apiListSetDataExisting :: SiteUser -> Site -> Int -> Text -> Int -> Item -> Data -> FieldSpec -> AppHandler () apiListSetDataExisting user site item_id field idx item _dat spec' = apiExistingDataHandler user site field item spec' $ \id' fld -> modifyListFieldElems fld (updateAt idx (DataFieldData (Just id')))
316
apiListSetDataExisting user site item_id field idx item _dat spec' = apiExistingDataHandler user site field item spec' $ \id' fld -> modifyListFieldElems fld (updateAt idx (DataFieldData (Just id')))
205
false
true
0
14
52
112
55
57
null
null
hemio-ev/libghc-acme
src/Network/ACME.hs
lgpl-3.0
acmePerformNewOrder :: AcmeObjNewOrder -> CragT (URL, AcmeObjOrder) acmePerformNewOrder ord = do res <- httpsJwsPost AcmeDirectoryRequestNewOrder ord loc <- resHeaderAsURL "Location" res newOrd <- resBody res return (loc, newOrd) -- | Wait after responses to challenges have been send (`acmeChallengeRespond`)
318
acmePerformNewOrder :: AcmeObjNewOrder -> CragT (URL, AcmeObjOrder) acmePerformNewOrder ord = do res <- httpsJwsPost AcmeDirectoryRequestNewOrder ord loc <- resHeaderAsURL "Location" res newOrd <- resBody res return (loc, newOrd) -- | Wait after responses to challenges have been send (`acmeChallengeRespond`)
318
acmePerformNewOrder ord = do res <- httpsJwsPost AcmeDirectoryRequestNewOrder ord loc <- resHeaderAsURL "Location" res newOrd <- resBody res return (loc, newOrd) -- | Wait after responses to challenges have been send (`acmeChallengeRespond`)
250
false
true
0
8
47
74
35
39
null
null
torstein-vik/zeta-types
src/patterns/Pattern.hs
gpl-3.0
findPattern :: (Eq i, Valuable m n i) => Pattern n i m -> [(n, i)] -> Maybe m findPattern pat input = case filterPatterns pat input of pat:[] -> Just pat _ -> Nothing
222
findPattern :: (Eq i, Valuable m n i) => Pattern n i m -> [(n, i)] -> Maybe m findPattern pat input = case filterPatterns pat input of pat:[] -> Just pat _ -> Nothing
222
findPattern pat input = case filterPatterns pat input of pat:[] -> Just pat _ -> Nothing
144
false
true
0
9
90
92
46
46
null
null
Teaspot-Studio/gore-and-ash-sync
src/Game/GoreAndAsh/Sync/API.hs
bsd-3-clause
syncFromClient :: (SyncMonad t b m, NetworkServer t b m, Store a) => SyncItemId -- ^ Unique name of synchronization value withing current scope -> m a -- ^ Make initial value -> Event t a -- ^ When the event fires, client side info is rejected and payload replaces -- dynamic contents. -> Peer b -- ^ P...
1,262
syncFromClient :: (SyncMonad t b m, NetworkServer t b m, Store a) => SyncItemId -- ^ Unique name of synchronization value withing current scope -> m a -- ^ Make initial value -> Event t a -- ^ When the event fires, client side info is rejected and payload replaces -- dynamic contents. -> Peer b -- ^ P...
1,135
syncFromClient itemId mkInit rejectE peer = do opts <- syncOptions let chan = opts ^. syncOptionsChannel i <- makeSyncName =<< syncCurrentName -- listen for state msgE <- syncPeerMessage peer i itemId -- check whether we want to reject value rec let rejectsE = attachWith (,) (current updatedDyn) rejec...
745
true
true
0
15
264
267
133
134
null
null
janschulz/pandoc
src/Text/Pandoc/Readers/Markdown.hs
gpl-2.0
htmlBlock :: MarkdownParser (F Blocks) htmlBlock = do guardEnabled Ext_raw_html try (do (TagOpen t attrs) <- lookAhead $ fst <$> htmlTag isBlockTag (guard (t `elem` ["pre","style","script"]) >> (return . B.rawBlock "html") <$> rawVerbatimBlock) <|> (do guardEnabled Ext_markdown_attribu...
1,213
htmlBlock :: MarkdownParser (F Blocks) htmlBlock = do guardEnabled Ext_raw_html try (do (TagOpen t attrs) <- lookAhead $ fst <$> htmlTag isBlockTag (guard (t `elem` ["pre","style","script"]) >> (return . B.rawBlock "html") <$> rawVerbatimBlock) <|> (do guardEnabled Ext_markdown_attribu...
1,213
htmlBlock = do guardEnabled Ext_raw_html try (do (TagOpen t attrs) <- lookAhead $ fst <$> htmlTag isBlockTag (guard (t `elem` ["pre","style","script"]) >> (return . B.rawBlock "html") <$> rawVerbatimBlock) <|> (do guardEnabled Ext_markdown_attribute oldMarkdownAttribute...
1,174
false
true
0
26
495
280
140
140
null
null
kelnage/tamarin-prover
lib/theory/src/Theory/Constraint/Solver/Simplify.hs
gpl-3.0
exploitUniqueMsgOrder :: Reduction () exploitUniqueMsgOrder = do kdConcs <- gets (M.fromList . map (\(i, _, m) -> (m, i)) . allKDConcs) kuActions <- gets (M.fromList . map (\(i, _, m) -> (m, i)) . allKUActions) -- We can add all elements where we have an intersection F.mapM_ (uncurry insertLess) $ M.i...
532
exploitUniqueMsgOrder :: Reduction () exploitUniqueMsgOrder = do kdConcs <- gets (M.fromList . map (\(i, _, m) -> (m, i)) . allKDConcs) kuActions <- gets (M.fromList . map (\(i, _, m) -> (m, i)) . allKUActions) -- We can add all elements where we have an intersection F.mapM_ (uncurry insertLess) $ M.i...
532
exploitUniqueMsgOrder = do kdConcs <- gets (M.fromList . map (\(i, _, m) -> (m, i)) . allKDConcs) kuActions <- gets (M.fromList . map (\(i, _, m) -> (m, i)) . allKUActions) -- We can add all elements where we have an intersection F.mapM_ (uncurry insertLess) $ M.intersectionWith (,) kdConcs kuActions ...
494
false
true
1
16
98
153
81
72
null
null
google/hs-fin-vec
short-vec/test/Benchmark.hs
apache-2.0
benchForce_DeepSeq , benchPure, benchRot , benchMap, benchMapId, benchMapCoerce, benchMap2 , benchSum, benchSumMap , benchFoldr, benchFoldr1, benchFoldr', benchFoldl, benchFoldl1, benchFoldl' , benchAppend, benchAppendMap , benchTraverseIO , benchLiftA2 , benchConvolve , benchMapWithPos , benchMapTo...
550
benchForce_DeepSeq , benchPure, benchRot , benchMap, benchMapId, benchMapCoerce, benchMap2 , benchSum, benchSumMap , benchFoldr, benchFoldr1, benchFoldr', benchFoldl, benchFoldl1, benchFoldl' , benchAppend, benchAppendMap , benchTraverseIO , benchLiftA2 , benchConvolve , benchMapWithPos , benchMapTo...
549
benchForce_DeepSeq = G.bench "force_DeepSeq" $ G.whnf force theAnswer
69
false
true
0
7
82
89
74
15
null
null
oldmanmike/ghc
compiler/typecheck/TcRnTypes.hs
bsd-3-clause
pprPECategory NoTypeInTypeTC = text "Type constructor"
54
pprPECategory NoTypeInTypeTC = text "Type constructor"
54
pprPECategory NoTypeInTypeTC = text "Type constructor"
54
false
false
1
5
5
15
5
10
null
null
misterbeebee/calisson-hs
src/Data/BinarySearch.hs
bsd-3-clause
remove :: MinMaxable n => n -> Binary n -> Binary n remove = adjust Remove
74
remove :: MinMaxable n => n -> Binary n -> Binary n remove = adjust Remove
74
remove = adjust Remove
22
false
true
0
8
15
35
16
19
null
null
edsko/hackage-server
tests/CreateUserTest.hs
bsd-3-clause
testName :: FilePath testName = "CreateUserTestTemp"
52
testName :: FilePath testName = "CreateUserTestTemp"
52
testName = "CreateUserTestTemp"
31
false
true
0
4
5
11
6
5
null
null
Chattered/PhilEdCommon
Philed/Data/Geom/Between.hs
mit
prop3 :: V1 Eight -> V1 Eight -> V1 Eight -> V1 Eight -> Bool prop3 a b c d = eightList (ab <> cd) == filter (liftA2 (||) (inOrdered ab) (inOrdered cd)) eights where ab = singleton (a,b) cd = singleton (c,d)
233
prop3 :: V1 Eight -> V1 Eight -> V1 Eight -> V1 Eight -> Bool prop3 a b c d = eightList (ab <> cd) == filter (liftA2 (||) (inOrdered ab) (inOrdered cd)) eights where ab = singleton (a,b) cd = singleton (c,d)
233
prop3 a b c d = eightList (ab <> cd) == filter (liftA2 (||) (inOrdered ab) (inOrdered cd)) eights where ab = singleton (a,b) cd = singleton (c,d)
171
false
true
1
10
68
122
61
61
null
null
Lainepress/hub-src
Hub/Commands.hs
bsd-3-clause
is_global :: Hub -> IO () is_global hub = when (kind__HUB hub/=GlbHK) $ oops HubO $ printf "%s: not a global hub" $name__HUB hub
148
is_global :: Hub -> IO () is_global hub = when (kind__HUB hub/=GlbHK) $ oops HubO $ printf "%s: not a global hub" $name__HUB hub
148
is_global hub = when (kind__HUB hub/=GlbHK) $ oops HubO $ printf "%s: not a global hub" $name__HUB hub
122
false
true
0
8
43
59
26
33
null
null
mightymoose/liquidhaskell
benchmarks/containers-0.5.0.0/benchmarks/IntMap.hs
bsd-3-clause
del :: [Int] -> M.IntMap Int -> M.IntMap Int del xs m = foldl' (\m k -> M.delete k m) m xs
90
del :: [Int] -> M.IntMap Int -> M.IntMap Int del xs m = foldl' (\m k -> M.delete k m) m xs
90
del xs m = foldl' (\m k -> M.delete k m) m xs
45
false
true
0
9
21
61
30
31
null
null
Tuplanolla/ties341-schemes
Folds.hs
gpl-3.0
foldR f Empty = f Nothing
25
foldR f Empty = f Nothing
25
foldR f Empty = f Nothing
25
false
false
0
5
5
16
6
10
null
null