aivika-experiment-5.1: Simulation experiments for the Aivika library

CopyrightCopyright (c) 2012-2017 David Sorokin <david.sorokin@gmail.com>
LicenseBSD3
MaintainerDavid Sorokin <david.sorokin@gmail.com>
Stabilityexperimental
Safe HaskellSafe
LanguageHaskell98

Simulation.Aivika.Experiment.Base.HtmlWriter

Description

Tested with: GHC 8.0.1

This is an utility module that provides an HTML writer.

Synopsis

Documentation

data HtmlWriter a Source #

It writes fast an HTML code.

runHtmlWriter :: HtmlWriter a -> ShowS -> ExperimentWriter (a, ShowS) Source #

Run the HTML writer monad.

composeHtml :: ShowS -> HtmlWriter () Source #

Compose the HTML applying the corresponded transformation.

writeHtml :: String -> HtmlWriter () Source #

Write the HTML code.

writeHtmlLn :: String -> HtmlWriter () Source #

Write the HTML code.

writeHtmlText :: String -> HtmlWriter () Source #

Write the text in HTML.

writeHtmlParagraph :: HtmlWriter () -> HtmlWriter () Source #

Write the <p> element with the specified contents.

writeHtmlParagraphWithId :: String -> HtmlWriter () -> HtmlWriter () Source #

Write the <p> element with the specified id and contents.

writeHtmlHeader1 :: HtmlWriter () -> HtmlWriter () Source #

Write the <h1> element with the specified contents.

writeHtmlHeader1WithId :: String -> HtmlWriter () -> HtmlWriter () Source #

Write the <h1> element with the specified id and contents.

writeHtmlHeader2 :: HtmlWriter () -> HtmlWriter () Source #

Write the <h2> element with the specified contents.

writeHtmlHeader2WithId :: String -> HtmlWriter () -> HtmlWriter () Source #

Write the <h2> element with the specified id and contents.

writeHtmlHeader3 :: HtmlWriter () -> HtmlWriter () Source #

Write the <h3> element with the specified contents.

writeHtmlHeader3WithId :: String -> HtmlWriter () -> HtmlWriter () Source #

Write the <h3> element with the specified id and contents.

writeHtmlHeader4 :: HtmlWriter () -> HtmlWriter () Source #

Write the <h4> element with the specified contents.

writeHtmlHeader4WithId :: String -> HtmlWriter () -> HtmlWriter () Source #

Write the <h4> element with the specified id and contents.

writeHtmlHeader5 :: HtmlWriter () -> HtmlWriter () Source #

Write the <h5> element with the specified contents.

writeHtmlHeader5WithId :: String -> HtmlWriter () -> HtmlWriter () Source #

Write the <h5> element with the specified id and contents.

writeHtmlHeader6 :: HtmlWriter () -> HtmlWriter () Source #

Write the <h6> element with the specified contents.

writeHtmlHeader6WithId :: String -> HtmlWriter () -> HtmlWriter () Source #

Write the <h6> element with the specified id and contents.

writeHtmlBreak :: HtmlWriter () Source #

Write the <br> element.

writeHtmlLink :: String -> HtmlWriter () -> HtmlWriter () Source #

Write the HTML link with the specified URI and contents.

writeHtmlImage :: String -> HtmlWriter () Source #

Write the HTML image with the specified URI.

writeHtmlList :: HtmlWriter () -> HtmlWriter () Source #

Write the list of items wrapped in <ul>.

writeHtmlListItem :: HtmlWriter () -> HtmlWriter () Source #

Write the item list wrapped in <li>.

writeHtmlDocumentWithTitle :: String -> HtmlWriter () -> HtmlWriter () Source #

Write the HTML document with the specified title and contents

encodeHtmlText :: String -> String Source #

Escape special HTML characters in the String. It is based on one function from package Web-Encodings, which is licensed under BSD3 but obsolete now.