darkplaces-text-0.2.1: Parser for darkplaces colorful text

Safe HaskellNone
LanguageHaskell2010

DarkPlaces.Text

Synopsis

Documentation

newtype DPText a Source

Constructors

DPText [DPTextToken a] 

Instances

data DPTextToken a Source

Instances

Eq a => Eq (DPTextToken a) 
Show a => Show (DPTextToken a) 

data DPStreamState a Source

Constructors

DPStreamState 

Instances

Eq a => Eq (DPStreamState a) 
Show a => Show (DPStreamState a) 

stripColors :: DPText a -> DPText a Source

Removes colors from `DPText a`

hPrintDPText :: (Printable a, Eq a) => Handle -> DecodeFun ByteString a -> Bool -> ByteString -> IO () Source

Will print color message if first arg is True | or if handle is terminal device

printDPText :: (Printable a, Eq a) => DecodeFun ByteString a -> Bool -> ByteString -> IO () Source

hPutDPText :: (Printable a, Eq a) => Handle -> DPText a -> IO () Source

hPutDPTextLn :: (Printable a, Eq a) => Handle -> DPText a -> IO () Source

putDPText :: (Printable a, Eq a) => DPText a -> IO () Source

prints DPText to console using utf8 encoding

putDPTextLn :: (Printable a, Eq a) => DPText a -> IO () Source

same as putStrUtf but with newline break at the end