-
Notifications
You must be signed in to change notification settings - Fork 12
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
Allow specifying or deducing basis configuration #20
Comments
some issues i see with 2:
as for 1, if the user is going to do things themselves anyway, they could also just define |
Yeah, I was picturing that you can always fall back on the default behavior.
Haha yes, you're absolutely right. I ended up adding cases in
In this particular case, this solution seems not too bad. But more generally, it's common to have implementation-specific code somewhere. For example, |
Problem
Millet generates a 5006 error for the following code; however, this code is accepted by both SML/NJ and MLton.
The error is technically correct, because
Time.fromReal
has typeLargeReal.real -> time
, resulting in a clash betweenreal
andLargeReal.real
.However, it is common for
real = LargeReal.real
. Both the SML/NJ and MLton implementations of the basis library do this.Solution
A couple ideas:
type real = LargeReal.real
.The second option is what
smlfmt
does, for MLton at least.smlfmt
queries the local install of MLton to determine where the basis library lives: see e.g.MLtonPathMap.getPathMap
, which this tells us where$(SML_LIB)
lives. For SML/NJ, you would need to know where$/basis.cm
lives.The text was updated successfully, but these errors were encountered: