Skip to content
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

Make postprocessing configurable #80

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from
Draft

Make postprocessing configurable #80

wants to merge 8 commits into from

Conversation

georgefst
Copy link
Collaborator

Ended up writing a fix for #39, to help with a script I was writing this afternoon.

Not quite sure about the details of the API yet.

Tests expected to fail right now, though fixes should be trivial. And new tests will be added anyway.

Copy/paste error from 'defaultPostProcess'.
@@ -43,5 +45,6 @@ data Expr
-- only thing we will be doing with it is turning it /back/ into a string
-- at some stage, so we might as well cut out the middle man and store it
-- directly like this.
| CustomExpr Style !String
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This opens up a lot of flexibility. But it feels slightly ugly, since we will never actually parse a CustomExpr. We could formalise that fact with GADTs and DataKinds, but it's possibly unwarranted complexity.

Copy link
Owner

@cdepillabout cdepillabout left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks pretty good to me!

src/Text/Pretty/Simple/Internal/Expr.hs Show resolved Hide resolved
src/Text/Pretty/Simple/Internal/Printer.hs Outdated Show resolved Hide resolved
src/Text/Pretty/Simple/Internal/Printer.hs Outdated Show resolved Hide resolved
src/Text/Pretty/Simple/Internal/Printer.hs Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants