Repository : ssh://darcs.haskell.org//srv/darcs/testsuite On branch : master
http://hackage.haskell.org/trac/ghc/changeset/00adef58c528228ffa83d6fe20622729b86f13b4 >--------------------------------------------------------------- commit 00adef58c528228ffa83d6fe20622729b86f13b4 Author: Simon Peyton Jones <[email protected]> Date: Wed Aug 3 08:44:44 2011 +0100 Test Trac #5358 >--------------------------------------------------------------- tests/th/T5358.hs | 14 ++++++++++++++ tests/th/T5358.stderr | 15 +++++++++++++++ tests/th/all.T | 2 ++ 3 files changed, 31 insertions(+), 0 deletions(-) diff --git a/tests/th/T5358.hs b/tests/th/T5358.hs new file mode 100644 index 0000000..39dec37 --- /dev/null +++ b/tests/th/T5358.hs @@ -0,0 +1,14 @@ +{-# LANGUAGE TemplateHaskell #-} +module T5358 where + +import Language.Haskell.TH + +t1, t2 :: Int +t1 x = x +t2 x = x + +prop_x1 x = t1 x == t2 x + +runTests = $( do VarI _ t _ _ <- reify (mkName "prop_x1") + error $ pprint t + ) diff --git a/tests/th/T5358.stderr b/tests/th/T5358.stderr new file mode 100644 index 0000000..4a1bfbd --- /dev/null +++ b/tests/th/T5358.stderr @@ -0,0 +1,15 @@ + +T5358.hs:7:1: + The equation(s) for `t1' have one argument, + but its type `Int' has none + +T5358.hs:8:1: + The equation(s) for `t2' have one argument, + but its type `Int' has none + +T5358.hs:10:13: + The function `t1' is applied to one argument, + but its type `Int' has none + In the first argument of `(==)', namely `t1 x' + In the expression: t1 x == t2 x + In an equation for `prop_x1': prop_x1 x = t1 x == t2 x diff --git a/tests/th/all.T b/tests/th/all.T index c3a6802..17d30ff 100644 --- a/tests/th/all.T +++ b/tests/th/all.T @@ -192,3 +192,5 @@ test('TH_unresolvedInfix2', normal, compile_fail, ['-v0']) + +test('T5358', normal, compile_fail, ['']) _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
