summaryrefslogtreecommitdiff
path: root/testsuite/tests/th/T5362.hs
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2011-08-03 09:00:59 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2011-08-03 09:00:59 +0100
commit6dee92549b96f1cc44f7226bca4c50040af2dd8d (patch)
tree337d277552a392ca211399aa6d41cab592bc522f /testsuite/tests/th/T5362.hs
parent8632b5348f6d48321eae13a6b12304e0584af85a (diff)
downloadhaskell-6dee92549b96f1cc44f7226bca4c50040af2dd8d.tar.gz
Test Trac #5362
Diffstat (limited to 'testsuite/tests/th/T5362.hs')
-rw-r--r--testsuite/tests/th/T5362.hs23
1 files changed, 23 insertions, 0 deletions
diff --git a/testsuite/tests/th/T5362.hs b/testsuite/tests/th/T5362.hs
new file mode 100644
index 0000000000..4a1e67fb4a
--- /dev/null
+++ b/testsuite/tests/th/T5362.hs
@@ -0,0 +1,23 @@
+{-# LANGUAGE TemplateHaskell #-}
+
+module T5362() where
+
+import System.IO
+import Language.Haskell.TH
+
+$(
+ do fName <- newName "f"
+ gName <- newName "g"
+ let gExp = varE gName
+
+ sdf <- sigD fName [t| () |]
+ sdg <- sigD gName [t| () |]
+ fdf <- funD fName [clause [] (normalB [| undefined $gExp |]) []]
+ fdg <- funD gName [clause [] (normalB [| undefined |]) []]
+ let ds = [sdf, fdf, sdg, fdg]
+ runIO $ do { putStrLn (pprint ds); hFlush stdout }
+ return ds
+ )
+
+
+