[ghc-steering-committee] #371: Stop treating ~ magically. Rec: weak accept

Vladislav Zavialov (int-index) vlad.z.4096 at gmail.com
Fri Apr 23 18:54:10 UTC 2021


While the use of (~) itself no longer requires -XGADTs, the usual desugaring of GADTs still does. So this will require the extension:

data G a where
  MkG :: G Int

even though this will not:

data T a where
  MkT :: (a~Int) => T a

Perhaps that is what you meant by ‘vacuous’, but I wouldn’t go as far as to say that -XGADTs becomes implied by -XGADTSyntax and -XExistentialTypes.

- Vlad

> On 22 Apr 2021, at 12:25, Spiwack, Arnaud <arnaud.spiwack at tweag.io> wrote:
> 
> I'm still not sure what problem this proposal solves. The proposal alludes to some code simplification but doesn't give me a good idea of how much simpler this would make the code.
> 
> Also note that -XGADT becomes mostly vacuous with this proposal: -XGADTSyntax + -XExistentialTypes imply GADTs (both are in -XGHC2021). Not that I mind, really, I actually probably prefer it this way. But it's worthy of notice.
> 
> _______________________________________________
> ghc-steering-committee mailing list
> ghc-steering-committee at haskell.org
> https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee



More information about the ghc-steering-committee mailing list