Test Trac #8540
authorSimon Peyton Jones <simonpj@microsoft.com>
Fri, 22 Nov 2013 16:47:44 +0000 (16:47 +0000)
committerSimon Peyton Jones <simonpj@microsoft.com>
Fri, 22 Nov 2013 16:47:44 +0000 (16:47 +0000)
testsuite/tests/th/T8540.hs [new file with mode: 0644]
testsuite/tests/th/T8540a.hs [new file with mode: 0644]
testsuite/tests/th/all.T

diff --git a/testsuite/tests/th/T8540.hs b/testsuite/tests/th/T8540.hs
new file mode 100644 (file)
index 0000000..5037497
--- /dev/null
@@ -0,0 +1,7 @@
+{-# LANGUAGE TemplateHaskell #-}
+module T8540 where
+
+import T8540a
+
+baz :: Int
+baz = $foo
diff --git a/testsuite/tests/th/T8540a.hs b/testsuite/tests/th/T8540a.hs
new file mode 100644 (file)
index 0000000..a3ffbb2
--- /dev/null
@@ -0,0 +1,10 @@
+{-# LANGUAGE TemplateHaskell #-}
+module T8540a (foo) where
+
+import Language.Haskell.TH
+
+foo :: Q Exp
+foo = [| bar |]
+
+bar :: Int
+bar = 5
index ae6f02a..a1fd6bf 100644 (file)
@@ -307,3 +307,7 @@ test('T8455', normal, compile, ['-v0'])
 test('T8499', normal, compile, ['-v0'])
 test('T7477', normal, compile, ['-v0'])
 test('T8507', normal, compile, ['-v0'])
+test('T8540',
+     extra_clean(['T8540a.hi', 'T8540a.o']),
+     multimod_compile,
+     ['T8540', '-v0 ' + config.ghc_th_way_flags])