mosml
mosml copied to clipboard
Int64 and Word64
The SML Basis library specifies Int64 and Word64 structures. These are really handy and it would be swell if MosML supported them.
There is now a stop-gap implementation of Word64
on the devel
branch.
Is there anything in particular that you need, or is the stop-gap implementation good enough for your needs?
The Word64
structure is not loaded with -P full
, but has to be load
ed manually after startup.
Any hope of Int64
as well?
Overloaded word constant (e.g. 0w255
) don't work with Word64
.
Neither does any other overloaded operation, I think.
But beyond that, I think it works!
Thanks for checking. The flaws you have found are mostly why I call it a stop-gap implementation, fixing them are a more invasive chance than what I'd like right now. (Loading Word64
in the full
set should be easy to do though)
In addition to the flaws you mention, I think that the biggest flaw in the stop-gap implementation is that Word64.word
is not an eqtype.
All the flaws should be properly documented.
A stop-gap implementation of Int64
is comming Real Soon:tm:, I just need to check that I get the overflow semantics right.
The devel
branch now contains a stop-gap implementation of Int64
as well.
Again, the implementation does not follow the Basic Library spec 100% Let me know if something crucial is missing for your use case.