Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Transform between Haskell values and the Value
type. The instance you
write for ToAsn
and FromAsn
assume a schema. I (Eric) think this is
reasonable because I expect each schema to be one-to-one with data types.
Synopsis
- data Parser a
- run :: Parser a -> Either Path a
- data MemberParser a
- fail :: Parser a
- integer :: Value -> Parser Int64
- octetString :: Value -> Parser Bytes
- null :: Value -> Parser ()
- oid :: Value -> Parser Oid
- utf8String :: Value -> Parser ShortText
- printableString :: Value -> Parser ShortText
- sequence :: MemberParser a -> Value -> Parser a
- index :: Int -> (Value -> Parser a) -> MemberParser a
- sequenceOf :: forall a. (Value -> Parser a) -> Value -> Parser (SmallArray a)
- withTag :: Class -> Word32 -> (Value -> Parser a) -> Value -> Parser a
- chooseTag :: [(Class, Word32, Value -> Parser a)] -> Value -> Parser a
- data Path
- data Value
- data Contents
- data Class
Documentation
data MemberParser a Source #
Instances
Applicative MemberParser Source # | |
Defined in Asn.Resolve 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 # | |
Functor MemberParser Source # | |
Defined in Asn.Resolve fmap :: (a -> b) -> MemberParser a -> MemberParser b # (<$) :: a -> MemberParser b -> MemberParser a # |
Combinators
sequenceOf :: forall a. (Value -> Parser a) -> Value -> Parser (SmallArray a) Source #