Open chtenb opened 9 months ago
As already pointed out by Tim in issue #402 this is due to the missing let-generalization of effects. In particular, the example can be checked if the type signature of f
is provided:
pub fun main()
val f : forall <e> () -> e int = get
take-div(f)
take-total(f)
Take the following code
Now this will compile
But this will not
with the error message being
Superficially the problem seems to be that the effect is inferred for the value
f
once, rather than for each call site individually.