Repository : ssh://darcs.haskell.org//srv/darcs/testsuite On branch : master
http://hackage.haskell.org/trac/ghc/changeset/3adbbde2b39e0c3ca973871a40531ec0b56472b1 >--------------------------------------------------------------- commit 3adbbde2b39e0c3ca973871a40531ec0b56472b1 Author: Simon Peyton Jones <[email protected]> Date: Fri Aug 5 16:28:57 2011 +0100 Test Trac #5379 >--------------------------------------------------------------- tests/th/T5379.hs | 11 +++++++++++ .../should_run/2838.stdout => th/T5379.stdout} | 0 tests/th/all.T | 1 + 3 files changed, 12 insertions(+), 0 deletions(-) diff --git a/tests/th/T5379.hs b/tests/th/T5379.hs new file mode 100644 index 0000000..d978032 --- /dev/null +++ b/tests/th/T5379.hs @@ -0,0 +1,11 @@ +{-# LANGUAGE TemplateHaskell #-} +module Main where + +import Language.Haskell.TH + +$( [d| g = 0 + h = $( return $ LamE [VarP (mkName "g")] (VarE 'g) ) |] ) + -- The 'g should bind to the g=0 definition + +-- Should print 0, not 1! +main = print (h 1) diff --git a/tests/codeGen/should_run/2838.stdout b/tests/th/T5379.stdout similarity index 100% copy from tests/codeGen/should_run/2838.stdout copy to tests/th/T5379.stdout diff --git a/tests/th/all.T b/tests/th/all.T index f2abff4..f69a9ab 100644 --- a/tests/th/all.T +++ b/tests/th/all.T @@ -195,3 +195,4 @@ test('TH_unresolvedInfix2', ['-v0']) test('T5358', normal, compile_fail, ['']) +test('T5379', normal, compile_and_run, ['']) _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
