Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- prettyPrintValue :: Bool -> String -> IO ()
- value2Doc :: String -> Doc AnsiStyle
- data ValuePrintConf = ValuePrintConf {}
- defaultValueConf :: ValuePrintConf
- prettyPrintHaddock :: Bool -> String -> IO ()
- haddock2Doc :: String -> Doc AnsiStyle
- data HaddockPrintConf = HaddockPrintConf {}
- defaultHaddockConf :: HaddockPrintConf
- data AnsiStyle
- color :: Color -> AnsiStyle
- colorDull :: Color -> AnsiStyle
- bgColor :: Color -> AnsiStyle
- bgColorDull :: Color -> AnsiStyle
- data Color
- bold :: AnsiStyle
- italicized :: AnsiStyle
- underlined :: AnsiStyle
Interactive expression printing
data ValuePrintConf Source #
Options for how to colour the terminal output
ValuePrintConf | |
|
defaultValueConf :: ValuePrintConf Source #
A Good Enough colour scheme
Interactive doc string printing
prettyPrintHaddock :: Bool -> String -> IO () Source #
Given a Haddock-formatted docstring, format and print that docstring to the terminal.
The Bool
is to enable a slower but potentially smarter layout algorithm.
haddock2Doc :: String -> Doc AnsiStyle Source #
Parse a docstring into a pretty Doc
. Should never throw an exception
(since haddock-library
will parse something out of any input).
data HaddockPrintConf Source #
Options for how to colour the terminal output
HaddockPrintConf | |
|
defaultHaddockConf :: HaddockPrintConf Source #
A Good Enough colour scheme
Formatting options
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"
Instances
Eq AnsiStyle | |
Ord AnsiStyle | |
Show AnsiStyle | |
Semigroup AnsiStyle | Keep 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:
is red because the first color wins, and not bold because (or if) that’s the terminal’s default. |
Monoid AnsiStyle |
|
Color
bgColorDull :: Color -> AnsiStyle #
Style the background with a dull color.
Style
italicized :: AnsiStyle #
Render in italics.
underlined :: AnsiStyle #
Render underlined.