#2523: Improve warnings for use of "forall" without -XExistentialQuantification
------------------------+---------------------------------------------------
    Reporter:  dmhouse  |       Owner:          
        Type:  bug      |      Status:  new     
    Priority:  normal   |   Component:  Compiler
     Version:  6.8.3    |    Severity:  minor   
    Keywords:           |    Testcase:          
Architecture:  Unknown  |          Os:  Unknown 
------------------------+---------------------------------------------------
 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.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2523>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to