Reply
type Reply = [Context, Result]
The type representing a reply from a parser. Each parser returns a value of this type, and parse
does as well.
Reply
objects should be produced by okReply
, failReply
, and fatalReply
rather than being produced by hand. This ensures that the context is copied so that there aren't accidental overwrites of the indexes of older contexts.
A reply contains all of the information necessary to get a result and, if that result is a failure, to know what the failure was and where it happened.