You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Millet reports a 5023 error for the definition of f here:
type foo = {x: int, y: string}
funf foo = #x foo
fung (foo: foo) = f foo
However, this code is accepted by MLton. The reason MLton accepts it is because the type of f can be fully inferred within the definition of g. (You can confirm this deleting the definition of g; MLton will then reject it.)
Solution
It would be nice for Millet to optionally support more aggressive type inference, to mimic MLton.
Perhaps this could even be enabled by default when workspace.root is a .mlb.
The text was updated successfully, but these errors were encountered:
Supporting this would be somewhat non trivial. I'd have to think about what sort of invariants we currently rely on by generalizing per declaration, that would be broken if we started doing it across declarations. It'd also probably just be a bit of work to restructure the way we generalize to be able to do this.
Here's where we do generalization for val decs; this is also thus currently the only place we emit the unresolved record ty error.
Problem
Millet reports a 5023 error for the definition of
f
here:However, this code is accepted by MLton. The reason MLton accepts it is because the type of
f
can be fully inferred within the definition ofg
. (You can confirm this deleting the definition ofg
; MLton will then reject it.)Solution
It would be nice for Millet to optionally support more aggressive type inference, to mimic MLton.
Perhaps this could even be enabled by default when
workspace.root
is a.mlb
.The text was updated successfully, but these errors were encountered: