Test #9738 in th/T9738
authorRichard Eisenberg <eir@cis.upenn.edu>
Tue, 28 Oct 2014 18:53:59 +0000 (14:53 -0400)
committerRichard Eisenberg <eir@cis.upenn.edu>
Sun, 2 Nov 2014 01:12:55 +0000 (21:12 -0400)
testsuite/tests/th/T9738.hs [new file with mode: 0644]
testsuite/tests/th/T9738.stderr [new file with mode: 0644]
testsuite/tests/th/all.T

diff --git a/testsuite/tests/th/T9738.hs b/testsuite/tests/th/T9738.hs
new file mode 100644 (file)
index 0000000..7c5f020
--- /dev/null
@@ -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 (file)
index 0000000..e4b97cb
--- /dev/null
@@ -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")))]
index 3c108a7..4409571 100644 (file)
@@ -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'])