Tests for #10945 and #10946
authorJan Stolarek <jan.stolarek@p.lodz.pl>
Thu, 8 Oct 2015 12:10:42 +0000 (14:10 +0200)
committerJan Stolarek <jan.stolarek@p.lodz.pl>
Thu, 8 Oct 2015 12:10:42 +0000 (14:10 +0200)
testsuite/tests/th/T10945.hs [new file with mode: 0644]
testsuite/tests/th/T10946.hs [new file with mode: 0644]
testsuite/tests/th/all.T

diff --git a/testsuite/tests/th/T10945.hs b/testsuite/tests/th/T10945.hs
new file mode 100644 (file)
index 0000000..be7a792
--- /dev/null
@@ -0,0 +1,14 @@
+{-# LANGUAGE TemplateHaskell #-}
+
+module T10945 where
+
+import Language.Haskell.TH
+
+$$(return [
+   SigD (mkName "m")
+        (ForallT [PlainTV (mkName "a")]
+                 []
+                 (AppT (AppT ArrowT (VarT (mkName "a"))) (VarT (mkName "a"))))
+ , FunD (mkName "m")
+        [Clause [VarP (mkName "x")] (NormalB (VarE (mkName "x"))) []]
+ ])
diff --git a/testsuite/tests/th/T10946.hs b/testsuite/tests/th/T10946.hs
new file mode 100644 (file)
index 0000000..e234d91
--- /dev/null
@@ -0,0 +1,8 @@
+{-# LANGUAGE TemplateHaskell #-}
+
+module T10946 where
+
+import Language.Haskell.TH
+
+m :: a -> a
+m x = $$([||_||])
index 9d4736c..8304737 100644 (file)
@@ -360,3 +360,5 @@ test('TH_namePackage', normal, compile_and_run, ['-v0'])
 test('T10811', normal, compile, ['-v0'])
 test('T10810', normal, compile, ['-v0'])
 test('T10891', normal, compile, ['-v0'])
+test('T10945', expect_broken(10945), compile, ['-v0'])
+test('T10946', expect_broken(10946), compile, ['-v0'])