blob: 67e92155a9b3c0c13735bb7322a3a00195bdd71b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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
|