about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2017-12-07 14:56:55 -0800
committerKartik K. Agaram <vc@akkartik.com>2017-12-07 14:56:55 -0800
commitba2729b2011da0c7e644d1c25a5ff75fca6bb848 (patch)
treeddf4b8f40c6efb4dd79622c63289986ef51d078f
parent472e4ce96d5c4524fa5969726fe0ca0c06e23c74 (diff)
downloadmu-ba2729b2011da0c7e644d1c25a5ff75fca6bb848.tar.gz
4150
-rw-r--r--076continuation.cc30
1 files changed, 15 insertions, 15 deletions
diff --git a/076continuation.cc b/076continuation.cc
index 59f4a2da..df6d0e67 100644
--- a/076continuation.cc
+++ b/076continuation.cc
@@ -335,6 +335,21 @@ if (is_mu_continuation(canonized_x)) {
   return;
 }
 
+:(scenario continuations_can_be_copied)
+def main [
+  local-scope
+  k:continuation <- call-with-continuation-mark f
+  k2:continuation <- copy k
+  # reclaiming k and k2 shouldn't delete f's local scope twice
+]
+def f [
+  local-scope
+  load-ingredients
+  return-continuation-until-mark
+  return 0
+]
+$error: 0
+
 :(code)
 bool is_mu_continuation(reagent/*copy*/ x) {
   canonize_type(x);
@@ -350,18 +365,3 @@ void dump(const int continuation_id) {
   delimited_continuation& curr = get(Delimited_continuation, continuation_id);
   dump(curr.frames);
 }
-
-:(scenario continuations_can_be_copied)
-def main [
-  local-scope
-  k:continuation <- call-with-continuation-mark f
-  k2:continuation <- copy k
-  # reclaiming k and k2 shouldn't delete f's local scope twice
-]
-def f [
-  local-scope
-  load-ingredients
-  return-continuation-until-mark
-  return 0
-]
-$error: 0