This library primarily exposes the parse
function and the types that it
will yield.
parse : String -> List Action
Convert an arbitrary String of text into a sequence of actions.
If the input string ends with a partial ANSI escape sequence, it will be
yielded as a Remainder
action, which should then be prepended to the next
call to parse
.
parseInto : a -> (Action -> a -> a) -> String -> a
Update a structure with actions parsed out of the given string.
The events relevant to interpreting the stream.
Print
is a chunk of text which should be interpreted with the style implied
by the preceding actions (i.e. [SetBold True, Print "foo"]
) should yield a
bold foo
Remainder
is a partial ANSI escape sequence, returned at the end of the
actions if it was cut off. The next string passed to parse
should have this
prepended to it.The colors applied to the foreground/background.
Method to erase the display or line.