[ghc-steering-committee] [Proposal] #193: Make `forall` a keyword in type (recommendation: accept)

Simon Peyton Jones simonpj at microsoft.com
Thu Feb 14 17:54:00 UTC 2019


Shall we conclude on this?  Vlad has implemented it:
https://gitlab.haskell.org/ghc/ghc/merge_requests/363

Simon

From: ghc-steering-committee <ghc-steering-committee-bounces at haskell.org> On Behalf Of Iavor Diatchki
Sent: 06 February 2019 01:04
To: Eric Seidel <eric at seidel.io>
Cc: ghc-steering-committee <ghc-steering-committee at haskell.org>
Subject: Re: [ghc-steering-committee] [Proposal] #193: Make `forall` a keyword in type (recommendation: accept)

Agreed that `forall` should be a keyword in types.   I didn't realize it wasn't already :)

On Tue, Feb 5, 2019 at 4:51 PM Eric Seidel <eric at seidel.io<mailto:eric at seidel.io>> wrote:
This proposal suggests making `forall` a keyword at the type-level. `forall` is currently only a keyword when `-XExplicitForAll` is enabled.

This change would avoid a potentially confusing situation where the meaning of a type can change based on which extensions are enabled. For example,

```
f2 :: forall a -> a -> a
```

with no extensions, the `forall a` would be interpreted as two regular type variables. But if we enable the upcoming "visible dependent quantification" extension (I assume there's an extension involved here somewhere, the proposal doesn't say), the `forall a` would be interpreted as a *single* dependently quantified type variable `a`.

The only concerns are that this change could break existing programs, and that it moves us further away from the standard. I'd be very suspicious of any programs that used `forall` as a type variable, as that's just ripe for confusion. And it's a very small step away from the standard, so I don't think that should stand in the proposal's way either.

I recommend we accept the proposal.

_______________________________________________
ghc-steering-committee mailing list
ghc-steering-committee at haskell.org<mailto:ghc-steering-committee at haskell.org>
https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmail.haskell.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fghc-steering-committee&data=02%7C01%7Csimonpj%40microsoft.com%7C9aefdb4d678c46bb0db708d68bcef985%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636850118400053688&sdata=S6qUAxN4tiAgsoxEumuwAmBcdqIubPRDQW77ClWYcU8%3D&reserved=0>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-steering-committee/attachments/20190214/48267903/attachment.html>


More information about the ghc-steering-committee mailing list