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

GHC cvs-ghc at haskell.org
Mon Apr 22 07:25:22 CEST 2013


#7854: Constrained method type accepted in Haskell 98 mode
-----------------------------+----------------------------------------------
Reporter:  refold            |          Owner:                  
    Type:  bug               |         Status:  new             
Priority:  normal            |      Component:  Compiler        
 Version:  7.6.3             |       Keywords:                  
      Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
 Failure:  None/Unknown      |      Blockedby:                  
Blocking:                    |        Related:                  
-----------------------------+----------------------------------------------
 If I understand [http://www.haskell.org/ghc/docs/7.6.2/html/users_guide
 /type-class-extensions.html#class-method-types this paragraph] of the GHC
 manual correctly, the following code should be rejected in Haskell 98
 mode:

 {{{
 {-# LANGUAGE Haskell98 #-}

 module Main where

 class Compare a where
   comp :: Eq a => a -> a -> Bool
 }}}

 However, it compiles fine for me both with 7.4.2 and 7.6.1.

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



More information about the ghc-tickets mailing list