diff options
| author | Michael Williamson <mike@zwobble.org> | 2023-12-19 13:39:01 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2023-12-19 13:39:01 +0000 |
| commit | 1c89809ea205455ec78ad89152b37bd15893e7c9 (patch) | |
| tree | 708b25ff70513e5de56adadb6f56b7d577d06c15 /examples/26-effect-in-handler/src | |
| parent | 9a2d749472c0de64cee12b1dc6c1556536bde93f (diff) | |
Handle returns from try bodies
Diffstat (limited to 'examples/26-effect-in-handler/src')
| -rw-r--r-- | examples/26-effect-in-handler/src/Example.shed | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/examples/26-effect-in-handler/src/Example.shed b/examples/26-effect-in-handler/src/Example.shed deleted file mode 100644 index 568d9ea8..00000000 --- a/examples/26-effect-in-handler/src/Example.shed +++ /dev/null @@ -1,44 +0,0 @@ -effect A { - fun a() -> Unit; -} - -effect B { - fun b() -> Unit; -} - -pub fun main() ! Io -> Unit { - try { - A.a!(); - - try { - A.a!(); - - try { - B.b!(); - } handle B { - fun b() { - print!("b start\n"); - A.a!(); - print!("b end\n"); - resume; - } - } - - A.a!(); - } handle A { - fun a() { - print!("a inner start\n"); - A.a!(); - print!("a inner end\n"); - resume; - } - } - - A.a!(); - } handle A { - fun a() { - print!("a outer\n"); - resume; - } - } -} |
