xhtml-3000.2.2: An XHTML combinator library

Safe HaskellSafe
LanguageHaskell2010

Text.XHtml.Frameset

Contents

Description

Produces XHTML 1.0 Frameset.

Synopsis

Data types

data Html Source #

Instances
Show Html # 
Instance details
Semigroup Html #

Since: 3000.2.2

Instance details
Monoid Html # 
Instance details
CHANGEATTRS Html # 
Instance details

Methods

changeAttrs :: Html -> ([HtmlAttr] -> [HtmlAttr]) -> Html Source #

ADDATTRS Html # 
Instance details

Methods

(!) :: Html -> [HtmlAttr] -> Html Source #

HTML Html # 
Instance details
HTMLTABLE Html # 
Instance details

Methods

cell :: Html -> HtmlTable Source #

data HtmlAttr Source #

Attributes with name and value.

Instances
Show HtmlAttr # 
Instance details

Classes

class HTML a where Source #

HTML is the class of things that can be validly put inside an HTML tag. So this can be one or more Html elements, or a String, for example.

Minimal complete definition

toHtml

Methods

toHtml :: a -> Html Source #

toHtmlFromList :: [a] -> Html Source #

Instances
HTML Char # 
Instance details
HTML Html # 
Instance details
HTML HotLink # 
Instance details
HTML HtmlTable # 
Instance details
HTML HtmlTree # 
Instance details
HTML a => HTML [a] # 
Instance details

Methods

toHtml :: [a] -> Html Source #

toHtmlFromList :: [[a]] -> Html Source #

HTML a => HTML (Maybe a) # 
Instance details

class ADDATTRS a where Source #

Minimal complete definition

(!)

Methods

(!) :: a -> [HtmlAttr] -> a infixl 8 Source #

Instances
ADDATTRS Html # 
Instance details

Methods

(!) :: Html -> [HtmlAttr] -> Html Source #

ADDATTRS HotLink # 
Instance details

Methods

(!) :: HotLink -> [HtmlAttr] -> HotLink Source #

ADDATTRS b => ADDATTRS (a -> b) # 
Instance details

Methods

(!) :: (a -> b) -> [HtmlAttr] -> a -> b Source #

class CHANGEATTRS a where Source #

CHANGEATTRS is a more expressive alternative to ADDATTRS

Minimal complete definition

changeAttrs

Methods

changeAttrs :: a -> ([HtmlAttr] -> [HtmlAttr]) -> a Source #

Instances
CHANGEATTRS Html # 
Instance details

Methods

changeAttrs :: Html -> ([HtmlAttr] -> [HtmlAttr]) -> Html Source #

CHANGEATTRS b => CHANGEATTRS (a -> b) # 
Instance details

Methods

changeAttrs :: (a -> b) -> ([HtmlAttr] -> [HtmlAttr]) -> a -> b Source #

Primitives and basic combinators

(<<) infixr 7 Source #

Arguments

:: HTML a 
=> (Html -> b)

Parent

-> a

Child

-> b 

Put something inside an HTML element.

concatHtml :: HTML a => [a] -> Html Source #

(+++) :: (HTML a, HTML b) => a -> b -> Html infixr 2 Source #

Create a piece of HTML which is the concatenation of two things which can be made into HTML.

noHtml :: Html Source #

An empty piece of HTML.

isNoHtml :: Html -> Bool Source #

Checks whether the given piece of HTML is empty.

tag Source #

Arguments

:: String

Element name

-> Html

Element contents

-> Html 

Constructs an element with a custom name.

itag :: String -> Html Source #

Constructs an element with a custom name, and without any children.

primHtml :: String -> Html Source #

This is not processed for special chars. use stringToHtml or lineToHtml instead, for user strings, because they understand special chars, like <.

Rendering

showHtml :: HTML html => html -> String Source #

Output the HTML without adding newlines or spaces within the markup. This should be the most time and space efficient way to render HTML, though the ouput is quite unreadable.

renderHtml :: HTML html => html -> String Source #

Outputs indented HTML. Because space matters in HTML, the output is quite messy.

prettyHtml :: HTML html => html -> String Source #

Outputs indented HTML, with indentation inside elements. This can change the meaning of the HTML document, and is mostly useful for debugging the HTML output. The implementation is inefficient, and you are normally better off using showHtml or renderHtml.

showHtmlFragment :: HTML html => html -> String Source #

Render a piece of HTML without adding a DOCTYPE declaration or root element. Does not add any extra whitespace.

renderHtmlFragment :: HTML html => html -> String Source #

Render a piece of indented HTML without adding a DOCTYPE declaration or root element. Only adds whitespace where it does not change the meaning of the document.

prettyHtmlFragment :: HTML html => html -> String Source #

Render a piece of indented HTML without adding a DOCTYPE declaration or a root element. The indentation is done inside elements. This can change the meaning of the HTML document, and is mostly useful for debugging the HTML output. The implementation is inefficient, and you are normally better off using showHtmlFragment or renderHtmlFragment.

stringToHtml :: String -> Html Source #

Convert a String to Html, converting characters that need to be escaped to HTML entities.

lineToHtml :: String -> Html Source #

This converts a string, but keeps spaces as non-line-breakable.

linesToHtml :: [String] -> Html Source #

This converts a string, but keeps spaces as non-line-breakable, and adds line breaks between each of the strings in the input list.

copyright :: Html Source #

Copyright sign.

spaceHtml :: Html Source #

Non-breaking space.

p :: Html -> Html Source #

Same as paragraph.

data HotLink Source #

ordList :: HTML a => [a] -> Html Source #

unordList :: HTML a => [a] -> Html Source #

defList :: (HTML a, HTML b) => [(a, b)] -> Html Source #

menu :: String -> [Html] -> Html Source #

Deprecated: menu generates strange XHTML, and is not flexible enough. Roll your own that suits your needs.