Commit cfdcf556 authored by Simon Peyton Jones's avatar Simon Peyton Jones

Test Trac #7092

parent 0faa6024
{-# LANGUAGE TemplateHaskell #-}
{-# OPTIONS_GHC -fwarn-name-shadowing #-}
-- Should not produce a name-shadowing warning (GHC 7.4 did)
module T7092 where
import T7092a
blah = $(code)
{-# LANGUAGE TemplateHaskell #-}
module T7092a where
import Language.Haskell.TH
code :: Q Exp
code = do
n1 <- newName "foo"
n2 <- newName "foo"
letE [valD (varP n1) (normalB [| (1 :: Int) |]) []]
$ letE [valD (varP n2) (normalB [| (2 :: Int) |]) []]
$ appE (appE [| ((+) :: Int -> Int -> Int)|] (varE n1)) (varE n2)
......@@ -250,3 +250,5 @@ test('T7064',
extra_clean(['T7064a.hi', 'T7064a.o']),
multimod_compile_and_run,
['T7064.hs', '-v0'])
test('T7092', extra_clean(['T7092a.hi','T7092a.o']),
multimod_compile, ['T7092','-v0'])
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment