Pretty-print our custom parse errors. It is necessary to use this
instead of
errorBundlePretty when custom parse errors are
thrown.
This function intercepts our custom parse errors and applies final
adjustments (
finalizeCustomError) before passing them to
errorBundlePretty. These adjustments are part of the
implementation of the behaviour of our custom parse errors.
Note: We must ensure that the offset of the
PosState of the
provided
ParseErrorBundle is no larger than the offset
specified by a
ErrorFailAt constructor. This is guaranteed if
this offset is set to 0 (that is, the beginning of the source file),
which is the case for
ParseErrorBundles returned from
runParserT.