[commit: ghc] master: Test #9738 in th/T9738 (752b5e2)

git at git.haskell.org git at git.haskell.org
Sun Nov 2 03:53:47 UTC 2014


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/752b5e216963c0e8c06aa382b695ce2215869632/ghc

>---------------------------------------------------------------

commit 752b5e216963c0e8c06aa382b695ce2215869632
Author: Richard Eisenberg <eir at cis.upenn.edu>
Date:   Tue Oct 28 14:53:59 2014 -0400

    Test #9738 in th/T9738


>---------------------------------------------------------------

752b5e216963c0e8c06aa382b695ce2215869632
 testsuite/tests/th/T9738.hs     | 16 ++++++++++++++++
 testsuite/tests/th/T9738.stderr |  1 +
 testsuite/tests/th/all.T        |  1 +
 3 files changed, 18 insertions(+)

diff --git a/testsuite/tests/th/T9738.hs b/testsuite/tests/th/T9738.hs
new file mode 100644
index 0000000..7c5f020
--- /dev/null
+++ b/testsuite/tests/th/T9738.hs
@@ -0,0 +1,16 @@
+{-# LANGUAGE TemplateHaskell #-}
+
+module T9738 where
+
+import System.IO
+import Language.Haskell.TH
+
+data Foo = MkFoo
+
+$( do decs <- [d| {-# ANN type Foo "hi" #-}
+                  {-# ANN MkFoo "there" #-}
+                  {-# ANN module "Charley" #-}
+                   |]
+      runIO $ print decs
+      runIO $ hFlush stdout
+      return [] )
diff --git a/testsuite/tests/th/T9738.stderr b/testsuite/tests/th/T9738.stderr
new file mode 100644
index 0000000..e4b97cb
--- /dev/null
+++ b/testsuite/tests/th/T9738.stderr
@@ -0,0 +1 @@
+[PragmaD (AnnP (TypeAnnotation T9738.Foo) (LitE (StringL "hi"))),PragmaD (AnnP (ValueAnnotation T9738.MkFoo) (LitE (StringL "there"))),PragmaD (AnnP ModuleAnnotation (LitE (StringL "Charley")))]
diff --git a/testsuite/tests/th/all.T b/testsuite/tests/th/all.T
index 3c108a7..4409571 100644
--- a/testsuite/tests/th/all.T
+++ b/testsuite/tests/th/all.T
@@ -334,3 +334,4 @@ test('T9199', normal, compile, ['-v0'])
 test('T9692', normal, compile, ['-v0'])
 test('T8953', normal, compile, ['-v0'])
 test('T9084', normal, compile_fail, ['-v0'])
+test('T9738', normal, compile, ['-v0'])



More information about the ghc-commits mailing list