aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/bounded-editor.aup20
-rw-r--r--examples/editor.aup20
2 files changed, 0 insertions, 40 deletions
diff --git a/examples/bounded-editor.aup b/examples/bounded-editor.aup
deleted file mode 100644
index d8d1d0d..0000000
--- a/examples/bounded-editor.aup
+++ /dev/null
@@ -1,20 +0,0 @@
-# The same editor with an authored size policy: an edit whose result would
-# exceed 8 bytes fails as a whole, and nothing is stored.
-state documents: bytes by key
-
-input show = message by key
-input edit = message by key {
- start: u32
- remove: u32
- insert: bytes
-}
-
-on show {
- reply documents[key]
-}
-
-on edit {
- documents[key].replace(edit.start .. edit.start + edit.remove, edit.insert)
- require documents[key].bytes <= 8
- reply edit.insert
-}
diff --git a/examples/editor.aup b/examples/editor.aup
deleted file mode 100644
index 621c8ba..0000000
--- a/examples/editor.aup
+++ /dev/null
@@ -1,20 +0,0 @@
-# Revision-checked byte edits of keyed documents. The runtime owns the
-# documents: an edit is a transaction on the key's working version, which
-# commits only if the sender's revision is still current.
-state documents: bytes by key
-
-input show = message by key
-input edit = message by key {
- start: u32
- remove: u32
- insert: bytes
-}
-
-on show {
- reply documents[key]
-}
-
-on edit {
- documents[key].replace(edit.start .. edit.start + edit.remove, edit.insert)
- reply edit.insert
-}