[MLton] Selectors in -show-def-use output

Vesa Karvonen vesa.karvonen at cs.helsinki.fi
Mon Feb 5 02:20:13 PST 2007

Working on the def-use-mode (http://mlton.org/EmacsDefUseMode) I noticed that the
def-use info includes selectors.  For example, the following (in -show-def-use
generated output) refers to a selector (#1):

variable x mltonlib/com/ssh/extended-basis/unstable/detail/list.sml 18.20
    mltonlib/com/ssh/extended-basis/unstable/detail/list.sml 18.20

Is there a reason why selectors are also included in the def-use output or is it
just an oversight?  I'd like to filter them out.

BTW, I assume (haven't checked it from the MLton source, yet) these spurious selector
variables are related to the implementation of selectors.  If that is the case, then
I wonder if it would be possible to use something illegal like "#" as the name of the
generated symbol.  That would make them stand out and possibly make it easy to filter
them out (or perhaps there is a better way?).

-Vesa Karvonen

More information about the MLton mailing list