pretty-simple-4.0.0.0: pretty printer for data types with a 'Show' instance.
Copyright(c) Dennis Gosnell 2016
LicenseBSD-style (see LICENSE file)
Maintainercdep.illabout@gmail.com
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Text.Pretty.Simple.Internal.Color

Description

 
Synopsis

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

  • colorQuote :: Style

    Color to use for quote characters (") around strings.

  • colorString :: Style

    Color to use for strings.

  • colorError :: Style

    Color for errors, e.g. unmatched brackets.

  • colorNum :: Style

    Color to use for numbers.

  • colorRainbowParens :: [Style]

    A list of colors to use for rainbow parenthesis output. Use '[]' if you don't want rainbow parenthesis. Use just a single item if you want all the rainbow parenthesis to be colored the same.

Instances

Instances details
Eq ColorOptions Source # 
Instance details

Defined in Text.Pretty.Simple.Internal.Color

Show ColorOptions Source # 
Instance details

Defined in Text.Pretty.Simple.Internal.Color

Generic ColorOptions Source # 
Instance details

Defined in Text.Pretty.Simple.Internal.Color

Associated Types

type Rep ColorOptions :: Type -> Type #

type Rep ColorOptions Source # 
Instance details

Defined in Text.Pretty.Simple.Internal.Color

type Rep ColorOptions = D1 ('MetaData "ColorOptions" "Text.Pretty.Simple.Internal.Color" "pretty-simple-4.0.0.0-inplace" '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.

colorNull :: Style Source #

No styling.

data Style Source #

Ways to style terminal output.

Instances

Instances details
Eq Style Source # 
Instance details

Defined in Text.Pretty.Simple.Internal.Color

Methods

(==) :: Style -> Style -> Bool #

(/=) :: Style -> Style -> Bool #

Show Style Source # 
Instance details

Defined in Text.Pretty.Simple.Internal.Color

Methods

showsPrec :: Int -> Style -> ShowS #

show :: Style -> String #

showList :: [Style] -> ShowS #

Generic Style Source # 
Instance details

Defined in Text.Pretty.Simple.Internal.Color

Associated Types

type Rep Style :: Type -> Type #

Methods

from :: Style -> Rep Style x #

to :: Rep Style x -> Style #

type Rep Style Source # 
Instance details

Defined in Text.Pretty.Simple.Internal.Color

type Rep Style = D1 ('MetaData "Style" "Text.Pretty.Simple.Internal.Color" "pretty-simple-4.0.0.0-inplace" '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 #