-
Notifications
You must be signed in to change notification settings - Fork 194
Open
Labels
Milestone
Description
The following:
pub named effect iter<a>
fun next() : a
pub fun repeat(elem : a) : _ ev<iter<a>>
with h <- named handler
fun next()
elem
hfails to compile with
iterator.kk(8, 9): type error: identifier next cannot be resolved.
context : next()
inferred type: (_) -> _
candidates : next : forall<a> (hnd/ev<iter<a>>) -> <div,exn> a
sslice/next: (slice : sslice/sslice) -> maybe<(char, sslice/sslice)>
hint : give a type annotation or qualify the name?Even though I would expect it to compile just fine, as it is absolutely clear to the compiler what the types are.
This behaviour only happens with named handlers in my tests.
If this is not a bug, then this behaviour would severely limit the usability of named handlers.