Changes between Version 10 and Version 11 of Commentary/Compiler/Renamer


Ignore:
Timestamp:
Feb 10, 2014 5:34:13 PM (17 months ago)
Author:
Fuuzetsu
Comment:

Fix typo

Legend:

Unmodified
Added
Removed
Modified
  • Commentary/Compiler/Renamer

    v10 v11  
    7777The global rdr-env is created by [[GhcFile(compiler/rename/RnNames.lhs)]]. 
    7878 
    79 It is important to note that the global rdr-env is created  ''before'' the renamer actually descends into the top=level bindings of a module. In other words, before {{{TcRnDriver.rnTopSrcDecls}}} performs the renaming of a module by way of {{{RnSource.rnSrcDecls}}}, it uses {{{RnNames.importsFromLocalDecls}}} to set up the global rdr-env environment, which contains {{{Names}}} for all imported and all locally defined toplevel binders.  Hence, when the helpers of {{{rnSrcDecls}}} come across the defining occurences of a toplevel {{{RdrName}}}, they don't rename it by generating a new name, but they simply look up its name in the global rdr-env.  
     79It is important to note that the global rdr-env is created  ''before'' the renamer actually descends into the top-level bindings of a module. In other words, before {{{TcRnDriver.rnTopSrcDecls}}} performs the renaming of a module by way of {{{RnSource.rnSrcDecls}}}, it uses {{{RnNames.importsFromLocalDecls}}} to set up the global rdr-env environment, which contains {{{Names}}} for all imported and all locally defined toplevel binders.  Hence, when the helpers of {{{rnSrcDecls}}} come across the defining occurences of a toplevel {{{RdrName}}}, they don't rename it by generating a new name, but they simply look up its name in the global rdr-env.  
    8080 
    8181== Unused imports ==