Repository : ssh://darcs.haskell.org//srv/darcs/testsuite On branch : master
http://hackage.haskell.org/trac/ghc/changeset/b88168c77b7ef594a4c8a9c44b0bd8db4555682c >--------------------------------------------------------------- commit b88168c77b7ef594a4c8a9c44b0bd8db4555682c Author: Simon Peyton Jones <simo...@microsoft.com> Date: Wed Oct 3 08:56:52 2012 +0100 Test Trac #7276 >--------------------------------------------------------------- tests/th/T7276.hs | 6 ++++++ tests/th/T7276.stderr | 9 +++++++++ tests/th/all.T | 1 + 3 files changed, 16 insertions(+), 0 deletions(-) diff --git a/tests/th/T7276.hs b/tests/th/T7276.hs new file mode 100644 index 0000000..59a9ec0 --- /dev/null +++ b/tests/th/T7276.hs @@ -0,0 +1,6 @@ +{-# OPTIONS_GHC -fdefer-type-errors #-} +{-# LANGUAGE TemplateHaskell #-} + +module T7276 where + +x = $( [d| y = 3 |] ) diff --git a/tests/th/T7276.stderr b/tests/th/T7276.stderr new file mode 100644 index 0000000..aeb3664 --- /dev/null +++ b/tests/th/T7276.stderr @@ -0,0 +1,9 @@ + +T7276.hs:6:8: + Couldn't match type `[Language.Haskell.TH.Syntax.Dec]' + with `Language.Haskell.TH.Syntax.Exp' + Expected type: Language.Haskell.TH.Lib.ExpQ + Actual type: Language.Haskell.TH.Lib.DecsQ + In the Template Haskell quotation [d| y = 3 |] + In the expression: [d| y = 3 |] + In the expression: $([d| y = 3 |]) diff --git a/tests/th/all.T b/tests/th/all.T index 46cdc59..6e332e2 100644 --- a/tests/th/all.T +++ b/tests/th/all.T @@ -252,3 +252,4 @@ test('T7064', ['T7064.hs', '-v0']) test('T7092', extra_clean(['T7092a.hi','T7092a.o']), multimod_compile, ['T7092','-v0']) +test('T7276', normal, compile_fail, ['-v0']) _______________________________________________ Cvs-ghc mailing list Cvs-ghc@haskell.org http://www.haskell.org/mailman/listinfo/cvs-ghc