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

Cannot compile MLB files that include module entities #74

Open
eldesh opened this issue Mar 21, 2021 · 3 comments
Open

Cannot compile MLB files that include module entities #74

eldesh opened this issue Mar 21, 2021 · 3 comments

Comments

@eldesh
Copy link
Contributor

eldesh commented Mar 21, 2021

MLBasis includes the signature, structure and functor definition as part of basdec.
http://mlton.org/MLBasisSyntaxAndSemantics

@melsman
Copy link
Owner

melsman commented Mar 21, 2021

This MLton feature will be difficult to support in MLKit. The feature can be simulated at the file-level, however.

@melsman melsman closed this as completed Mar 21, 2021
@melsman
Copy link
Owner

melsman commented Mar 21, 2021

To implement the feature, a possible path would be to generate "rebinding-code" dynamically and store it in a file in the MLB directory (with a name generated from the hash of its content)... I'll reopen this issue - maybe someone will attack it at some point...

@melsman melsman reopened this Mar 21, 2021
@eldesh
Copy link
Contributor Author

eldesh commented Mar 24, 2021

@melsman First, I implemented the parser eldesh@893d62f.
Is this a reasonable starting point?
What should I do next? Where should I make changes to achieve it?

@melsman melsman changed the title cannot compile MLB files include module entities Cannot compile MLB files that include module entities Jan 25, 2022
MatthewFluet added a commit to MatthewFluet/mlton that referenced this issue Feb 6, 2022
Since MLKit doesn't support module-level
entities (melsman/mlkit#74), we attempt to
automatically generate `bind.sml` files.

However, SML doesn't allow `functor` rebinding: `functor Foo = Foo`.
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