Skip to content

Constrained method type accepted in Haskell 98 mode

If I understand 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.

Trac metadata
Trac field Value
Version 7.6.3
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information