summaryrefslogtreecommitdiff
path: root/ocaml/lib/dill.mli
blob: f78bba8fb4bb3c0da2c41f7fc709f66ad4074bf3 (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
(** Dill - Terminal I/O driver using Eio *)

open Noun

type belt =
  | Aro of [`d | `l | `r | `u]
  | Bac
  | Ctl of char
  | Del
  | Met of char
  | Ret
  | Txt of string list

type blit =
  | Lin of string
  | Klr of noun
  | Mor of blit list
  | Hop of int
  | Clr

type effect = {
  wire: noun;
  blit: blit;
}

val render_blit : stdout:_ Eio.Flow.sink -> blit -> unit
val make_belt_event : noun -> belt -> noun
val parse_input : string -> belt
val input_loop : stdin:_ Eio.Flow.source -> state:State.t -> wire:noun -> (noun -> unit) -> unit
val render_effects : stdout:_ Eio.Flow.sink -> noun -> unit