Just a quick note. I just noticed that warnUnused doesn't seem to warn about recursive functions. For example, given local fun foo () = foo () : unit val bar = let fun foo () = foo () : unit in foo end in end and -default-ann 'warnUnused true', MLton will only warn about bar: Warning: unused.sml 3.8. Unused variable: bar.