[commit: testsuite] master: Test Trac #5700 (69d6a42)
Simon Peyton Jones
simonpj at microsoft.com
Fri Dec 23 19:00:13 CET 2011
Repository : ssh://darcs.haskell.org//srv/darcs/testsuite
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/69d6a42f6860c349bf8b860f53bae185e7f3cd62
>---------------------------------------------------------------
commit 69d6a42f6860c349bf8b860f53bae185e7f3cd62
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Fri Dec 23 17:24:50 2011 +0000
Test Trac #5700
>---------------------------------------------------------------
tests/th/T5700.hs | 8 ++++++++
tests/th/T5700.stderr | 7 +++++++
tests/th/T5700a.hs | 15 +++++++++++++++
tests/th/all.T | 3 +++
4 files changed, 33 insertions(+), 0 deletions(-)
diff --git a/tests/th/T5700.hs b/tests/th/T5700.hs
new file mode 100644
index 0000000..542058d
--- /dev/null
+++ b/tests/th/T5700.hs
@@ -0,0 +1,8 @@
+{-# LANGUAGE TemplateHaskell #-}
+module T5700 where
+
+import T5700a
+
+data D = D
+
+$(mkC ''D)
diff --git a/tests/th/T5700.stderr b/tests/th/T5700.stderr
new file mode 100644
index 0000000..dd1ece7
--- /dev/null
+++ b/tests/th/T5700.stderr
@@ -0,0 +1,7 @@
+T5700.hs:1:1: Splicing declarations
+ mkC ''D
+ ======>
+ T5700.hs:8:3-9
+ instance C D where
+ {-# INLINE inlinable #-}
+ inlinable _ = GHC.Tuple.()
diff --git a/tests/th/T5700a.hs b/tests/th/T5700a.hs
new file mode 100644
index 0000000..3ae7d77
--- /dev/null
+++ b/tests/th/T5700a.hs
@@ -0,0 +1,15 @@
+{-# LANGUAGE TemplateHaskell #-}
+module T5700a where
+
+import Language.Haskell.TH
+
+class C a where
+ inlinable :: a -> ()
+
+mkC :: Name -> Q [Dec]
+mkC n = return
+ [InstanceD [] (AppT (ConT ''C) (ConT n))
+ [ FunD 'inlinable [Clause [WildP] (NormalB (ConE '())) []],
+ PragmaD (InlineP 'inlinable (InlineSpec True False Nothing))
+ ]
+ ]
diff --git a/tests/th/all.T b/tests/th/all.T
index a6762fe..9c08427 100644
--- a/tests/th/all.T
+++ b/tests/th/all.T
@@ -217,3 +217,6 @@ test('T5597', extra_clean(['T5597a.hi','T5597a.o']),
multimod_compile, ['T5597','-v0'])
test('T5665', extra_clean(['T5665a.hi','T5665a.o']),
multimod_compile, ['T5665','-v0'])
+test('T5700', extra_clean(['T5700a.hi','T5700a.o']),
+ multimod_compile, ['T5700','-v0 -ddump-splices'])
+
More information about the Cvs-ghc
mailing list