#7402: Warn about possible missing -XScopedTypeVariables on errors.
Reporter:  Aninhumer         |          Owner:                  
    Type:  feature request   |         Status:  new             
Priority:  normal            |      Component:  Compiler        
 Version:  7.6.1             |       Keywords:                  
      Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
 Failure:  None/Unknown      |      Blockedby:                  
Blocking:                    |        Related:                  
 Suggest that the user they may wish to add -XScopedTypeVariables, if an
 error results from a free type variable which would be bound in its scope
 with the flag enabled. (i.e. if its name exists as a variable in the type

 I ran into this problem on code similar to this:
 instance (Sized a n, Nat n) => Rep a where
     emptyRep = replicate (toInt (undefined :: n)) 0
 and it took me some time to solve, and only by having vague knowledge that
 such a flag existed.

Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7402>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

Glasgow-haskell-bugs mailing list

Reply via email to