Changes between Version 7 and Version 8 of Commentary/Compiler/UnusedImports


Ignore:
Timestamp:
Jul 1, 2009 12:40:14 PM (5 years ago)
Author:
igloo
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Commentary/Compiler/UnusedImports

    v7 v8  
    169169a use of `"D"` marks both the first and third lines as used. 
    170170 
     171When we come to giving warnings, if a node is unused then we warn about it, and do not descend into the rest of that subtree, as the node we warn about subsumes its children. If the node is marked as used then we descend, looking to see if any of its children are unused. 
     172 
    171173Here are how some example imports map to trees of `ImportInfo`, assuming `Foo` exports `a`, `b`, `D(c1, c2)`. 
    172174{{{ 
     
    202204}}} 
    203205 
    204 When we come to giving warnings, if a node is unused then we warn about it, and do not descend into the rest of that subtree, as the node we warn about subsumes its children. If the node is marked as used then we descend, looking to see if any of its children are unused. 
    205  
    206206These trees are built by `RnNames.mkImportInfo`. In `RnNames.warnUnusedImportDecls` we make two lists of `ImportInfo`s; one list contains all the explicit imports, e.g. 
    207207{{{