diff options
author | Douglas Wilson <douglas.wilson@gmail.com> | 2017-07-03 16:54:29 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-07-03 18:58:11 -0400 |
commit | d55bea14c745f7f448fb24673a21b511d1c1c222 (patch) | |
tree | ce5dca5e7ee1e044160d1ba9146235717fcc3f18 /testsuite/tests/quasiquotation | |
parent | c3a78623cf7bb74c8ca0749f1216e802aa37a721 (diff) | |
download | haskell-d55bea14c745f7f448fb24673a21b511d1c1c222.tar.gz |
Fix -fno-code for modules that use -XQuasiQuotes
In commit 53c78be0aab76a3107c4dacbb1d177afacdd37fa object code is
generated for modules depended on by modules that use -XTemplateHaskell.
This turns the same logic on for modules that use -XQuasiQuotes.
A test is added.
Note that I've based this of D3646, as it has a function I want to use.
Test Plan: ./validate
Reviewers: austin, bgamari, alexbiehl
Reviewed By: alexbiehl
Subscribers: alexbiehl, rwbarton, thomie
GHC Trac Issues: #13863
Differential Revision: https://phabricator.haskell.org/D3677
Diffstat (limited to 'testsuite/tests/quasiquotation')
-rw-r--r-- | testsuite/tests/quasiquotation/T13863/A.hs | 8 | ||||
-rw-r--r-- | testsuite/tests/quasiquotation/T13863/B.hs | 7 | ||||
-rw-r--r-- | testsuite/tests/quasiquotation/T13863/all.T | 1 |
3 files changed, 16 insertions, 0 deletions
diff --git a/testsuite/tests/quasiquotation/T13863/A.hs b/testsuite/tests/quasiquotation/T13863/A.hs new file mode 100644 index 0000000000..0d3137cde9 --- /dev/null +++ b/testsuite/tests/quasiquotation/T13863/A.hs @@ -0,0 +1,8 @@ +{-# OPTIONS_GHC -Wno-missing-fields#-} +module A where + +import Language.Haskell.TH +import Language.Haskell.TH.Quote + +aquoter :: QuasiQuoter +aquoter = QuasiQuoter {quoteType = conT . mkName } diff --git a/testsuite/tests/quasiquotation/T13863/B.hs b/testsuite/tests/quasiquotation/T13863/B.hs new file mode 100644 index 0000000000..649a551071 --- /dev/null +++ b/testsuite/tests/quasiquotation/T13863/B.hs @@ -0,0 +1,7 @@ +{-# LANGUAGE QuasiQuotes #-} +module B where + +import A + +foo:: [aquoter|Int|] -> [aquoter|String|] +foo = show diff --git a/testsuite/tests/quasiquotation/T13863/all.T b/testsuite/tests/quasiquotation/T13863/all.T new file mode 100644 index 0000000000..c29dc20b56 --- /dev/null +++ b/testsuite/tests/quasiquotation/T13863/all.T @@ -0,0 +1 @@ +test('T13863', [req_interp, omit_ways(prof_ways), extra_files(['A.hs', 'B.hs'])], multimod_compile, ['B', '-fno-code -v0'])
\ No newline at end of file |