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

Eric Seidel eric at seidel.io
Wed Feb 6 00:50:56 UTC 2019


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.



More information about the ghc-steering-committee mailing list