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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Chase-C/Flocking-Haskell
|
src/OctreePar.hs
|
gpl-2.0
|
splitTree :: Octree -> Octree
splitTree (Leaf c@(V3 cx cy cz) l cnt objs) = foldl insert tree objs
where tree = Node
{ center = c
, len = l
, count = cnt
, ftr = et rx ty fz, ftl = et lx ty fz
, fbr = et rx by fz, fbl = et lx by fz
, btr = et rx ty bz, btl = et lx ty bz
, bbr = et rx by bz, bbl = et lx by bz
}
et x y z = emptyOctree (V3 x y z) hl
hl = l / 2
rx = cx + hl
lx = cx - hl
ty = cy + hl
by = cy - hl
fz = cz + hl
bz = cz - hl
| 719
|
splitTree :: Octree -> Octree
splitTree (Leaf c@(V3 cx cy cz) l cnt objs) = foldl insert tree objs
where tree = Node
{ center = c
, len = l
, count = cnt
, ftr = et rx ty fz, ftl = et lx ty fz
, fbr = et rx by fz, fbl = et lx by fz
, btr = et rx ty bz, btl = et lx ty bz
, bbr = et rx by bz, bbl = et lx by bz
}
et x y z = emptyOctree (V3 x y z) hl
hl = l / 2
rx = cx + hl
lx = cx - hl
ty = cy + hl
by = cy - hl
fz = cz + hl
bz = cz - hl
| 719
|
splitTree (Leaf c@(V3 cx cy cz) l cnt objs) = foldl insert tree objs
where tree = Node
{ center = c
, len = l
, count = cnt
, ftr = et rx ty fz, ftl = et lx ty fz
, fbr = et rx by fz, fbl = et lx by fz
, btr = et rx ty bz, btl = et lx ty bz
, bbr = et rx by bz, bbl = et lx by bz
}
et x y z = emptyOctree (V3 x y z) hl
hl = l / 2
rx = cx + hl
lx = cx - hl
ty = cy + hl
by = cy - hl
fz = cz + hl
bz = cz - hl
| 689
| false
| true
| 8
| 15
| 415
| 286
| 146
| 140
| null | null |
dpiponi/Bine
|
src/MetaData.hs
|
bsd-3-clause
|
main :: IO ()
main = do
-- mv <- readMetaCatalogue ".BBC_Store"
-- let mv' = mv & catalogue . ix "WWELCOME" . loadAddress +~ 1
-- writeMetaCatalogue ".BBC_Store" mv'
setMetaData "WWELCOME" 0x0 0x1900
setMetaData "!BOOT" 0xffffffff 0x0e01
setMetaData "$SKETCH" 0x0000 0x0900
setMetaData "XFRED" 0x0000 0x0a00
u <- getMetaData "WWELCOME"
print u
deleteMetaData "$SKETCH"
| 405
|
main :: IO ()
main = do
-- mv <- readMetaCatalogue ".BBC_Store"
-- let mv' = mv & catalogue . ix "WWELCOME" . loadAddress +~ 1
-- writeMetaCatalogue ".BBC_Store" mv'
setMetaData "WWELCOME" 0x0 0x1900
setMetaData "!BOOT" 0xffffffff 0x0e01
setMetaData "$SKETCH" 0x0000 0x0900
setMetaData "XFRED" 0x0000 0x0a00
u <- getMetaData "WWELCOME"
print u
deleteMetaData "$SKETCH"
| 405
|
main = do
-- mv <- readMetaCatalogue ".BBC_Store"
-- let mv' = mv & catalogue . ix "WWELCOME" . loadAddress +~ 1
-- writeMetaCatalogue ".BBC_Store" mv'
setMetaData "WWELCOME" 0x0 0x1900
setMetaData "!BOOT" 0xffffffff 0x0e01
setMetaData "$SKETCH" 0x0000 0x0900
setMetaData "XFRED" 0x0000 0x0a00
u <- getMetaData "WWELCOME"
print u
deleteMetaData "$SKETCH"
| 391
| false
| true
| 0
| 9
| 90
| 87
| 36
| 51
| null | null |
tonyfloatersu/solution-haskell-craft-of-FP
|
SetADT.hs
|
mit
|
memSet :: Ord a => a -> Set a -> Bool
memSet _ (Set []) = False
| 66
|
memSet :: Ord a => a -> Set a -> Bool
memSet _ (Set []) = False
| 66
|
memSet _ (Set []) = False
| 28
| false
| true
| 0
| 8
| 19
| 42
| 20
| 22
| null | null |
AshyIsMe/osxmonad
|
OSXMonad/Keys.hs
|
bsd-3-clause
|
osxKeyToX11 0x1B = xK_minus
| 27
|
osxKeyToX11 0x1B = xK_minus
| 27
|
osxKeyToX11 0x1B = xK_minus
| 27
| false
| false
| 0
| 5
| 3
| 9
| 4
| 5
| null | null |
Raveline/lambdacula
|
src/Lambdacula/Parser.hs
|
gpl-3.0
|
transformIntoAction (Just v) (Just o) (Just o') = Complex (actionType v) o o'
| 77
|
transformIntoAction (Just v) (Just o) (Just o') = Complex (actionType v) o o'
| 77
|
transformIntoAction (Just v) (Just o) (Just o') = Complex (actionType v) o o'
| 77
| false
| false
| 0
| 7
| 12
| 44
| 21
| 23
| null | null |
abakst/liquidhaskell
|
src/Language/Haskell/Liquid/UX/Annotate.hs
|
bsd-3-clause
|
tokeniseSpec :: String -> [(TokenType, String)]
tokeniseSpec str = {- traceShow ("tokeniseSpec: " ++ str) $ -} tokeniseSpec' str
| 137
|
tokeniseSpec :: String -> [(TokenType, String)]
tokeniseSpec str = {- traceShow ("tokeniseSpec: " ++ str) $ -} tokeniseSpec' str
| 137
|
tokeniseSpec str = {- traceShow ("tokeniseSpec: " ++ str) $ -} tokeniseSpec' str
| 82
| false
| true
| 0
| 9
| 27
| 36
| 18
| 18
| null | null |
ezyang/ghc
|
compiler/types/Coercion.hs
|
bsd-3-clause
|
seqProv (PhantomProv co) = seqCo co
| 38
|
seqProv (PhantomProv co) = seqCo co
| 38
|
seqProv (PhantomProv co) = seqCo co
| 38
| false
| false
| 0
| 7
| 8
| 18
| 8
| 10
| null | null |
snoyberg/ghc
|
compiler/stranal/WwLib.hs
|
bsd-3-clause
|
mkUnpackCase :: CoreExpr -> Coercion -> Unique -> DataCon -> [Id] -> CoreExpr -> CoreExpr
-- (mkUnpackCase e co uniq Con args body)
-- returns
-- case e |> co of bndr { Con args -> body }
mkUnpackCase (Tick tickish e) co uniq con args body -- See Note [Profiling and unpacking]
= Tick tickish (mkUnpackCase e co uniq con args body)
| 342
|
mkUnpackCase :: CoreExpr -> Coercion -> Unique -> DataCon -> [Id] -> CoreExpr -> CoreExpr
mkUnpackCase (Tick tickish e) co uniq con args body -- See Note [Profiling and unpacking]
= Tick tickish (mkUnpackCase e co uniq con args body)
| 238
|
mkUnpackCase (Tick tickish e) co uniq con args body -- See Note [Profiling and unpacking]
= Tick tickish (mkUnpackCase e co uniq con args body)
| 147
| true
| true
| 0
| 14
| 73
| 91
| 45
| 46
| null | null |
mapinguari/SC_HS_Proxy
|
src/Proxy/Query/Unit.hs
|
mit
|
supplyProvided ZergDefilerMound = 0
| 35
|
supplyProvided ZergDefilerMound = 0
| 35
|
supplyProvided ZergDefilerMound = 0
| 35
| false
| false
| 0
| 5
| 3
| 9
| 4
| 5
| null | null |
nurpax/aeson
|
Data/Aeson.hs
|
bsd-3-clause
|
-- | Efficiently deserialize a JSON value from a lazy 'L.ByteString'.
-- If this fails due to incomplete or invalid input, 'Nothing' is
-- returned.
--
-- The input must consist solely of a JSON document, with no trailing
-- data except for whitespace.
--
-- This function parses and performs conversion immediately. See
-- 'json'' for details.
decode' :: (FromJSON a) => L.ByteString -> Maybe a
decode' = decodeWith jsonEOF' fromJSON
| 435
|
decode' :: (FromJSON a) => L.ByteString -> Maybe a
decode' = decodeWith jsonEOF' fromJSON
| 89
|
decode' = decodeWith jsonEOF' fromJSON
| 38
| true
| true
| 0
| 7
| 72
| 43
| 26
| 17
| null | null |
haroldcarr/learn-haskell-coq-ml-etc
|
haskell/conference/2017-09-cufp-effects/src/Tutorial3_Orig.hs
|
unlicense
|
-- Application to the `generalized effectful function' Arrs r b w
-- A bit more understandable version
qApp :: Arrs r b w -> b -> Eff r w
qApp q x = case tviewl q of
TOne k -> k x
k :| t -> bind' (k x) t
where
bind' :: Eff r a -> Arrs r a b -> Eff r b
bind' (Val y) k = qApp k y
bind' (E u q) k = E u (q >< k)
-- Eff is still a monad and a functor (and Applicative)
-- (despite the lack of the Functor constraint)
| 435
|
qApp :: Arrs r b w -> b -> Eff r w
qApp q x = case tviewl q of
TOne k -> k x
k :| t -> bind' (k x) t
where
bind' :: Eff r a -> Arrs r a b -> Eff r b
bind' (Val y) k = qApp k y
bind' (E u q) k = E u (q >< k)
-- Eff is still a monad and a functor (and Applicative)
-- (despite the lack of the Functor constraint)
| 332
|
qApp q x = case tviewl q of
TOne k -> k x
k :| t -> bind' (k x) t
where
bind' :: Eff r a -> Arrs r a b -> Eff r b
bind' (Val y) k = qApp k y
bind' (E u q) k = E u (q >< k)
-- Eff is still a monad and a functor (and Applicative)
-- (despite the lack of the Functor constraint)
| 297
| true
| true
| 4
| 10
| 124
| 160
| 79
| 81
| null | null |
NicolasDP/hit
|
Data/Git/Storage/Loose.hs
|
bsd-3-clause
|
looseUnmarshall :: L.ByteString -> Object
looseUnmarshall = parseObject
| 71
|
looseUnmarshall :: L.ByteString -> Object
looseUnmarshall = parseObject
| 71
|
looseUnmarshall = parseObject
| 29
| false
| true
| 0
| 6
| 7
| 17
| 9
| 8
| null | null |
amremam2004/vxmlizer
|
Text/XML/Light/Cursor.hs
|
bsd-3-clause
|
-- | Do we have children?
hasChildren :: Cursor -> Bool
hasChildren loc = not (isLeaf loc)
| 90
|
hasChildren :: Cursor -> Bool
hasChildren loc = not (isLeaf loc)
| 64
|
hasChildren loc = not (isLeaf loc)
| 34
| true
| true
| 0
| 7
| 16
| 31
| 15
| 16
| null | null |
dillonhuff/Folly
|
src/Folly/Formula.hs
|
bsd-3-clause
|
applyToTerms (B n l r) f = B n (applyToTerms l f) (applyToTerms r f)
| 68
|
applyToTerms (B n l r) f = B n (applyToTerms l f) (applyToTerms r f)
| 68
|
applyToTerms (B n l r) f = B n (applyToTerms l f) (applyToTerms r f)
| 68
| false
| false
| 0
| 7
| 14
| 44
| 21
| 23
| null | null |
AndrewRademacher/zotac
|
test/Test/Data/List.hs
|
mit
|
-- | Generates a list like [5, 4, 3, 2, 1, 0..], starting at an anchor
denseOrderedListFromDesc :: (Enum a) => a -> [a]
denseOrderedListFromDesc anchor = [anchor, (pred anchor)..]
| 179
|
denseOrderedListFromDesc :: (Enum a) => a -> [a]
denseOrderedListFromDesc anchor = [anchor, (pred anchor)..]
| 108
|
denseOrderedListFromDesc anchor = [anchor, (pred anchor)..]
| 59
| true
| true
| 0
| 7
| 29
| 43
| 24
| 19
| null | null |
AlexeyRaga/eta
|
compiler/ETA/TypeCheck/TcType.hs
|
bsd-3-clause
|
{-
Note [Foreign import dynamic]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A dynamic stub must be of the form 'FunPtr ft -> ft' where ft is any foreign
type. Similarly, a wrapper stub must be of the form 'ft -> IO (FunPtr ft)'.
We use isFFIDynTy to check whether a signature is well-formed. For example,
given a (illegal) declaration like:
foreign import ccall "dynamic"
foo :: FunPtr (CDouble -> IO ()) -> CInt -> IO ()
isFFIDynTy will compare the 'FunPtr' type 'CDouble -> IO ()' with the curried
result type 'CInt -> IO ()', and return False, as they are not equal.
----------------------------------------------
These chaps do the work; they are not exported
----------------------------------------------
-}
legalFEArgTyCon :: TyCon -> Type -> Bool
legalFEArgTyCon tc ty
-- It's illegal to make foreign exports that take unboxed
-- arguments. The RTS API currently can't invoke such things. --SDM 7/2000
= boxedMarshalableTyCon tc ty
| 943
|
legalFEArgTyCon :: TyCon -> Type -> Bool
legalFEArgTyCon tc ty
-- It's illegal to make foreign exports that take unboxed
-- arguments. The RTS API currently can't invoke such things. --SDM 7/2000
= boxedMarshalableTyCon tc ty
| 233
|
legalFEArgTyCon tc ty
-- It's illegal to make foreign exports that take unboxed
-- arguments. The RTS API currently can't invoke such things. --SDM 7/2000
= boxedMarshalableTyCon tc ty
| 192
| true
| true
| 0
| 8
| 162
| 37
| 18
| 19
| null | null |
TomMD/ghc
|
compiler/types/Type.hs
|
bsd-3-clause
|
-- There used to be a special case for when
-- ty == TyVarTy tv
-- (a not-uncommon case) in which case the substitution was dropped.
-- But the type-tidier changes the print-name of a type variable without
-- changing the unique, and that led to a bug. Why? Pre-tidying, we had
-- a type {Foo t}, where Foo is a one-method class. So Foo is really a newtype.
-- And it happened that t was the type variable of the class. Post-tiding,
-- it got turned into {Foo t2}. The ext-core printer expanded this using
-- sourceTypeRep, but that said "Oh, t == t2" because they have the same unique,
-- and so generated a rep type mentioning t not t2.
--
-- Simplest fix is to nuke the "optimisation"
zip_ty_env tvs tys env = pprTrace "Var/Type length mismatch: " (ppr tvs $$ ppr tys) env
| 886
|
zip_ty_env tvs tys env = pprTrace "Var/Type length mismatch: " (ppr tvs $$ ppr tys) env
| 99
|
zip_ty_env tvs tys env = pprTrace "Var/Type length mismatch: " (ppr tvs $$ ppr tys) env
| 99
| true
| false
| 0
| 8
| 257
| 47
| 27
| 20
| null | null |
vinnymac/glot-www
|
Model/Language.hs
|
mit
|
languageAceMode Swift = "ace/mode/swift"
| 40
|
languageAceMode Swift = "ace/mode/swift"
| 40
|
languageAceMode Swift = "ace/mode/swift"
| 40
| false
| false
| 0
| 5
| 3
| 9
| 4
| 5
| null | null |
jbracker/supermonad-plugin
|
examples/monad/hmtc/supermonad/PPTAMCode.hs
|
bsd-3-clause
|
ppTAMInst EQL = ppOA "EQL" ""
| 43
|
ppTAMInst EQL = ppOA "EQL" ""
| 43
|
ppTAMInst EQL = ppOA "EQL" ""
| 43
| false
| false
| 0
| 5
| 19
| 14
| 6
| 8
| null | null |
mightymoose/liquidhaskell
|
src/Language/Haskell/Liquid/Bare/DataType.hs
|
bsd-3-clause
|
getPsSig m pos (RAppTy t1 t2 r)
= addps m pos r ++ getPsSig m pos t1 ++ getPsSig m pos t2
| 91
|
getPsSig m pos (RAppTy t1 t2 r)
= addps m pos r ++ getPsSig m pos t1 ++ getPsSig m pos t2
| 91
|
getPsSig m pos (RAppTy t1 t2 r)
= addps m pos r ++ getPsSig m pos t1 ++ getPsSig m pos t2
| 91
| false
| false
| 0
| 7
| 23
| 57
| 24
| 33
| null | null |
patrickherrmann/sudoku
|
src/Sudoku.hs
|
mit
|
readStatus :: Char -> Either String Status
readStatus '.' = Right vals
| 70
|
readStatus :: Char -> Either String Status
readStatus '.' = Right vals
| 70
|
readStatus '.' = Right vals
| 27
| false
| true
| 0
| 7
| 11
| 31
| 13
| 18
| null | null |
ml9951/ghc
|
compiler/llvmGen/Llvm/PpLlvm.hs
|
bsd-3-clause
|
-- | Print out a list of function declaration.
ppLlvmFunctionDecls :: LlvmFunctionDecls -> SDoc
ppLlvmFunctionDecls decs = vcat $ map ppLlvmFunctionDecl decs
| 157
|
ppLlvmFunctionDecls :: LlvmFunctionDecls -> SDoc
ppLlvmFunctionDecls decs = vcat $ map ppLlvmFunctionDecl decs
| 110
|
ppLlvmFunctionDecls decs = vcat $ map ppLlvmFunctionDecl decs
| 61
| true
| true
| 0
| 6
| 21
| 28
| 14
| 14
| null | null |
eddywestbrook/hobbits
|
src/Data/Type/RList.hs
|
bsd-3-clause
|
-- | Convert a monomorphic 'RAssign' to a list
toList :: RAssign (Constant a) c -> [a]
toList = mapToList getConstant
| 117
|
toList :: RAssign (Constant a) c -> [a]
toList = mapToList getConstant
| 70
|
toList = mapToList getConstant
| 30
| true
| true
| 0
| 8
| 20
| 33
| 17
| 16
| null | null |
FranklinChen/hugs98-plus-Sep2006
|
packages/GLUT/examples/BOGLGP/Chapter03/Polygons.hs
|
bsd-3-clause
|
usage :: IO String
usage = do
progName <- getProgName
return $ usageInfo ("Usage: " ++ progName ++ " [OPTION...]") options
| 128
|
usage :: IO String
usage = do
progName <- getProgName
return $ usageInfo ("Usage: " ++ progName ++ " [OPTION...]") options
| 128
|
usage = do
progName <- getProgName
return $ usageInfo ("Usage: " ++ progName ++ " [OPTION...]") options
| 109
| false
| true
| 0
| 11
| 26
| 44
| 21
| 23
| null | null |
tonyday567/hdcharts
|
src/Chart/BarW.hs
|
mit
|
testPlay :: IO ()
testPlay = void $
runPlay
testProducer
(Chart.Render.render (chartCss "chart") [defaultChart [testElement]])
def
| 138
|
testPlay :: IO ()
testPlay = void $
runPlay
testProducer
(Chart.Render.render (chartCss "chart") [defaultChart [testElement]])
def
| 138
|
testPlay = void $
runPlay
testProducer
(Chart.Render.render (chartCss "chart") [defaultChart [testElement]])
def
| 120
| false
| true
| 0
| 9
| 23
| 55
| 27
| 28
| null | null |
ezyang/ghc
|
compiler/utils/Pretty.hs
|
bsd-3-clause
|
txtPrinter (LStr s1 _) s2 = unpackLitString s1 ++ s2
| 52
|
txtPrinter (LStr s1 _) s2 = unpackLitString s1 ++ s2
| 52
|
txtPrinter (LStr s1 _) s2 = unpackLitString s1 ++ s2
| 52
| false
| false
| 0
| 7
| 9
| 26
| 12
| 14
| null | null |
spechub/Hets
|
Maude/PreComorphism.hs
|
gpl-2.0
|
{- | translates the mapping between two symbols representing operators into
a CASL operators map -}
translateOpMapEntry :: IdMap -> MSym.Symbol -> MSym.Symbol -> CMorphism.Op_map
-> CMorphism.Op_map
translateOpMapEntry im (MSym.Operator from ar co) (MSym.Operator to _ _) copm
= copm'
where f = token2id . getName
g x = Map.findWithDefault (errorId "translate op map entry")
(f x) im
ot = CSign.OpType CAS.Total (map g ar) (g co)
cop = (token2id from, ot)
to' = (token2id to, CAS.Total)
copm' = Map.insert cop to' copm
| 611
|
translateOpMapEntry :: IdMap -> MSym.Symbol -> MSym.Symbol -> CMorphism.Op_map
-> CMorphism.Op_map
translateOpMapEntry im (MSym.Operator from ar co) (MSym.Operator to _ _) copm
= copm'
where f = token2id . getName
g x = Map.findWithDefault (errorId "translate op map entry")
(f x) im
ot = CSign.OpType CAS.Total (map g ar) (g co)
cop = (token2id from, ot)
to' = (token2id to, CAS.Total)
copm' = Map.insert cop to' copm
| 511
|
translateOpMapEntry im (MSym.Operator from ar co) (MSym.Operator to _ _) copm
= copm'
where f = token2id . getName
g x = Map.findWithDefault (errorId "translate op map entry")
(f x) im
ot = CSign.OpType CAS.Total (map g ar) (g co)
cop = (token2id from, ot)
to' = (token2id to, CAS.Total)
copm' = Map.insert cop to' copm
| 410
| true
| true
| 0
| 13
| 175
| 185
| 94
| 91
| null | null |
chrisdone/ace
|
test/Main.hs
|
bsd-3-clause
|
specifiers =
do it "specifier"
(parsed specifier "<proper-name>'s" ==
Right (SpecifyPossessive
(PossessiveNPCoordGen
(GenitiveNPCoordName
(ProperName "<proper-name>")
(GenitiveTailSaxonTail
(SaxonGenitiveTail ApostropheS
Nothing))))))
it "specifier"
(parsed specifier "1" ==
Right (SpecifyNumberP (NumberP Nothing 1)))
it "specifier"
(parsed specifier "a" ==
Right (SpecifyDeterminer A))
it "genitiveSpecifier"
(parsed genitiveSpecifier "1" ==
Right (GenitiveSpecifierN 1))
it "genitiveSpecifier"
(parsed genitiveSpecifier "a" ==
Right (GenitiveSpecifierD A))
it "genitiveSpecifier"
(parsed genitiveSpecifier "some" ==
Right (GenitiveSpecifierD Some))
it "genitiveSpecifier"
(parsed genitiveSpecifier "his" ==
Right (GenitiveSpecifierPPC (PossessivePronounCoord His Nothing)))
| 1,083
|
specifiers =
do it "specifier"
(parsed specifier "<proper-name>'s" ==
Right (SpecifyPossessive
(PossessiveNPCoordGen
(GenitiveNPCoordName
(ProperName "<proper-name>")
(GenitiveTailSaxonTail
(SaxonGenitiveTail ApostropheS
Nothing))))))
it "specifier"
(parsed specifier "1" ==
Right (SpecifyNumberP (NumberP Nothing 1)))
it "specifier"
(parsed specifier "a" ==
Right (SpecifyDeterminer A))
it "genitiveSpecifier"
(parsed genitiveSpecifier "1" ==
Right (GenitiveSpecifierN 1))
it "genitiveSpecifier"
(parsed genitiveSpecifier "a" ==
Right (GenitiveSpecifierD A))
it "genitiveSpecifier"
(parsed genitiveSpecifier "some" ==
Right (GenitiveSpecifierD Some))
it "genitiveSpecifier"
(parsed genitiveSpecifier "his" ==
Right (GenitiveSpecifierPPC (PossessivePronounCoord His Nothing)))
| 1,083
|
specifiers =
do it "specifier"
(parsed specifier "<proper-name>'s" ==
Right (SpecifyPossessive
(PossessiveNPCoordGen
(GenitiveNPCoordName
(ProperName "<proper-name>")
(GenitiveTailSaxonTail
(SaxonGenitiveTail ApostropheS
Nothing))))))
it "specifier"
(parsed specifier "1" ==
Right (SpecifyNumberP (NumberP Nothing 1)))
it "specifier"
(parsed specifier "a" ==
Right (SpecifyDeterminer A))
it "genitiveSpecifier"
(parsed genitiveSpecifier "1" ==
Right (GenitiveSpecifierN 1))
it "genitiveSpecifier"
(parsed genitiveSpecifier "a" ==
Right (GenitiveSpecifierD A))
it "genitiveSpecifier"
(parsed genitiveSpecifier "some" ==
Right (GenitiveSpecifierD Some))
it "genitiveSpecifier"
(parsed genitiveSpecifier "his" ==
Right (GenitiveSpecifierPPC (PossessivePronounCoord His Nothing)))
| 1,083
| false
| false
| 1
| 21
| 383
| 263
| 119
| 144
| null | null |
tkonolige/vector-clock
|
test/Props.hs
|
gpl-3.0
|
-- @max vc1 vc2@ does not cause either @vc1@ or @vc2@, unless @max vc1
-- vc2@ is either @vc1@ or @vc2@
propMaxNotCauses :: VC -> VC -> Property
propMaxNotCauses vc1 vc2 =
let vcMax = max vc1 vc2 in
(vcMax /= vc1 && vcMax /= vc2) ==>
relation vcMax vc1 /= Causes &&
relation vcMax vc2 /= Causes &&
relation vc1 vcMax /= CausedBy &&
relation vc2 vcMax /= CausedBy
| 386
|
propMaxNotCauses :: VC -> VC -> Property
propMaxNotCauses vc1 vc2 =
let vcMax = max vc1 vc2 in
(vcMax /= vc1 && vcMax /= vc2) ==>
relation vcMax vc1 /= Causes &&
relation vcMax vc2 /= Causes &&
relation vc1 vcMax /= CausedBy &&
relation vc2 vcMax /= CausedBy
| 282
|
propMaxNotCauses vc1 vc2 =
let vcMax = max vc1 vc2 in
(vcMax /= vc1 && vcMax /= vc2) ==>
relation vcMax vc1 /= Causes &&
relation vcMax vc2 /= Causes &&
relation vc1 vcMax /= CausedBy &&
relation vc2 vcMax /= CausedBy
| 241
| true
| true
| 8
| 11
| 93
| 127
| 58
| 69
| null | null |
JPMoresmau/HJVM
|
src/Language/Java/JVM/Generator.hs
|
bsd-3-clause
|
parseClass :: FilePath -> String -> IO (Either ParseError TypeDecl)
parseClass javaHome className=do
contents<-runJavap javaHome className
return $ parseTypeDecl contents
| 186
|
parseClass :: FilePath -> String -> IO (Either ParseError TypeDecl)
parseClass javaHome className=do
contents<-runJavap javaHome className
return $ parseTypeDecl contents
| 186
|
parseClass javaHome className=do
contents<-runJavap javaHome className
return $ parseTypeDecl contents
| 118
| false
| true
| 0
| 9
| 35
| 57
| 26
| 31
| null | null |
david-caro/shellcheck
|
ShellCheck/Analytics.hs
|
gpl-3.0
|
prop_checkDoubleBracketOperators1 = verify checkDoubleBracketOperators "[[ 3 \\< 4 ]]"
| 86
|
prop_checkDoubleBracketOperators1 = verify checkDoubleBracketOperators "[[ 3 \\< 4 ]]"
| 86
|
prop_checkDoubleBracketOperators1 = verify checkDoubleBracketOperators "[[ 3 \\< 4 ]]"
| 86
| false
| false
| 0
| 5
| 8
| 11
| 5
| 6
| null | null |
ml9951/ghc
|
compiler/hsSyn/HsDecls.hs
|
bsd-3-clause
|
isClosedTypeFamilyInfo _ = False
| 52
|
isClosedTypeFamilyInfo _ = False
| 52
|
isClosedTypeFamilyInfo _ = False
| 52
| false
| false
| 0
| 5
| 23
| 9
| 4
| 5
| null | null |
sdiehl/ghc
|
includes/CodeGen.Platform.hs
|
bsd-3-clause
|
globalRegMaybe (FloatReg 6) = Just (RealRegSingle REG_F6)
| 69
|
globalRegMaybe (FloatReg 6) = Just (RealRegSingle REG_F6)
| 69
|
globalRegMaybe (FloatReg 6) = Just (RealRegSingle REG_F6)
| 69
| false
| false
| 0
| 7
| 18
| 24
| 11
| 13
| null | null |
cullina/Extractor
|
src/LevOps.hs
|
bsd-3-clause
|
deletion [] (_:_) = Nothing
| 36
|
deletion [] (_:_) = Nothing
| 36
|
deletion [] (_:_) = Nothing
| 36
| false
| false
| 0
| 7
| 13
| 20
| 10
| 10
| null | null |
siphayne/CS381
|
scratch/Basics.hs
|
mit
|
tail (_:xs) = Basics.tail xs
| 28
|
tail (_:xs) = Basics.tail xs
| 28
|
tail (_:xs) = Basics.tail xs
| 28
| false
| false
| 0
| 6
| 4
| 22
| 10
| 12
| null | null |
tkonolige/inline-julia
|
src/Language/Julia/Inline/InternalDynamic.hs
|
bsd-3-clause
|
jlEvalString :: String -> IO JLVal
jlEvalString s = callJulia jl_eval_string [argString s]
| 90
|
jlEvalString :: String -> IO JLVal
jlEvalString s = callJulia jl_eval_string [argString s]
| 90
|
jlEvalString s = callJulia jl_eval_string [argString s]
| 55
| false
| true
| 0
| 7
| 12
| 32
| 15
| 17
| null | null |
sopvop/cabal
|
Cabal/Distribution/Simple/Program/Db.hs
|
bsd-3-clause
|
-- |User-specify this path. Basically override any path information
-- for this program in the configuration. If it's not a known
-- program ignore it.
--
userSpecifyPath :: String -- ^Program name
-> FilePath -- ^user-specified path to the program
-> ProgramDb -> ProgramDb
userSpecifyPath name path = updateUnconfiguredProgs $
flip Map.update name $ \(prog, _, args) -> Just (prog, Just path, args)
| 437
|
userSpecifyPath :: String -- ^Program name
-> FilePath -- ^user-specified path to the program
-> ProgramDb -> ProgramDb
userSpecifyPath name path = updateUnconfiguredProgs $
flip Map.update name $ \(prog, _, args) -> Just (prog, Just path, args)
| 281
|
userSpecifyPath name path = updateUnconfiguredProgs $
flip Map.update name $ \(prog, _, args) -> Just (prog, Just path, args)
| 127
| true
| true
| 0
| 9
| 99
| 78
| 44
| 34
| null | null |
nikai3d/ce-challenges
|
hard/min_path_sum.hs
|
bsd-3-clause
|
minpa :: [Int] -> [Int] -> [Int]
minpa _ [y] = [y]
| 83
|
minpa :: [Int] -> [Int] -> [Int]
minpa _ [y] = [y]
| 83
|
minpa _ [y] = [y]
| 31
| false
| true
| 0
| 9
| 44
| 45
| 23
| 22
| null | null |
jgonggrijp/net-prove
|
src/LG/Graph.hs
|
bsd-3-clause
|
arsup,arlup,arrup,arsdn,arldn,arrdn :: Tentacle -> Char
arsup (MainT _) = '↑'
| 78
|
arsup,arlup,arrup,arsdn,arldn,arrdn :: Tentacle -> Char
arsup (MainT _) = '↑'
| 78
|
arsup (MainT _) = '↑'
| 22
| false
| true
| 0
| 7
| 10
| 34
| 22
| 12
| null | null |
lukexi/halive
|
src/Halive/Recompiler.hs
|
bsd-2-clause
|
killRecompiler :: MonadIO m => Recompiler -> m ()
killRecompiler recompiler = do
liftIO $ killThread (recListenerThread recompiler)
| 135
|
killRecompiler :: MonadIO m => Recompiler -> m ()
killRecompiler recompiler = do
liftIO $ killThread (recListenerThread recompiler)
| 135
|
killRecompiler recompiler = do
liftIO $ killThread (recListenerThread recompiler)
| 85
| false
| true
| 0
| 10
| 21
| 46
| 21
| 25
| null | null |
dsorokin/aivika-experiment
|
Simulation/Aivika/Trans/Experiment/Types.hs
|
bsd-3-clause
|
runExperiment executor0 = runExperimentWithExecutor executor
where executor = sequence . map executor0
-- | Run the simulation experiment with the specified executor.
| 169
|
runExperiment executor0 = runExperimentWithExecutor executor
where executor = sequence . map executor0
-- | Run the simulation experiment with the specified executor.
| 169
|
runExperiment executor0 = runExperimentWithExecutor executor
where executor = sequence . map executor0
-- | Run the simulation experiment with the specified executor.
| 169
| false
| false
| 2
| 5
| 24
| 31
| 13
| 18
| null | null |
yiannist/ganeti
|
src/Ganeti/OpParams.hs
|
bsd-2-clause
|
pMigrationMode :: Field
pMigrationMode =
withDoc "Migration type (live/non-live)" .
renameField "MigrationMode" .
optionalField $
simpleField "mode" [t| MigrationMode |]
| 177
|
pMigrationMode :: Field
pMigrationMode =
withDoc "Migration type (live/non-live)" .
renameField "MigrationMode" .
optionalField $
simpleField "mode" [t| MigrationMode |]
| 177
|
pMigrationMode =
withDoc "Migration type (live/non-live)" .
renameField "MigrationMode" .
optionalField $
simpleField "mode" [t| MigrationMode |]
| 153
| false
| true
| 0
| 8
| 27
| 38
| 20
| 18
| null | null |
xnning/fcore
|
lib/Inliner.hs
|
bsd-2-clause
|
inliner (Seq es) = Seq (map inliner es)
| 39
|
inliner (Seq es) = Seq (map inliner es)
| 39
|
inliner (Seq es) = Seq (map inliner es)
| 39
| false
| false
| 0
| 7
| 7
| 26
| 12
| 14
| null | null |
dinkelk/redo
|
src/Database.hs
|
mit
|
getIfCreateDeps :: Key -> IO [Target]
getIfCreateDeps key = withDatabaseLock key func
where func = do ifCreateEntry <- getIfCreateEntry key
getIfCreateDeps' ifCreateEntry
where getIfCreateDeps' entry =
catch (do
targets <- readEntry entry
return $ map convert targets)
(\(_ :: SomeException) -> return [])
convert = Target . unescapeFilePath
-- Get the stored if change dependencies for a target:
| 569
|
getIfCreateDeps :: Key -> IO [Target]
getIfCreateDeps key = withDatabaseLock key func
where func = do ifCreateEntry <- getIfCreateEntry key
getIfCreateDeps' ifCreateEntry
where getIfCreateDeps' entry =
catch (do
targets <- readEntry entry
return $ map convert targets)
(\(_ :: SomeException) -> return [])
convert = Target . unescapeFilePath
-- Get the stored if change dependencies for a target:
| 569
|
getIfCreateDeps key = withDatabaseLock key func
where func = do ifCreateEntry <- getIfCreateEntry key
getIfCreateDeps' ifCreateEntry
where getIfCreateDeps' entry =
catch (do
targets <- readEntry entry
return $ map convert targets)
(\(_ :: SomeException) -> return [])
convert = Target . unescapeFilePath
-- Get the stored if change dependencies for a target:
| 531
| false
| true
| 0
| 12
| 230
| 123
| 59
| 64
| null | null |
Pnom/haskell-ast-pretty
|
Test/examples/Attributes.hs
|
mit
|
usedByNodes Root{} = True
| 33
|
usedByNodes Root{} = True
| 33
|
usedByNodes Root{} = True
| 33
| false
| false
| 0
| 6
| 11
| 13
| 6
| 7
| null | null |
sopvop/cabal
|
cabal-install/Distribution/Client/HttpUtils.hs
|
bsd-3-clause
|
genBoundary :: IO String
genBoundary = do
i <- randomRIO (0x10000000000000,0xFFFFFFFFFFFFFF) :: IO Integer
return $ showHex i ""
------------------------------------------------------------------------------
-- Compat utils
-- TODO: This is only here temporarily so we can release without also requiring
-- the latest Cabal lib. The function is also included in Cabal now.
| 382
|
genBoundary :: IO String
genBoundary = do
i <- randomRIO (0x10000000000000,0xFFFFFFFFFFFFFF) :: IO Integer
return $ showHex i ""
------------------------------------------------------------------------------
-- Compat utils
-- TODO: This is only here temporarily so we can release without also requiring
-- the latest Cabal lib. The function is also included in Cabal now.
| 382
|
genBoundary = do
i <- randomRIO (0x10000000000000,0xFFFFFFFFFFFFFF) :: IO Integer
return $ showHex i ""
------------------------------------------------------------------------------
-- Compat utils
-- TODO: This is only here temporarily so we can release without also requiring
-- the latest Cabal lib. The function is also included in Cabal now.
| 357
| false
| true
| 0
| 9
| 59
| 52
| 27
| 25
| null | null |
fmthoma/ghc
|
compiler/rename/RnTypes.hs
|
bsd-3-clause
|
rnHsTyKiForAll isType doc
ty@(HsForAllTy Explicit extra forall_tyvars lctxt@(L _ ctxt) tau)
= ASSERT( isType ) do { -- Explicit quantification.
-- Check that the forall'd tyvars are actually
-- mentioned in the type, and produce a warning if not
let (kvs, mentioned) = extractHsTysRdrTyVars (tau:ctxt)
in_type_doc = ptext (sLit "In the type") <+> quotes (ppr ty)
; warnUnusedForAlls (in_type_doc $$ docOfHsDocContext doc)
forall_tyvars mentioned
; traceRn (text "rnHsTyKiForAll:Exlicit" <+> vcat
[ppr forall_tyvars, ppr lctxt,ppr tau ])
; rnForAll doc Explicit extra kvs forall_tyvars lctxt tau }
| 718
|
rnHsTyKiForAll isType doc
ty@(HsForAllTy Explicit extra forall_tyvars lctxt@(L _ ctxt) tau)
= ASSERT( isType ) do { -- Explicit quantification.
-- Check that the forall'd tyvars are actually
-- mentioned in the type, and produce a warning if not
let (kvs, mentioned) = extractHsTysRdrTyVars (tau:ctxt)
in_type_doc = ptext (sLit "In the type") <+> quotes (ppr ty)
; warnUnusedForAlls (in_type_doc $$ docOfHsDocContext doc)
forall_tyvars mentioned
; traceRn (text "rnHsTyKiForAll:Exlicit" <+> vcat
[ppr forall_tyvars, ppr lctxt,ppr tau ])
; rnForAll doc Explicit extra kvs forall_tyvars lctxt tau }
| 718
|
rnHsTyKiForAll isType doc
ty@(HsForAllTy Explicit extra forall_tyvars lctxt@(L _ ctxt) tau)
= ASSERT( isType ) do { -- Explicit quantification.
-- Check that the forall'd tyvars are actually
-- mentioned in the type, and produce a warning if not
let (kvs, mentioned) = extractHsTysRdrTyVars (tau:ctxt)
in_type_doc = ptext (sLit "In the type") <+> quotes (ppr ty)
; warnUnusedForAlls (in_type_doc $$ docOfHsDocContext doc)
forall_tyvars mentioned
; traceRn (text "rnHsTyKiForAll:Exlicit" <+> vcat
[ppr forall_tyvars, ppr lctxt,ppr tau ])
; rnForAll doc Explicit extra kvs forall_tyvars lctxt tau }
| 718
| false
| false
| 0
| 14
| 207
| 185
| 93
| 92
| null | null |
remyoudompheng/hs-language-go
|
tests/Tests/Lexer.hs
|
gpl-3.0
|
testCharLit4 = testLex "rune literal with octal escaping"
"'\\377'"
[ GoTokChar (Just "'\\377'") '\xff'
, GoTokSemicolon]
| 127
|
testCharLit4 = testLex "rune literal with octal escaping"
"'\\377'"
[ GoTokChar (Just "'\\377'") '\xff'
, GoTokSemicolon]
| 127
|
testCharLit4 = testLex "rune literal with octal escaping"
"'\\377'"
[ GoTokChar (Just "'\\377'") '\xff'
, GoTokSemicolon]
| 127
| false
| false
| 1
| 8
| 21
| 35
| 15
| 20
| null | null |
ndmitchell/shake
|
src/Development/Shake/Internal/FilePattern.hs
|
bsd-3-clause
|
fromLit _ = Nothing
| 19
|
fromLit _ = Nothing
| 19
|
fromLit _ = Nothing
| 19
| false
| false
| 0
| 5
| 3
| 9
| 4
| 5
| null | null |
PipocaQuemada/ermine
|
src/Ermine/Constraint/Simplification.hs
|
bsd-2-clause
|
bySupers :: (AsConvention cc, Alternative m, MonadConstraint cc s m, Eq k, Eq t)
=> Type k t -> [Type k t] -> m (Scope b (Core cc) (Type k t))
bySupers c cs = asum (map (bySuper c) cs)
>>= mangle (\d ->
d `bySupers` delete d cs <|>
pure (pure d))
| 337
|
bySupers :: (AsConvention cc, Alternative m, MonadConstraint cc s m, Eq k, Eq t)
=> Type k t -> [Type k t] -> m (Scope b (Core cc) (Type k t))
bySupers c cs = asum (map (bySuper c) cs)
>>= mangle (\d ->
d `bySupers` delete d cs <|>
pure (pure d))
| 337
|
bySupers c cs = asum (map (bySuper c) cs)
>>= mangle (\d ->
d `bySupers` delete d cs <|>
pure (pure d))
| 185
| false
| true
| 0
| 12
| 143
| 157
| 78
| 79
| null | null |
samscott89/tamarin-prover
|
lib/theory/src/Theory/Model/Rule.hs
|
gpl-3.0
|
-- | Converts between these two types of rules.
ruleACIntrToRuleAC :: IntrRuleAC -> RuleAC
ruleACIntrToRuleAC (Rule ri ps cs as) = Rule (IntrInfo ri) ps cs as
| 158
|
ruleACIntrToRuleAC :: IntrRuleAC -> RuleAC
ruleACIntrToRuleAC (Rule ri ps cs as) = Rule (IntrInfo ri) ps cs as
| 110
|
ruleACIntrToRuleAC (Rule ri ps cs as) = Rule (IntrInfo ri) ps cs as
| 67
| true
| true
| 0
| 7
| 26
| 46
| 23
| 23
| null | null |
8084/SimpleTableGenerator
|
src/Text/SimpleTableGenerator.hs
|
gpl-3.0
|
get2DListSize :: [[a]] -> (Int, Int)
get2DListSize list2d = (maximum $ map length list2d, length list2d)
| 104
|
get2DListSize :: [[a]] -> (Int, Int)
get2DListSize list2d = (maximum $ map length list2d, length list2d)
| 104
|
get2DListSize list2d = (maximum $ map length list2d, length list2d)
| 67
| false
| true
| 0
| 8
| 15
| 54
| 27
| 27
| null | null |
Sventimir/bridge-tools
|
UI/Console/Prompt.hs
|
apache-2.0
|
examplePrompt = Prompt (const "Enter something: ") id
| 53
|
examplePrompt = Prompt (const "Enter something: ") id
| 53
|
examplePrompt = Prompt (const "Enter something: ") id
| 53
| false
| false
| 1
| 7
| 7
| 20
| 8
| 12
| null | null |
HJvT/com
|
System/Win32/Com.hs
|
bsd-3-clause
|
sizeofIID = sizeofGUID
| 22
|
sizeofIID = sizeofGUID
| 22
|
sizeofIID = sizeofGUID
| 22
| false
| false
| 0
| 4
| 2
| 6
| 3
| 3
| null | null |
tjunier/mlgsc
|
src/update.hs
|
mit
|
foldrAccumA :: IO ()
foldrAccumA = do
string <- hGetContents stdin
let map = L.foldr (SM.alter increment) (SM.empty) string
putStrLn $ show $ map SM.! 'a'
-- Same, but with a strict fold (has to be a left fold, as I understand). Left
-- and right folds have different signatures, hence the flip. In this case,
-- memory consuption never exceeds 100 kb, and speed is not perceptibly
-- different from the previous approach.
| 435
|
foldrAccumA :: IO ()
foldrAccumA = do
string <- hGetContents stdin
let map = L.foldr (SM.alter increment) (SM.empty) string
putStrLn $ show $ map SM.! 'a'
-- Same, but with a strict fold (has to be a left fold, as I understand). Left
-- and right folds have different signatures, hence the flip. In this case,
-- memory consuption never exceeds 100 kb, and speed is not perceptibly
-- different from the previous approach.
| 435
|
foldrAccumA = do
string <- hGetContents stdin
let map = L.foldr (SM.alter increment) (SM.empty) string
putStrLn $ show $ map SM.! 'a'
-- Same, but with a strict fold (has to be a left fold, as I understand). Left
-- and right folds have different signatures, hence the flip. In this case,
-- memory consuption never exceeds 100 kb, and speed is not perceptibly
-- different from the previous approach.
| 414
| false
| true
| 0
| 13
| 86
| 84
| 40
| 44
| null | null |
Happstack/happstack-server
|
src/Happstack/Server/Internal/Types.hs
|
bsd-3-clause
|
getHeader :: HasHeaders r => String -> r -> Maybe ByteString
getHeader = getHeaderBS . pack
| 91
|
getHeader :: HasHeaders r => String -> r -> Maybe ByteString
getHeader = getHeaderBS . pack
| 91
|
getHeader = getHeaderBS . pack
| 30
| false
| true
| 0
| 9
| 15
| 39
| 17
| 22
| null | null |
timtylin/scholdoc
|
src/Text/Pandoc/Readers/LaTeX.hs
|
gpl-2.0
|
hacek 'n' = "ň"
| 15
|
hacek 'n' = "ň"
| 15
|
hacek 'n' = "ň"
| 15
| false
| false
| 0
| 5
| 3
| 9
| 4
| 5
| null | null |
ghcjs/haddock-internal
|
vendor/attoparsec-0.10.4.0/Data/Attoparsec/ByteString/FastSet.hs
|
bsd-2-clause
|
-- | Check the set for membership.
memberWord8 :: Word8 -> FastSet -> Bool
memberWord8 w (Table t) =
let I byte bit = index (fromIntegral w)
in U.unsafeIndex t byte .&. bit /= 0
| 187
|
memberWord8 :: Word8 -> FastSet -> Bool
memberWord8 w (Table t) =
let I byte bit = index (fromIntegral w)
in U.unsafeIndex t byte .&. bit /= 0
| 152
|
memberWord8 w (Table t) =
let I byte bit = index (fromIntegral w)
in U.unsafeIndex t byte .&. bit /= 0
| 112
| true
| true
| 0
| 11
| 44
| 72
| 34
| 38
| null | null |
kyl27/htree
|
htree.hs
|
gpl-3.0
|
indent :: Int -> String
indent depth
| depth == 0 = " "
| otherwise = foldl dup "" [0..depth]
where dup acc ele = acc ++ " "
| 142
|
indent :: Int -> String
indent depth
| depth == 0 = " "
| otherwise = foldl dup "" [0..depth]
where dup acc ele = acc ++ " "
| 142
|
indent depth
| depth == 0 = " "
| otherwise = foldl dup "" [0..depth]
where dup acc ele = acc ++ " "
| 118
| false
| true
| 1
| 8
| 47
| 64
| 31
| 33
| null | null |
haasn/colour
|
Data/Colour/CIE/Illuminant.hs
|
mit
|
-- |Philips TL83, Ultralume 30
f12 :: (Fractional a) => Chromaticity a
f12 = mkChromaticity 0.43695 0.40441
| 107
|
f12 :: (Fractional a) => Chromaticity a
f12 = mkChromaticity 0.43695 0.40441
| 76
|
f12 = mkChromaticity 0.43695 0.40441
| 36
| true
| true
| 0
| 6
| 16
| 29
| 15
| 14
| null | null |
acowley/ghc
|
compiler/deSugar/DsArrows.hs
|
bsd-3-clause
|
replaceLeavesMatch
:: Type -- new result type
-> [Located (body' Id)] -- replacement leaf expressions of that type
-> LMatch Id (Located (body Id)) -- the matches of a case command
-> ([Located (body' Id)], -- remaining leaf expressions
LMatch Id (Located (body' Id))) -- updated match
replaceLeavesMatch _res_ty leaves (L loc (Match mf pat mt (GRHSs grhss binds)))
= let
(leaves', grhss') = mapAccumL replaceLeavesGRHS leaves grhss
in
(leaves', L loc (Match mf pat mt (GRHSs grhss' binds)))
| 626
|
replaceLeavesMatch
:: Type -- new result type
-> [Located (body' Id)] -- replacement leaf expressions of that type
-> LMatch Id (Located (body Id)) -- the matches of a case command
-> ([Located (body' Id)], -- remaining leaf expressions
LMatch Id (Located (body' Id)))
replaceLeavesMatch _res_ty leaves (L loc (Match mf pat mt (GRHSs grhss binds)))
= let
(leaves', grhss') = mapAccumL replaceLeavesGRHS leaves grhss
in
(leaves', L loc (Match mf pat mt (GRHSs grhss' binds)))
| 605
|
replaceLeavesMatch _res_ty leaves (L loc (Match mf pat mt (GRHSs grhss binds)))
= let
(leaves', grhss') = mapAccumL replaceLeavesGRHS leaves grhss
in
(leaves', L loc (Match mf pat mt (GRHSs grhss' binds)))
| 223
| true
| true
| 0
| 13
| 213
| 183
| 94
| 89
| null | null |
porglezomp/lambda-twitter
|
src/Data/AppState.hs
|
mit
|
scrollDown :: AppState -> AppState
scrollDown state = AppState { appTweets = right . appTweets $ state, appFrame = appFrame state }
| 131
|
scrollDown :: AppState -> AppState
scrollDown state = AppState { appTweets = right . appTweets $ state, appFrame = appFrame state }
| 131
|
scrollDown state = AppState { appTweets = right . appTweets $ state, appFrame = appFrame state }
| 96
| false
| true
| 0
| 9
| 21
| 49
| 24
| 25
| null | null |
k0001/haskell-opaleye
|
Opaleye/Internal/Tag.hs
|
bsd-3-clause
|
next :: Tag -> Tag
next = UnsafeTag . (+1) . unsafeUnTag
| 56
|
next :: Tag -> Tag
next = UnsafeTag . (+1) . unsafeUnTag
| 56
|
next = UnsafeTag . (+1) . unsafeUnTag
| 37
| false
| true
| 1
| 7
| 11
| 35
| 16
| 19
| null | null |
acowley/ghc
|
compiler/typecheck/TcSplice.hs
|
bsd-3-clause
|
-- tcUntypedBracket :: HsBracket Name -> [PendingRnSplice] -> TcRhoType -> TcM (HsExpr TcId)
tcUntypedBracket brack ps res_ty
= do { traceTc "tc_bracket untyped" (ppr brack $$ ppr ps)
; ps' <- mapM tcPendingSplice ps
; meta_ty <- tcBrackTy brack
; co <- unifyType meta_ty res_ty
; traceTc "tc_bracket done untyped" (ppr meta_ty)
; return (mkHsWrapCo co (HsTcBracketOut brack ps')) }
| 420
|
tcUntypedBracket brack ps res_ty
= do { traceTc "tc_bracket untyped" (ppr brack $$ ppr ps)
; ps' <- mapM tcPendingSplice ps
; meta_ty <- tcBrackTy brack
; co <- unifyType meta_ty res_ty
; traceTc "tc_bracket done untyped" (ppr meta_ty)
; return (mkHsWrapCo co (HsTcBracketOut brack ps')) }
| 327
|
tcUntypedBracket brack ps res_ty
= do { traceTc "tc_bracket untyped" (ppr brack $$ ppr ps)
; ps' <- mapM tcPendingSplice ps
; meta_ty <- tcBrackTy brack
; co <- unifyType meta_ty res_ty
; traceTc "tc_bracket done untyped" (ppr meta_ty)
; return (mkHsWrapCo co (HsTcBracketOut brack ps')) }
| 327
| true
| false
| 1
| 12
| 97
| 118
| 53
| 65
| null | null |
thinkmoore/influence-checker
|
src/Imp/Pretty.hs
|
mit
|
nlAfter :: Output () -> Output ()
nlAfter o = o >> printStr "\n"
| 64
|
nlAfter :: Output () -> Output ()
nlAfter o = o >> printStr "\n"
| 64
|
nlAfter o = o >> printStr "\n"
| 30
| false
| true
| 2
| 8
| 13
| 40
| 17
| 23
| null | null |
icidasset/shikensu
|
tests/Test/Contrib.hs
|
mit
|
testRenderContent :: TestTree
testRenderContent =
let
theResult = Just (Text.pack "<html># Example\n</html>")
dictionary = fmap (Contrib.renderContent renderer) (example_md >>= Contrib.IO.read)
definition = fmap List.head dictionary
in
testCase "Should `renderContent`"
$ assertDef definition (Shikensu.content .> fmap Text.decodeUtf8) theResult
| 394
|
testRenderContent :: TestTree
testRenderContent =
let
theResult = Just (Text.pack "<html># Example\n</html>")
dictionary = fmap (Contrib.renderContent renderer) (example_md >>= Contrib.IO.read)
definition = fmap List.head dictionary
in
testCase "Should `renderContent`"
$ assertDef definition (Shikensu.content .> fmap Text.decodeUtf8) theResult
| 394
|
testRenderContent =
let
theResult = Just (Text.pack "<html># Example\n</html>")
dictionary = fmap (Contrib.renderContent renderer) (example_md >>= Contrib.IO.read)
definition = fmap List.head dictionary
in
testCase "Should `renderContent`"
$ assertDef definition (Shikensu.content .> fmap Text.decodeUtf8) theResult
| 364
| false
| true
| 2
| 12
| 85
| 109
| 51
| 58
| null | null |
danr/hipspec
|
testsuite/prod/zeno_version/PropT12.hs
|
gpl-3.0
|
elem :: Nat -> [Nat] -> Bool
elem _ [] = False
| 46
|
elem :: Nat -> [Nat] -> Bool
elem _ [] = False
| 46
|
elem _ [] = False
| 17
| false
| true
| 0
| 9
| 11
| 35
| 16
| 19
| null | null |
fmapfmapfmap/amazonka
|
amazonka-sns/gen/Network/AWS/SNS/Publish.hs
|
mpl-2.0
|
-- | Unique identifier assigned to the published message.
--
-- Length Constraint: Maximum 100 characters
prsMessageId :: Lens' PublishResponse (Maybe Text)
prsMessageId = lens _prsMessageId (\ s a -> s{_prsMessageId = a})
| 222
|
prsMessageId :: Lens' PublishResponse (Maybe Text)
prsMessageId = lens _prsMessageId (\ s a -> s{_prsMessageId = a})
| 116
|
prsMessageId = lens _prsMessageId (\ s a -> s{_prsMessageId = a})
| 65
| true
| true
| 0
| 9
| 32
| 48
| 27
| 21
| null | null |
roberth/uu-helium
|
src/Helium/Main/Version.hs
|
gpl-3.0
|
version :: String
version = "1.8.4 (Feb 2016)"
| 46
|
version :: String
version = "1.8.4 (Feb 2016)"
| 46
|
version = "1.8.4 (Feb 2016)"
| 28
| false
| true
| 0
| 6
| 7
| 18
| 7
| 11
| null | null |
iu-parfunc/containers
|
Data/Sequence.hs
|
bsd-3-clause
|
addDigits3 m1 (Four a b c d) e f g (Four h i j k) m2 =
appendTree4 m1 (node3 a b c) (node3 d e f) (node3 g h i) (node2 j k) m2
| 130
|
addDigits3 m1 (Four a b c d) e f g (Four h i j k) m2 =
appendTree4 m1 (node3 a b c) (node3 d e f) (node3 g h i) (node2 j k) m2
| 130
|
addDigits3 m1 (Four a b c d) e f g (Four h i j k) m2 =
appendTree4 m1 (node3 a b c) (node3 d e f) (node3 g h i) (node2 j k) m2
| 130
| false
| false
| 0
| 7
| 38
| 96
| 47
| 49
| null | null |
Soostone/cassy
|
src/Database/Cassandra/JSON.hs
|
bsd-3-clause
|
ksToBasicKS (KeyRange ty fr to i) = CB.KeyRange ty (toColKey fr) (toColKey to) i
| 80
|
ksToBasicKS (KeyRange ty fr to i) = CB.KeyRange ty (toColKey fr) (toColKey to) i
| 80
|
ksToBasicKS (KeyRange ty fr to i) = CB.KeyRange ty (toColKey fr) (toColKey to) i
| 80
| false
| false
| 0
| 7
| 13
| 44
| 21
| 23
| null | null |
bgold-cosmos/Tidal
|
src/Sound/Tidal/Params.hs
|
gpl-3.0
|
button2bus :: Pattern Int -> Pattern Double -> ControlPattern
button2bus busid pat = (pF "button2" pat) # (pI "^button2" busid)
| 127
|
button2bus :: Pattern Int -> Pattern Double -> ControlPattern
button2bus busid pat = (pF "button2" pat) # (pI "^button2" busid)
| 127
|
button2bus busid pat = (pF "button2" pat) # (pI "^button2" busid)
| 65
| false
| true
| 2
| 8
| 19
| 57
| 25
| 32
| null | null |
siddhanathan/ghc
|
compiler/hsSyn/HsTypes.hs
|
bsd-3-clause
|
isHsKindedTyVar (KindedTyVar {}) = True
| 39
|
isHsKindedTyVar (KindedTyVar {}) = True
| 39
|
isHsKindedTyVar (KindedTyVar {}) = True
| 39
| false
| false
| 0
| 7
| 4
| 16
| 8
| 8
| null | null |
keqh/Monadius_rewrite
|
Monadius/Util.hs
|
gpl-2.0
|
regulate x = x
| 14
|
regulate x = x
| 14
|
regulate x = x
| 14
| false
| false
| 0
| 5
| 3
| 9
| 4
| 5
| null | null |
k-bx/riak-haskell-client
|
src/Network/Riak/CRDT/Response.hs
|
apache-2.0
|
typeToTag M.SET = MapSetTag
| 32
|
typeToTag M.SET = MapSetTag
| 32
|
typeToTag M.SET = MapSetTag
| 32
| false
| false
| 0
| 6
| 8
| 11
| 5
| 6
| null | null |
anttisalonen/freekick
|
haskell/libfreekick/Freekick/Libmatch/MatchStatus.hs
|
agpl-3.0
|
-- | Returns all the team mates of a player, not including the player himself.
getTeammatesFromMatchStatus :: MatchStatus -> PlayerInfo -> [PlayerInfo]
getTeammatesFromMatchStatus m p = filter (\x -> idnum (staticplayer x) /= idnum (staticplayer p)) cl
where cl = if Data.Map.member (idnum (staticplayer p)) (homeplayers m) then Data.Map.elems (homeplayers m) else Data.Map.elems (awayplayers m)
| 399
|
getTeammatesFromMatchStatus :: MatchStatus -> PlayerInfo -> [PlayerInfo]
getTeammatesFromMatchStatus m p = filter (\x -> idnum (staticplayer x) /= idnum (staticplayer p)) cl
where cl = if Data.Map.member (idnum (staticplayer p)) (homeplayers m) then Data.Map.elems (homeplayers m) else Data.Map.elems (awayplayers m)
| 320
|
getTeammatesFromMatchStatus m p = filter (\x -> idnum (staticplayer x) /= idnum (staticplayer p)) cl
where cl = if Data.Map.member (idnum (staticplayer p)) (homeplayers m) then Data.Map.elems (homeplayers m) else Data.Map.elems (awayplayers m)
| 247
| true
| true
| 1
| 11
| 58
| 136
| 67
| 69
| null | null |
haskell-lisp/historic-lisk
|
src/Language/Lisk/Parser.hs
|
bsd-3-clause
|
spaces1 = do
space
spaces
| 27
|
spaces1 = do
space
spaces
| 27
|
spaces1 = do
space
spaces
| 27
| false
| false
| 0
| 6
| 6
| 12
| 5
| 7
| null | null |
colinba/tip-toi-reveng
|
src/GMEWriter.hs
|
mit
|
putScriptTable :: [(Word16, Maybe [Line ResReg])] -> SPut
putScriptTable [] = error "Cannot create file with an empty script table"
| 131
|
putScriptTable :: [(Word16, Maybe [Line ResReg])] -> SPut
putScriptTable [] = error "Cannot create file with an empty script table"
| 131
|
putScriptTable [] = error "Cannot create file with an empty script table"
| 73
| false
| true
| 0
| 10
| 19
| 41
| 21
| 20
| null | null |
basvandijk/regions
|
Control/Monad/Trans/Region/Internal.hs
|
bsd-3-clause
|
unsafeControl :: (RegionBaseControl b m)
=> (RunRegionInBase m b -> b (RegionStM m a)) -> m a
unsafeControl f = unsafeLiftBaseWith f >>= unsafeRestoreM
| 165
|
unsafeControl :: (RegionBaseControl b m)
=> (RunRegionInBase m b -> b (RegionStM m a)) -> m a
unsafeControl f = unsafeLiftBaseWith f >>= unsafeRestoreM
| 165
|
unsafeControl f = unsafeLiftBaseWith f >>= unsafeRestoreM
| 57
| false
| true
| 0
| 12
| 37
| 67
| 31
| 36
| null | null |
urbanslug/ghc
|
compiler/basicTypes/BasicTypes.hs
|
bsd-3-clause
|
bumpVersion :: Version -> Version
bumpVersion v = v+1
| 53
|
bumpVersion :: Version -> Version
bumpVersion v = v+1
| 53
|
bumpVersion v = v+1
| 19
| false
| true
| 0
| 5
| 8
| 22
| 11
| 11
| null | null |
diku-dk/futhark
|
src/Futhark/Optimise/CSE.hs
|
isc
|
cseInStms ::
(ASTRep rep, Aliased rep, CSEInOp (Op rep)) =>
Names ->
[Stm rep] ->
CSEM rep a ->
CSEM rep (Stms rep, a)
cseInStms _ [] m = do
a <- m
return (mempty, a)
| 180
|
cseInStms ::
(ASTRep rep, Aliased rep, CSEInOp (Op rep)) =>
Names ->
[Stm rep] ->
CSEM rep a ->
CSEM rep (Stms rep, a)
cseInStms _ [] m = do
a <- m
return (mempty, a)
| 180
|
cseInStms _ [] m = do
a <- m
return (mempty, a)
| 51
| false
| true
| 0
| 11
| 49
| 103
| 51
| 52
| null | null |
bergmark/clay
|
src/Clay/Display.hs
|
bsd-3-clause
|
visiblePainted, visibleFill, visibleStroke, painted,
fillEvents, strokeEvents, allEvents :: PointerEvents
visiblePainted = PointerEvents "visiblePainted"
| 156
|
visiblePainted, visibleFill, visibleStroke, painted,
fillEvents, strokeEvents, allEvents :: PointerEvents
visiblePainted = PointerEvents "visiblePainted"
| 155
|
visiblePainted = PointerEvents "visiblePainted"
| 47
| false
| true
| 0
| 5
| 15
| 26
| 19
| 7
| null | null |
swift-nav/wolf
|
src/Network/AWS/Wolf/Act.hs
|
mit
|
-- | S3 copy call.
--
cp :: MonadIO m => [FilePath] -> m ()
cp = liftIO . callProcess "aws" . (["s3", "sync", "--quiet", "--acl", "bucket-owner-full-control"] <>)
| 162
|
cp :: MonadIO m => [FilePath] -> m ()
cp = liftIO . callProcess "aws" . (["s3", "sync", "--quiet", "--acl", "bucket-owner-full-control"] <>)
| 140
|
cp = liftIO . callProcess "aws" . (["s3", "sync", "--quiet", "--acl", "bucket-owner-full-control"] <>)
| 102
| true
| true
| 0
| 9
| 27
| 68
| 36
| 32
| null | null |
chrisbanks/cpiwb
|
CPi/Parser.hs
|
gpl-3.0
|
-- Process expression
pProcess :: Parser Process
pProcess = do pcs <- sepBy pProcessComponent (rOp "||");
rOp ":";
aff <- pAffNet;
return (Process pcs aff)
| 197
|
pProcess :: Parser Process
pProcess = do pcs <- sepBy pProcessComponent (rOp "||");
rOp ":";
aff <- pAffNet;
return (Process pcs aff)
| 175
|
pProcess = do pcs <- sepBy pProcessComponent (rOp "||");
rOp ":";
aff <- pAffNet;
return (Process pcs aff)
| 148
| true
| true
| 0
| 11
| 66
| 69
| 31
| 38
| null | null |
UCSD-PL/RefScript
|
src/Language/Rsc/Symbols.hs
|
bsd-3-clause
|
mkArgumentsSI :: (F.Reftable r, IsLocated l) => l -> [RType r] -> SymInfo r
--------------------------------------------------------------------------------
mkArgumentsSI l ts = SI getArgSym Local RdOnly ty
where
ty = TFun [] (immObjectLitTy [pLen] [tLen]) fTop
pLen = PropId l (lenId l)
tLen = tNum `strengthen` rLen
rLen = F.ofReft (F.uexprReft k)
k = fromMaybe (length ts) (findIndex isTUndef ts)
--------------------------------------------------------------------------------
| 558
|
mkArgumentsSI :: (F.Reftable r, IsLocated l) => l -> [RType r] -> SymInfo r
mkArgumentsSI l ts = SI getArgSym Local RdOnly ty
where
ty = TFun [] (immObjectLitTy [pLen] [tLen]) fTop
pLen = PropId l (lenId l)
tLen = tNum `strengthen` rLen
rLen = F.ofReft (F.uexprReft k)
k = fromMaybe (length ts) (findIndex isTUndef ts)
--------------------------------------------------------------------------------
| 477
|
mkArgumentsSI l ts = SI getArgSym Local RdOnly ty
where
ty = TFun [] (immObjectLitTy [pLen] [tLen]) fTop
pLen = PropId l (lenId l)
tLen = tNum `strengthen` rLen
rLen = F.ofReft (F.uexprReft k)
k = fromMaybe (length ts) (findIndex isTUndef ts)
--------------------------------------------------------------------------------
| 401
| true
| true
| 4
| 9
| 135
| 163
| 83
| 80
| null | null |
zeekay/lambdabot
|
testsuite/TestFramework.hs
|
mit
|
-- lb
assertLambdabot_ :: Location -> String -> String -> HU.Assertion
assertLambdabot_ loc src expected = do
actual <- echo src
if expected /= actual
then HU.assertFailure (msg actual)
else return ()
where msg a = "assertEqual failed at " ++ showLoc loc ++
"\n expected: " ++ show expected ++ "\n but got: " ++ show a
| 363
|
assertLambdabot_ :: Location -> String -> String -> HU.Assertion
assertLambdabot_ loc src expected = do
actual <- echo src
if expected /= actual
then HU.assertFailure (msg actual)
else return ()
where msg a = "assertEqual failed at " ++ showLoc loc ++
"\n expected: " ++ show expected ++ "\n but got: " ++ show a
| 357
|
assertLambdabot_ loc src expected = do
actual <- echo src
if expected /= actual
then HU.assertFailure (msg actual)
else return ()
where msg a = "assertEqual failed at " ++ showLoc loc ++
"\n expected: " ++ show expected ++ "\n but got: " ++ show a
| 292
| true
| true
| 0
| 12
| 102
| 113
| 54
| 59
| null | null |
fabianbergmark/ECMA-262
|
src/Language/JavaScript/Prim.hs
|
bsd-2-clause
|
unsetNLFlag :: JSParser ()
unsetNLFlag = modifyState $ \s -> s { jspStateNLFlag = False }
| 89
|
unsetNLFlag :: JSParser ()
unsetNLFlag = modifyState $ \s -> s { jspStateNLFlag = False }
| 89
|
unsetNLFlag = modifyState $ \s -> s { jspStateNLFlag = False }
| 62
| false
| true
| 0
| 8
| 15
| 33
| 18
| 15
| null | null |
andersk/haskell-cgi
|
examples/upload.hs
|
bsd-3-clause
|
dir = "../upload"
| 17
|
dir = "../upload"
| 17
|
dir = "../upload"
| 17
| false
| false
| 0
| 4
| 2
| 6
| 3
| 3
| null | null |
danchoi/geochat
|
src/EventProcessor.hs
|
mit
|
refreshClient :: Connection -> Client -> IO Client
refreshClient conn client = do
let q = "select nickname, lat, lng, room_id from clients where client_id = ?"
xs@((nickname, mlat, mlng, mrid):_) :: [(Text, Maybe Double, Maybe Double, Maybe Int)] <- query conn q (Only $ clientId client)
let latLng = case (mlat,mlng) of
(Just lat, Just lng) -> Just (lat, lng)
otherwise -> Nothing
return (client {nickName = nickname, clientRoomId = mrid})
--- this is too much implementation detail
| 540
|
refreshClient :: Connection -> Client -> IO Client
refreshClient conn client = do
let q = "select nickname, lat, lng, room_id from clients where client_id = ?"
xs@((nickname, mlat, mlng, mrid):_) :: [(Text, Maybe Double, Maybe Double, Maybe Int)] <- query conn q (Only $ clientId client)
let latLng = case (mlat,mlng) of
(Just lat, Just lng) -> Just (lat, lng)
otherwise -> Nothing
return (client {nickName = nickname, clientRoomId = mrid})
--- this is too much implementation detail
| 540
|
refreshClient conn client = do
let q = "select nickname, lat, lng, room_id from clients where client_id = ?"
xs@((nickname, mlat, mlng, mrid):_) :: [(Text, Maybe Double, Maybe Double, Maybe Int)] <- query conn q (Only $ clientId client)
let latLng = case (mlat,mlng) of
(Just lat, Just lng) -> Just (lat, lng)
otherwise -> Nothing
return (client {nickName = nickname, clientRoomId = mrid})
--- this is too much implementation detail
| 489
| false
| true
| 0
| 14
| 135
| 186
| 98
| 88
| null | null |
adamse/haddock
|
haddock-api/src/Haddock/GhcUtils.hs
|
bsd-2-clause
|
pretty :: Outputable a => DynFlags -> a -> String
pretty = showPpr
| 66
|
pretty :: Outputable a => DynFlags -> a -> String
pretty = showPpr
| 66
|
pretty = showPpr
| 16
| false
| true
| 0
| 7
| 12
| 26
| 13
| 13
| null | null |
zaxtax/hakaru
|
haskell/Tests/Parser.hs
|
bsd-3-clause
|
testAnn :: Test
testAnn = test
[ testParse ann1 ann1AST
, testParse ann2 ann2AST
, testParse ann3 ann3AST
]
| 123
|
testAnn :: Test
testAnn = test
[ testParse ann1 ann1AST
, testParse ann2 ann2AST
, testParse ann3 ann3AST
]
| 123
|
testAnn = test
[ testParse ann1 ann1AST
, testParse ann2 ann2AST
, testParse ann3 ann3AST
]
| 107
| false
| true
| 0
| 7
| 34
| 38
| 19
| 19
| null | null |
alexbaluta/courseography
|
app/Css/Constants.hs
|
gpl-3.0
|
blue6 :: Color
blue6 = rgb 184 231 249
| 38
|
blue6 :: Color
blue6 = rgb 184 231 249
| 38
|
blue6 = rgb 184 231 249
| 23
| false
| true
| 0
| 6
| 8
| 24
| 10
| 14
| null | null |
GaloisInc/smaccmpilot-gcs-gateway
|
SMACCMPilot/GCS/Gateway/Monad.hs
|
bsd-3-clause
|
lift :: IO a -> GW a
lift = GW . M.lift
| 39
|
lift :: IO a -> GW a
lift = GW . M.lift
| 39
|
lift = GW . M.lift
| 18
| false
| true
| 0
| 6
| 11
| 27
| 13
| 14
| null | null |
bjorg/HPlug
|
uriparser.hs
|
mit
|
parseUserInfo :: Parser (Maybe Username, Maybe Password)
parseUserInfo = do
username <- A.takeWhile isUserInfoChar
_ <- char ':'
password <- A.takeWhile isUserInfoChar
_ <- char '@'
return (Just username, Just password)
<|> do
username <- A.takeWhile isUserInfoChar
_ <- char '@'
return (Just username, Nothing)
<|>
return (Nothing, Nothing)
| 421
|
parseUserInfo :: Parser (Maybe Username, Maybe Password)
parseUserInfo = do
username <- A.takeWhile isUserInfoChar
_ <- char ':'
password <- A.takeWhile isUserInfoChar
_ <- char '@'
return (Just username, Just password)
<|> do
username <- A.takeWhile isUserInfoChar
_ <- char '@'
return (Just username, Nothing)
<|>
return (Nothing, Nothing)
| 421
|
parseUserInfo = do
username <- A.takeWhile isUserInfoChar
_ <- char ':'
password <- A.takeWhile isUserInfoChar
_ <- char '@'
return (Just username, Just password)
<|> do
username <- A.takeWhile isUserInfoChar
_ <- char '@'
return (Just username, Nothing)
<|>
return (Nothing, Nothing)
| 364
| false
| true
| 6
| 9
| 128
| 148
| 68
| 80
| null | null |
gsnewmark/cis194
|
src/Cis194/Week2/Lecture.hs
|
apache-2.0
|
safeDiv x y = OK (x / y)
| 24
|
safeDiv x y = OK (x / y)
| 24
|
safeDiv x y = OK (x / y)
| 24
| false
| false
| 0
| 7
| 7
| 21
| 10
| 11
| null | null |
eiel/haskell-webframework-sample
|
src/YesodSample.hs
|
bsd-3-clause
|
postAdd2R = do
addSampleHeader
Success (Request x y) <- parseJsonBody
selectRep . provideJson $ add x y
| 109
|
postAdd2R = do
addSampleHeader
Success (Request x y) <- parseJsonBody
selectRep . provideJson $ add x y
| 109
|
postAdd2R = do
addSampleHeader
Success (Request x y) <- parseJsonBody
selectRep . provideJson $ add x y
| 109
| false
| false
| 1
| 11
| 22
| 47
| 19
| 28
| null | null |
keithodulaigh/Hets
|
HasCASL/ClassAna.hs
|
gpl-2.0
|
-- * diagnostic messages
-- | create message for different kinds
diffKindString :: String -> RawKind -> RawKind -> String
diffKindString a k1 k2 = "incompatible kind of: " ++ a ++
expected (rawToKind k1) (rawToKind k2)
| 223
|
diffKindString :: String -> RawKind -> RawKind -> String
diffKindString a k1 k2 = "incompatible kind of: " ++ a ++
expected (rawToKind k1) (rawToKind k2)
| 157
|
diffKindString a k1 k2 = "incompatible kind of: " ++ a ++
expected (rawToKind k1) (rawToKind k2)
| 100
| true
| true
| 0
| 8
| 41
| 57
| 29
| 28
| null | null |
ekmett/text
|
Data/Text/Lazy/Builder/Int.hs
|
bsd-2-clause
|
integer 16 (S# i#) = hexadecimal (I# i#)
| 40
|
integer 16 (S# i#) = hexadecimal (I# i#)
| 40
|
integer 16 (S# i#) = hexadecimal (I# i#)
| 40
| false
| false
| 1
| 7
| 7
| 28
| 12
| 16
| null | null |
forked-upstream-packages-for-ghcjs/ghc
|
compiler/simplCore/SimplEnv.hs
|
bsd-3-clause
|
getCvSubst :: SimplEnv -> CvSubst
getCvSubst (SimplEnv { seInScope = in_scope, seTvSubst = tv_env, seCvSubst = cv_env })
= CvSubst in_scope tv_env cv_env
| 155
|
getCvSubst :: SimplEnv -> CvSubst
getCvSubst (SimplEnv { seInScope = in_scope, seTvSubst = tv_env, seCvSubst = cv_env })
= CvSubst in_scope tv_env cv_env
| 155
|
getCvSubst (SimplEnv { seInScope = in_scope, seTvSubst = tv_env, seCvSubst = cv_env })
= CvSubst in_scope tv_env cv_env
| 121
| false
| true
| 0
| 9
| 24
| 49
| 27
| 22
| null | null |
enolan/Idris-dev
|
src/Idris/AbsSyntaxTree.hs
|
bsd-3-clause
|
mapPTermFC f g (PDisamb msg t) = PDisamb msg (mapPTermFC f g t)
| 78
|
mapPTermFC f g (PDisamb msg t) = PDisamb msg (mapPTermFC f g t)
| 78
|
mapPTermFC f g (PDisamb msg t) = PDisamb msg (mapPTermFC f g t)
| 78
| false
| false
| 0
| 7
| 27
| 39
| 17
| 22
| null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.