email-header-0.4.0: Parsing and rendering of email and MIME headers

Safe HaskellSafe
LanguageHaskell98

Network.Email.Header.Layout

Description

A layout that keeps track of line positions.

Synopsis

Documentation

data Layout a Source #

An abstract type representing a lazy layout.

Instances

Monoid (Layout a) Source # 

Methods

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.