summaryrefslogtreecommitdiff
path: root/testsuite/tests/th/T5037.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/th/T5037.hs')
-rw-r--r--testsuite/tests/th/T5037.hs11
1 files changed, 11 insertions, 0 deletions
diff --git a/testsuite/tests/th/T5037.hs b/testsuite/tests/th/T5037.hs
new file mode 100644
index 0000000000..06f42ab88c
--- /dev/null
+++ b/testsuite/tests/th/T5037.hs
@@ -0,0 +1,11 @@
+{-# LANGUAGE TemplateHaskell #-}
+module T5037 where
+import Language.Haskell.TH
+import System.IO
+
+$( do ds <- [d| f :: Maybe Int -> Int
+ f Nothing = 3
+ f (Just x) = $(varE (mkName "x"))
+ |]
+ runIO $ (putStrLn (pprint ds) >> hFlush stdout)
+ return ds )