Safe Haskell | None |
---|---|
Language | Haskell2010 |
Control.Monad.Log.Extra
Contents
Synopsis
- module Control.Monad.Log
- module Control.Monad.Log.Extra.File
- module Control.Monad.Log.Extra.Handler
- data Doc ann
Batteries
module Control.Monad.Log
module Control.Monad.Log.Extra.File
Re-exports
The abstract data type
represents pretty documents that have
been annotated with data of type Doc
annann
.
More specifically, a value of type
represents a non-empty set of
possible layouts of a document. The layout functions select one of these
possibilities, taking into account things like the width of the output
document.Doc
The annotation is an arbitrary piece of data associated with (part of) a document. Annotations may be used by the rendering backends in order to display output differently, such as
- color information (e.g. when rendering to the terminal)
- mouseover text (e.g. when rendering to rich HTML)
- whether to show something or not (to allow simple or detailed versions)
The simplest way to display a Doc
is via the Show
class.
>>>
putStrLn (show (vsep ["hello", "world"]))
hello world