diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2011-08-03 09:00:59 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2011-08-03 09:00:59 +0100 |
commit | 6dee92549b96f1cc44f7226bca4c50040af2dd8d (patch) | |
tree | 337d277552a392ca211399aa6d41cab592bc522f /testsuite/tests/th/T5362.hs | |
parent | 8632b5348f6d48321eae13a6b12304e0584af85a (diff) | |
download | haskell-6dee92549b96f1cc44f7226bca4c50040af2dd8d.tar.gz |
Test Trac #5362
Diffstat (limited to 'testsuite/tests/th/T5362.hs')
-rw-r--r-- | testsuite/tests/th/T5362.hs | 23 |
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 + ) + + + |