Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- type LazyByteString = ByteString
- type Builder = Builder
- type Printer' = StateT (TellAhead, Builder) (Either String)
- data TellAhead
- newtype Printer x a = Printer {
- runPrinter :: ReaderT x Printer' a
- unparse :: Printer x a -> x -> Either String LazyByteString
- unparse' :: Printer x a -> x -> Either String (LazyByteString, a)
- star :: (x -> Printer' a) -> Printer x a
- star' :: (a -> Printer' ()) -> Printer a a
- tell :: (Maybe Word8 -> Bool) -> TellAhead
- tellWord8 :: Word8 -> TellAhead
- tellSatisfy :: (Word8 -> Bool) -> TellAhead
- tellUnsatisfy :: (Word8 -> Bool) -> TellAhead
- tellEof :: TellAhead
- say :: TellAhead -> Printer' ()
- see :: ByteString -> Printer' ()
- seeLazyBS :: LazyByteString -> Printer' ()
- seeWord8 :: Word8 -> Printer' ()
- check :: Word8 -> Printer' ()
- seeEof :: Printer' ()
Documentation
type LazyByteString = ByteString Source #
A streaming predicate on a ByteString, read character by character.
Returns Nothing
when it is no longer satisfied.
TellTrue
allows to simplify TellAhead
values to keep a reduced
complexity.
Printer | |
|
Instances
see :: ByteString -> Printer' () Source #
seeLazyBS :: LazyByteString -> Printer' () Source #