Test Trac #7445
authorSimon Peyton Jones <simonpj@microsoft.com>
Fri, 7 Dec 2012 10:22:12 +0000 (10:22 +0000)
committerSimon Peyton Jones <simonpj@microsoft.com>
Fri, 7 Dec 2012 10:22:12 +0000 (10:22 +0000)
testsuite/tests/th/Makefile
testsuite/tests/th/T7445.hs [new file with mode: 0644]
testsuite/tests/th/T7445a.hs [new file with mode: 0644]
testsuite/tests/th/all.T

index 0dca106..37134ce 100644 (file)
@@ -8,6 +8,9 @@ T2386:
        '$(TEST_HC)' $(TEST_HC_OPTS) -v0 -c T2386_Lib.hs -fforce-recomp
        '$(TEST_HC)' $(TEST_HC_OPTS) -v0 -c T2386.hs -fforce-recomp
 
+T7445:
+       '$(TEST_HC)' $(TEST_HC_OPTS) -v0 -c T7445a.hs -fforce-recomp
+       '$(TEST_HC)' $(TEST_HC_OPTS) -v0 -c T7445.hs -fforce-recomp
 
 HC_OPTS = -XTemplateHaskell -package template-haskell
 
diff --git a/testsuite/tests/th/T7445.hs b/testsuite/tests/th/T7445.hs
new file mode 100644 (file)
index 0000000..03371e3
--- /dev/null
@@ -0,0 +1,6 @@
+{-# LANGUAGE TemplateHaskell #-}
+
+module T7445 where
+import T7445a
+
+moo = $(foo)
diff --git a/testsuite/tests/th/T7445a.hs b/testsuite/tests/th/T7445a.hs
new file mode 100644 (file)
index 0000000..75719a1
--- /dev/null
@@ -0,0 +1,13 @@
+{-# LANGUAGE DeriveDataTypeable, FlexibleContexts #-}
+module T7445a ( foo ) where
+
+import Data.Data
+import Language.Haskell.TH.Quote
+import Language.Haskell.TH
+
+data Expr
+    =  IntExpr Integer
+    deriving (Show, Typeable, Data)
+
+foo :: ExpQ
+foo = dataToExpQ (const Nothing) (IntExpr 1)
index 07faaf7..78e7655 100644 (file)
@@ -254,3 +254,7 @@ test('T7092', extra_clean(['T7092a.hi','T7092a.o']),
               multimod_compile, ['T7092','-v0'])
 test('T7276', normal, compile_fail, ['-v0'])
 test('T7276a', combined_output, ghci_script, ['T7276a.script'])
+
+test('T7445', extra_clean(['T7445a.hi', 'T7445a.o']),
+             run_command,
+             ['$MAKE -s --no-print-directory T7445'] )