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
If we declare an effect with type parameters, e.g.
effect Eff[A] {
def use(): A
}
Then the number of type parameters is not checked at the usage site, so all of those compile:
def foo(): Int / Eff = <>
def foo2(): Int / Eff[Int, Unit] = <>
Only if we ever use do use, it will complain that Eff[Int] is not allowed in that context, or that the number of type parameters does not match up for the use call.
EDIT: If we ever try to define a handler with try ... with ..., then we get the appropriate error message there.
The text was updated successfully, but these errors were encountered:
Ah, interesting: At a try ... with ..., this check is made (we get a Interface ... expects ... parameters, but ... with something like try {...} with Eff { ... } if Eff was declared with type parameters)
We could add a pretyper phase (at one point we had it) to establish wellformedness before typing. There is Wellformedness but it only runs after typer.
If we declare an effect with type parameters, e.g.
Then the number of type parameters is not checked at the usage site, so all of those compile:
Only if we ever use
do use
, it will complain thatEff[Int]
is not allowed in that context, or that the number of type parameters does not match up for the use call.EDIT: If we ever try to define a handler with
try ... with ...
, then we get the appropriate error message there.The text was updated successfully, but these errors were encountered: