-
Notifications
You must be signed in to change notification settings - Fork 114
Algebraic effects
Alex Reinking edited this page Sep 15, 2022
·
3 revisions
The algebraic effects system in Dex is (currently) very experimental and deliberately limited.
Effects definitions are given like so:
effect Exn
V---- name
ctl raise : (a: Type) ?-> Unit -> a
^-- policy ^---------------------- signature
A new effect named Exn is introduced here by the Exn keyword. Effects are not parametric and there is no syntax for introducing binders at the effect level.
This effect declares one effect operation (but could declare several, each on its own line) named raise. Effect operations in Dex specify a resumption policy that is used to