Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
- class ToBytes a where
- data Msg
- msg :: ToBytes a => a -> Msg -> Msg
- field :: ToBytes a => ByteString -> a -> Msg -> Msg
- (.=) :: ToBytes a => ByteString -> a -> Msg -> Msg
- (+++) :: (ToBytes a, ToBytes b) => a -> b -> Builder
- (~~) :: (b -> c) -> (a -> b) -> a -> c
- val :: ByteString -> Builder
- render :: ByteString -> (Msg -> Msg) -> ByteString
Documentation
Convert some value to a Builder
.
field :: ToBytes a => ByteString -> a -> Msg -> Msg Source
Render some field, i.e. a key-value pair delimited by "=".
val :: ByteString -> Builder Source
Type restriction. Useful to disambiguate string literals when
using OverloadedStrings
pragma.
render :: ByteString -> (Msg -> Msg) -> ByteString Source
Intersperse parts of the log message with the given delimiter and
render the whole builder into a ByteString
.