On 14.11 12:40, Simon Peyton-Jones wrote: > | I'm a bit confused about variable shadowing in Core. Since every variable > has a > | Unique I would've thought that there is no problem with that (i.e. a Unique > is > | globally unique). > > No, as Max says, there is *not* a "no-shadowing" invariant. Shadowing > is allowed. > > The Simplifier does generally get rid of shadowing, so it tends to be > rare, but it's too hard to maintain it as a guaranteed invariant.
I see. Thanks for the replies and clarifications. > As I said in my last email to David, if you wanted to write a Wiki > page in the Commentary summarising your understanding, I'd be happy to > check it over. Think of the page you'd *like* to have read rather > than working it out by experiment. I've added a note at the bottom of: http://hackage.haskell.org/trac/ghc/wiki/Commentary/Compiler/CoreSynType Also I've found a section on name capture in "Secrets of Glasgow Haskell Compiler inliner" (with some explanations and rationale behind the current approach), so I've added a reference to it. Thanks, Michal _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
