aboutsummaryrefslogtreecommitdiff
path: root/examples/30-effect-in-handler
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2025-02-02 19:10:44 +0000
committerMichael Williamson <mike@zwobble.org>2025-02-02 19:53:22 +0000
commit6ead9f417fabd55cc26a93c6d54bdde1110fccd4 (patch)
treeec43bf0f0f97d329e63229da812ae82b7df132aa /examples/30-effect-in-handler
parentcab0787d8c259b21baa376ba1ec2d95740964bd9 (diff)
Add runtime support for relational int operations
Diffstat (limited to 'examples/30-effect-in-handler')
-rw-r--r--examples/30-effect-in-handler/shed-examples.json59
-rw-r--r--examples/30-effect-in-handler/shed.json58
-rw-r--r--examples/30-effect-in-handler/src/Example.shed44
3 files changed, 0 insertions, 61 deletions
diff --git a/examples/30-effect-in-handler/shed-examples.json5 b/examples/30-effect-in-handler/shed-examples.json5
deleted file mode 100644
index 0717d99b..00000000
--- a/examples/30-effect-in-handler/shed-examples.json5
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- examples: [
- {
- project: ".",
- bin: "example",
- expectedOutput: "a outer\na inner start\na outer\na inner end\nb start\na inner start\na outer\na inner end\nb end\na inner start\na outer\na inner end\na outer",
- },
- ],
-}
diff --git a/examples/30-effect-in-handler/shed.json5 b/examples/30-effect-in-handler/shed.json5
deleted file mode 100644
index e642a813..00000000
--- a/examples/30-effect-in-handler/shed.json5
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- bins: [
- {
- name: "example",
- mainNamespace: "Example",
- },
- ],
-}
diff --git a/examples/30-effect-in-handler/src/Example.shed b/examples/30-effect-in-handler/src/Example.shed
deleted file mode 100644
index 568d9ea8..00000000
--- a/examples/30-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;
- }
- }
-}