Copyright | (c) Dennis Gosnell 2016 |
---|---|
License | BSD-style (see LICENSE file) |
Maintainer | cdep.illabout@gmail.com |
Stability | experimental |
Portability | POSIX |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Text.Pretty.Simple.Internal.Color
Description
Synopsis
- data ColorOptions = ColorOptions {
- colorQuote :: Style
- colorString :: Style
- colorError :: Style
- colorNum :: Style
- colorRainbowParens :: [Style]
- defaultColorOptionsDarkBg :: ColorOptions
- defaultColorOptionsLightBg :: ColorOptions
- colorNull :: Style
- data Style = Style {
- styleColor :: Maybe (Color, Intensity)
- styleBold :: Bool
- styleItalic :: Bool
- styleUnderlined :: Bool
- color :: Intensity -> Color -> Style
- colorBold :: Intensity -> Color -> Style
- convertStyle :: Style -> AnsiStyle
Documentation
data ColorOptions Source #
These options are for colorizing the output of functions like pPrint
.
If you don't want to use a color for one of the options, use colorNull
.
Constructors
ColorOptions | |
Fields
|
Instances
Generic ColorOptions Source # | |||||
Defined in Text.Pretty.Simple.Internal.Color Associated Types
| |||||
Show ColorOptions Source # | |||||
Defined in Text.Pretty.Simple.Internal.Color Methods showsPrec :: Int -> ColorOptions -> ShowS show :: ColorOptions -> String showList :: [ColorOptions] -> ShowS | |||||
Eq ColorOptions Source # | |||||
Defined in Text.Pretty.Simple.Internal.Color | |||||
type Rep ColorOptions Source # | |||||
Defined in Text.Pretty.Simple.Internal.Color type Rep ColorOptions = D1 ('MetaData "ColorOptions" "Text.Pretty.Simple.Internal.Color" "pretty-simple-4.1.2.0-9hFgFUEPesw3HROw4RgdZL" 'False) (C1 ('MetaCons "ColorOptions" 'PrefixI 'True) ((S1 ('MetaSel ('Just "colorQuote") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Style) :*: S1 ('MetaSel ('Just "colorString") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Style)) :*: (S1 ('MetaSel ('Just "colorError") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Style) :*: (S1 ('MetaSel ('Just "colorNum") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Style) :*: S1 ('MetaSel ('Just "colorRainbowParens") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Style]))))) |
defaultColorOptionsDarkBg :: ColorOptions Source #
Default color options for use on a dark background.
defaultColorOptionsLightBg :: ColorOptions Source #
Default color options for use on a light background.
Ways to style terminal output.
Constructors
Style | |
Fields
|
Instances
Generic Style Source # | |||||
Defined in Text.Pretty.Simple.Internal.Color Associated Types
| |||||
Show Style Source # | |||||
Eq Style Source # | |||||
type Rep Style Source # | |||||
Defined in Text.Pretty.Simple.Internal.Color type Rep Style = D1 ('MetaData "Style" "Text.Pretty.Simple.Internal.Color" "pretty-simple-4.1.2.0-9hFgFUEPesw3HROw4RgdZL" 'False) (C1 ('MetaCons "Style" 'PrefixI 'True) ((S1 ('MetaSel ('Just "styleColor") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (Color, Intensity))) :*: S1 ('MetaSel ('Just "styleBold") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)) :*: (S1 ('MetaSel ('Just "styleItalic") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "styleUnderlined") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)))) |
convertStyle :: Style -> AnsiStyle Source #