module Text.Colour
(
chunk,
Chunk (..),
fore,
back,
bold,
faint,
italic,
underline,
doubleUnderline,
noUnderline,
slowBlinking,
rapidBlinking,
noBlinking,
Colour (..),
black,
red,
green,
yellow,
blue,
magenta,
cyan,
white,
brightBlack,
brightRed,
brightGreen,
brightYellow,
brightBlue,
brightMagenta,
brightCyan,
brightWhite,
color256,
colour256,
colorRGB,
colourRGB,
renderChunksUtf8BS,
renderChunkUtf8BS,
renderChunksUtf8BSBuilder,
renderChunkUtf8BSBuilder,
renderChunksText,
renderChunkText,
renderChunksLazyText,
renderChunkLazyText,
renderChunksBuilder,
renderChunkBuilder,
renderChunksBS,
renderChunkBS,
renderChunks,
renderChunk,
TerminalCapabilities (..),
putChunksUtf8With,
putChunksLocaleWith,
hPutChunksUtf8With,
hPutChunksLocaleWith,
putChunksWith,
hPutChunksWith,
)
where
import qualified Data.ByteString.Builder as SBB
import qualified Data.Text.IO as TIO
import System.IO
import Text.Colour.Capabilities
import Text.Colour.Chunk
putChunksUtf8With :: TerminalCapabilities -> [Chunk] -> IO ()
putChunksUtf8With :: TerminalCapabilities -> [Chunk] -> IO ()
putChunksUtf8With TerminalCapabilities
tc = TerminalCapabilities -> Handle -> [Chunk] -> IO ()
hPutChunksUtf8With TerminalCapabilities
tc Handle
stdout
putChunksLocaleWith :: TerminalCapabilities -> [Chunk] -> IO ()
putChunksLocaleWith :: TerminalCapabilities -> [Chunk] -> IO ()
putChunksLocaleWith TerminalCapabilities
tc = TerminalCapabilities -> Handle -> [Chunk] -> IO ()
hPutChunksWith TerminalCapabilities
tc Handle
stdout
putChunksWith :: TerminalCapabilities -> [Chunk] -> IO ()
putChunksWith :: TerminalCapabilities -> [Chunk] -> IO ()
putChunksWith = TerminalCapabilities -> [Chunk] -> IO ()
putChunksUtf8With
{-# DEPRECATED putChunksWith "Use putChunksLocaleWith, or putChunksUtf8With if you must." #-}
hPutChunksUtf8With :: TerminalCapabilities -> Handle -> [Chunk] -> IO ()
hPutChunksUtf8With :: TerminalCapabilities -> Handle -> [Chunk] -> IO ()
hPutChunksUtf8With TerminalCapabilities
tc Handle
h [Chunk]
cs = Handle -> Builder -> IO ()
SBB.hPutBuilder Handle
h (Builder -> IO ()) -> Builder -> IO ()
forall a b. (a -> b) -> a -> b
$ TerminalCapabilities -> [Chunk] -> Builder
forall (f :: * -> *).
Foldable f =>
TerminalCapabilities -> f Chunk -> Builder
renderChunksUtf8BSBuilder TerminalCapabilities
tc [Chunk]
cs
hPutChunksLocaleWith :: TerminalCapabilities -> Handle -> [Chunk] -> IO ()
hPutChunksLocaleWith :: TerminalCapabilities -> Handle -> [Chunk] -> IO ()
hPutChunksLocaleWith TerminalCapabilities
tc Handle
h [Chunk]
cs = Handle -> Text -> IO ()
TIO.hPutStr Handle
h (Text -> IO ()) -> Text -> IO ()
forall a b. (a -> b) -> a -> b
$ TerminalCapabilities -> [Chunk] -> Text
forall (f :: * -> *).
Foldable f =>
TerminalCapabilities -> f Chunk -> Text
renderChunksText TerminalCapabilities
tc [Chunk]
cs
hPutChunksWith :: TerminalCapabilities -> Handle -> [Chunk] -> IO ()
hPutChunksWith :: TerminalCapabilities -> Handle -> [Chunk] -> IO ()
hPutChunksWith = TerminalCapabilities -> Handle -> [Chunk] -> IO ()
hPutChunksUtf8With
{-# DEPRECATED hPutChunksWith "Use hPutChunksLocaleWith, or hPutChunksUtf8With if you must." #-}