[commit: testsuite] master: Test Trac #6005 (second bug) (f171467)
Simon Peyton Jones
simonpj at microsoft.com
Thu Apr 26 14:52:36 CEST 2012
Repository : ssh://darcs.haskell.org//srv/darcs/testsuite
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/f17146786aa87bf2d9dd8b97f9bb38ff174985b0
>---------------------------------------------------------------
commit f17146786aa87bf2d9dd8b97f9bb38ff174985b0
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Thu Apr 26 13:52:19 2012 +0100
Test Trac #6005 (second bug)
>---------------------------------------------------------------
tests/th/T6005a.hs | 15 +++++++++++++++
tests/th/all.T | 1 +
2 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/tests/th/T6005a.hs b/tests/th/T6005a.hs
new file mode 100644
index 0000000..a206913
--- /dev/null
+++ b/tests/th/T6005a.hs
@@ -0,0 +1,15 @@
+{-# LANGUAGE TemplateHaskell #-}
+
+module T6005a where
+
+-- The point here is that we don't need to generate the
+-- derived code inside the bracket; doing so is troublesome
+-- and it should never be type incorrect, so it's also a
+-- waste of effort.
+
+$( [d|
+ data Nat = Zero | Succ Nat deriving( Show )
+ |] )
+
+foo :: String
+foo = show (Succ Zero)
diff --git a/tests/th/all.T b/tests/th/all.T
index f85ca0d..ecce7b9 100644
--- a/tests/th/all.T
+++ b/tests/th/all.T
@@ -235,3 +235,4 @@ test('T5555', extra_clean(['T5555_Lib.hi', 'T5555_Lib.o']),
test('T5976', normal, compile_fail, ['-v0'])
test('T5795', normal, compile_fail, ['-v0'])
test('T6005', normal, compile, ['-v0'])
+test('T6005a', normal, compile, ['-v0'])
More information about the Cvs-ghc
mailing list