-
Notifications
You must be signed in to change notification settings - Fork 38
Never perform box inference #1090
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
base: master
Are you sure you want to change the base?
Conversation
For funsies, I also completely removed |
var x in outer = 42; x | ||
}; | ||
val g = test2; | ||
val g = box test2; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RE #878: This is exactly a place where I'd be fine with inferring box
:)
(the RHS of a val
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I know. I wanted to see how bad it is if we don't infer boxes at all. This might drive home the point that there is a difference even more (even though it is annoying). I am actually more annoyed by foo(box compareInt)
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting, I always explicitly write the box
in map::fromList(..., box compareInt)
My hope was that this could make Namer a bit easier in some cases, but I don't see Namer changes, so I'm not sure whether that's true 🤔 |
Maybe, I didn't think about it, but just followed the type errors :) |
We need to change the docs on the website when merging. |
We still need to update the website, for example here https://effekt-lang.org/tour/captures saying -A boxed computation may only be used after unboxing it, which is only permitted when all its captures are in scope.
+A boxed computation may only be used after unboxing it (which happens automatically), which is only permitted when all its captures are in scope. |
This is a quick experiment related to #878 to see how bad things go if we completely disable box inference and only keep unbox inference.