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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
rueshyna/gogol | gogol-dfareporting/gen/Network/Google/DFAReporting/Types/Product.hs | mpl-2.0 | -- | Identifies what kind of resource this is. Value: the fixed string
-- \"dfareporting#userRolesListResponse\".
urlrKind :: Lens' UserRolesListResponse Text
urlrKind = lens _urlrKind (\ s a -> s{_urlrKind = a}) | 212 | urlrKind :: Lens' UserRolesListResponse Text
urlrKind = lens _urlrKind (\ s a -> s{_urlrKind = a}) | 98 | urlrKind = lens _urlrKind (\ s a -> s{_urlrKind = a}) | 53 | true | true | 1 | 9 | 30 | 45 | 23 | 22 | null | null |
ucla-pls/wiretap-tools | src/Wiretap/Data/MiniParser.hs | gpl-3.0 | drawWord16be :: MiniParser Word16
drawWord16be = MiniParser $ \bs ->
let (bs', rest) = BL.splitAt 4 bs in
if BL.length bs' == 4 then
let w1 = BL.index bs' 0
w2 = BL.index bs' 1
in
-- Borrowed from Data.Binary.Get
Just ( fromIntegral w1 `shiftl_w16` 8
.|. fromIntegral w2
, rest)
else Nothing | 354 | drawWord16be :: MiniParser Word16
drawWord16be = MiniParser $ \bs ->
let (bs', rest) = BL.splitAt 4 bs in
if BL.length bs' == 4 then
let w1 = BL.index bs' 0
w2 = BL.index bs' 1
in
-- Borrowed from Data.Binary.Get
Just ( fromIntegral w1 `shiftl_w16` 8
.|. fromIntegral w2
, rest)
else Nothing | 354 | drawWord16be = MiniParser $ \bs ->
let (bs', rest) = BL.splitAt 4 bs in
if BL.length bs' == 4 then
let w1 = BL.index bs' 0
w2 = BL.index bs' 1
in
-- Borrowed from Data.Binary.Get
Just ( fromIntegral w1 `shiftl_w16` 8
.|. fromIntegral w2
, rest)
else Nothing | 320 | false | true | 0 | 16 | 115 | 121 | 61 | 60 | null | null |
hiratara/TypedPerl | test/TypedPerl/Test/Parser.hs | bsd-3-clause | tests :: Test
tests = TestList [
(TestCase $ do
let Right t = parsePerl "1"
assertEqual "int" (PerlInt 1) t
)
, (TestCase $ do
let Right t = parsePerl "x(1)"
assertEqual "call" (PerlApp (PerlVar (VarSub "x")) [PerlInt 1]) t
)
, (TestCase $ do
let Right t = parsePerl "x()"
assertEqual "call no args" (PerlApp (PerlVar (VarSub "x")) []) t
)
, (TestCase $ do
let Right t = parsePerl "x(2, 3)"
assertEqual "call 2 args"
(PerlApp (PerlVar (VarSub "x")) (map PerlInt [2, 3])) t
)
, (TestCase $ do
let Right t = parsePerl "$x->(2, 3)"
assertEqual "call 2 args"
(PerlApp (PerlVar (VarNamed "x")) (map PerlInt [2, 3])) t
)
, (TestCase $ do
let Right t = parsePerl "bless {abc => 3}, \"MyClass\";"
assertEqual "perl object"
(PerlObj (M.fromList [("abc", PerlInt 3)]) "MyClass") t
)
, (TestCase $ do
let Right t = parsePerl "sub { $_[0]->{def} }"
assertEqual "Field access"
(PerlAbstract (PerlObjItem
(PerlImplicitItem (PerlVar VarSubImplicit) 0) "def"))
t
)
, (TestCase $ do
let Right t = parsePerl "1; package Hoge; 1; package Foo; 2;"
assertEqual "package"
(PerlSeq
(PerlInt 1)
(PerlSeq
(PerlPackage "Hoge" (PerlInt 1))
(PerlPackage "Foo" (PerlInt 2))
))
t
)
, (TestCase $ do
let Right t = parsePerl "package Hoge::Foo; 1; package main; 2; 3;"
assertEqual "package"
(PerlSeq
(PerlPackage "Hoge::Foo" (PerlInt 1))
(PerlPackage "main" (PerlSeq (PerlInt 2) (PerlInt 3)))
)
t
)
] | 1,851 | tests :: Test
tests = TestList [
(TestCase $ do
let Right t = parsePerl "1"
assertEqual "int" (PerlInt 1) t
)
, (TestCase $ do
let Right t = parsePerl "x(1)"
assertEqual "call" (PerlApp (PerlVar (VarSub "x")) [PerlInt 1]) t
)
, (TestCase $ do
let Right t = parsePerl "x()"
assertEqual "call no args" (PerlApp (PerlVar (VarSub "x")) []) t
)
, (TestCase $ do
let Right t = parsePerl "x(2, 3)"
assertEqual "call 2 args"
(PerlApp (PerlVar (VarSub "x")) (map PerlInt [2, 3])) t
)
, (TestCase $ do
let Right t = parsePerl "$x->(2, 3)"
assertEqual "call 2 args"
(PerlApp (PerlVar (VarNamed "x")) (map PerlInt [2, 3])) t
)
, (TestCase $ do
let Right t = parsePerl "bless {abc => 3}, \"MyClass\";"
assertEqual "perl object"
(PerlObj (M.fromList [("abc", PerlInt 3)]) "MyClass") t
)
, (TestCase $ do
let Right t = parsePerl "sub { $_[0]->{def} }"
assertEqual "Field access"
(PerlAbstract (PerlObjItem
(PerlImplicitItem (PerlVar VarSubImplicit) 0) "def"))
t
)
, (TestCase $ do
let Right t = parsePerl "1; package Hoge; 1; package Foo; 2;"
assertEqual "package"
(PerlSeq
(PerlInt 1)
(PerlSeq
(PerlPackage "Hoge" (PerlInt 1))
(PerlPackage "Foo" (PerlInt 2))
))
t
)
, (TestCase $ do
let Right t = parsePerl "package Hoge::Foo; 1; package main; 2; 3;"
assertEqual "package"
(PerlSeq
(PerlPackage "Hoge::Foo" (PerlInt 1))
(PerlPackage "main" (PerlSeq (PerlInt 2) (PerlInt 3)))
)
t
)
] | 1,851 | tests = TestList [
(TestCase $ do
let Right t = parsePerl "1"
assertEqual "int" (PerlInt 1) t
)
, (TestCase $ do
let Right t = parsePerl "x(1)"
assertEqual "call" (PerlApp (PerlVar (VarSub "x")) [PerlInt 1]) t
)
, (TestCase $ do
let Right t = parsePerl "x()"
assertEqual "call no args" (PerlApp (PerlVar (VarSub "x")) []) t
)
, (TestCase $ do
let Right t = parsePerl "x(2, 3)"
assertEqual "call 2 args"
(PerlApp (PerlVar (VarSub "x")) (map PerlInt [2, 3])) t
)
, (TestCase $ do
let Right t = parsePerl "$x->(2, 3)"
assertEqual "call 2 args"
(PerlApp (PerlVar (VarNamed "x")) (map PerlInt [2, 3])) t
)
, (TestCase $ do
let Right t = parsePerl "bless {abc => 3}, \"MyClass\";"
assertEqual "perl object"
(PerlObj (M.fromList [("abc", PerlInt 3)]) "MyClass") t
)
, (TestCase $ do
let Right t = parsePerl "sub { $_[0]->{def} }"
assertEqual "Field access"
(PerlAbstract (PerlObjItem
(PerlImplicitItem (PerlVar VarSubImplicit) 0) "def"))
t
)
, (TestCase $ do
let Right t = parsePerl "1; package Hoge; 1; package Foo; 2;"
assertEqual "package"
(PerlSeq
(PerlInt 1)
(PerlSeq
(PerlPackage "Hoge" (PerlInt 1))
(PerlPackage "Foo" (PerlInt 2))
))
t
)
, (TestCase $ do
let Right t = parsePerl "package Hoge::Foo; 1; package main; 2; 3;"
assertEqual "package"
(PerlSeq
(PerlPackage "Hoge::Foo" (PerlInt 1))
(PerlPackage "main" (PerlSeq (PerlInt 2) (PerlInt 3)))
)
t
)
] | 1,837 | false | true | 0 | 19 | 712 | 623 | 294 | 329 | null | null |
luzhuomi/cpp-obs | Language/C/Obfuscate/CFG.hs | apache-2.0 | -- require container's scalar copy, see SSA scalar copy
getVarsFromLHS (AST.CUnary op e _) = getVarsFromLHS e | 109 | getVarsFromLHS (AST.CUnary op e _) = getVarsFromLHS e | 53 | getVarsFromLHS (AST.CUnary op e _) = getVarsFromLHS e | 53 | true | false | 0 | 8 | 16 | 25 | 12 | 13 | null | null |
jsnajder/hofm | src/MorphGrammar/Hofm/Language/Croatian/Inflection.hs | bsd-3-clause | v21 = iPattern "V21" "Vm" -- prati (v5r3b)
(ends ["r"])
[rsfx "er" "rati" # ["n----"],
rsfx "er" "rat" # ["n"],
sfx "em" # ["ip1s"],
sfx "eš" # ["ip2s"],
sfx "e" # ["ip3s"],
sfx "emo" # ["ip1p"],
sfx "ete" # ["ip2p"],
sfx "u" # ["ip3p"],
sfx "i" # ["m-2s"],
sfx "ite" # ["m-1p"],
sfx "imo" # ["m-1p"],
sfx "ući" # ["gp"],
rsfx "er" "ravši" # ["gs"],
rsfx "er" "rao" # ["pp-s"],
rsfx "er" "rala" # ["pp-s"],
rsfx "er" "ralo" # ["pp-s"],
rsfx "er" "rali" # ["pp-p"],
rsfx "er" "rale" # ["pp-p"]] | 646 | v21 = iPattern "V21" "Vm" -- prati (v5r3b)
(ends ["r"])
[rsfx "er" "rati" # ["n----"],
rsfx "er" "rat" # ["n"],
sfx "em" # ["ip1s"],
sfx "eš" # ["ip2s"],
sfx "e" # ["ip3s"],
sfx "emo" # ["ip1p"],
sfx "ete" # ["ip2p"],
sfx "u" # ["ip3p"],
sfx "i" # ["m-2s"],
sfx "ite" # ["m-1p"],
sfx "imo" # ["m-1p"],
sfx "ući" # ["gp"],
rsfx "er" "ravši" # ["gs"],
rsfx "er" "rao" # ["pp-s"],
rsfx "er" "rala" # ["pp-s"],
rsfx "er" "ralo" # ["pp-s"],
rsfx "er" "rali" # ["pp-p"],
rsfx "er" "rale" # ["pp-p"]] | 646 | v21 = iPattern "V21" "Vm" -- prati (v5r3b)
(ends ["r"])
[rsfx "er" "rati" # ["n----"],
rsfx "er" "rat" # ["n"],
sfx "em" # ["ip1s"],
sfx "eš" # ["ip2s"],
sfx "e" # ["ip3s"],
sfx "emo" # ["ip1p"],
sfx "ete" # ["ip2p"],
sfx "u" # ["ip3p"],
sfx "i" # ["m-2s"],
sfx "ite" # ["m-1p"],
sfx "imo" # ["m-1p"],
sfx "ući" # ["gp"],
rsfx "er" "ravši" # ["gs"],
rsfx "er" "rao" # ["pp-s"],
rsfx "er" "rala" # ["pp-s"],
rsfx "er" "ralo" # ["pp-s"],
rsfx "er" "rali" # ["pp-p"],
rsfx "er" "rale" # ["pp-p"]] | 646 | false | false | 0 | 7 | 242 | 277 | 147 | 130 | null | null |
tbarnetlamb/hyphen | hyphen/lowlevel_src/HyphenBase.hs | gpl-2.0 | -- Arrange that Either ErrMsg is a monad by creating an Error (ErrMsg)
-- instance. We also define a 'report' function which raises an error
-- in this monad.
report = Left . ErrMsg . T.pack :: String -> Either ErrMsg a | 221 | report = Left . ErrMsg . T.pack :: String -> Either ErrMsg a | 60 | report = Left . ErrMsg . T.pack :: String -> Either ErrMsg a | 60 | true | false | 4 | 5 | 43 | 32 | 16 | 16 | null | null |
nuttycom/haskoin | Network/Haskoin/Script/SigHash.hs | unlicense | txSigHash :: Tx -- ^ Transaction to sign.
-> Script -- ^ Output script that is being spent.
-> Int -- ^ Index of the input that is being signed.
-> SigHash -- ^ What parts of the transaction should be signed.
-> Word256 -- ^ Result hash to be signed.
txSigHash tx out i sh = do
let newIn = buildInputs (txIn tx) out i sh
-- When SigSingle and input index > outputs, then sign integer 1
fromMaybe (setBit 0 248) $ do
newOut <- buildOutputs (txOut tx) i sh
let newTx = tx{ txIn = newIn, txOut = newOut }
return $ doubleHash256 $ encode' newTx `BS.append` encodeSigHash32 sh
-- Builds transaction inputs for computing SigHashes | 711 | txSigHash :: Tx -- ^ Transaction to sign.
-> Script -- ^ Output script that is being spent.
-> Int -- ^ Index of the input that is being signed.
-> SigHash -- ^ What parts of the transaction should be signed.
-> Word256
txSigHash tx out i sh = do
let newIn = buildInputs (txIn tx) out i sh
-- When SigSingle and input index > outputs, then sign integer 1
fromMaybe (setBit 0 248) $ do
newOut <- buildOutputs (txOut tx) i sh
let newTx = tx{ txIn = newIn, txOut = newOut }
return $ doubleHash256 $ encode' newTx `BS.append` encodeSigHash32 sh
-- Builds transaction inputs for computing SigHashes | 680 | txSigHash tx out i sh = do
let newIn = buildInputs (txIn tx) out i sh
-- When SigSingle and input index > outputs, then sign integer 1
fromMaybe (setBit 0 248) $ do
newOut <- buildOutputs (txOut tx) i sh
let newTx = tx{ txIn = newIn, txOut = newOut }
return $ doubleHash256 $ encode' newTx `BS.append` encodeSigHash32 sh
-- Builds transaction inputs for computing SigHashes | 410 | true | true | 0 | 14 | 205 | 153 | 78 | 75 | null | null |
MathiasVP/syntax-checker-checker | qcsyntax.hs | mit | shrinkExpression (Boolean _) = [] | 33 | shrinkExpression (Boolean _) = [] | 33 | shrinkExpression (Boolean _) = [] | 33 | false | false | 0 | 7 | 4 | 17 | 8 | 9 | null | null |
wrengr/bytestring-trie | dev/Test/Validity.hs | bsd-3-clause | maskRespected :: Trie a -> Bool
maskRespected = go
where
go Empty = True
go (Arc _ _ t) = go t
go (Branch _ m l r) = and
-- TODO: fix this O(n^2) traversal of the collection of branches.
[ all (\x -> BT.zero x m) (keyHeads l)
, all (\x -> not (BT.zero x m)) (keyHeads r)
, go l
, go r
]
----------------------------------------------------------------
----------------------------------------------------------- fin. | 503 | maskRespected :: Trie a -> Bool
maskRespected = go
where
go Empty = True
go (Arc _ _ t) = go t
go (Branch _ m l r) = and
-- TODO: fix this O(n^2) traversal of the collection of branches.
[ all (\x -> BT.zero x m) (keyHeads l)
, all (\x -> not (BT.zero x m)) (keyHeads r)
, go l
, go r
]
----------------------------------------------------------------
----------------------------------------------------------- fin. | 503 | maskRespected = go
where
go Empty = True
go (Arc _ _ t) = go t
go (Branch _ m l r) = and
-- TODO: fix this O(n^2) traversal of the collection of branches.
[ all (\x -> BT.zero x m) (keyHeads l)
, all (\x -> not (BT.zero x m)) (keyHeads r)
, go l
, go r
]
----------------------------------------------------------------
----------------------------------------------------------- fin. | 471 | false | true | 0 | 13 | 156 | 162 | 78 | 84 | null | null |
remyoudompheng/hs-language-go | tests/Tests/Types.hs | gpl-3.0 | uI = IfaceType (M.singleton "m" (Signature [] [nInt] False)) | 60 | uI = IfaceType (M.singleton "m" (Signature [] [nInt] False)) | 60 | uI = IfaceType (M.singleton "m" (Signature [] [nInt] False)) | 60 | false | false | 1 | 10 | 8 | 38 | 17 | 21 | null | null |
bgbianchi/sorting | hs/PLRTree.hs | mit | last (Right _ _ r) = last r | 27 | last (Right _ _ r) = last r | 27 | last (Right _ _ r) = last r | 27 | false | false | 0 | 6 | 7 | 23 | 10 | 13 | null | null |
themoritz/cabal | Cabal/Distribution/Simple/Setup.hs | bsd-3-clause | readPackageDbList other = [Just (SpecificPackageDB other)] | 61 | readPackageDbList other = [Just (SpecificPackageDB other)] | 61 | readPackageDbList other = [Just (SpecificPackageDB other)] | 61 | false | false | 0 | 8 | 8 | 21 | 10 | 11 | null | null |
nevrenato/HetsAlloy | CSL/AS_BASIC_CSL.hs | gpl-2.0 | {- | Mapping of operator names to arity-'OpInfo'-maps (an operator may
behave differently for different arities). -}
getOpInfoMap :: (OpInfo -> String) -> [OpInfo] -> OpInfoMap
getOpInfoMap pf = foldl f Map.empty
where f m oi = Map.insertWith Map.union (pf oi)
(Map.fromList [(arity oi, oi)]) m
-- | Same as operatorInfoMap but with keys of type OPNAME instead of String | 394 | getOpInfoMap :: (OpInfo -> String) -> [OpInfo] -> OpInfoMap
getOpInfoMap pf = foldl f Map.empty
where f m oi = Map.insertWith Map.union (pf oi)
(Map.fromList [(arity oi, oi)]) m
-- | Same as operatorInfoMap but with keys of type OPNAME instead of String | 277 | getOpInfoMap pf = foldl f Map.empty
where f m oi = Map.insertWith Map.union (pf oi)
(Map.fromList [(arity oi, oi)]) m
-- | Same as operatorInfoMap but with keys of type OPNAME instead of String | 217 | true | true | 1 | 10 | 83 | 105 | 49 | 56 | null | null |
chreekat/snowdrift | Handler/Project.hs | agpl-3.0 | getEditProjectR :: Text -> Handler Html
getEditProjectR project_handle = do
(_, Entity project_id project) <-
requireRolesAny [Admin] project_handle "You do not have permission to edit this project."
tags <- runDB $
select $
from $ \(p_t `InnerJoin` tag) -> do
on_ (p_t ^. ProjectTagTag ==. tag ^. TagId)
where_ (p_t ^. ProjectTagProject ==. val project_id)
return tag
(project_form, _) <- generateFormPost $ editProjectForm (Just (project, map (tagName . entityVal) tags))
defaultLayout $ do
snowdriftTitle $ projectName project
$(widgetFile "edit_project")
--------------------------------------------------------------------------------
-- /feed
-- | This function is responsible for hitting every relevant event table. Nothing
-- statically guarantees that. | 846 | getEditProjectR :: Text -> Handler Html
getEditProjectR project_handle = do
(_, Entity project_id project) <-
requireRolesAny [Admin] project_handle "You do not have permission to edit this project."
tags <- runDB $
select $
from $ \(p_t `InnerJoin` tag) -> do
on_ (p_t ^. ProjectTagTag ==. tag ^. TagId)
where_ (p_t ^. ProjectTagProject ==. val project_id)
return tag
(project_form, _) <- generateFormPost $ editProjectForm (Just (project, map (tagName . entityVal) tags))
defaultLayout $ do
snowdriftTitle $ projectName project
$(widgetFile "edit_project")
--------------------------------------------------------------------------------
-- /feed
-- | This function is responsible for hitting every relevant event table. Nothing
-- statically guarantees that. | 846 | getEditProjectR project_handle = do
(_, Entity project_id project) <-
requireRolesAny [Admin] project_handle "You do not have permission to edit this project."
tags <- runDB $
select $
from $ \(p_t `InnerJoin` tag) -> do
on_ (p_t ^. ProjectTagTag ==. tag ^. TagId)
where_ (p_t ^. ProjectTagProject ==. val project_id)
return tag
(project_form, _) <- generateFormPost $ editProjectForm (Just (project, map (tagName . entityVal) tags))
defaultLayout $ do
snowdriftTitle $ projectName project
$(widgetFile "edit_project")
--------------------------------------------------------------------------------
-- /feed
-- | This function is responsible for hitting every relevant event table. Nothing
-- statically guarantees that. | 806 | false | true | 0 | 16 | 183 | 204 | 101 | 103 | null | null |
brendanhay/gogol | gogol-shopping-content/gen/Network/Google/Resource/Content/Regions/Patch.hs | mpl-2.0 | -- | OAuth access token.
rpAccessToken :: Lens' RegionsPatch (Maybe Text)
rpAccessToken
= lens _rpAccessToken
(\ s a -> s{_rpAccessToken = a}) | 150 | rpAccessToken :: Lens' RegionsPatch (Maybe Text)
rpAccessToken
= lens _rpAccessToken
(\ s a -> s{_rpAccessToken = a}) | 125 | rpAccessToken
= lens _rpAccessToken
(\ s a -> s{_rpAccessToken = a}) | 76 | true | true | 1 | 9 | 29 | 52 | 25 | 27 | null | null |
MarcusVoelker/LParse | src/Text/LParse/Metaparser.hs | mit | rulesetParser :: M.Map String (Parser r' String AST) -> Parser r [Token] (M.Map String (Parser r' String AST))
rulesetParser m = M.fromList<$> sepMany (consumeSingle Sep) (ruleParser m) | 185 | rulesetParser :: M.Map String (Parser r' String AST) -> Parser r [Token] (M.Map String (Parser r' String AST))
rulesetParser m = M.fromList<$> sepMany (consumeSingle Sep) (ruleParser m) | 185 | rulesetParser m = M.fromList<$> sepMany (consumeSingle Sep) (ruleParser m) | 74 | false | true | 0 | 11 | 26 | 92 | 44 | 48 | null | null |
alexbiehl/hoop | hadoop-protos/src/Hadoop/Protos/DatanodeProtocolProtos/BlockIdCommandProto/Action.hs | mit | toMaybe'Enum _ = Prelude'.Nothing | 33 | toMaybe'Enum _ = Prelude'.Nothing | 33 | toMaybe'Enum _ = Prelude'.Nothing | 33 | false | false | 0 | 5 | 3 | 12 | 5 | 7 | null | null |
NightRa/FurnitureAI | src/Model.hs | mit | showMat f sep grid = unlines (mkString f sep <$> grid) | 54 | showMat f sep grid = unlines (mkString f sep <$> grid) | 54 | showMat f sep grid = unlines (mkString f sep <$> grid) | 54 | false | false | 0 | 8 | 10 | 28 | 13 | 15 | null | null |
glguy/irc-core | src/Client/View/IgnoreList.hs | isc | -- | Render a summary describing the number of ignore masks.
summaryLine ::
HashSet Identifier {- ^ ignore masks -} ->
Palette {- ^ palette -} ->
Image'
summaryLine ignores pal
| null ignores = text' (view palError pal) "Ignore list empty"
| otherwise = text' (view palLabel pal) "Ignore entries: "
<> string defAttr (show (length ignores)) | 385 | summaryLine ::
HashSet Identifier {- ^ ignore masks -} ->
Palette {- ^ palette -} ->
Image'
summaryLine ignores pal
| null ignores = text' (view palError pal) "Ignore list empty"
| otherwise = text' (view palLabel pal) "Ignore entries: "
<> string defAttr (show (length ignores)) | 324 | summaryLine ignores pal
| null ignores = text' (view palError pal) "Ignore list empty"
| otherwise = text' (view palLabel pal) "Ignore entries: "
<> string defAttr (show (length ignores)) | 210 | true | true | 1 | 10 | 102 | 93 | 45 | 48 | null | null |
MoixaEnergy/blaze-react | src/Text/Blaze/Event/Keycode.hs | mit | ab = Keycode 9
| 30 | tab = Keycode 9 | 30 | tab = Keycode 9 | 30 | false | false | 1 | 4 | 19 | 12 | 4 | 8 | null | null |
carabolic/IMDBhs | app/Main.hs | bsd-3-clause | handleMovies :: (Int, MoviesList) -> IO ()
handleMovies (_, Error t) = IO.hPutStrLn stderr t | 92 | handleMovies :: (Int, MoviesList) -> IO ()
handleMovies (_, Error t) = IO.hPutStrLn stderr t | 92 | handleMovies (_, Error t) = IO.hPutStrLn stderr t | 49 | false | true | 0 | 7 | 14 | 45 | 23 | 22 | null | null |
HJvT/hdirect | src/Parser.hs | bsd-3-clause | action_419 (41#) = happyGoto action_271 | 39 | action_419 (41#) = happyGoto action_271 | 39 | action_419 (41#) = happyGoto action_271 | 39 | false | false | 0 | 6 | 4 | 15 | 7 | 8 | null | null |
jmitchell/Idris-dev | src/Idris/Core/TT.hs | bsd-3-clause | fmapMB f (PVTy t) = liftM PVTy (f t) | 39 | fmapMB f (PVTy t) = liftM PVTy (f t) | 39 | fmapMB f (PVTy t) = liftM PVTy (f t) | 39 | false | false | 0 | 7 | 11 | 30 | 13 | 17 | null | null |
codders/gp3 | src/BPackReader.hs | gpl-3.0 | -- In an uncompressed gliph stream, the bitplanes are interleaved pairs of bytes
readGliphStream :: L.ByteString -> Maybe [Gliph]
readGliphStream stream = blocksForBitplanes (pairs 0 sEights) (pairs 1 sEights) (pairs 2 sEights) (pairs 3 sEights)
where sEights = eights stream
eights astream | L.length astream > 8 = let (head, tail) = L.splitAt 8 astream
in (L.unpack head) : eights tail
| otherwise = [L.unpack astream]
pairs n (h:t) = (L.pack $ take 2 (drop (2*n) h)) `L.append` (pairs n t)
pairs _ [] = L.empty
-- Skip the head then parse the remaining bytes | 811 | readGliphStream :: L.ByteString -> Maybe [Gliph]
readGliphStream stream = blocksForBitplanes (pairs 0 sEights) (pairs 1 sEights) (pairs 2 sEights) (pairs 3 sEights)
where sEights = eights stream
eights astream | L.length astream > 8 = let (head, tail) = L.splitAt 8 astream
in (L.unpack head) : eights tail
| otherwise = [L.unpack astream]
pairs n (h:t) = (L.pack $ take 2 (drop (2*n) h)) `L.append` (pairs n t)
pairs _ [] = L.empty
-- Skip the head then parse the remaining bytes | 730 | readGliphStream stream = blocksForBitplanes (pairs 0 sEights) (pairs 1 sEights) (pairs 2 sEights) (pairs 3 sEights)
where sEights = eights stream
eights astream | L.length astream > 8 = let (head, tail) = L.splitAt 8 astream
in (L.unpack head) : eights tail
| otherwise = [L.unpack astream]
pairs n (h:t) = (L.pack $ take 2 (drop (2*n) h)) `L.append` (pairs n t)
pairs _ [] = L.empty
-- Skip the head then parse the remaining bytes | 681 | true | true | 0 | 14 | 344 | 239 | 118 | 121 | null | null |
dosenfrucht/mcasm | src/Transform.hs | gpl-2.0 | readLabels start (Error _ : xs) = readLabels start xs | 64 | readLabels start (Error _ : xs) = readLabels start xs | 64 | readLabels start (Error _ : xs) = readLabels start xs | 64 | false | false | 0 | 7 | 20 | 28 | 12 | 16 | null | null |
schell/hdevtools | src/Main.hs | mit | doModuleFile :: FilePath -> HDevTools -> CommandExtra -> IO ()
doModuleFile sock args extra =
serverCommand sock (CmdModuleFile (module_ args)) extra | 153 | doModuleFile :: FilePath -> HDevTools -> CommandExtra -> IO ()
doModuleFile sock args extra =
serverCommand sock (CmdModuleFile (module_ args)) extra | 153 | doModuleFile sock args extra =
serverCommand sock (CmdModuleFile (module_ args)) extra | 90 | false | true | 0 | 9 | 24 | 58 | 27 | 31 | null | null |
bbangert/push-tester | tests/PushTests.hs | mpl-2.0 | prop_prior_regged :: ValidUaid -> ValidChannelID -> Property
prop_prior_regged (ValidUaid hex) (ValidChannelID jid@(Just cid)) =
resultsIn [
(Hello hex (Just [cid]), HelloSuccess hex (Just [cid]))
, (Register jid, RegisterSuccess jid)
, (SendNotification Nothing Nothing, NotificationUpdate 1)
, (UnRegister jid, UnRegisterSuccess)
] | 395 | prop_prior_regged :: ValidUaid -> ValidChannelID -> Property
prop_prior_regged (ValidUaid hex) (ValidChannelID jid@(Just cid)) =
resultsIn [
(Hello hex (Just [cid]), HelloSuccess hex (Just [cid]))
, (Register jid, RegisterSuccess jid)
, (SendNotification Nothing Nothing, NotificationUpdate 1)
, (UnRegister jid, UnRegisterSuccess)
] | 395 | prop_prior_regged (ValidUaid hex) (ValidChannelID jid@(Just cid)) =
resultsIn [
(Hello hex (Just [cid]), HelloSuccess hex (Just [cid]))
, (Register jid, RegisterSuccess jid)
, (SendNotification Nothing Nothing, NotificationUpdate 1)
, (UnRegister jid, UnRegisterSuccess)
] | 334 | false | true | 1 | 10 | 101 | 137 | 69 | 68 | null | null |
peterspackman/hsqc | src/Integrals.hs | gpl-3.0 | normFactor :: Gaussian -> Double
normFactor Gaussian {α = α, momenta = (l, m, n) } =
((fromIntegral (f1 * f2 * f3)) * ((pi / (2.0 * α)) ** 1.5)
/ (fromIntegral (2^(2*lmn)) * α^lmn)) ** (-0.5)
where
f = factorial
lmn = l + m + n
f1 = f (2*l - 1)
f2 = f (2*m - 1)
f3 = f (2*n - 1) | 316 | normFactor :: Gaussian -> Double
normFactor Gaussian {α = α, momenta = (l, m, n) } =
((fromIntegral (f1 * f2 * f3)) * ((pi / (2.0 * α)) ** 1.5)
/ (fromIntegral (2^(2*lmn)) * α^lmn)) ** (-0.5)
where
f = factorial
lmn = l + m + n
f1 = f (2*l - 1)
f2 = f (2*m - 1)
f3 = f (2*n - 1) | 316 | normFactor Gaussian {α = α, momenta = (l, m, n) } =
((fromIntegral (f1 * f2 * f3)) * ((pi / (2.0 * α)) ** 1.5)
/ (fromIntegral (2^(2*lmn)) * α^lmn)) ** (-0.5)
where
f = factorial
lmn = l + m + n
f1 = f (2*l - 1)
f2 = f (2*m - 1)
f3 = f (2*n - 1) | 283 | false | true | 0 | 15 | 104 | 206 | 112 | 94 | null | null |
gchrupala/morfette | src/GramLab/Data/Diff/EditTree.hs | bsd-2-clause | check (Replace s s') w = s == w | 37 | check (Replace s s') w = s == w | 37 | check (Replace s s') w = s == w | 37 | false | false | 0 | 7 | 14 | 23 | 11 | 12 | null | null |
unisonweb/platform | parser-typechecker/src/Unison/Util/Free.hs | mit | foldWithIndex :: forall f m a . Monad m => (forall x. Int -> f x -> m x) -> Free f a -> m a
foldWithIndex f m = go 0 f m
where go :: Int -> (forall x. Int -> f x -> m x) -> Free f a -> m a
go starting f m = case m of
Pure a -> pure a
Bind x k -> (f starting x) >>= (go $ starting + 1) f . k | 356 | foldWithIndex :: forall f m a . Monad m => (forall x. Int -> f x -> m x) -> Free f a -> m a
foldWithIndex f m = go 0 f m
where go :: Int -> (forall x. Int -> f x -> m x) -> Free f a -> m a
go starting f m = case m of
Pure a -> pure a
Bind x k -> (f starting x) >>= (go $ starting + 1) f . k | 356 | foldWithIndex f m = go 0 f m
where go :: Int -> (forall x. Int -> f x -> m x) -> Free f a -> m a
go starting f m = case m of
Pure a -> pure a
Bind x k -> (f starting x) >>= (go $ starting + 1) f . k | 264 | false | true | 0 | 13 | 149 | 205 | 96 | 109 | null | null |
oldmanmike/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | coercionTokenIdKey :: Unique
coercionTokenIdKey = mkPreludeMiscIdUnique 124 | 78 | coercionTokenIdKey :: Unique
coercionTokenIdKey = mkPreludeMiscIdUnique 124 | 78 | coercionTokenIdKey = mkPreludeMiscIdUnique 124 | 49 | false | true | 0 | 5 | 9 | 14 | 7 | 7 | null | null |
brendanhay/gogol | gogol-apps-reseller/gen/Network/Google/Resource/Reseller/Subscriptions/List.hs | mpl-2.0 | -- | The \`customerAuthToken\` query string is required when creating a
-- resold account that transfers a direct customer\'s subscription or
-- transfers another reseller customer\'s subscription to your reseller
-- management. This is a hexadecimal authentication token needed to
-- complete the subscription transfer. For more information, see the
-- administrator help center.
slCustomerAuthToken :: Lens' SubscriptionsList (Maybe Text)
slCustomerAuthToken
= lens _slCustomerAuthToken
(\ s a -> s{_slCustomerAuthToken = a}) | 535 | slCustomerAuthToken :: Lens' SubscriptionsList (Maybe Text)
slCustomerAuthToken
= lens _slCustomerAuthToken
(\ s a -> s{_slCustomerAuthToken = a}) | 154 | slCustomerAuthToken
= lens _slCustomerAuthToken
(\ s a -> s{_slCustomerAuthToken = a}) | 94 | true | true | 0 | 9 | 78 | 53 | 30 | 23 | null | null |
sdiehl/ghc | testsuite/tests/gadt/T14808.hs | bsd-3-clause | f2 :: [()] -> ECC2 [] () ()
f2 = ECC2 @() @[] @() | 49 | f2 :: [()] -> ECC2 [] () ()
f2 = ECC2 @() @[] @() | 49 | f2 = ECC2 @() @[] @() | 21 | false | true | 0 | 8 | 13 | 60 | 27 | 33 | null | null |
cbarrett/bracer | Language/Bracer/Backends/C/Parser/Types.hs | mit | parseFunctionAppendix :: CParser (Endo TypeT)
parseFunctionAppendix = do
funcs <- parens (parseParameter `sepBy` comma)
return (Endo $ \x -> C.iFunction Anonymous x funcs)
-- | Parses an array modifier with an optional length. | 241 | parseFunctionAppendix :: CParser (Endo TypeT)
parseFunctionAppendix = do
funcs <- parens (parseParameter `sepBy` comma)
return (Endo $ \x -> C.iFunction Anonymous x funcs)
-- | Parses an array modifier with an optional length. | 239 | parseFunctionAppendix = do
funcs <- parens (parseParameter `sepBy` comma)
return (Endo $ \x -> C.iFunction Anonymous x funcs)
-- | Parses an array modifier with an optional length. | 193 | false | true | 0 | 12 | 47 | 67 | 34 | 33 | null | null |
corajr/adventofcode2015 | 1/floor2.hs | mit | whichFloor (x:xs) n i =
let increment = case x of
'(' -> 1
')' -> -1
_ -> 0
in whichFloor xs (n + increment) (i + 1) | 144 | whichFloor (x:xs) n i =
let increment = case x of
'(' -> 1
')' -> -1
_ -> 0
in whichFloor xs (n + increment) (i + 1) | 144 | whichFloor (x:xs) n i =
let increment = case x of
'(' -> 1
')' -> -1
_ -> 0
in whichFloor xs (n + increment) (i + 1) | 144 | false | false | 0 | 12 | 56 | 76 | 38 | 38 | null | null |
pepeiborra/narradar | src/Narradar/Processor/Aprove.hs | bsd-3-clause | funAppP = tokenP $ tagP "<fun-app>" $ do
skipMany tagText
symb_tag <- tokenP (tag "<symbol>" <* tag "</symbol>")
tt <- many termP
skipMany tagText
let symb = fromAttrib "name" symb_tag
return (term symb tt)
-- Only works for Narradar, assumes a term given to AproVE by Narradar | 357 | funAppP = tokenP $ tagP "<fun-app>" $ do
skipMany tagText
symb_tag <- tokenP (tag "<symbol>" <* tag "</symbol>")
tt <- many termP
skipMany tagText
let symb = fromAttrib "name" symb_tag
return (term symb tt)
-- Only works for Narradar, assumes a term given to AproVE by Narradar | 357 | funAppP = tokenP $ tagP "<fun-app>" $ do
skipMany tagText
symb_tag <- tokenP (tag "<symbol>" <* tag "</symbol>")
tt <- many termP
skipMany tagText
let symb = fromAttrib "name" symb_tag
return (term symb tt)
-- Only works for Narradar, assumes a term given to AproVE by Narradar | 357 | false | false | 0 | 12 | 126 | 91 | 39 | 52 | null | null |
NotBrianZach/postgrest | src/PostgREST/QueryBuilder.hs | mit | pgFmtAs _ (Just alias) = " AS " <> pgFmtIdent alias | 51 | pgFmtAs _ (Just alias) = " AS " <> pgFmtIdent alias | 51 | pgFmtAs _ (Just alias) = " AS " <> pgFmtIdent alias | 51 | false | false | 0 | 7 | 10 | 24 | 11 | 13 | null | null |
fmapfmapfmap/amazonka | amazonka-ec2/gen/Network/AWS/EC2/DescribeVPCEndpoints.hs | mpl-2.0 | -- | One or more filters.
--
-- - 'service-name': The name of the AWS service.
--
-- - 'vpc-id': The ID of the VPC in which the endpoint resides.
--
-- - 'vpc-endpoint-id': The ID of the endpoint.
--
-- - 'vpc-endpoint-state': The state of the endpoint. ('pending' |
-- 'available' | 'deleting' | 'deleted')
--
dvpceFilters :: Lens' DescribeVPCEndpoints [Filter]
dvpceFilters = lens _dvpceFilters (\ s a -> s{_dvpceFilters = a}) . _Default . _Coerce | 461 | dvpceFilters :: Lens' DescribeVPCEndpoints [Filter]
dvpceFilters = lens _dvpceFilters (\ s a -> s{_dvpceFilters = a}) . _Default . _Coerce | 138 | dvpceFilters = lens _dvpceFilters (\ s a -> s{_dvpceFilters = a}) . _Default . _Coerce | 86 | true | true | 0 | 11 | 88 | 61 | 38 | 23 | null | null |
kelnage/tamarin-prover | lib/theory/src/Theory/Constraint/Solver/Goals.hs | gpl-3.0 | solveAction :: [RuleAC] -- ^ All rules labelled with an action
-> (NodeId, LNFact) -- ^ The action we are looking for.
-> Reduction String -- ^ A sensible case name.
solveAction rules (i, fa) = do
mayRu <- M.lookup i <$> getM sNodes
showRuleCaseName <$> case mayRu of
Nothing -> do ru <- labelNodeId i rules Nothing
act <- disjunctionOfList $ get rActs ru
void (solveFactEqs SplitNow [Equal fa act])
return ru
Just ru -> do unless (fa `elem` get rActs ru) $ do
act <- disjunctionOfList $ get rActs ru
void (solveFactEqs SplitNow [Equal fa act])
return ru
-- | CR-rules *DG_{2,P}* and *DG_{2,d}*: solve a premise with a direct edge
-- from a unifying conclusion or using a destruction chain.
--
-- Note that *In*, *Fr*, and *KU* facts are solved directly when adding a
-- 'ruleNode'.
-- | 987 | solveAction :: [RuleAC] -- ^ All rules labelled with an action
-> (NodeId, LNFact) -- ^ The action we are looking for.
-> Reduction String
solveAction rules (i, fa) = do
mayRu <- M.lookup i <$> getM sNodes
showRuleCaseName <$> case mayRu of
Nothing -> do ru <- labelNodeId i rules Nothing
act <- disjunctionOfList $ get rActs ru
void (solveFactEqs SplitNow [Equal fa act])
return ru
Just ru -> do unless (fa `elem` get rActs ru) $ do
act <- disjunctionOfList $ get rActs ru
void (solveFactEqs SplitNow [Equal fa act])
return ru
-- | CR-rules *DG_{2,P}* and *DG_{2,d}*: solve a premise with a direct edge
-- from a unifying conclusion or using a destruction chain.
--
-- Note that *In*, *Fr*, and *KU* facts are solved directly when adding a
-- 'ruleNode'.
-- | 959 | solveAction rules (i, fa) = do
mayRu <- M.lookup i <$> getM sNodes
showRuleCaseName <$> case mayRu of
Nothing -> do ru <- labelNodeId i rules Nothing
act <- disjunctionOfList $ get rActs ru
void (solveFactEqs SplitNow [Equal fa act])
return ru
Just ru -> do unless (fa `elem` get rActs ru) $ do
act <- disjunctionOfList $ get rActs ru
void (solveFactEqs SplitNow [Equal fa act])
return ru
-- | CR-rules *DG_{2,P}* and *DG_{2,d}*: solve a premise with a direct edge
-- from a unifying conclusion or using a destruction chain.
--
-- Note that *In*, *Fr*, and *KU* facts are solved directly when adding a
-- 'ruleNode'.
-- | 786 | true | true | 0 | 22 | 342 | 228 | 109 | 119 | null | null |
jwiegley/ghc-release | libraries/process/System/Process/Internals.hs | gpl-3.0 | fd_stdin, fd_stdout, fd_stderr :: FD
fd_stdin = 0 | 50 | fd_stdin, fd_stdout, fd_stderr :: FD
fd_stdin = 0 | 50 | fd_stdin = 0 | 13 | false | true | 4 | 6 | 8 | 27 | 10 | 17 | null | null |
GaloisInc/halvm-ghc | compiler/basicTypes/BasicTypes.hs | bsd-3-clause | minPrecedence = 0 | 17 | minPrecedence = 0 | 17 | minPrecedence = 0 | 17 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
trskop/install-paths | src/System/Environment/InstallPaths.hs | bsd-3-clause | -- {{{ Get Directories File Path ----------------------------------------------
-- | Get file path of specified directory based on provided 'Parameters'.
--
-- Same as 'getDir'', but with flipped arguments.
getDir :: Parameters -> Directory -> IO FilePath
getDir = flip getDir' | 278 | getDir :: Parameters -> Directory -> IO FilePath
getDir = flip getDir' | 70 | getDir = flip getDir' | 21 | true | true | 0 | 7 | 40 | 29 | 16 | 13 | null | null |
damoxc/ganeti | src/Ganeti/Config.hs | gpl-2.0 | -- | Returns the default cluster hypervisor.
getDefaultHypervisor :: ConfigData -> Hypervisor
getDefaultHypervisor cfg =
case clusterEnabledHypervisors $ configCluster cfg of
-- FIXME: this case shouldn't happen (configuration broken), but
-- for now we handle it here because we're not authoritative for
-- the config
[] -> XenPvm
x:_ -> x
-- | Returns instances of a given link. | 404 | getDefaultHypervisor :: ConfigData -> Hypervisor
getDefaultHypervisor cfg =
case clusterEnabledHypervisors $ configCluster cfg of
-- FIXME: this case shouldn't happen (configuration broken), but
-- for now we handle it here because we're not authoritative for
-- the config
[] -> XenPvm
x:_ -> x
-- | Returns instances of a given link. | 359 | getDefaultHypervisor cfg =
case clusterEnabledHypervisors $ configCluster cfg of
-- FIXME: this case shouldn't happen (configuration broken), but
-- for now we handle it here because we're not authoritative for
-- the config
[] -> XenPvm
x:_ -> x
-- | Returns instances of a given link. | 310 | true | true | 0 | 8 | 82 | 58 | 29 | 29 | null | null |
sjoerdvisscher/fmlist | Data/FMList.hs | bsd-3-clause | init :: FMList a -> FMList a
init l = case viewr l of
EmptyR -> error "Data.FMList.init: empty list"
l' :> _ -> l' | 133 | init :: FMList a -> FMList a
init l = case viewr l of
EmptyR -> error "Data.FMList.init: empty list"
l' :> _ -> l' | 133 | init l = case viewr l of
EmptyR -> error "Data.FMList.init: empty list"
l' :> _ -> l' | 96 | false | true | 2 | 6 | 43 | 48 | 22 | 26 | null | null |
luqui/collada | Graphics/Formats/Collada/Render.hs | bsd-3-clause | compileNodeObject :: O.ID -> CompileM (DrawM ())
compileNodeObject = cached go
where
go (O.ONode node) = compileNode node
go _ = fail "Not a node" | 158 | compileNodeObject :: O.ID -> CompileM (DrawM ())
compileNodeObject = cached go
where
go (O.ONode node) = compileNode node
go _ = fail "Not a node" | 158 | compileNodeObject = cached go
where
go (O.ONode node) = compileNode node
go _ = fail "Not a node" | 109 | false | true | 0 | 10 | 36 | 63 | 30 | 33 | null | null |
reiddraper/cauterize | src/Cauterize/Dynamic/Unpack.hs | bsd-3-clause | unpackTag C.BIu32 = liftM fromIntegral getWord32le | 50 | unpackTag C.BIu32 = liftM fromIntegral getWord32le | 50 | unpackTag C.BIu32 = liftM fromIntegral getWord32le | 50 | false | false | 0 | 6 | 5 | 16 | 7 | 9 | null | null |
ocramz/sparse-linear-algebra | test/LibSpec.hs | gpl-3.0 | spec :: Spec
spec = do
describe "Data.Sparse.Common" $ do
it "fromRowsL assembles a SpMatrix from a list of SpVector rows" $
fromRowsL [x42, y42] `shouldBe` m42
it "fromColsL assembles a SpMatrix from a list of SpVector columns" $
fromColsL [x42, y42] `shouldBe` transposeSM m42
describe "Numeric.LinearAlgebra.Sparse : Library" $ do
prop "Subtraction is cancellative" $ \(x :: SpVector Double) ->
norm2Sq (x ^-^ x) `shouldBe` zeroV
it "<.> : inner product (Real)" $
tv0 <.> tv0 `shouldBe` 61
it "<.> : inner product (Complex)" $
tvc2 <.> tvc3 `shouldBe` 2 :+ 2
it "transpose : sparse matrix transpose" $
transpose m1 `shouldBe` m1t
it "(#>) : matrix-vector product (Real)" $
nearZero ( norm2Sq ((aa0 #> x0true) ^-^ b0 )) `shouldBe` True
it "(<#) : vector-matrix product (Real)" $
nearZero ( norm2Sq ((x0true <# aa0) ^-^ aa0tx0 ))`shouldBe` True
it "(#>) : matrix-vector product (Complex)" $ do
let v = (aa0c #> b0c) ^-^ c0c
nearZero (v <.> v) `shouldBe` True
it "(<#) : vector-matrix product (Complex)" $ do
let w = (b0c <# aa0c) ^-^ c0c'
nearZero (w <.> w) `shouldBe` True
it "(##) : matrix-matrix product (Real, square)" $
(m1 ## m2) `shouldBe` m1m2
it "(##) : matrix-matrix product (Real, rectangular)" $ do
(m1' ## m2') `shouldBe` m1m2'
(m2' ## m1') `shouldBe` m2m1'
it "(##) : matrix-matrix product (Complex)" $
(aa3c ## aa3c) `shouldBe` aa3cx
it "eye : identity matrix" $
infoSM (eye 10) `shouldBe` SMInfo 10 0.1
it "insertCol : insert a column in a SpMatrix" $
insertCol (eye 3) (fromListDenseSV 3 [2,2,2]) 0 `shouldBe` fromListSM (3,3) [(0,0,2),(1,0,2),(1,1,1),(2,0,2),(2,2,1)]
it "insertRow : insert a row in a SpMatrix" $
insertRow (eye 3) (fromListDenseSV 3 [2,2,2]) 1 `shouldBe` fromListSM (3,3) [(0,0,1), (1,0,2), (1,1,2), (1,2,2), (2,2,1)]
it "extractCol -> insertCol : identity" $
insertCol (eye 3) (extractCol (eye 3) 1) 1 `shouldBe` eye 3
it "extractRow -> insertRow : identity" $
insertRow (eye 3) (extractRow (eye 3) 1) 1 `shouldBe` eye 3
it "countSubdiagonalNZ : # of nonzero elements below the diagonal" $
countSubdiagonalNZSM m3 `shouldBe` 1
it "permutPairsSM : permutation matrices are orthogonal" $ do
let pm0 = permutPairsSM 3 [(0,2), (1,2)] :: SpMatrix Double
pm0 #~#^ pm0 `shouldBe` eye 3
pm0 #~^# pm0 `shouldBe` eye 3
it "isLowerTriSM : checks whether matrix is lower triangular" $
isLowerTriSM tm8' && isUpperTriSM tm8 `shouldBe` True
-- it "untilConvergedG0 : early termination by iteration count and termination by convergence" $
-- let
-- n1 = 4
-- nexp1 = fromIntegral n1 / fromIntegral (2^n1) -- 0.25
-- f x = x/2
-- mm1 = untilConvergedG0 "blah"
-- (IterConf n1 False id print) (1/(2^n1)) f (fromIntegral n1 :: Double)
-- n2 = 2^16
-- mm2 = untilConvergedG0 "blah"
-- (IterConf n2 False id print) (1/(2^n2)) f (fromIntegral n1 :: Double)
-- eh (NotConvergedE _ _ x) = return x
-- in
-- do x1 <- mm1 `catch` eh
-- x1 `shouldBe` nexp1
-- x2 <- mm2 `catch` eh
-- nearZero x2 `shouldBe` True
describe "QuickCheck properties:" $ do
prop "prop_matSPD_vec : (m #^# m) is symmetric positive definite" $
\(PropMatSPDVec (m :: SpMatrix Double) v) -> prop_spd m v
-- prop "prop_matSPD_vec : (m #^# m) is symmetric positive definite" $
-- \(PropMatSPDVec (m :: SpMatrix (Complex Double)) v) -> prop_spd m v
prop "prop_dot : (v <.> v) ~= 1 if ||v|| == 1" $
\(v :: SpVector Double) -> prop_dot v
prop "prop_matMat1 : (A ## B)^T == (B^T ## A^T)" $
\p@(PropMatMat (_ :: SpMatrix Double) _) -> prop_matMat1 p
prop "prop_matMat2 : M^T ##^ M == M #^# M^T" $
\p@(PropMat (_ :: SpMatrix Double)) -> prop_matMat2 p
-- -- prop "prop_matMat2 : M^T ##^ M == M #^# M^T , Complex" $
-- -- \p@(PropMat (_ :: SpMatrix (Complex Double))) -> whenFail (prd $ unPropMat p) (prop_matMat2 p :: Bool)
-- -- prop "prop_QR : Q R = A, Q is orthogonal, R is upper triangular" $
-- -- \p@(PropMatI (_ :: SpMatrix Double)) -> prop_QR p
-- -- prop "prop_Cholesky" $ \p@(PropMat_SPD (_ :: SpMatrix Double)) -> prop_Cholesky p
-- -- prop "prop_linSolve GMRES" $ prop_linSolve GMRES_
-- -- prop "aa2 is positive semidefinite" $ \(v :: SpVector Double) ->
-- -- prop_psd aa2 v
-- specLinSolve =
-- describe "Numeric.LinearAlgebra.Sparse : Iterative linear solvers (Real)" $ do
-- -- -- it "TFQMR (2 x 2 dense)" $
-- it "GMRES (2 x 2 dense)" $
-- checkLinSolveR GMRES_ aa0 b0 x0true >>= (`shouldBe` True)
-- it "GMRES (3 x 3 sparse, symmetric pos.def.)" $
-- checkLinSolveR GMRES_ aa2 b2 x2 >>= (`shouldBe` True)
-- it "GMRES (4 x 4 sparse)" $
-- checkLinSolveR GMRES_ aa1 b1 x1 >>= (`shouldBe` True)
-- it "GMRES (5 x 5 sparse)" $
-- checkLinSolveR GMRES_ tm7 tvb7 tvx7 >>= (`shouldBe` True)
-- it "BCG (2 x 2 dense)" $
-- checkLinSolveR BCG_ aa0 b0 x0true >>= (`shouldBe` True)
-- it "BCG (3 x 3 sparse, symmetric pos.def.)" $
-- checkLinSolveR BCG_ aa2 b2 x2 >>= (`shouldBe` True)
-- it "BiCGSTAB (2 x 2 dense)" $
-- checkLinSolveR BICGSTAB_ aa0 b0 x0true >>= (`shouldBe` True)
-- it "BiCGSTAB (3 x 3 sparse, symmetric pos.def.)" $
-- checkLinSolveR BICGSTAB_ aa2 b2 x2 >>= (`shouldBe` True)
-- it "CGS (2 x 2 dense)" $
-- checkLinSolveR CGS_ aa0 b0 x0true >>= (`shouldBe` True)
-- it "CGS (3 x 3 sparse, SPD)" $
-- checkLinSolveR CGS_ aa2 b2 x2 >>= (`shouldBe` True)
-- it "Moore-Penrose pseudoinverse (3 x 2 dense)" $
-- checkPinv aa10 b10 x10 >>= (`shouldBe` True)
-- -- -- describe "Numeric.LinearAlgebra.Sparse : Iterative linear solvers (Complex)" $ do
-- -- -- it "<\\> (3 x 3 dense)" $
-- -- -- checkBackslash tmc4 tvc4 >>= (`shouldBe` True)
-- specLuSolve =
-- describe "Numeric.LinearAlgebra.Sparse : Direct linear solvers (Real)" $
-- it "luSolve (4 x 4 sparse)" $
-- checkLuSolve aa1 b1 >>= (`shouldBe` (True, True, True))
-- -- -- describe "Numeric.LinearAlgebra.Sparse : Direct linear solvers (Complex)" $
-- -- -- it "luSolve (3 x 3 dense)" $
-- -- -- checkLuSolve tmc4 tvc4 >>= (`shouldBe` (True, True, True))
-- specQR = do
-- describe "Numeric.LinearAlgebra.Sparse : QR factorization (Real)" $ do
-- it "qr (3 x 3 dense)" $
-- checkQr tm2 >>= (`shouldBe` True)
-- it "qr (4 x 4 sparse)" $
-- checkQr tm4 >>= (`shouldBe` True)
-- it "qr (5 x 5 sparse)" $
-- checkQr tm7 >>= (`shouldBe` True)
-- describe "Numeric.LinearAlgebra.Sparse : QR factorization (Complex)" $ do
-- it "qr (2 x 2 dense)" $
-- checkQr aa3cx >>= (`shouldBe` True)
-- it "qr (3 x 3 dense)" $
-- checkQr tmc4 >>= (`shouldBe` True)
-- specLu = do
-- describe "Numeric.LinearAlgebra.Sparse : LU factorization (Real)" $ do
-- it "lu (3 x 3 dense)" $
-- checkLu tm2 >>= (`shouldBe` True)
-- it "lu (4 x 4 dense)" $
-- checkLu tm6 >>= (`shouldBe` True)
-- it "lu (5 x 5 sparse)" $
-- checkLu tm7 >>= (`shouldBe` True)
-- describe "Numeric.LinearAlgebra.Sparse : LU factorization (Complex)" $
-- it "lu (3 x 3 dense)" $
-- checkLu tmc4 >>= (`shouldBe` True)
-- specChol =
-- describe "Numeric.LinearAlgebra.Sparse : Cholesky factorization (Real, symmetric pos.def.)" $
-- it "chol (5 x 5 sparse)" $
-- checkChol tm7 >>= (`shouldBe` True)
-- -- describe "Numeric.LinearAlgebra.Sparse : Cholesky factorization (Complex, symmetric pos.def.)" $
-- -- it "chol (4 x 4 dense)" $
-- -- checkChol (tmc5 ##^ tmc5) >>= (`shouldBe` True)
-- specArnoldi =
-- describe "Numeric.LinearAlgebra.Sparse : Arnoldi iteration (Real)" $ do
-- it "arnoldi (4 x 4 dense)" $
-- checkArnoldi tm6 4 >>= (`shouldBe` True)
-- it "arnoldi (5 x 5 sparse)" $
-- checkArnoldi tm7 5 >>= (`shouldBe` True)
-- -- -- describe "Numeric.LinearAlgebra.Sparse : Arnoldi iteration (Complex)" $ do
-- -- -- it "arnoldi (4 x 4 dense)" $
-- -- -- checkArnoldi tmc4 4 >>= (`shouldBe` True)
-- * Linear systems
-- -- checkLinSolve method aa b x x0r =
-- -- either
-- -- (error . show)
-- -- (\xhat -> nearZero (norm2Sq (x ^-^ xhat)))
-- -- (linSolve0 method aa b x0r)
-- checkLinSolve' method aa b x x0r =
-- nearZero . norm2 <$> linSolve0 method aa b x0r -- `catch` eh
-- -- where
-- -- eh (NotConvergedE _ i xhat) = return $ xhat ^-^ x
-- checkLinSolve method aa b x x0r = do
-- xhat <- linSolve0 method aa b x0r
-- return $ nearZero $ norm2 (x ^-^ xhat)
-- checkLinSolveR
-- :: (MonadLog String m, MonadCatch m) =>
-- LinSolveMethod
-- -> SpMatrix Double -- ^ operator
-- -> SpVector Double -- ^ r.h.s
-- -> SpVector Double -- ^ candidate solution
-- -> m Bool
-- checkLinSolveR method aa b x = checkLinSolve method aa b x x0r where
-- x0r = mkSpVR n $ replicate n 0.1
-- n = ncols aa
-- checkLinSolveC
-- :: (MonadIO m, MonadCatch m) =>
-- LinSolveMethod
-- -> SpMatrix (Complex Double)
-- -> SpVector (Complex Double)
-- -> SpVector (Complex Double)
-- -> m Bool
-- checkLinSolveC method aa b x = checkLinSolve method aa b x x0r where
-- x0r = mkSpVC n $ replicate n (0.1 :+ 0.1)
-- n = ncols aa | 9,692 | spec :: Spec
spec = do
describe "Data.Sparse.Common" $ do
it "fromRowsL assembles a SpMatrix from a list of SpVector rows" $
fromRowsL [x42, y42] `shouldBe` m42
it "fromColsL assembles a SpMatrix from a list of SpVector columns" $
fromColsL [x42, y42] `shouldBe` transposeSM m42
describe "Numeric.LinearAlgebra.Sparse : Library" $ do
prop "Subtraction is cancellative" $ \(x :: SpVector Double) ->
norm2Sq (x ^-^ x) `shouldBe` zeroV
it "<.> : inner product (Real)" $
tv0 <.> tv0 `shouldBe` 61
it "<.> : inner product (Complex)" $
tvc2 <.> tvc3 `shouldBe` 2 :+ 2
it "transpose : sparse matrix transpose" $
transpose m1 `shouldBe` m1t
it "(#>) : matrix-vector product (Real)" $
nearZero ( norm2Sq ((aa0 #> x0true) ^-^ b0 )) `shouldBe` True
it "(<#) : vector-matrix product (Real)" $
nearZero ( norm2Sq ((x0true <# aa0) ^-^ aa0tx0 ))`shouldBe` True
it "(#>) : matrix-vector product (Complex)" $ do
let v = (aa0c #> b0c) ^-^ c0c
nearZero (v <.> v) `shouldBe` True
it "(<#) : vector-matrix product (Complex)" $ do
let w = (b0c <# aa0c) ^-^ c0c'
nearZero (w <.> w) `shouldBe` True
it "(##) : matrix-matrix product (Real, square)" $
(m1 ## m2) `shouldBe` m1m2
it "(##) : matrix-matrix product (Real, rectangular)" $ do
(m1' ## m2') `shouldBe` m1m2'
(m2' ## m1') `shouldBe` m2m1'
it "(##) : matrix-matrix product (Complex)" $
(aa3c ## aa3c) `shouldBe` aa3cx
it "eye : identity matrix" $
infoSM (eye 10) `shouldBe` SMInfo 10 0.1
it "insertCol : insert a column in a SpMatrix" $
insertCol (eye 3) (fromListDenseSV 3 [2,2,2]) 0 `shouldBe` fromListSM (3,3) [(0,0,2),(1,0,2),(1,1,1),(2,0,2),(2,2,1)]
it "insertRow : insert a row in a SpMatrix" $
insertRow (eye 3) (fromListDenseSV 3 [2,2,2]) 1 `shouldBe` fromListSM (3,3) [(0,0,1), (1,0,2), (1,1,2), (1,2,2), (2,2,1)]
it "extractCol -> insertCol : identity" $
insertCol (eye 3) (extractCol (eye 3) 1) 1 `shouldBe` eye 3
it "extractRow -> insertRow : identity" $
insertRow (eye 3) (extractRow (eye 3) 1) 1 `shouldBe` eye 3
it "countSubdiagonalNZ : # of nonzero elements below the diagonal" $
countSubdiagonalNZSM m3 `shouldBe` 1
it "permutPairsSM : permutation matrices are orthogonal" $ do
let pm0 = permutPairsSM 3 [(0,2), (1,2)] :: SpMatrix Double
pm0 #~#^ pm0 `shouldBe` eye 3
pm0 #~^# pm0 `shouldBe` eye 3
it "isLowerTriSM : checks whether matrix is lower triangular" $
isLowerTriSM tm8' && isUpperTriSM tm8 `shouldBe` True
-- it "untilConvergedG0 : early termination by iteration count and termination by convergence" $
-- let
-- n1 = 4
-- nexp1 = fromIntegral n1 / fromIntegral (2^n1) -- 0.25
-- f x = x/2
-- mm1 = untilConvergedG0 "blah"
-- (IterConf n1 False id print) (1/(2^n1)) f (fromIntegral n1 :: Double)
-- n2 = 2^16
-- mm2 = untilConvergedG0 "blah"
-- (IterConf n2 False id print) (1/(2^n2)) f (fromIntegral n1 :: Double)
-- eh (NotConvergedE _ _ x) = return x
-- in
-- do x1 <- mm1 `catch` eh
-- x1 `shouldBe` nexp1
-- x2 <- mm2 `catch` eh
-- nearZero x2 `shouldBe` True
describe "QuickCheck properties:" $ do
prop "prop_matSPD_vec : (m #^# m) is symmetric positive definite" $
\(PropMatSPDVec (m :: SpMatrix Double) v) -> prop_spd m v
-- prop "prop_matSPD_vec : (m #^# m) is symmetric positive definite" $
-- \(PropMatSPDVec (m :: SpMatrix (Complex Double)) v) -> prop_spd m v
prop "prop_dot : (v <.> v) ~= 1 if ||v|| == 1" $
\(v :: SpVector Double) -> prop_dot v
prop "prop_matMat1 : (A ## B)^T == (B^T ## A^T)" $
\p@(PropMatMat (_ :: SpMatrix Double) _) -> prop_matMat1 p
prop "prop_matMat2 : M^T ##^ M == M #^# M^T" $
\p@(PropMat (_ :: SpMatrix Double)) -> prop_matMat2 p
-- -- prop "prop_matMat2 : M^T ##^ M == M #^# M^T , Complex" $
-- -- \p@(PropMat (_ :: SpMatrix (Complex Double))) -> whenFail (prd $ unPropMat p) (prop_matMat2 p :: Bool)
-- -- prop "prop_QR : Q R = A, Q is orthogonal, R is upper triangular" $
-- -- \p@(PropMatI (_ :: SpMatrix Double)) -> prop_QR p
-- -- prop "prop_Cholesky" $ \p@(PropMat_SPD (_ :: SpMatrix Double)) -> prop_Cholesky p
-- -- prop "prop_linSolve GMRES" $ prop_linSolve GMRES_
-- -- prop "aa2 is positive semidefinite" $ \(v :: SpVector Double) ->
-- -- prop_psd aa2 v
-- specLinSolve =
-- describe "Numeric.LinearAlgebra.Sparse : Iterative linear solvers (Real)" $ do
-- -- -- it "TFQMR (2 x 2 dense)" $
-- it "GMRES (2 x 2 dense)" $
-- checkLinSolveR GMRES_ aa0 b0 x0true >>= (`shouldBe` True)
-- it "GMRES (3 x 3 sparse, symmetric pos.def.)" $
-- checkLinSolveR GMRES_ aa2 b2 x2 >>= (`shouldBe` True)
-- it "GMRES (4 x 4 sparse)" $
-- checkLinSolveR GMRES_ aa1 b1 x1 >>= (`shouldBe` True)
-- it "GMRES (5 x 5 sparse)" $
-- checkLinSolveR GMRES_ tm7 tvb7 tvx7 >>= (`shouldBe` True)
-- it "BCG (2 x 2 dense)" $
-- checkLinSolveR BCG_ aa0 b0 x0true >>= (`shouldBe` True)
-- it "BCG (3 x 3 sparse, symmetric pos.def.)" $
-- checkLinSolveR BCG_ aa2 b2 x2 >>= (`shouldBe` True)
-- it "BiCGSTAB (2 x 2 dense)" $
-- checkLinSolveR BICGSTAB_ aa0 b0 x0true >>= (`shouldBe` True)
-- it "BiCGSTAB (3 x 3 sparse, symmetric pos.def.)" $
-- checkLinSolveR BICGSTAB_ aa2 b2 x2 >>= (`shouldBe` True)
-- it "CGS (2 x 2 dense)" $
-- checkLinSolveR CGS_ aa0 b0 x0true >>= (`shouldBe` True)
-- it "CGS (3 x 3 sparse, SPD)" $
-- checkLinSolveR CGS_ aa2 b2 x2 >>= (`shouldBe` True)
-- it "Moore-Penrose pseudoinverse (3 x 2 dense)" $
-- checkPinv aa10 b10 x10 >>= (`shouldBe` True)
-- -- -- describe "Numeric.LinearAlgebra.Sparse : Iterative linear solvers (Complex)" $ do
-- -- -- it "<\\> (3 x 3 dense)" $
-- -- -- checkBackslash tmc4 tvc4 >>= (`shouldBe` True)
-- specLuSolve =
-- describe "Numeric.LinearAlgebra.Sparse : Direct linear solvers (Real)" $
-- it "luSolve (4 x 4 sparse)" $
-- checkLuSolve aa1 b1 >>= (`shouldBe` (True, True, True))
-- -- -- describe "Numeric.LinearAlgebra.Sparse : Direct linear solvers (Complex)" $
-- -- -- it "luSolve (3 x 3 dense)" $
-- -- -- checkLuSolve tmc4 tvc4 >>= (`shouldBe` (True, True, True))
-- specQR = do
-- describe "Numeric.LinearAlgebra.Sparse : QR factorization (Real)" $ do
-- it "qr (3 x 3 dense)" $
-- checkQr tm2 >>= (`shouldBe` True)
-- it "qr (4 x 4 sparse)" $
-- checkQr tm4 >>= (`shouldBe` True)
-- it "qr (5 x 5 sparse)" $
-- checkQr tm7 >>= (`shouldBe` True)
-- describe "Numeric.LinearAlgebra.Sparse : QR factorization (Complex)" $ do
-- it "qr (2 x 2 dense)" $
-- checkQr aa3cx >>= (`shouldBe` True)
-- it "qr (3 x 3 dense)" $
-- checkQr tmc4 >>= (`shouldBe` True)
-- specLu = do
-- describe "Numeric.LinearAlgebra.Sparse : LU factorization (Real)" $ do
-- it "lu (3 x 3 dense)" $
-- checkLu tm2 >>= (`shouldBe` True)
-- it "lu (4 x 4 dense)" $
-- checkLu tm6 >>= (`shouldBe` True)
-- it "lu (5 x 5 sparse)" $
-- checkLu tm7 >>= (`shouldBe` True)
-- describe "Numeric.LinearAlgebra.Sparse : LU factorization (Complex)" $
-- it "lu (3 x 3 dense)" $
-- checkLu tmc4 >>= (`shouldBe` True)
-- specChol =
-- describe "Numeric.LinearAlgebra.Sparse : Cholesky factorization (Real, symmetric pos.def.)" $
-- it "chol (5 x 5 sparse)" $
-- checkChol tm7 >>= (`shouldBe` True)
-- -- describe "Numeric.LinearAlgebra.Sparse : Cholesky factorization (Complex, symmetric pos.def.)" $
-- -- it "chol (4 x 4 dense)" $
-- -- checkChol (tmc5 ##^ tmc5) >>= (`shouldBe` True)
-- specArnoldi =
-- describe "Numeric.LinearAlgebra.Sparse : Arnoldi iteration (Real)" $ do
-- it "arnoldi (4 x 4 dense)" $
-- checkArnoldi tm6 4 >>= (`shouldBe` True)
-- it "arnoldi (5 x 5 sparse)" $
-- checkArnoldi tm7 5 >>= (`shouldBe` True)
-- -- -- describe "Numeric.LinearAlgebra.Sparse : Arnoldi iteration (Complex)" $ do
-- -- -- it "arnoldi (4 x 4 dense)" $
-- -- -- checkArnoldi tmc4 4 >>= (`shouldBe` True)
-- * Linear systems
-- -- checkLinSolve method aa b x x0r =
-- -- either
-- -- (error . show)
-- -- (\xhat -> nearZero (norm2Sq (x ^-^ xhat)))
-- -- (linSolve0 method aa b x0r)
-- checkLinSolve' method aa b x x0r =
-- nearZero . norm2 <$> linSolve0 method aa b x0r -- `catch` eh
-- -- where
-- -- eh (NotConvergedE _ i xhat) = return $ xhat ^-^ x
-- checkLinSolve method aa b x x0r = do
-- xhat <- linSolve0 method aa b x0r
-- return $ nearZero $ norm2 (x ^-^ xhat)
-- checkLinSolveR
-- :: (MonadLog String m, MonadCatch m) =>
-- LinSolveMethod
-- -> SpMatrix Double -- ^ operator
-- -> SpVector Double -- ^ r.h.s
-- -> SpVector Double -- ^ candidate solution
-- -> m Bool
-- checkLinSolveR method aa b x = checkLinSolve method aa b x x0r where
-- x0r = mkSpVR n $ replicate n 0.1
-- n = ncols aa
-- checkLinSolveC
-- :: (MonadIO m, MonadCatch m) =>
-- LinSolveMethod
-- -> SpMatrix (Complex Double)
-- -> SpVector (Complex Double)
-- -> SpVector (Complex Double)
-- -> m Bool
-- checkLinSolveC method aa b x = checkLinSolve method aa b x x0r where
-- x0r = mkSpVC n $ replicate n (0.1 :+ 0.1)
-- n = ncols aa | 9,692 | spec = do
describe "Data.Sparse.Common" $ do
it "fromRowsL assembles a SpMatrix from a list of SpVector rows" $
fromRowsL [x42, y42] `shouldBe` m42
it "fromColsL assembles a SpMatrix from a list of SpVector columns" $
fromColsL [x42, y42] `shouldBe` transposeSM m42
describe "Numeric.LinearAlgebra.Sparse : Library" $ do
prop "Subtraction is cancellative" $ \(x :: SpVector Double) ->
norm2Sq (x ^-^ x) `shouldBe` zeroV
it "<.> : inner product (Real)" $
tv0 <.> tv0 `shouldBe` 61
it "<.> : inner product (Complex)" $
tvc2 <.> tvc3 `shouldBe` 2 :+ 2
it "transpose : sparse matrix transpose" $
transpose m1 `shouldBe` m1t
it "(#>) : matrix-vector product (Real)" $
nearZero ( norm2Sq ((aa0 #> x0true) ^-^ b0 )) `shouldBe` True
it "(<#) : vector-matrix product (Real)" $
nearZero ( norm2Sq ((x0true <# aa0) ^-^ aa0tx0 ))`shouldBe` True
it "(#>) : matrix-vector product (Complex)" $ do
let v = (aa0c #> b0c) ^-^ c0c
nearZero (v <.> v) `shouldBe` True
it "(<#) : vector-matrix product (Complex)" $ do
let w = (b0c <# aa0c) ^-^ c0c'
nearZero (w <.> w) `shouldBe` True
it "(##) : matrix-matrix product (Real, square)" $
(m1 ## m2) `shouldBe` m1m2
it "(##) : matrix-matrix product (Real, rectangular)" $ do
(m1' ## m2') `shouldBe` m1m2'
(m2' ## m1') `shouldBe` m2m1'
it "(##) : matrix-matrix product (Complex)" $
(aa3c ## aa3c) `shouldBe` aa3cx
it "eye : identity matrix" $
infoSM (eye 10) `shouldBe` SMInfo 10 0.1
it "insertCol : insert a column in a SpMatrix" $
insertCol (eye 3) (fromListDenseSV 3 [2,2,2]) 0 `shouldBe` fromListSM (3,3) [(0,0,2),(1,0,2),(1,1,1),(2,0,2),(2,2,1)]
it "insertRow : insert a row in a SpMatrix" $
insertRow (eye 3) (fromListDenseSV 3 [2,2,2]) 1 `shouldBe` fromListSM (3,3) [(0,0,1), (1,0,2), (1,1,2), (1,2,2), (2,2,1)]
it "extractCol -> insertCol : identity" $
insertCol (eye 3) (extractCol (eye 3) 1) 1 `shouldBe` eye 3
it "extractRow -> insertRow : identity" $
insertRow (eye 3) (extractRow (eye 3) 1) 1 `shouldBe` eye 3
it "countSubdiagonalNZ : # of nonzero elements below the diagonal" $
countSubdiagonalNZSM m3 `shouldBe` 1
it "permutPairsSM : permutation matrices are orthogonal" $ do
let pm0 = permutPairsSM 3 [(0,2), (1,2)] :: SpMatrix Double
pm0 #~#^ pm0 `shouldBe` eye 3
pm0 #~^# pm0 `shouldBe` eye 3
it "isLowerTriSM : checks whether matrix is lower triangular" $
isLowerTriSM tm8' && isUpperTriSM tm8 `shouldBe` True
-- it "untilConvergedG0 : early termination by iteration count and termination by convergence" $
-- let
-- n1 = 4
-- nexp1 = fromIntegral n1 / fromIntegral (2^n1) -- 0.25
-- f x = x/2
-- mm1 = untilConvergedG0 "blah"
-- (IterConf n1 False id print) (1/(2^n1)) f (fromIntegral n1 :: Double)
-- n2 = 2^16
-- mm2 = untilConvergedG0 "blah"
-- (IterConf n2 False id print) (1/(2^n2)) f (fromIntegral n1 :: Double)
-- eh (NotConvergedE _ _ x) = return x
-- in
-- do x1 <- mm1 `catch` eh
-- x1 `shouldBe` nexp1
-- x2 <- mm2 `catch` eh
-- nearZero x2 `shouldBe` True
describe "QuickCheck properties:" $ do
prop "prop_matSPD_vec : (m #^# m) is symmetric positive definite" $
\(PropMatSPDVec (m :: SpMatrix Double) v) -> prop_spd m v
-- prop "prop_matSPD_vec : (m #^# m) is symmetric positive definite" $
-- \(PropMatSPDVec (m :: SpMatrix (Complex Double)) v) -> prop_spd m v
prop "prop_dot : (v <.> v) ~= 1 if ||v|| == 1" $
\(v :: SpVector Double) -> prop_dot v
prop "prop_matMat1 : (A ## B)^T == (B^T ## A^T)" $
\p@(PropMatMat (_ :: SpMatrix Double) _) -> prop_matMat1 p
prop "prop_matMat2 : M^T ##^ M == M #^# M^T" $
\p@(PropMat (_ :: SpMatrix Double)) -> prop_matMat2 p
-- -- prop "prop_matMat2 : M^T ##^ M == M #^# M^T , Complex" $
-- -- \p@(PropMat (_ :: SpMatrix (Complex Double))) -> whenFail (prd $ unPropMat p) (prop_matMat2 p :: Bool)
-- -- prop "prop_QR : Q R = A, Q is orthogonal, R is upper triangular" $
-- -- \p@(PropMatI (_ :: SpMatrix Double)) -> prop_QR p
-- -- prop "prop_Cholesky" $ \p@(PropMat_SPD (_ :: SpMatrix Double)) -> prop_Cholesky p
-- -- prop "prop_linSolve GMRES" $ prop_linSolve GMRES_
-- -- prop "aa2 is positive semidefinite" $ \(v :: SpVector Double) ->
-- -- prop_psd aa2 v
-- specLinSolve =
-- describe "Numeric.LinearAlgebra.Sparse : Iterative linear solvers (Real)" $ do
-- -- -- it "TFQMR (2 x 2 dense)" $
-- it "GMRES (2 x 2 dense)" $
-- checkLinSolveR GMRES_ aa0 b0 x0true >>= (`shouldBe` True)
-- it "GMRES (3 x 3 sparse, symmetric pos.def.)" $
-- checkLinSolveR GMRES_ aa2 b2 x2 >>= (`shouldBe` True)
-- it "GMRES (4 x 4 sparse)" $
-- checkLinSolveR GMRES_ aa1 b1 x1 >>= (`shouldBe` True)
-- it "GMRES (5 x 5 sparse)" $
-- checkLinSolveR GMRES_ tm7 tvb7 tvx7 >>= (`shouldBe` True)
-- it "BCG (2 x 2 dense)" $
-- checkLinSolveR BCG_ aa0 b0 x0true >>= (`shouldBe` True)
-- it "BCG (3 x 3 sparse, symmetric pos.def.)" $
-- checkLinSolveR BCG_ aa2 b2 x2 >>= (`shouldBe` True)
-- it "BiCGSTAB (2 x 2 dense)" $
-- checkLinSolveR BICGSTAB_ aa0 b0 x0true >>= (`shouldBe` True)
-- it "BiCGSTAB (3 x 3 sparse, symmetric pos.def.)" $
-- checkLinSolveR BICGSTAB_ aa2 b2 x2 >>= (`shouldBe` True)
-- it "CGS (2 x 2 dense)" $
-- checkLinSolveR CGS_ aa0 b0 x0true >>= (`shouldBe` True)
-- it "CGS (3 x 3 sparse, SPD)" $
-- checkLinSolveR CGS_ aa2 b2 x2 >>= (`shouldBe` True)
-- it "Moore-Penrose pseudoinverse (3 x 2 dense)" $
-- checkPinv aa10 b10 x10 >>= (`shouldBe` True)
-- -- -- describe "Numeric.LinearAlgebra.Sparse : Iterative linear solvers (Complex)" $ do
-- -- -- it "<\\> (3 x 3 dense)" $
-- -- -- checkBackslash tmc4 tvc4 >>= (`shouldBe` True)
-- specLuSolve =
-- describe "Numeric.LinearAlgebra.Sparse : Direct linear solvers (Real)" $
-- it "luSolve (4 x 4 sparse)" $
-- checkLuSolve aa1 b1 >>= (`shouldBe` (True, True, True))
-- -- -- describe "Numeric.LinearAlgebra.Sparse : Direct linear solvers (Complex)" $
-- -- -- it "luSolve (3 x 3 dense)" $
-- -- -- checkLuSolve tmc4 tvc4 >>= (`shouldBe` (True, True, True))
-- specQR = do
-- describe "Numeric.LinearAlgebra.Sparse : QR factorization (Real)" $ do
-- it "qr (3 x 3 dense)" $
-- checkQr tm2 >>= (`shouldBe` True)
-- it "qr (4 x 4 sparse)" $
-- checkQr tm4 >>= (`shouldBe` True)
-- it "qr (5 x 5 sparse)" $
-- checkQr tm7 >>= (`shouldBe` True)
-- describe "Numeric.LinearAlgebra.Sparse : QR factorization (Complex)" $ do
-- it "qr (2 x 2 dense)" $
-- checkQr aa3cx >>= (`shouldBe` True)
-- it "qr (3 x 3 dense)" $
-- checkQr tmc4 >>= (`shouldBe` True)
-- specLu = do
-- describe "Numeric.LinearAlgebra.Sparse : LU factorization (Real)" $ do
-- it "lu (3 x 3 dense)" $
-- checkLu tm2 >>= (`shouldBe` True)
-- it "lu (4 x 4 dense)" $
-- checkLu tm6 >>= (`shouldBe` True)
-- it "lu (5 x 5 sparse)" $
-- checkLu tm7 >>= (`shouldBe` True)
-- describe "Numeric.LinearAlgebra.Sparse : LU factorization (Complex)" $
-- it "lu (3 x 3 dense)" $
-- checkLu tmc4 >>= (`shouldBe` True)
-- specChol =
-- describe "Numeric.LinearAlgebra.Sparse : Cholesky factorization (Real, symmetric pos.def.)" $
-- it "chol (5 x 5 sparse)" $
-- checkChol tm7 >>= (`shouldBe` True)
-- -- describe "Numeric.LinearAlgebra.Sparse : Cholesky factorization (Complex, symmetric pos.def.)" $
-- -- it "chol (4 x 4 dense)" $
-- -- checkChol (tmc5 ##^ tmc5) >>= (`shouldBe` True)
-- specArnoldi =
-- describe "Numeric.LinearAlgebra.Sparse : Arnoldi iteration (Real)" $ do
-- it "arnoldi (4 x 4 dense)" $
-- checkArnoldi tm6 4 >>= (`shouldBe` True)
-- it "arnoldi (5 x 5 sparse)" $
-- checkArnoldi tm7 5 >>= (`shouldBe` True)
-- -- -- describe "Numeric.LinearAlgebra.Sparse : Arnoldi iteration (Complex)" $ do
-- -- -- it "arnoldi (4 x 4 dense)" $
-- -- -- checkArnoldi tmc4 4 >>= (`shouldBe` True)
-- * Linear systems
-- -- checkLinSolve method aa b x x0r =
-- -- either
-- -- (error . show)
-- -- (\xhat -> nearZero (norm2Sq (x ^-^ xhat)))
-- -- (linSolve0 method aa b x0r)
-- checkLinSolve' method aa b x x0r =
-- nearZero . norm2 <$> linSolve0 method aa b x0r -- `catch` eh
-- -- where
-- -- eh (NotConvergedE _ i xhat) = return $ xhat ^-^ x
-- checkLinSolve method aa b x x0r = do
-- xhat <- linSolve0 method aa b x0r
-- return $ nearZero $ norm2 (x ^-^ xhat)
-- checkLinSolveR
-- :: (MonadLog String m, MonadCatch m) =>
-- LinSolveMethod
-- -> SpMatrix Double -- ^ operator
-- -> SpVector Double -- ^ r.h.s
-- -> SpVector Double -- ^ candidate solution
-- -> m Bool
-- checkLinSolveR method aa b x = checkLinSolve method aa b x x0r where
-- x0r = mkSpVR n $ replicate n 0.1
-- n = ncols aa
-- checkLinSolveC
-- :: (MonadIO m, MonadCatch m) =>
-- LinSolveMethod
-- -> SpMatrix (Complex Double)
-- -> SpVector (Complex Double)
-- -> SpVector (Complex Double)
-- -> m Bool
-- checkLinSolveC method aa b x = checkLinSolve method aa b x x0r where
-- x0r = mkSpVC n $ replicate n (0.1 :+ 0.1)
-- n = ncols aa | 9,679 | false | true | 0 | 18 | 2,597 | 1,226 | 694 | 532 | null | null |
Javran/xmonad-entryhelper | src/XMonad/Util/EntryHelper/File.hs | mit | getXMonadSrc = srcPath <$> getXMonadPaths | 41 | getXMonadSrc = srcPath <$> getXMonadPaths | 41 | getXMonadSrc = srcPath <$> getXMonadPaths | 41 | false | false | 3 | 5 | 4 | 15 | 5 | 10 | null | null |
yxm4109/pandoc | src/pandoc.hs | gpl-2.0 | -- | Association list of formats and writers.
writers :: [ ( String, WriterOptions -> Pandoc -> String ) ]
writers = [("native" , writeDoc)
,("html" , writeHtmlString)
,("html+lhs" , writeHtmlString)
,("s5" , writeS5String)
,("docbook" , writeDocbook)
,("opendocument" , writeOpenDocument)
,("odt" , writeOpenDocument)
,("latex" , writeLaTeX)
,("latex+lhs" , writeLaTeX)
,("context" , writeConTeXt)
,("texinfo" , writeTexinfo)
,("man" , writeMan)
,("markdown" , writeMarkdown)
,("markdown+lhs" , writeMarkdown)
,("plain" , writePlain)
,("rst" , writeRST)
,("rst+lhs" , writeRST)
,("mediawiki" , writeMediaWiki)
,("rtf" , writeRTF)
] | 930 | writers :: [ ( String, WriterOptions -> Pandoc -> String ) ]
writers = [("native" , writeDoc)
,("html" , writeHtmlString)
,("html+lhs" , writeHtmlString)
,("s5" , writeS5String)
,("docbook" , writeDocbook)
,("opendocument" , writeOpenDocument)
,("odt" , writeOpenDocument)
,("latex" , writeLaTeX)
,("latex+lhs" , writeLaTeX)
,("context" , writeConTeXt)
,("texinfo" , writeTexinfo)
,("man" , writeMan)
,("markdown" , writeMarkdown)
,("markdown+lhs" , writeMarkdown)
,("plain" , writePlain)
,("rst" , writeRST)
,("rst+lhs" , writeRST)
,("mediawiki" , writeMediaWiki)
,("rtf" , writeRTF)
] | 884 | writers = [("native" , writeDoc)
,("html" , writeHtmlString)
,("html+lhs" , writeHtmlString)
,("s5" , writeS5String)
,("docbook" , writeDocbook)
,("opendocument" , writeOpenDocument)
,("odt" , writeOpenDocument)
,("latex" , writeLaTeX)
,("latex+lhs" , writeLaTeX)
,("context" , writeConTeXt)
,("texinfo" , writeTexinfo)
,("man" , writeMan)
,("markdown" , writeMarkdown)
,("markdown+lhs" , writeMarkdown)
,("plain" , writePlain)
,("rst" , writeRST)
,("rst+lhs" , writeRST)
,("mediawiki" , writeMediaWiki)
,("rtf" , writeRTF)
] | 823 | true | true | 0 | 10 | 377 | 207 | 132 | 75 | null | null |
vdweegen/UvA-Software_Testing | Lab3/Final/Exercises.hs | gpl-3.0 | wiki3Input = doParse "*(1 *(+(2 3) +(2 5)))" | 44 | wiki3Input = doParse "*(1 *(+(2 3) +(2 5)))" | 44 | wiki3Input = doParse "*(1 *(+(2 3) +(2 5)))" | 44 | false | false | 1 | 5 | 7 | 12 | 4 | 8 | null | null |
Cahu/krpc-hs | src/KRPCHS/SpaceCenter.hs | gpl-3.0 | getWheelHasBrakesStream :: KRPCHS.SpaceCenter.Wheel -> RPCContext (KRPCStream (Bool))
getWheelHasBrakesStream thisArg = requestStream $ getWheelHasBrakesStreamReq thisArg | 170 | getWheelHasBrakesStream :: KRPCHS.SpaceCenter.Wheel -> RPCContext (KRPCStream (Bool))
getWheelHasBrakesStream thisArg = requestStream $ getWheelHasBrakesStreamReq thisArg | 170 | getWheelHasBrakesStream thisArg = requestStream $ getWheelHasBrakesStreamReq thisArg | 84 | false | true | 0 | 10 | 13 | 44 | 21 | 23 | null | null |
kenkov/nlp | haskell/learn/perceptron.hs | mit | perceptron :: Count -> LearningRate -> Dimension -> [Point] -> Parameter
perceptron count eta dim ps =
let r2 = findMaxR ps in
rep (perceptron_ eta r2 ps) (replicate dim 0, 0) [1..count] | 198 | perceptron :: Count -> LearningRate -> Dimension -> [Point] -> Parameter
perceptron count eta dim ps =
let r2 = findMaxR ps in
rep (perceptron_ eta r2 ps) (replicate dim 0, 0) [1..count] | 198 | perceptron count eta dim ps =
let r2 = findMaxR ps in
rep (perceptron_ eta r2 ps) (replicate dim 0, 0) [1..count] | 125 | false | true | 0 | 9 | 44 | 86 | 43 | 43 | null | null |
gibiansky/IHaskell | ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Int/BoundedInt/Play.hs | mit | -- | Create a new widget
mkPlay :: IO Play
mkPlay = do
-- Default properties, with a random uuid
wid <- U.random
layout <- mkLayout
dstyle <- mkDescriptionStyle
let boundedIntAttrs = defaultBoundedIntWidget "PlayView" "PlayModel" layout $ StyleWidget dstyle
playAttrs = (Playing =:: True)
:& (Repeat =:: True)
:& (Interval =:: 100)
:& (StepInt =:: Just 1)
:& (Disabled =:: False)
:& (ShowRepeat =:: True)
:& RNil
widgetState = WidgetState $ boundedIntAttrs <+> playAttrs
stateIO <- newIORef widgetState
let widget = IPythonWidget wid stateIO
-- Open a comm for this widget, and store it in the kernel state
widgetSendOpen widget $ toJSON widgetState
-- Return the widget
return widget | 831 | mkPlay :: IO Play
mkPlay = do
-- Default properties, with a random uuid
wid <- U.random
layout <- mkLayout
dstyle <- mkDescriptionStyle
let boundedIntAttrs = defaultBoundedIntWidget "PlayView" "PlayModel" layout $ StyleWidget dstyle
playAttrs = (Playing =:: True)
:& (Repeat =:: True)
:& (Interval =:: 100)
:& (StepInt =:: Just 1)
:& (Disabled =:: False)
:& (ShowRepeat =:: True)
:& RNil
widgetState = WidgetState $ boundedIntAttrs <+> playAttrs
stateIO <- newIORef widgetState
let widget = IPythonWidget wid stateIO
-- Open a comm for this widget, and store it in the kernel state
widgetSendOpen widget $ toJSON widgetState
-- Return the widget
return widget | 806 | mkPlay = do
-- Default properties, with a random uuid
wid <- U.random
layout <- mkLayout
dstyle <- mkDescriptionStyle
let boundedIntAttrs = defaultBoundedIntWidget "PlayView" "PlayModel" layout $ StyleWidget dstyle
playAttrs = (Playing =:: True)
:& (Repeat =:: True)
:& (Interval =:: 100)
:& (StepInt =:: Just 1)
:& (Disabled =:: False)
:& (ShowRepeat =:: True)
:& RNil
widgetState = WidgetState $ boundedIntAttrs <+> playAttrs
stateIO <- newIORef widgetState
let widget = IPythonWidget wid stateIO
-- Open a comm for this widget, and store it in the kernel state
widgetSendOpen widget $ toJSON widgetState
-- Return the widget
return widget | 788 | true | true | 0 | 17 | 255 | 194 | 95 | 99 | null | null |
vincenthz/hs-foundation | foundation/Foundation/VFS/FilePath.hs | bsd-3-clause | hasNullByte :: [Char] -> Bool
hasNullByte = Data.List.elem '\0' | 63 | hasNullByte :: [Char] -> Bool
hasNullByte = Data.List.elem '\0' | 63 | hasNullByte = Data.List.elem '\0' | 33 | false | true | 0 | 6 | 8 | 24 | 13 | 11 | null | null |
allanderek/ipclib | Language/Pepa/Rates.hs | gpl-2.0 | reduceRateExprWith :: RateNumberClass a => (RateIdentifier -> a) -> RateExpr -> a
reduceRateExprWith _m (Creal d) = rnFromDouble d | 139 | reduceRateExprWith :: RateNumberClass a => (RateIdentifier -> a) -> RateExpr -> a
reduceRateExprWith _m (Creal d) = rnFromDouble d | 139 | reduceRateExprWith _m (Creal d) = rnFromDouble d | 57 | false | true | 0 | 8 | 27 | 47 | 23 | 24 | null | null |
charlesrosenbauer/Bzo-Compiler | src/ModelRules.hs | gpl-3.0 | validateType :: BzoSyntax -> [BzoErr]
validateType ty = verifyAST verifyType switchType ty | 90 | validateType :: BzoSyntax -> [BzoErr]
validateType ty = verifyAST verifyType switchType ty | 90 | validateType ty = verifyAST verifyType switchType ty | 52 | false | true | 0 | 6 | 11 | 28 | 14 | 14 | null | null |
brendanhay/gogol | gogol-logging/gen/Network/Google/Resource/Logging/Organizations/Locations/Get.hs | mpl-2.0 | -- | Resource name for the location.
olgName :: Lens' OrganizationsLocationsGet Text
olgName = lens _olgName (\ s a -> s{_olgName = a}) | 135 | olgName :: Lens' OrganizationsLocationsGet Text
olgName = lens _olgName (\ s a -> s{_olgName = a}) | 98 | olgName = lens _olgName (\ s a -> s{_olgName = a}) | 50 | true | true | 1 | 9 | 22 | 46 | 22 | 24 | null | null |
vladimir-ipatov/ganeti | src/Ganeti/Constants.hs | gpl-2.0 | htKvmSpiceLosslessImgComprGlz :: String
htKvmSpiceLosslessImgComprGlz = "glz" | 77 | htKvmSpiceLosslessImgComprGlz :: String
htKvmSpiceLosslessImgComprGlz = "glz" | 77 | htKvmSpiceLosslessImgComprGlz = "glz" | 37 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
tmcdonell/accelerate-lulesh | src/LULESH.hs | bsd-3-clause | -- | Calculate terms in the total strain rate tensor epsilon_tot that are used
-- to compute the terms in the deviatoric strain rate tensor epsilon.
--
calcKinematicsForElem
:: Exp Time
-> Exp (Hexahedron Position)
-> Exp (Hexahedron Velocity)
-> Exp Volume -- relative volume
-> Exp Volume -- reference volume
-> Exp (Volume, Volume, R, R)
calcKinematicsForElem dt x dx v v0 =
let
-- (relative) volume calculations
vol' = calcElemVolume x
v' = vol' / v0
dv' = v' - v
-- characteristic length
arealg = calcElemCharacteristicLength x vol'
-- modify nodal positions to be halfway between time(n) and time(n+1)
mid :: Exp (V3 R) -> Exp (V3 R) -> Exp (V3 R)
mid x xd = x - 0.5 * dt *^ xd
midx = lift ( mid (x^._0) (dx^._0)
, mid (x^._1) (dx^._1)
, mid (x^._2) (dx^._2)
, mid (x^._3) (dx^._3)
, mid (x^._4) (dx^._4)
, mid (x^._5) (dx^._5)
, mid (x^._6) (dx^._6)
, mid (x^._7) (dx^._7)
)
-- Use midpoint nodal positions to calculate velocity gradient and
-- strain rate tensor
(b, det) = unlift $ calcElemShapeFunctionDerivatives midx
d = calcElemVelocityGradient dx b det
-- calculate the deviatoric strain rate tensor
vdov = F.sum (unlift d :: V3 (Exp R)) -- TLM: no Foldable instance for (Exp V3) ):
_strain = d ^- (vdov / 3.0)
in
lift (v', dv', vdov, arealg) | 1,671 | calcKinematicsForElem
:: Exp Time
-> Exp (Hexahedron Position)
-> Exp (Hexahedron Velocity)
-> Exp Volume -- relative volume
-> Exp Volume -- reference volume
-> Exp (Volume, Volume, R, R)
calcKinematicsForElem dt x dx v v0 =
let
-- (relative) volume calculations
vol' = calcElemVolume x
v' = vol' / v0
dv' = v' - v
-- characteristic length
arealg = calcElemCharacteristicLength x vol'
-- modify nodal positions to be halfway between time(n) and time(n+1)
mid :: Exp (V3 R) -> Exp (V3 R) -> Exp (V3 R)
mid x xd = x - 0.5 * dt *^ xd
midx = lift ( mid (x^._0) (dx^._0)
, mid (x^._1) (dx^._1)
, mid (x^._2) (dx^._2)
, mid (x^._3) (dx^._3)
, mid (x^._4) (dx^._4)
, mid (x^._5) (dx^._5)
, mid (x^._6) (dx^._6)
, mid (x^._7) (dx^._7)
)
-- Use midpoint nodal positions to calculate velocity gradient and
-- strain rate tensor
(b, det) = unlift $ calcElemShapeFunctionDerivatives midx
d = calcElemVelocityGradient dx b det
-- calculate the deviatoric strain rate tensor
vdov = F.sum (unlift d :: V3 (Exp R)) -- TLM: no Foldable instance for (Exp V3) ):
_strain = d ^- (vdov / 3.0)
in
lift (v', dv', vdov, arealg) | 1,519 | calcKinematicsForElem dt x dx v v0 =
let
-- (relative) volume calculations
vol' = calcElemVolume x
v' = vol' / v0
dv' = v' - v
-- characteristic length
arealg = calcElemCharacteristicLength x vol'
-- modify nodal positions to be halfway between time(n) and time(n+1)
mid :: Exp (V3 R) -> Exp (V3 R) -> Exp (V3 R)
mid x xd = x - 0.5 * dt *^ xd
midx = lift ( mid (x^._0) (dx^._0)
, mid (x^._1) (dx^._1)
, mid (x^._2) (dx^._2)
, mid (x^._3) (dx^._3)
, mid (x^._4) (dx^._4)
, mid (x^._5) (dx^._5)
, mid (x^._6) (dx^._6)
, mid (x^._7) (dx^._7)
)
-- Use midpoint nodal positions to calculate velocity gradient and
-- strain rate tensor
(b, det) = unlift $ calcElemShapeFunctionDerivatives midx
d = calcElemVelocityGradient dx b det
-- calculate the deviatoric strain rate tensor
vdov = F.sum (unlift d :: V3 (Exp R)) -- TLM: no Foldable instance for (Exp V3) ):
_strain = d ^- (vdov / 3.0)
in
lift (v', dv', vdov, arealg) | 1,262 | true | true | 0 | 13 | 641 | 478 | 253 | 225 | null | null |
romanb/amazonka | amazonka-autoscaling/gen/Network/AWS/AutoScaling/Types.hs | mpl-2.0 | -- | For Provisioned IOPS (SSD) volumes only. The number of I/O operations per
-- second (IOPS) to provision for the volume.
--
-- Valid values: Range is 100 to 4000.
--
-- Default: None
ebsIops :: Lens' Ebs (Maybe Natural)
ebsIops = lens _ebsIops (\s a -> s { _ebsIops = a }) . mapping _Nat | 291 | ebsIops :: Lens' Ebs (Maybe Natural)
ebsIops = lens _ebsIops (\s a -> s { _ebsIops = a }) . mapping _Nat | 104 | ebsIops = lens _ebsIops (\s a -> s { _ebsIops = a }) . mapping _Nat | 67 | true | true | 0 | 10 | 56 | 58 | 33 | 25 | null | null |
lubomir/dot-race | fay/GameScreen.hs | bsd-3-clause | drawCrash :: Element -> Point -> Fay Element
drawCrash drawing p = svgPolygon drawing (crashMark p) >>= setClass "crashPoint" | 125 | drawCrash :: Element -> Point -> Fay Element
drawCrash drawing p = svgPolygon drawing (crashMark p) >>= setClass "crashPoint" | 125 | drawCrash drawing p = svgPolygon drawing (crashMark p) >>= setClass "crashPoint" | 80 | false | true | 2 | 8 | 18 | 53 | 23 | 30 | null | null |
neosam/esge | src/Esge/Run.hs | bsd-3-clause | -- | Generates a modifier function for the ingame initializers
-- and will add the given attributes to a 'IngameLoader'
ingameLoader :: ([PCheck], [EP.BlockParser], [IngameMod])
-> IngameInit
ingameLoader (pChecks, parsers, mods) =
IngameInit pChecks parsers mods | 292 | ingameLoader :: ([PCheck], [EP.BlockParser], [IngameMod])
-> IngameInit
ingameLoader (pChecks, parsers, mods) =
IngameInit pChecks parsers mods | 172 | ingameLoader (pChecks, parsers, mods) =
IngameInit pChecks parsers mods | 87 | true | true | 0 | 8 | 64 | 56 | 33 | 23 | null | null |
yiannist/ganeti | src/Ganeti/HTools/Node.hs | bsd-2-clause | -- | Generate OpCode for setting a node's offline status
genOpSetOffline :: (Monad m) => Node -> Bool -> m OpCodes.OpCode
genOpSetOffline node offlineStatus = do
nodeName <- mkNonEmpty (name node)
return OpCodes.OpNodeSetParams
{ OpCodes.opNodeName = nodeName
, OpCodes.opNodeUuid = Nothing
, OpCodes.opForce = False
, OpCodes.opHvState = Nothing
, OpCodes.opDiskState = Nothing
, OpCodes.opMasterCandidate = Nothing
, OpCodes.opOffline = Just offlineStatus
, OpCodes.opDrained = Nothing
, OpCodes.opAutoPromote = False
, OpCodes.opMasterCapable = Nothing
, OpCodes.opVmCapable = Nothing
, OpCodes.opSecondaryIp = Nothing
, OpCodes.opgenericNdParams = Nothing
, OpCodes.opPowered = Nothing
}
-- | Generate OpCode for applying a OobCommand to the given nodes | 927 | genOpSetOffline :: (Monad m) => Node -> Bool -> m OpCodes.OpCode
genOpSetOffline node offlineStatus = do
nodeName <- mkNonEmpty (name node)
return OpCodes.OpNodeSetParams
{ OpCodes.opNodeName = nodeName
, OpCodes.opNodeUuid = Nothing
, OpCodes.opForce = False
, OpCodes.opHvState = Nothing
, OpCodes.opDiskState = Nothing
, OpCodes.opMasterCandidate = Nothing
, OpCodes.opOffline = Just offlineStatus
, OpCodes.opDrained = Nothing
, OpCodes.opAutoPromote = False
, OpCodes.opMasterCapable = Nothing
, OpCodes.opVmCapable = Nothing
, OpCodes.opSecondaryIp = Nothing
, OpCodes.opgenericNdParams = Nothing
, OpCodes.opPowered = Nothing
}
-- | Generate OpCode for applying a OobCommand to the given nodes | 870 | genOpSetOffline node offlineStatus = do
nodeName <- mkNonEmpty (name node)
return OpCodes.OpNodeSetParams
{ OpCodes.opNodeName = nodeName
, OpCodes.opNodeUuid = Nothing
, OpCodes.opForce = False
, OpCodes.opHvState = Nothing
, OpCodes.opDiskState = Nothing
, OpCodes.opMasterCandidate = Nothing
, OpCodes.opOffline = Just offlineStatus
, OpCodes.opDrained = Nothing
, OpCodes.opAutoPromote = False
, OpCodes.opMasterCapable = Nothing
, OpCodes.opVmCapable = Nothing
, OpCodes.opSecondaryIp = Nothing
, OpCodes.opgenericNdParams = Nothing
, OpCodes.opPowered = Nothing
}
-- | Generate OpCode for applying a OobCommand to the given nodes | 805 | true | true | 0 | 10 | 272 | 181 | 103 | 78 | null | null |
vTurbine/ghc | compiler/utils/Util.hs | bsd-3-clause | cmpList _ [] _ = LT | 26 | cmpList _ [] _ = LT | 26 | cmpList _ [] _ = LT | 26 | false | false | 2 | 6 | 12 | 19 | 7 | 12 | null | null |
jhance/gba-hs | test/Test/GBA/Thumb/T4.hs | mit | t4sbc5b :: TestTree
t4sbc5b = testCase "[t4sbc5b] V flag, set to 1" $ do
v <- runTest $ do
writeSafeRegister 0 1
writeSafeRegister 1 0x80000001
writeStatus statusC False
execute $ T4 T4_SBC 0 1
readStatus statusV
v @?= True | 271 | t4sbc5b :: TestTree
t4sbc5b = testCase "[t4sbc5b] V flag, set to 1" $ do
v <- runTest $ do
writeSafeRegister 0 1
writeSafeRegister 1 0x80000001
writeStatus statusC False
execute $ T4 T4_SBC 0 1
readStatus statusV
v @?= True | 271 | t4sbc5b = testCase "[t4sbc5b] V flag, set to 1" $ do
v <- runTest $ do
writeSafeRegister 0 1
writeSafeRegister 1 0x80000001
writeStatus statusC False
execute $ T4 T4_SBC 0 1
readStatus statusV
v @?= True | 251 | false | true | 0 | 13 | 86 | 87 | 35 | 52 | null | null |
tonyday567/hdcharts | src/Chart/Types.hs | mit | d3SelClass' :: Element a -> String -> [D3Expr]
d3SelClass' e s = toD3Expr [jmacroE|selectAll(`("."<>e^.eClass<> " "<>s)`)|] | 123 | d3SelClass' :: Element a -> String -> [D3Expr]
d3SelClass' e s = toD3Expr [jmacroE|selectAll(`("."<>e^.eClass<> " "<>s)`)|] | 123 | d3SelClass' e s = toD3Expr [jmacroE|selectAll(`("."<>e^.eClass<> " "<>s)`)|] | 76 | false | true | 0 | 7 | 15 | 37 | 20 | 17 | null | null |
Mikolaj/miniutter | NLP/Miniutter/English.hs | bsd-3-clause | notPersonVerb Sg3rd "be" = "isn't" | 34 | notPersonVerb Sg3rd "be" = "isn't" | 34 | notPersonVerb Sg3rd "be" = "isn't" | 34 | false | false | 1 | 5 | 4 | 16 | 5 | 11 | null | null |
olsner/ghc | compiler/nativeGen/RegAlloc/Linear/Main.hs | bsd-3-clause | -- it doesn't matter what order the fixup blocks are returned in.
linearRA block_live accInstr accFixups id (instr:instrs)
= do
(accInstr', new_fixups) <- raInsn block_live accInstr id instr
linearRA block_live accInstr' (new_fixups ++ accFixups) id instrs
-- | Do allocation for a single instruction. | 323 | linearRA block_live accInstr accFixups id (instr:instrs)
= do
(accInstr', new_fixups) <- raInsn block_live accInstr id instr
linearRA block_live accInstr' (new_fixups ++ accFixups) id instrs
-- | Do allocation for a single instruction. | 255 | linearRA block_live accInstr accFixups id (instr:instrs)
= do
(accInstr', new_fixups) <- raInsn block_live accInstr id instr
linearRA block_live accInstr' (new_fixups ++ accFixups) id instrs
-- | Do allocation for a single instruction. | 255 | true | false | 0 | 9 | 65 | 69 | 35 | 34 | null | null |
mcmaniac/ghc | compiler/vectorise/Vectorise/Generic/Description.hs | bsd-3-clause | -------------------------------------------------------------------------------
-- |Determine the generic representation of a data type, given its tycon.
--
tyConRepr :: TyCon -> VM SumRepr
tyConRepr tc
= sum_repr (tyConDataCons tc)
where
-- Build the representation type for a data type with the given constructors.
-- The representation types for each individual constructor are bundled
-- together into a generic sum type.
sum_repr :: [DataCon] -> VM SumRepr
sum_repr [] = return EmptySum
sum_repr [con] = liftM UnarySum (con_repr con)
sum_repr cons
= do let arity = length cons
rs <- mapM con_repr cons
tys <- mapM conReprType rs
-- Get the 'Sum' tycon of this arity (eg Sum2).
sum_tc <- builtin (sumTyCon arity)
-- Get the 'PData' and 'PDatas' tycons for the sum.
psum_tc <- pdataReprTyConExact sum_tc
psums_tc <- pdatasReprTyConExact sum_tc
sel_ty <- builtin (selTy arity)
sels_ty <- builtin (selsTy arity)
selsLength_v <- builtin (selsLength arity)
return $ Sum
{ repr_sum_tc = sum_tc
, repr_psum_tc = psum_tc
, repr_psums_tc = psums_tc
, repr_sel_ty = sel_ty
, repr_sels_ty = sels_ty
, repr_selsLength_v = selsLength_v
, repr_con_tys = tys
, repr_cons = rs
}
-- Build the representation type for a single data constructor.
con_repr con = liftM (ConRepr con) (prod_repr (dataConRepArgTys con))
-- Build the representation type for the fields of a data constructor.
-- The representation types for each individual field are bundled
-- together into a generic product type.
prod_repr :: [Type] -> VM ProdRepr
prod_repr [] = return EmptyProd
prod_repr [ty] = liftM UnaryProd (comp_repr ty)
prod_repr tys
= do let arity = length tys
rs <- mapM comp_repr tys
tys' <- mapM compReprType rs
-- Get the Prod \/ Tuple tycon of this arity (eg Tuple2)
tup_tc <- builtin (prodTyCon arity)
-- Get the 'PData' and 'PDatas' tycons for the product.
ptup_tc <- pdataReprTyConExact tup_tc
ptups_tc <- pdatasReprTyConExact tup_tc
return $ Prod
{ repr_tup_tc = tup_tc
, repr_ptup_tc = ptup_tc
, repr_ptups_tc = ptups_tc
, repr_comp_tys = tys'
, repr_comps = rs
}
-- Build the representation type for a single data constructor field.
comp_repr ty = liftM (Keep ty) (prDictOfReprType ty)
`orElseV` return (Wrap ty)
-- |Yield the type of this sum representation.
-- | 3,052 | tyConRepr :: TyCon -> VM SumRepr
tyConRepr tc
= sum_repr (tyConDataCons tc)
where
-- Build the representation type for a data type with the given constructors.
-- The representation types for each individual constructor are bundled
-- together into a generic sum type.
sum_repr :: [DataCon] -> VM SumRepr
sum_repr [] = return EmptySum
sum_repr [con] = liftM UnarySum (con_repr con)
sum_repr cons
= do let arity = length cons
rs <- mapM con_repr cons
tys <- mapM conReprType rs
-- Get the 'Sum' tycon of this arity (eg Sum2).
sum_tc <- builtin (sumTyCon arity)
-- Get the 'PData' and 'PDatas' tycons for the sum.
psum_tc <- pdataReprTyConExact sum_tc
psums_tc <- pdatasReprTyConExact sum_tc
sel_ty <- builtin (selTy arity)
sels_ty <- builtin (selsTy arity)
selsLength_v <- builtin (selsLength arity)
return $ Sum
{ repr_sum_tc = sum_tc
, repr_psum_tc = psum_tc
, repr_psums_tc = psums_tc
, repr_sel_ty = sel_ty
, repr_sels_ty = sels_ty
, repr_selsLength_v = selsLength_v
, repr_con_tys = tys
, repr_cons = rs
}
-- Build the representation type for a single data constructor.
con_repr con = liftM (ConRepr con) (prod_repr (dataConRepArgTys con))
-- Build the representation type for the fields of a data constructor.
-- The representation types for each individual field are bundled
-- together into a generic product type.
prod_repr :: [Type] -> VM ProdRepr
prod_repr [] = return EmptyProd
prod_repr [ty] = liftM UnaryProd (comp_repr ty)
prod_repr tys
= do let arity = length tys
rs <- mapM comp_repr tys
tys' <- mapM compReprType rs
-- Get the Prod \/ Tuple tycon of this arity (eg Tuple2)
tup_tc <- builtin (prodTyCon arity)
-- Get the 'PData' and 'PDatas' tycons for the product.
ptup_tc <- pdataReprTyConExact tup_tc
ptups_tc <- pdatasReprTyConExact tup_tc
return $ Prod
{ repr_tup_tc = tup_tc
, repr_ptup_tc = ptup_tc
, repr_ptups_tc = ptups_tc
, repr_comp_tys = tys'
, repr_comps = rs
}
-- Build the representation type for a single data constructor field.
comp_repr ty = liftM (Keep ty) (prDictOfReprType ty)
`orElseV` return (Wrap ty)
-- |Yield the type of this sum representation.
-- | 2,894 | tyConRepr tc
= sum_repr (tyConDataCons tc)
where
-- Build the representation type for a data type with the given constructors.
-- The representation types for each individual constructor are bundled
-- together into a generic sum type.
sum_repr :: [DataCon] -> VM SumRepr
sum_repr [] = return EmptySum
sum_repr [con] = liftM UnarySum (con_repr con)
sum_repr cons
= do let arity = length cons
rs <- mapM con_repr cons
tys <- mapM conReprType rs
-- Get the 'Sum' tycon of this arity (eg Sum2).
sum_tc <- builtin (sumTyCon arity)
-- Get the 'PData' and 'PDatas' tycons for the sum.
psum_tc <- pdataReprTyConExact sum_tc
psums_tc <- pdatasReprTyConExact sum_tc
sel_ty <- builtin (selTy arity)
sels_ty <- builtin (selsTy arity)
selsLength_v <- builtin (selsLength arity)
return $ Sum
{ repr_sum_tc = sum_tc
, repr_psum_tc = psum_tc
, repr_psums_tc = psums_tc
, repr_sel_ty = sel_ty
, repr_sels_ty = sels_ty
, repr_selsLength_v = selsLength_v
, repr_con_tys = tys
, repr_cons = rs
}
-- Build the representation type for a single data constructor.
con_repr con = liftM (ConRepr con) (prod_repr (dataConRepArgTys con))
-- Build the representation type for the fields of a data constructor.
-- The representation types for each individual field are bundled
-- together into a generic product type.
prod_repr :: [Type] -> VM ProdRepr
prod_repr [] = return EmptyProd
prod_repr [ty] = liftM UnaryProd (comp_repr ty)
prod_repr tys
= do let arity = length tys
rs <- mapM comp_repr tys
tys' <- mapM compReprType rs
-- Get the Prod \/ Tuple tycon of this arity (eg Tuple2)
tup_tc <- builtin (prodTyCon arity)
-- Get the 'PData' and 'PDatas' tycons for the product.
ptup_tc <- pdataReprTyConExact tup_tc
ptups_tc <- pdatasReprTyConExact tup_tc
return $ Prod
{ repr_tup_tc = tup_tc
, repr_ptup_tc = ptup_tc
, repr_ptups_tc = ptups_tc
, repr_comp_tys = tys'
, repr_comps = rs
}
-- Build the representation type for a single data constructor field.
comp_repr ty = liftM (Keep ty) (prDictOfReprType ty)
`orElseV` return (Wrap ty)
-- |Yield the type of this sum representation.
-- | 2,861 | true | true | 4 | 10 | 1,157 | 554 | 270 | 284 | null | null |
fugyk/cabal | Cabal/Distribution/Simple/Setup.hs | bsd-3-clause | defaultCleanFlags :: CleanFlags
defaultCleanFlags = CleanFlags {
cleanSaveConf = Flag False,
cleanDistPref = NoFlag,
cleanVerbosity = Flag normal
} | 164 | defaultCleanFlags :: CleanFlags
defaultCleanFlags = CleanFlags {
cleanSaveConf = Flag False,
cleanDistPref = NoFlag,
cleanVerbosity = Flag normal
} | 164 | defaultCleanFlags = CleanFlags {
cleanSaveConf = Flag False,
cleanDistPref = NoFlag,
cleanVerbosity = Flag normal
} | 132 | false | true | 0 | 7 | 35 | 37 | 21 | 16 | null | null |
urbanslug/ghc | compiler/basicTypes/Name.hs | bsd-3-clause | stableNameCmp :: Name -> Name -> Ordering
-- Compare lexicographically
stableNameCmp (Name { n_sort = s1, n_occ = occ1 })
(Name { n_sort = s2, n_occ = occ2 })
= (s1 `sort_cmp` s2) `thenCmp` (occ1 `compare` occ2)
-- The ordinary compare on OccNames is lexicographic
where
-- Later constructors are bigger
sort_cmp (External m1) (External m2) = m1 `stableModuleCmp` m2
sort_cmp (External {}) _ = LT
sort_cmp (WiredIn {}) (External {}) = GT
sort_cmp (WiredIn m1 _ _) (WiredIn m2 _ _) = m1 `stableModuleCmp` m2
sort_cmp (WiredIn {}) _ = LT
sort_cmp Internal (External {}) = GT
sort_cmp Internal (WiredIn {}) = GT
sort_cmp Internal Internal = EQ
sort_cmp Internal System = LT
sort_cmp System System = EQ
sort_cmp System _ = GT
{-
************************************************************************
* *
\subsection[Name-instances]{Instance declarations}
* *
************************************************************************
-} | 1,293 | stableNameCmp :: Name -> Name -> Ordering
stableNameCmp (Name { n_sort = s1, n_occ = occ1 })
(Name { n_sort = s2, n_occ = occ2 })
= (s1 `sort_cmp` s2) `thenCmp` (occ1 `compare` occ2)
-- The ordinary compare on OccNames is lexicographic
where
-- Later constructors are bigger
sort_cmp (External m1) (External m2) = m1 `stableModuleCmp` m2
sort_cmp (External {}) _ = LT
sort_cmp (WiredIn {}) (External {}) = GT
sort_cmp (WiredIn m1 _ _) (WiredIn m2 _ _) = m1 `stableModuleCmp` m2
sort_cmp (WiredIn {}) _ = LT
sort_cmp Internal (External {}) = GT
sort_cmp Internal (WiredIn {}) = GT
sort_cmp Internal Internal = EQ
sort_cmp Internal System = LT
sort_cmp System System = EQ
sort_cmp System _ = GT
{-
************************************************************************
* *
\subsection[Name-instances]{Instance declarations}
* *
************************************************************************
-} | 1,264 | stableNameCmp (Name { n_sort = s1, n_occ = occ1 })
(Name { n_sort = s2, n_occ = occ2 })
= (s1 `sort_cmp` s2) `thenCmp` (occ1 `compare` occ2)
-- The ordinary compare on OccNames is lexicographic
where
-- Later constructors are bigger
sort_cmp (External m1) (External m2) = m1 `stableModuleCmp` m2
sort_cmp (External {}) _ = LT
sort_cmp (WiredIn {}) (External {}) = GT
sort_cmp (WiredIn m1 _ _) (WiredIn m2 _ _) = m1 `stableModuleCmp` m2
sort_cmp (WiredIn {}) _ = LT
sort_cmp Internal (External {}) = GT
sort_cmp Internal (WiredIn {}) = GT
sort_cmp Internal Internal = EQ
sort_cmp Internal System = LT
sort_cmp System System = EQ
sort_cmp System _ = GT
{-
************************************************************************
* *
\subsection[Name-instances]{Instance declarations}
* *
************************************************************************
-} | 1,222 | true | true | 8 | 8 | 494 | 321 | 161 | 160 | null | null |
brendanhay/gogol | gogol-youtube/gen/Network/Google/YouTube/Types.hs | mpl-2.0 | -- | View private information of your YouTube channel relevant during the
-- audit process with a YouTube partner
youTubePartnerChannelAuditScope :: Proxy '["https://www.googleapis.com/auth/youtubepartner-channel-audit"]
youTubePartnerChannelAuditScope = Proxy | 260 | youTubePartnerChannelAuditScope :: Proxy '["https://www.googleapis.com/auth/youtubepartner-channel-audit"]
youTubePartnerChannelAuditScope = Proxy | 146 | youTubePartnerChannelAuditScope = Proxy | 39 | true | true | 0 | 7 | 25 | 21 | 12 | 9 | null | null |
enolan/emp-pl-site | Settings.hs | agpl-3.0 | combineStylesheets :: Name -> [Route Static] -> Q Exp
combineStylesheets = combineStylesheets'
(appSkipCombining compileTimeAppSettings)
combineSettings | 160 | combineStylesheets :: Name -> [Route Static] -> Q Exp
combineStylesheets = combineStylesheets'
(appSkipCombining compileTimeAppSettings)
combineSettings | 160 | combineStylesheets = combineStylesheets'
(appSkipCombining compileTimeAppSettings)
combineSettings | 106 | false | true | 0 | 8 | 22 | 40 | 19 | 21 | null | null |
tpsinnem/Idris-dev | src/Idris/Imports.hs | bsd-3-clause | findImport :: [FilePath] -> FilePath -> FilePath -> Idris IFileType
findImport [] ibcsd fp = ierror . Msg $ "Can't find import " ++ fp | 138 | findImport :: [FilePath] -> FilePath -> FilePath -> Idris IFileType
findImport [] ibcsd fp = ierror . Msg $ "Can't find import " ++ fp | 138 | findImport [] ibcsd fp = ierror . Msg $ "Can't find import " ++ fp | 70 | false | true | 0 | 10 | 28 | 55 | 26 | 29 | null | null |
chwarr/bond | compiler/src/Language/Bond/Codegen/Java/Class_java.hs | mit | -- given a struct name and type parameters, and type, returns a type descriptor expression for the field, used in initialization of struct field descriptors
structFieldDescriptorInitStructExpr :: MappingContext -> Type -> String -> [Type] -> Text
structFieldDescriptorInitStructExpr java fieldType typeName params = [lt|#{typeCastExpr} getStructType(#{typeName}.class#{paramExprList params})|]
where
typeCastExpr = [lt|(org.bondlib.StructBondType<#{(getTypeName java) fieldType}>)|]
paramExprList :: [Type] -> Text
paramExprList [] = mempty
paramExprList (x:xs) = [lt|, #{structFieldDescriptorInitTypeExpr java x}#{paramExprList xs}|]
-- given field type, returns a type descriptor expression for the field, used in initialization of struct field descriptors | 796 | structFieldDescriptorInitStructExpr :: MappingContext -> Type -> String -> [Type] -> Text
structFieldDescriptorInitStructExpr java fieldType typeName params = [lt|#{typeCastExpr} getStructType(#{typeName}.class#{paramExprList params})|]
where
typeCastExpr = [lt|(org.bondlib.StructBondType<#{(getTypeName java) fieldType}>)|]
paramExprList :: [Type] -> Text
paramExprList [] = mempty
paramExprList (x:xs) = [lt|, #{structFieldDescriptorInitTypeExpr java x}#{paramExprList xs}|]
-- given field type, returns a type descriptor expression for the field, used in initialization of struct field descriptors | 639 | structFieldDescriptorInitStructExpr java fieldType typeName params = [lt|#{typeCastExpr} getStructType(#{typeName}.class#{paramExprList params})|]
where
typeCastExpr = [lt|(org.bondlib.StructBondType<#{(getTypeName java) fieldType}>)|]
paramExprList :: [Type] -> Text
paramExprList [] = mempty
paramExprList (x:xs) = [lt|, #{structFieldDescriptorInitTypeExpr java x}#{paramExprList xs}|]
-- given field type, returns a type descriptor expression for the field, used in initialization of struct field descriptors | 549 | true | true | 0 | 9 | 124 | 98 | 58 | 40 | null | null |
imuli/gitit | Network/Gitit/Types.hs | gpl-2.0 | sessionData :: String -> SessionData
sessionData user = SessionData (Just user) Nothing | 87 | sessionData :: String -> SessionData
sessionData user = SessionData (Just user) Nothing | 87 | sessionData user = SessionData (Just user) Nothing | 50 | false | true | 0 | 7 | 11 | 29 | 14 | 15 | null | null |
brendanhay/gogol | gogol-vision/gen/Network/Google/Vision/Types/Product.hs | mpl-2.0 | -- | Creates a value of 'GoogleCloudVisionV1p1beta1SafeSearchAnnotation' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'gooSpoof'
--
-- * 'gooRacy'
--
-- * 'gooAdult'
--
-- * 'gooMedical'
--
-- * 'gooViolence'
googleCloudVisionV1p1beta1SafeSearchAnnotation
:: GoogleCloudVisionV1p1beta1SafeSearchAnnotation
googleCloudVisionV1p1beta1SafeSearchAnnotation =
GoogleCloudVisionV1p1beta1SafeSearchAnnotation'
{ _gooSpoof = Nothing
, _gooRacy = Nothing
, _gooAdult = Nothing
, _gooMedical = Nothing
, _gooViolence = Nothing
} | 636 | googleCloudVisionV1p1beta1SafeSearchAnnotation
:: GoogleCloudVisionV1p1beta1SafeSearchAnnotation
googleCloudVisionV1p1beta1SafeSearchAnnotation =
GoogleCloudVisionV1p1beta1SafeSearchAnnotation'
{ _gooSpoof = Nothing
, _gooRacy = Nothing
, _gooAdult = Nothing
, _gooMedical = Nothing
, _gooViolence = Nothing
} | 339 | googleCloudVisionV1p1beta1SafeSearchAnnotation =
GoogleCloudVisionV1p1beta1SafeSearchAnnotation'
{ _gooSpoof = Nothing
, _gooRacy = Nothing
, _gooAdult = Nothing
, _gooMedical = Nothing
, _gooViolence = Nothing
} | 238 | true | true | 1 | 7 | 106 | 63 | 41 | 22 | null | null |
NickAger/LearningHaskell | haskellForMacMiscPlayground/realworldhaskellch04.hsproj/realworldhaskellch04.hs | mit | noAsPattern :: [a] -> [[a]]
noAsPattern (x:xs) = (x:xs) : noAsPattern xs | 72 | noAsPattern :: [a] -> [[a]]
noAsPattern (x:xs) = (x:xs) : noAsPattern xs | 72 | noAsPattern (x:xs) = (x:xs) : noAsPattern xs | 44 | false | true | 0 | 9 | 11 | 53 | 27 | 26 | null | null |
fmapfmapfmap/amazonka | amazonka-efs/gen/Network/AWS/EFS/Types.hs | mpl-2.0 | _MountTargetNotFound :: AsError a => Getting (First ServiceError) a ServiceError
_MountTargetNotFound =
_ServiceError . hasStatus 404 . hasCode "MountTargetNotFound" | 169 | _MountTargetNotFound :: AsError a => Getting (First ServiceError) a ServiceError
_MountTargetNotFound =
_ServiceError . hasStatus 404 . hasCode "MountTargetNotFound" | 169 | _MountTargetNotFound =
_ServiceError . hasStatus 404 . hasCode "MountTargetNotFound" | 88 | false | true | 2 | 9 | 22 | 53 | 22 | 31 | null | null |
yangsiwei880813/CS644 | src/Lexical.hs | gpl-2.0 | tokenBuilder ("NULL", l) = Just (Token NullLit l) | 49 | tokenBuilder ("NULL", l) = Just (Token NullLit l) | 49 | tokenBuilder ("NULL", l) = Just (Token NullLit l) | 49 | false | false | 0 | 7 | 7 | 27 | 13 | 14 | null | null |
acowley/ghc | utils/genprimopcode/Main.hs | bsd-3-clause | ppType (TyApp (TyCon "Word32#") []) = "word32PrimTy" | 56 | ppType (TyApp (TyCon "Word32#") []) = "word32PrimTy" | 56 | ppType (TyApp (TyCon "Word32#") []) = "word32PrimTy" | 56 | false | false | 0 | 8 | 10 | 26 | 12 | 14 | null | null |
siddhanathan/ghc | testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail12.hs | bsd-3-clause | -- Use of foo and bar should give deprecation warnings
f :: T -> T
f e = e { foo = 3, bar = 3 } | 95 | f :: T -> T
f e = e { foo = 3, bar = 3 } | 40 | f e = e { foo = 3, bar = 3 } | 28 | true | true | 0 | 7 | 26 | 37 | 20 | 17 | null | null |
nushio3/ghc | compiler/basicTypes/PatSyn.hs | bsd-3-clause | patSynType :: PatSyn -> Type
-- The full pattern type, used only in error messages
-- See Note [Patten synonym signatures]
patSynType (MkPatSyn { psUnivTyVars = univ_tvs, psReqTheta = req_theta
, psExTyVars = ex_tvs, psProvTheta = prov_theta
, psArgs = orig_args, psOrigResTy = orig_res_ty })
= mkSpecSigmaTy univ_tvs req_theta $ -- use mkSpecSigmaTy because it
mkSpecSigmaTy ex_tvs prov_theta $ -- prints better
mkFunTys orig_args orig_res_ty | 502 | patSynType :: PatSyn -> Type
patSynType (MkPatSyn { psUnivTyVars = univ_tvs, psReqTheta = req_theta
, psExTyVars = ex_tvs, psProvTheta = prov_theta
, psArgs = orig_args, psOrigResTy = orig_res_ty })
= mkSpecSigmaTy univ_tvs req_theta $ -- use mkSpecSigmaTy because it
mkSpecSigmaTy ex_tvs prov_theta $ -- prints better
mkFunTys orig_args orig_res_ty | 408 | patSynType (MkPatSyn { psUnivTyVars = univ_tvs, psReqTheta = req_theta
, psExTyVars = ex_tvs, psProvTheta = prov_theta
, psArgs = orig_args, psOrigResTy = orig_res_ty })
= mkSpecSigmaTy univ_tvs req_theta $ -- use mkSpecSigmaTy because it
mkSpecSigmaTy ex_tvs prov_theta $ -- prints better
mkFunTys orig_args orig_res_ty | 379 | true | true | 0 | 9 | 123 | 87 | 50 | 37 | null | null |
karamellpelle/MEnv | source/GUI/Widget/MinWidget.hs | bsd-2-clause | minShape :: GUIData -> GUIState -> MinWidget a -> GUIShape
minShape gd gs min =
let GUIShape wth hth = minMinShape min
GUIShape wth' hth' = widgetShape gd gs $ minChild min
in GUIShape (Prelude.min wth wth') (Prelude.min hth hth') | 248 | minShape :: GUIData -> GUIState -> MinWidget a -> GUIShape
minShape gd gs min =
let GUIShape wth hth = minMinShape min
GUIShape wth' hth' = widgetShape gd gs $ minChild min
in GUIShape (Prelude.min wth wth') (Prelude.min hth hth') | 248 | minShape gd gs min =
let GUIShape wth hth = minMinShape min
GUIShape wth' hth' = widgetShape gd gs $ minChild min
in GUIShape (Prelude.min wth wth') (Prelude.min hth hth') | 189 | false | true | 0 | 10 | 57 | 101 | 46 | 55 | null | null |
Kinokkory/cluss | src/Type/Cluss/TH.hs | bsd-3-clause | clussify :: Name -> Q Type
clussify nm = do
info <- reify nm
return (ConT ''(C.>+<) `appt` ConT nm `appt` convertInfo info) | 134 | clussify :: Name -> Q Type
clussify nm = do
info <- reify nm
return (ConT ''(C.>+<) `appt` ConT nm `appt` convertInfo info) | 133 | clussify nm = do
info <- reify nm
return (ConT ''(C.>+<) `appt` ConT nm `appt` convertInfo info) | 106 | false | true | 0 | 13 | 33 | 67 | 33 | 34 | null | null |
abakst/liquidhaskell | src/Language/Haskell/Liquid/Constraint/Axioms.hs | bsd-3-clause | grapArgs (Lam x e) = x : grapArgs e | 35 | grapArgs (Lam x e) = x : grapArgs e | 35 | grapArgs (Lam x e) = x : grapArgs e | 35 | false | false | 0 | 7 | 8 | 24 | 11 | 13 | null | null |
ndmitchell/profiterole | src/Type.hs | bsd-3-clause | mergeVal :: Val -> Val -> Val
mergeVal x y
| name x /= name y = error "mergeRoots, invariant violated"
| otherwise = Val
{name = name x
,timeTot = timeTot x + timeTot y
,timeInh = timeInh x + timeInh y
,timeInd = timeInd x + timeInd y
,entries = entries x + entries y} | 316 | mergeVal :: Val -> Val -> Val
mergeVal x y
| name x /= name y = error "mergeRoots, invariant violated"
| otherwise = Val
{name = name x
,timeTot = timeTot x + timeTot y
,timeInh = timeInh x + timeInh y
,timeInd = timeInd x + timeInd y
,entries = entries x + entries y} | 316 | mergeVal x y
| name x /= name y = error "mergeRoots, invariant violated"
| otherwise = Val
{name = name x
,timeTot = timeTot x + timeTot y
,timeInh = timeInh x + timeInh y
,timeInd = timeInd x + timeInd y
,entries = entries x + entries y} | 286 | false | true | 0 | 9 | 104 | 138 | 64 | 74 | null | null |
brendanhay/gogol | gogol-plus-domains/gen/Network/Google/PlusDomains/Types/Product.hs | mpl-2.0 | -- | Media type of the link.
aoaitiiType :: Lens' ActivityObjectAttachmentsItemThumbnailsItemImage (Maybe Text)
aoaitiiType
= lens _aoaitiiType (\ s a -> s{_aoaitiiType = a}) | 176 | aoaitiiType :: Lens' ActivityObjectAttachmentsItemThumbnailsItemImage (Maybe Text)
aoaitiiType
= lens _aoaitiiType (\ s a -> s{_aoaitiiType = a}) | 147 | aoaitiiType
= lens _aoaitiiType (\ s a -> s{_aoaitiiType = a}) | 64 | true | true | 0 | 9 | 25 | 48 | 25 | 23 | null | null |
diku-dk/futhark | src/Futhark/Util.hs | isc | encodeChar 'Z' = "ZZ" | 21 | encodeChar 'Z' = "ZZ" | 21 | encodeChar 'Z' = "ZZ" | 21 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
alexbaluta/courseography | dependencies/HaXml-1.25.3/src/Text/XML/HaXml/ByteStringPP.hs | gpl-3.0 | defaultdecl :: DefaultDecl -> ByteString
defaultdecl REQUIRED = text "#REQUIRED" | 90 | defaultdecl :: DefaultDecl -> ByteString
defaultdecl REQUIRED = text "#REQUIRED" | 90 | defaultdecl REQUIRED = text "#REQUIRED" | 49 | false | true | 0 | 5 | 19 | 25 | 11 | 14 | null | null |
FranklinChen/Idris-dev | src/IRTS/CodegenJavaScript.hs | bsd-3-clause | jsBASETOP _ n = JSAssign jsSTACKBASE (JSBinOp "+" jsSTACKTOP (JSNum (JSInt n))) | 79 | jsBASETOP _ n = JSAssign jsSTACKBASE (JSBinOp "+" jsSTACKTOP (JSNum (JSInt n))) | 79 | jsBASETOP _ n = JSAssign jsSTACKBASE (JSBinOp "+" jsSTACKTOP (JSNum (JSInt n))) | 79 | false | false | 1 | 11 | 11 | 38 | 18 | 20 | null | null |
facebookincubator/duckling | Duckling/Time/ZH/Corpus.hs | bsd-3-clause | allExamples :: [Example]
allExamples = concat
[ examples (datetime (2013, 2, 12, 4, 30, 0) Second)
[ "现在"
, "此时"
, "此刻"
, "当前"
, "現在"
, "此時"
, "當前"
, "宜家"
, "而家"
, "依家"
]
, examples (datetime (2013, 2, 12, 0, 0, 0) Day)
[ "今天"
, "今日"
]
, examples (datetime (2013, 2, 11, 0, 0, 0) Day)
[ "昨天"
, "昨日"
, "尋日"
]
, examples (datetime (2013, 2, 13, 0, 0, 0) Day)
[ "明天"
, "明日"
, "聽日"
]
, examples (datetime (2013, 2, 14, 0, 0, 0) Day)
[ "后天"
, "後天"
, "後日"
]
, examples (datetime (2013, 2, 15, 0, 0, 0) Day)
[ "大後日"
, "大後天"
]
, examples (datetime (2013, 2, 10, 0, 0, 0) Day)
[ "前天"
, "前日"
]
, examples (datetime (2013, 2, 18, 0, 0, 0) Day)
[ "星期一"
, "礼拜一"
, "周一"
, "禮拜一"
, "週一"
]
, examples (datetime (2013, 2, 19, 0, 0, 0) Day)
[ "星期二"
, "礼拜二"
, "周二"
, "禮拜二"
, "週二"
]
, examples (datetime (2013, 2, 13, 0, 0, 0) Day)
[ "星期三"
, "礼拜三"
, "周三"
, "禮拜三"
, "週三"
]
, examples (datetime (2013, 2, 14, 0, 0, 0) Day)
[ "星期四"
, "礼拜四"
, "周四"
, "禮拜四"
, "週四"
]
, examples (datetime (2013, 2, 15, 0, 0, 0) Day)
[ "星期五"
, "礼拜五"
, "周五"
, "禮拜五"
, "週五"
]
, examples (datetime (2013, 2, 16, 0, 0, 0) Day)
[ "星期六"
, "礼拜六"
, "周六"
, "禮拜六"
, "週六"
]
, examples (datetime (2013, 2, 17, 0, 0, 0) Day)
[ "星期日"
, "星期天"
, "礼拜天"
, "周日"
, "禮拜天"
, "週日"
]
, examples (datetimeInterval ((2013, 2, 15, 18, 0, 0), (2013, 2, 18, 0, 0, 0)) Hour)
[ "这周末"
, "這週末"
]
, examples (datetimeInterval ((2013, 2, 18, 4, 0, 0), (2013, 2, 18, 12, 0, 0)) Hour)
[ "周一早上"
, "周一早晨"
, "礼拜一早上"
, "礼拜一早晨"
, "週一早上"
, "週一早晨"
, "禮拜一早上"
, "禮拜一早晨"
]
, examples (datetime (2013, 2, 10, 0, 0, 0) Day)
[ "上周日"
, "上星期天"
, "上礼拜天"
, "上週日"
, "上星期天"
, "上禮拜天"
, "上禮拜日"
]
, examples (datetime (2013, 2, 10, 0, 0, 0) Day)
[ "周日, 二月十号"
, "星期天, 二月十号"
, "礼拜天, 二月十号"
, "週日, 二月十號"
, "星期天, 二月十號"
, "禮拜天, 二月十號"
, "禮拜日, 二月十號"
]
, examples (datetime (2013, 10, 7, 0, 0, 0) Day)
[ "十月第一个星期一"
, "十月的第一个星期一"
, "十月第一個星期一"
, "十月的第一個星期一"
]
, examples (datetime (2013, 2, 5, 0, 0, 0) Day)
[ "上周二"
, "上礼拜二"
, "上週二"
, "上禮拜二"
, "上星期二"
]
, examples (datetime (2013, 3, 1, 0, 0, 0) Day)
[ "三月一号"
, "三月一日"
, "三月一號"
]
, examples (datetime (2015, 3, 3, 0, 0, 0) Day)
[ "2015年3月3号"
, "2015年3月三号"
, "2015年三月3号"
, "2015年三月三号"
, "2015年3月3號"
, "2015年3月三號"
, "2015年三月3號"
, "2015年三月三號"
, "3/3/2015"
, "3/3/15"
, "2015-3-3"
, "2015-03-03"
, "二零一五年三月三號"
]
, examples (datetime (2013, 2, 15, 0, 0, 0) Day)
[ "2013年2月15号"
, "2013年二月十五号"
, "2月15号"
, "二月十五号"
, "2013年2月15號"
, "2013年二月十五號"
, "2月15號"
, "二月十五號"
, "2/15"
, "二零一三年二月十五號"
]
, examples (datetime (1974, 10, 31, 0, 0, 0) Day)
[ "10/31/1974"
, "10/31/74"
]
, examples (datetimeInterval ((2013, 2, 15, 4, 0, 0), (2013, 2, 15, 12, 0, 0)) Hour)
[ "二月十五号早上"
, "二月十五号早晨"
, "2月15号早上"
, "2月15号早晨"
, "二月十五號早上"
, "二月十五號早晨"
, "2月15號早上"
, "2月15號早晨"
]
, examples (datetime (2013, 2, 19, 0, 0, 0) Day)
[ "下周二"
, "下週二"
, "下星期二"
, "下禮拜二"
, "下礼拜二"
]
, examples (datetime (2013, 2, 13, 0, 0, 0) Day)
[ "这周三"
, "这礼拜三"
, "這週三"
, "這禮拜三"
, "今個星期三"
, "今個礼拜三"
, "今個禮拜三"
]
, examples (datetime (2013, 2, 13, 0, 0, 0) Day)
[ "下周三"
, "下礼拜三"
, "下週三"
, "下禮拜三"
, "下星期三"
]
, examples (datetime (2013, 2, 18, 0, 0, 0) Day)
[ "这周一"
, "这礼拜一"
, "這週一"
, "這禮拜一"
, "今個星期一"
, "今個礼拜一"
, "今個禮拜一"
]
, examples (datetime (2013, 2, 12, 0, 0, 0) Day)
[ "这周二"
, "这礼拜二"
, "這週二"
, "這禮拜二"
, "今個星期二"
, "今個礼拜二"
, "今個禮拜二"
, "今星期二"
, "今礼拜二"
, "今禮拜二"
]
, examples (datetime (2013, 2, 11, 0, 0, 0) Week)
[ "这周"
, "这一周"
, "这礼拜"
, "这一礼拜"
, "這週"
, "這一周"
, "這禮拜"
, "這一禮拜"
, "今個星期"
, "今個礼拜"
, "今個禮拜"
]
, examples (datetime (2013, 2, 4, 0, 0, 0) Week)
[ "上周"
, "上週"
, "上個星期"
, "上個礼拜"
, "上個禮拜"
]
, examples (datetime (2013, 2, 18, 0, 0, 0) Week)
[ "下周"
, "下週"
, "下星期"
, "下礼拜"
, "下禮拜"
]
, examples (datetime (2013, 1, 1, 0, 0, 0) Month)
[ "上月"
, "上个月"
, "上個月"
]
, examples (datetime (2013, 3, 1, 0, 0, 0) Month)
[ "下月"
, "下个月"
, "下個月"
, "3月"
, "3月份"
, "三月"
]
, examples (datetime (2013, 2, 20, 0, 0, 0) Day)
[ "今個月二十號"
, "今個月20号"
, "今個月廿號"
]
, examples (datetime (2013, 3, 20, 0, 0, 0) Day)
[ "下個月二十號"
, "下個月20号"
, "下個月廿號"
]
, examples (datetime (2012, 1, 1, 0, 0, 0) Year)
[ "去年"
, "上年"
]
, examples (datetime (2013, 1, 1, 0, 0, 0) Year)
[ "今年"
, "这一年"
, "這一年"
]
, examples (datetime (2014, 1, 1, 0, 0, 0) Year)
[ "明年"
, "下年"
]
, examples (datetime (2014, 9, 1, 0, 0, 0) Month)
[ "下年9月"
, "明年九月"
]
, examples (datetimeInterval ((2013, 2, 12, 4, 29, 58), (2013, 2, 12, 4, 30, 0)) Second)
[ "上两秒"
, "上二秒"
, "前两秒"
, "前二秒"
, "上兩秒"
, "前兩秒"
, "兩秒前"
, "兩秒之前"
]
, examples (datetimeInterval ((2013, 2, 12, 4, 30, 1), (2013, 2, 12, 4, 30, 4)) Second)
[ "下三秒"
, "后三秒"
, "後三秒"
, "三秒後"
, "三秒之後"
]
, examples (datetimeInterval ((2013, 2, 12, 4, 28, 0), (2013, 2, 12, 4, 30, 0)) Minute)
[ "上两分钟"
, "上二分钟"
, "前两分钟"
, "前二分钟"
, "上兩分鐘"
, "上二分鐘"
, "前兩分鐘"
, "前二分鐘"
, "兩分鐘前"
, "兩分鐘之前"
]
, examples (datetimeInterval ((2013, 2, 12, 4, 31, 0), (2013, 2, 12, 4, 34, 0)) Minute)
[ "下三分钟"
, "后三分钟"
, "下三分鐘"
, "後三分鐘"
, "三分鐘後"
, "三分鐘之後"
]
, examples (datetimeInterval ((2013, 2, 12, 2, 0, 0), (2013, 2, 12, 4, 0, 0)) Hour)
[ "上两小时"
, "上二小时"
, "前两小时"
, "前二小时"
, "上兩小時"
, "上二小時"
, "前兩小時"
, "前二小時"
, "兩小時之前"
, "兩個鐘之前"
, "兩小時前"
, "兩個鐘前"
]
, examples (datetimeInterval ((2013, 2, 12, 5, 0, 0), (2013, 2, 12, 8, 0, 0)) Hour)
[ "下三小时"
, "后三小时"
, "下三小時"
, "後三小時"
, "三小時之後"
, "三個鐘之後"
, "三小時後"
, "三個鐘後"
]
, examples (datetimeInterval ((2013, 2, 10, 0, 0, 0), (2013, 2, 12, 0, 0, 0)) Day)
[ "上两天"
, "前两天"
, "上兩天"
, "前兩天"
, "兩天前"
, "兩天之前"
, "兩日前"
, "兩日之前"
]
, examples (datetimeInterval ((2013, 2, 13, 0, 0, 0), (2013, 2, 16, 0, 0, 0)) Day)
[ "下三天"
, "后三天"
, "後三天"
, "三天後"
, "三天之後"
, "三日後"
, "三日之後"
]
, examples (datetimeInterval ((2013, 1, 28, 0, 0, 0), (2013, 2, 11, 0, 0, 0)) Week)
[ "上两周"
, "上二周"
, "上兩週"
, "上二週"
, "兩星期前"
, "兩星期之前"
, "兩個禮拜前"
, "兩個禮拜之前"
]
, examples (datetimeInterval ((2013, 2, 18, 0, 0, 0), (2013, 3, 11, 0, 0, 0)) Week)
[ "下三周"
, "下三个周"
, "下三週"
, "下三個週"
, "三星期後"
, "三星期之後"
, "三個禮拜後"
, "三個禮拜之後"
]
, examples (datetimeInterval ((2012, 12, 0, 0, 0, 0), (2013, 2, 0, 0, 0, 0)) Month)
[ "上两个月"
, "上二个月"
, "前两个月"
, "前二个月"
, "前两月"
, "上兩個月"
, "上二個月"
, "前兩個月"
, "前二個月"
, "前兩月"
, "兩個月前"
, "兩個月之前"
]
, examples (datetimeInterval ((2013, 3, 0, 0, 0, 0), (2013, 6, 0, 0, 0, 0)) Month)
[ "下三个月"
, "后三个月"
, "後三個月"
, "三個月後"
, "三個月之後"
]
, examples (datetimeInterval ((2011, 0, 0, 0, 0, 0), (2013, 0, 0, 0, 0, 0)) Year)
[ "前两年"
, "前兩年"
, "兩年前"
, "兩年之前"
]
, examples (datetimeInterval ((2014, 0, 0, 0, 0, 0), (2017, 0, 0, 0, 0, 0)) Year)
[ "下三年"
, "三年後"
, "三年之後"
]
, examples (datetime (2013, 2, 12, 15, 0, 0) Hour)
[ "三点"
, "三點"
, "3pm"
, "下午三點"
, "晏晝三點"
, "下午三時"
]
, examples (datetime (2013, 2, 12, 15, 15, 0) Minute)
[ "下午三点十五"
, "下午3:15"
, "15:15"
, "3:15pm"
, "3:15PM"
, "3:15p"
, "下午三點十五"
, "晏晝三點十五"
, "下午三点十五分"
, "下午三點十五分"
, "晏晝三點十五分"
, "晏晝三點三"
, "晏晝三點踏三"
, "晏晝三點搭三"
, "晏晝三點三個字"
]
, examples (datetime (2013, 2, 12, 15, 05, 0) Minute)
[ "下午三点零五"
, "下午3:05"
, "15:05"
, "3:05pm"
, "3:05PM"
, "3:05p"
, "下午三點零五"
, "晏晝三點零五"
, "下午三点零五分"
, "下午三點零五分"
, "晏晝三點零五分"
, "晏晝三點一"
, "晏晝三點踏一"
, "晏晝三點搭一"
, "晏晝三點一個字"
]
, examples (datetime (2013, 2, 12, 15, 30, 0) Minute)
[ "下午三点半"
, "下午3:30"
, "15:30"
, "3:30pm"
, "3:30PM"
, "3:30p"
, "下午三點半"
, "晏晝三點半"
, "下午三点三十分"
, "下午三點三十分"
, "晏晝三點三十分"
, "晏晝三點踏半"
, "晏晝三點搭半"
]
, examples (datetime (2013, 2, 12, 13, 0, 0) Minute)
[ "4pm CET"
]
, examples (datetime (2015, 4, 14, 0, 0, 0) Day)
[ "2015年4月14号"
, "2015年4月14號"
]
, examples (datetime (2013, 2, 12, 20, 0, 0) Hour)
[ "今晚8点"
, "今晚八点"
, "今晚8點"
, "今晚八點"
]
, examples (datetimeHoliday (2014, 1, 1, 0, 0, 0) Day "元旦")
[ "元旦"
, "元旦节"
, "元旦節"
, "阳历新年"
]
, examples (datetimeHoliday (2013, 3, 8, 0, 0, 0) Day "妇女节")
[ "妇女节"
, "婦女節"
]
, examples (datetimeHoliday (2013, 5, 1, 0, 0, 0) Day "劳动节")
[ "劳动节"
, "勞動節"
, "五一国际劳动节"
]
, examples (datetimeHoliday (2013, 6, 1, 0, 0, 0) Day "儿童节")
[ "儿童节"
, "兒童節"
, "国际儿童节"
]
, examples (datetimeHoliday (2013, 8, 1, 0, 0, 0) Day "建军节")
[ "建军节"
, "八一建軍節"
, "建軍節"
]
, examples (datetimeHoliday (2013, 12, 25, 0, 0, 0) Day "圣诞节")
[ "圣诞"
, "聖誕"
, "圣诞节"
, "聖誕節"
]
, examples (datetimeHoliday (2013, 4, 1, 0, 0, 0) Day "愚人节")
[ "愚人节"
, "愚人節"
]
, examples (datetimeHoliday (2013, 10, 31, 0, 0, 0) Day "万圣节")
[ "万圣节"
, "萬聖節"
]
, examples (datetimeHoliday (2013, 12, 20, 0, 0, 0) Day "澳门回归纪念日")
[ "澳门回归纪念日"
, "澳門回歸紀念日"
]
, examples (datetimeHoliday (2013, 2, 14, 0, 0, 0) Day "情人节")
[ "情人节"
, "情人節"
, "圣瓦伦丁节"
]
, examples (datetimeHoliday (2013, 3, 15, 0, 0, 0) Day "国际消费者权益日")
[ "国际消费者权益日"
, "国际消費者權益日"
, "三一五"
]
, examples (datetimeHoliday (2013, 6, 1, 15, 15, 0) Minute "儿童节")
[ "儿童节下午三点十五"
, "兒童節下午三點十五"
]
, examples (datetimeIntervalHoliday ((2013, 2, 14, 18, 0, 0), (2013, 2, 15, 0, 0, 0)) Hour "情人节")
[ "情人节晚上"
, "情人節晚上"
]
, examples (datetimeHoliday (2013, 9, 13, 0, 0, 0) Day "赎罪日")
[ "赎罪日"
, "贖罪日"
]
, examples (datetimeHoliday (2013, 9, 13, 0, 0, 0) Day "赎罪日")
[ "赎罪日"
, "贖罪日"
]
, examples (datetimeHoliday (2013, 2, 13, 0, 0, 0) Day "大斋首日")
[ "大斋首日"
, "聖灰星期三"
, "灰日"
, "圣灰礼仪日"
, "圣灰日"
]
, examples (datetimeHoliday (2013, 11, 13, 0, 0, 0) Day "阿舒拉节")
[ "阿舒拉節"
]
-- wiki says 11/8
, examples (datetimeHoliday (2013, 11, 9, 0, 0, 0) Day "克哈特普迦节")
[ "克哈特普迦节"
]
, examples (datetimeHoliday (2014, 1, 31, 0, 0, 0) Day "春节")
[ "春节"
, "农历新年"
, "新春"
, "正月正时"
, "正月朔日"
, "正月正時"
]
, examples (datetimeHoliday (2013, 5, 30, 0, 0, 0) Day "基督圣体节")
[ "基督聖體节"
, "基督聖體聖血瞻礼"
, "基督聖體聖血節"
]
, examples (datetimeHoliday (2013, 11, 3, 0, 0, 0) Day "排灯节")
[ "万灯节"
, "印度燈節"
, "排灯节"
]
, examples (datetimeHoliday (2013, 4, 1, 0, 0, 0) Day "复活节星期一")
[ "复活节星期一"
, "復活節星期一"
]
, examples (datetimeHoliday (2013, 3, 31, 0, 0, 0) Day "复活节")
[ "复活节"
, "復活節"
, "主復活日"
]
, examples (datetimeHoliday (2013, 10, 15, 0, 0, 0) Day "古尔邦节")
[ "古尔邦节"
, "古爾邦節"
, "宰牲节"
]
, examples (datetimeHoliday (2013, 8, 8, 0, 0, 0) Day "开斋节")
[ "开斋节"
, "開齋節"
, "肉孜节"
, "尔代节"
, "爾代節"
]
, examples (datetimeHoliday (2013, 3, 29, 0, 0, 0) Day "耶稣受难日")
[ "主受难日"
, "主受难节"
, "沈默周五"
, "聖週五"
, "耶穌受難日"
]
, examples (datetimeHoliday (2013, 3, 26, 0, 0, 0) Day "侯丽节")
[ "侯丽节"
, "荷麗节"
, "洒红节"
, "灑紅节"
, "欢悦节"
, "五彩節"
, "胡里节"
, "好利节"
, "霍利節"
]
, examples (datetimeHoliday (2013, 3, 30, 0, 0, 0) Day "圣周六")
[ "神圣周六"
, "聖週六"
, "耶稣受难日翌日"
, "主受難節翌日"
, "復活節前夜"
, "黑色星期六"
]
, examples (datetimeHoliday (2013, 11, 4, 0, 0, 0) Day "伊斯兰新年")
[ "伊斯兰新年"
, "伊斯兰教新年"
, "伊斯兰历新年"
]
, examples (datetimeHoliday (2013, 6, 6, 0, 0, 0) Day "登霄节")
[ "登霄节"
, "夜行登霄節"
]
, examples (datetimeHoliday (2014, 1, 16, 0, 0, 0) Day "印度丰收节第四天")
[ "印度丰收节第四天"
, "龐格爾節第四天"
, "庞格尔节第四天"
]
, examples (datetimeHoliday (2013, 4, 27, 0, 0, 0) Day "篝火节")
[ "篝火节"
, "犹太教篝火节"
, "猶太教篝火節"
]
, examples (datetimeHoliday (2013, 8, 4, 0, 0, 0) Day "法令之夜")
[ "法令之夜"
, "权力之夜"
]
, examples (datetimeHoliday (2013, 4, 27, 0, 0, 0) Day "拉撒路圣周六")
[ "拉撒路聖週六"
, "拉匝路周六"
]
, examples (datetimeHoliday (2014, 1, 15, 0, 0, 0) Day "印度丰收节第三天")
[ "印度丰收节第三天"
, "龐格爾節第三天"
, "庞格尔节第三天"
]
, examples (datetimeHoliday (2013, 3, 28, 0, 0, 0) Day "神圣星期四")
[ "濯足節"
, "神聖星期四"
, "圣周星期四"
, "圣周四"
, "設立聖餐日"
]
, examples (datetimeHoliday (2014, 1, 13, 0, 0, 0) Day "圣纪节")
[ "圣纪节"
, "聖紀節"
]
, examples (datetimeHoliday (2013, 5, 6, 0, 0, 0) Day "东正教复活节星期一")
[ "东正教复活节星期一"
, "東正教復活節星期一"
]
, examples (datetimeHoliday (2013, 5, 4, 0, 0, 0) Day "东正教圣周六")
[ "東正教神聖週六"
, "東正教聖週六"
, "東正教耶稣受难日翌日"
, "東正教主受難節翌日"
, "東正教复活节前夜"
]
, examples (datetimeHoliday (2013, 5, 3, 0, 0, 0) Day "东正教耶稣受难日")
[ "東正教耶穌受难日"
, "东正教主受难节"
, "东正教圣周五"
, "東正教聖週五"
, "東正教沈默週五"
]
, examples (datetimeHoliday (2013, 4, 28, 0, 0, 0) Day "东正教棕枝主日")
[ "东正教棕枝主日"
, "东正教圣枝主日"
, "东正教聖樹主日"
, "東正教基督苦難主日"
]
, examples (datetimeHoliday (2013, 3, 24, 0, 0, 0) Day "棕枝主日")
[ "棕枝主日"
, "圣枝主日"
, "聖樹主日"
, "基督苦難主日"
]
, examples (datetimeHoliday (2013, 5, 19, 0, 0, 0) Day "五旬节")
[ "五旬节"
, "圣灵降临节"
, "聖靈降臨日"
]
, examples (datetimeHoliday (2013, 8, 20, 0, 0, 0) Day "印度兄妹节")
[ "印度兄妹节"
, "拉克沙班丹節"
]
, examples (datetimeHoliday (2013, 9, 25, 0, 0, 0) Day "圣会节")
[ "圣会节"
, "聖会節"
]
, examples (datetimeHoliday (2013, 2, 12, 0, 0, 0) Day "忏悔节")
[ "忏悔節"
, "忏悔火曜日"
, "煎餅星期二"
]
, examples (datetimeHoliday (2013, 9, 26, 0, 0, 0) Day "西赫托拉节")
[ "西赫托拉节"
, "西赫妥拉节"
, "诵经节"
, "誦經节"
, "转经节"
, "轉經節"
, "律法節"
, "歡慶聖法節"
]
, examples (datetimeHoliday (2014, 1, 14, 0, 0, 0) Day "印度丰收节")
[ "印度丰收节"
, "淡米爾豐收節"
, "淡米尔丰收节"
]
, examples (datetimeHoliday (2013, 8, 20, 0, 0, 0) Day "欧南节")
[ "欧南节"
, "欧南節"
]
, examples (datetimeHoliday (2013, 7, 15, 0, 0, 0) Day "圣殿被毁日")
[ "圣殿被毁日"
, "禁食日"
, "聖殿被毁日"
]
, examples (datetimeHoliday (2013, 5, 26, 0, 0, 0) Day "圣三一主日")
[ "圣三一主日"
, "天主三一主日"
, "天主聖三一节"
, "聖三主日"
, "圣三节"
]
, examples (datetimeHoliday (2013, 10, 14, 0, 0, 0) Day "十胜节")
[ "十勝節"
, "凯旋节"
, "圣母节"
]
, examples (datetimeHoliday (2014, 1, 15, 0, 0, 0) Day "犹太植树节")
[ "犹太植树节"
, "猶太植樹節"
, "图比舍巴特节"
, "圖比舍巴特節"
, "树木新年"
, "樹木新年"
]
, examples (datetimeHoliday (2013, 5, 24, 0, 0, 0) Day "卫塞节")
[ "卫塞节"
, "衛塞節"
, "威瑟节"
, "比萨宝蕉节"
, "比薩寶蕉節"
]
, examples (datetimeHoliday (2013, 4, 15, 0, 0, 0) Day "以色列独立日")
[ "以色列独立日"
, "以色列獨立日"
, "以色列国庆节"
, "以色列國慶節"
]
, examples (datetimeHoliday (2013, 9, 13, 0, 0, 0) Day "赎罪日")
[ "赎罪日"
, "贖罪日"
]
, examples (datetimeHoliday (2013, 5, 20, 0, 0, 0) Day "圣灵节庆日")
[ "圣灵节庆日"
, "聖靈節慶日"
]
, examples (datetimeHoliday (2013, 10, 16, 0, 0, 0) Day "老板节")
[ "老板节"
, "老闆節"
]
, examples (datetimeIntervalHoliday ((2013, 4, 26, 0, 0, 0), (2013, 4, 29, 0, 0, 0)) Day "全球青年服务日")
[ "全球青年服务日"
, "全球青年服務日"
]
, examples (datetimeIntervalHoliday ((2018, 2, 19, 0, 0, 0), (2018, 3, 31, 0, 0, 0)) Day "四旬节")
[ "2018年四旬节"
, "2018年四旬節"
]
, examples (datetimeIntervalHoliday ((2018, 12, 2, 0, 0, 0), (2018, 12, 10, 0, 0, 0)) Day "光明节")
[ "2018年光明节"
, "2018年修殿节"
, "2018年献殿节"
, "2018年獻殿节"
, "2018年烛光节"
, "2018年哈努卡节"
, "2018年馬加比節"
]
, examples (datetimeIntervalHoliday ((2018, 2, 14, 0, 0, 0), (2018, 4, 1, 0, 0, 0)) Day "大斋期")
[ "2018年大斋期"
, "2018年大齋節"
, "2018年大斋节"
]
, examples (datetimeIntervalHoliday ((2018, 10, 9, 0, 0, 0), (2018, 10, 19, 0, 0, 0)) Day "九夜节")
[ "2018年九夜节"
, "2018年难近母节"
, "2018年難近母節"
]
, examples (datetimeIntervalHoliday ((2018, 3, 30, 0, 0, 0), (2018, 4, 8, 0, 0, 0)) Day "逾越节")
[ "2018年逾越节"
, "2018年逾越節"
]
, examples (datetimeIntervalHoliday ((2034, 11, 12, 0, 0, 0), (2034, 12, 12, 0, 0, 0)) Day "斋月")
[ "2034年斋月"
, "2034年穆斯林斋月"
, "2034年穆斯林齋月"
]
, examples (datetimeIntervalHoliday ((2018, 9, 9, 0, 0, 0), (2018, 9, 12, 0, 0, 0)) Day "犹太新年")
[ "2018年犹太新年"
, "2018年猶太新年"
]
, examples (datetimeIntervalHoliday ((2018, 5, 19, 0, 0, 0), (2018, 5, 22, 0, 0, 0)) Day "七七节")
[ "2018年七七节"
, "2018年沙夫幼特节"
, "2018年週日節"
, "2018年收获节"
, "2018年新果实节"
, "2018年新果實節"
, "2018年收穫節"
]
, examples (datetimeIntervalHoliday ((2018, 9, 23, 0, 0, 0), (2018, 10, 2, 0, 0, 0)) Day "住棚节")
[ "2018年住棚节"
, "2018年住棚節"
]
, examples (datetimeIntervalHoliday ((2016, 3, 19, 20, 30, 0), (2016, 3, 19, 21, 31, 0)) Minute "地球一小时")
[ "2016年地球一小时"
, "2016年地球一小時"
]
] | 24,345 | allExamples :: [Example]
allExamples = concat
[ examples (datetime (2013, 2, 12, 4, 30, 0) Second)
[ "现在"
, "此时"
, "此刻"
, "当前"
, "現在"
, "此時"
, "當前"
, "宜家"
, "而家"
, "依家"
]
, examples (datetime (2013, 2, 12, 0, 0, 0) Day)
[ "今天"
, "今日"
]
, examples (datetime (2013, 2, 11, 0, 0, 0) Day)
[ "昨天"
, "昨日"
, "尋日"
]
, examples (datetime (2013, 2, 13, 0, 0, 0) Day)
[ "明天"
, "明日"
, "聽日"
]
, examples (datetime (2013, 2, 14, 0, 0, 0) Day)
[ "后天"
, "後天"
, "後日"
]
, examples (datetime (2013, 2, 15, 0, 0, 0) Day)
[ "大後日"
, "大後天"
]
, examples (datetime (2013, 2, 10, 0, 0, 0) Day)
[ "前天"
, "前日"
]
, examples (datetime (2013, 2, 18, 0, 0, 0) Day)
[ "星期一"
, "礼拜一"
, "周一"
, "禮拜一"
, "週一"
]
, examples (datetime (2013, 2, 19, 0, 0, 0) Day)
[ "星期二"
, "礼拜二"
, "周二"
, "禮拜二"
, "週二"
]
, examples (datetime (2013, 2, 13, 0, 0, 0) Day)
[ "星期三"
, "礼拜三"
, "周三"
, "禮拜三"
, "週三"
]
, examples (datetime (2013, 2, 14, 0, 0, 0) Day)
[ "星期四"
, "礼拜四"
, "周四"
, "禮拜四"
, "週四"
]
, examples (datetime (2013, 2, 15, 0, 0, 0) Day)
[ "星期五"
, "礼拜五"
, "周五"
, "禮拜五"
, "週五"
]
, examples (datetime (2013, 2, 16, 0, 0, 0) Day)
[ "星期六"
, "礼拜六"
, "周六"
, "禮拜六"
, "週六"
]
, examples (datetime (2013, 2, 17, 0, 0, 0) Day)
[ "星期日"
, "星期天"
, "礼拜天"
, "周日"
, "禮拜天"
, "週日"
]
, examples (datetimeInterval ((2013, 2, 15, 18, 0, 0), (2013, 2, 18, 0, 0, 0)) Hour)
[ "这周末"
, "這週末"
]
, examples (datetimeInterval ((2013, 2, 18, 4, 0, 0), (2013, 2, 18, 12, 0, 0)) Hour)
[ "周一早上"
, "周一早晨"
, "礼拜一早上"
, "礼拜一早晨"
, "週一早上"
, "週一早晨"
, "禮拜一早上"
, "禮拜一早晨"
]
, examples (datetime (2013, 2, 10, 0, 0, 0) Day)
[ "上周日"
, "上星期天"
, "上礼拜天"
, "上週日"
, "上星期天"
, "上禮拜天"
, "上禮拜日"
]
, examples (datetime (2013, 2, 10, 0, 0, 0) Day)
[ "周日, 二月十号"
, "星期天, 二月十号"
, "礼拜天, 二月十号"
, "週日, 二月十號"
, "星期天, 二月十號"
, "禮拜天, 二月十號"
, "禮拜日, 二月十號"
]
, examples (datetime (2013, 10, 7, 0, 0, 0) Day)
[ "十月第一个星期一"
, "十月的第一个星期一"
, "十月第一個星期一"
, "十月的第一個星期一"
]
, examples (datetime (2013, 2, 5, 0, 0, 0) Day)
[ "上周二"
, "上礼拜二"
, "上週二"
, "上禮拜二"
, "上星期二"
]
, examples (datetime (2013, 3, 1, 0, 0, 0) Day)
[ "三月一号"
, "三月一日"
, "三月一號"
]
, examples (datetime (2015, 3, 3, 0, 0, 0) Day)
[ "2015年3月3号"
, "2015年3月三号"
, "2015年三月3号"
, "2015年三月三号"
, "2015年3月3號"
, "2015年3月三號"
, "2015年三月3號"
, "2015年三月三號"
, "3/3/2015"
, "3/3/15"
, "2015-3-3"
, "2015-03-03"
, "二零一五年三月三號"
]
, examples (datetime (2013, 2, 15, 0, 0, 0) Day)
[ "2013年2月15号"
, "2013年二月十五号"
, "2月15号"
, "二月十五号"
, "2013年2月15號"
, "2013年二月十五號"
, "2月15號"
, "二月十五號"
, "2/15"
, "二零一三年二月十五號"
]
, examples (datetime (1974, 10, 31, 0, 0, 0) Day)
[ "10/31/1974"
, "10/31/74"
]
, examples (datetimeInterval ((2013, 2, 15, 4, 0, 0), (2013, 2, 15, 12, 0, 0)) Hour)
[ "二月十五号早上"
, "二月十五号早晨"
, "2月15号早上"
, "2月15号早晨"
, "二月十五號早上"
, "二月十五號早晨"
, "2月15號早上"
, "2月15號早晨"
]
, examples (datetime (2013, 2, 19, 0, 0, 0) Day)
[ "下周二"
, "下週二"
, "下星期二"
, "下禮拜二"
, "下礼拜二"
]
, examples (datetime (2013, 2, 13, 0, 0, 0) Day)
[ "这周三"
, "这礼拜三"
, "這週三"
, "這禮拜三"
, "今個星期三"
, "今個礼拜三"
, "今個禮拜三"
]
, examples (datetime (2013, 2, 13, 0, 0, 0) Day)
[ "下周三"
, "下礼拜三"
, "下週三"
, "下禮拜三"
, "下星期三"
]
, examples (datetime (2013, 2, 18, 0, 0, 0) Day)
[ "这周一"
, "这礼拜一"
, "這週一"
, "這禮拜一"
, "今個星期一"
, "今個礼拜一"
, "今個禮拜一"
]
, examples (datetime (2013, 2, 12, 0, 0, 0) Day)
[ "这周二"
, "这礼拜二"
, "這週二"
, "這禮拜二"
, "今個星期二"
, "今個礼拜二"
, "今個禮拜二"
, "今星期二"
, "今礼拜二"
, "今禮拜二"
]
, examples (datetime (2013, 2, 11, 0, 0, 0) Week)
[ "这周"
, "这一周"
, "这礼拜"
, "这一礼拜"
, "這週"
, "這一周"
, "這禮拜"
, "這一禮拜"
, "今個星期"
, "今個礼拜"
, "今個禮拜"
]
, examples (datetime (2013, 2, 4, 0, 0, 0) Week)
[ "上周"
, "上週"
, "上個星期"
, "上個礼拜"
, "上個禮拜"
]
, examples (datetime (2013, 2, 18, 0, 0, 0) Week)
[ "下周"
, "下週"
, "下星期"
, "下礼拜"
, "下禮拜"
]
, examples (datetime (2013, 1, 1, 0, 0, 0) Month)
[ "上月"
, "上个月"
, "上個月"
]
, examples (datetime (2013, 3, 1, 0, 0, 0) Month)
[ "下月"
, "下个月"
, "下個月"
, "3月"
, "3月份"
, "三月"
]
, examples (datetime (2013, 2, 20, 0, 0, 0) Day)
[ "今個月二十號"
, "今個月20号"
, "今個月廿號"
]
, examples (datetime (2013, 3, 20, 0, 0, 0) Day)
[ "下個月二十號"
, "下個月20号"
, "下個月廿號"
]
, examples (datetime (2012, 1, 1, 0, 0, 0) Year)
[ "去年"
, "上年"
]
, examples (datetime (2013, 1, 1, 0, 0, 0) Year)
[ "今年"
, "这一年"
, "這一年"
]
, examples (datetime (2014, 1, 1, 0, 0, 0) Year)
[ "明年"
, "下年"
]
, examples (datetime (2014, 9, 1, 0, 0, 0) Month)
[ "下年9月"
, "明年九月"
]
, examples (datetimeInterval ((2013, 2, 12, 4, 29, 58), (2013, 2, 12, 4, 30, 0)) Second)
[ "上两秒"
, "上二秒"
, "前两秒"
, "前二秒"
, "上兩秒"
, "前兩秒"
, "兩秒前"
, "兩秒之前"
]
, examples (datetimeInterval ((2013, 2, 12, 4, 30, 1), (2013, 2, 12, 4, 30, 4)) Second)
[ "下三秒"
, "后三秒"
, "後三秒"
, "三秒後"
, "三秒之後"
]
, examples (datetimeInterval ((2013, 2, 12, 4, 28, 0), (2013, 2, 12, 4, 30, 0)) Minute)
[ "上两分钟"
, "上二分钟"
, "前两分钟"
, "前二分钟"
, "上兩分鐘"
, "上二分鐘"
, "前兩分鐘"
, "前二分鐘"
, "兩分鐘前"
, "兩分鐘之前"
]
, examples (datetimeInterval ((2013, 2, 12, 4, 31, 0), (2013, 2, 12, 4, 34, 0)) Minute)
[ "下三分钟"
, "后三分钟"
, "下三分鐘"
, "後三分鐘"
, "三分鐘後"
, "三分鐘之後"
]
, examples (datetimeInterval ((2013, 2, 12, 2, 0, 0), (2013, 2, 12, 4, 0, 0)) Hour)
[ "上两小时"
, "上二小时"
, "前两小时"
, "前二小时"
, "上兩小時"
, "上二小時"
, "前兩小時"
, "前二小時"
, "兩小時之前"
, "兩個鐘之前"
, "兩小時前"
, "兩個鐘前"
]
, examples (datetimeInterval ((2013, 2, 12, 5, 0, 0), (2013, 2, 12, 8, 0, 0)) Hour)
[ "下三小时"
, "后三小时"
, "下三小時"
, "後三小時"
, "三小時之後"
, "三個鐘之後"
, "三小時後"
, "三個鐘後"
]
, examples (datetimeInterval ((2013, 2, 10, 0, 0, 0), (2013, 2, 12, 0, 0, 0)) Day)
[ "上两天"
, "前两天"
, "上兩天"
, "前兩天"
, "兩天前"
, "兩天之前"
, "兩日前"
, "兩日之前"
]
, examples (datetimeInterval ((2013, 2, 13, 0, 0, 0), (2013, 2, 16, 0, 0, 0)) Day)
[ "下三天"
, "后三天"
, "後三天"
, "三天後"
, "三天之後"
, "三日後"
, "三日之後"
]
, examples (datetimeInterval ((2013, 1, 28, 0, 0, 0), (2013, 2, 11, 0, 0, 0)) Week)
[ "上两周"
, "上二周"
, "上兩週"
, "上二週"
, "兩星期前"
, "兩星期之前"
, "兩個禮拜前"
, "兩個禮拜之前"
]
, examples (datetimeInterval ((2013, 2, 18, 0, 0, 0), (2013, 3, 11, 0, 0, 0)) Week)
[ "下三周"
, "下三个周"
, "下三週"
, "下三個週"
, "三星期後"
, "三星期之後"
, "三個禮拜後"
, "三個禮拜之後"
]
, examples (datetimeInterval ((2012, 12, 0, 0, 0, 0), (2013, 2, 0, 0, 0, 0)) Month)
[ "上两个月"
, "上二个月"
, "前两个月"
, "前二个月"
, "前两月"
, "上兩個月"
, "上二個月"
, "前兩個月"
, "前二個月"
, "前兩月"
, "兩個月前"
, "兩個月之前"
]
, examples (datetimeInterval ((2013, 3, 0, 0, 0, 0), (2013, 6, 0, 0, 0, 0)) Month)
[ "下三个月"
, "后三个月"
, "後三個月"
, "三個月後"
, "三個月之後"
]
, examples (datetimeInterval ((2011, 0, 0, 0, 0, 0), (2013, 0, 0, 0, 0, 0)) Year)
[ "前两年"
, "前兩年"
, "兩年前"
, "兩年之前"
]
, examples (datetimeInterval ((2014, 0, 0, 0, 0, 0), (2017, 0, 0, 0, 0, 0)) Year)
[ "下三年"
, "三年後"
, "三年之後"
]
, examples (datetime (2013, 2, 12, 15, 0, 0) Hour)
[ "三点"
, "三點"
, "3pm"
, "下午三點"
, "晏晝三點"
, "下午三時"
]
, examples (datetime (2013, 2, 12, 15, 15, 0) Minute)
[ "下午三点十五"
, "下午3:15"
, "15:15"
, "3:15pm"
, "3:15PM"
, "3:15p"
, "下午三點十五"
, "晏晝三點十五"
, "下午三点十五分"
, "下午三點十五分"
, "晏晝三點十五分"
, "晏晝三點三"
, "晏晝三點踏三"
, "晏晝三點搭三"
, "晏晝三點三個字"
]
, examples (datetime (2013, 2, 12, 15, 05, 0) Minute)
[ "下午三点零五"
, "下午3:05"
, "15:05"
, "3:05pm"
, "3:05PM"
, "3:05p"
, "下午三點零五"
, "晏晝三點零五"
, "下午三点零五分"
, "下午三點零五分"
, "晏晝三點零五分"
, "晏晝三點一"
, "晏晝三點踏一"
, "晏晝三點搭一"
, "晏晝三點一個字"
]
, examples (datetime (2013, 2, 12, 15, 30, 0) Minute)
[ "下午三点半"
, "下午3:30"
, "15:30"
, "3:30pm"
, "3:30PM"
, "3:30p"
, "下午三點半"
, "晏晝三點半"
, "下午三点三十分"
, "下午三點三十分"
, "晏晝三點三十分"
, "晏晝三點踏半"
, "晏晝三點搭半"
]
, examples (datetime (2013, 2, 12, 13, 0, 0) Minute)
[ "4pm CET"
]
, examples (datetime (2015, 4, 14, 0, 0, 0) Day)
[ "2015年4月14号"
, "2015年4月14號"
]
, examples (datetime (2013, 2, 12, 20, 0, 0) Hour)
[ "今晚8点"
, "今晚八点"
, "今晚8點"
, "今晚八點"
]
, examples (datetimeHoliday (2014, 1, 1, 0, 0, 0) Day "元旦")
[ "元旦"
, "元旦节"
, "元旦節"
, "阳历新年"
]
, examples (datetimeHoliday (2013, 3, 8, 0, 0, 0) Day "妇女节")
[ "妇女节"
, "婦女節"
]
, examples (datetimeHoliday (2013, 5, 1, 0, 0, 0) Day "劳动节")
[ "劳动节"
, "勞動節"
, "五一国际劳动节"
]
, examples (datetimeHoliday (2013, 6, 1, 0, 0, 0) Day "儿童节")
[ "儿童节"
, "兒童節"
, "国际儿童节"
]
, examples (datetimeHoliday (2013, 8, 1, 0, 0, 0) Day "建军节")
[ "建军节"
, "八一建軍節"
, "建軍節"
]
, examples (datetimeHoliday (2013, 12, 25, 0, 0, 0) Day "圣诞节")
[ "圣诞"
, "聖誕"
, "圣诞节"
, "聖誕節"
]
, examples (datetimeHoliday (2013, 4, 1, 0, 0, 0) Day "愚人节")
[ "愚人节"
, "愚人節"
]
, examples (datetimeHoliday (2013, 10, 31, 0, 0, 0) Day "万圣节")
[ "万圣节"
, "萬聖節"
]
, examples (datetimeHoliday (2013, 12, 20, 0, 0, 0) Day "澳门回归纪念日")
[ "澳门回归纪念日"
, "澳門回歸紀念日"
]
, examples (datetimeHoliday (2013, 2, 14, 0, 0, 0) Day "情人节")
[ "情人节"
, "情人節"
, "圣瓦伦丁节"
]
, examples (datetimeHoliday (2013, 3, 15, 0, 0, 0) Day "国际消费者权益日")
[ "国际消费者权益日"
, "国际消費者權益日"
, "三一五"
]
, examples (datetimeHoliday (2013, 6, 1, 15, 15, 0) Minute "儿童节")
[ "儿童节下午三点十五"
, "兒童節下午三點十五"
]
, examples (datetimeIntervalHoliday ((2013, 2, 14, 18, 0, 0), (2013, 2, 15, 0, 0, 0)) Hour "情人节")
[ "情人节晚上"
, "情人節晚上"
]
, examples (datetimeHoliday (2013, 9, 13, 0, 0, 0) Day "赎罪日")
[ "赎罪日"
, "贖罪日"
]
, examples (datetimeHoliday (2013, 9, 13, 0, 0, 0) Day "赎罪日")
[ "赎罪日"
, "贖罪日"
]
, examples (datetimeHoliday (2013, 2, 13, 0, 0, 0) Day "大斋首日")
[ "大斋首日"
, "聖灰星期三"
, "灰日"
, "圣灰礼仪日"
, "圣灰日"
]
, examples (datetimeHoliday (2013, 11, 13, 0, 0, 0) Day "阿舒拉节")
[ "阿舒拉節"
]
-- wiki says 11/8
, examples (datetimeHoliday (2013, 11, 9, 0, 0, 0) Day "克哈特普迦节")
[ "克哈特普迦节"
]
, examples (datetimeHoliday (2014, 1, 31, 0, 0, 0) Day "春节")
[ "春节"
, "农历新年"
, "新春"
, "正月正时"
, "正月朔日"
, "正月正時"
]
, examples (datetimeHoliday (2013, 5, 30, 0, 0, 0) Day "基督圣体节")
[ "基督聖體节"
, "基督聖體聖血瞻礼"
, "基督聖體聖血節"
]
, examples (datetimeHoliday (2013, 11, 3, 0, 0, 0) Day "排灯节")
[ "万灯节"
, "印度燈節"
, "排灯节"
]
, examples (datetimeHoliday (2013, 4, 1, 0, 0, 0) Day "复活节星期一")
[ "复活节星期一"
, "復活節星期一"
]
, examples (datetimeHoliday (2013, 3, 31, 0, 0, 0) Day "复活节")
[ "复活节"
, "復活節"
, "主復活日"
]
, examples (datetimeHoliday (2013, 10, 15, 0, 0, 0) Day "古尔邦节")
[ "古尔邦节"
, "古爾邦節"
, "宰牲节"
]
, examples (datetimeHoliday (2013, 8, 8, 0, 0, 0) Day "开斋节")
[ "开斋节"
, "開齋節"
, "肉孜节"
, "尔代节"
, "爾代節"
]
, examples (datetimeHoliday (2013, 3, 29, 0, 0, 0) Day "耶稣受难日")
[ "主受难日"
, "主受难节"
, "沈默周五"
, "聖週五"
, "耶穌受難日"
]
, examples (datetimeHoliday (2013, 3, 26, 0, 0, 0) Day "侯丽节")
[ "侯丽节"
, "荷麗节"
, "洒红节"
, "灑紅节"
, "欢悦节"
, "五彩節"
, "胡里节"
, "好利节"
, "霍利節"
]
, examples (datetimeHoliday (2013, 3, 30, 0, 0, 0) Day "圣周六")
[ "神圣周六"
, "聖週六"
, "耶稣受难日翌日"
, "主受難節翌日"
, "復活節前夜"
, "黑色星期六"
]
, examples (datetimeHoliday (2013, 11, 4, 0, 0, 0) Day "伊斯兰新年")
[ "伊斯兰新年"
, "伊斯兰教新年"
, "伊斯兰历新年"
]
, examples (datetimeHoliday (2013, 6, 6, 0, 0, 0) Day "登霄节")
[ "登霄节"
, "夜行登霄節"
]
, examples (datetimeHoliday (2014, 1, 16, 0, 0, 0) Day "印度丰收节第四天")
[ "印度丰收节第四天"
, "龐格爾節第四天"
, "庞格尔节第四天"
]
, examples (datetimeHoliday (2013, 4, 27, 0, 0, 0) Day "篝火节")
[ "篝火节"
, "犹太教篝火节"
, "猶太教篝火節"
]
, examples (datetimeHoliday (2013, 8, 4, 0, 0, 0) Day "法令之夜")
[ "法令之夜"
, "权力之夜"
]
, examples (datetimeHoliday (2013, 4, 27, 0, 0, 0) Day "拉撒路圣周六")
[ "拉撒路聖週六"
, "拉匝路周六"
]
, examples (datetimeHoliday (2014, 1, 15, 0, 0, 0) Day "印度丰收节第三天")
[ "印度丰收节第三天"
, "龐格爾節第三天"
, "庞格尔节第三天"
]
, examples (datetimeHoliday (2013, 3, 28, 0, 0, 0) Day "神圣星期四")
[ "濯足節"
, "神聖星期四"
, "圣周星期四"
, "圣周四"
, "設立聖餐日"
]
, examples (datetimeHoliday (2014, 1, 13, 0, 0, 0) Day "圣纪节")
[ "圣纪节"
, "聖紀節"
]
, examples (datetimeHoliday (2013, 5, 6, 0, 0, 0) Day "东正教复活节星期一")
[ "东正教复活节星期一"
, "東正教復活節星期一"
]
, examples (datetimeHoliday (2013, 5, 4, 0, 0, 0) Day "东正教圣周六")
[ "東正教神聖週六"
, "東正教聖週六"
, "東正教耶稣受难日翌日"
, "東正教主受難節翌日"
, "東正教复活节前夜"
]
, examples (datetimeHoliday (2013, 5, 3, 0, 0, 0) Day "东正教耶稣受难日")
[ "東正教耶穌受难日"
, "东正教主受难节"
, "东正教圣周五"
, "東正教聖週五"
, "東正教沈默週五"
]
, examples (datetimeHoliday (2013, 4, 28, 0, 0, 0) Day "东正教棕枝主日")
[ "东正教棕枝主日"
, "东正教圣枝主日"
, "东正教聖樹主日"
, "東正教基督苦難主日"
]
, examples (datetimeHoliday (2013, 3, 24, 0, 0, 0) Day "棕枝主日")
[ "棕枝主日"
, "圣枝主日"
, "聖樹主日"
, "基督苦難主日"
]
, examples (datetimeHoliday (2013, 5, 19, 0, 0, 0) Day "五旬节")
[ "五旬节"
, "圣灵降临节"
, "聖靈降臨日"
]
, examples (datetimeHoliday (2013, 8, 20, 0, 0, 0) Day "印度兄妹节")
[ "印度兄妹节"
, "拉克沙班丹節"
]
, examples (datetimeHoliday (2013, 9, 25, 0, 0, 0) Day "圣会节")
[ "圣会节"
, "聖会節"
]
, examples (datetimeHoliday (2013, 2, 12, 0, 0, 0) Day "忏悔节")
[ "忏悔節"
, "忏悔火曜日"
, "煎餅星期二"
]
, examples (datetimeHoliday (2013, 9, 26, 0, 0, 0) Day "西赫托拉节")
[ "西赫托拉节"
, "西赫妥拉节"
, "诵经节"
, "誦經节"
, "转经节"
, "轉經節"
, "律法節"
, "歡慶聖法節"
]
, examples (datetimeHoliday (2014, 1, 14, 0, 0, 0) Day "印度丰收节")
[ "印度丰收节"
, "淡米爾豐收節"
, "淡米尔丰收节"
]
, examples (datetimeHoliday (2013, 8, 20, 0, 0, 0) Day "欧南节")
[ "欧南节"
, "欧南節"
]
, examples (datetimeHoliday (2013, 7, 15, 0, 0, 0) Day "圣殿被毁日")
[ "圣殿被毁日"
, "禁食日"
, "聖殿被毁日"
]
, examples (datetimeHoliday (2013, 5, 26, 0, 0, 0) Day "圣三一主日")
[ "圣三一主日"
, "天主三一主日"
, "天主聖三一节"
, "聖三主日"
, "圣三节"
]
, examples (datetimeHoliday (2013, 10, 14, 0, 0, 0) Day "十胜节")
[ "十勝節"
, "凯旋节"
, "圣母节"
]
, examples (datetimeHoliday (2014, 1, 15, 0, 0, 0) Day "犹太植树节")
[ "犹太植树节"
, "猶太植樹節"
, "图比舍巴特节"
, "圖比舍巴特節"
, "树木新年"
, "樹木新年"
]
, examples (datetimeHoliday (2013, 5, 24, 0, 0, 0) Day "卫塞节")
[ "卫塞节"
, "衛塞節"
, "威瑟节"
, "比萨宝蕉节"
, "比薩寶蕉節"
]
, examples (datetimeHoliday (2013, 4, 15, 0, 0, 0) Day "以色列独立日")
[ "以色列独立日"
, "以色列獨立日"
, "以色列国庆节"
, "以色列國慶節"
]
, examples (datetimeHoliday (2013, 9, 13, 0, 0, 0) Day "赎罪日")
[ "赎罪日"
, "贖罪日"
]
, examples (datetimeHoliday (2013, 5, 20, 0, 0, 0) Day "圣灵节庆日")
[ "圣灵节庆日"
, "聖靈節慶日"
]
, examples (datetimeHoliday (2013, 10, 16, 0, 0, 0) Day "老板节")
[ "老板节"
, "老闆節"
]
, examples (datetimeIntervalHoliday ((2013, 4, 26, 0, 0, 0), (2013, 4, 29, 0, 0, 0)) Day "全球青年服务日")
[ "全球青年服务日"
, "全球青年服務日"
]
, examples (datetimeIntervalHoliday ((2018, 2, 19, 0, 0, 0), (2018, 3, 31, 0, 0, 0)) Day "四旬节")
[ "2018年四旬节"
, "2018年四旬節"
]
, examples (datetimeIntervalHoliday ((2018, 12, 2, 0, 0, 0), (2018, 12, 10, 0, 0, 0)) Day "光明节")
[ "2018年光明节"
, "2018年修殿节"
, "2018年献殿节"
, "2018年獻殿节"
, "2018年烛光节"
, "2018年哈努卡节"
, "2018年馬加比節"
]
, examples (datetimeIntervalHoliday ((2018, 2, 14, 0, 0, 0), (2018, 4, 1, 0, 0, 0)) Day "大斋期")
[ "2018年大斋期"
, "2018年大齋節"
, "2018年大斋节"
]
, examples (datetimeIntervalHoliday ((2018, 10, 9, 0, 0, 0), (2018, 10, 19, 0, 0, 0)) Day "九夜节")
[ "2018年九夜节"
, "2018年难近母节"
, "2018年難近母節"
]
, examples (datetimeIntervalHoliday ((2018, 3, 30, 0, 0, 0), (2018, 4, 8, 0, 0, 0)) Day "逾越节")
[ "2018年逾越节"
, "2018年逾越節"
]
, examples (datetimeIntervalHoliday ((2034, 11, 12, 0, 0, 0), (2034, 12, 12, 0, 0, 0)) Day "斋月")
[ "2034年斋月"
, "2034年穆斯林斋月"
, "2034年穆斯林齋月"
]
, examples (datetimeIntervalHoliday ((2018, 9, 9, 0, 0, 0), (2018, 9, 12, 0, 0, 0)) Day "犹太新年")
[ "2018年犹太新年"
, "2018年猶太新年"
]
, examples (datetimeIntervalHoliday ((2018, 5, 19, 0, 0, 0), (2018, 5, 22, 0, 0, 0)) Day "七七节")
[ "2018年七七节"
, "2018年沙夫幼特节"
, "2018年週日節"
, "2018年收获节"
, "2018年新果实节"
, "2018年新果實節"
, "2018年收穫節"
]
, examples (datetimeIntervalHoliday ((2018, 9, 23, 0, 0, 0), (2018, 10, 2, 0, 0, 0)) Day "住棚节")
[ "2018年住棚节"
, "2018年住棚節"
]
, examples (datetimeIntervalHoliday ((2016, 3, 19, 20, 30, 0), (2016, 3, 19, 21, 31, 0)) Minute "地球一小时")
[ "2016年地球一小时"
, "2016年地球一小時"
]
] | 24,345 | allExamples = concat
[ examples (datetime (2013, 2, 12, 4, 30, 0) Second)
[ "现在"
, "此时"
, "此刻"
, "当前"
, "現在"
, "此時"
, "當前"
, "宜家"
, "而家"
, "依家"
]
, examples (datetime (2013, 2, 12, 0, 0, 0) Day)
[ "今天"
, "今日"
]
, examples (datetime (2013, 2, 11, 0, 0, 0) Day)
[ "昨天"
, "昨日"
, "尋日"
]
, examples (datetime (2013, 2, 13, 0, 0, 0) Day)
[ "明天"
, "明日"
, "聽日"
]
, examples (datetime (2013, 2, 14, 0, 0, 0) Day)
[ "后天"
, "後天"
, "後日"
]
, examples (datetime (2013, 2, 15, 0, 0, 0) Day)
[ "大後日"
, "大後天"
]
, examples (datetime (2013, 2, 10, 0, 0, 0) Day)
[ "前天"
, "前日"
]
, examples (datetime (2013, 2, 18, 0, 0, 0) Day)
[ "星期一"
, "礼拜一"
, "周一"
, "禮拜一"
, "週一"
]
, examples (datetime (2013, 2, 19, 0, 0, 0) Day)
[ "星期二"
, "礼拜二"
, "周二"
, "禮拜二"
, "週二"
]
, examples (datetime (2013, 2, 13, 0, 0, 0) Day)
[ "星期三"
, "礼拜三"
, "周三"
, "禮拜三"
, "週三"
]
, examples (datetime (2013, 2, 14, 0, 0, 0) Day)
[ "星期四"
, "礼拜四"
, "周四"
, "禮拜四"
, "週四"
]
, examples (datetime (2013, 2, 15, 0, 0, 0) Day)
[ "星期五"
, "礼拜五"
, "周五"
, "禮拜五"
, "週五"
]
, examples (datetime (2013, 2, 16, 0, 0, 0) Day)
[ "星期六"
, "礼拜六"
, "周六"
, "禮拜六"
, "週六"
]
, examples (datetime (2013, 2, 17, 0, 0, 0) Day)
[ "星期日"
, "星期天"
, "礼拜天"
, "周日"
, "禮拜天"
, "週日"
]
, examples (datetimeInterval ((2013, 2, 15, 18, 0, 0), (2013, 2, 18, 0, 0, 0)) Hour)
[ "这周末"
, "這週末"
]
, examples (datetimeInterval ((2013, 2, 18, 4, 0, 0), (2013, 2, 18, 12, 0, 0)) Hour)
[ "周一早上"
, "周一早晨"
, "礼拜一早上"
, "礼拜一早晨"
, "週一早上"
, "週一早晨"
, "禮拜一早上"
, "禮拜一早晨"
]
, examples (datetime (2013, 2, 10, 0, 0, 0) Day)
[ "上周日"
, "上星期天"
, "上礼拜天"
, "上週日"
, "上星期天"
, "上禮拜天"
, "上禮拜日"
]
, examples (datetime (2013, 2, 10, 0, 0, 0) Day)
[ "周日, 二月十号"
, "星期天, 二月十号"
, "礼拜天, 二月十号"
, "週日, 二月十號"
, "星期天, 二月十號"
, "禮拜天, 二月十號"
, "禮拜日, 二月十號"
]
, examples (datetime (2013, 10, 7, 0, 0, 0) Day)
[ "十月第一个星期一"
, "十月的第一个星期一"
, "十月第一個星期一"
, "十月的第一個星期一"
]
, examples (datetime (2013, 2, 5, 0, 0, 0) Day)
[ "上周二"
, "上礼拜二"
, "上週二"
, "上禮拜二"
, "上星期二"
]
, examples (datetime (2013, 3, 1, 0, 0, 0) Day)
[ "三月一号"
, "三月一日"
, "三月一號"
]
, examples (datetime (2015, 3, 3, 0, 0, 0) Day)
[ "2015年3月3号"
, "2015年3月三号"
, "2015年三月3号"
, "2015年三月三号"
, "2015年3月3號"
, "2015年3月三號"
, "2015年三月3號"
, "2015年三月三號"
, "3/3/2015"
, "3/3/15"
, "2015-3-3"
, "2015-03-03"
, "二零一五年三月三號"
]
, examples (datetime (2013, 2, 15, 0, 0, 0) Day)
[ "2013年2月15号"
, "2013年二月十五号"
, "2月15号"
, "二月十五号"
, "2013年2月15號"
, "2013年二月十五號"
, "2月15號"
, "二月十五號"
, "2/15"
, "二零一三年二月十五號"
]
, examples (datetime (1974, 10, 31, 0, 0, 0) Day)
[ "10/31/1974"
, "10/31/74"
]
, examples (datetimeInterval ((2013, 2, 15, 4, 0, 0), (2013, 2, 15, 12, 0, 0)) Hour)
[ "二月十五号早上"
, "二月十五号早晨"
, "2月15号早上"
, "2月15号早晨"
, "二月十五號早上"
, "二月十五號早晨"
, "2月15號早上"
, "2月15號早晨"
]
, examples (datetime (2013, 2, 19, 0, 0, 0) Day)
[ "下周二"
, "下週二"
, "下星期二"
, "下禮拜二"
, "下礼拜二"
]
, examples (datetime (2013, 2, 13, 0, 0, 0) Day)
[ "这周三"
, "这礼拜三"
, "這週三"
, "這禮拜三"
, "今個星期三"
, "今個礼拜三"
, "今個禮拜三"
]
, examples (datetime (2013, 2, 13, 0, 0, 0) Day)
[ "下周三"
, "下礼拜三"
, "下週三"
, "下禮拜三"
, "下星期三"
]
, examples (datetime (2013, 2, 18, 0, 0, 0) Day)
[ "这周一"
, "这礼拜一"
, "這週一"
, "這禮拜一"
, "今個星期一"
, "今個礼拜一"
, "今個禮拜一"
]
, examples (datetime (2013, 2, 12, 0, 0, 0) Day)
[ "这周二"
, "这礼拜二"
, "這週二"
, "這禮拜二"
, "今個星期二"
, "今個礼拜二"
, "今個禮拜二"
, "今星期二"
, "今礼拜二"
, "今禮拜二"
]
, examples (datetime (2013, 2, 11, 0, 0, 0) Week)
[ "这周"
, "这一周"
, "这礼拜"
, "这一礼拜"
, "這週"
, "這一周"
, "這禮拜"
, "這一禮拜"
, "今個星期"
, "今個礼拜"
, "今個禮拜"
]
, examples (datetime (2013, 2, 4, 0, 0, 0) Week)
[ "上周"
, "上週"
, "上個星期"
, "上個礼拜"
, "上個禮拜"
]
, examples (datetime (2013, 2, 18, 0, 0, 0) Week)
[ "下周"
, "下週"
, "下星期"
, "下礼拜"
, "下禮拜"
]
, examples (datetime (2013, 1, 1, 0, 0, 0) Month)
[ "上月"
, "上个月"
, "上個月"
]
, examples (datetime (2013, 3, 1, 0, 0, 0) Month)
[ "下月"
, "下个月"
, "下個月"
, "3月"
, "3月份"
, "三月"
]
, examples (datetime (2013, 2, 20, 0, 0, 0) Day)
[ "今個月二十號"
, "今個月20号"
, "今個月廿號"
]
, examples (datetime (2013, 3, 20, 0, 0, 0) Day)
[ "下個月二十號"
, "下個月20号"
, "下個月廿號"
]
, examples (datetime (2012, 1, 1, 0, 0, 0) Year)
[ "去年"
, "上年"
]
, examples (datetime (2013, 1, 1, 0, 0, 0) Year)
[ "今年"
, "这一年"
, "這一年"
]
, examples (datetime (2014, 1, 1, 0, 0, 0) Year)
[ "明年"
, "下年"
]
, examples (datetime (2014, 9, 1, 0, 0, 0) Month)
[ "下年9月"
, "明年九月"
]
, examples (datetimeInterval ((2013, 2, 12, 4, 29, 58), (2013, 2, 12, 4, 30, 0)) Second)
[ "上两秒"
, "上二秒"
, "前两秒"
, "前二秒"
, "上兩秒"
, "前兩秒"
, "兩秒前"
, "兩秒之前"
]
, examples (datetimeInterval ((2013, 2, 12, 4, 30, 1), (2013, 2, 12, 4, 30, 4)) Second)
[ "下三秒"
, "后三秒"
, "後三秒"
, "三秒後"
, "三秒之後"
]
, examples (datetimeInterval ((2013, 2, 12, 4, 28, 0), (2013, 2, 12, 4, 30, 0)) Minute)
[ "上两分钟"
, "上二分钟"
, "前两分钟"
, "前二分钟"
, "上兩分鐘"
, "上二分鐘"
, "前兩分鐘"
, "前二分鐘"
, "兩分鐘前"
, "兩分鐘之前"
]
, examples (datetimeInterval ((2013, 2, 12, 4, 31, 0), (2013, 2, 12, 4, 34, 0)) Minute)
[ "下三分钟"
, "后三分钟"
, "下三分鐘"
, "後三分鐘"
, "三分鐘後"
, "三分鐘之後"
]
, examples (datetimeInterval ((2013, 2, 12, 2, 0, 0), (2013, 2, 12, 4, 0, 0)) Hour)
[ "上两小时"
, "上二小时"
, "前两小时"
, "前二小时"
, "上兩小時"
, "上二小時"
, "前兩小時"
, "前二小時"
, "兩小時之前"
, "兩個鐘之前"
, "兩小時前"
, "兩個鐘前"
]
, examples (datetimeInterval ((2013, 2, 12, 5, 0, 0), (2013, 2, 12, 8, 0, 0)) Hour)
[ "下三小时"
, "后三小时"
, "下三小時"
, "後三小時"
, "三小時之後"
, "三個鐘之後"
, "三小時後"
, "三個鐘後"
]
, examples (datetimeInterval ((2013, 2, 10, 0, 0, 0), (2013, 2, 12, 0, 0, 0)) Day)
[ "上两天"
, "前两天"
, "上兩天"
, "前兩天"
, "兩天前"
, "兩天之前"
, "兩日前"
, "兩日之前"
]
, examples (datetimeInterval ((2013, 2, 13, 0, 0, 0), (2013, 2, 16, 0, 0, 0)) Day)
[ "下三天"
, "后三天"
, "後三天"
, "三天後"
, "三天之後"
, "三日後"
, "三日之後"
]
, examples (datetimeInterval ((2013, 1, 28, 0, 0, 0), (2013, 2, 11, 0, 0, 0)) Week)
[ "上两周"
, "上二周"
, "上兩週"
, "上二週"
, "兩星期前"
, "兩星期之前"
, "兩個禮拜前"
, "兩個禮拜之前"
]
, examples (datetimeInterval ((2013, 2, 18, 0, 0, 0), (2013, 3, 11, 0, 0, 0)) Week)
[ "下三周"
, "下三个周"
, "下三週"
, "下三個週"
, "三星期後"
, "三星期之後"
, "三個禮拜後"
, "三個禮拜之後"
]
, examples (datetimeInterval ((2012, 12, 0, 0, 0, 0), (2013, 2, 0, 0, 0, 0)) Month)
[ "上两个月"
, "上二个月"
, "前两个月"
, "前二个月"
, "前两月"
, "上兩個月"
, "上二個月"
, "前兩個月"
, "前二個月"
, "前兩月"
, "兩個月前"
, "兩個月之前"
]
, examples (datetimeInterval ((2013, 3, 0, 0, 0, 0), (2013, 6, 0, 0, 0, 0)) Month)
[ "下三个月"
, "后三个月"
, "後三個月"
, "三個月後"
, "三個月之後"
]
, examples (datetimeInterval ((2011, 0, 0, 0, 0, 0), (2013, 0, 0, 0, 0, 0)) Year)
[ "前两年"
, "前兩年"
, "兩年前"
, "兩年之前"
]
, examples (datetimeInterval ((2014, 0, 0, 0, 0, 0), (2017, 0, 0, 0, 0, 0)) Year)
[ "下三年"
, "三年後"
, "三年之後"
]
, examples (datetime (2013, 2, 12, 15, 0, 0) Hour)
[ "三点"
, "三點"
, "3pm"
, "下午三點"
, "晏晝三點"
, "下午三時"
]
, examples (datetime (2013, 2, 12, 15, 15, 0) Minute)
[ "下午三点十五"
, "下午3:15"
, "15:15"
, "3:15pm"
, "3:15PM"
, "3:15p"
, "下午三點十五"
, "晏晝三點十五"
, "下午三点十五分"
, "下午三點十五分"
, "晏晝三點十五分"
, "晏晝三點三"
, "晏晝三點踏三"
, "晏晝三點搭三"
, "晏晝三點三個字"
]
, examples (datetime (2013, 2, 12, 15, 05, 0) Minute)
[ "下午三点零五"
, "下午3:05"
, "15:05"
, "3:05pm"
, "3:05PM"
, "3:05p"
, "下午三點零五"
, "晏晝三點零五"
, "下午三点零五分"
, "下午三點零五分"
, "晏晝三點零五分"
, "晏晝三點一"
, "晏晝三點踏一"
, "晏晝三點搭一"
, "晏晝三點一個字"
]
, examples (datetime (2013, 2, 12, 15, 30, 0) Minute)
[ "下午三点半"
, "下午3:30"
, "15:30"
, "3:30pm"
, "3:30PM"
, "3:30p"
, "下午三點半"
, "晏晝三點半"
, "下午三点三十分"
, "下午三點三十分"
, "晏晝三點三十分"
, "晏晝三點踏半"
, "晏晝三點搭半"
]
, examples (datetime (2013, 2, 12, 13, 0, 0) Minute)
[ "4pm CET"
]
, examples (datetime (2015, 4, 14, 0, 0, 0) Day)
[ "2015年4月14号"
, "2015年4月14號"
]
, examples (datetime (2013, 2, 12, 20, 0, 0) Hour)
[ "今晚8点"
, "今晚八点"
, "今晚8點"
, "今晚八點"
]
, examples (datetimeHoliday (2014, 1, 1, 0, 0, 0) Day "元旦")
[ "元旦"
, "元旦节"
, "元旦節"
, "阳历新年"
]
, examples (datetimeHoliday (2013, 3, 8, 0, 0, 0) Day "妇女节")
[ "妇女节"
, "婦女節"
]
, examples (datetimeHoliday (2013, 5, 1, 0, 0, 0) Day "劳动节")
[ "劳动节"
, "勞動節"
, "五一国际劳动节"
]
, examples (datetimeHoliday (2013, 6, 1, 0, 0, 0) Day "儿童节")
[ "儿童节"
, "兒童節"
, "国际儿童节"
]
, examples (datetimeHoliday (2013, 8, 1, 0, 0, 0) Day "建军节")
[ "建军节"
, "八一建軍節"
, "建軍節"
]
, examples (datetimeHoliday (2013, 12, 25, 0, 0, 0) Day "圣诞节")
[ "圣诞"
, "聖誕"
, "圣诞节"
, "聖誕節"
]
, examples (datetimeHoliday (2013, 4, 1, 0, 0, 0) Day "愚人节")
[ "愚人节"
, "愚人節"
]
, examples (datetimeHoliday (2013, 10, 31, 0, 0, 0) Day "万圣节")
[ "万圣节"
, "萬聖節"
]
, examples (datetimeHoliday (2013, 12, 20, 0, 0, 0) Day "澳门回归纪念日")
[ "澳门回归纪念日"
, "澳門回歸紀念日"
]
, examples (datetimeHoliday (2013, 2, 14, 0, 0, 0) Day "情人节")
[ "情人节"
, "情人節"
, "圣瓦伦丁节"
]
, examples (datetimeHoliday (2013, 3, 15, 0, 0, 0) Day "国际消费者权益日")
[ "国际消费者权益日"
, "国际消費者權益日"
, "三一五"
]
, examples (datetimeHoliday (2013, 6, 1, 15, 15, 0) Minute "儿童节")
[ "儿童节下午三点十五"
, "兒童節下午三點十五"
]
, examples (datetimeIntervalHoliday ((2013, 2, 14, 18, 0, 0), (2013, 2, 15, 0, 0, 0)) Hour "情人节")
[ "情人节晚上"
, "情人節晚上"
]
, examples (datetimeHoliday (2013, 9, 13, 0, 0, 0) Day "赎罪日")
[ "赎罪日"
, "贖罪日"
]
, examples (datetimeHoliday (2013, 9, 13, 0, 0, 0) Day "赎罪日")
[ "赎罪日"
, "贖罪日"
]
, examples (datetimeHoliday (2013, 2, 13, 0, 0, 0) Day "大斋首日")
[ "大斋首日"
, "聖灰星期三"
, "灰日"
, "圣灰礼仪日"
, "圣灰日"
]
, examples (datetimeHoliday (2013, 11, 13, 0, 0, 0) Day "阿舒拉节")
[ "阿舒拉節"
]
-- wiki says 11/8
, examples (datetimeHoliday (2013, 11, 9, 0, 0, 0) Day "克哈特普迦节")
[ "克哈特普迦节"
]
, examples (datetimeHoliday (2014, 1, 31, 0, 0, 0) Day "春节")
[ "春节"
, "农历新年"
, "新春"
, "正月正时"
, "正月朔日"
, "正月正時"
]
, examples (datetimeHoliday (2013, 5, 30, 0, 0, 0) Day "基督圣体节")
[ "基督聖體节"
, "基督聖體聖血瞻礼"
, "基督聖體聖血節"
]
, examples (datetimeHoliday (2013, 11, 3, 0, 0, 0) Day "排灯节")
[ "万灯节"
, "印度燈節"
, "排灯节"
]
, examples (datetimeHoliday (2013, 4, 1, 0, 0, 0) Day "复活节星期一")
[ "复活节星期一"
, "復活節星期一"
]
, examples (datetimeHoliday (2013, 3, 31, 0, 0, 0) Day "复活节")
[ "复活节"
, "復活節"
, "主復活日"
]
, examples (datetimeHoliday (2013, 10, 15, 0, 0, 0) Day "古尔邦节")
[ "古尔邦节"
, "古爾邦節"
, "宰牲节"
]
, examples (datetimeHoliday (2013, 8, 8, 0, 0, 0) Day "开斋节")
[ "开斋节"
, "開齋節"
, "肉孜节"
, "尔代节"
, "爾代節"
]
, examples (datetimeHoliday (2013, 3, 29, 0, 0, 0) Day "耶稣受难日")
[ "主受难日"
, "主受难节"
, "沈默周五"
, "聖週五"
, "耶穌受難日"
]
, examples (datetimeHoliday (2013, 3, 26, 0, 0, 0) Day "侯丽节")
[ "侯丽节"
, "荷麗节"
, "洒红节"
, "灑紅节"
, "欢悦节"
, "五彩節"
, "胡里节"
, "好利节"
, "霍利節"
]
, examples (datetimeHoliday (2013, 3, 30, 0, 0, 0) Day "圣周六")
[ "神圣周六"
, "聖週六"
, "耶稣受难日翌日"
, "主受難節翌日"
, "復活節前夜"
, "黑色星期六"
]
, examples (datetimeHoliday (2013, 11, 4, 0, 0, 0) Day "伊斯兰新年")
[ "伊斯兰新年"
, "伊斯兰教新年"
, "伊斯兰历新年"
]
, examples (datetimeHoliday (2013, 6, 6, 0, 0, 0) Day "登霄节")
[ "登霄节"
, "夜行登霄節"
]
, examples (datetimeHoliday (2014, 1, 16, 0, 0, 0) Day "印度丰收节第四天")
[ "印度丰收节第四天"
, "龐格爾節第四天"
, "庞格尔节第四天"
]
, examples (datetimeHoliday (2013, 4, 27, 0, 0, 0) Day "篝火节")
[ "篝火节"
, "犹太教篝火节"
, "猶太教篝火節"
]
, examples (datetimeHoliday (2013, 8, 4, 0, 0, 0) Day "法令之夜")
[ "法令之夜"
, "权力之夜"
]
, examples (datetimeHoliday (2013, 4, 27, 0, 0, 0) Day "拉撒路圣周六")
[ "拉撒路聖週六"
, "拉匝路周六"
]
, examples (datetimeHoliday (2014, 1, 15, 0, 0, 0) Day "印度丰收节第三天")
[ "印度丰收节第三天"
, "龐格爾節第三天"
, "庞格尔节第三天"
]
, examples (datetimeHoliday (2013, 3, 28, 0, 0, 0) Day "神圣星期四")
[ "濯足節"
, "神聖星期四"
, "圣周星期四"
, "圣周四"
, "設立聖餐日"
]
, examples (datetimeHoliday (2014, 1, 13, 0, 0, 0) Day "圣纪节")
[ "圣纪节"
, "聖紀節"
]
, examples (datetimeHoliday (2013, 5, 6, 0, 0, 0) Day "东正教复活节星期一")
[ "东正教复活节星期一"
, "東正教復活節星期一"
]
, examples (datetimeHoliday (2013, 5, 4, 0, 0, 0) Day "东正教圣周六")
[ "東正教神聖週六"
, "東正教聖週六"
, "東正教耶稣受难日翌日"
, "東正教主受難節翌日"
, "東正教复活节前夜"
]
, examples (datetimeHoliday (2013, 5, 3, 0, 0, 0) Day "东正教耶稣受难日")
[ "東正教耶穌受难日"
, "东正教主受难节"
, "东正教圣周五"
, "東正教聖週五"
, "東正教沈默週五"
]
, examples (datetimeHoliday (2013, 4, 28, 0, 0, 0) Day "东正教棕枝主日")
[ "东正教棕枝主日"
, "东正教圣枝主日"
, "东正教聖樹主日"
, "東正教基督苦難主日"
]
, examples (datetimeHoliday (2013, 3, 24, 0, 0, 0) Day "棕枝主日")
[ "棕枝主日"
, "圣枝主日"
, "聖樹主日"
, "基督苦難主日"
]
, examples (datetimeHoliday (2013, 5, 19, 0, 0, 0) Day "五旬节")
[ "五旬节"
, "圣灵降临节"
, "聖靈降臨日"
]
, examples (datetimeHoliday (2013, 8, 20, 0, 0, 0) Day "印度兄妹节")
[ "印度兄妹节"
, "拉克沙班丹節"
]
, examples (datetimeHoliday (2013, 9, 25, 0, 0, 0) Day "圣会节")
[ "圣会节"
, "聖会節"
]
, examples (datetimeHoliday (2013, 2, 12, 0, 0, 0) Day "忏悔节")
[ "忏悔節"
, "忏悔火曜日"
, "煎餅星期二"
]
, examples (datetimeHoliday (2013, 9, 26, 0, 0, 0) Day "西赫托拉节")
[ "西赫托拉节"
, "西赫妥拉节"
, "诵经节"
, "誦經节"
, "转经节"
, "轉經節"
, "律法節"
, "歡慶聖法節"
]
, examples (datetimeHoliday (2014, 1, 14, 0, 0, 0) Day "印度丰收节")
[ "印度丰收节"
, "淡米爾豐收節"
, "淡米尔丰收节"
]
, examples (datetimeHoliday (2013, 8, 20, 0, 0, 0) Day "欧南节")
[ "欧南节"
, "欧南節"
]
, examples (datetimeHoliday (2013, 7, 15, 0, 0, 0) Day "圣殿被毁日")
[ "圣殿被毁日"
, "禁食日"
, "聖殿被毁日"
]
, examples (datetimeHoliday (2013, 5, 26, 0, 0, 0) Day "圣三一主日")
[ "圣三一主日"
, "天主三一主日"
, "天主聖三一节"
, "聖三主日"
, "圣三节"
]
, examples (datetimeHoliday (2013, 10, 14, 0, 0, 0) Day "十胜节")
[ "十勝節"
, "凯旋节"
, "圣母节"
]
, examples (datetimeHoliday (2014, 1, 15, 0, 0, 0) Day "犹太植树节")
[ "犹太植树节"
, "猶太植樹節"
, "图比舍巴特节"
, "圖比舍巴特節"
, "树木新年"
, "樹木新年"
]
, examples (datetimeHoliday (2013, 5, 24, 0, 0, 0) Day "卫塞节")
[ "卫塞节"
, "衛塞節"
, "威瑟节"
, "比萨宝蕉节"
, "比薩寶蕉節"
]
, examples (datetimeHoliday (2013, 4, 15, 0, 0, 0) Day "以色列独立日")
[ "以色列独立日"
, "以色列獨立日"
, "以色列国庆节"
, "以色列國慶節"
]
, examples (datetimeHoliday (2013, 9, 13, 0, 0, 0) Day "赎罪日")
[ "赎罪日"
, "贖罪日"
]
, examples (datetimeHoliday (2013, 5, 20, 0, 0, 0) Day "圣灵节庆日")
[ "圣灵节庆日"
, "聖靈節慶日"
]
, examples (datetimeHoliday (2013, 10, 16, 0, 0, 0) Day "老板节")
[ "老板节"
, "老闆節"
]
, examples (datetimeIntervalHoliday ((2013, 4, 26, 0, 0, 0), (2013, 4, 29, 0, 0, 0)) Day "全球青年服务日")
[ "全球青年服务日"
, "全球青年服務日"
]
, examples (datetimeIntervalHoliday ((2018, 2, 19, 0, 0, 0), (2018, 3, 31, 0, 0, 0)) Day "四旬节")
[ "2018年四旬节"
, "2018年四旬節"
]
, examples (datetimeIntervalHoliday ((2018, 12, 2, 0, 0, 0), (2018, 12, 10, 0, 0, 0)) Day "光明节")
[ "2018年光明节"
, "2018年修殿节"
, "2018年献殿节"
, "2018年獻殿节"
, "2018年烛光节"
, "2018年哈努卡节"
, "2018年馬加比節"
]
, examples (datetimeIntervalHoliday ((2018, 2, 14, 0, 0, 0), (2018, 4, 1, 0, 0, 0)) Day "大斋期")
[ "2018年大斋期"
, "2018年大齋節"
, "2018年大斋节"
]
, examples (datetimeIntervalHoliday ((2018, 10, 9, 0, 0, 0), (2018, 10, 19, 0, 0, 0)) Day "九夜节")
[ "2018年九夜节"
, "2018年难近母节"
, "2018年難近母節"
]
, examples (datetimeIntervalHoliday ((2018, 3, 30, 0, 0, 0), (2018, 4, 8, 0, 0, 0)) Day "逾越节")
[ "2018年逾越节"
, "2018年逾越節"
]
, examples (datetimeIntervalHoliday ((2034, 11, 12, 0, 0, 0), (2034, 12, 12, 0, 0, 0)) Day "斋月")
[ "2034年斋月"
, "2034年穆斯林斋月"
, "2034年穆斯林齋月"
]
, examples (datetimeIntervalHoliday ((2018, 9, 9, 0, 0, 0), (2018, 9, 12, 0, 0, 0)) Day "犹太新年")
[ "2018年犹太新年"
, "2018年猶太新年"
]
, examples (datetimeIntervalHoliday ((2018, 5, 19, 0, 0, 0), (2018, 5, 22, 0, 0, 0)) Day "七七节")
[ "2018年七七节"
, "2018年沙夫幼特节"
, "2018年週日節"
, "2018年收获节"
, "2018年新果实节"
, "2018年新果實節"
, "2018年收穫節"
]
, examples (datetimeIntervalHoliday ((2018, 9, 23, 0, 0, 0), (2018, 10, 2, 0, 0, 0)) Day "住棚节")
[ "2018年住棚节"
, "2018年住棚節"
]
, examples (datetimeIntervalHoliday ((2016, 3, 19, 20, 30, 0), (2016, 3, 19, 21, 31, 0)) Minute "地球一小时")
[ "2016年地球一小时"
, "2016年地球一小時"
]
] | 24,320 | false | true | 0 | 10 | 12,722 | 7,091 | 4,353 | 2,738 | null | null |
shinjiro-itagaki/shinjirecs | shinjirecs-api/src/Config/Class.hs | gpl-3.0 | importOtherConfig allconfigs imported selfname (Just confobj) dflt =
if elem selfname imported
then dflt
else onlySelfOrWithInc' $ readInclude confobj
where
imported' = imported ++ [selfname]
onlySelfOrWithInc' Nothing = objectToConfig confobj dflt
onlySelfOrWithInc' (Just incText') = objectToConfig confobj $ importOtherConfig allconfigs imported' incText' (getObject incText' allconfigs) dflt
{-
importOtherConfig :: ConfigClass a => Y.Value -> [String] -> Y.Value -> a -> a
importOtherConfig allconfigs imported config dflt =
(include config
>>= (\str -> bool (Just str) Nothing (L.elem str imported))
>>= (\str ->
getObject (Data.Text.pack str) allconfigs
>>= return . (config <<<) . importOtherConfig allconfigs (imported ++ [str]) . objectToPreDBConfig)) ||| config
-} | 838 | importOtherConfig allconfigs imported selfname (Just confobj) dflt =
if elem selfname imported
then dflt
else onlySelfOrWithInc' $ readInclude confobj
where
imported' = imported ++ [selfname]
onlySelfOrWithInc' Nothing = objectToConfig confobj dflt
onlySelfOrWithInc' (Just incText') = objectToConfig confobj $ importOtherConfig allconfigs imported' incText' (getObject incText' allconfigs) dflt
{-
importOtherConfig :: ConfigClass a => Y.Value -> [String] -> Y.Value -> a -> a
importOtherConfig allconfigs imported config dflt =
(include config
>>= (\str -> bool (Just str) Nothing (L.elem str imported))
>>= (\str ->
getObject (Data.Text.pack str) allconfigs
>>= return . (config <<<) . importOtherConfig allconfigs (imported ++ [str]) . objectToPreDBConfig)) ||| config
-} | 838 | importOtherConfig allconfigs imported selfname (Just confobj) dflt =
if elem selfname imported
then dflt
else onlySelfOrWithInc' $ readInclude confobj
where
imported' = imported ++ [selfname]
onlySelfOrWithInc' Nothing = objectToConfig confobj dflt
onlySelfOrWithInc' (Just incText') = objectToConfig confobj $ importOtherConfig allconfigs imported' incText' (getObject incText' allconfigs) dflt
{-
importOtherConfig :: ConfigClass a => Y.Value -> [String] -> Y.Value -> a -> a
importOtherConfig allconfigs imported config dflt =
(include config
>>= (\str -> bool (Just str) Nothing (L.elem str imported))
>>= (\str ->
getObject (Data.Text.pack str) allconfigs
>>= return . (config <<<) . importOtherConfig allconfigs (imported ++ [str]) . objectToPreDBConfig)) ||| config
-} | 838 | false | false | 2 | 9 | 164 | 111 | 55 | 56 | null | null |
brendanhay/gogol | gogol-dfareporting/gen/Network/Google/DFAReporting/Types/Product.hs | mpl-2.0 | -- | Name of this subaccount. This is a required field. Must be less than 128
-- characters long and be unique among subaccounts of the same account.
saName :: Lens' SubAccount (Maybe Text)
saName = lens _saName (\ s a -> s{_saName = a}) | 237 | saName :: Lens' SubAccount (Maybe Text)
saName = lens _saName (\ s a -> s{_saName = a}) | 87 | saName = lens _saName (\ s a -> s{_saName = a}) | 47 | true | true | 1 | 9 | 44 | 53 | 26 | 27 | null | null |
athanclark/rose-trees | bench/Bench.hs | bsd-3-clause | main = defaultMain
[ bgroup "Trees"
[ data_tree_bench
, data_settree_bench
, data_knuthtree_bench
, data_hashtree_bench
]
] | 147 | main = defaultMain
[ bgroup "Trees"
[ data_tree_bench
, data_settree_bench
, data_knuthtree_bench
, data_hashtree_bench
]
] | 147 | main = defaultMain
[ bgroup "Trees"
[ data_tree_bench
, data_settree_bench
, data_knuthtree_bench
, data_hashtree_bench
]
] | 147 | false | false | 1 | 8 | 39 | 33 | 16 | 17 | null | null |
olsner/ghc | compiler/stgSyn/StgSyn.hs | bsd-3-clause | pprStgExpr (StgLetNoEscape bind expr)
= sep [hang (text "let-no-escape {")
2 (pprGenStgBinding bind),
hang (text "} in ")
2 (ppr expr)] | 180 | pprStgExpr (StgLetNoEscape bind expr)
= sep [hang (text "let-no-escape {")
2 (pprGenStgBinding bind),
hang (text "} in ")
2 (ppr expr)] | 180 | pprStgExpr (StgLetNoEscape bind expr)
= sep [hang (text "let-no-escape {")
2 (pprGenStgBinding bind),
hang (text "} in ")
2 (ppr expr)] | 180 | false | false | 0 | 9 | 65 | 64 | 31 | 33 | null | null |
ku-fpg/talks | hermit/Utils.hs | bsd-2-clause | q :: ProseStyle a => a -> a
q = font "monospace" . b | 52 | q :: ProseStyle a => a -> a
q = font "monospace" . b | 52 | q = font "monospace" . b | 24 | false | true | 0 | 8 | 13 | 36 | 15 | 21 | null | null |
semaj/hademlia | test/RoutingDataSpec.hs | bsd-3-clause | nodeB = "B" | 11 | nodeB = "B" | 11 | nodeB = "B" | 11 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
ksaveljev/hake-2 | src/Render/Fast/Warp.hs | bsd-3-clause | stToVec :: V.Vector (V3 Int)
stToVec = V.fromList [ V3 3 (-1) 2
, V3 (-3) 1 2
, V3 1 3 2
, V3 (-1) (-3) 2
, V3 (-2) (-1) 3
, V3 2 (-1) (-3)
] | 292 | stToVec :: V.Vector (V3 Int)
stToVec = V.fromList [ V3 3 (-1) 2
, V3 (-3) 1 2
, V3 1 3 2
, V3 (-1) (-3) 2
, V3 (-2) (-1) 3
, V3 2 (-1) (-3)
] | 292 | stToVec = V.fromList [ V3 3 (-1) 2
, V3 (-3) 1 2
, V3 1 3 2
, V3 (-1) (-3) 2
, V3 (-2) (-1) 3
, V3 2 (-1) (-3)
] | 263 | false | true | 0 | 9 | 189 | 127 | 67 | 60 | null | null |
amccausl/Swish | Swish/HaskellRDF/N3FormatterTest.hs | lgpl-2.1 | trivialTest05 = formatTest "trivialTest05" g1l1 simpleN3Graph_g1_05 | 67 | trivialTest05 = formatTest "trivialTest05" g1l1 simpleN3Graph_g1_05 | 67 | trivialTest05 = formatTest "trivialTest05" g1l1 simpleN3Graph_g1_05 | 67 | false | false | 0 | 5 | 5 | 13 | 6 | 7 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.