Test Trac #5287
authorSimon Peyton Jones <simonpj@microsoft.com>
Sat, 23 Jul 2011 12:25:36 +0000 (13:25 +0100)
committerSimon Peyton Jones <simonpj@microsoft.com>
Sat, 23 Jul 2011 12:25:36 +0000 (13:25 +0100)
testsuite/tests/deriving/should_fail/T5287.hs [new file with mode: 0644]
testsuite/tests/deriving/should_fail/T5287.stderr [new file with mode: 0644]
testsuite/tests/deriving/should_fail/all.T

diff --git a/testsuite/tests/deriving/should_fail/T5287.hs b/testsuite/tests/deriving/should_fail/T5287.hs
new file mode 100644 (file)
index 0000000..5db2d85
--- /dev/null
@@ -0,0 +1,8 @@
+{-# LANGUAGE MultiParamTypeClasses, UndecidableInstances #-}
+module Bug where
+class A a oops
+data D d = D d
+instance A a oops => Read (D a)
+data E e = E (D e) deriving Read
+
+
diff --git a/testsuite/tests/deriving/should_fail/T5287.stderr b/testsuite/tests/deriving/should_fail/T5287.stderr
new file mode 100644 (file)
index 0000000..608e7aa
--- /dev/null
@@ -0,0 +1,11 @@
+ghc-stage2.exe: panic! (the 'impossible' happened)\r
+  (GHC version 7.3.20110721 for i386-unknown-mingw32):\r
+       solveDerivEqns: probable loop\r
+    (T5287.hs:6:29-32 main:Bug.$fReadE{v rhW} [e{tv aaR} [tv]] base:GHC.Read.Read{tc 2d} [main:Bug.E{tc raM}\r
+                                                                                            e{tv aaR} [tv]] = [base:GHC.Read.Read{tc 2d}\r
+                                                                                                                 (main:Bug.D{tc raO}\r
+                                                                                                                    e{tv aaR} [tv])])\r
+    [[main:Bug.A{tc raQ} e{tv aaR} [tv] oops{tv alO} [tcs]]]\r
+\r
+Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug\r
+\r
index 8fa5e27..9c362cc 100644 (file)
@@ -32,4 +32,5 @@ test('drvfail-foldable-traversable1', normal, compile_fail,
 test('T3833', normal, compile_fail, [''])
 test('T3834', normal, compile_fail, [''])
 test('T4528', normal, compile_fail, [''])
+test('T5287', normal, compile_fail, [''])