diff options
author | Michael Smith <michael@diglumi.com> | 2015-09-02 13:57:44 +0200 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2015-09-02 13:58:59 +0200 |
commit | c8f623e305ec0a51ac2406a1f754d244e05b96f5 (patch) | |
tree | 5486d652fa38985657e8916ba176149644ed74a9 /testsuite/tests/quasiquotation/qq009/QQ.hs | |
parent | ba5554ec2753cc41f5e087a91f23e1f612a9eb29 (diff) | |
download | haskell-c8f623e305ec0a51ac2406a1f754d244e05b96f5.tar.gz |
Expand declaration QQs first (#10047)
Declaration QuasiQuoters do not cause a group split like $(...)
splices, and are run and expanded before other declarations in
the group.
Resolves the lingering issue with #10047, and fixes broken tests
qq007 and qq008.
Test Plan: validate
Reviewers: goldfire, austin, bgamari
Reviewed By: bgamari
Subscribers: goldfire, simonpj, thomie, spinda
Differential Revision: https://phabricator.haskell.org/D1199
GHC Trac Issues: #10047
Diffstat (limited to 'testsuite/tests/quasiquotation/qq009/QQ.hs')
-rw-r--r-- | testsuite/tests/quasiquotation/qq009/QQ.hs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/testsuite/tests/quasiquotation/qq009/QQ.hs b/testsuite/tests/quasiquotation/qq009/QQ.hs new file mode 100644 index 0000000000..89350bac60 --- /dev/null +++ b/testsuite/tests/quasiquotation/qq009/QQ.hs @@ -0,0 +1,14 @@ +{-# LANGUAGE TemplateHaskell #-} +module QQ where + +import Language.Haskell.TH.Quote +import Language.Haskell.TH.Syntax +import Language.Haskell.TH + +pq = QuasiQuoter { quoteDec = \_ -> return [sig], + quoteType = \_ -> undefined, + quoteExp = \_ -> undefined, + quotePat = \_ -> undefined } + +sig = SigD (mkName "f") (ArrowT `AppT` int `AppT` int) +int = ConT (mkName "Int") |