Safe Haskell | None |
---|---|
Language | Haskell2010 |
- newtype DPText a = DPText [DPTextToken a]
- data DPTextToken a
- data DecodeType
- data DPStreamState a = DPStreamState {
- streamLeft :: a
- streamColor :: DPTextToken a
- type BinStreamState = DPStreamState ByteString
- data PrintStreamArgs = PrintStreamArgs {}
- type BinaryDPText = DPText ByteString
- type DecodedDPText = DPText Text
- parseDPText :: ByteString -> BinaryDPText
- defaultStreamState :: BinStreamState
- defaultPrintStreamArgs :: PrintStreamArgs
- stripColors :: DPText a -> DPText a
- minimizeColors :: Eq a => DPText a -> DPText a
- simplifyColors :: DPText a -> DPText a
- hPrintDPText :: (Printable a, Eq a) => Handle -> DecodeFun ByteString a -> Bool -> ByteString -> IO ()
- printDPText :: (Printable a, Eq a) => DecodeFun ByteString a -> Bool -> ByteString -> IO ()
- hPrintStreamDPText :: Handle -> PrintStreamArgs -> ByteString -> IO BinStreamState
- printStreamDPText :: PrintStreamArgs -> ByteString -> IO BinStreamState
- hStreamEnd :: Handle -> Bool -> BinStreamState -> IO ()
- streamEnd :: Bool -> BinStreamState -> IO ()
- toUTF :: DecodeType -> BinaryDPText -> DecodedDPText
- toASCII :: DecodeType -> BinaryDPText -> DecodedDPText
- hSupportColors :: Handle -> IO Bool
- supportColors :: IO Bool
- hPutDPText :: (Printable a, Eq a) => Handle -> DPText a -> IO ()
- hPutDPTextLn :: (Printable a, Eq a) => Handle -> DPText a -> IO ()
- putDPText :: (Printable a, Eq a) => DPText a -> IO ()
- putDPTextLn :: (Printable a, Eq a) => DPText a -> IO ()
Documentation
DPText [DPTextToken a] |
data DPTextToken a Source
Eq a => Eq (DPTextToken a) | |
Show a => Show (DPTextToken a) |
data DecodeType Source
data DPStreamState a Source
DPStreamState | |
|
Eq a => Eq (DPStreamState a) | |
Show a => Show (DPStreamState a) |
data PrintStreamArgs Source
type BinaryDPText = DPText ByteString Source
type DecodedDPText = DPText Text Source
parseDPText :: ByteString -> BinaryDPText Source
convert lazy ByteString
to BinaryDPText
stripColors :: DPText a -> DPText a Source
Removes colors from `DPText a`
minimizeColors :: Eq a => DPText a -> DPText a Source
simplifyColors :: DPText a -> DPText a Source
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
hPrintStreamDPText :: Handle -> PrintStreamArgs -> ByteString -> IO BinStreamState Source
hStreamEnd :: Handle -> Bool -> BinStreamState -> IO () Source
streamEnd :: Bool -> BinStreamState -> IO () Source
toUTF :: DecodeType -> BinaryDPText -> DecodedDPText Source
toASCII :: DecodeType -> BinaryDPText -> DecodedDPText Source
hSupportColors :: Handle -> IO Bool 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