diff options
Diffstat (limited to 'testsuite/tests/quasiquotation/qq008/QQ.hs')
-rw-r--r-- | testsuite/tests/quasiquotation/qq008/QQ.hs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/testsuite/tests/quasiquotation/qq008/QQ.hs b/testsuite/tests/quasiquotation/qq008/QQ.hs new file mode 100644 index 0000000000..eee8dc9670 --- /dev/null +++ b/testsuite/tests/quasiquotation/qq008/QQ.hs @@ -0,0 +1,11 @@ +{-# LANGUAGE TemplateHaskell #-} +module QQ where + +import Language.Haskell.TH.Quote +import Language.Haskell.TH + +pq = QuasiQuoter { quoteDec = \_ -> [d| f x = x |], + quoteType = \_ -> [t| Int -> Int |], + quoteExp = \_ -> [| $(varE (mkName "x")) + 1::Int |], + quotePat = \_ -> [p| Just x |] } + |