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

Add `Text/show` built-in #365

Merged
merged 4 commits into from Feb 13, 2019

Conversation

Projects
None yet
2 participants
@Gabriel439
Copy link
Contributor

Gabriel439 commented Feb 6, 2019

There are two motivations for adding this built-in:

  • For consistency with Natural/show, Integer/show, etc.

  • To enable the implementation of a Dhall-to-JSON conversion in pure Dhall

    ... as described in:

    #336 (comment)

Carefully note that dollar signs are escaped as \u0024 because that is the
only representation that is both JSON-compatible (since JSON does not
support the \$ escape sequence) and Dhall-compatible (since failure to
escape $ may accidentally generate an unintended string interpolation).

Add `Text/show` built-n
There are two motivations for adding this built-in:

* For consistency with `Natural/show`, `Integer/show`, etc.

* To enable the implementation of a Dhall-to-JSON conversion in pure Dhall

  ... as described in:

  #336 (comment)

Carefully note that dollar signs are escaped as `\u0024` because that is the
only representation that is both JSON-compatible (since JSON does not
support the `\$` escape sequence) and Dhall-compatible (since failure to
escape `$` may accidentally generate an unintended string interpolation).

Gabriel439 added a commit to dhall-lang/dhall-haskell that referenced this pull request Feb 6, 2019

@Gabriel439 Gabriel439 referenced this pull request Feb 6, 2019

Merged

Implement `Text/show` #811

@Gabriel439 Gabriel439 changed the title Add `Text/show` built-n Add `Text/show` built-in Feb 6, 2019

@Gabriel439

This comment has been minimized.

Copy link
Contributor Author

Gabriel439 commented Feb 12, 2019

@f-f: Have you had a chance to look at this?

@f-f

f-f approved these changes Feb 12, 2019

Copy link
Member

f-f left a comment

Yes! Thanks for the ping, it was good when I first read through this, but re-reading it now I noticed we might benefit from some more context on this :)

(in general if I don't chime in then things are good by me, but I'll start approving more explicitly if that's better 😊)

Show resolved Hide resolved standard/semantics.md

@Gabriel439 Gabriel439 merged commit 4085530 into master Feb 13, 2019

1 check passed

hydra Hydra build #7605 of dhall-lang:365:dhall-lang
Details

@Gabriel439 Gabriel439 deleted the gabriel/TextShow branch Feb 13, 2019

Gabriel439 added a commit to dhall-lang/dhall-haskell that referenced this pull request Feb 13, 2019

f-f added a commit to f-f/dhall-clj that referenced this pull request Feb 16, 2019

Update to latest dhall-lang
* Implement Text/show builtin
  dhall-lang/dhall-lang#365
* Don't tag encoded expressions with their version
  dhall-lang/dhall-lang#362
* Rename grammar rule for natural-raw:
  dhall-lang/dhall-lang#368
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.