Safe Haskell | None |
---|---|
Language | Haskell2010 |
Various type-level combinators to ease generic derivation of Describe
Synopsis
- isolate :: Int -> Descriptor s a -> Descriptor s a
- newtype Remaining = Remaining {}
- newtype Optional p t = Optional {
- unwrapOptional :: Maybe t
- class Predicate t a where
- data Equals (n :: Nat)
Documentation
isolate :: Int -> Descriptor s a -> Descriptor s a Source #
A Remaining
represents the rest of the buffer. Upon serialization, the entire wrapped ByteString will be written.
An Optional
represents a field which is optionally-serializable. The field will be parsed via a lookAhead and, if the value matches the Predicate
p, then the field exists. If not, it is assumed as though the field was never serialized in the first place and the value will be set to Nothing
; parsing will then continue on as usual.
Optional | |
|