Repository : ssh://darcs.haskell.org//srv/darcs/testsuite

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/7af4ba802fd8ad7d6f54579e8881ce00270c78ab

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

commit 7af4ba802fd8ad7d6f54579e8881ce00270c78ab
Author: Simon Peyton Jones <[email protected]>
Date:   Wed Nov 30 02:32:47 2011 +0000

    Test Trac #5625

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

 tests/th/T5665.hs  |    9 +++++++++
 tests/th/T5665a.hs |    6 ++++++
 tests/th/all.T     |    2 ++
 3 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/tests/th/T5665.hs b/tests/th/T5665.hs
new file mode 100644
index 0000000..2434e43
--- /dev/null
+++ b/tests/th/T5665.hs
@@ -0,0 +1,9 @@
+{-# LANGUAGE TemplateHaskell #-}
+
+module T5665 where
+
+import T5665a
+
+data Record = Record { recordField :: Int }
+
+$(doSomeTH "SomeType" ''Int)
diff --git a/tests/th/T5665a.hs b/tests/th/T5665a.hs
new file mode 100644
index 0000000..eba5a1a
--- /dev/null
+++ b/tests/th/T5665a.hs
@@ -0,0 +1,6 @@
+module T5665a where
+
+import Language.Haskell.TH
+
+doSomeTH s tp = return [NewtypeD [] n [] (NormalC n [(NotStrict, ConT tp)]) []]
+   where n = mkName s
diff --git a/tests/th/all.T b/tests/th/all.T
index a2121bd..a6762fe 100644
--- a/tests/th/all.T
+++ b/tests/th/all.T
@@ -215,3 +215,5 @@ test('TH_Depends',
      ['$MAKE -s --no-print-directory TH_Depends'])
 test('T5597', extra_clean(['T5597a.hi','T5597a.o']), 
               multimod_compile, ['T5597','-v0'])
+test('T5665', extra_clean(['T5665a.hi','T5665a.o']), 
+              multimod_compile, ['T5665','-v0'])



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to