Repository navigation
Add Text.Megaparsec.Error.errorBundlePrettyForGhcPreProcessors - #573
Merged
Merged
Conversation
sol
force-pushed
the
pre-processors
branch
2 times, most recently
from
November 13, 2024 02:18
4f492a1 to
097660f
Compare
mrkkrp
force-pushed
the
pre-processors
branch
2 times, most recently
from
November 19, 2024 15:18
c0b7856 to
64870cf
Compare
mrkkrp
force-pushed
the
pre-processors
branch
from
November 19, 2024 15:33
64870cf to
2df00b5
Compare
mrkkrp
approved these changes
Nov 19, 2024
Owner
|
Thanks! |
netbsd-srcmastr
pushed a commit
to NetBSD/pkgsrc
that referenced
this pull request
Jan 31, 2025
## Megaparsec 9.7.0 * Implemented correct handling of wide Unicode characters in error messages. To that end, a new module `Text.Megaparsec.Unicode` was introduced. [Issue 370](mrkkrp/megaparsec#370). * Inlined `Applicative` operators `(<*)` and `(*>)`. [PR 566](mrkkrp/megaparsec#566). * `many` and `some` of the `Alternative` instance of `ParsecT` are now more efficient, since they use the monadic implementations under the hood. [Issue 567](mrkkrp/megaparsec#567). * Added `Text.Megaparsec.Error.errorBundlePrettyForGhcPreProcessors`. [PR 573](mrkkrp/megaparsec#573).
msk
pushed a commit
to msk/pkgsrc
that referenced
this pull request
May 11, 2026
## Megaparsec 9.7.0 * Implemented correct handling of wide Unicode characters in error messages. To that end, a new module `Text.Megaparsec.Unicode` was introduced. [Issue 370](mrkkrp/megaparsec#370). * Inlined `Applicative` operators `(<*)` and `(*>)`. [PR 566](mrkkrp/megaparsec#566). * `many` and `some` of the `Alternative` instance of `ParsecT` are now more efficient, since they use the monadic implementations under the hood. [Issue 567](mrkkrp/megaparsec#567). * Added `Text.Megaparsec.Error.errorBundlePrettyForGhcPreProcessors`. [PR 573](mrkkrp/megaparsec#573).
jperkin
pushed a commit
to TritonDataCenter/pkgsrc
that referenced
this pull request
May 14, 2026
## Megaparsec 9.7.0 * Implemented correct handling of wide Unicode characters in error messages. To that end, a new module `Text.Megaparsec.Unicode` was introduced. [Issue 370](mrkkrp/megaparsec#370). * Inlined `Applicative` operators `(<*)` and `(*>)`. [PR 566](mrkkrp/megaparsec#566). * `many` and `some` of the `Alternative` instance of `ParsecT` are now more efficient, since they use the monadic implementations under the hood. [Issue 567](mrkkrp/megaparsec#567). * Added `Text.Megaparsec.Error.errorBundlePrettyForGhcPreProcessors`. [PR 573](mrkkrp/megaparsec#573).
tsutsui
pushed a commit
to tsutsui/pkgsrc
that referenced
this pull request
Oct 17, 2026
## Megaparsec 9.7.0 * Implemented correct handling of wide Unicode characters in error messages. To that end, a new module `Text.Megaparsec.Unicode` was introduced. [Issue 370](mrkkrp/megaparsec#370). * Inlined `Applicative` operators `(<*)` and `(*>)`. [PR 566](mrkkrp/megaparsec#566). * `many` and `some` of the `Alternative` instance of `ParsecT` are now more efficient, since they use the monadic implementations under the hood. [Issue 567](mrkkrp/megaparsec#567). * Added `Text.Megaparsec.Error.errorBundlePrettyForGhcPreProcessors`. [PR 573](mrkkrp/megaparsec#573).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If you use

errorBundlePrettywhen writing a GHC pre-processor then error output does not look pretty:To address this, this PR adds

errorBundlePrettyForGhcPreProcessors, which results in:Details:
As a consequence, the best you can achieve for a pre-processor is to have multi-line error messages indented by five spaces. To achieve this you have to produce error messages of the form:
That is:
Note that single-line error message should be of the form:
(no space between the last
:and the error message, otherwise you will end up with two spaces in the pretty-printed output)