[MLton] mlb support
Tue, 27 Jul 2004 11:07:45 -0400 (EDT)
> I agree it's messy. Do you have an idiom in mind where
> "warnLocalUnused false" would be useful?
Not really. I can imagine situations where one might like to go back to
the defaults set on the command-line (which would be a trivial annotation
> If not, why not drop
> warnLocalUnused for a single annotation that marks everything in scope
> as used; call it "forceUsed" or "useExports".
I considered this, and I guess it is a reasonable solution. There is a
little verbosity, in that I would end up writing:
ann warnUnused true, forceUsed in ... end
which is a common idiom, I imagine.
> This would also let you
> turn Control.warnUnused into a WarnUnused.t ref, since there will be
> no need to expose its history.
I'd turn it into a bool. I was also using the list-ness to see if
processing the annotations changed the warnUnused control (by checking the
list length). I'd just need to do something similar with forceUsed.
> I'm also wondering about the fact that "warnLocalUnused true" enables
> warnings despite the setting of warnUnused. Since people can already
> enable this with "warnUnused true", why not decouple that?