-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Produce nice human-readable HTML -- -- An HTML-building library that gives you some control over how the HTML -- is rendered, to produce human-readable results. @package pretty-html @version 0.1.0.0 -- | Text elements and attribute values are escaped. Tag names, attribute -- keys, and comments are neither escaped nor validated; it is possible -- to construct malformed documents. -- -- Build an Html value using tag, tag', attr, -- attr', text, comment, and inline. Then use -- runHtml to get a TextBuilder. -- -- Html has a Monoid instance. It is often more convenient -- to apply fold a list literal than to chain the -- (<>) operator. You can use mempty when you need an -- HTML tag with an empty body. module PrettyHTML data Html runHtml :: Html -> TextBuilder -- | Element with opening and closing tags. tag :: Foldable t => LazyText -> t Attr -> Html -> Html -- | Self-closing tag, e.g. "meta", "br", "li". tag' :: Foldable t => LazyText -> t Attr -> Html -- | See attr and attr'. type Attr = (LazyText, Maybe LazyText) -- | Attribute with a key and value. attr :: LazyText -> LazyText -> Attr -- | Attribute without a value, e.g. "autofocus", "checked". attr' :: LazyText -> Attr -- | A text element. text :: LazyText -> Html -- | A comment appears in the HTML source code but is ignored when read. comment :: LazyText -> Html -- | Content wrapped in inline is rendered tersely, without line -- breaks and indentation. -- -- Typically paragraphs should be rendered inline, e.g. inline -- (tag "p" [] $ fold [ _, _, _ ]) inline :: Html -> Html type LazyText = Text type TextBuilder = Builder instance GHC.Base.Semigroup PrettyHTML.Html instance GHC.Base.Monoid PrettyHTML.Html