-
Notifications
You must be signed in to change notification settings - Fork 211
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
Switch grammar of Natural
and Integer
#381
Conversation
... as standardized in dhall-lang/dhall-lang#141 Now `Natural`s no longer require a leading `+` and non-negative `Integer`s require a leading `+`
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.
🎉 🎉 🎉
It's pretty impressive how much of this diff is not source code changes.
The changes look good. But I think some things were missed in comments/docs. These are the ones I found:
-
Line 136 in 6beba69
>>> input integer "2" -
Line 238 in 6beba69
> │ 1 : Integer │ ❰1❱ is an expression that has type ❰Integer❱, so the type -
Line 243 in 6beba69
> │ Natural/even +2 : Bool │ ❰Natural/even +2❱ has type ❰Bool❱, so the type -
Line 365 in 6beba69
>>> input natural "+42" -
Lines 378 to 379 in 6beba69
>>> input integer "42" 42 -
Lines 433 to 434 in 6beba69
>>> input (maybe integer) "[1] : Optional Integer" Just 1 -
Lines 446 to 447 in 6beba69
>>> input (sequence integer) "[1, 2, 3]" [1,2,3] -
Lines 459 to 460 in 6beba69
>>> input (list integer) "[1, 2, 3]" [1,2,3] -
Lines 467 to 468 in 6beba69
>>> input (vector integer) "[1, 2, 3]" [1,2,3] -
Line 498 in 6beba69
>>> input (pair natural bool) "{ _1 = +42, _2 = False }" -
Lines 520 to 521 in 6beba69
>>> input auto "[1, 2, 3]" :: IO (Vector Integer) [1,2,3] -
Line 1080 in 6beba69
> +289 -
dhall-haskell/src/Dhall/Core.hs
Line 250 in 6beba69
-- | > NaturalLit n ~ +n -
dhall-haskell/src/Dhall/Core.hs
Line 272 in 6beba69
-- | > IntegerLit n ~ n Unsure if that should change or not
I didn't really look through the tests too deeply. I figure the tests have less documentation and more code that will be executed; they ought to catch mismatches.
Good catch! I will fix those and also see if I can add doctests to check those |
... as caught by @joneshf This also adds a `doctest` test suite to prevent regressions in those examples
... as standardized in dhall-lang/dhall-lang#141
Now
Natural
s no longer require a leading+
and non-negativeInteger
srequire a leading
+