safe-coloured-text-0.2.0.1: Safely output coloured text
Safe HaskellNone
LanguageHaskell2010

Text.Colour.Chunk

Synopsis

Documentation

data Chunk Source #

Instances

Instances details
Eq Chunk Source # 
Instance details

Defined in Text.Colour.Chunk

Methods

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

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

Show Chunk Source # 
Instance details

Defined in Text.Colour.Chunk

Methods

showsPrec :: Int -> Chunk -> ShowS #

show :: Chunk -> String #

showList :: [Chunk] -> ShowS #

IsString Chunk Source # 
Instance details

Defined in Text.Colour.Chunk

Methods

fromString :: String -> Chunk #

Generic Chunk Source # 
Instance details

Defined in Text.Colour.Chunk

Associated Types

type Rep Chunk :: Type -> Type #

Methods

from :: Chunk -> Rep Chunk x #

to :: Rep Chunk x -> Chunk #

Validity Chunk Source # 
Instance details

Defined in Text.Colour.Chunk

Methods

validate :: Chunk -> Validation #

type Rep Chunk Source # 
Instance details

Defined in Text.Colour.Chunk

type Rep Chunk = D1 ('MetaData "Chunk" "Text.Colour.Chunk" "safe-coloured-text-0.2.0.1-5GFg0gc5PUEESE1K2b92mc" 'False) (C1 ('MetaCons "Chunk" 'PrefixI 'True) ((S1 ('MetaSel ('Just "chunkText") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: (S1 ('MetaSel ('Just "chunkItalic") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "chunkConsoleIntensity") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe ConsoleIntensity)))) :*: ((S1 ('MetaSel ('Just "chunkUnderlining") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Underlining)) :*: S1 ('MetaSel ('Just "chunkBlinking") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Blinking))) :*: (S1 ('MetaSel ('Just "chunkForeground") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Colour)) :*: S1 ('MetaSel ('Just "chunkBackground") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Colour))))))

renderChunksUtf8BS :: Foldable f => TerminalCapabilities -> f Chunk -> ByteString Source #

Render chunks directly to a UTF8-encoded Bytestring.

renderChunksBS :: Foldable f => TerminalCapabilities -> f Chunk -> ByteString Source #

Deprecated: Use renderChunksText, or renderChunksUtf8BS if you must.

Deprecated synonym for renderChunksUtf8BS

renderChunks :: Foldable f => TerminalCapabilities -> f Chunk -> Builder Source #

Deprecated: Use renderChunksBuilder, or renderChunksUtf8BSBuilder if you must.

Deprecated synonym for renderChunksUtf8BSBuilder

renderChunksText :: Foldable f => TerminalCapabilities -> f Chunk -> Text Source #

Render chunks directly to strict Text.

renderChunksLazyText :: Foldable f => TerminalCapabilities -> f Chunk -> Text Source #

Render chunks directly to lazy Text.

renderChunkUtf8BS :: TerminalCapabilities -> Chunk -> ByteString Source #

Render a chunk directly to a UTF8-encoded Bytestring.

renderChunkBS :: TerminalCapabilities -> Chunk -> ByteString Source #

Deprecated: Use renderChunkText, or renderChunkUtf8BS if you must.

Deprecated synonym for renderChunkUtf8BS

renderChunkUtf8BSBuilder :: TerminalCapabilities -> Chunk -> Builder Source #

Render a chunk directly to a UTF8-encoded Bytestring Builder.

renderChunk :: TerminalCapabilities -> Chunk -> Builder Source #

Deprecated: Use renderChunkBuilder, or renderChunkUtf8BSBuilder if you must.

Deprecated synonym for renderChunkUtf8BSBuilder

renderChunkText :: TerminalCapabilities -> Chunk -> Text Source #

Render a chunk directly to strict Text.

renderChunkLazyText :: TerminalCapabilities -> Chunk -> Text Source #

Render a chunk directly to strict Text.

chunk :: Text -> Chunk Source #

Turn a text into a plain chunk, without any styling

data Colour Source #

Instances

Instances details
Eq Colour Source # 
Instance details

Defined in Text.Colour.Chunk

Methods

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

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

Show Colour Source # 
Instance details

Defined in Text.Colour.Chunk

Generic Colour Source # 
Instance details

Defined in Text.Colour.Chunk

Associated Types

type Rep Colour :: Type -> Type #

Methods

from :: Colour -> Rep Colour x #

to :: Rep Colour x -> Colour #

Validity Colour Source # 
Instance details

Defined in Text.Colour.Chunk

type Rep Colour Source # 
Instance details

Defined in Text.Colour.Chunk

colour256 :: Word8 -> Colour Source #

Bulid an 8-bit RGB Colour

This will not be rendered unless With8BitColours is used.

color256 :: Word8 -> Colour Source #

Alias for colour256, bloody americans...

colourRGB :: Word8 -> Word8 -> Word8 -> Colour Source #

Bulid a 24-bit RGB Colour

This will not be rendered unless With24BitColours is used.

colorRGB :: Word8 -> Word8 -> Word8 -> Colour Source #

Alias for colourRGB, bloody americans...