A program to parse a message into the needed types.
Apply a partial function of this parser, returning the error if the function isn't defined.
Apply a partial function of this parser, returning the error if the function isn't defined.
The new parser type.
The error to return if the partial function isn't defined.
The partial function to apply.
Create a new parser by filtering the values created by this parser.
Create a new parser by filtering the values created by this parser.
The predicate.
The error message if the value does not match the predicate.
MessageParser is a typeclass to simplify parsing messages. It can derive instances for any ADT, and makes it much easier to work with messages.
The type to parse.