Render the annotated document in a certain style. Styles not set in the annotation will use the style of the surrounding document, or the terminal’s default if none has been set yet.
style = color Green <> bold
styledDoc = annotate style "hello world"
Constructors
SetAnsiStyleansiForeground :: Maybe (Intensity, Color)Set the foreground color, or keep the old one.
ansiBackground :: Maybe (Intensity, Color)Set the background color, or keep the old one.
ansiBold :: Maybe BoldSwitch on boldness, or don’t do anything.
ansiItalics :: Maybe ItalicizedSwitch on italics, or don’t do anything.
ansiUnderlining :: Maybe UnderlinedSwitch on underlining, or don’t do anything.
Instances5Eq, Ord, Show, Semigroup, Monoid
Eq AnsiStyleDefined in prettyprinter-ansi-terminal-1.1.3 · Prettyprinter.Render.Terminal.InternalOrd AnsiStyleDefined in prettyprinter-ansi-terminal-1.1.3 · Prettyprinter.Render.Terminal.InternalShow AnsiStyleDefined in prettyprinter-ansi-terminal-1.1.3 · Prettyprinter.Render.Terminal.InternalSemigroup AnsiStyleDefined in prettyprinter-ansi-terminal-1.1.3 · Prettyprinter.Render.Terminal.InternalKeep the first decision for each of foreground color, background color, boldness, italication, and underlining. If a certain style is not set, the terminal’s default will be used.
Example:
color Red <> color Greenis red because the first color wins, and not bold because (or if) that’s the terminal’s default.
Monoid AnsiStyleDefined in prettyprinter-ansi-terminal-1.1.3 · Prettyprinter.Render.Terminal.Internalmempty does nothing, which is equivalent to inheriting the style of the surrounding doc, or the terminal’s default if no style has been set yet.