#3691: Error message doesn't mention necessary extension in warning
------------------------------------------------+---------------------------
  Reporter:  arsenm                             |          Owner:               
   
      Type:  bug                                |         Status:  closed       
   
  Priority:  normal                             |      Milestone:               
   
 Component:  Compiler                           |        Version:  6.10.4       
   
Resolution:  invalid                            |       Keywords:               
   
Difficulty:                                     |             Os:  
Unknown/Multiple
  Testcase:                                     |   Architecture:  
Unknown/Multiple
   Failure:  Incorrect warning at compile-time  |  
------------------------------------------------+---------------------------
Comment (by simonpj):

 Maybe I should change the resolution to "wontfix", then, because I have no
 idea how to suggest the correct extension.  I suppose GHC could warn you
 if the behaviour might change if you added `ScopedTypeVariables`, and
 suggest that you either add the flag, or use a different type variable
 name.  But that could result in hard-to-understand warnings about
 perfectly reasonable Haskell 98 programs.

 Example:
 {{{
 class C a where
   op :: a -> a
   op x = ....(foo :: a->a)....
 }}}
 This would provoke the warning, since the type signature for 'foo'
 mentions 'a' which (were you to use `ScopedTypeVariables` would mean the
 `a` in the class header.

 Hmm.  If people thing this is valuable, it would not be hard to implement.
 If so, please re-open this ticket as a feature request.

 Simon

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3691#comment:3>
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