[project @ 1999-11-12 12:51:20 by simonpj]
authorsimonpj <unknown>
Fri, 12 Nov 1999 12:51:20 +0000 (12:51 +0000)
committersimonpj <unknown>
Fri, 12 Nov 1999 12:51:20 +0000 (12:51 +0000)
Add existential-deriving test

ghc/tests/typecheck/should_fail/tcfail086.hs [new file with mode: 0644]
ghc/tests/typecheck/should_fail/tcfail086.stderr [new file with mode: 0644]

diff --git a/ghc/tests/typecheck/should_fail/tcfail086.hs b/ghc/tests/typecheck/should_fail/tcfail086.hs
new file mode 100644 (file)
index 0000000..2457996
--- /dev/null
@@ -0,0 +1,7 @@
+{-# OPTIONS -fglasgow-exts #-}
+
+-- !!! Check that we can't derive instances of existential types
+module ShouldFail where
+
+data Ex = forall a. Ex [a] deriving( Eq )
+
diff --git a/ghc/tests/typecheck/should_fail/tcfail086.stderr b/ghc/tests/typecheck/should_fail/tcfail086.stderr
new file mode 100644 (file)
index 0000000..4f961bc
--- /dev/null
@@ -0,0 +1,7 @@
+
+tcfail086.hs:4:
+    Can't derive any instances for type Ex
+    because it has existentially-quantified constructor(s)
+
+Compilation had errors
+