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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
brendanhay/gogol | gogol-proximitybeacon/gen/Network/Google/Resource/ProximityBeacon/Beacons/Get.hs | mpl-2.0 | -- | The project id of the beacon to request. If the project id is not
-- specified then the project making the request is used. The project id
-- must match the project that owns the beacon. Optional.
bgProjectId :: Lens' BeaconsGet (Maybe Text)
bgProjectId
= lens _bgProjectId (\ s a -> s{_bgProjectId = a}) | 311 | bgProjectId :: Lens' BeaconsGet (Maybe Text)
bgProjectId
= lens _bgProjectId (\ s a -> s{_bgProjectId = a}) | 109 | bgProjectId
= lens _bgProjectId (\ s a -> s{_bgProjectId = a}) | 64 | true | true | 1 | 9 | 57 | 54 | 27 | 27 | null | null |
thomasathorne/h-chu | src/NameGenerator.hs | bsd-3-clause | replace :: (Eq a) => [a] -> ([a],[a]) -> [a]
replace [] _ = [] | 62 | replace :: (Eq a) => [a] -> ([a],[a]) -> [a]
replace [] _ = [] | 62 | replace [] _ = [] | 17 | false | true | 0 | 9 | 14 | 55 | 31 | 24 | null | null |
jrraymond/ray-tracer | src/BenchmarkScene.hs | gpl-3.0 | t2c :: Vec3
t2c = Vec3 0 3 0 | 28 | t2c :: Vec3
t2c = Vec3 0 3 0 | 28 | t2c = Vec3 0 3 0 | 16 | false | true | 0 | 6 | 8 | 27 | 10 | 17 | null | null |
bennofs/cabal | Cabal/Distribution/PackageDescription/Check.hs | bsd-3-clause | check :: Bool -> PackageCheck -> Maybe PackageCheck
check False _ = Nothing | 76 | check :: Bool -> PackageCheck -> Maybe PackageCheck
check False _ = Nothing | 76 | check False _ = Nothing | 24 | false | true | 0 | 7 | 13 | 27 | 13 | 14 | null | null |
DavidAlphaFox/ghc | compiler/basicTypes/Name.hs | bsd-3-clause | getSrcSpan = nameSrcSpan . getName | 52 | getSrcSpan = nameSrcSpan . getName | 52 | getSrcSpan = nameSrcSpan . getName | 52 | false | false | 0 | 5 | 22 | 10 | 5 | 5 | null | null |
ssonal/haskell-experiments | chapter7.hs | mit | treeInsert :: (Ord a) => a -> Tree a -> Tree a
treeInsert x EmptyTree = singleton x | 96 | treeInsert :: (Ord a) => a -> Tree a -> Tree a
treeInsert x EmptyTree = singleton x | 96 | treeInsert x EmptyTree = singleton x | 49 | false | true | 0 | 8 | 30 | 47 | 21 | 26 | null | null |
dmbarbour/vcache-trie | hsrc_lib/Data/VCache/Trie.hs | bsd-2-clause | -- | Construct Trie with one element.
singleton :: (VCacheable a) => VSpace -> ByteString -> a -> Trie a
singleton vc k a = Trie (Just $! vref vc (singletonNode k a)) vc | 169 | singleton :: (VCacheable a) => VSpace -> ByteString -> a -> Trie a
singleton vc k a = Trie (Just $! vref vc (singletonNode k a)) vc | 131 | singleton vc k a = Trie (Just $! vref vc (singletonNode k a)) vc | 64 | true | true | 0 | 10 | 33 | 73 | 35 | 38 | null | null |
trass/trass-config | src/Trass/Config/Util.hs | bsd-3-clause | lastOf :: a -> a -> (a -> Maybe b) -> Maybe b
lastOf x y f = f y <|> f x | 72 | lastOf :: a -> a -> (a -> Maybe b) -> Maybe b
lastOf x y f = f y <|> f x | 72 | lastOf x y f = f y <|> f x | 26 | false | true | 3 | 11 | 22 | 60 | 28 | 32 | null | null |
tibbe/event | src/System/Event/PSQ.hs | bsd-2-clause | -- | /O(n)/ Convert to an ascending list.
toAscList :: PSQ a -> [Elem a]
toAscList q = seqToList (toAscLists q) | 112 | toAscList :: PSQ a -> [Elem a]
toAscList q = seqToList (toAscLists q) | 70 | toAscList q = seqToList (toAscLists q) | 39 | true | true | 0 | 9 | 21 | 42 | 19 | 23 | null | null |
conal/lambda-ccc | src/LambdaCCC/Lambda.hs | bsd-3-clause | evalE :: (HasOpInfo p, Show' p, EvalableP p, Eq1' p, PrimBasics p) =>
E p a -> a
evalE e = trace ("evalE: " ++ show e) $
eval' e [] | 151 | evalE :: (HasOpInfo p, Show' p, EvalableP p, Eq1' p, PrimBasics p) =>
E p a -> a
evalE e = trace ("evalE: " ++ show e) $
eval' e [] | 151 | evalE e = trace ("evalE: " ++ show e) $
eval' e [] | 60 | false | true | 0 | 8 | 50 | 87 | 40 | 47 | null | null |
shnarazk/gradcondtools | LectTypes.hs | gpl-3.0 | toPoint "失" = Lost | 18 | toPoint "失" = Lost | 18 | toPoint "失" = Lost | 18 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
shlevy/ghc | testsuite/tests/programs/andy_cherry/Interp.hs | bsd-3-clause | failP a = \s -> error a | 23 | failP a = \s -> error a | 23 | failP a = \s -> error a | 23 | false | false | 0 | 6 | 6 | 17 | 8 | 9 | null | null |
printedheart/Dao | src/Dao/Lens.hs | agpl-3.0 | -- | Similar to 'fetch', but performs the update purely, without Monadic side-effects.
pureUpdate :: PureLens c e -> e -> c -> c
pureUpdate lens o = runIdentity . update lens o | 176 | pureUpdate :: PureLens c e -> e -> c -> c
pureUpdate lens o = runIdentity . update lens o | 89 | pureUpdate lens o = runIdentity . update lens o | 47 | true | true | 0 | 7 | 32 | 43 | 21 | 22 | null | null |
FranklinChen/blaze-markup | src/Text/Blaze/Internal.hs | bsd-3-clause | contents _ = Empty | 43 | contents _ = Empty | 43 | contents _ = Empty | 43 | false | false | 0 | 5 | 28 | 9 | 4 | 5 | null | null |
capsjac/linear-vect | Linear/Class.hs | bsd-3-clause | -- | the angle between two unit vectors
angle' {- ' CPP is sensitive to primes -} :: (Floating a, Vector a v, UnitVector a v u, DotProd a v) => u a -> u a -> a
angle' x y = acos (fromNormal x &. fromNormal y) | 208 | angle' {- ' CPP is sensitive to primes -} :: (Floating a, Vector a v, UnitVector a v u, DotProd a v) => u a -> u a -> a
angle' x y = acos (fromNormal x &. fromNormal y) | 168 | angle' x y = acos (fromNormal x &. fromNormal y) | 48 | true | true | 0 | 8 | 47 | 83 | 41 | 42 | null | null |
sktt/dotfiles | xmonad/xmonad.symlink/xmonad.hs | mit | red = "#dc322f" | 19 | red = "#dc322f" | 19 | red = "#dc322f" | 19 | false | false | 1 | 5 | 6 | 10 | 3 | 7 | null | null |
AlexanderPankiv/ghc | compiler/typecheck/TcPatSyn.hs | bsd-3-clause | tcPatToExpr :: [Located Name] -> LPat Name -> Maybe (LHsExpr Name)
tcPatToExpr args = go
where
lhsVars = mkNameSet (map unLoc args)
go :: LPat Name -> Maybe (LHsExpr Name)
go (L loc (ConPatIn (L _ con) info))
= do { exprs <- mapM go (hsConPatArgs info)
; return $ L loc $
foldl (\x y -> HsApp (L loc x) y) (HsVar con) exprs }
go (L _ (SigPatIn pat _)) = go pat
-- See Note [Type signatures and the builder expression]
go (L loc p) = fmap (L loc) $ go1 p
go1 :: Pat Name -> Maybe (HsExpr Name)
go1 (VarPat var)
| var `elemNameSet` lhsVars = return $ HsVar var
| otherwise = Nothing
go1 (LazyPat pat) = fmap HsPar $ go pat
go1 (ParPat pat) = fmap HsPar $ go pat
go1 (BangPat pat) = fmap HsPar $ go pat
go1 (PArrPat pats ptt) = do { exprs <- mapM go pats
; return $ ExplicitPArr ptt exprs }
go1 (ListPat pats ptt reb) = do { exprs <- mapM go pats
; return $ ExplicitList ptt (fmap snd reb) exprs }
go1 (TuplePat pats box _) = do { exprs <- mapM go pats
; return $ ExplicitTuple
(map (noLoc . Present) exprs) box }
go1 (LitPat lit) = return $ HsLit lit
go1 (NPat (L _ n) Nothing _) = return $ HsOverLit n
go1 (NPat (L _ n) (Just neg) _) = return $ noLoc neg `HsApp` noLoc (HsOverLit n)
go1 (ConPatOut{}) = panic "ConPatOut in output of renamer"
go1 (SigPatOut{}) = panic "SigPatOut in output of renamer"
go1 (CoPat{}) = panic "CoPat in output of renamer"
go1 _ = Nothing
-- Walk the whole pattern and for all ConPatOuts, collect the
-- existentially-bound type variables and evidence binding variables.
--
-- These are used in computing the type of a pattern synonym and also
-- in generating matcher functions, since success continuations need
-- to be passed these pattern-bound evidences. | 2,206 | tcPatToExpr :: [Located Name] -> LPat Name -> Maybe (LHsExpr Name)
tcPatToExpr args = go
where
lhsVars = mkNameSet (map unLoc args)
go :: LPat Name -> Maybe (LHsExpr Name)
go (L loc (ConPatIn (L _ con) info))
= do { exprs <- mapM go (hsConPatArgs info)
; return $ L loc $
foldl (\x y -> HsApp (L loc x) y) (HsVar con) exprs }
go (L _ (SigPatIn pat _)) = go pat
-- See Note [Type signatures and the builder expression]
go (L loc p) = fmap (L loc) $ go1 p
go1 :: Pat Name -> Maybe (HsExpr Name)
go1 (VarPat var)
| var `elemNameSet` lhsVars = return $ HsVar var
| otherwise = Nothing
go1 (LazyPat pat) = fmap HsPar $ go pat
go1 (ParPat pat) = fmap HsPar $ go pat
go1 (BangPat pat) = fmap HsPar $ go pat
go1 (PArrPat pats ptt) = do { exprs <- mapM go pats
; return $ ExplicitPArr ptt exprs }
go1 (ListPat pats ptt reb) = do { exprs <- mapM go pats
; return $ ExplicitList ptt (fmap snd reb) exprs }
go1 (TuplePat pats box _) = do { exprs <- mapM go pats
; return $ ExplicitTuple
(map (noLoc . Present) exprs) box }
go1 (LitPat lit) = return $ HsLit lit
go1 (NPat (L _ n) Nothing _) = return $ HsOverLit n
go1 (NPat (L _ n) (Just neg) _) = return $ noLoc neg `HsApp` noLoc (HsOverLit n)
go1 (ConPatOut{}) = panic "ConPatOut in output of renamer"
go1 (SigPatOut{}) = panic "SigPatOut in output of renamer"
go1 (CoPat{}) = panic "CoPat in output of renamer"
go1 _ = Nothing
-- Walk the whole pattern and for all ConPatOuts, collect the
-- existentially-bound type variables and evidence binding variables.
--
-- These are used in computing the type of a pattern synonym and also
-- in generating matcher functions, since success continuations need
-- to be passed these pattern-bound evidences. | 2,206 | tcPatToExpr args = go
where
lhsVars = mkNameSet (map unLoc args)
go :: LPat Name -> Maybe (LHsExpr Name)
go (L loc (ConPatIn (L _ con) info))
= do { exprs <- mapM go (hsConPatArgs info)
; return $ L loc $
foldl (\x y -> HsApp (L loc x) y) (HsVar con) exprs }
go (L _ (SigPatIn pat _)) = go pat
-- See Note [Type signatures and the builder expression]
go (L loc p) = fmap (L loc) $ go1 p
go1 :: Pat Name -> Maybe (HsExpr Name)
go1 (VarPat var)
| var `elemNameSet` lhsVars = return $ HsVar var
| otherwise = Nothing
go1 (LazyPat pat) = fmap HsPar $ go pat
go1 (ParPat pat) = fmap HsPar $ go pat
go1 (BangPat pat) = fmap HsPar $ go pat
go1 (PArrPat pats ptt) = do { exprs <- mapM go pats
; return $ ExplicitPArr ptt exprs }
go1 (ListPat pats ptt reb) = do { exprs <- mapM go pats
; return $ ExplicitList ptt (fmap snd reb) exprs }
go1 (TuplePat pats box _) = do { exprs <- mapM go pats
; return $ ExplicitTuple
(map (noLoc . Present) exprs) box }
go1 (LitPat lit) = return $ HsLit lit
go1 (NPat (L _ n) Nothing _) = return $ HsOverLit n
go1 (NPat (L _ n) (Just neg) _) = return $ noLoc neg `HsApp` noLoc (HsOverLit n)
go1 (ConPatOut{}) = panic "ConPatOut in output of renamer"
go1 (SigPatOut{}) = panic "SigPatOut in output of renamer"
go1 (CoPat{}) = panic "CoPat in output of renamer"
go1 _ = Nothing
-- Walk the whole pattern and for all ConPatOuts, collect the
-- existentially-bound type variables and evidence binding variables.
--
-- These are used in computing the type of a pattern synonym and also
-- in generating matcher functions, since success continuations need
-- to be passed these pattern-bound evidences. | 2,139 | false | true | 1 | 13 | 848 | 720 | 351 | 369 | null | null |
thelostt/climbu | src/Expressions.hs | mit | -- All identifiers
identifiers
= (['a'..'z'] ++ ['A'..'Z'] ++ ['_'] ++ digits) \\ ['.'] | 89 | identifiers
= (['a'..'z'] ++ ['A'..'Z'] ++ ['_'] ++ digits) \\ ['.'] | 70 | identifiers
= (['a'..'z'] ++ ['A'..'Z'] ++ ['_'] ++ digits) \\ ['.'] | 70 | true | false | 1 | 10 | 15 | 46 | 24 | 22 | null | null |
rueshyna/gogol | gogol-sheets/gen/Network/Google/Sheets/Types/Product.hs | mpl-2.0 | -- | Metadata about the requested columns in the grid, starting with the
-- column in start_column.
gdColumnMetadata :: Lens' GridData [DimensionProperties]
gdColumnMetadata
= lens _gdColumnMetadata
(\ s a -> s{_gdColumnMetadata = a})
. _Default
. _Coerce | 275 | gdColumnMetadata :: Lens' GridData [DimensionProperties]
gdColumnMetadata
= lens _gdColumnMetadata
(\ s a -> s{_gdColumnMetadata = a})
. _Default
. _Coerce | 175 | gdColumnMetadata
= lens _gdColumnMetadata
(\ s a -> s{_gdColumnMetadata = a})
. _Default
. _Coerce | 118 | true | true | 2 | 8 | 56 | 58 | 29 | 29 | null | null |
dysinger/amazonka | amazonka-codedeploy/gen/Network/AWS/CodeDeploy/RegisterApplicationRevision.hs | mpl-2.0 | -- | 'RegisterApplicationRevision' constructor.
--
-- The fields accessible through corresponding lenses are:
--
-- * 'rarApplicationName' @::@ 'Text'
--
-- * 'rarDescription' @::@ 'Maybe' 'Text'
--
-- * 'rarRevision' @::@ 'RevisionLocation'
--
registerApplicationRevision :: Text -- ^ 'rarApplicationName'
-> RevisionLocation -- ^ 'rarRevision'
-> RegisterApplicationRevision
registerApplicationRevision p1 p2 = RegisterApplicationRevision
{ _rarApplicationName = p1
, _rarRevision = p2
, _rarDescription = Nothing
} | 600 | registerApplicationRevision :: Text -- ^ 'rarApplicationName'
-> RevisionLocation -- ^ 'rarRevision'
-> RegisterApplicationRevision
registerApplicationRevision p1 p2 = RegisterApplicationRevision
{ _rarApplicationName = p1
, _rarRevision = p2
, _rarDescription = Nothing
} | 355 | registerApplicationRevision p1 p2 = RegisterApplicationRevision
{ _rarApplicationName = p1
, _rarRevision = p2
, _rarDescription = Nothing
} | 167 | true | true | 0 | 7 | 146 | 60 | 38 | 22 | null | null |
tolysz/prepare-ghcjs | spec-lts8/base/GHC/List.hs | bsd-3-clause | zipWithFB :: (a -> b -> c) -> (d -> e -> a) -> d -> e -> b -> c
zipWithFB c f = \x y r -> (x `f` y) `c` r | 105 | zipWithFB :: (a -> b -> c) -> (d -> e -> a) -> d -> e -> b -> c
zipWithFB c f = \x y r -> (x `f` y) `c` r | 105 | zipWithFB c f = \x y r -> (x `f` y) `c` r | 41 | false | true | 0 | 11 | 33 | 88 | 46 | 42 | null | null |
snowleopard/alga | src/Algebra/Graph.hs | mit | -- Like 'edgeList' but specialised for graphs with vertices of type 'Int'.
edgeIntListR :: Graph Int -> [(Int, Int)]
edgeIntListR = AIM.edgeList . toAdjacencyIntMap | 164 | edgeIntListR :: Graph Int -> [(Int, Int)]
edgeIntListR = AIM.edgeList . toAdjacencyIntMap | 89 | edgeIntListR = AIM.edgeList . toAdjacencyIntMap | 47 | true | true | 0 | 7 | 23 | 34 | 19 | 15 | null | null |
QuickChick/Luck | luck/src/Core/Semantics.hs | mit | forceBinops k (Binop e1 op e2) = Lit $ (getOp op) (extractInt undefined e1 k) (extractInt undefined e2 k) | 105 | forceBinops k (Binop e1 op e2) = Lit $ (getOp op) (extractInt undefined e1 k) (extractInt undefined e2 k) | 105 | forceBinops k (Binop e1 op e2) = Lit $ (getOp op) (extractInt undefined e1 k) (extractInt undefined e2 k) | 105 | false | false | 0 | 8 | 18 | 56 | 27 | 29 | null | null |
avh4/elm-format | elm-format-markdown/Cheapskate/ParserCombinators.hs | bsd-3-clause | skipMany1 :: Alternative f => f a -> f ()
skipMany1 p = p *> skipMany p | 71 | skipMany1 :: Alternative f => f a -> f ()
skipMany1 p = p *> skipMany p | 71 | skipMany1 p = p *> skipMany p | 29 | false | true | 0 | 8 | 16 | 40 | 18 | 22 | null | null |
joranvar/GoogleCodeJam | Y2010/Q/ATest.hs | gpl-3.0 | test_parse :: IO ()
test_parse = assertEqual (Problem 1 0)
$ head $ parse
["1 0"] | 107 | test_parse :: IO ()
test_parse = assertEqual (Problem 1 0)
$ head $ parse
["1 0"] | 107 | test_parse = assertEqual (Problem 1 0)
$ head $ parse
["1 0"] | 87 | false | true | 4 | 7 | 41 | 48 | 21 | 27 | null | null |
Qu4tro/CP | CP.hs | mit | ons = uncurry (:)
| 18 | cons = uncurry (:) | 18 | cons = uncurry (:) | 18 | false | false | 1 | 4 | 4 | 14 | 6 | 8 | null | null |
tel/saltine | src/Crypto/Saltine/Core/Password.hs | mit | maxOpslimit Argon2i13 = Opslimit $ fromIntegral Bytes.pwhash_argon2i_opslimit_max | 88 | maxOpslimit Argon2i13 = Opslimit $ fromIntegral Bytes.pwhash_argon2i_opslimit_max | 88 | maxOpslimit Argon2i13 = Opslimit $ fromIntegral Bytes.pwhash_argon2i_opslimit_max | 88 | false | false | 0 | 7 | 13 | 18 | 8 | 10 | null | null |
riwsky/wiwinwlh | src/bottoms.hs | mit | [] !! _ = error "Prelude.!!: index too large" | 58 | [] !! _ = error "Prelude.!!: index too large" | 58 | [] !! _ = error "Prelude.!!: index too large" | 58 | false | false | 2 | 5 | 21 | 18 | 7 | 11 | null | null |
aisamanra/matterhorn | test/test_messages.hs | bsd-3-clause | moveDownTestMultipleSkipDeletedAll :: TestTree
moveDownTestMultipleSkipDeletedAll =
testProperty "Move one down in multiple deleted messages skipping deleteds" $
\(w', x', y', z') ->
-- n.b. current selected is also deleted,
-- which can happen due to multi-user async
-- server changes.
let [w, x, y, z] = setDateOrderMessages
[ delMsg w'
, delMsg x'
, delMsg y'
, delMsg z']
msgs = makeMsgs [w, x, y, z]
msgid = getNextPostId (messagePostId w) msgs
-- for useful info on failure:
idents = postids "wxyz" msgs
info = idents <> " against " <> show msgid
in counterexample info $ Nothing == msgid | 1,066 | moveDownTestMultipleSkipDeletedAll :: TestTree
moveDownTestMultipleSkipDeletedAll =
testProperty "Move one down in multiple deleted messages skipping deleteds" $
\(w', x', y', z') ->
-- n.b. current selected is also deleted,
-- which can happen due to multi-user async
-- server changes.
let [w, x, y, z] = setDateOrderMessages
[ delMsg w'
, delMsg x'
, delMsg y'
, delMsg z']
msgs = makeMsgs [w, x, y, z]
msgid = getNextPostId (messagePostId w) msgs
-- for useful info on failure:
idents = postids "wxyz" msgs
info = idents <> " against " <> show msgid
in counterexample info $ Nothing == msgid | 1,066 | moveDownTestMultipleSkipDeletedAll =
testProperty "Move one down in multiple deleted messages skipping deleteds" $
\(w', x', y', z') ->
-- n.b. current selected is also deleted,
-- which can happen due to multi-user async
-- server changes.
let [w, x, y, z] = setDateOrderMessages
[ delMsg w'
, delMsg x'
, delMsg y'
, delMsg z']
msgs = makeMsgs [w, x, y, z]
msgid = getNextPostId (messagePostId w) msgs
-- for useful info on failure:
idents = postids "wxyz" msgs
info = idents <> " against " <> show msgid
in counterexample info $ Nothing == msgid | 1,019 | false | true | 0 | 13 | 569 | 163 | 88 | 75 | null | null |
jeffreyrosenbluth/NYC-meetup | meetup/Mirror.hs | mit | diagram4 :: Diagram B
diagram4 = k2 d 6
where d = mkConfetti 50 $ mkStdGen 0 | 78 | diagram4 :: Diagram B
diagram4 = k2 d 6
where d = mkConfetti 50 $ mkStdGen 0 | 78 | diagram4 = k2 d 6
where d = mkConfetti 50 $ mkStdGen 0 | 56 | false | true | 0 | 6 | 18 | 37 | 17 | 20 | null | null |
amir-sabbaghi/proxy | app/Main.hs | gpl-3.0 | parseArgs ("--bindaddr":as) s = case as of
[] -> error "Please specify bind address in front of --bindaddr"
(b:as) -> parseArgs as $ s { bindAddress = b } | 162 | parseArgs ("--bindaddr":as) s = case as of
[] -> error "Please specify bind address in front of --bindaddr"
(b:as) -> parseArgs as $ s { bindAddress = b } | 162 | parseArgs ("--bindaddr":as) s = case as of
[] -> error "Please specify bind address in front of --bindaddr"
(b:as) -> parseArgs as $ s { bindAddress = b } | 162 | false | false | 2 | 8 | 36 | 63 | 31 | 32 | null | null |
DanielG/hipo | TinyDNSGenerator.hs | gpl-3.0 | recType "SRV" = Left 33 | 23 | recType "SRV" = Left 33 | 23 | recType "SRV" = Left 33 | 23 | false | false | 0 | 5 | 4 | 12 | 5 | 7 | null | null |
lfairy/sylvia | Sylvia/UI/GTK.hs | gpl-3.0 | renderCairo :: [Exp Void] -> (Render (), PInt)
renderCairo = runImageWithPadding def . stackHorizontally . map render | 117 | renderCairo :: [Exp Void] -> (Render (), PInt)
renderCairo = runImageWithPadding def . stackHorizontally . map render | 117 | renderCairo = runImageWithPadding def . stackHorizontally . map render | 70 | false | true | 0 | 8 | 16 | 46 | 23 | 23 | null | null |
waldheinz/h-fcp | hsite/Main.hs | lgpl-3.0 | main :: IO ()
main = do
mode <- CMD.parseMode <$> getArgs
case mode of
Left x -> error x
Right m -> runMode m | 125 | main :: IO ()
main = do
mode <- CMD.parseMode <$> getArgs
case mode of
Left x -> error x
Right m -> runMode m | 125 | main = do
mode <- CMD.parseMode <$> getArgs
case mode of
Left x -> error x
Right m -> runMode m | 111 | false | true | 1 | 11 | 40 | 64 | 27 | 37 | null | null |
sheyll/b9-vm-image-builder | src/lib/B9/Artifact/Content/ErlTerms.hs | mit | toErlAtomChar :: Char -> String
toErlAtomChar = (table !!) . fromEnum
where
table =
[printf "\\x{%x}" c | c <- [0 .. (31 :: Int)]]
++ (pure . toEnum <$> [32 .. 38])
++ ["\\'"]
++ (pure . toEnum <$> [40 .. 91])
++ ["\\\\"]
++ (pure . toEnum <$> [93 .. 126])
++ [printf "\\x{%x}" c | c <- [(127 :: Int) ..]] | 365 | toErlAtomChar :: Char -> String
toErlAtomChar = (table !!) . fromEnum
where
table =
[printf "\\x{%x}" c | c <- [0 .. (31 :: Int)]]
++ (pure . toEnum <$> [32 .. 38])
++ ["\\'"]
++ (pure . toEnum <$> [40 .. 91])
++ ["\\\\"]
++ (pure . toEnum <$> [93 .. 126])
++ [printf "\\x{%x}" c | c <- [(127 :: Int) ..]] | 365 | toErlAtomChar = (table !!) . fromEnum
where
table =
[printf "\\x{%x}" c | c <- [0 .. (31 :: Int)]]
++ (pure . toEnum <$> [32 .. 38])
++ ["\\'"]
++ (pure . toEnum <$> [40 .. 91])
++ ["\\\\"]
++ (pure . toEnum <$> [93 .. 126])
++ [printf "\\x{%x}" c | c <- [(127 :: Int) ..]] | 333 | false | true | 0 | 15 | 123 | 166 | 94 | 72 | null | null |
tjakway/ghcjvm | compiler/prelude/PrelNames.hs | bsd-3-clause | typeSymbolKindConNameKey = mkPreludeTyConUnique 165 | 52 | typeSymbolKindConNameKey = mkPreludeTyConUnique 165 | 52 | typeSymbolKindConNameKey = mkPreludeTyConUnique 165 | 52 | false | false | 0 | 5 | 4 | 9 | 4 | 5 | null | null |
bjornbm/dimensional-experimental | test/VectorADTest.hs | bsd-3-clause | prop_acc t = acc t' == diffV (diffV pos) t'
where t' = t *~ second :: Time Double | 84 | prop_acc t = acc t' == diffV (diffV pos) t'
where t' = t *~ second :: Time Double | 84 | prop_acc t = acc t' == diffV (diffV pos) t'
where t' = t *~ second :: Time Double | 84 | false | false | 4 | 6 | 21 | 41 | 19 | 22 | null | null |
michaelbeaumont/pandoc | src/Text/Pandoc/Writers/Markdown.hs | gpl-2.0 | inlineListToMarkdown :: WriterOptions -> [Inline] -> State WriterState Doc
inlineListToMarkdown opts lst = do
inlist <- gets stInList
go (if inlist then avoidBadWrapsInList lst else lst)
where go [] = return empty
go (i:is) = case i of
(Link _ _) -> case is of
-- If a link is followed by another link or '[' we don't shortcut
(Link _ _):_ -> unshortcutable
Space:(Link _ _):_ -> unshortcutable
Space:(Str('[':_)):_ -> unshortcutable
Space:(RawInline _ ('[':_)):_ -> unshortcutable
Space:(Cite _ _):_ -> unshortcutable
(Cite _ _):_ -> unshortcutable
Str ('[':_):_ -> unshortcutable
(RawInline _ ('[':_)):_ -> unshortcutable
(RawInline _ (' ':'[':_)):_ -> unshortcutable
_ -> shortcutable
_ -> shortcutable
where shortcutable = liftM2 (<>) (inlineToMarkdown opts i) (go is)
unshortcutable = do
iMark <- withState (\s -> s { stRefShortcutable = False })
(inlineToMarkdown opts i)
modify (\s -> s {stRefShortcutable = True })
fmap (iMark <>) (go is) | 1,402 | inlineListToMarkdown :: WriterOptions -> [Inline] -> State WriterState Doc
inlineListToMarkdown opts lst = do
inlist <- gets stInList
go (if inlist then avoidBadWrapsInList lst else lst)
where go [] = return empty
go (i:is) = case i of
(Link _ _) -> case is of
-- If a link is followed by another link or '[' we don't shortcut
(Link _ _):_ -> unshortcutable
Space:(Link _ _):_ -> unshortcutable
Space:(Str('[':_)):_ -> unshortcutable
Space:(RawInline _ ('[':_)):_ -> unshortcutable
Space:(Cite _ _):_ -> unshortcutable
(Cite _ _):_ -> unshortcutable
Str ('[':_):_ -> unshortcutable
(RawInline _ ('[':_)):_ -> unshortcutable
(RawInline _ (' ':'[':_)):_ -> unshortcutable
_ -> shortcutable
_ -> shortcutable
where shortcutable = liftM2 (<>) (inlineToMarkdown opts i) (go is)
unshortcutable = do
iMark <- withState (\s -> s { stRefShortcutable = False })
(inlineToMarkdown opts i)
modify (\s -> s {stRefShortcutable = True })
fmap (iMark <>) (go is) | 1,402 | inlineListToMarkdown opts lst = do
inlist <- gets stInList
go (if inlist then avoidBadWrapsInList lst else lst)
where go [] = return empty
go (i:is) = case i of
(Link _ _) -> case is of
-- If a link is followed by another link or '[' we don't shortcut
(Link _ _):_ -> unshortcutable
Space:(Link _ _):_ -> unshortcutable
Space:(Str('[':_)):_ -> unshortcutable
Space:(RawInline _ ('[':_)):_ -> unshortcutable
Space:(Cite _ _):_ -> unshortcutable
(Cite _ _):_ -> unshortcutable
Str ('[':_):_ -> unshortcutable
(RawInline _ ('[':_)):_ -> unshortcutable
(RawInline _ (' ':'[':_)):_ -> unshortcutable
_ -> shortcutable
_ -> shortcutable
where shortcutable = liftM2 (<>) (inlineToMarkdown opts i) (go is)
unshortcutable = do
iMark <- withState (\s -> s { stRefShortcutable = False })
(inlineToMarkdown opts i)
modify (\s -> s {stRefShortcutable = True })
fmap (iMark <>) (go is) | 1,327 | false | true | 1 | 17 | 603 | 449 | 229 | 220 | null | null |
phaazon/either | src/Data/Either/Combinators.hs | bsd-3-clause | -- | The 'mapBoth' function takes two functions and applies the first if iff the value
-- takes the form @'Left' _@ and the second if the value takes the form @'Right' _@.
--
-- Using @Data.Bifunctor@:
--
-- @
-- 'mapBoth' = bimap
-- @
--
-- Using @Control.Arrow@:
--
-- @
-- 'mapBoth' = ('Control.Arrow.+++')
-- @
--
-- >>> mapBoth (*2) (*3) (Left 4)
-- Left 8
--
-- >>> mapBoth (*2) (*3) (Right 4)
-- Right 12
mapBoth :: (a -> c) -> (b -> d) -> Either a b -> Either c d
mapBoth f _ (Left x) = Left (f x) | 506 | mapBoth :: (a -> c) -> (b -> d) -> Either a b -> Either c d
mapBoth f _ (Left x) = Left (f x) | 94 | mapBoth f _ (Left x) = Left (f x) | 34 | true | true | 0 | 11 | 107 | 94 | 55 | 39 | null | null |
aisamanra/config-ini | src/Data/Ini/Config/Bidir.hs | bsd-3-clause | allFieldsOptional :: Seq (Field s) -> Bool
allFieldsOptional = all isOptional
where
isOptional (Field _ fd) = fdSkipIfMissing fd
isOptional (FieldMb _ _) = True
-- | Treat an entire section as containing entirely optional fields. | 240 | allFieldsOptional :: Seq (Field s) -> Bool
allFieldsOptional = all isOptional
where
isOptional (Field _ fd) = fdSkipIfMissing fd
isOptional (FieldMb _ _) = True
-- | Treat an entire section as containing entirely optional fields. | 240 | allFieldsOptional = all isOptional
where
isOptional (Field _ fd) = fdSkipIfMissing fd
isOptional (FieldMb _ _) = True
-- | Treat an entire section as containing entirely optional fields. | 197 | false | true | 1 | 8 | 46 | 65 | 32 | 33 | null | null |
mgsloan/panopti | src/Utils.hs | bsd-3-clause | mapEither :: (a -> a') -> (b -> b') -> Either a b -> Either a' b'
mapEither f g = either (Left . f) (Right . g) | 111 | mapEither :: (a -> a') -> (b -> b') -> Either a b -> Either a' b'
mapEither f g = either (Left . f) (Right . g) | 111 | mapEither f g = either (Left . f) (Right . g) | 45 | false | true | 0 | 8 | 27 | 71 | 36 | 35 | null | null |
brownsys/pane | src/HFT.hs | bsd-3-clause | shareToTable :: Integer
-> Share
-> MatchTable
shareToTable now share =
foldl (unionTable combineSiblingActions) emptyTable (map reqToTbl reqs)
where reqs = filter (activeAt now) (shareReq share)
reqToTbl req = MatchTable [(reqFlows req, reqToAction req)] | 298 | shareToTable :: Integer
-> Share
-> MatchTable
shareToTable now share =
foldl (unionTable combineSiblingActions) emptyTable (map reqToTbl reqs)
where reqs = filter (activeAt now) (shareReq share)
reqToTbl req = MatchTable [(reqFlows req, reqToAction req)] | 298 | shareToTable now share =
foldl (unionTable combineSiblingActions) emptyTable (map reqToTbl reqs)
where reqs = filter (activeAt now) (shareReq share)
reqToTbl req = MatchTable [(reqFlows req, reqToAction req)] | 225 | false | true | 2 | 8 | 76 | 111 | 48 | 63 | null | null |
rahulmutt/ghcvm | compiler/Eta/DeSugar/DsArrows.hs | bsd-3-clause | add_ev_bndr :: EvBind -> [Id] -> [Id]
add_ev_bndr (EvBind b _) bs | isId b = b:bs
| otherwise = bs | 129 | add_ev_bndr :: EvBind -> [Id] -> [Id]
add_ev_bndr (EvBind b _) bs | isId b = b:bs
| otherwise = bs | 129 | add_ev_bndr (EvBind b _) bs | isId b = b:bs
| otherwise = bs | 91 | false | true | 0 | 8 | 51 | 60 | 29 | 31 | null | null |
changlinli/nikki | src/Object/Contacts.hs | lgpl-3.0 | isSolidNikkiCollisionType _ = False | 35 | isSolidNikkiCollisionType _ = False | 35 | isSolidNikkiCollisionType _ = False | 35 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
OpenXT/manager | xenmgr/XenMgr/Errors.hs | gpl-2.0 | failTooManyVms :: (MonadError XmError m) => m a
failTooManyVms = throwError $ XError 205 "Too many VMS" | 103 | failTooManyVms :: (MonadError XmError m) => m a
failTooManyVms = throwError $ XError 205 "Too many VMS" | 103 | failTooManyVms = throwError $ XError 205 "Too many VMS" | 55 | false | true | 2 | 7 | 16 | 41 | 18 | 23 | null | null |
sgillespie/ghc | compiler/typecheck/TcRnTypes.hs | bsd-3-clause | pprCtO HoleOrigin = text "a use of" <+> quotes (text "_") | 68 | pprCtO HoleOrigin = text "a use of" <+> quotes (text "_") | 68 | pprCtO HoleOrigin = text "a use of" <+> quotes (text "_") | 68 | false | false | 0 | 8 | 21 | 26 | 11 | 15 | null | null |
delta4d/codewars | kata/odd-plus-even-equals-odd-prove-it/OddsAndEvens.hs | mit | evenPlusOdd (NextEven n) m = NextOdd (evenPlusOdd n m) | 54 | evenPlusOdd (NextEven n) m = NextOdd (evenPlusOdd n m) | 54 | evenPlusOdd (NextEven n) m = NextOdd (evenPlusOdd n m) | 54 | false | false | 0 | 7 | 8 | 28 | 13 | 15 | null | null |
alphalambda/codeworld | codeworld-compiler/src/CodeWorld/Compile/Requirements/Eval.hs | apache-2.0 | checkRule (AllOf rules) = do
results <- sequence <$> mapM checkRule rules
return (concat <$> results) | 109 | checkRule (AllOf rules) = do
results <- sequence <$> mapM checkRule rules
return (concat <$> results) | 109 | checkRule (AllOf rules) = do
results <- sequence <$> mapM checkRule rules
return (concat <$> results) | 109 | false | false | 0 | 9 | 23 | 44 | 20 | 24 | null | null |
emwap/syntactic | src/Data/Syntactic/Traversal.hs | bsd-3-clause | -- | Right fold for an 'Args' list
foldrArgs
:: (forall a . c (Full a) -> b -> b)
-> b
-> (forall sig . Args c sig -> b)
foldrArgs f b Nil = b | 160 | foldrArgs
:: (forall a . c (Full a) -> b -> b)
-> b
-> (forall sig . Args c sig -> b)
foldrArgs f b Nil = b | 125 | foldrArgs f b Nil = b | 27 | true | true | 0 | 11 | 54 | 69 | 36 | 33 | null | null |
T0ha/codingame | training/Thor1.hs | gpl-2.0 | createTurns :: State -> [ Turn ]
createTurns [lx, ly, tx, ty] = [(N, [lx, ly, tx, ty -1]),
(NE, [lx, ly, tx + 1, ty - 1]),
(E, [lx, ly, tx + 1, ty]),
(SE, [lx, ly, tx + 1, ty + 1]),
(S, [lx, ly, tx, ty + 1]),
(SW, [lx, ly, tx - 1, ty + 1]),
(W, [lx, ly, tx - 1, ty]),
(NW, [lx, ly, tx - 1, ty - 1])] | 523 | createTurns :: State -> [ Turn ]
createTurns [lx, ly, tx, ty] = [(N, [lx, ly, tx, ty -1]),
(NE, [lx, ly, tx + 1, ty - 1]),
(E, [lx, ly, tx + 1, ty]),
(SE, [lx, ly, tx + 1, ty + 1]),
(S, [lx, ly, tx, ty + 1]),
(SW, [lx, ly, tx - 1, ty + 1]),
(W, [lx, ly, tx - 1, ty]),
(NW, [lx, ly, tx - 1, ty - 1])] | 523 | createTurns [lx, ly, tx, ty] = [(N, [lx, ly, tx, ty -1]),
(NE, [lx, ly, tx + 1, ty - 1]),
(E, [lx, ly, tx + 1, ty]),
(SE, [lx, ly, tx + 1, ty + 1]),
(S, [lx, ly, tx, ty + 1]),
(SW, [lx, ly, tx - 1, ty + 1]),
(W, [lx, ly, tx - 1, ty]),
(NW, [lx, ly, tx - 1, ty - 1])] | 490 | false | true | 0 | 8 | 299 | 249 | 155 | 94 | null | null |
diku-dk/futhark | src/Futhark/CodeGen/SetDefaultSpace.hs | isc | setSpace _ space = space | 24 | setSpace _ space = space | 24 | setSpace _ space = space | 24 | false | false | 0 | 5 | 4 | 11 | 5 | 6 | null | null |
paulrzcz/HSvm | Data/SVM.hs | bsd-2-clause | -------------------------------------------------------------------------------
convertToNodeArray :: Vector -> [CSvmNode]
convertToNodeArray = map convertNode . toList . M.filter (/= 0)
where
convertNode (key, val) = CSvmNode (fromIntegral key) (realToFrac val) | 269 | convertToNodeArray :: Vector -> [CSvmNode]
convertToNodeArray = map convertNode . toList . M.filter (/= 0)
where
convertNode (key, val) = CSvmNode (fromIntegral key) (realToFrac val) | 188 | convertToNodeArray = map convertNode . toList . M.filter (/= 0)
where
convertNode (key, val) = CSvmNode (fromIntegral key) (realToFrac val) | 145 | true | true | 0 | 7 | 32 | 72 | 38 | 34 | null | null |
keera-studios/hsQt | Qtc/Gui/QWidget.hs | bsd-2-clause | setMaximumWidth :: QWidget a -> ((Int)) -> IO ()
setMaximumWidth x0 (x1)
= withObjectPtr x0 $ \cobj_x0 ->
qtc_QWidget_setMaximumWidth cobj_x0 (toCInt x1) | 159 | setMaximumWidth :: QWidget a -> ((Int)) -> IO ()
setMaximumWidth x0 (x1)
= withObjectPtr x0 $ \cobj_x0 ->
qtc_QWidget_setMaximumWidth cobj_x0 (toCInt x1) | 159 | setMaximumWidth x0 (x1)
= withObjectPtr x0 $ \cobj_x0 ->
qtc_QWidget_setMaximumWidth cobj_x0 (toCInt x1) | 110 | false | true | 0 | 9 | 27 | 68 | 33 | 35 | null | null |
patperry/hs-gsl-random | lib/GSL/Random/Dist.hs | bsd-3-clause | betaQInv :: Double -> Double -> Double -> Double
betaQInv = liftDouble3 gsl_cdf_beta_Qinv | 89 | betaQInv :: Double -> Double -> Double -> Double
betaQInv = liftDouble3 gsl_cdf_beta_Qinv | 89 | betaQInv = liftDouble3 gsl_cdf_beta_Qinv | 40 | false | true | 0 | 7 | 12 | 26 | 13 | 13 | null | null |
tolysz/prepare-ghcjs | spec-lts8/base/Data/Foldable.hs | bsd-3-clause | foldlM :: (Foldable t, Monad m) => (b -> a -> m b) -> b -> t a -> m b
foldlM f z0 xs = foldr f' return xs z0
where f' x k z = f z x >>= k
-- | Map each element of a structure to an action, evaluate these
-- actions from left to right, and ignore the results. For a version
-- that doesn't ignore the results see 'Data.Traversable.traverse'. | 343 | foldlM :: (Foldable t, Monad m) => (b -> a -> m b) -> b -> t a -> m b
foldlM f z0 xs = foldr f' return xs z0
where f' x k z = f z x >>= k
-- | Map each element of a structure to an action, evaluate these
-- actions from left to right, and ignore the results. For a version
-- that doesn't ignore the results see 'Data.Traversable.traverse'. | 343 | foldlM f z0 xs = foldr f' return xs z0
where f' x k z = f z x >>= k
-- | Map each element of a structure to an action, evaluate these
-- actions from left to right, and ignore the results. For a version
-- that doesn't ignore the results see 'Data.Traversable.traverse'. | 273 | false | true | 0 | 10 | 78 | 106 | 51 | 55 | null | null |
markus-git/signal | src/Signal/Compiler.hs | bsd-3-clause | emptyChannels :: Channels
emptyChannels = Channels (Map.empty) (Map.empty) | 74 | emptyChannels :: Channels
emptyChannels = Channels (Map.empty) (Map.empty) | 74 | emptyChannels = Channels (Map.empty) (Map.empty) | 48 | false | true | 0 | 7 | 7 | 33 | 15 | 18 | null | null |
toonn/wyah | src/STLCParser.hs | bsd-2-clause | tylit :: Parser Type
tylit = (reservedOp "Bool" >> return TBool)
<|> (reservedOp "Int" >> return TInt) | 108 | tylit :: Parser Type
tylit = (reservedOp "Bool" >> return TBool)
<|> (reservedOp "Int" >> return TInt) | 108 | tylit = (reservedOp "Bool" >> return TBool)
<|> (reservedOp "Int" >> return TInt) | 87 | false | true | 3 | 8 | 22 | 53 | 24 | 29 | null | null |
tpsinnem/Idris-dev | src/Idris/Core/TT.hs | bsd-3-clause | constDocs c@(AType (ATInt ITNative)) = "Fixed-precision integers of undefined size" | 89 | constDocs c@(AType (ATInt ITNative)) = "Fixed-precision integers of undefined size" | 89 | constDocs c@(AType (ATInt ITNative)) = "Fixed-precision integers of undefined size" | 89 | false | false | 0 | 10 | 15 | 24 | 12 | 12 | null | null |
alexbaluta/courseography | app/Css/Constants.hs | gpl-3.0 | purple5 :: Color
purple5 = parse "#800080" | 42 | purple5 :: Color
purple5 = parse "#800080" | 42 | purple5 = parse "#800080" | 25 | false | true | 0 | 6 | 6 | 20 | 8 | 12 | null | null |
beni55/openshake | Development/Shake/Core/Utilities.hs | bsd-3-clause | anyM :: Monad m => (a -> m Bool) -> [a] -> m Bool
anyM p = go
where go [] = return False
go (x:xs) = do
b <- p x
if b then return True
else go xs | 200 | anyM :: Monad m => (a -> m Bool) -> [a] -> m Bool
anyM p = go
where go [] = return False
go (x:xs) = do
b <- p x
if b then return True
else go xs | 200 | anyM p = go
where go [] = return False
go (x:xs) = do
b <- p x
if b then return True
else go xs | 150 | false | true | 1 | 9 | 94 | 102 | 49 | 53 | null | null |
rueshyna/gogol | gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightActivities/Get.hs | mpl-2.0 | -- | Creates a value of 'FloodlightActivitiesGet' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'fProFileId'
--
-- * 'fId'
floodlightActivitiesGet
:: Int64 -- ^ 'fProFileId'
-> Int64 -- ^ 'fId'
-> FloodlightActivitiesGet
floodlightActivitiesGet pFProFileId_ pFId_ =
FloodlightActivitiesGet'
{ _fProFileId = _Coerce # pFProFileId_
, _fId = _Coerce # pFId_
} | 471 | floodlightActivitiesGet
:: Int64 -- ^ 'fProFileId'
-> Int64 -- ^ 'fId'
-> FloodlightActivitiesGet
floodlightActivitiesGet pFProFileId_ pFId_ =
FloodlightActivitiesGet'
{ _fProFileId = _Coerce # pFProFileId_
, _fId = _Coerce # pFId_
} | 261 | floodlightActivitiesGet pFProFileId_ pFId_ =
FloodlightActivitiesGet'
{ _fProFileId = _Coerce # pFProFileId_
, _fId = _Coerce # pFId_
} | 151 | true | true | 0 | 7 | 96 | 55 | 34 | 21 | null | null |
noughtmare/yi | yi-frontend-pango/src/Yi/Frontend/Pango/Control.hs | gpl-2.0 | -- Helper functions to avoid issues with mismatching monad libraries
controlIO :: IO a -> ControlM a
controlIO = liftBase | 121 | controlIO :: IO a -> ControlM a
controlIO = liftBase | 52 | controlIO = liftBase | 20 | true | true | 0 | 7 | 19 | 28 | 12 | 16 | null | null |
marcellussiegburg/autotool | collection/src/DPLL/Data.hs | gpl-2.0 | opposite :: Literal -> Literal
opposite = Literal . negate . unLiteral | 70 | opposite :: Literal -> Literal
opposite = Literal . negate . unLiteral | 70 | opposite = Literal . negate . unLiteral | 39 | false | true | 0 | 6 | 11 | 23 | 12 | 11 | null | null |
k16shikano/qnda | src/EPUB/Toc.hs | mit | h1Prefix _ = "" | 15 | h1Prefix _ = "" | 15 | h1Prefix _ = "" | 15 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
brendanhay/gogol | gogol-sheets/gen/Network/Google/Sheets/Types/Product.hs | mpl-2.0 | -- | Data to use for custom labels. Only used if type is set to CUSTOM. This
-- data must be the same length as the series or other element this data
-- label is applied to. In addition, if the series is split into multiple
-- source ranges, this source data must come from the next column in the
-- source data. For example, if the series is B2:B4,E6:E8 then this data
-- must come from C2:C4,F6:F8.
dlCustomLabelData :: Lens' DataLabel (Maybe ChartData)
dlCustomLabelData
= lens _dlCustomLabelData
(\ s a -> s{_dlCustomLabelData = a}) | 544 | dlCustomLabelData :: Lens' DataLabel (Maybe ChartData)
dlCustomLabelData
= lens _dlCustomLabelData
(\ s a -> s{_dlCustomLabelData = a}) | 143 | dlCustomLabelData
= lens _dlCustomLabelData
(\ s a -> s{_dlCustomLabelData = a}) | 88 | true | true | 1 | 9 | 102 | 57 | 30 | 27 | null | null |
mrlovre/LMTetrys | src/Test.hs | gpl-2.0 | testBoard :: Board
testBoard = Board { rows = 5, cols = 3, bData = testBoardData, piece = V.fromList [Ruby, Emerald, Sapphire], piecePos = (4, 1) } | 147 | testBoard :: Board
testBoard = Board { rows = 5, cols = 3, bData = testBoardData, piece = V.fromList [Ruby, Emerald, Sapphire], piecePos = (4, 1) } | 147 | testBoard = Board { rows = 5, cols = 3, bData = testBoardData, piece = V.fromList [Ruby, Emerald, Sapphire], piecePos = (4, 1) } | 128 | false | true | 0 | 8 | 26 | 63 | 39 | 24 | null | null |
keera-studios/hsQt | Qtc/Enums/Core/QAbstractFileEngine.hs | bsd-2-clause | eBundleName :: FileName
eBundleName
= ieFileName $ 8 | 54 | eBundleName :: FileName
eBundleName
= ieFileName $ 8 | 54 | eBundleName
= ieFileName $ 8 | 30 | false | true | 0 | 6 | 9 | 18 | 8 | 10 | null | null |
wxzh/fcore | lib/typeCheck/TypeCheck.hs | bsd-2-clause | kind d (RecordType fs) = justStarIffAllHaveKindStar d (map snd fs) | 67 | kind d (RecordType fs) = justStarIffAllHaveKindStar d (map snd fs) | 67 | kind d (RecordType fs) = justStarIffAllHaveKindStar d (map snd fs) | 67 | false | false | 0 | 7 | 10 | 32 | 14 | 18 | null | null |
projectorhq/haskell-liquid | test/Text/Liquid/RendererTests.hs | bsd-3-clause | case_evalKeyTruthiness2 = let j = object []
e = Variable $ ObjectIndex "a" :| []
exp = AccSuccess False
res = evalKeyTruthiness j e
in res @?= exp | 266 | case_evalKeyTruthiness2 = let j = object []
e = Variable $ ObjectIndex "a" :| []
exp = AccSuccess False
res = evalKeyTruthiness j e
in res @?= exp | 266 | case_evalKeyTruthiness2 = let j = object []
e = Variable $ ObjectIndex "a" :| []
exp = AccSuccess False
res = evalKeyTruthiness j e
in res @?= exp | 266 | false | false | 0 | 11 | 147 | 62 | 30 | 32 | null | null |
jkozlowski/kdb-haskell | src/Database/Kdb/Internal/IPC.hs | mit | endian End.LittleEndian = littleEndian | 38 | endian End.LittleEndian = littleEndian | 38 | endian End.LittleEndian = littleEndian | 38 | false | false | 0 | 5 | 3 | 12 | 5 | 7 | null | null |
hdbc/hdbc-odbc | testsrc/SpecificDB.hs | bsd-3-clause | dateTimeTypeOfSqlValue (SqlDiffTime _) = "numeric" | 50 | dateTimeTypeOfSqlValue (SqlDiffTime _) = "numeric" | 50 | dateTimeTypeOfSqlValue (SqlDiffTime _) = "numeric" | 50 | false | false | 0 | 6 | 4 | 16 | 7 | 9 | null | null |
TomMD/ghc | compiler/prelude/THNames.hs | bsd-3-clause | wildCardTName = libFun (fsLit "wildCardT") wildCardTIdKey | 68 | wildCardTName = libFun (fsLit "wildCardT") wildCardTIdKey | 68 | wildCardTName = libFun (fsLit "wildCardT") wildCardTIdKey | 68 | false | false | 0 | 7 | 16 | 17 | 8 | 9 | null | null |
ambiata/highlighting-kate | Text/Highlighting/Kate/Syntax/C.hs | gpl-2.0 | regex_'23'5cs'2ael'28'3f'3ase'7cif'29 = compileRegex True "#\\s*el(?:se|if)" | 76 | regex_'23'5cs'2ael'28'3f'3ase'7cif'29 = compileRegex True "#\\s*el(?:se|if)" | 76 | regex_'23'5cs'2ael'28'3f'3ase'7cif'29 = compileRegex True "#\\s*el(?:se|if)" | 76 | false | false | 0 | 5 | 4 | 11 | 5 | 6 | null | null |
mcschroeder/smc | Interpolation.hs | mit | B `join` B = B | 14 | B `join` B = B | 14 | B `join` B = B | 14 | false | false | 0 | 5 | 4 | 18 | 8 | 10 | null | null |
mapinguari/SC_HS_Proxy | src/Proxy/Query/Unit.hs | mit | isBuilding ZergHydralisk = False | 32 | isBuilding ZergHydralisk = False | 32 | isBuilding ZergHydralisk = False | 32 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
genos/online_problems | advent_of_code_2019/day06/src/Main.hs | mit | part1 :: AdjacencyMap Text -> Int
part1 g = sum (fmap numOrbits v) - length v
where
numOrbits = length . (`dfs` g) . (: [])
v = vertexList g | 150 | part1 :: AdjacencyMap Text -> Int
part1 g = sum (fmap numOrbits v) - length v
where
numOrbits = length . (`dfs` g) . (: [])
v = vertexList g | 150 | part1 g = sum (fmap numOrbits v) - length v
where
numOrbits = length . (`dfs` g) . (: [])
v = vertexList g | 116 | false | true | 0 | 8 | 39 | 75 | 39 | 36 | null | null |
dmgolubovsky/chordemux | src/DispatchLoop.hs | mit | playChords Nothing = loop | 25 | playChords Nothing = loop | 25 | playChords Nothing = loop | 25 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
Daniel-Diaz/DTC | Language/Haskell/DTC/Class.hs | bsd-3-clause | >>) :: Type -> Type -> Type
t1 .>> t2 = TyApp t1 t2
| 54 | (.>>) :: Type -> Type -> Type
t1 .>> t2 = TyApp t1 t2 | 53 | t1 .>> t2 = TyApp t1 t2 | 23 | false | true | 4 | 6 | 16 | 33 | 15 | 18 | null | null |
NorfairKing/sus-depot | shared/shared/xmonad/Actions.hs | gpl-2.0 | swapWindowUp :: X ()
swapWindowUp = windows W.swapUp | 52 | swapWindowUp :: X ()
swapWindowUp = windows W.swapUp | 52 | swapWindowUp = windows W.swapUp | 31 | false | true | 0 | 7 | 7 | 27 | 11 | 16 | null | null |
conal/hermit | examples/dictionaries/Dictionaries.hs | bsd-2-clause | repfabs :: T2 -> T2
repfabs t2 = rep (f (abs t2)) | 49 | repfabs :: T2 -> T2
repfabs t2 = rep (f (abs t2)) | 49 | repfabs t2 = rep (f (abs t2)) | 29 | false | true | 0 | 9 | 11 | 33 | 16 | 17 | null | null |
avsm/Idris | Idris/RunIO.hs | bsd-3-clause | memory :: MemState
memory = unsafePerformIO
(do mem <- newIORef (0, (take 100 (repeat defaultVal)))
return (MemState mem)) | 157 | memory :: MemState
memory = unsafePerformIO
(do mem <- newIORef (0, (take 100 (repeat defaultVal)))
return (MemState mem)) | 157 | memory = unsafePerformIO
(do mem <- newIORef (0, (take 100 (repeat defaultVal)))
return (MemState mem)) | 138 | false | true | 0 | 15 | 52 | 66 | 30 | 36 | null | null |
phischu/fragnix | tests/packages/scotty/Data.Aeson.Types.FromJSON.hs | bsd-3-clause | parseBoundedIntegralText :: (Bounded a, Integral a) => String -> Text -> Parser a
parseBoundedIntegralText expected t =
parseScientificText t >>= parseBoundedIntegralFromScientific expected | 193 | parseBoundedIntegralText :: (Bounded a, Integral a) => String -> Text -> Parser a
parseBoundedIntegralText expected t =
parseScientificText t >>= parseBoundedIntegralFromScientific expected | 193 | parseBoundedIntegralText expected t =
parseScientificText t >>= parseBoundedIntegralFromScientific expected | 111 | false | true | 0 | 8 | 25 | 52 | 25 | 27 | null | null |
ony/hledger | hledger-lib/Hledger/Utils/Parse.hs | gpl-3.0 | restofline :: TextParser m String
restofline = anyChar `manyTill` newline | 73 | restofline :: TextParser m String
restofline = anyChar `manyTill` newline | 73 | restofline = anyChar `manyTill` newline | 39 | false | true | 1 | 6 | 9 | 26 | 12 | 14 | null | null |
juodaspaulius/bclafer_old | src/Language/Clafer.hs | mit | -- Parses the model into AST. Adding more fragments beyond this point will have no effect.
parse :: Monad m => ClaferT m ()
parse =
do
env <- getEnv
let astsErr = map (parseFrag $ args env) $ modelFrags env
asts <- liftParseErrs astsErr
-- We need to somehow combine all the ASTS together into a complete AST
-- However, the source positions inside the ASTs are relative to their
-- fragments.
--
-- For example
-- Frag1: "A\nB\n"
-- Frag2: "C\n"
-- The "C" clafer in Frag2 has position (1, 1) because it is at the start of the fragment.
-- However, it should have position (3, 1) since that is its position in the complete model.
--
-- We can
-- 1. Traverse the model and update the positions so that they are relative to model rather
-- than the fragment.
-- 2. Reparse the model as a complete model rather in fragments.
--
-- The second one is easier so that's we'll do for now. There shouldn't be any errors since
-- each individual fragment already passed.
ast' <- case asts of
-- Special case: if there is only one fragment, then the complete model is contained within it.
-- Don't need to reparse. This is the common case.
[oneFrag] -> return oneFrag
_ -> do
-- Combine all the fragment syntaxes
let completeModel = concat $ modelFrags env
let completeAst = (parseFrag $ args env) completeModel
liftParseErr completeAst
let ast = mapModule ast'
let env' = env{ cAst = Just ast, astModuleTrace = traceAstModule ast }
putEnv env'
where
parseFrag args =
pModule .
(if not
((fromJust $ new_layout args) ||
(fromJust $ no_layout args))
then
resolveLayout
else
id)
. myLexer .
(if (not $ fromJust $ no_layout args) &&
(fromJust $ new_layout args)
then
resLayout
else
id)
-- Compiles the AST into IR. | 1,973 | parse :: Monad m => ClaferT m ()
parse =
do
env <- getEnv
let astsErr = map (parseFrag $ args env) $ modelFrags env
asts <- liftParseErrs astsErr
-- We need to somehow combine all the ASTS together into a complete AST
-- However, the source positions inside the ASTs are relative to their
-- fragments.
--
-- For example
-- Frag1: "A\nB\n"
-- Frag2: "C\n"
-- The "C" clafer in Frag2 has position (1, 1) because it is at the start of the fragment.
-- However, it should have position (3, 1) since that is its position in the complete model.
--
-- We can
-- 1. Traverse the model and update the positions so that they are relative to model rather
-- than the fragment.
-- 2. Reparse the model as a complete model rather in fragments.
--
-- The second one is easier so that's we'll do for now. There shouldn't be any errors since
-- each individual fragment already passed.
ast' <- case asts of
-- Special case: if there is only one fragment, then the complete model is contained within it.
-- Don't need to reparse. This is the common case.
[oneFrag] -> return oneFrag
_ -> do
-- Combine all the fragment syntaxes
let completeModel = concat $ modelFrags env
let completeAst = (parseFrag $ args env) completeModel
liftParseErr completeAst
let ast = mapModule ast'
let env' = env{ cAst = Just ast, astModuleTrace = traceAstModule ast }
putEnv env'
where
parseFrag args =
pModule .
(if not
((fromJust $ new_layout args) ||
(fromJust $ no_layout args))
then
resolveLayout
else
id)
. myLexer .
(if (not $ fromJust $ no_layout args) &&
(fromJust $ new_layout args)
then
resLayout
else
id)
-- Compiles the AST into IR. | 1,882 | parse =
do
env <- getEnv
let astsErr = map (parseFrag $ args env) $ modelFrags env
asts <- liftParseErrs astsErr
-- We need to somehow combine all the ASTS together into a complete AST
-- However, the source positions inside the ASTs are relative to their
-- fragments.
--
-- For example
-- Frag1: "A\nB\n"
-- Frag2: "C\n"
-- The "C" clafer in Frag2 has position (1, 1) because it is at the start of the fragment.
-- However, it should have position (3, 1) since that is its position in the complete model.
--
-- We can
-- 1. Traverse the model and update the positions so that they are relative to model rather
-- than the fragment.
-- 2. Reparse the model as a complete model rather in fragments.
--
-- The second one is easier so that's we'll do for now. There shouldn't be any errors since
-- each individual fragment already passed.
ast' <- case asts of
-- Special case: if there is only one fragment, then the complete model is contained within it.
-- Don't need to reparse. This is the common case.
[oneFrag] -> return oneFrag
_ -> do
-- Combine all the fragment syntaxes
let completeModel = concat $ modelFrags env
let completeAst = (parseFrag $ args env) completeModel
liftParseErr completeAst
let ast = mapModule ast'
let env' = env{ cAst = Just ast, astModuleTrace = traceAstModule ast }
putEnv env'
where
parseFrag args =
pModule .
(if not
((fromJust $ new_layout args) ||
(fromJust $ no_layout args))
then
resolveLayout
else
id)
. myLexer .
(if (not $ fromJust $ no_layout args) &&
(fromJust $ new_layout args)
then
resLayout
else
id)
-- Compiles the AST into IR. | 1,849 | true | true | 0 | 26 | 581 | 310 | 163 | 147 | null | null |
basvandijk/resettable-timeouts | System/Timeout/Resettable/CPS.hs | bsd-3-clause | cancel :: Key -> IO ()
cancel (Key mgr tk _) = unregisterTimeout mgr tk | 71 | cancel :: Key -> IO ()
cancel (Key mgr tk _) = unregisterTimeout mgr tk | 71 | cancel (Key mgr tk _) = unregisterTimeout mgr tk | 48 | false | true | 0 | 7 | 14 | 42 | 19 | 23 | null | null |
tjakway/ghcjvm | compiler/main/DynFlags.hs | bsd-3-clause | pgm_s :: DynFlags -> (String,[Option])
pgm_s dflags = sPgm_s (settings dflags) | 94 | pgm_s :: DynFlags -> (String,[Option])
pgm_s dflags = sPgm_s (settings dflags) | 94 | pgm_s dflags = sPgm_s (settings dflags) | 39 | false | true | 0 | 9 | 26 | 42 | 20 | 22 | null | null |
ttylec/QLogic | src/QLogic/BoxProduct.hs | gpl-3.0 | -- | Pre-order relation on box product questions.
boxPrec :: (Ord a, Ord b, QLogicStruct p1 a, QLogicStruct p2 b)
=> (p1, p2) -> FreeProduct a b -> FreeProduct a b -> Bool
boxPrec (qla, qlb) (FreeProd a b) (FreeProd c d) = a `leftLess` c && b `rightLess` d
where
leftLess = lessIn qla
rightLess = lessIn qlb | 335 | boxPrec :: (Ord a, Ord b, QLogicStruct p1 a, QLogicStruct p2 b)
=> (p1, p2) -> FreeProduct a b -> FreeProduct a b -> Bool
boxPrec (qla, qlb) (FreeProd a b) (FreeProd c d) = a `leftLess` c && b `rightLess` d
where
leftLess = lessIn qla
rightLess = lessIn qlb | 285 | boxPrec (qla, qlb) (FreeProd a b) (FreeProd c d) = a `leftLess` c && b `rightLess` d
where
leftLess = lessIn qla
rightLess = lessIn qlb | 155 | true | true | 0 | 12 | 86 | 140 | 72 | 68 | null | null |
k16shikano/hpdft | src/PDF/OpenType.hs | mit | fromBytes :: ByteString -> Integer
fromBytes = BS.foldl' f 0
where
f a b = a `shiftL` 8 .|. fromIntegral b | 112 | fromBytes :: ByteString -> Integer
fromBytes = BS.foldl' f 0
where
f a b = a `shiftL` 8 .|. fromIntegral b | 112 | fromBytes = BS.foldl' f 0
where
f a b = a `shiftL` 8 .|. fromIntegral b | 77 | false | true | 0 | 6 | 26 | 47 | 24 | 23 | null | null |
mightymoose/liquidhaskell | tests/pos/transTAG.hs | bsd-3-clause | {-@ foo :: x: Int -> Int @-}
foo :: Int -> Int
foo x = x + 1 | 60 | foo :: Int -> Int
foo x = x + 1 | 31 | foo x = x + 1 | 13 | true | true | 0 | 5 | 18 | 23 | 12 | 11 | null | null |
mseri/crypto-multihash | src/Crypto/Multihash/Weak.hs | bsd-3-clause | -- | Helper to multihash a 'ByteArrayAccess' (e.g. a 'BS.ByteString') using a
-- supported hash algorithm. Uses 'Crypto.Hash.hash' for hashing.
weakMultihash :: ByteArrayAccess bs
=> ByteString -> bs -> Either String WeakMultihashDigest
weakMultihash alg p = do
alg' <- maybeToEither "Unknown algorithm" $
lookup (convertString alg) allowedAlgos
let h = case alg' of
S1 a -> BA.convert $ hashWith a p
S256 a -> BA.convert $ hashWith a p
S512 a -> BA.convert $ hashWith a p
S3_512 a -> BA.convert $ hashWith a p
S3_384 a -> BA.convert $ hashWith a p
S3_256 a -> BA.convert $ hashWith a p
S3_224 a -> BA.convert $ hashWith a p
B2b a -> BA.convert $ hashWith a p
B2s a -> BA.convert $ hashWith a p
return $ WeakMultihashDigest alg' (BA.length h) h
-- | Unsafe equivalent of 'weakMultihash'. Throws on creation errors. | 988 | weakMultihash :: ByteArrayAccess bs
=> ByteString -> bs -> Either String WeakMultihashDigest
weakMultihash alg p = do
alg' <- maybeToEither "Unknown algorithm" $
lookup (convertString alg) allowedAlgos
let h = case alg' of
S1 a -> BA.convert $ hashWith a p
S256 a -> BA.convert $ hashWith a p
S512 a -> BA.convert $ hashWith a p
S3_512 a -> BA.convert $ hashWith a p
S3_384 a -> BA.convert $ hashWith a p
S3_256 a -> BA.convert $ hashWith a p
S3_224 a -> BA.convert $ hashWith a p
B2b a -> BA.convert $ hashWith a p
B2s a -> BA.convert $ hashWith a p
return $ WeakMultihashDigest alg' (BA.length h) h
-- | Unsafe equivalent of 'weakMultihash'. Throws on creation errors. | 841 | weakMultihash alg p = do
alg' <- maybeToEither "Unknown algorithm" $
lookup (convertString alg) allowedAlgos
let h = case alg' of
S1 a -> BA.convert $ hashWith a p
S256 a -> BA.convert $ hashWith a p
S512 a -> BA.convert $ hashWith a p
S3_512 a -> BA.convert $ hashWith a p
S3_384 a -> BA.convert $ hashWith a p
S3_256 a -> BA.convert $ hashWith a p
S3_224 a -> BA.convert $ hashWith a p
B2b a -> BA.convert $ hashWith a p
B2s a -> BA.convert $ hashWith a p
return $ WeakMultihashDigest alg' (BA.length h) h
-- | Unsafe equivalent of 'weakMultihash'. Throws on creation errors. | 731 | true | true | 0 | 14 | 315 | 279 | 128 | 151 | null | null |
conal/shady-graphics | src/Shady/ParamSurf.hs | agpl-3.0 | onY f (x,y,z) = (x, f y, z) | 27 | onY f (x,y,z) = (x, f y, z) | 27 | onY f (x,y,z) = (x, f y, z) | 27 | false | false | 0 | 6 | 7 | 34 | 18 | 16 | null | null |
GaloisInc/halvm-ghc | utils/genapply/Main.hs | bsd-3-clause | showArg V16 = "v16" | 19 | showArg V16 = "v16" | 19 | showArg V16 = "v16" | 19 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
iostreamer-X/FuncShell | src/Main.hs | mit | main = getArgs >>= processArguments | 35 | main = getArgs >>= processArguments | 35 | main = getArgs >>= processArguments | 35 | false | false | 3 | 5 | 4 | 16 | 6 | 10 | null | null |
sitewisely/zellige | test/Data/Geometry/MapnikVectorTileSpec.hs | apache-2.0 | errorCallContains :: Text.Text -> Exception.ErrorCall -> Bool
errorCallContains s (Exception.ErrorCallWithLocation msg _) = s `Text.isInfixOf` Text.pack msg | 156 | errorCallContains :: Text.Text -> Exception.ErrorCall -> Bool
errorCallContains s (Exception.ErrorCallWithLocation msg _) = s `Text.isInfixOf` Text.pack msg | 156 | errorCallContains s (Exception.ErrorCallWithLocation msg _) = s `Text.isInfixOf` Text.pack msg | 94 | false | true | 0 | 8 | 16 | 51 | 26 | 25 | null | null |
ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/basic_haskell/enumFromThenTo_6.hs | mit | primMinusInt (Pos x) (Pos y) = primMinusNat x y | 47 | primMinusInt (Pos x) (Pos y) = primMinusNat x y | 47 | primMinusInt (Pos x) (Pos y) = primMinusNat x y | 47 | false | false | 0 | 7 | 8 | 28 | 13 | 15 | null | null |
ssoudan/hsCRDT | test/MainTestSuite.hs | apache-2.0 | tests :: [Test]
tests = [
testGroup "IntMax"
[ testProperty "Simple" IntMaxTest.testSimple
, testProperty "Eq" IntMaxTest.testEq
, testProperty "UpdatesMonotonicallyAdvance" IntMaxTest.testUpdatesMonotonicallyAdvance
, testProperty "testCvRDTEquivalentAbstractStates" IntMaxTest.testCvRDTEquivalentAbstractStates
, testProperty "testMergeIdempotent" IntMaxTest.testMergeIdempotent
, testProperty "testMergeCommutative" IntMaxTest.testMergeCommutative
]
, testGroup "MonotonicCounter"
[ testProperty "Simple" MonotonicCounterTest.testSimple
, testProperty "UpdatesMonotonicallyAdvance - 2" $ MonotonicCounterTest.testUpdatesMonotonicallyAdvance (undefined :: Fin 2)
, testProperty "testCvRDTEquivalentAbstractStates - 2" $ MonotonicCounterTest.testCvRDTEquivalentAbstractStates (undefined :: Fin 2)
, testProperty "testMergeIdempotent - 5" $ MonotonicCounterTest.testMergeIdempotent (undefined :: Fin 5)
, testProperty "testMergeCommutative - 4" $ MonotonicCounterTest.testMergeCommutative (undefined :: Fin 4)
, testProperty "UpdatesMonotonicallyAdvance - 12" $ MonotonicCounterTest.testUpdatesMonotonicallyAdvance (undefined :: Fin 12)
, testProperty "testCvRDTEquivalentAbstractStates - 22" $ MonotonicCounterTest.testCvRDTEquivalentAbstractStates (undefined :: Fin 22)
, testProperty "testMergeIdempotent - 2" $ MonotonicCounterTest.testMergeIdempotent (undefined :: Fin 2)
, testProperty "testMergeCommutative - 3" $ MonotonicCounterTest.testMergeCommutative (undefined :: Fin 3)
]
] | 1,717 | tests :: [Test]
tests = [
testGroup "IntMax"
[ testProperty "Simple" IntMaxTest.testSimple
, testProperty "Eq" IntMaxTest.testEq
, testProperty "UpdatesMonotonicallyAdvance" IntMaxTest.testUpdatesMonotonicallyAdvance
, testProperty "testCvRDTEquivalentAbstractStates" IntMaxTest.testCvRDTEquivalentAbstractStates
, testProperty "testMergeIdempotent" IntMaxTest.testMergeIdempotent
, testProperty "testMergeCommutative" IntMaxTest.testMergeCommutative
]
, testGroup "MonotonicCounter"
[ testProperty "Simple" MonotonicCounterTest.testSimple
, testProperty "UpdatesMonotonicallyAdvance - 2" $ MonotonicCounterTest.testUpdatesMonotonicallyAdvance (undefined :: Fin 2)
, testProperty "testCvRDTEquivalentAbstractStates - 2" $ MonotonicCounterTest.testCvRDTEquivalentAbstractStates (undefined :: Fin 2)
, testProperty "testMergeIdempotent - 5" $ MonotonicCounterTest.testMergeIdempotent (undefined :: Fin 5)
, testProperty "testMergeCommutative - 4" $ MonotonicCounterTest.testMergeCommutative (undefined :: Fin 4)
, testProperty "UpdatesMonotonicallyAdvance - 12" $ MonotonicCounterTest.testUpdatesMonotonicallyAdvance (undefined :: Fin 12)
, testProperty "testCvRDTEquivalentAbstractStates - 22" $ MonotonicCounterTest.testCvRDTEquivalentAbstractStates (undefined :: Fin 22)
, testProperty "testMergeIdempotent - 2" $ MonotonicCounterTest.testMergeIdempotent (undefined :: Fin 2)
, testProperty "testMergeCommutative - 3" $ MonotonicCounterTest.testMergeCommutative (undefined :: Fin 3)
]
] | 1,717 | tests = [
testGroup "IntMax"
[ testProperty "Simple" IntMaxTest.testSimple
, testProperty "Eq" IntMaxTest.testEq
, testProperty "UpdatesMonotonicallyAdvance" IntMaxTest.testUpdatesMonotonicallyAdvance
, testProperty "testCvRDTEquivalentAbstractStates" IntMaxTest.testCvRDTEquivalentAbstractStates
, testProperty "testMergeIdempotent" IntMaxTest.testMergeIdempotent
, testProperty "testMergeCommutative" IntMaxTest.testMergeCommutative
]
, testGroup "MonotonicCounter"
[ testProperty "Simple" MonotonicCounterTest.testSimple
, testProperty "UpdatesMonotonicallyAdvance - 2" $ MonotonicCounterTest.testUpdatesMonotonicallyAdvance (undefined :: Fin 2)
, testProperty "testCvRDTEquivalentAbstractStates - 2" $ MonotonicCounterTest.testCvRDTEquivalentAbstractStates (undefined :: Fin 2)
, testProperty "testMergeIdempotent - 5" $ MonotonicCounterTest.testMergeIdempotent (undefined :: Fin 5)
, testProperty "testMergeCommutative - 4" $ MonotonicCounterTest.testMergeCommutative (undefined :: Fin 4)
, testProperty "UpdatesMonotonicallyAdvance - 12" $ MonotonicCounterTest.testUpdatesMonotonicallyAdvance (undefined :: Fin 12)
, testProperty "testCvRDTEquivalentAbstractStates - 22" $ MonotonicCounterTest.testCvRDTEquivalentAbstractStates (undefined :: Fin 22)
, testProperty "testMergeIdempotent - 2" $ MonotonicCounterTest.testMergeIdempotent (undefined :: Fin 2)
, testProperty "testMergeCommutative - 3" $ MonotonicCounterTest.testMergeCommutative (undefined :: Fin 3)
]
] | 1,701 | false | true | 0 | 11 | 359 | 292 | 147 | 145 | null | null |
karianna/jdk8_tl | jdk/src/macosx/native/jobjc/src/core/PrimitiveCoder.hs | gpl-2.0 | ffitype W64 Nulong = UINT64 | 27 | ffitype W64 Nulong = UINT64 | 27 | ffitype W64 Nulong = UINT64 | 27 | false | false | 0 | 5 | 4 | 13 | 5 | 8 | null | null |
silkapp/tagsoup | Text/HTML/TagSoup.hs | bsd-3-clause | -- | This function is similar to 'sections', but splits the list
-- so no element appears in any two partitions.
partitions :: (a -> Bool) -> [a] -> [[a]]
partitions p =
let notp = not . p
in groupBy (const notp) . dropWhile notp | 238 | partitions :: (a -> Bool) -> [a] -> [[a]]
partitions p =
let notp = not . p
in groupBy (const notp) . dropWhile notp | 123 | partitions p =
let notp = not . p
in groupBy (const notp) . dropWhile notp | 81 | true | true | 0 | 10 | 54 | 71 | 37 | 34 | null | null |
kawamuray/ganeti | src/Ganeti/OpParams.hs | gpl-2.0 | pDefaultIAllocator :: Field
pDefaultIAllocator =
withDoc "Default iallocator for cluster" $
optionalStringField "default_iallocator" | 136 | pDefaultIAllocator :: Field
pDefaultIAllocator =
withDoc "Default iallocator for cluster" $
optionalStringField "default_iallocator" | 136 | pDefaultIAllocator =
withDoc "Default iallocator for cluster" $
optionalStringField "default_iallocator" | 108 | false | true | 0 | 6 | 16 | 21 | 10 | 11 | null | null |
troydm/edda | src/EDDA/Data/Rest.hs | mit | names :: Str -> [Str]
names t =
case P.parseOnly nameList t of
Right s -> s
Left _ -> []
where nameList :: P.Parser [Str]
nameList = map T.pack <$> P.many1' (P.notChar ',') `P.sepBy'` (P.char ',' >> P.many' P.space) | 269 | names :: Str -> [Str]
names t =
case P.parseOnly nameList t of
Right s -> s
Left _ -> []
where nameList :: P.Parser [Str]
nameList = map T.pack <$> P.many1' (P.notChar ',') `P.sepBy'` (P.char ',' >> P.many' P.space) | 269 | names t =
case P.parseOnly nameList t of
Right s -> s
Left _ -> []
where nameList :: P.Parser [Str]
nameList = map T.pack <$> P.many1' (P.notChar ',') `P.sepBy'` (P.char ',' >> P.many' P.space) | 247 | false | true | 1 | 10 | 93 | 131 | 61 | 70 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.