Improve warnings for use of "forall" without -XExistentialQuantification
Here's a GHCi session:
Prelude> let foo :: forall a. a; foo = undefined
<interactive>:1:19:
Illegal operator `.' in type `forall a . a'
(Use -XTypeOperators to allow operators in types)
Prelude> let foo :: forall a. Show a => a; foo = undefined
<interactive>:1:28: parse error on input `=>'
Both of these errors could be improved, I think, by detecting the use of 'forall' as a type variable name, and suggesting -XExistentialQuantification if it's being used.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 6.8.3 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | Unknown |
| Architecture | Unknown |