Repository : ssh://darcs.haskell.org//srv/darcs/testsuite On branch : master
http://hackage.haskell.org/trac/ghc/changeset/91d96f3fed9970333ee89881e273fa2151fa1bf4 >--------------------------------------------------------------- commit 91d96f3fed9970333ee89881e273fa2151fa1bf4 Author: Simon Peyton Jones <[email protected]> Date: Thu Apr 5 14:41:32 2012 +0100 Add files for testing T5795 >--------------------------------------------------------------- tests/th/T5795.hs | 10 ++++++++++ tests/th/T5795.stderr | 7 +++++++ 2 files changed, 17 insertions(+), 0 deletions(-) diff --git a/tests/th/T5795.hs b/tests/th/T5795.hs new file mode 100644 index 0000000..ea41ce0 --- /dev/null +++ b/tests/th/T5795.hs @@ -0,0 +1,10 @@ +{-# LANGUAGE TemplateHaskell #-} +module T5795 where + +import Language.Haskell.TH + +ty :: Q Type +ty = [t| Int |] + +f :: $ty +f = undefined diff --git a/tests/th/T5795.stderr b/tests/th/T5795.stderr new file mode 100644 index 0000000..5fce537 --- /dev/null +++ b/tests/th/T5795.stderr @@ -0,0 +1,7 @@ + +T5795.hs:9:6: + GHC stage restriction: + `ty' is used in a top-level splice or annotation, + and must be imported, not defined locally + In the expression: ty + In the type signature for `f': f :: $ty _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
