[MLton] (no) Standard library bug
Stephen Weeks
sweeks at sweeks.com
Wed Aug 23 20:04:57 PDT 2006
> Is it really a bug not to include the standard library?
...
> MLton bug: toplevel suffix not installed.
That error message stems from a day before MLBs even existed, in which
all programs implicitly included the basis library. At that time, it
was certainly a bug (either in MLton or its basis library
implementation) if the message was seen. These days, there is no
reason why one couldn't have programs without the standard library,
although someone needs to do a little work to solve problems like the
one you found.
As a quick hack, you can include the standard library in your MLB just
for effect using
local $(SML_LIB)/basis/basis.mlb in end
This will install the toplevel suffix and everything else needed to
get a working program, while the local will prevent any declarations
from being visible. Of course, the declaration has the annoying side
effect of greatly increasing compile time and code size.
If you want to figure out what's exactly needed, it should be easy
enough to track down the few things like setSuffix that MLton assumes
exist and mimic what the basis library implementation does to get a
very slim yet workable system.
More information about the MLton
mailing list