Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- newtype Parser a = Parser {}
- newtype MemberParser a = MemberParser {
- runMemberParser :: Path -> SmallArray Member -> Either Path a
- run :: Parser a -> Either Path a
- key :: ShortText -> (Value -> Parser a) -> MemberParser a
- members :: MemberParser a -> SmallArray Member -> Parser a
- smallArray :: (Value -> Parser a) -> SmallArray Value -> Parser (SmallArray a)
- object :: Value -> Parser (SmallArray Member)
- array :: Value -> Parser (SmallArray Value)
- number :: Value -> Parser Scientific
- boolean :: Value -> Parser Bool
- string :: Value -> Parser ShortText
- int :: Scientific -> Parser Int
- word16 :: Scientific -> Parser Word16
- word64 :: Scientific -> Parser Word64
- fail :: Parser a
- contextually :: (Path -> Path) -> Parser a -> Parser a
Documentation
newtype MemberParser a Source #
MemberParser | |
|
Instances
Functor MemberParser Source # | |
Defined in Json.Parser fmap :: (a -> b) -> MemberParser a -> MemberParser b # (<$) :: a -> MemberParser b -> MemberParser a # | |
Applicative MemberParser Source # | |
Defined in Json.Parser pure :: a -> MemberParser a # (<*>) :: MemberParser (a -> b) -> MemberParser a -> MemberParser b # liftA2 :: (a -> b -> c) -> MemberParser a -> MemberParser b -> MemberParser c # (*>) :: MemberParser a -> MemberParser b -> MemberParser b # (<*) :: MemberParser a -> MemberParser b -> MemberParser a # |
Run
Object Parsing
members :: MemberParser a -> SmallArray Member -> Parser a Source #
Arrays
smallArray :: (Value -> Parser a) -> SmallArray Value -> Parser (SmallArray a) Source #
Run the same parser against every element in a SmallArray
. This adjusts
the context at each element.