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
Unify Nat
and Natural
#364
Conversation
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.
I think the cut of this proposal's jib. I've left two minor suggestions inline.
proposals/0000-unify-natural.rst
Outdated
is implied by ``FlexibleInstances``. Or, they could be written to use ``Natural`` | ||
instead of ``Nat``. | ||
|
||
Otherwise, this change should be backward compatible. |
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.
That's not the full story, the following code will also break:
class C a
instance C Nat
instance C Natural
Now these instances conflict with one another.
Any more commentary before submitting this to committee? Seems pretty straightforward. |
None from me or @Haskell-mouse. Looks good, thank you! |
Let's submit then, @nomeata . |
/remind @serras to ensure progress in two weeks |
@nomeata set a reminder for Oct 9th 2020 |
The cost of this proposal is mightily low (there is a small, already ready MR, which has essentially 0 net lines of code). So I'd see the bar to pass to be just as low. However, I think that the motivation would be quite a bit more readable, and will stand the test of time better, with a tiny bit of code illustrating the difficulty. |
Are there any plans concerning Symbol/String (or maybe Text)? They have basically the same issue. Or would we want to wait for something that allows overloading type level strings? I remember that there was a proposal for this, but no idea what the status is |
There's ongoing work to make the promotion of However, |
@int-index You and colleagues (I don't have their GitHub usernames) are the instigators here. Would you care to write a better motivation section? Feel free just to push to my branch -- it seems you already have access. |
My recommendation is to accept this proposal. Apart from the small comment by @goldfirere, I think it would be nice for the proposal to point our that neither |
@aspiwack I've added an example to the Motivation section. How is it looking now? |
Yeah to me the "right" way to do this is dramatically more work than this proposal and should be discussed separately. (I would want promoted |
It's the sort of things I had in mind. Thanks. |
👋 @serras, ensure progress |
There seems to be pretty clear consensus on the commitee, I’ll mark this as accepted. |
The proposal has been accepted; the following discussion is mostly of historic interest.
This proposal is an attempt to unblock https://gitlab.haskell.org/ghc/ghc/-/merge_requests/3583, which is user-facing and requires some broader consultation.
Rendered