-
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
Implement Natural/subtract #1133
Conversation
The commented-out If you implement something as a curried constant with a type, then you need to |
Oh, it wasn't commented out before but it still fails to terminate with it. Let me push that. |
Ok, pushed that corrected version (but it still gets stuck) |
@ocharles shouldn't |
@f-f yeah that would work. It's also possible to do the curried version (I'm going to paste here that in a minute), but if partial application is not possible in the syntax, there is no reason to define |
I believe it's because partial application should be allowed. All the other terms are infix operators, I believe. |
OK, give me some time plz I'm a bit confused why this loops |
Of course, no rush from my part! |
I guess I'm a bit late to the discussion. But wouldn't a function
You could then use Less-than and equals operations would be very straightforward to implement. (I suspect this was considered before but decided against for some reason?) |
@sjakobi See dhall-lang/dhall-lang#602 (comment) - I believe I'm implementing faithfully to the linked comment. |
@ocharles You forgot to add |
Oh man, that's horrific. I knew it must have been a type class spinning somewhere, thanks for taking the time to dig into that for me! |
Yeah, the pretty-printing infinite loop is a common land-mine that people stumble upon when making contributions (myself included). If anybody knows how to fix it I'll make the change |
One option is to remove the default and handle the 20 other cases explicitly. |
This pull request seems to have the |
Sort of. I was lazy and didn't start from master. I could debase, but I assumed the Lift stuff would go through |
Note that I planned to merge them sequentially, so they will still be split into separate commits |
@ocharles: I still think we should unbundle the |
Yep, will do. I was lazy and just thought that would have been merged by now, but it's turning out more complicated! |
@Gabriel439 good to merge now that the new version is out? |
Just remembered I need to bump the submodule, I'll do that before merging and make sure the tests pass. |
I think if you merge in |
@Gabriel439 Nope. I'm not sure |
@ocharles I think you should checkout dhall-lang/dhall-lang@c7082d9 for I believe |
…at least temporarily so you can see the failing cases more reliably. |
Thanks for the tip @sjakobi! That did indeed reveal a problem. I think we're good to go now. |
... as standardized in dhall-lang/dhall-lang#650