Test #8412
authorKrzysztof Gogolewski <krz.gogolewski@gmail.com>
Sat, 5 Oct 2013 15:23:59 +0000 (17:23 +0200)
committerKrzysztof Gogolewski <krz.gogolewski@gmail.com>
Sat, 12 Oct 2013 17:31:44 +0000 (19:31 +0200)
testsuite/tests/th/T8412.hs [new file with mode: 0644]
testsuite/tests/th/T8412.stderr [new file with mode: 0644]

diff --git a/testsuite/tests/th/T8412.hs b/testsuite/tests/th/T8412.hs
new file mode 100644 (file)
index 0000000..074bb50
--- /dev/null
@@ -0,0 +1,5 @@
+{-# LANGUAGE TemplateHaskell #-}
+
+import Language.Haskell.TH
+
+type T = $(return $ LitT $ NumTyLit (-1))
diff --git a/testsuite/tests/th/T8412.stderr b/testsuite/tests/th/T8412.stderr
new file mode 100644 (file)
index 0000000..21d43e4
--- /dev/null
@@ -0,0 +1,6 @@
+
+T8412.hs:5:12:
+    Illegal literal in type (type literals must not be negative): -1
+    In the result of the splice:
+      $(return $ LitT $ NumTyLit (- 1))
+    To see what the splice expanded to, use -ddump-splices