Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Int64 and Word64 #62

Open
athas opened this issue Jun 24, 2021 · 7 comments
Open

Int64 and Word64 #62

athas opened this issue Jun 24, 2021 · 7 comments
Assignees

Comments

@athas
Copy link
Contributor

athas commented Jun 24, 2021

The SML Basis library specifies Int64 and Word64 structures. These are really handy and it would be swell if MosML supported them.

@kfl kfl self-assigned this Jul 1, 2021
@athas athas mentioned this issue Jul 1, 2021
@kfl
Copy link
Owner

kfl commented Jul 6, 2021

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?

@athas
Copy link
Contributor Author

athas commented Jul 8, 2021

The Word64 structure is not loaded with -P full, but has to be loaded manually after startup.

Any hope of Int64 as well?

@athas
Copy link
Contributor Author

athas commented Jul 8, 2021

Overloaded word constant (e.g. 0w255) don't work with Word64.

@athas
Copy link
Contributor Author

athas commented Jul 8, 2021

Neither does any other overloaded operation, I think.

@athas
Copy link
Contributor Author

athas commented Jul 8, 2021

But beyond that, I think it works!

@kfl
Copy link
Owner

kfl commented Jul 11, 2021

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.

@kfl
Copy link
Owner

kfl commented Jul 13, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants