summaryrefslogtreecommitdiff
path: root/module/alphabet/abcstyx.m
diff options
context:
space:
mode:
authorCharles.Forsyth <devnull@localhost>2006-12-22 20:52:35 +0000
committerCharles.Forsyth <devnull@localhost>2006-12-22 20:52:35 +0000
commit46439007cf417cbd9ac8049bb4122c890097a0fa (patch)
tree6fdb25e5f3a2b6d5657eb23b35774b631d4d97e4 /module/alphabet/abcstyx.m
parent37da2899f40661e3e9631e497da8dc59b971cbd0 (diff)
20060303-partial
Diffstat (limited to 'module/alphabet/abcstyx.m')
-rw-r--r--module/alphabet/abcstyx.m33
1 files changed, 33 insertions, 0 deletions
diff --git a/module/alphabet/abcstyx.m b/module/alphabet/abcstyx.m
new file mode 100644
index 00000000..227550a9
--- /dev/null
+++ b/module/alphabet/abcstyx.m
@@ -0,0 +1,33 @@
+ABCStyx: module {
+ PATH: con "/dis/alphabet/abcstyx.dis";
+ Value: adt {
+ c: fn(v: self ref Value): ref Value.C; # cmd
+ s: fn(v: self ref Value): ref Value.S; # string
+ w: fn(v: self ref Value): ref Value.W; # wfd
+ x: fn(v: self ref Value): ref Value.D; # styx
+
+ typec: fn(v: self ref Value): int;
+ type2s: fn(t: int): string;
+ discard: fn(v: self ref Value);
+ reusable: fn(v: self ref Value): int;
+
+ pick {
+ S =>
+ i: string;
+ C =>
+ i: ref Sh->Cmd;
+ W =>
+ i: chan of ref Sys->FD;
+ X =>
+ i: (chan of ref Styx->Rmsg, chan of ref Styx->Tmsg);
+ }
+ };
+ init: fn();
+};
+
+Styxmodule: module {
+ types: fn(): string;
+ init: fn();
+ run: fn(errorc: chan of string, r: ref Reports->Report,
+ opts: list of (int, list of ref ABCStyx->Value), args: list of ref ABCStyx->Value): ref ABCStyx->Value;
+};