Add test T8028
authorRichard Eisenberg <eir@cis.upenn.edu>
Mon, 1 Jul 2013 20:58:07 +0000 (21:58 +0100)
committerRichard Eisenberg <eir@cis.upenn.edu>
Tue, 2 Jul 2013 20:26:49 +0000 (21:26 +0100)
testsuite/tests/th/T8028.hs [new file with mode: 0644]
testsuite/tests/th/T8028.stderr [new file with mode: 0644]
testsuite/tests/th/T8028a.hs [new file with mode: 0644]
testsuite/tests/th/all.T

diff --git a/testsuite/tests/th/T8028.hs b/testsuite/tests/th/T8028.hs
new file mode 100644 (file)
index 0000000..fec993a
--- /dev/null
@@ -0,0 +1,7 @@
+{-# LANGUAGE TemplateHaskell #-}
+
+module T8028 where
+
+import T8028a
+
+$(x)
\ No newline at end of file
diff --git a/testsuite/tests/th/T8028.stderr b/testsuite/tests/th/T8028.stderr
new file mode 100644 (file)
index 0000000..20cf1c7
--- /dev/null
@@ -0,0 +1,4 @@
+
+T8028.hs:7:3:
+    Illegal empty closed type family
+    When splicing a TH declaration: type family F_0 where
diff --git a/testsuite/tests/th/T8028a.hs b/testsuite/tests/th/T8028a.hs
new file mode 100644 (file)
index 0000000..928a96e
--- /dev/null
@@ -0,0 +1,6 @@
+module T8028a where
+
+import Language.Haskell.TH
+
+x = do n <- newName "F"
+       return [ClosedTypeFamilyD n [] Nothing []]
index c6407c4..73d60af 100644 (file)
@@ -275,4 +275,9 @@ test('T7681', normal, compile, ['-v0'])
 test('T7910', normal, compile_and_run, ['-v0'])
 
 test('ClosedFam1', normal, compile, ['-dsuppress-uniques -v0'])
-test('ClosedFam2', normal, compile, ['-v0'])
\ No newline at end of file
+test('ClosedFam2', normal, compile, ['-v0'])
+
+test('T8028',
+     extra_clean(['T8028a.hi', 'T8028a.o']),
+     multimod_compile_fail,
+     ['T8028', '-v0 ' + config.ghc_th_way_flags])