[GHC] #7854: Constrained method type accepted in Haskell 98 mode

GHC cvs-ghc at haskell.org
Fri May 3 13:21:32 CEST 2013


#7854: Constrained method type accepted in Haskell 98 mode
---------------------------------+------------------------------------------
    Reporter:  refold            |       Owner:                  
        Type:  bug               |      Status:  new             
    Priority:  normal            |   Milestone:                  
   Component:  Compiler          |     Version:  7.6.3           
    Keywords:                    |          Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |     Failure:  None/Unknown    
  Difficulty:  Unknown           |    Testcase:                  
   Blockedby:                    |    Blocking:                  
     Related:                    |  
---------------------------------+------------------------------------------
Changes (by simonpj):

  * difficulty:  => Unknown


Comment:

 You are absolutely right.  See the H98 report
 [http://www.haskell.org/onlinereport/decls.html].  In 4.3.1. it says "the
 cxi may not constrain u", where u is the class variable, and cx is the
 context of a class method signature.

 But (a) it's a bit fiddly to fix, (b) it's not clear what exactly it means
 for multi-parameter type classes, and more seriously it might break some
 existing programs which are inadvertently straying from H98 definition.

 So I'm rather inclined to let sleeping dogs lie.

 Simon

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



More information about the ghc-tickets mailing list