diff options
Diffstat (limited to 'testsuite/tests/ghci/prog008')
-rw-r--r-- | testsuite/tests/ghci/prog008/A.hs | 14 | ||||
-rw-r--r-- | testsuite/tests/ghci/prog008/ghci.prog008.script | 4 | ||||
-rw-r--r-- | testsuite/tests/ghci/prog008/ghci.prog008.stdout | 8 | ||||
-rw-r--r-- | testsuite/tests/ghci/prog008/prog008.T | 2 |
4 files changed, 28 insertions, 0 deletions
diff --git a/testsuite/tests/ghci/prog008/A.hs b/testsuite/tests/ghci/prog008/A.hs new file mode 100644 index 0000000000..0be5e1270d --- /dev/null +++ b/testsuite/tests/ghci/prog008/A.hs @@ -0,0 +1,14 @@ +{-# LANGUAGE Rank2Types, MultiParamTypeClasses #-} + +-- Tests a bug spotted by Claus in which the type +-- of c3 was wrongly displayed in GHCi as +-- c3 :: C a b => a -> b +-- Should be +-- c3 :: C a b => a1 -> b + +module A where + +class C a b where + c1 :: Num b => a -> b + c2 :: (Num b,Show b) => a -> b + c3 :: forall a. a -> b diff --git a/testsuite/tests/ghci/prog008/ghci.prog008.script b/testsuite/tests/ghci/prog008/ghci.prog008.script new file mode 100644 index 0000000000..48954d2488 --- /dev/null +++ b/testsuite/tests/ghci/prog008/ghci.prog008.script @@ -0,0 +1,4 @@ +:l A +:browse A +:set -fprint-explicit-foralls +:browse A diff --git a/testsuite/tests/ghci/prog008/ghci.prog008.stdout b/testsuite/tests/ghci/prog008/ghci.prog008.stdout new file mode 100644 index 0000000000..99e63a1b14 --- /dev/null +++ b/testsuite/tests/ghci/prog008/ghci.prog008.stdout @@ -0,0 +1,8 @@ +class C a b where
+ c1 :: Num b => a -> b
+ c2 :: (Num b, Show b) => a -> b
+ c3 :: a1 -> b
+class C a b where
+ c1 :: Num b => a -> b
+ c2 :: (Num b, Show b) => a -> b
+ c3 :: forall a1. a1 -> b
diff --git a/testsuite/tests/ghci/prog008/prog008.T b/testsuite/tests/ghci/prog008/prog008.T new file mode 100644 index 0000000000..96ebbfb168 --- /dev/null +++ b/testsuite/tests/ghci/prog008/prog008.T @@ -0,0 +1,2 @@ +# testcase for bug #936 +test('ghci.prog008', normal, ghci_script, ['ghci.prog008.script']) |