[project @ 2004-12-23 09:07:30 by simonpj]
authorsimonpj <unknown>
Thu, 23 Dec 2004 09:07:39 +0000 (09:07 +0000)
committersimonpj <unknown>
Thu, 23 Dec 2004 09:07:39 +0000 (09:07 +0000)
commite12e0bb72881bd814f449e27b6d870646997864f
tree9df57d60a91cb887a140aa1b39983c8bb5fcc78e
parent20e39e0e07e4a8e9395894b2785d6675e4e3e3b3
[project @ 2004-12-23 09:07:30 by simonpj]
---------------------------------
          Template Haskell: names again
   ---------------------------------

On 2 Dec 04 I made this commit (1.58 in Convert.lhs)

    Fix a Template Haskell bug that meant that top-level names created
    with newName were not made properly unique.

But that just introduced a new bug!  THe trouble is that names created by
newName are NameUs; but I was *also* using NameU for names of free varaibles,
such as the 'x' in the quoted code here
f x = $( g [| \y -> (x,y) |])

But when converting to HsSyn, the x and y must be treated diffferently.
The 'x' must convert to an Exact RdrName, so that it binds to the 'x' that's
in the type environment; but the 'y' must generate a nice unique RdrName.

So this commit adds NameL for the lexically-scoped bindings like 'x'.
ghc/compiler/deSugar/DsMeta.hs
ghc/compiler/hsSyn/Convert.lhs
ghc/compiler/typecheck/TcSplice.lhs