Changes between Version 7 and Version 8 of Commentary/Compiler/UnusedImports
- Timestamp:
- 07/01/09 05:40:14 (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Commentary/Compiler/UnusedImports
v7 v8 169 169 a use of `"D"` marks both the first and third lines as used. 170 170 171 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. 172 171 173 Here are how some example imports map to trees of `ImportInfo`, assuming `Foo` exports `a`, `b`, `D(c1, c2)`. 172 174 {{{ … … 202 204 }}} 203 205 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 206 206 These 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. 207 207 {{{
