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

dhall-format now can output multi-line strings #237

Merged
merged 3 commits into from
Jan 29, 2018

Conversation

Gabriella439
Copy link
Collaborator

Fixes #229

This updates dhall-format to use multi-line string literals whenever
pretty-printing a string with at least one newline character.

Fixes #229

This updates `dhall-format` to use multi-line string literals whenever
pretty-printing a string with at least one newline character.
Copy link
Member

@ocharles ocharles left a comment

Choose a reason for hiding this comment

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

You could probably also do this in a single traversal with a clever composition of functors and using laziness, but it's probably not worth it. LGTM.

@@ -609,10 +609,35 @@ prettyNatural = Pretty.pretty
prettyDouble :: Double -> Doc ann
prettyDouble = Pretty.pretty

-- TODO: Correctly escape multi-line literals
Copy link
Member

Choose a reason for hiding this comment

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

What's the todo here about? What case isn't dealt with?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oh, whoops! The TODO is a very real issue I still need to fix

@Gabriella439 Gabriella439 merged commit 8d16e6b into master Jan 29, 2018
@Gabriella439 Gabriella439 deleted the gabriel/format_multiline branch January 29, 2018 02:55
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