[GHC] #3691: Error message doesn't mention necessary extension in warning

GHC trac at galois.com
Fri Nov 27 14:10:21 EST 2009


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

 Hmm, I think my reasoning is that we *should* discourage people from doing
 the thing that (Simon's) proposed warning is about.  Because it has the
 potential to be confusing to people.

 (In two circumstances.

 "2" is: confusing to people who read the code, who know about
 !ScopedTypeVariables (and may or may not understand the Haskell98
 behavior!), and, being human, they don't remember to check the LANGUAGE
 pragma/.cabal/makefile to discover correctly whether the extension is in
 effect.

 "1" is: confusing for people who copy/paste code or who turn on
 !ScopedTypeVariables for some other reason, and then have to understand a
 type error and fix it then by alpha-renaming.  I think it would make more
 sense to warn earlier and make the code get "fixed" while it's being
 written.  Also because, I think it's likely that an average/newish Haskell
 programmer writing such code was trying to get scoped tyvar behavior and
 didn't realize that they needed to turn on a flag.

 )

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3691#comment:8>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the Glasgow-haskell-bugs mailing list