email-header-0.4.1: Parsing and rendering of email and MIME headers
Network.Email.Header.Layout
Description
A layout that keeps track of line positions.
data Layout a Source #
An abstract type representing a lazy layout.
Defined in Network.Email.Header.Layout
Methods
(<>) :: Layout a -> Layout a -> Layout a #
sconcat :: NonEmpty (Layout a) -> Layout a #
stimes :: Integral b => b -> Layout a -> Layout a #
mempty :: Layout a #
mappend :: Layout a -> Layout a -> Layout a #
mconcat :: [Layout a] -> Layout a #
layout :: Monoid a => Int -> Layout a -> a Source #
Run a layout with an initial position.
span :: Monoid a => Int -> a -> Layout a Source #
Layout an element of a given length.
break :: Int -> Layout a Source #
Layout a new line and set the initial position.
position :: (Int -> Layout a) -> Layout a Source #
Use the current line position to produce a layout.
nicest :: Int -> Layout a -> Layout a -> Layout a Source #
Choose the first layout if the first line fits within the given length, and the second otherwise.