asn1-codec-0.1.0: Encode and decode ASN.1

Language.Asn.Encoding

Synopsis

# Build Encoding

## Fields

required :: FieldName -> (a -> b) -> AsnEncoding b -> Field a Source #

optional :: FieldName -> (a -> Maybe b) -> AsnEncoding b -> Field a Source #

defaulted :: (Eq b, Show b) => FieldName -> (a -> b) -> AsnEncoding b -> b -> Field a Source #

## Primitive

Anything can be encoded as NULL by simply discarding it. Typically, encoding a type with more than one inhabitant as NULL is a mistake, so the more restrictive null is to be preferred.