aboutsummaryrefslogtreecommitdiffstats
path: root/research/experiments/044-specs/probes-027
diff options
context:
space:
mode:
authoreunhhu <[email protected]>2026-10-19 02:12:51 +0100
committereunhhu <[email protected]>2026-10-19 02:12:51 +0100
commitf12346827a136536c5e8e9c6af3da842bd5cc0c3 (patch)
treedaefcb538d7d24995122e90439a7302c3738573f /research/experiments/044-specs/probes-027
parent81be688cc6fdfa52633b936a9b8793782b6f5acf (diff)
downloadpure-f12346827a136536c5e8e9c6af3da842bd5cc0c3.tar.gz
pure-f12346827a136536c5e8e9c6af3da842bd5cc0c3.zip
140 after 027: the ten probes compiled again (run.sh writing to a temporary directory: 10-13's -o /dev/null made a compiled probe say Permission denied): three compile as written, the other seven's diagnostics now mostly naming the form, so the same needs written in 027's forms (probes-027/): a byte an i64, bits on i64s, a record holding itself through a list, a recursive fn in a handler with its result type, a character by for and char, a variant in a list's item all compile; three gaps left, each a change of the core: a view calling a recursive fn or a fn with a block, a record or a variant as a state by itself, a character at a cursor; the suite table's column after 027 (2 and 4 written, 6 and 7 work, the first needs of 1, 3, 5 and 9 compiling, 8's layout as a view blocked by the first gap)
Diffstat (limited to 'research/experiments/044-specs/probes-027')
-rw-r--r--research/experiments/044-specs/probes-027/p1-byte.aup5
-rw-r--r--research/experiments/044-specs/probes-027/p2-bits.aup5
-rw-r--r--research/experiments/044-specs/probes-027/p3-nested.aup5
-rw-r--r--research/experiments/044-specs/probes-027/p4-rec.aup6
-rw-r--r--research/experiments/044-specs/probes-027/p4b-rec-view.aup2
-rw-r--r--research/experiments/044-specs/probes-027/p5b-chars.aup8
-rw-r--r--research/experiments/044-specs/probes-027/p6-variant.aup8
-rw-r--r--research/experiments/044-specs/probes-027/p6b-variant-field.aup11
-rw-r--r--research/experiments/044-specs/probes-027/p7-record-state.aup5
9 files changed, 55 insertions, 0 deletions
diff --git a/research/experiments/044-specs/probes-027/p1-byte.aup b/research/experiments/044-specs/probes-027/p1-byte.aup
new file mode 100644
index 0000000..678c51d
--- /dev/null
+++ b/research/experiments/044-specs/probes-027/p1-byte.aup
@@ -0,0 +1,5 @@
+state first: i64
+input packet = message { data: bytes }
+on packet {
+ first = packet.data[0]
+}
diff --git a/research/experiments/044-specs/probes-027/p2-bits.aup b/research/experiments/044-specs/probes-027/p2-bits.aup
new file mode 100644
index 0000000..1e3fdca
--- /dev/null
+++ b/research/experiments/044-specs/probes-027/p2-bits.aup
@@ -0,0 +1,5 @@
+state h: i64
+input word = message { w: i64 }
+on word {
+ h = (h ^ word.w) << 3
+}
diff --git a/research/experiments/044-specs/probes-027/p3-nested.aup b/research/experiments/044-specs/probes-027/p3-nested.aup
new file mode 100644
index 0000000..0eb26eb
--- /dev/null
+++ b/research/experiments/044-specs/probes-027/p3-nested.aup
@@ -0,0 +1,5 @@
+record Node {
+ name: text
+ children: list of Node
+}
+state root: list of Node
diff --git a/research/experiments/044-specs/probes-027/p4-rec.aup b/research/experiments/044-specs/probes-027/p4-rec.aup
new file mode 100644
index 0000000..a725d81
--- /dev/null
+++ b/research/experiments/044-specs/probes-027/p4-rec.aup
@@ -0,0 +1,6 @@
+fn depth(n) -> number = if n == 0 { 0 } else { 1 + depth(n - 1) }
+state d = 0
+input go = key Space
+on go.down {
+ d = depth(3)
+}
diff --git a/research/experiments/044-specs/probes-027/p4b-rec-view.aup b/research/experiments/044-specs/probes-027/p4b-rec-view.aup
new file mode 100644
index 0000000..05dbca1
--- /dev/null
+++ b/research/experiments/044-specs/probes-027/p4b-rec-view.aup
@@ -0,0 +1,2 @@
+fn depth(n) -> number = if n == 0 { 0 } else { 1 + depth(n - 1) }
+view d = depth(3)
diff --git a/research/experiments/044-specs/probes-027/p5b-chars.aup b/research/experiments/044-specs/probes-027/p5b-chars.aup
new file mode 100644
index 0000000..e81dafd
--- /dev/null
+++ b/research/experiments/044-specs/probes-027/p5b-chars.aup
@@ -0,0 +1,8 @@
+state first: text
+input line = message { t: text }
+on line {
+ for c in line.t {
+ first = char(c)
+ break
+ }
+}
diff --git a/research/experiments/044-specs/probes-027/p6-variant.aup b/research/experiments/044-specs/probes-027/p6-variant.aup
new file mode 100644
index 0000000..606b698
--- /dev/null
+++ b/research/experiments/044-specs/probes-027/p6-variant.aup
@@ -0,0 +1,8 @@
+record Leaf {
+ v = 0
+}
+variant X {
+ leaf(Leaf)
+ word(text)
+}
+state x: X
diff --git a/research/experiments/044-specs/probes-027/p6b-variant-field.aup b/research/experiments/044-specs/probes-027/p6b-variant-field.aup
new file mode 100644
index 0000000..2b1504a
--- /dev/null
+++ b/research/experiments/044-specs/probes-027/p6b-variant-field.aup
@@ -0,0 +1,11 @@
+record Leaf {
+ v = 0
+}
+variant X {
+ leaf(Leaf)
+ word(text)
+}
+record Holder {
+ x: X
+}
+state xs: list of Holder
diff --git a/research/experiments/044-specs/probes-027/p7-record-state.aup b/research/experiments/044-specs/probes-027/p7-record-state.aup
new file mode 100644
index 0000000..ff339d2
--- /dev/null
+++ b/research/experiments/044-specs/probes-027/p7-record-state.aup
@@ -0,0 +1,5 @@
+record Point {
+ x = 0
+ y = 0
+}
+state at: Point