-
Notifications
You must be signed in to change notification settings - Fork 171
Alternative approach to Annotator
#4733
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Annotator
2684b58 to
dcec2dc
Compare
dcec2dc to
c82b437
Compare
Lucsanszky
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just a partial review, as I plan to take a better look.
Lucsanszky
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had a better look, LGTM! 👍
One question: you mention that the problem with Annotator is the fact that it's an Applicative and thus we can't look into the item that's being decoded. Making Annotator monadic might solve this problem but that brings us to the already existing performance issue, which could potentially get worse with a monadic formulation for Annotator but who knows, it might save us from constructing that big closure as well. I don't know, I haven't tried implementing it, so I'm just bouncing ideas around. I wouldn't be surprised if you have already tried and ruled this approach out.
That would not help. It would have to be a monad transformer with |
|
In any case. Everyone hates |
Alternative Annotator approach works
Co-authored-by: Lucsanszky <[email protected]>
8de82f5 to
99683b3
Compare
Description
Add
Maybe ByteStringto versionedDecoder. This approach allows us to get access to the original bytes inside of any decoder.Fixes #4009
Checklist
CHANGELOG.mdfor the affected packages.New section is never added with the code changes. (See RELEASING.md)
.cabalandCHANGELOG.mdfiles according to theversioning process.
.cabalfiles for all affected packages are updated.If you change the bounds in a cabal file, that package itself must have a version increase. (See RELEASING.md)
fourmolu(usescripts/fourmolize.sh)scripts/cabal-format.sh)hie.yamlhas been updated (usescripts/gen-hie.sh)