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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
NickAger/LearningHaskell
|
well-typed at skills matter/fast-track/exercises/2/Poly.hs
|
mit
|
aTree :: Tree Int
aTree = Node (Node (Leaf 1) (Leaf 2)) (Node (Leaf 3) (Leaf 4))
| 80
|
aTree :: Tree Int
aTree = Node (Node (Leaf 1) (Leaf 2)) (Node (Leaf 3) (Leaf 4))
| 80
|
aTree = Node (Node (Leaf 1) (Leaf 2)) (Node (Leaf 3) (Leaf 4))
| 62
| false
| true
| 0
| 9
| 16
| 59
| 29
| 30
| null | null |
CarmineM74/haskell_craft3e
|
ExChap7.hs
|
mit
|
-- 7.4
firstDigit :: String -> Char
firstDigit [] = '\0'
| 70
|
firstDigit :: String -> Char
firstDigit [] = '\0'
| 62
|
firstDigit [] = '\0'
| 20
| true
| true
| 0
| 6
| 24
| 21
| 11
| 10
| null | null |
romanb/amazonka
|
amazonka-storagegateway/gen/Network/AWS/StorageGateway/ListLocalDisks.hs
|
mpl-2.0
|
-- | 'ListLocalDisksResponse' constructor.
--
-- The fields accessible through corresponding lenses are:
--
-- * 'lldrDisks' @::@ ['Disk']
--
-- * 'lldrGatewayARN' @::@ 'Maybe' 'Text'
--
listLocalDisksResponse :: ListLocalDisksResponse
listLocalDisksResponse = ListLocalDisksResponse
{ _lldrGatewayARN = Nothing
, _lldrDisks = mempty
}
| 352
|
listLocalDisksResponse :: ListLocalDisksResponse
listLocalDisksResponse = ListLocalDisksResponse
{ _lldrGatewayARN = Nothing
, _lldrDisks = mempty
}
| 165
|
listLocalDisksResponse = ListLocalDisksResponse
{ _lldrGatewayARN = Nothing
, _lldrDisks = mempty
}
| 116
| true
| true
| 0
| 7
| 58
| 43
| 25
| 18
| null | null |
ddssff/rdf4h
|
testsuite/tests/W3C/RdfXmlTest.hs
|
bsd-3-clause
|
isParsed (Right _) = True
| 25
|
isParsed (Right _) = True
| 25
|
isParsed (Right _) = True
| 25
| false
| false
| 0
| 6
| 4
| 16
| 7
| 9
| null | null |
robeverest/accelerate
|
Data/Array/Accelerate/Pretty/Print.hs
|
bsd-3-clause
|
prettyPrim PrimChr = (False, text "chr")
| 55
|
prettyPrim PrimChr = (False, text "chr")
| 55
|
prettyPrim PrimChr = (False, text "chr")
| 55
| false
| false
| 0
| 6
| 20
| 18
| 9
| 9
| null | null |
BartAdv/Idris-dev
|
src/Idris/Primitives.hs
|
bsd-3-clause
|
concatWord32 :: (Word32, Word32) -> Word64
concatWord32 (high, low) = fromIntegral high .|. (fromIntegral low `shiftL` 32)
| 122
|
concatWord32 :: (Word32, Word32) -> Word64
concatWord32 (high, low) = fromIntegral high .|. (fromIntegral low `shiftL` 32)
| 122
|
concatWord32 (high, low) = fromIntegral high .|. (fromIntegral low `shiftL` 32)
| 79
| false
| true
| 0
| 9
| 16
| 55
| 28
| 27
| null | null |
mightymoose/liquidhaskell
|
benchmarks/llrbtree-0.1.1/Data/Set/RBTree-appel.hs
|
bsd-3-clause
|
-@ lbal :: ARBT a -> a -> RBT a -> RBT a @-}
lbal (Node R (Node R a x b) y c) k r = Node R (Node B a x b) y (Node B c k r)
| 153
|
lbal (Node R (Node R a x b) y c) k r = Node R (Node B a x b) y (Node B c k r)
| 78
|
lbal (Node R (Node R a x b) y c) k r = Node R (Node B a x b) y (Node B c k r)
| 78
| true
| false
| 3
| 10
| 70
| 90
| 47
| 43
| null | null |
Ertruby/PPFinalProject
|
src/Parse.hs
|
gpl-2.0
|
-- main function to call here. input should be a complete program that you want parsed. it will return an AST that the type checker can use.
parse0 :: String -> AST
parse0 str = toAST $ parse grammar Program (tok str)
| 217
|
parse0 :: String -> AST
parse0 str = toAST $ parse grammar Program (tok str)
| 76
|
parse0 str = toAST $ parse grammar Program (tok str)
| 52
| true
| true
| 0
| 8
| 41
| 36
| 18
| 18
| null | null |
input-output-hk/pos-haskell-prototype
|
explorer/src/Pos/Explorer/Web/ClientTypes.hs
|
mit
|
tiTimestamp :: TxInternal -> Maybe Timestamp
tiTimestamp = teReceivedTime . tiExtra
| 83
|
tiTimestamp :: TxInternal -> Maybe Timestamp
tiTimestamp = teReceivedTime . tiExtra
| 83
|
tiTimestamp = teReceivedTime . tiExtra
| 38
| false
| true
| 0
| 6
| 10
| 22
| 11
| 11
| null | null |
akc/gfscript
|
HOPS/GF.hs
|
bsd-3-clause
|
expr :: Parser Expr
expr = chainl1 (uncurry ELet <$> assignment <|> Singleton <$> expr0) (const ESeq <$> string ";")
<* (string ";" <|> pure "")
| 151
|
expr :: Parser Expr
expr = chainl1 (uncurry ELet <$> assignment <|> Singleton <$> expr0) (const ESeq <$> string ";")
<* (string ";" <|> pure "")
| 151
|
expr = chainl1 (uncurry ELet <$> assignment <|> Singleton <$> expr0) (const ESeq <$> string ";")
<* (string ";" <|> pure "")
| 131
| false
| true
| 1
| 11
| 32
| 71
| 32
| 39
| null | null |
alfpark/bond
|
compiler/src/Language/Bond/Syntax/Util.hs
|
mit
|
isStruct _ = False
| 18
|
isStruct _ = False
| 18
|
isStruct _ = False
| 18
| false
| false
| 0
| 5
| 3
| 9
| 4
| 5
| null | null |
meiersi/psqueues-old
|
src/Data/IntPSQ/Internal.hs
|
bsd-3-clause
|
-- TODO (jaspervdj): More efficient implementations possible
------------------------------------------------------------------------------
-- Views
------------------------------------------------------------------------------
-- | Like insert, but returns the replaced element if any.
insertView :: Ord p => Key -> p -> v -> IntPSQ p v -> (Maybe (p, v), IntPSQ p v)
insertView k p x t0 = case deleteView k t0 of
Nothing -> (Nothing, unsafeInsertNew k p x t0)
Just (p', v', t) -> (Just (p', v'), unsafeInsertNew k p x t)
-- TODO (SM): verify that it is really worth do do deletion and lookup at the
-- same time.
| 637
|
insertView :: Ord p => Key -> p -> v -> IntPSQ p v -> (Maybe (p, v), IntPSQ p v)
insertView k p x t0 = case deleteView k t0 of
Nothing -> (Nothing, unsafeInsertNew k p x t0)
Just (p', v', t) -> (Just (p', v'), unsafeInsertNew k p x t)
-- TODO (SM): verify that it is really worth do do deletion and lookup at the
-- same time.
| 347
|
insertView k p x t0 = case deleteView k t0 of
Nothing -> (Nothing, unsafeInsertNew k p x t0)
Just (p', v', t) -> (Just (p', v'), unsafeInsertNew k p x t)
-- TODO (SM): verify that it is really worth do do deletion and lookup at the
-- same time.
| 266
| true
| true
| 0
| 14
| 117
| 152
| 80
| 72
| null | null |
brendanhay/gogol
|
gogol-chat/gen/Network/Google/Resource/Chat/Dms/Webhooks.hs
|
mpl-2.0
|
-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
dwUploadProtocol :: Lens' DmsWebhooks (Maybe Text)
dwUploadProtocol
= lens _dwUploadProtocol
(\ s a -> s{_dwUploadProtocol = a})
| 198
|
dwUploadProtocol :: Lens' DmsWebhooks (Maybe Text)
dwUploadProtocol
= lens _dwUploadProtocol
(\ s a -> s{_dwUploadProtocol = a})
| 136
|
dwUploadProtocol
= lens _dwUploadProtocol
(\ s a -> s{_dwUploadProtocol = a})
| 85
| true
| true
| 0
| 9
| 33
| 48
| 25
| 23
| null | null |
siddhanathan/ghc
|
compiler/coreSyn/CoreFVs.hs
|
bsd-3-clause
|
ruleLhsFreeIds :: CoreRule -> VarSet
-- ^ This finds all locally-defined free Ids on the left hand side of a rule
ruleLhsFreeIds (BuiltinRule {}) = noFVs
| 153
|
ruleLhsFreeIds :: CoreRule -> VarSet
ruleLhsFreeIds (BuiltinRule {}) = noFVs
| 76
|
ruleLhsFreeIds (BuiltinRule {}) = noFVs
| 39
| true
| true
| 1
| 8
| 25
| 31
| 15
| 16
| null | null |
sapek/optparse-applicative
|
tests/Tests.hs
|
bsd-3-clause
|
prop_stringChunk_2 :: String -> Bool
prop_stringChunk_2 s = isEmpty (stringChunk s) == null s
| 93
|
prop_stringChunk_2 :: String -> Bool
prop_stringChunk_2 s = isEmpty (stringChunk s) == null s
| 93
|
prop_stringChunk_2 s = isEmpty (stringChunk s) == null s
| 56
| false
| true
| 0
| 8
| 13
| 34
| 16
| 18
| null | null |
raventid/coursera_learning
|
haskell/will_kurt/q8.2_fast_fib.hs
|
mit
|
fastFib n1 n2 counter = fastFib (n2) (n1 + n2) (counter - 1)
| 60
|
fastFib n1 n2 counter = fastFib (n2) (n1 + n2) (counter - 1)
| 60
|
fastFib n1 n2 counter = fastFib (n2) (n1 + n2) (counter - 1)
| 60
| false
| false
| 0
| 7
| 12
| 37
| 19
| 18
| null | null |
FranklinChen/musicxml2
|
src/Data/Music/MusicXml/Simple.hs
|
bsd-3-clause
|
-- |
-- Set the tick division to the default value.
--
defaultDivisions :: Music
defaultDivisions = Music $ single $ MusicAttributes $ Divisions $ defaultDivisionsVal `div` 4
| 174
|
defaultDivisions :: Music
defaultDivisions = Music $ single $ MusicAttributes $ Divisions $ defaultDivisionsVal `div` 4
| 119
|
defaultDivisions = Music $ single $ MusicAttributes $ Divisions $ defaultDivisionsVal `div` 4
| 93
| true
| true
| 0
| 9
| 27
| 36
| 21
| 15
| null | null |
jtdubs/Light
|
src/Light/Geometry/Quaternion.hs
|
mit
|
(@*^) :: Quaternion -> Vector -> Vector
q @*^ v
| v == zeroVector = zeroVector
| otherwise = qv (q @*@ Quaternion v 0 @*@ conjugate q)
| 144
|
(@*^) :: Quaternion -> Vector -> Vector
q @*^ v
| v == zeroVector = zeroVector
| otherwise = qv (q @*@ Quaternion v 0 @*@ conjugate q)
| 144
|
q @*^ v
| v == zeroVector = zeroVector
| otherwise = qv (q @*@ Quaternion v 0 @*@ conjugate q)
| 104
| false
| true
| 0
| 9
| 37
| 75
| 34
| 41
| null | null |
olsner/ghc
|
compiler/typecheck/TcDerivUtils.hs
|
bsd-3-clause
|
checkSideConditions :: DynFlags -> DerivContext -> Class -> [TcType]
-> TyCon -- tycon
-> DerivStatus
checkSideConditions dflags mtheta cls cls_tys rep_tc
| Just cond <- sideConditions mtheta cls
= case (cond dflags rep_tc) of
NotValid err -> DerivableClassError err -- Class-specific error
IsValid | null (filterOutInvisibleTypes (classTyCon cls) cls_tys)
-> CanDerive
-- All stock derivable classes are unary in the sense that
-- there should be not types in cls_tys (i.e., no type args
-- other than last). Note that cls_types can contain
-- invisible types as well (e.g., for Generic1, which is
-- poly-kinded), so make sure those are not counted.
| otherwise -> DerivableClassError (classArgsErr cls cls_tys)
-- e.g. deriving( Eq s )
| Just err <- canDeriveAnyClass dflags rep_tc cls
= NonDerivableClass err -- DeriveAnyClass does not work
| otherwise
= DerivableViaInstance
| 1,102
|
checkSideConditions :: DynFlags -> DerivContext -> Class -> [TcType]
-> TyCon -- tycon
-> DerivStatus
checkSideConditions dflags mtheta cls cls_tys rep_tc
| Just cond <- sideConditions mtheta cls
= case (cond dflags rep_tc) of
NotValid err -> DerivableClassError err -- Class-specific error
IsValid | null (filterOutInvisibleTypes (classTyCon cls) cls_tys)
-> CanDerive
-- All stock derivable classes are unary in the sense that
-- there should be not types in cls_tys (i.e., no type args
-- other than last). Note that cls_types can contain
-- invisible types as well (e.g., for Generic1, which is
-- poly-kinded), so make sure those are not counted.
| otherwise -> DerivableClassError (classArgsErr cls cls_tys)
-- e.g. deriving( Eq s )
| Just err <- canDeriveAnyClass dflags rep_tc cls
= NonDerivableClass err -- DeriveAnyClass does not work
| otherwise
= DerivableViaInstance
| 1,102
|
checkSideConditions dflags mtheta cls cls_tys rep_tc
| Just cond <- sideConditions mtheta cls
= case (cond dflags rep_tc) of
NotValid err -> DerivableClassError err -- Class-specific error
IsValid | null (filterOutInvisibleTypes (classTyCon cls) cls_tys)
-> CanDerive
-- All stock derivable classes are unary in the sense that
-- there should be not types in cls_tys (i.e., no type args
-- other than last). Note that cls_types can contain
-- invisible types as well (e.g., for Generic1, which is
-- poly-kinded), so make sure those are not counted.
| otherwise -> DerivableClassError (classArgsErr cls cls_tys)
-- e.g. deriving( Eq s )
| Just err <- canDeriveAnyClass dflags rep_tc cls
= NonDerivableClass err -- DeriveAnyClass does not work
| otherwise
= DerivableViaInstance
| 960
| false
| true
| 0
| 16
| 357
| 187
| 89
| 98
| null | null |
romanb/amazonka
|
amazonka-rds/gen/Network/AWS/RDS/DescribeDBInstances.hs
|
mpl-2.0
|
-- | The maximum number of records to include in the response. If more records
-- exist than the specified 'MaxRecords' value, a pagination token called a marker
-- is included in the response so that the remaining results may be retrieved.
--
-- Default: 100
--
-- Constraints: minimum 20, maximum 100
ddbi1MaxRecords :: Lens' DescribeDBInstances (Maybe Int)
ddbi1MaxRecords = lens _ddbi1MaxRecords (\s a -> s { _ddbi1MaxRecords = a })
| 436
|
ddbi1MaxRecords :: Lens' DescribeDBInstances (Maybe Int)
ddbi1MaxRecords = lens _ddbi1MaxRecords (\s a -> s { _ddbi1MaxRecords = a })
| 133
|
ddbi1MaxRecords = lens _ddbi1MaxRecords (\s a -> s { _ddbi1MaxRecords = a })
| 76
| true
| true
| 0
| 9
| 71
| 52
| 31
| 21
| null | null |
snoyberg/ghc
|
compiler/types/Type.hs
|
bsd-3-clause
|
splitFunTys :: Type -> ([Type], Type)
splitFunTys ty = split [] ty ty
where
split args orig_ty ty | Just ty' <- coreView ty = split args orig_ty ty'
split args _ (FunTy arg res) = split (arg:args) res res
split args orig_ty _ = (reverse args, orig_ty)
| 285
|
splitFunTys :: Type -> ([Type], Type)
splitFunTys ty = split [] ty ty
where
split args orig_ty ty | Just ty' <- coreView ty = split args orig_ty ty'
split args _ (FunTy arg res) = split (arg:args) res res
split args orig_ty _ = (reverse args, orig_ty)
| 285
|
splitFunTys ty = split [] ty ty
where
split args orig_ty ty | Just ty' <- coreView ty = split args orig_ty ty'
split args _ (FunTy arg res) = split (arg:args) res res
split args orig_ty _ = (reverse args, orig_ty)
| 247
| false
| true
| 1
| 9
| 81
| 142
| 64
| 78
| null | null |
tolysz/prepare-ghcjs
|
spec-lts8/aeson/Data/Aeson/Types/FromJSON.hs
|
bsd-3-clause
|
-- | Retrieve the value associated with the given key of an 'Object'.
-- The result is 'empty' if the key is not present or the value cannot
-- be converted to the desired type.
--
-- This accessor is appropriate if the key and value /must/ be present
-- in an object for it to be valid. If the key and value are
-- optional, use '.:?' instead.
(.:) :: (FromJSON a) => Object -> Text -> Parser a
obj .: key = case H.lookup key obj of
Nothing -> fail $ "key " ++ show key ++ " not present"
Just v -> parseJSON v <?> Key key
| 555
|
(.:) :: (FromJSON a) => Object -> Text -> Parser a
obj .: key = case H.lookup key obj of
Nothing -> fail $ "key " ++ show key ++ " not present"
Just v -> parseJSON v <?> Key key
| 209
|
obj .: key = case H.lookup key obj of
Nothing -> fail $ "key " ++ show key ++ " not present"
Just v -> parseJSON v <?> Key key
| 158
| true
| true
| 0
| 10
| 142
| 97
| 50
| 47
| null | null |
5outh/Bang
|
src/Bang/Interface/Drum.hs
|
mit
|
-- | Whole Dotted Drum
wdd :: PercussionSound -> Music PercussionSound
wdd ps = oneDotDrum ps 1
| 95
|
wdd :: PercussionSound -> Music PercussionSound
wdd ps = oneDotDrum ps 1
| 72
|
wdd ps = oneDotDrum ps 1
| 24
| true
| true
| 0
| 6
| 16
| 27
| 13
| 14
| null | null |
xmonad/xmonad-contrib
|
XMonad/Layout/Decoration.hs
|
bsd-3-clause
|
updateDeco _ _ _ _ = return ()
| 30
|
updateDeco _ _ _ _ = return ()
| 30
|
updateDeco _ _ _ _ = return ()
| 30
| false
| false
| 0
| 6
| 7
| 20
| 9
| 11
| null | null |
imalsogreg/flycap
|
tests/memVid.hs
|
bsd-3-clause
|
shutdown :: [Context] -> GLFW.WindowCloseCallback
shutdown c win = do
print "shutdown"
cameraStop c
GLFW.destroyWindow win
GLFW.terminate
exitWith ExitSuccess
print "shutdown after exit"
--TODO :
-- add more keys pressed options
| 244
|
shutdown :: [Context] -> GLFW.WindowCloseCallback
shutdown c win = do
print "shutdown"
cameraStop c
GLFW.destroyWindow win
GLFW.terminate
exitWith ExitSuccess
print "shutdown after exit"
--TODO :
-- add more keys pressed options
| 244
|
shutdown c win = do
print "shutdown"
cameraStop c
GLFW.destroyWindow win
GLFW.terminate
exitWith ExitSuccess
print "shutdown after exit"
--TODO :
-- add more keys pressed options
| 194
| false
| true
| 0
| 9
| 46
| 70
| 29
| 41
| null | null |
swift-nav/plover
|
src/Language/Plover/Types.hs
|
mit
|
-- | Collapses dense matrices and expands typedefs along the spine using baseExpandTypedef
normalizeTypes :: TermMappable a => a -> a
normalizeTypes x = runIdentity $ traverseTerm tty texp tloc trng =<< termMapper ety return return return x
where tty ty = case ty of
VecType _ [] ty -> return ty
VecType DenseMatrix bnds1 (VecType DenseMatrix bnds2 ty) -> return $ VecType DenseMatrix (bnds1 ++ bnds2) ty
_ -> return ty
texp = return
tloc = return
trng = return
ety x = return $ baseExpandTypedef x
-- | Splits dense matrices into single-indexed entities
| 620
|
normalizeTypes :: TermMappable a => a -> a
normalizeTypes x = runIdentity $ traverseTerm tty texp tloc trng =<< termMapper ety return return return x
where tty ty = case ty of
VecType _ [] ty -> return ty
VecType DenseMatrix bnds1 (VecType DenseMatrix bnds2 ty) -> return $ VecType DenseMatrix (bnds1 ++ bnds2) ty
_ -> return ty
texp = return
tloc = return
trng = return
ety x = return $ baseExpandTypedef x
-- | Splits dense matrices into single-indexed entities
| 529
|
normalizeTypes x = runIdentity $ traverseTerm tty texp tloc trng =<< termMapper ety return return return x
where tty ty = case ty of
VecType _ [] ty -> return ty
VecType DenseMatrix bnds1 (VecType DenseMatrix bnds2 ty) -> return $ VecType DenseMatrix (bnds1 ++ bnds2) ty
_ -> return ty
texp = return
tloc = return
trng = return
ety x = return $ baseExpandTypedef x
-- | Splits dense matrices into single-indexed entities
| 486
| true
| true
| 5
| 11
| 161
| 188
| 83
| 105
| null | null |
phischu/geometric-algebra
|
src/GeometricAlgebra/Conformal3D.hs
|
bsd-3-clause
|
origin :: (Num a) => Vector a
origin = Vector 1 0 0 0 0
| 55
|
origin :: (Num a) => Vector a
origin = Vector 1 0 0 0 0
| 55
|
origin = Vector 1 0 0 0 0
| 25
| false
| true
| 0
| 7
| 14
| 39
| 18
| 21
| null | null |
blouerat/cal
|
Cal.hs
|
unlicense
|
monthCal :: Bool -> Year -> Month -> [String]
monthCal displayYear year month = header : dayNames : monthDays year month
where header = center 20 $ if displayYear then show month ++ " " ++ show year else show month
| 216
|
monthCal :: Bool -> Year -> Month -> [String]
monthCal displayYear year month = header : dayNames : monthDays year month
where header = center 20 $ if displayYear then show month ++ " " ++ show year else show month
| 216
|
monthCal displayYear year month = header : dayNames : monthDays year month
where header = center 20 $ if displayYear then show month ++ " " ++ show year else show month
| 170
| false
| true
| 0
| 9
| 42
| 86
| 42
| 44
| null | null |
singingwolfboy/citeproc-hs
|
test/loc.hs
|
bsd-3-clause
|
-- pragmas
isntcomment _ = True
| 31
|
isntcomment _ = True
| 20
|
isntcomment _ = True
| 20
| true
| false
| 0
| 5
| 5
| 10
| 5
| 5
| null | null |
PavelClaudiuStefan/FMI
|
An_3_Semestru_1/ProgramareDeclarativa/Laboratoare/Laborator2/PicturesSVG.hs
|
cc0-1.0
|
king = Img $ Image (Name "images/king.png") (50,50)
| 66
|
king = Img $ Image (Name "images/king.png") (50,50)
| 66
|
king = Img $ Image (Name "images/king.png") (50,50)
| 66
| false
| false
| 3
| 7
| 22
| 32
| 14
| 18
| null | null |
rahulmutt/ghcvm
|
compiler/Eta/Profiling/CostCentre.hs
|
bsd-3-clause
|
isCafCC _ = False
| 46
|
isCafCC _ = False
| 46
|
isCafCC _ = False
| 46
| false
| false
| 0
| 5
| 32
| 9
| 4
| 5
| null | null |
jtapolczai/wumpus
|
Agent/Intelligent/Affect/Fragments.hs
|
apache-2.0
|
strongContentment :: Filter
strongContentment = genericContentment ss
where
ss = ContentmentSettings
(-0.2)
(-0.1)
(-0.05)
(-0.1)
(-0.4) -- critical health
0.05
0.05
0.05
0.1
0.03 -- have gold
0.03
0.02
0.03
0.02
0.08 -- low temp
0.1
0.15
0.15
2 -- plant radius
0.4
5 -- empty radius
0.01
| 540
|
strongContentment :: Filter
strongContentment = genericContentment ss
where
ss = ContentmentSettings
(-0.2)
(-0.1)
(-0.05)
(-0.1)
(-0.4) -- critical health
0.05
0.05
0.05
0.1
0.03 -- have gold
0.03
0.02
0.03
0.02
0.08 -- low temp
0.1
0.15
0.15
2 -- plant radius
0.4
5 -- empty radius
0.01
| 540
|
strongContentment = genericContentment ss
where
ss = ContentmentSettings
(-0.2)
(-0.1)
(-0.05)
(-0.1)
(-0.4) -- critical health
0.05
0.05
0.05
0.1
0.03 -- have gold
0.03
0.02
0.03
0.02
0.08 -- low temp
0.1
0.15
0.15
2 -- plant radius
0.4
5 -- empty radius
0.01
| 512
| false
| true
| 0
| 7
| 299
| 97
| 53
| 44
| null | null |
brendanhay/gogol
|
gogol-healthcare/gen/Network/Google/Resource/Healthcare/Projects/Locations/DataSets/FhirStores/Fhir/Vread.hs
|
mpl-2.0
|
-- | Creates a value of 'ProjectsLocationsDataSetsFhirStoresFhirVread' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'pldsfsfvXgafv'
--
-- * 'pldsfsfvUploadProtocol'
--
-- * 'pldsfsfvAccessToken'
--
-- * 'pldsfsfvUploadType'
--
-- * 'pldsfsfvName'
--
-- * 'pldsfsfvCallback'
projectsLocationsDataSetsFhirStoresFhirVread
:: Text -- ^ 'pldsfsfvName'
-> ProjectsLocationsDataSetsFhirStoresFhirVread
projectsLocationsDataSetsFhirStoresFhirVread pPldsfsfvName_ =
ProjectsLocationsDataSetsFhirStoresFhirVread'
{ _pldsfsfvXgafv = Nothing
, _pldsfsfvUploadProtocol = Nothing
, _pldsfsfvAccessToken = Nothing
, _pldsfsfvUploadType = Nothing
, _pldsfsfvName = pPldsfsfvName_
, _pldsfsfvCallback = Nothing
}
| 821
|
projectsLocationsDataSetsFhirStoresFhirVread
:: Text -- ^ 'pldsfsfvName'
-> ProjectsLocationsDataSetsFhirStoresFhirVread
projectsLocationsDataSetsFhirStoresFhirVread pPldsfsfvName_ =
ProjectsLocationsDataSetsFhirStoresFhirVread'
{ _pldsfsfvXgafv = Nothing
, _pldsfsfvUploadProtocol = Nothing
, _pldsfsfvAccessToken = Nothing
, _pldsfsfvUploadType = Nothing
, _pldsfsfvName = pPldsfsfvName_
, _pldsfsfvCallback = Nothing
}
| 459
|
projectsLocationsDataSetsFhirStoresFhirVread pPldsfsfvName_ =
ProjectsLocationsDataSetsFhirStoresFhirVread'
{ _pldsfsfvXgafv = Nothing
, _pldsfsfvUploadProtocol = Nothing
, _pldsfsfvAccessToken = Nothing
, _pldsfsfvUploadType = Nothing
, _pldsfsfvName = pPldsfsfvName_
, _pldsfsfvCallback = Nothing
}
| 330
| true
| true
| 0
| 6
| 128
| 72
| 50
| 22
| null | null |
Ornedan/dom3statusbot
|
GameInfo.hs
|
bsd-3-clause
|
nationName 45 = "MA Ashdod"
| 27
|
nationName 45 = "MA Ashdod"
| 27
|
nationName 45 = "MA Ashdod"
| 27
| false
| false
| 0
| 5
| 4
| 9
| 4
| 5
| null | null |
brendanhay/gogol
|
gogol-compute/gen/Network/Google/Resource/Compute/Instances/SetMetadata.hs
|
mpl-2.0
|
-- | Creates a value of 'InstancesSetMetadata' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ismRequestId'
--
-- * 'ismProject'
--
-- * 'ismZone'
--
-- * 'ismPayload'
--
-- * 'ismInstance'
instancesSetMetadata
:: Text -- ^ 'ismProject'
-> Text -- ^ 'ismZone'
-> Metadata -- ^ 'ismPayload'
-> Text -- ^ 'ismInstance'
-> InstancesSetMetadata
instancesSetMetadata pIsmProject_ pIsmZone_ pIsmPayload_ pIsmInstance_ =
InstancesSetMetadata'
{ _ismRequestId = Nothing
, _ismProject = pIsmProject_
, _ismZone = pIsmZone_
, _ismPayload = pIsmPayload_
, _ismInstance = pIsmInstance_
}
| 708
|
instancesSetMetadata
:: Text -- ^ 'ismProject'
-> Text -- ^ 'ismZone'
-> Metadata -- ^ 'ismPayload'
-> Text -- ^ 'ismInstance'
-> InstancesSetMetadata
instancesSetMetadata pIsmProject_ pIsmZone_ pIsmPayload_ pIsmInstance_ =
InstancesSetMetadata'
{ _ismRequestId = Nothing
, _ismProject = pIsmProject_
, _ismZone = pIsmZone_
, _ismPayload = pIsmPayload_
, _ismInstance = pIsmInstance_
}
| 431
|
instancesSetMetadata pIsmProject_ pIsmZone_ pIsmPayload_ pIsmInstance_ =
InstancesSetMetadata'
{ _ismRequestId = Nothing
, _ismProject = pIsmProject_
, _ismZone = pIsmZone_
, _ismPayload = pIsmPayload_
, _ismInstance = pIsmInstance_
}
| 260
| true
| true
| 0
| 10
| 146
| 94
| 58
| 36
| null | null |
inchingforward/elm-lang.org
|
src/backend/Router.hs
|
bsd-3-clause
|
demandParam :: Utf8.ByteString -> Snap String
demandParam param =
do maybeBS <- getParam param
maybe pass (return . Utf8.toString) maybeBS
| 147
|
demandParam :: Utf8.ByteString -> Snap String
demandParam param =
do maybeBS <- getParam param
maybe pass (return . Utf8.toString) maybeBS
| 147
|
demandParam param =
do maybeBS <- getParam param
maybe pass (return . Utf8.toString) maybeBS
| 101
| false
| true
| 0
| 10
| 28
| 52
| 24
| 28
| null | null |
hellerve/unlambda
|
unlambda.hs
|
gpl-2.0
|
main :: IO ()
main = do
args <- getArgs
if null args
then do printVersion
printCommands
putStrLn ""
replinit
else
if(head args == "-h") || (head args == "--help")
then printUsage
else exec args
| 353
|
main :: IO ()
main = do
args <- getArgs
if null args
then do printVersion
printCommands
putStrLn ""
replinit
else
if(head args == "-h") || (head args == "--help")
then printUsage
else exec args
| 353
|
main = do
args <- getArgs
if null args
then do printVersion
printCommands
putStrLn ""
replinit
else
if(head args == "-h") || (head args == "--help")
then printUsage
else exec args
| 339
| false
| true
| 0
| 13
| 194
| 93
| 42
| 51
| null | null |
vikraman/ghc
|
compiler/basicTypes/Name.hs
|
bsd-3-clause
|
isHoleName :: Name -> Bool
isHoleName = isHoleModule . nameModule
| 65
|
isHoleName :: Name -> Bool
isHoleName = isHoleModule . nameModule
| 65
|
isHoleName = isHoleModule . nameModule
| 38
| false
| true
| 0
| 5
| 9
| 19
| 10
| 9
| null | null |
dsorokin/aivika-experiment-chart
|
examples/GPSSExample7-31/Experiment.hs
|
bsd-3-clause
|
chartView title series =
defaultDeviationChartView {
deviationChartTitle = title,
deviationChartRightYSeries = series
}
| 131
|
chartView title series =
defaultDeviationChartView {
deviationChartTitle = title,
deviationChartRightYSeries = series
}
| 131
|
chartView title series =
defaultDeviationChartView {
deviationChartTitle = title,
deviationChartRightYSeries = series
}
| 131
| false
| false
| 1
| 7
| 24
| 33
| 15
| 18
| null | null |
projectorhq/haskell-liquid
|
src/Text/Liquid/Tokens.hs
|
bsd-3-clause
|
captureEnd = "endcapture"
| 25
|
captureEnd = "endcapture"
| 25
|
captureEnd = "endcapture"
| 25
| false
| false
| 0
| 4
| 2
| 6
| 3
| 3
| null | null |
anekos/liname-hs
|
src/LiName/Utils.hs
|
gpl-3.0
|
indent :: String -> String
indent = (" " ++)
| 45
|
indent :: String -> String
indent = (" " ++)
| 45
|
indent = (" " ++)
| 18
| false
| true
| 0
| 7
| 10
| 26
| 12
| 14
| null | null |
bitonic/kyotocabinet
|
Database/KyotoCabinet/DB/Dir.hs
|
bsd-3-clause
|
defaultDirOptions :: DirOptions
defaultDirOptions = DirOptions { alignmentPow = Nothing
, freePoolPow = Nothing
, options = []
, buckets = Nothing
, maxSize = Nothing
, defragInterval = Nothing
, compressor = Nothing
, cipherKey = Nothing
}
| 488
|
defaultDirOptions :: DirOptions
defaultDirOptions = DirOptions { alignmentPow = Nothing
, freePoolPow = Nothing
, options = []
, buckets = Nothing
, maxSize = Nothing
, defragInterval = Nothing
, compressor = Nothing
, cipherKey = Nothing
}
| 488
|
defaultDirOptions = DirOptions { alignmentPow = Nothing
, freePoolPow = Nothing
, options = []
, buckets = Nothing
, maxSize = Nothing
, defragInterval = Nothing
, compressor = Nothing
, cipherKey = Nothing
}
| 456
| false
| true
| 0
| 7
| 286
| 63
| 40
| 23
| null | null |
unisonweb/platform
|
parser-typechecker/tests/Unison/Test/ColorText.hs
|
mit
|
ex4e :: String
ex4e = toANSI . condensedExcerptToText 1 $ markup "abc" m
where m = Map.singleton (Range (Pos 1 2) (Pos 1 3)) Red
| 136
|
ex4e :: String
ex4e = toANSI . condensedExcerptToText 1 $ markup "abc" m
where m = Map.singleton (Range (Pos 1 2) (Pos 1 3)) Red
| 136
|
ex4e = toANSI . condensedExcerptToText 1 $ markup "abc" m
where m = Map.singleton (Range (Pos 1 2) (Pos 1 3)) Red
| 121
| false
| true
| 0
| 11
| 32
| 65
| 32
| 33
| null | null |
apoikos/pkg-xmobar
|
src/Plugins/Monitors/Net.hs
|
bsd-3-clause
|
runNets :: [(NetDevRef, String)] -> [String] -> Monitor String
runNets refs _ = io (parseActive refs) >>= printNet
where parseActive refs' = parseNets refs' >>= return . selectActive
selectActive = maximum
| 219
|
runNets :: [(NetDevRef, String)] -> [String] -> Monitor String
runNets refs _ = io (parseActive refs) >>= printNet
where parseActive refs' = parseNets refs' >>= return . selectActive
selectActive = maximum
| 219
|
runNets refs _ = io (parseActive refs) >>= printNet
where parseActive refs' = parseNets refs' >>= return . selectActive
selectActive = maximum
| 156
| false
| true
| 0
| 9
| 44
| 78
| 40
| 38
| null | null |
diku-dk/futhark
|
src/Futhark/Optimise/MemoryBlockMerging.hs
|
isc
|
isKernelInvariant :: Scope GPUMem -> (SubExp, space) -> Bool
isKernelInvariant scope (Var vname, _) = vname `M.member` scope
| 124
|
isKernelInvariant :: Scope GPUMem -> (SubExp, space) -> Bool
isKernelInvariant scope (Var vname, _) = vname `M.member` scope
| 124
|
isKernelInvariant scope (Var vname, _) = vname `M.member` scope
| 63
| false
| true
| 0
| 10
| 17
| 58
| 29
| 29
| null | null |
eval-so/cruncher
|
src/Evalso/Cruncher/Language/JRuby18.hs
|
bsd-3-clause
|
jruby18 :: Language
jruby18 = Language {
_codeFilename = "program.rb"
, _compileCommand = Nothing
, _compileTimeout = Nothing
, _runCommand = ["jruby", "--headless", "--1.8", "program.rb"]
, _runTimeout = 10
, _codemirror = "ruby"
, _rpm = "jruby"
, _displayName = "JRuby18"
}
| 294
|
jruby18 :: Language
jruby18 = Language {
_codeFilename = "program.rb"
, _compileCommand = Nothing
, _compileTimeout = Nothing
, _runCommand = ["jruby", "--headless", "--1.8", "program.rb"]
, _runTimeout = 10
, _codemirror = "ruby"
, _rpm = "jruby"
, _displayName = "JRuby18"
}
| 294
|
jruby18 = Language {
_codeFilename = "program.rb"
, _compileCommand = Nothing
, _compileTimeout = Nothing
, _runCommand = ["jruby", "--headless", "--1.8", "program.rb"]
, _runTimeout = 10
, _codemirror = "ruby"
, _rpm = "jruby"
, _displayName = "JRuby18"
}
| 274
| false
| true
| 0
| 7
| 59
| 73
| 47
| 26
| null | null |
brooksbp/haskell-openflow
|
Network/OpenFlow.hs
|
bsd-3-clause
|
putOfpMsg (OfptFlowRemoved flowRemoved) = put flowRemoved
| 61
|
putOfpMsg (OfptFlowRemoved flowRemoved) = put flowRemoved
| 61
|
putOfpMsg (OfptFlowRemoved flowRemoved) = put flowRemoved
| 61
| false
| false
| 0
| 7
| 9
| 18
| 8
| 10
| null | null |
madsryvang/LVsbp
|
haskell/src/SwiftNav/SBP/Piksi.hs
|
lgpl-3.0
|
msgCwStart :: Word16
msgCwStart = 0x00C1
| 40
|
msgCwStart :: Word16
msgCwStart = 0x00C1
| 40
|
msgCwStart = 0x00C1
| 19
| false
| true
| 0
| 4
| 5
| 11
| 6
| 5
| null | null |
enolan/Idris-dev
|
src/Idris/Delaborate.hs
|
bsd-3-clause
|
delab' :: IState -> Term -> Bool -> Bool -> PTerm
delab' i t f mvs = delabTy' i [] t f mvs True
| 95
|
delab' :: IState -> Term -> Bool -> Bool -> PTerm
delab' i t f mvs = delabTy' i [] t f mvs True
| 95
|
delab' i t f mvs = delabTy' i [] t f mvs True
| 45
| false
| true
| 0
| 8
| 23
| 57
| 26
| 31
| null | null |
jameysharp/lotos
|
LOTOS/Simplify.hs
|
gpl-2.0
|
simplifyOnce (Hide binding) = uncurry hideB =<< unbind binding
| 62
|
simplifyOnce (Hide binding) = uncurry hideB =<< unbind binding
| 62
|
simplifyOnce (Hide binding) = uncurry hideB =<< unbind binding
| 62
| false
| false
| 0
| 7
| 8
| 25
| 11
| 14
| null | null |
mgrabmueller/harpy
|
Harpy/X86CodeGen.hs
|
bsd-3-clause
|
x86_likely_prefix = 0x3e
| 24
|
x86_likely_prefix = 0x3e
| 24
|
x86_likely_prefix = 0x3e
| 24
| false
| false
| 0
| 4
| 2
| 6
| 3
| 3
| null | null |
janschulz/pandoc
|
src/Text/Pandoc/Writers/ICML.hs
|
gpl-2.0
|
definitionListItemToICML :: WriterOptions -> Style -> ([Inline],[[Block]]) -> WS Doc
definitionListItemToICML opts style (term,defs) = do
term' <- parStyle opts (defListTermName:style) term
defs' <- mapM (blocksToICML opts (defListDefName:style)) defs
return $ intersperseBrs $ (term' : defs')
-- | Convert a list of inline elements to ICML.
| 349
|
definitionListItemToICML :: WriterOptions -> Style -> ([Inline],[[Block]]) -> WS Doc
definitionListItemToICML opts style (term,defs) = do
term' <- parStyle opts (defListTermName:style) term
defs' <- mapM (blocksToICML opts (defListDefName:style)) defs
return $ intersperseBrs $ (term' : defs')
-- | Convert a list of inline elements to ICML.
| 349
|
definitionListItemToICML opts style (term,defs) = do
term' <- parStyle opts (defListTermName:style) term
defs' <- mapM (blocksToICML opts (defListDefName:style)) defs
return $ intersperseBrs $ (term' : defs')
-- | Convert a list of inline elements to ICML.
| 264
| false
| true
| 0
| 12
| 53
| 121
| 63
| 58
| null | null |
hecrj/haskell-format
|
app/Main.hs
|
bsd-3-clause
|
findHaskellFiles :: FilePath -> IO [FilePath]
findHaskellFiles path = do
isDirectory <- Directory.doesDirectoryExist path
if isDirectory then
do
contents <- Directory.listDirectory path
mconcat
<$> mapM
(findHaskellFiles . (path </>))
(filter (not . List.isPrefixOf ".") contents)
else
if FilePath.takeExtension path == ".hs" then
return [ path ]
else
return []
| 505
|
findHaskellFiles :: FilePath -> IO [FilePath]
findHaskellFiles path = do
isDirectory <- Directory.doesDirectoryExist path
if isDirectory then
do
contents <- Directory.listDirectory path
mconcat
<$> mapM
(findHaskellFiles . (path </>))
(filter (not . List.isPrefixOf ".") contents)
else
if FilePath.takeExtension path == ".hs" then
return [ path ]
else
return []
| 505
|
findHaskellFiles path = do
isDirectory <- Directory.doesDirectoryExist path
if isDirectory then
do
contents <- Directory.listDirectory path
mconcat
<$> mapM
(findHaskellFiles . (path </>))
(filter (not . List.isPrefixOf ".") contents)
else
if FilePath.takeExtension path == ".hs" then
return [ path ]
else
return []
| 459
| false
| true
| 0
| 18
| 192
| 135
| 65
| 70
| null | null |
vikraman/ghc
|
compiler/prelude/TysWiredIn.hs
|
bsd-3-clause
|
-- no ex_tvs
pcDataConWithFixity :: Bool -- ^ declared infix?
-> Name -- ^ datacon name
-> [TyVar] -- ^ univ tyvars
-> [TyVar] -- ^ ex tyvars
-> [Type] -- ^ args
-> TyCon
-> DataCon
pcDataConWithFixity infx n = pcDataConWithFixity' infx n (incrUnique (nameUnique n))
NoRRI
| 460
|
pcDataConWithFixity :: Bool -- ^ declared infix?
-> Name -- ^ datacon name
-> [TyVar] -- ^ univ tyvars
-> [TyVar] -- ^ ex tyvars
-> [Type] -- ^ args
-> TyCon
-> DataCon
pcDataConWithFixity infx n = pcDataConWithFixity' infx n (incrUnique (nameUnique n))
NoRRI
| 446
|
pcDataConWithFixity infx n = pcDataConWithFixity' infx n (incrUnique (nameUnique n))
NoRRI
| 140
| true
| true
| 0
| 10
| 235
| 76
| 42
| 34
| null | null |
ezyang/ghc
|
testsuite/tests/concurrent/should_run/T3279.hs
|
bsd-3-clause
|
f :: Int
f = (1 +) . unsafePerformIO $ do
throwIO (ErrorCall "foo") `catch` \(SomeException e) -> do
myThreadId >>= flip throwTo e
-- point X
unsafeUnmask $ return 1
| 209
|
f :: Int
f = (1 +) . unsafePerformIO $ do
throwIO (ErrorCall "foo") `catch` \(SomeException e) -> do
myThreadId >>= flip throwTo e
-- point X
unsafeUnmask $ return 1
| 209
|
f = (1 +) . unsafePerformIO $ do
throwIO (ErrorCall "foo") `catch` \(SomeException e) -> do
myThreadId >>= flip throwTo e
-- point X
unsafeUnmask $ return 1
| 200
| false
| true
| 0
| 14
| 74
| 82
| 39
| 43
| null | null |
ennocramer/hindent
|
src/HIndent/Pretty.hs
|
bsd-3-clause
|
-- | Write an integral.
int :: (Integral n, MonadState (PrintState s) m)
=> n -> m ()
int = write . decimal
| 111
|
int :: (Integral n, MonadState (PrintState s) m)
=> n -> m ()
int = write . decimal
| 87
|
int = write . decimal
| 21
| true
| true
| 0
| 8
| 26
| 48
| 25
| 23
| null | null |
homam/fsm-conversational-ui
|
src/QnA4.hs
|
bsd-3-clause
|
whatIsYourSizeQ :: Question Int
whatIsYourSizeQ = Question "What is your size?" read
| 84
|
whatIsYourSizeQ :: Question Int
whatIsYourSizeQ = Question "What is your size?" read
| 84
|
whatIsYourSizeQ = Question "What is your size?" read
| 52
| false
| true
| 0
| 5
| 11
| 19
| 9
| 10
| null | null |
holzensp/ghc
|
compiler/codeGen/StgCmmMonad.hs
|
bsd-3-clause
|
listCs :: [FCode ()] -> FCode ()
listCs [] = return ()
| 54
|
listCs :: [FCode ()] -> FCode ()
listCs [] = return ()
| 54
|
listCs [] = return ()
| 21
| false
| true
| 0
| 9
| 11
| 42
| 19
| 23
| null | null |
batterseapower/chsc
|
Core/Size.hs
|
bsd-3-clause
|
(fvedVarSize', fvedTermSize, fvedTermSize', fvedAltsSize, fvedValueSize, fvedValueSize') = mkSize (\f (FVed _ e) -> f e)
| 186
|
(fvedVarSize', fvedTermSize, fvedTermSize', fvedAltsSize, fvedValueSize, fvedValueSize') = mkSize (\f (FVed _ e) -> f e)
| 186
|
(fvedVarSize', fvedTermSize, fvedTermSize', fvedAltsSize, fvedValueSize, fvedValueSize') = mkSize (\f (FVed _ e) -> f e)
| 186
| false
| false
| 0
| 9
| 80
| 49
| 27
| 22
| null | null |
twittner/redis-resp
|
src/Data/Redis/Command.hs
|
mpl-2.0
|
readScoreList r True (Array _ v) = toScoreList . unzip <$> foldr f (Right []) (chunksOf 2 v)
where
f _ x@(Left _) = x
f [Bulk x, Bulk d] (Right acc) = (\a b -> (a, b):acc) <$> readStr x <*> readStr d
f _ _ = Left $ InvalidResponse r
toScoreList (a, s) = ScoreList s a
| 327
|
readScoreList r True (Array _ v) = toScoreList . unzip <$> foldr f (Right []) (chunksOf 2 v)
where
f _ x@(Left _) = x
f [Bulk x, Bulk d] (Right acc) = (\a b -> (a, b):acc) <$> readStr x <*> readStr d
f _ _ = Left $ InvalidResponse r
toScoreList (a, s) = ScoreList s a
| 327
|
readScoreList r True (Array _ v) = toScoreList . unzip <$> foldr f (Right []) (chunksOf 2 v)
where
f _ x@(Left _) = x
f [Bulk x, Bulk d] (Right acc) = (\a b -> (a, b):acc) <$> readStr x <*> readStr d
f _ _ = Left $ InvalidResponse r
toScoreList (a, s) = ScoreList s a
| 327
| false
| false
| 3
| 11
| 118
| 177
| 86
| 91
| null | null |
teleshoes/taffybar
|
src/System/Taffybar/Information/XDG/Protocol.hs
|
bsd-3-clause
|
parseMenu :: Element -> Maybe XDGMenu
parseMenu elt =
let appDir = getChildData "AppDir" elt
defaultAppDirs = isJust $ getChildData "DefaultAppDirs" elt
directoryDir = getChildData "DirectoryDir" elt
defaultDirectoryDirs = isJust $ getChildData "DefaultDirectoryDirs" elt
name = fromMaybe "Name?" $ getChildData "Name" elt
dir = fromMaybe "Dir?" $ getChildData "Directory" elt
onlyUnallocated =
case ( getChildData "OnlyUnallocated" elt
, getChildData "NotOnlyUnallocated" elt) of
(Nothing, Nothing) -> False -- ?!
(Nothing, Just _) -> False
(Just _, Nothing) -> True
(Just _, Just _) -> False -- ?!
deleted = False -- FIXME
include = parseConditions "Include" elt
exclude = parseConditions "Exclude" elt
layout = parseLayout elt
subMenus = fromMaybe [] $ mapChildren "Menu" elt parseMenu
in Just
XDGMenu
{ xmAppDir = appDir
, xmDefaultAppDirs = defaultAppDirs
, xmDirectoryDir = directoryDir
, xmDefaultDirectoryDirs = defaultDirectoryDirs
, xmLegacyDirs = []
, xmName = name
, xmDirectory = dir
, xmOnlyUnallocated = onlyUnallocated
, xmDeleted = deleted
, xmInclude = include
, xmExclude = exclude
, xmSubmenus = subMenus
, xmLayout = layout -- FIXME
}
| 1,391
|
parseMenu :: Element -> Maybe XDGMenu
parseMenu elt =
let appDir = getChildData "AppDir" elt
defaultAppDirs = isJust $ getChildData "DefaultAppDirs" elt
directoryDir = getChildData "DirectoryDir" elt
defaultDirectoryDirs = isJust $ getChildData "DefaultDirectoryDirs" elt
name = fromMaybe "Name?" $ getChildData "Name" elt
dir = fromMaybe "Dir?" $ getChildData "Directory" elt
onlyUnallocated =
case ( getChildData "OnlyUnallocated" elt
, getChildData "NotOnlyUnallocated" elt) of
(Nothing, Nothing) -> False -- ?!
(Nothing, Just _) -> False
(Just _, Nothing) -> True
(Just _, Just _) -> False -- ?!
deleted = False -- FIXME
include = parseConditions "Include" elt
exclude = parseConditions "Exclude" elt
layout = parseLayout elt
subMenus = fromMaybe [] $ mapChildren "Menu" elt parseMenu
in Just
XDGMenu
{ xmAppDir = appDir
, xmDefaultAppDirs = defaultAppDirs
, xmDirectoryDir = directoryDir
, xmDefaultDirectoryDirs = defaultDirectoryDirs
, xmLegacyDirs = []
, xmName = name
, xmDirectory = dir
, xmOnlyUnallocated = onlyUnallocated
, xmDeleted = deleted
, xmInclude = include
, xmExclude = exclude
, xmSubmenus = subMenus
, xmLayout = layout -- FIXME
}
| 1,391
|
parseMenu elt =
let appDir = getChildData "AppDir" elt
defaultAppDirs = isJust $ getChildData "DefaultAppDirs" elt
directoryDir = getChildData "DirectoryDir" elt
defaultDirectoryDirs = isJust $ getChildData "DefaultDirectoryDirs" elt
name = fromMaybe "Name?" $ getChildData "Name" elt
dir = fromMaybe "Dir?" $ getChildData "Directory" elt
onlyUnallocated =
case ( getChildData "OnlyUnallocated" elt
, getChildData "NotOnlyUnallocated" elt) of
(Nothing, Nothing) -> False -- ?!
(Nothing, Just _) -> False
(Just _, Nothing) -> True
(Just _, Just _) -> False -- ?!
deleted = False -- FIXME
include = parseConditions "Include" elt
exclude = parseConditions "Exclude" elt
layout = parseLayout elt
subMenus = fromMaybe [] $ mapChildren "Menu" elt parseMenu
in Just
XDGMenu
{ xmAppDir = appDir
, xmDefaultAppDirs = defaultAppDirs
, xmDirectoryDir = directoryDir
, xmDefaultDirectoryDirs = defaultDirectoryDirs
, xmLegacyDirs = []
, xmName = name
, xmDirectory = dir
, xmOnlyUnallocated = onlyUnallocated
, xmDeleted = deleted
, xmInclude = include
, xmExclude = exclude
, xmSubmenus = subMenus
, xmLayout = layout -- FIXME
}
| 1,353
| false
| true
| 0
| 13
| 407
| 345
| 185
| 160
| null | null |
ml9951/ghc
|
compiler/typecheck/TcType.hs
|
bsd-3-clause
|
orphNamesOfCo (NthCo _ co) = orphNamesOfCo co
| 54
|
orphNamesOfCo (NthCo _ co) = orphNamesOfCo co
| 54
|
orphNamesOfCo (NthCo _ co) = orphNamesOfCo co
| 54
| false
| false
| 0
| 6
| 15
| 21
| 9
| 12
| null | null |
pparkkin/eta
|
compiler/ETA/Prelude/PrelNames.hs
|
bsd-3-clause
|
unRec1_RDR = varQual_RDR gHC_GENERICS (fsLit "unRec1")
| 55
|
unRec1_RDR = varQual_RDR gHC_GENERICS (fsLit "unRec1")
| 55
|
unRec1_RDR = varQual_RDR gHC_GENERICS (fsLit "unRec1")
| 55
| false
| false
| 0
| 7
| 6
| 17
| 8
| 9
| null | null |
coreyoconnor/corebot-bliki
|
src/Yesod/CoreBot/Bliki/Config.hs
|
bsd-3-clause
|
node_markdown_path :: Yesod master => Config master -> FilePath -> FilePath
node_markdown_path config node_path =
store_dir config </> node_path
| 148
|
node_markdown_path :: Yesod master => Config master -> FilePath -> FilePath
node_markdown_path config node_path =
store_dir config </> node_path
| 148
|
node_markdown_path config node_path =
store_dir config </> node_path
| 72
| false
| true
| 2
| 7
| 22
| 47
| 20
| 27
| null | null |
iqsf/HFitUI
|
src/WebUI/Widgets/UIWidget.hs
|
bsd-3-clause
|
ffMonospace = FFM "monospace"
| 29
|
ffMonospace = FFM "monospace"
| 29
|
ffMonospace = FFM "monospace"
| 29
| false
| false
| 1
| 5
| 3
| 13
| 4
| 9
| null | null |
lukexi/ghc-7.8-arm64
|
compiler/cmm/CmmMachOp.hs
|
bsd-3-clause
|
mo_wordSQuot dflags = MO_S_Quot (wordWidth dflags)
| 53
|
mo_wordSQuot dflags = MO_S_Quot (wordWidth dflags)
| 53
|
mo_wordSQuot dflags = MO_S_Quot (wordWidth dflags)
| 53
| false
| false
| 0
| 7
| 8
| 18
| 8
| 10
| null | null |
ckaestne/CIDE
|
CIDE_Language_Haskell/test/fromviral/PreludeText.hs
|
gpl-3.0
|
escape :: Char -> String -> String;
escape d cs = case d of {
'\n' -> '\\' : ('n' : cs);
'\"' -> '\\' : ('\"' : cs);
'\'' -> '\\' : ('\'' : cs);
'\\' -> '\\' : ('\\' : cs);
c -> c : cs
}
| 306
|
escape :: Char -> String -> String
escape d cs = case d of {
'\n' -> '\\' : ('n' : cs);
'\"' -> '\\' : ('\"' : cs);
'\'' -> '\\' : ('\'' : cs);
'\\' -> '\\' : ('\\' : cs);
c -> c : cs
}
| 302
|
escape d cs = case d of {
'\n' -> '\\' : ('n' : cs);
'\"' -> '\\' : ('\"' : cs);
'\'' -> '\\' : ('\'' : cs);
'\\' -> '\\' : ('\\' : cs);
c -> c : cs
}
| 267
| false
| true
| 1
| 10
| 168
| 119
| 63
| 56
| null | null |
keithodulaigh/Hets
|
GMP/GMP-CoLoSS/GMP/Logics/Generic.hs
|
gpl-2.0
|
{- ------------------------------------------------------------------------------
pretty printing functions
------------------------------------------------------------------------------ -}
-- pretty print formula
pretty :: (Feature a (b c)) => Formula (a (b c)) -> String
pretty F = "F"
| 288
|
pretty :: (Feature a (b c)) => Formula (a (b c)) -> String
pretty F = "F"
| 73
|
pretty F = "F"
| 14
| true
| true
| 0
| 11
| 28
| 52
| 27
| 25
| null | null |
mcmaniac/ghc
|
compiler/nativeGen/X86/Ppr.hs
|
bsd-3-clause
|
{- A hack. The Intel documentation says that "The two and three
operand forms [of IMUL] may also be used with unsigned operands
because the lower half of the product is the same regardless if
(sic) the operands are signed or unsigned. The CF and OF flags,
however, cannot be used to determine if the upper half of the
result is non-zero." So there.
-}
pprInstr platform (AND size src dst) = pprSizeOpOp platform (sLit "and") size src dst
| 455
|
pprInstr platform (AND size src dst) = pprSizeOpOp platform (sLit "and") size src dst
| 85
|
pprInstr platform (AND size src dst) = pprSizeOpOp platform (sLit "and") size src dst
| 85
| true
| false
| 0
| 7
| 96
| 39
| 19
| 20
| null | null |
google/codeworld
|
codeworld-auth/src/CodeWorld/Auth/Token.hs
|
apache-2.0
|
renderAccessToken :: Signer -> AccessToken -> Maybe Text
renderAccessToken signer (AccessToken issuer issuedAt expiresAt userId) =
renderHelper signer issuer issuedAt expiresAt userId $
Map.fromList [("token-type", String "access")]
| 238
|
renderAccessToken :: Signer -> AccessToken -> Maybe Text
renderAccessToken signer (AccessToken issuer issuedAt expiresAt userId) =
renderHelper signer issuer issuedAt expiresAt userId $
Map.fromList [("token-type", String "access")]
| 238
|
renderAccessToken signer (AccessToken issuer issuedAt expiresAt userId) =
renderHelper signer issuer issuedAt expiresAt userId $
Map.fromList [("token-type", String "access")]
| 181
| false
| true
| 0
| 9
| 32
| 71
| 35
| 36
| null | null |
haskoin/haskoin
|
test/Haskoin/AddressSpec.hs
|
unlicense
|
compatWitnessVectors :: [(Network, Text, Text)]
compatWitnessVectors =
[ ( btcTest
, "cNUnpYpMsJXYCERYBciJnsWBpcYEFjdcbq6dxj4SskGhs7uHuJ7Q"
, "2N6PDTueBHvXzW61B4oe5SW1D3v2Z3Vpbvw")
]
| 202
|
compatWitnessVectors :: [(Network, Text, Text)]
compatWitnessVectors =
[ ( btcTest
, "cNUnpYpMsJXYCERYBciJnsWBpcYEFjdcbq6dxj4SskGhs7uHuJ7Q"
, "2N6PDTueBHvXzW61B4oe5SW1D3v2Z3Vpbvw")
]
| 202
|
compatWitnessVectors =
[ ( btcTest
, "cNUnpYpMsJXYCERYBciJnsWBpcYEFjdcbq6dxj4SskGhs7uHuJ7Q"
, "2N6PDTueBHvXzW61B4oe5SW1D3v2Z3Vpbvw")
]
| 154
| false
| true
| 0
| 6
| 34
| 35
| 22
| 13
| null | null |
nikki-and-the-robots/nikki
|
src/Sorts/Nikki/Configuration.hs
|
lgpl-3.0
|
nikkiFeetFriction :: CpFloat = 1.65
| 35
|
nikkiFeetFriction :: CpFloat = 1.65
| 35
|
nikkiFeetFriction :: CpFloat = 1.65
| 35
| false
| false
| 0
| 5
| 4
| 11
| 5
| 6
| null | null |
cpettitt/haskell-ptree
|
Data/PTree.hs
|
mit
|
-- | /O(n)/ Map a function over all keys and values in the tree.
mapWithKey :: (Key -> a -> b) -> PTree a -> PTree b
mapWithKey _ Nil = Nil
| 139
|
mapWithKey :: (Key -> a -> b) -> PTree a -> PTree b
mapWithKey _ Nil = Nil
| 74
|
mapWithKey _ Nil = Nil
| 22
| true
| true
| 0
| 9
| 31
| 47
| 22
| 25
| null | null |
fmapfmapfmap/amazonka
|
amazonka-ec2/gen/Network/AWS/EC2/DetachInternetGateway.hs
|
mpl-2.0
|
-- | Checks whether you have the required permissions for the action, without
-- actually making the request, and provides an error response. If you have
-- the required permissions, the error response is 'DryRunOperation'.
-- Otherwise, it is 'UnauthorizedOperation'.
digDryRun :: Lens' DetachInternetGateway (Maybe Bool)
digDryRun = lens _digDryRun (\ s a -> s{_digDryRun = a})
| 379
|
digDryRun :: Lens' DetachInternetGateway (Maybe Bool)
digDryRun = lens _digDryRun (\ s a -> s{_digDryRun = a})
| 110
|
digDryRun = lens _digDryRun (\ s a -> s{_digDryRun = a})
| 56
| true
| true
| 1
| 9
| 56
| 55
| 28
| 27
| null | null |
shlevy/ghc
|
compiler/nativeGen/X86/Instr.hs
|
bsd-3-clause
|
i386_insert_ffrees
:: [GenBasicBlock Instr]
-> [GenBasicBlock Instr]
i386_insert_ffrees blocks
| any (any is_G_instr) [ instrs | BasicBlock _ instrs <- blocks ]
= map insertGFREEs blocks
| otherwise
= blocks
where
insertGFREEs (BasicBlock id insns)
= BasicBlock id (insertBeforeNonlocalTransfers GFREE insns)
| 346
|
i386_insert_ffrees
:: [GenBasicBlock Instr]
-> [GenBasicBlock Instr]
i386_insert_ffrees blocks
| any (any is_G_instr) [ instrs | BasicBlock _ instrs <- blocks ]
= map insertGFREEs blocks
| otherwise
= blocks
where
insertGFREEs (BasicBlock id insns)
= BasicBlock id (insertBeforeNonlocalTransfers GFREE insns)
| 345
|
i386_insert_ffrees blocks
| any (any is_G_instr) [ instrs | BasicBlock _ instrs <- blocks ]
= map insertGFREEs blocks
| otherwise
= blocks
where
insertGFREEs (BasicBlock id insns)
= BasicBlock id (insertBeforeNonlocalTransfers GFREE insns)
| 260
| false
| true
| 0
| 12
| 78
| 116
| 53
| 63
| null | null |
rahulmutt/ghcvm
|
compiler/Eta/HsSyn/HsExpr.hs
|
bsd-3-clause
|
pprStmtContext DoExpr = ptext (sLit "'do' block")
| 58
|
pprStmtContext DoExpr = ptext (sLit "'do' block")
| 58
|
pprStmtContext DoExpr = ptext (sLit "'do' block")
| 58
| false
| false
| 0
| 7
| 15
| 18
| 8
| 10
| null | null |
feliposz/learning-stuff
|
haskell/c9lectures-ch5.hs
|
mit
|
-- Exercise 3
scalarProduct :: Num a => [a] -> [a] -> a
scalarProduct _ [] = 0
| 79
|
scalarProduct :: Num a => [a] -> [a] -> a
scalarProduct _ [] = 0
| 64
|
scalarProduct _ [] = 0
| 22
| true
| true
| 0
| 8
| 18
| 40
| 21
| 19
| null | null |
saidie/key_chord_count
|
src/ChordHist.hs
|
mit
|
andTup2 _ = False
| 17
|
andTup2 _ = False
| 17
|
andTup2 _ = False
| 17
| false
| false
| 0
| 5
| 3
| 9
| 4
| 5
| null | null |
OS2World/DEV-UTIL-HUGS
|
libraries/Graphics/Rendering/OpenGL/GL/Colors.hs
|
bsd-3-clause
|
materialAmbientAndDiffuse :: Face -> StateVar (Color4 GLfloat)
materialAmbientAndDiffuse =
makeMaterialVar glGetMaterialfvc glMaterialfvc MaterialAmbientAndDiffuse
| 166
|
materialAmbientAndDiffuse :: Face -> StateVar (Color4 GLfloat)
materialAmbientAndDiffuse =
makeMaterialVar glGetMaterialfvc glMaterialfvc MaterialAmbientAndDiffuse
| 166
|
materialAmbientAndDiffuse =
makeMaterialVar glGetMaterialfvc glMaterialfvc MaterialAmbientAndDiffuse
| 103
| false
| true
| 0
| 8
| 15
| 31
| 15
| 16
| null | null |
jcollard/elm-package
|
src/Elm/Package/Description.hs
|
bsd-3-clause
|
-- READ
read :: (MonadIO m, MonadError String m) => FilePath -> m Description
read path =
do json <- liftIO (BS.readFile path)
case eitherDecode json of
Left err ->
throwError $ "Error reading file " ++ path ++ ":\n " ++ err
Right ds ->
return ds
-- WRITE
| 311
|
read :: (MonadIO m, MonadError String m) => FilePath -> m Description
read path =
do json <- liftIO (BS.readFile path)
case eitherDecode json of
Left err ->
throwError $ "Error reading file " ++ path ++ ":\n " ++ err
Right ds ->
return ds
-- WRITE
| 302
|
read path =
do json <- liftIO (BS.readFile path)
case eitherDecode json of
Left err ->
throwError $ "Error reading file " ++ path ++ ":\n " ++ err
Right ds ->
return ds
-- WRITE
| 232
| true
| true
| 0
| 13
| 105
| 105
| 50
| 55
| null | null |
ndmitchell/nsis
|
src/Development/NSIS/Sugar.hs
|
bsd-3-clause
|
emit2 :: (Val -> Val -> NSIS) -> Exp a -> Exp b -> Action ()
emit2 f x1 x2 = do Value x1 <- x1; Value x2 <- x2; emit $ f x1 x2
| 126
|
emit2 :: (Val -> Val -> NSIS) -> Exp a -> Exp b -> Action ()
emit2 f x1 x2 = do Value x1 <- x1; Value x2 <- x2; emit $ f x1 x2
| 126
|
emit2 f x1 x2 = do Value x1 <- x1; Value x2 <- x2; emit $ f x1 x2
| 65
| false
| true
| 0
| 10
| 34
| 91
| 41
| 50
| null | null |
kadircet/CENG
|
242/HW2.hs
|
gpl-3.0
|
showrest ((a, b):xs) = a++"=>"++(show b)++", "++(showrest xs)
| 61
|
showrest ((a, b):xs) = a++"=>"++(show b)++", "++(showrest xs)
| 61
|
showrest ((a, b):xs) = a++"=>"++(show b)++", "++(showrest xs)
| 61
| false
| false
| 0
| 9
| 7
| 50
| 26
| 24
| null | null |
chris-wood/flux
|
src/FluxParser.hs
|
mit
|
extern :: Parser Expr
extern = do
reserved "extern"
name <- identifier
args <- parens $ many variable
return $ Call name args
| 141
|
extern :: Parser Expr
extern = do
reserved "extern"
name <- identifier
args <- parens $ many variable
return $ Call name args
| 141
|
extern = do
reserved "extern"
name <- identifier
args <- parens $ many variable
return $ Call name args
| 119
| false
| true
| 0
| 9
| 38
| 53
| 23
| 30
| null | null |
bendycode/desktop-cleaner
|
src/Main.hs
|
mit
|
main :: IO ()
main = do
homeDir <- home
sh $ do
files <- ls $ homeDir </> "Desktop"
liftIO $ moveFile files
| 119
|
main :: IO ()
main = do
homeDir <- home
sh $ do
files <- ls $ homeDir </> "Desktop"
liftIO $ moveFile files
| 119
|
main = do
homeDir <- home
sh $ do
files <- ls $ homeDir </> "Desktop"
liftIO $ moveFile files
| 105
| false
| true
| 0
| 12
| 35
| 55
| 25
| 30
| null | null |
QuickChick/Luck
|
luck/src/Common/Conversions.hs
|
mit
|
sizedPpADT :: Maybe Int -> Map I.ConId O.ConId -> I.Exp -> (Maybe Int, Doc)
sizedPpADT size cenv (I.Lit n) = (size, PP.int n)
| 125
|
sizedPpADT :: Maybe Int -> Map I.ConId O.ConId -> I.Exp -> (Maybe Int, Doc)
sizedPpADT size cenv (I.Lit n) = (size, PP.int n)
| 125
|
sizedPpADT size cenv (I.Lit n) = (size, PP.int n)
| 49
| false
| true
| 0
| 9
| 22
| 72
| 36
| 36
| null | null |
iamkingmaker/HLearn
|
src/HLearn/Data/Graph.hs
|
bsd-3-clause
|
h2 = edgeList2UndirectedGraph 3 $ [(0,0),(0,1),(0,2)]
| 53
|
h2 = edgeList2UndirectedGraph 3 $ [(0,0),(0,1),(0,2)]
| 53
|
h2 = edgeList2UndirectedGraph 3 $ [(0,0),(0,1),(0,2)]
| 53
| false
| false
| 1
| 8
| 5
| 44
| 24
| 20
| null | null |
enolan/Idris-dev
|
src/IRTS/CodegenC.hs
|
bsd-3-clause
|
doOp v (LIntStr (ITFixed _)) [x] = v ++ "idris_castBitsStr(vm, " ++ creg x ++ ")"
| 81
|
doOp v (LIntStr (ITFixed _)) [x] = v ++ "idris_castBitsStr(vm, " ++ creg x ++ ")"
| 81
|
doOp v (LIntStr (ITFixed _)) [x] = v ++ "idris_castBitsStr(vm, " ++ creg x ++ ")"
| 81
| false
| false
| 1
| 12
| 15
| 48
| 21
| 27
| null | null |
sapek/pandoc
|
src/Text/Pandoc/Writers/LaTeX.hs
|
gpl-2.0
|
inlineToLaTeX (Code (_,classes,_) str) = do
opts <- gets stOptions
case () of
_ | writerListings opts -> listingsCode
| writerHighlight opts && not (null classes) -> highlightCode
| otherwise -> rawCode
where listingsCode = do
inNote <- gets stInNote
when inNote $ modify $ \s -> s{ stVerbInNote = True }
let chr = case "!\"&'()*,-./:;?@_" \\ str of
(c:_) -> c
[] -> '!'
return $ text $ "\\lstinline" ++ [chr] ++ str ++ [chr]
highlightCode = do
case highlight formatLaTeXInline ("",classes,[]) str of
Nothing -> rawCode
Just h -> modify (\st -> st{ stHighlighting = True }) >>
return (text h)
rawCode = liftM (text . (\s -> "\\texttt{" ++ escapeSpaces s ++ "}"))
$ stringToLaTeX CodeString str
where
escapeSpaces = concatMap (\c -> if c == ' ' then "\\ " else [c])
| 1,093
|
inlineToLaTeX (Code (_,classes,_) str) = do
opts <- gets stOptions
case () of
_ | writerListings opts -> listingsCode
| writerHighlight opts && not (null classes) -> highlightCode
| otherwise -> rawCode
where listingsCode = do
inNote <- gets stInNote
when inNote $ modify $ \s -> s{ stVerbInNote = True }
let chr = case "!\"&'()*,-./:;?@_" \\ str of
(c:_) -> c
[] -> '!'
return $ text $ "\\lstinline" ++ [chr] ++ str ++ [chr]
highlightCode = do
case highlight formatLaTeXInline ("",classes,[]) str of
Nothing -> rawCode
Just h -> modify (\st -> st{ stHighlighting = True }) >>
return (text h)
rawCode = liftM (text . (\s -> "\\texttt{" ++ escapeSpaces s ++ "}"))
$ stringToLaTeX CodeString str
where
escapeSpaces = concatMap (\c -> if c == ' ' then "\\ " else [c])
| 1,093
|
inlineToLaTeX (Code (_,classes,_) str) = do
opts <- gets stOptions
case () of
_ | writerListings opts -> listingsCode
| writerHighlight opts && not (null classes) -> highlightCode
| otherwise -> rawCode
where listingsCode = do
inNote <- gets stInNote
when inNote $ modify $ \s -> s{ stVerbInNote = True }
let chr = case "!\"&'()*,-./:;?@_" \\ str of
(c:_) -> c
[] -> '!'
return $ text $ "\\lstinline" ++ [chr] ++ str ++ [chr]
highlightCode = do
case highlight formatLaTeXInline ("",classes,[]) str of
Nothing -> rawCode
Just h -> modify (\st -> st{ stHighlighting = True }) >>
return (text h)
rawCode = liftM (text . (\s -> "\\texttt{" ++ escapeSpaces s ++ "}"))
$ stringToLaTeX CodeString str
where
escapeSpaces = concatMap (\c -> if c == ' ' then "\\ " else [c])
| 1,093
| false
| false
| 0
| 16
| 465
| 359
| 180
| 179
| null | null |
tolysz/prepare-ghcjs
|
spec-lts8/aeson/Data/Aeson/Types/FromJSON.hs
|
bsd-3-clause
|
-------------------------------------------------------------------------------
-- List functions
-------------------------------------------------------------------------------
-- | Helper function to use with 'liftParseJSON'. See 'Data.Aeson.ToJSON.listEncoding'.
listParser :: (Value -> Parser a) -> Value -> Parser [a]
listParser f (Array xs) = fmap V.toList (V.mapM f xs)
| 377
|
listParser :: (Value -> Parser a) -> Value -> Parser [a]
listParser f (Array xs) = fmap V.toList (V.mapM f xs)
| 110
|
listParser f (Array xs) = fmap V.toList (V.mapM f xs)
| 53
| true
| true
| 0
| 8
| 36
| 67
| 35
| 32
| null | null |
meiersi/scyther-proof
|
src/Scyther/Theory/Dot.hs
|
gpl-3.0
|
-- | Produce the dot code of a formula without disjunctions.
dotFormula :: Formula -> MyDot ()
dotFormula (FAtom atom) = dotAtom atom
| 133
|
dotFormula :: Formula -> MyDot ()
dotFormula (FAtom atom) = dotAtom atom
| 72
|
dotFormula (FAtom atom) = dotAtom atom
| 38
| true
| true
| 0
| 9
| 22
| 38
| 17
| 21
| null | null |
Haskell-Praxis/hakyll-cms
|
api-server/src/Hakyll/CMS/Server.hs
|
bsd-2-clause
|
apiHandler :: TVar PostList -> Server API
apiHandler tvar = listPosts tvar :<|> createPost tvar :<|> postServer tvar
| 116
|
apiHandler :: TVar PostList -> Server API
apiHandler tvar = listPosts tvar :<|> createPost tvar :<|> postServer tvar
| 116
|
apiHandler tvar = listPosts tvar :<|> createPost tvar :<|> postServer tvar
| 74
| false
| true
| 0
| 7
| 17
| 41
| 18
| 23
| null | null |
cpennington/h4sh
|
Build.hs
|
gpl-2.0
|
doApp :: String -> Type -> Doc
doApp n (_ `To` (_ `To` _)) = text n <+> char 'a'
| 81
|
doApp :: String -> Type -> Doc
doApp n (_ `To` (_ `To` _)) = text n <+> char 'a'
| 81
|
doApp n (_ `To` (_ `To` _)) = text n <+> char 'a'
| 50
| false
| true
| 0
| 9
| 20
| 52
| 28
| 24
| null | null |
erikd/persistent
|
persistent/Database/Persist/Types/Base.hs
|
mit
|
fromPersistValueText :: PersistValue -> Either Text Text
fromPersistValueText (PersistText s) = Right s
| 103
|
fromPersistValueText :: PersistValue -> Either Text Text
fromPersistValueText (PersistText s) = Right s
| 103
|
fromPersistValueText (PersistText s) = Right s
| 46
| false
| true
| 0
| 7
| 12
| 32
| 15
| 17
| null | null |
ezyang/ghc
|
compiler/basicTypes/IdInfo.hs
|
bsd-3-clause
|
mayHaveCafRefs :: CafInfo -> Bool
mayHaveCafRefs MayHaveCafRefs = True
| 71
|
mayHaveCafRefs :: CafInfo -> Bool
mayHaveCafRefs MayHaveCafRefs = True
| 71
|
mayHaveCafRefs MayHaveCafRefs = True
| 37
| false
| true
| 0
| 5
| 9
| 22
| 10
| 12
| null | null |
idupree/haskell-time-steward
|
InefficientFlatTimeSteward.hs
|
gpl-3.0
|
-- this is the inefficient time steward so we don't need
-- to store which things were accessed by predictors
valueRetriever :: forall f. (FieldType f) => InefficientFlatTimeStewardInstance -> EntityId -> Identity f
valueRetriever iftsi entityId = Identity $ getEntityField entityId (iftsiEntityFieldStates iftsi)
| 313
|
valueRetriever :: forall f. (FieldType f) => InefficientFlatTimeStewardInstance -> EntityId -> Identity f
valueRetriever iftsi entityId = Identity $ getEntityField entityId (iftsiEntityFieldStates iftsi)
| 203
|
valueRetriever iftsi entityId = Identity $ getEntityField entityId (iftsiEntityFieldStates iftsi)
| 97
| true
| true
| 0
| 9
| 42
| 58
| 30
| 28
| null | null |
nfjinjing/bamboo-theme-mini-html5
|
src/Bamboo/Theme/MiniHTML5/Control/Post.hs
|
gpl-3.0
|
list :: R
list s = page s - do
s.posts.mapM_ (entry s)
nav (s.pager) - s.env.slashed_script_name
| 100
|
list :: R
list s = page s - do
s.posts.mapM_ (entry s)
nav (s.pager) - s.env.slashed_script_name
| 100
|
list s = page s - do
s.posts.mapM_ (entry s)
nav (s.pager) - s.env.slashed_script_name
| 90
| false
| true
| 0
| 11
| 20
| 63
| 27
| 36
| null | null |
sdiehl/ghc
|
compiler/utils/Dominators.hs
|
bsd-3-clause
|
-----------------------------------------------------------------------------
-- | /Post-dominated depth-first search/.
pddfs :: Rooted -> [Node]
pddfs = reverse . rpddfs
| 175
|
pddfs :: Rooted -> [Node]
pddfs = reverse . rpddfs
| 50
|
pddfs = reverse . rpddfs
| 24
| true
| true
| 1
| 8
| 20
| 32
| 15
| 17
| null | null |
TOSPIO/yi
|
src/library/Yi/Keymap/Completion.hs
|
gpl-2.0
|
complete :: Eq a => CompletionTree a -> [a] -> ([a],CompletionTree a)
complete tree [] = ([],tree)
| 101
|
complete :: Eq a => CompletionTree a -> [a] -> ([a],CompletionTree a)
complete tree [] = ([],tree)
| 101
|
complete tree [] = ([],tree)
| 31
| false
| true
| 0
| 9
| 19
| 59
| 31
| 28
| null | null |
zepto-lang/zepto
|
src/Zepto/Types/Export.hs
|
gpl-2.0
|
isPrefixOfBVec = B.isPrefixOf
| 29
|
isPrefixOfBVec = B.isPrefixOf
| 29
|
isPrefixOfBVec = B.isPrefixOf
| 29
| false
| false
| 0
| 5
| 2
| 8
| 4
| 4
| null | null |
ozataman/ua-parser-standalone
|
src/Web/UAParser/Core.hs
|
bsd-3-clause
|
-------------------------------------------------------------------------------
test :: [ByteString]
test =
["SonyEricssonK750i/R1L Browser/SEMC-Browser/4.2 Profile/MIDP-2.0 Configuration/CLDC-1.1"
, "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-GB; rv:1.8.1.18) Gecko/20081029 Firefox/2.0.0.18"
, "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_5; en-us) AppleWebKit/525.26.2 (KHTML, like Gecko) Version/3.2 Safari/525.26.12'"
, "Mozilla/4.0 (compatible; MSIE 6.0; Windows XP 5.1) Lobo/0.98.4"
, "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; )'"
, "Opera/9.80 (Windows NT 5.1; U; cs) Presto/2.2.15 Version/10.00'"
, "boxee (alpha/Darwin 8.7.1 i386 - 0.9.11.5591)'"
, "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; CSM-NEWUSER; GTB6; byond_4.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 1.1.4322; .NET CLR 3.0.04506.648; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; InfoPath.1)'"
, "Mozilla/5.0 (compatible; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp)'"
]
| 1,026
|
test :: [ByteString]
test =
["SonyEricssonK750i/R1L Browser/SEMC-Browser/4.2 Profile/MIDP-2.0 Configuration/CLDC-1.1"
, "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-GB; rv:1.8.1.18) Gecko/20081029 Firefox/2.0.0.18"
, "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_5; en-us) AppleWebKit/525.26.2 (KHTML, like Gecko) Version/3.2 Safari/525.26.12'"
, "Mozilla/4.0 (compatible; MSIE 6.0; Windows XP 5.1) Lobo/0.98.4"
, "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; )'"
, "Opera/9.80 (Windows NT 5.1; U; cs) Presto/2.2.15 Version/10.00'"
, "boxee (alpha/Darwin 8.7.1 i386 - 0.9.11.5591)'"
, "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; CSM-NEWUSER; GTB6; byond_4.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 1.1.4322; .NET CLR 3.0.04506.648; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; InfoPath.1)'"
, "Mozilla/5.0 (compatible; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp)'"
]
| 943
|
test =
["SonyEricssonK750i/R1L Browser/SEMC-Browser/4.2 Profile/MIDP-2.0 Configuration/CLDC-1.1"
, "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-GB; rv:1.8.1.18) Gecko/20081029 Firefox/2.0.0.18"
, "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_5; en-us) AppleWebKit/525.26.2 (KHTML, like Gecko) Version/3.2 Safari/525.26.12'"
, "Mozilla/4.0 (compatible; MSIE 6.0; Windows XP 5.1) Lobo/0.98.4"
, "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; )'"
, "Opera/9.80 (Windows NT 5.1; U; cs) Presto/2.2.15 Version/10.00'"
, "boxee (alpha/Darwin 8.7.1 i386 - 0.9.11.5591)'"
, "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; CSM-NEWUSER; GTB6; byond_4.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 1.1.4322; .NET CLR 3.0.04506.648; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; InfoPath.1)'"
, "Mozilla/5.0 (compatible; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp)'"
]
| 922
| true
| true
| 0
| 7
| 132
| 49
| 28
| 21
| null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.