diff options
-rw-r--r-- | testsuite/tests/deriving/should_fail/T8851.hs | 2 | ||||
-rw-r--r-- | testsuite/tests/ghci/prog008/A.hs | 1 | ||||
-rw-r--r-- | testsuite/tests/ghci/scripts/ghci025.hs | 43 |
3 files changed, 24 insertions, 22 deletions
diff --git a/testsuite/tests/deriving/should_fail/T8851.hs b/testsuite/tests/deriving/should_fail/T8851.hs index 84f0ad4ac1..8b5c0e579d 100644 --- a/testsuite/tests/deriving/should_fail/T8851.hs +++ b/testsuite/tests/deriving/should_fail/T8851.hs @@ -1,4 +1,4 @@ -{-# LANGUAGE GeneralizedNewtypeDeriving #-} +{-# LANGUAGE GeneralizedNewtypeDeriving, ConstrainedClassMethods #-} module T8851 where diff --git a/testsuite/tests/ghci/prog008/A.hs b/testsuite/tests/ghci/prog008/A.hs index 6a85ca70ce..d724bd2c9c 100644 --- a/testsuite/tests/ghci/prog008/A.hs +++ b/testsuite/tests/ghci/prog008/A.hs @@ -1,4 +1,5 @@ {-# LANGUAGE RankNTypes, MultiParamTypeClasses #-} +{-# LANGUAGE AllowAmbiguousTypes #-} -- c3 is ambiguous! -- Tests a bug spotted by Claus in which the type -- of c3 was wrongly displayed in GHCi as diff --git a/testsuite/tests/ghci/scripts/ghci025.hs b/testsuite/tests/ghci/scripts/ghci025.hs index d5e2673113..b556509aa6 100644 --- a/testsuite/tests/ghci/scripts/ghci025.hs +++ b/testsuite/tests/ghci/scripts/ghci025.hs @@ -1,22 +1,23 @@ {-# LANGUAGE RankNTypes, MultiParamTypeClasses #-} -
-module T where
-
-import qualified Prelude as T(length,Monad,Integer)
-import qualified Data.ByteString as T(length)
-import Prelude(length,(+),(=<<),Monad(..),Maybe(..),Eq)
-import Data.Maybe
-import Control.Monad(Monad(..),MonadPlus(..))
-
-length :: T.Integer
-length = 0
-
-class N a
-class S a
-
-class C a b where
- c1 :: N b => a -> b
- c2 :: (N b,S b) => a -> b
- c3 :: forall a. a -> b
- c4 :: a1 -> b
-
+{-# LANGUAGE AllowAmbiguousTypes #-} -- c3 is ambiguous! + +module T where + +import qualified Prelude as T(length,Monad,Integer) +import qualified Data.ByteString as T(length) +import Prelude(length,(+),(=<<),Monad(..),Maybe(..),Eq) +import Data.Maybe +import Control.Monad(Monad(..),MonadPlus(..)) + +length :: T.Integer +length = 0 + +class N a +class S a + +class C a b where + c1 :: N b => a -> b + c2 :: (N b,S b) => a -> b + c3 :: forall a. a -> b + c4 :: a1 -> b + |