0 | module Text.PrettyPrint.Bernardy.ANSI
 1 |
 2 | import public Text.PrettyPrint.Bernardy
 3 | import public Text.ANSI
 4 | import Text.PrettyPrint.Bernardy.Core.ANSI
 5 |
 6 | %default total
 7 |
 8 | ||| Decorate a `Doc` with the given ANSI codes *without*
 9 | ||| changing its stats like width or height.
10 | export
11 | decorate : {opts : _} -> List SGR -> Doc opts -> Doc opts
12 | decorate sgrs doc = doc >>= \l => pure (decorateLayout sgrs l)
13 |