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

371-non-magical-eq: more graceful migration #460

Merged
merged 1 commit into from Dec 27, 2021

Conversation

int-index
Copy link
Contributor

@int-index int-index commented Nov 19, 2021

While implementing this proposal, I noticed that there are quite a few packages (just to name some: primitive, containers, Cabal, haddock, exceptions) that use ~ without enabling TypeOperators.

The proposal already includes a compatibility fallback, but does not cover this particular problem. This amendment extends the proposed compatibility fallback by making the usage of ~ without TypeOperators a warning instead of an error. In due course, the special case will be removed, but maintainers won’t have to modify their code immediately.

@phadej
Copy link
Contributor

phadej commented Nov 19, 2021

See haskell/core-libraries-committee#12 (comment) and following discussion

In fact from our perspective it would be better not to have the warning stage, it's just extra churn. We'll fix it when it breaks.

@int-index
Copy link
Contributor Author

Yes, the discussion seems relevant (but not conclusive). When @simonmar says “We'll fix it when it breaks”, the hidden assumption is that they have complete control over their code and can just fix it. But what about external dependencies?

What if the maintainer takes a while to respond? Should I just postpone the migration to a newer GHC version until the transitive closure of all my dependencies get updated, or should I create dozens of forks to use in the meantime?

The warning allows me to fix my code without waiting for others to fix their code.

@int-index
Copy link
Contributor Author

Another perspective here: https://gitlab.haskell.org/ghc/ghc/-/issues/18862#note_312815

Writing a ~ b does not require enabling -XTypeOperators.
^ this was my only potential gripe. I see no problem with this if we don't have to enable it.

@goldfirere
Copy link
Contributor

I'm in support of this direction. Would you mind naming the warning in the proposal?

@int-index
Copy link
Contributor Author

Would you mind naming the warning in the proposal?

Named them -Wtype-equality-out-of-scope and -Wtype-equality-requires-operators. Better suggestions are welcome. The latter one probably doesn’t need a flag at all, since enabling TypeOperators and disabling the warning is the same amount of effort, but I’m not sure if it’s a good idea to introduce a warning without a flag.

@int-index
Copy link
Contributor Author

Let’s submit, hi @nomeata

@nomeata nomeata added the Pending shepherd recommendation The shepherd needs to evaluate the proposal and make a recommendataion label Dec 15, 2021
@nomeata nomeata changed the title 371-non-magical-eq: more graceful migration 371-non-magical-eq: more graceful migration (under review) Dec 15, 2021
@goldfirere
Copy link
Contributor

I have recommended acceptance.

/remind me in a week to accept if there is no dissent from the committee.

@reminders-prs
Copy link

reminders-prs bot commented Dec 17, 2021

@goldfirere set a reminder for Dec 24th 2021

@reminders-prs reminders-prs bot removed the reminder label Dec 24, 2021
@reminders-prs
Copy link

reminders-prs bot commented Dec 24, 2021

👋 @goldfirere, accept if there is no dissent from the committee.

@goldfirere goldfirere merged commit 2ac7cb4 into ghc-proposals:master Dec 27, 2021
@goldfirere goldfirere added Accepted The committee has decided to accept the proposal and removed Pending shepherd recommendation The shepherd needs to evaluate the proposal and make a recommendataion labels Dec 27, 2021
@int-index int-index deleted the eqtycon-migration branch January 6, 2022 18:27
@int-index int-index changed the title 371-non-magical-eq: more graceful migration (under review) 371-non-magical-eq: more graceful migration Apr 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted The committee has decided to accept the proposal
Development

Successfully merging this pull request may close these issues.

None yet

4 participants