WP instances for ParseIt.Parser
Progress.refl is the stay constructor.
Parser ε ι τ is a lawful monad.
pushResult on a successful result applies the success postcondition.
pushResult on an error applies the error postcondition.
Weakest-precondition interpretation of a function producing a ParseIt.Result from an iterator
and a progress proof.
Extend the state it by further progress from it.rest to rest, keeping the start iterator.
Instances For
The state at it where no input has been consumed yet.
Instances For
Weakest-precondition interpretation of Parser: run the parser from the current iterator
it.rest and check the postcondition on the extended IterWithProgress state, or the error
postcondition on failure.
Extract the concrete behaviour of x it from a Hoare triple whose precondition holds at the
initial state IterWithProgress.refl it.
Parser is a WPMonad: its weakest-precondition interpretation respects pure and bind.