ANSI
:= []
Add styles to a string.
Add color styles to a string and then reset to default.
parse_raw_stdin : List(U8) -> Input
input_to_str : Input -> Str
symbol_to_str : Symbol -> Str
upper_to_str : Letter -> Str
lower_to_str : Letter -> Str
parse_cursor : List(U8) -> CursorPosition
update_cursor : { cursor : CursorPosition, screen : ScreenSize }, Arrow -> { cursor : CursorPosition, screen : ScreenSize }
draw_screen : { cursor : CursorPosition, screen : ScreenSize }, List(DrawFn) -> Str
Loop through each pixel in the screen and build up a single string to write to stdout.
Escape
:= [
Reset,
Control(Control),
]
Symbol
:= [
ExclamationMark,
QuotationMark,
NumberSign,
DollarSign,
PercentSign,
Ampersand,
Apostrophe,
RoundOpenBracket,
RoundCloseBracket,
Asterisk,
PlusSign,
Comma,
Hyphen,
FullStop,
ForwardSlash,
Colon,
SemiColon,
LessThanSign,
EqualsSign,
GreaterThanSign,
QuestionMark,
AtSign,
SquareOpenBracket,
Backslash,
SquareCloseBracket,
Caret,
Underscore,
GraveAccent,
CurlyOpenBrace,
VerticalBar,
CurlyCloseBrace,
Tilde,
]
Ctrl
:= [Space, A, B, C, D, E, F, G, H, I, J, K, L, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, BackSlash, SquareCloseBracket, Caret, Underscore]
Action
:= [Escape, Enter, Space, Delete]
Arrow
:= [Up, Down, Left, Right]
Number
:= [N0, N1, N2, N3, N4, N5, N6, N7, N8, N9]
Letter
:= [A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z]
Input
:= [
Ctrl(Ctrl),
Action(Action),
Arrow(Arrow),
Symbol(Symbol),
Number(Number),
Upper(Letter),
Lower(Letter),
Unsupported(List(U8)),
]
ScreenSize : { width : U16, height : U16 }
CursorPosition : { row : U16, col : U16 }