diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2011-08-05 16:28:57 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2011-08-05 16:28:57 +0100 |
commit | fa3fb70d796ce3c17a84b7b9ed3a7ce9531a82d7 (patch) | |
tree | 927a2ed02ee16427f219219589373bb19ebbbf6b | |
parent | f53c388164540b83b1eaaab4354f362dc55ceb95 (diff) | |
download | haskell-fa3fb70d796ce3c17a84b7b9ed3a7ce9531a82d7.tar.gz |
Test Trac #5379
-rw-r--r-- | testsuite/tests/th/T5379.hs | 11 | ||||
-rw-r--r-- | testsuite/tests/th/T5379.stdout | 1 | ||||
-rw-r--r-- | testsuite/tests/th/all.T | 1 |
3 files changed, 13 insertions, 0 deletions
diff --git a/testsuite/tests/th/T5379.hs b/testsuite/tests/th/T5379.hs new file mode 100644 index 0000000000..d978032534 --- /dev/null +++ b/testsuite/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/testsuite/tests/th/T5379.stdout b/testsuite/tests/th/T5379.stdout new file mode 100644 index 0000000000..573541ac97 --- /dev/null +++ b/testsuite/tests/th/T5379.stdout @@ -0,0 +1 @@ +0 diff --git a/testsuite/tests/th/all.T b/testsuite/tests/th/all.T index f2abff4e3d..f69a9ab9dd 100644 --- a/testsuite/tests/th/all.T +++ b/testsuite/tests/th/all.T @@ -195,3 +195,4 @@ test('TH_unresolvedInfix2', ['-v0']) test('T5358', normal, compile_fail, ['']) +test('T5379', normal, compile_and_run, ['']) |