rio-prettyprint-0.1.8.0: Pretty-printing for RIO

Safe Haskell | None
Language | Haskell2010

RIO.PrettyPrint.StylesUpdate

Synopsis

- newtype StylesUpdate = StylesUpdate {
  - stylesUpdate :: [(Style, StyleSpec)]
  }
- parseStylesUpdateFromString :: String -> StylesUpdate
- class HasStylesUpdate env where
  - stylesUpdateL :: Lens' env StylesUpdate

# Documentation

newtype StylesUpdate Source #

Updates to `Styles`

Constructors

StylesUpdate |

Fields

- stylesUpdate :: [(Style, StyleSpec)]

#### Instances

Instances details

FromJSON StylesUpdate Source # |
Instance details Defined in RIO.PrettyPrint.StylesUpdate Methods parseJSON :: Value -> Parser StylesUpdate Source # parseJSONList :: Value -> Parser [StylesUpdate] Source # omittedField :: Maybe StylesUpdate Source #
Monoid StylesUpdate Source # |
Instance details Defined in RIO.PrettyPrint.StylesUpdate Methods mempty :: StylesUpdate Source # mappend :: StylesUpdate -> StylesUpdate -> StylesUpdate Source # mconcat :: [StylesUpdate] -> StylesUpdate Source #
Semigroup StylesUpdate Source # | The first styles update overrides the second one.
Instance details Defined in RIO.PrettyPrint.StylesUpdate Methods (<>) :: StylesUpdate -> StylesUpdate -> StylesUpdate Source # sconcat :: NonEmpty StylesUpdate -> StylesUpdate Source # stimes :: Integral b => b -> StylesUpdate -> StylesUpdate Source #
Show StylesUpdate Source # |
Instance details Defined in RIO.PrettyPrint.StylesUpdate Methods showsPrec :: Int -> StylesUpdate -> ShowS Source # show :: StylesUpdate -> String Source # showList :: [StylesUpdate] -> ShowS Source #
Eq StylesUpdate Source # |
Instance details Defined in RIO.PrettyPrint.StylesUpdate Methods (==) :: StylesUpdate -> StylesUpdate -> Bool Source # (/=) :: StylesUpdate -> StylesUpdate -> Bool Source #
HasStylesUpdate StylesUpdate Source # |
Instance details Defined in RIO.PrettyPrint.StylesUpdate Methods stylesUpdateL :: Lens' StylesUpdate StylesUpdate Source #

parseStylesUpdateFromString :: String -> StylesUpdate Source #

Parse a string that is a colon-delimited sequence of key=value, where `key` is a style name and `value` is a semicolon-delimited list of `ANSI` SGR (Select Graphic Rendition) control codes (in decimal). Keys that are not present in `defaultStyles` are ignored. Items in the semicolon-delimited list that are not recognised as valid control codes are ignored.

class HasStylesUpdate env where Source #

Environment values with a styles update.

Since: 0.1.0.0

Methods

stylesUpdateL :: Lens' env StylesUpdate Source #

#### Instances

Instances details

HasStylesUpdate SimplePrettyApp Source # |
Instance details Defined in RIO.PrettyPrint.Simple Methods stylesUpdateL :: Lens' SimplePrettyApp StylesUpdate Source #
HasStylesUpdate StylesUpdate Source # |
Instance details Defined in RIO.PrettyPrint.StylesUpdate Methods stylesUpdateL :: Lens' StylesUpdate StylesUpdate Source #