asn1-ber-syntax-0.2.0.0: ASN.1 BER Encode and Decode
Safe HaskellSafe-Inferred
LanguageHaskell2010

Asn.Resolve.Category

Description

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

Documentation

data Parser a b Source #

Instances

Instances details
Alternative (Parser a) Source # 
Instance details

Defined in Asn.Resolve.Category

Methods

empty :: Parser a a0 #

(<|>) :: Parser a a0 -> Parser a a0 -> Parser a a0 #

some :: Parser a a0 -> Parser a [a0] #

many :: Parser a a0 -> Parser a [a0] #

Applicative (Parser a) Source # 
Instance details

Defined in Asn.Resolve.Category

Methods

pure :: a0 -> Parser a a0 #

(<*>) :: Parser a (a0 -> b) -> Parser a a0 -> Parser a b #

liftA2 :: (a0 -> b -> c) -> Parser a a0 -> Parser a b -> Parser a c #

(*>) :: Parser a a0 -> Parser a b -> Parser a b #

(<*) :: Parser a a0 -> Parser a b -> Parser a a0 #

Functor (Parser a) Source # 
Instance details

Defined in Asn.Resolve.Category

Methods

fmap :: (a0 -> b) -> Parser a a0 -> Parser a b #

(<$) :: a0 -> Parser a b -> Parser a a0 #

run :: Parser a b -> a -> Either Path b Source #

Combinators

arr :: (a -> Maybe b) -> Parser a b Source #

(>->) :: Parser a b -> Parser b c -> Parser a c Source #

octetStringSingleton :: Parser Value Word8 Source #

Variant of octetString that expects the OctetString to have exactly one byte. Returns the value of the byte.

Error Breadcrumbs

data Path Source #

Constructors

Nil 
Index !Int !Path

into the nth field of a constructed type

Tag !Class !Word32 !Path

into a specific tag

Instances

Instances details
Show Path Source # 
Instance details

Defined in Asn.Resolve.Category

Methods

showsPrec :: Int -> Path -> ShowS #

show :: Path -> String #

showList :: [Path] -> ShowS #

Eq Path Source # 
Instance details

Defined in Asn.Resolve.Category

Methods

(==) :: Path -> Path -> Bool #

(/=) :: Path -> Path -> Bool #

Re-Exports

data Value Source #

Instances

Instances details
Show Value Source # 
Instance details

Defined in Asn.Ber

Methods

showsPrec :: Int -> Value -> ShowS #

show :: Value -> String #

showList :: [Value] -> ShowS #

Eq Value Source # 
Instance details

Defined in Asn.Ber

Methods

(==) :: Value -> Value -> Bool #

(/=) :: Value -> Value -> Bool #

data Contents Source #

Instances

Instances details
Show Contents Source # 
Instance details

Defined in Asn.Ber

Eq Contents Source # 
Instance details

Defined in Asn.Ber

data Class Source #

Instances

Instances details
Show Class Source # 
Instance details

Defined in Asn.Ber

Methods

showsPrec :: Int -> Class -> ShowS #

show :: Class -> String #

showList :: [Class] -> ShowS #

Eq Class Source # 
Instance details

Defined in Asn.Ber

Methods

(==) :: Class -> Class -> Bool #

(/=) :: Class -> Class -> Bool #