Hoogle Search
Within LTS Haskell 24.20 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
(
.= ) :: IsEquation a => a -> a -> Equationfuncmp FMP.Types No documentation available.
(
.== ) :: IsBoolean a => a -> a -> Booleanfuncmp FMP.Types No documentation available.
(
.! ) :: Int -> Parser a -> Parser ajson-stream Data.JsonStream.Parser Synonym for arrayWithIndexOf. Matches n-th item in array.
>>> parseByteString (arrayOf (1 .! bool)) "[ [1,true,null], [2,false], [3]]" :: [Bool] [True,False]
(
.: ) :: OnObject o a => Text -> Parser a -> o ajson-stream Data.JsonStream.Parser Synonym for objectWithKey. The .: operators can be chained.
>>> let json = "{\"key1\": {\"nested-key\": 3}}" >>> parseByteString ("key1" .: "nested-key" .: integer) json :: [Int] > [3]It works both as a standalone parser and as a part of objectOf parser>>> let test = "[{\"name\": \"test1\", \"value\": 1}, {\"name\": \"test2\", \"value\": null}, {\"name\": \"test3\"}]" >>> let person = objectOf $ (,) <$> "name" .: string <*> "value" .: integer .| (-1) >>> let people = arrayOf person >>> parseByteString people test :: [(T.Text, Int)] [("test1",1),("test2",-1),("test3",-1)](
.:? ) :: OnObject o a => Text -> Parser a -> o (Maybe a)json-stream Data.JsonStream.Parser Returns Nothing if value is null or does not exist or match. Otherwise returns Just value.
key .:? val = optional (key .: val)
It could be similarly used in the objectOf parser(
.| ) :: OnObject o a => o a -> a -> o ajson-stream Data.JsonStream.Parser Return default value if the parsers on the left hand didn't produce a result.
p .| defval = p <|> pure defval
The operator works on complete left side, the following statements are equal:Record <$> "key1" .: "nested-key" .: value .| defaultValue Record <$> (("key1" .: "nested-key" .: value) .| defaultValue)-
language-c99-simple Language.C99.Simple.Expr No documentation available.
-
language-c99-simple Language.C99.Simple.Expr No documentation available.
-
language-c99-simple Language.C99.Simple.Expr No documentation available.
-
language-c99-simple Language.C99.Simple.Expr No documentation available.