[ghc-steering-committee] #371: Stop treating ~ magically. Rec: weak accept
Alejandro Serrano Mena
trupill at gmail.com
Thu Apr 1 13:59:47 UTC 2021
On 1 Apr 2021 at 09:59:18, Vladislav Zavialov (int-index) <
vlad.z.4096 at gmail.com> wrote:
> It’s clear that (~) is a special name anyway, because it does not respect
> the enforced convention on type constructors
>
>
> To me, it is not clear at all. What convention do you have in mind? (~) is
> not that different from, say, (+), which is a valid type operator:
>
> class a + b -- accepted
>
I meant the usual convention that type constructors must start with a
capital letter or the : symbol. But in this case I had forgotten that with
TypeOperators on, those conventions behave differently for types than for
terms.
> If we agreed that TypeOperators is almost always on (because of GHC2021),
> why not simply export this from the Prelude?
>
>
> Exporting from Prelude is not a panacea: without a compatibility fallback,
> users of custom preludes will be affected. The proposed migration story
> means that for 8 releases, no existing code will break at all.
>
But those custom preludes would have to be updated anyway, right?
> Also, (~) is a special, magical constraint, like Coercible and Typeable.
> Since the proposal drops the requirement of GADTs and TypeFamilies to use
> it, the idea is to (eventually) require an explicit import of
> Data.Type.Equality to indicate the use of (~) in the code, for the same
> reason that we ask the users to import Data.Coerce and
> Data.Typeable/Type.Reflection
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-steering-committee/attachments/20210401/2254d102/attachment.html>
More information about the ghc-steering-committee
mailing list