Test Trac #7959
authorKrzysztof Gogolewski <krz.gogolewski@gmail.com>
Mon, 3 Jun 2013 15:08:35 +0000 (17:08 +0200)
committerSimon Peyton Jones <simonpj@microsoft.com>
Wed, 5 Jun 2013 17:17:15 +0000 (18:17 +0100)
testsuite/tests/deriving/should_fail/T7959.hs [new file with mode: 0644]
testsuite/tests/deriving/should_fail/T7959.stderr [new file with mode: 0644]
testsuite/tests/deriving/should_fail/all.T

diff --git a/testsuite/tests/deriving/should_fail/T7959.hs b/testsuite/tests/deriving/should_fail/T7959.hs
new file mode 100644 (file)
index 0000000..a798bb0
--- /dev/null
@@ -0,0 +1,6 @@
+{-# LANGUAGE NullaryTypeClasses, StandaloneDeriving #-}
+module T7959 where
+
+class A
+deriving instance A
+data B deriving A
diff --git a/testsuite/tests/deriving/should_fail/T7959.stderr b/testsuite/tests/deriving/should_fail/T7959.stderr
new file mode 100644 (file)
index 0000000..0e805a6
--- /dev/null
@@ -0,0 +1,8 @@
+
+T7959.hs:5:1:
+    Cannot derive instances for nullary classes
+    In the stand-alone deriving instance for â€›A’
+
+T7959.hs:6:17:
+    Cannot derive instances for nullary classes
+    In the data declaration for â€›B’
index ad96a11..c2d304e 100644 (file)
@@ -40,3 +40,4 @@ test('T1133A',
      run_command,
      ['$MAKE --no-print-directory -s T1133A'])
 test('T5863a', normal, compile_fail, [''])
+test('T7959', normal, compile_fail, [''])