diff options
-rw-r--r-- | testsuite/tests/th/T8540.hs | 7 | ||||
-rw-r--r-- | testsuite/tests/th/T8540a.hs | 10 | ||||
-rw-r--r-- | testsuite/tests/th/all.T | 4 |
3 files changed, 21 insertions, 0 deletions
diff --git a/testsuite/tests/th/T8540.hs b/testsuite/tests/th/T8540.hs new file mode 100644 index 0000000000..50374976b8 --- /dev/null +++ b/testsuite/tests/th/T8540.hs @@ -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 index 0000000000..a3ffbb268c --- /dev/null +++ b/testsuite/tests/th/T8540a.hs @@ -0,0 +1,10 @@ +{-# LANGUAGE TemplateHaskell #-} +module T8540a (foo) where + +import Language.Haskell.TH + +foo :: Q Exp +foo = [| bar |] + +bar :: Int +bar = 5 diff --git a/testsuite/tests/th/all.T b/testsuite/tests/th/all.T index ae6f02aaf5..a1fd6bfa18 100644 --- a/testsuite/tests/th/all.T +++ b/testsuite/tests/th/all.T @@ -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]) |