¡Hola! Andy Wingo <wi...@pobox.com> writes:
> OK, here's another idea. Why don't we keep this as a separate pass -- > enabled if you pass a compilation option. That way it can be more > functional, and you can keep approximate source information. By "pass", you mean a new "language" in the tower? As in `lookup-compilation-order'? > At each node you have a set of identifiers that are bound but not > referenced. If the node is a reference, you remove that identifier > from the set. If it is a binding, you add the bindings, traverse > subexpressions, then do a set difference between your bindings and the > return value from subexpression traversal -- that's your unused > bindings. Yes, this is roughly what I initially did[*], so that sounds reasonable. Thanks! Ludo'. [*] http://thread.gmane.org/gmane.lisp.guile.devel/8795