summaryrefslogtreecommitdiff
path: root/testsuite/tests/quasiquotation/qq007/QQ.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/quasiquotation/qq007/QQ.hs')
-rw-r--r--testsuite/tests/quasiquotation/qq007/QQ.hs11
1 files changed, 11 insertions, 0 deletions
diff --git a/testsuite/tests/quasiquotation/qq007/QQ.hs b/testsuite/tests/quasiquotation/qq007/QQ.hs
new file mode 100644
index 0000000000..3c13315a31
--- /dev/null
+++ b/testsuite/tests/quasiquotation/qq007/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 |] }
+