ghc-lib-parser-9.14.1.20251220: The GHC API, decoupled from GHC versions

Safe Haskell | Ignore
Language | GHC2021

GHC.Utils.Ppr.Colour

Synopsis

- newtype PprColour = PprColour {
  - renderColour :: String
  }
- renderColourAfresh :: PprColour -> String
- colCustom :: String -> PprColour
- colReset :: PprColour
- colBold :: PprColour
- colBlackFg :: PprColour
- colRedFg :: PprColour
- colGreenFg :: PprColour
- colYellowFg :: PprColour
- colBlueFg :: PprColour
- colMagentaFg :: PprColour
- colCyanFg :: PprColour
- colWhiteFg :: PprColour
- data Scheme = Scheme {
  - sHeader :: PprColour
  - sMessage :: PprColour
  - sWarning :: PprColour
  - sError :: PprColour
  - sFatal :: PprColour
  - sMargin :: PprColour
  }
- defaultScheme :: Scheme
- parseScheme :: String -> (OverridingBool, Scheme) -> (OverridingBool, Scheme)

# Documentation

newtype PprColour #

A colour/style for use with `coloured`.

Constructors

PprColour |
Fields renderColour :: String

#### Instances

Instances details

Monoid PprColour # | Allow colours to be combined (e.g. bold + red); In case of conflict, right side takes precedence.
Instance details Defined in GHC.Utils.Ppr.Colour Methods mempty :: PprColour # mappend :: PprColour -> PprColour -> PprColour # mconcat :: [PprColour] -> PprColour #
Semigroup PprColour # |
Instance details Defined in GHC.Utils.Ppr.Colour Methods (<>) :: PprColour -> PprColour -> PprColour # sconcat :: NonEmpty PprColour -> PprColour # stimes :: Integral b => b -> PprColour -> PprColour #

renderColourAfresh :: PprColour -> String #

colCustom :: String -> PprColour #

colReset :: PprColour #

colBold :: PprColour #

colBlackFg :: PprColour #

colRedFg :: PprColour #

colGreenFg :: PprColour #

colYellowFg :: PprColour #

colBlueFg :: PprColour #

colMagentaFg :: PprColour #

colCyanFg :: PprColour #

colWhiteFg :: PprColour #

data Scheme #

Constructors

Scheme |
Fields sHeader :: PprColour sMessage :: PprColour sWarning :: PprColour sError :: PprColour sFatal :: PprColour sMargin :: PprColour

defaultScheme :: Scheme #

parseScheme :: String -> (OverridingBool, Scheme) -> (OverridingBool, Scheme) #

Parse the colour scheme from a string (presumably from the `GHC_COLORS` environment variable).