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 new conversion primitives #49

Closed
Gabriel439 opened this Issue May 7, 2017 · 1 comment

Comments

Projects
None yet
1 participant
@Gabriel439
Collaborator

Gabriel439 commented May 7, 2017

As mentioned in #47, we need the following new builtin functions in order to render numeric values:

  • Natural/show : Natural → Text
  • Integer/show : Integer → Text
  • Double/show : Double → Text
  • Natural/toInteger : Natural → Integer

The show functions should render in the exact same format that Dhall parses to source code. The purpose of the Natural/toInteger function is to help render Natural numbers without a leading + by converting them to Integers first

markus1189 added a commit that referenced this issue May 8, 2017

Gabriel439 added a commit that referenced this issue May 8, 2017

Implement Natural/toInteger (#50)
* Move test utils into separate module and use custom assertions

* Implement Natural/toInteger as primitive conversion

Relates to #49

markus1189 added a commit that referenced this issue May 8, 2017

markus1189 added a commit that referenced this issue May 9, 2017

Implement Integer/show
Relates to #49

markus1189 added a commit that referenced this issue May 9, 2017

Implement Double/show
Relates to #49

Gabriel439 added a commit that referenced this issue May 9, 2017

Implement Double/show and Integer/show (#54)
* Implement Integer/show

Relates to #49

* Implement Double/show

Relates to #49
@Gabriel439

This comment has been minimized.

Show comment
Hide comment
@Gabriel439

Gabriel439 May 11, 2017

Collaborator

All four conversion primitives are done now, so I'll mark this resolved

Collaborator

Gabriel439 commented May 11, 2017

All four conversion primitives are done now, so I'll mark this resolved

@Gabriel439 Gabriel439 closed this May 11, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment