diff options
| author | polwex <polwex@sortug.com> | 2025-10-20 13:13:39 +0700 |
|---|---|---|
| committer | polwex <polwex@sortug.com> | 2025-10-20 13:13:39 +0700 |
| commit | d21900836f89b2bf9cd55ff1708a4619c8b89656 (patch) | |
| tree | bb3a5842ae408ffa465814c6bbf27a5002866252 /ocaml/lib/effects.mli | |
neoinityes
Diffstat (limited to 'ocaml/lib/effects.mli')
| -rw-r--r-- | ocaml/lib/effects.mli | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/ocaml/lib/effects.mli b/ocaml/lib/effects.mli new file mode 100644 index 0000000..67e9215 --- /dev/null +++ b/ocaml/lib/effects.mli @@ -0,0 +1,35 @@ +open Noun + +(** Effect types and parsing *) + +type blit = + | Lin of string (* Simple line of text *) + | Klr of noun (* Styled/colored text *) + | Mor of blit list (* Multiple blits *) + | Hop of int (* Cursor hop *) + | Clr (* Clear screen *) + | Unknown of noun (* Unparsed blit *) + +type card = + | Blit of blit (* Terminal output *) + | Logo (* Show logo *) + | HttpResponse of noun (* HTTP response *) + | Send of noun (* Network send *) + | Unknown of noun (* Unknown card type *) + +type effect = { + wire: noun; + card: card; +} + +val parse_blit : noun -> blit +val parse_card : noun -> card +val parse_effect : noun -> effect option +val parse_effects : noun -> effect list + +val show_wire : noun -> string +val show_card : card -> string + +val is_dill_wire : noun -> bool +val is_http_wire : noun -> bool +val is_ames_wire : noun -> bool |
