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
To define the state effect we could use the built-in state effect of Koka, but a cleaner way is to use parameterized handlers.
Such handlers take a parameter that is updated at every resume. Here is a possible definition for handling state:
val state = handler(s) {
return x → (x,s)
get() → resume(s,s)
put(s’) → resume(s’,())
}
I tried to look for parameterized handler in Koka's documentation but there's no such references.
Is this feature removed from Koka? If not how it works?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I came across the following phrase when reading Type Directed Compilation of Row-typed Algebraic Effects.
I tried to look for
parameterized
handler in Koka's documentation but there's no such references.Is this feature removed from Koka? If not how it works?
Beta Was this translation helpful? Give feedback.
All reactions