Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Produces XHTML 1.0 Transitional.
Synopsis
- data Html
- data HtmlAttr
- class HTML a where
- class ADDATTRS a where
- class CHANGEATTRS a where
- (<<) :: HTML a => (Html -> b) -> a -> b
- concatHtml :: HTML a => [a] -> Html
- (+++) :: (HTML a, HTML b) => a -> b -> Html
- noHtml :: Html
- isNoHtml :: Html -> Bool
- tag :: String -> Html -> Html
- itag :: String -> Html
- htmlAttrPair :: HtmlAttr -> (String, String)
- emptyAttr :: String -> HtmlAttr
- intAttr :: String -> Int -> HtmlAttr
- strAttr :: String -> String -> HtmlAttr
- htmlAttr :: String -> Html -> HtmlAttr
- primHtml :: String -> Html
- showHtml :: HTML html => html -> String
- renderHtml :: HTML html => html -> String
- prettyHtml :: HTML html => html -> String
- showHtmlFragment :: HTML html => html -> String
- renderHtmlFragment :: HTML html => html -> String
- prettyHtmlFragment :: HTML html => html -> String
- abbr :: Html -> Html
- acronym :: Html -> Html
- address :: Html -> Html
- anchor :: Html -> Html
- area :: Html
- bdo :: Html -> Html
- big :: Html -> Html
- blockquote :: Html -> Html
- body :: Html -> Html
- bold :: Html -> Html
- br :: Html
- button :: Html -> Html
- caption :: Html -> Html
- cite :: Html -> Html
- col :: Html -> Html
- colgroup :: Html -> Html
- del :: Html -> Html
- ddef :: Html -> Html
- define :: Html -> Html
- dlist :: Html -> Html
- dterm :: Html -> Html
- emphasize :: Html -> Html
- fieldset :: Html -> Html
- form :: Html -> Html
- h1 :: Html -> Html
- h2 :: Html -> Html
- h3 :: Html -> Html
- h4 :: Html -> Html
- h5 :: Html -> Html
- h6 :: Html -> Html
- header :: Html -> Html
- hr :: Html
- image :: Html
- input :: Html
- ins :: Html -> Html
- italics :: Html -> Html
- keyboard :: Html -> Html
- label :: Html -> Html
- legend :: Html -> Html
- li :: Html -> Html
- meta :: Html
- noscript :: Html -> Html
- object :: Html -> Html
- olist :: Html -> Html
- optgroup :: Html -> Html
- option :: Html -> Html
- paragraph :: Html -> Html
- param :: Html
- pre :: Html -> Html
- quote :: Html -> Html
- sample :: Html -> Html
- script :: Html -> Html
- select :: Html -> Html
- small :: Html -> Html
- strong :: Html -> Html
- style :: Html -> Html
- sub :: Html -> Html
- sup :: Html -> Html
- table :: Html -> Html
- tbody :: Html -> Html
- td :: Html -> Html
- textarea :: Html -> Html
- tfoot :: Html -> Html
- th :: Html -> Html
- thead :: Html -> Html
- thebase :: Html
- thecode :: Html -> Html
- thediv :: Html -> Html
- thehtml :: Html -> Html
- thelink :: Html -> Html
- themap :: Html -> Html
- thespan :: Html -> Html
- thetitle :: Html -> Html
- tr :: Html -> Html
- tt :: Html -> Html
- ulist :: Html -> Html
- variable :: Html -> Html
- abbr :: Html -> Html
- acronym :: Html -> Html
- address :: Html -> Html
- anchor :: Html -> Html
- area :: Html
- bdo :: Html -> Html
- big :: Html -> Html
- blockquote :: Html -> Html
- body :: Html -> Html
- bold :: Html -> Html
- button :: Html -> Html
- br :: Html
- caption :: Html -> Html
- cite :: Html -> Html
- col :: Html -> Html
- colgroup :: Html -> Html
- ddef :: Html -> Html
- define :: Html -> Html
- del :: Html -> Html
- dlist :: Html -> Html
- dterm :: Html -> Html
- emphasize :: Html -> Html
- fieldset :: Html -> Html
- form :: Html -> Html
- h1 :: Html -> Html
- h2 :: Html -> Html
- h3 :: Html -> Html
- h4 :: Html -> Html
- h5 :: Html -> Html
- h6 :: Html -> Html
- header :: Html -> Html
- hr :: Html
- image :: Html
- input :: Html
- ins :: Html -> Html
- italics :: Html -> Html
- keyboard :: Html -> Html
- label :: Html -> Html
- legend :: Html -> Html
- li :: Html -> Html
- meta :: Html
- noscript :: Html -> Html
- object :: Html -> Html
- olist :: Html -> Html
- optgroup :: Html -> Html
- option :: Html -> Html
- paragraph :: Html -> Html
- param :: Html
- pre :: Html -> Html
- quote :: Html -> Html
- sample :: Html -> Html
- script :: Html -> Html
- select :: Html -> Html
- small :: Html -> Html
- strong :: Html -> Html
- style :: Html -> Html
- sub :: Html -> Html
- sup :: Html -> Html
- table :: Html -> Html
- tbody :: Html -> Html
- td :: Html -> Html
- textarea :: Html -> Html
- tfoot :: Html -> Html
- th :: Html -> Html
- thead :: Html -> Html
- thebase :: Html
- thecode :: Html -> Html
- thediv :: Html -> Html
- thehtml :: Html -> Html
- thelink :: Html -> Html
- themap :: Html -> Html
- thespan :: Html -> Html
- thetitle :: Html -> Html
- tr :: Html -> Html
- tt :: Html -> Html
- ulist :: Html -> Html
- variable :: Html -> Html
- frame :: Html -> Html
- frame :: Html -> Html
- frameset :: Html -> Html
- frameset :: Html -> Html
- noframes :: Html -> Html
- noframes :: Html -> Html
- applet :: Html -> Html
- applet :: Html -> Html
- basefont :: Html
- basefont :: Html
- center :: Html -> Html
- center :: Html -> Html
- dir :: Html -> Html
- dir :: Html -> Html
- font :: Html -> Html
- font :: Html -> Html
- iframe :: Html -> Html
- iframe :: Html -> Html
- isindex :: Html
- isindex :: Html
- themenu :: Html -> Html
- themenu :: Html -> Html
- strike :: Html -> Html
- strike :: Html -> Html
- underline :: Html -> Html
- underline :: Html -> Html
- action :: String -> HtmlAttr
- align :: String -> HtmlAttr
- alt :: String -> HtmlAttr
- altcode :: String -> HtmlAttr
- archive :: String -> HtmlAttr
- base :: String -> HtmlAttr
- border :: Int -> HtmlAttr
- bordercolor :: String -> HtmlAttr
- cellpadding :: Int -> HtmlAttr
- cellspacing :: Int -> HtmlAttr
- checked :: HtmlAttr
- codebase :: String -> HtmlAttr
- cols :: String -> HtmlAttr
- colspan :: Int -> HtmlAttr
- content :: String -> HtmlAttr
- coords :: String -> HtmlAttr
- disabled :: HtmlAttr
- enctype :: String -> HtmlAttr
- height :: String -> HtmlAttr
- href :: String -> HtmlAttr
- hreflang :: String -> HtmlAttr
- httpequiv :: String -> HtmlAttr
- identifier :: String -> HtmlAttr
- ismap :: HtmlAttr
- lang :: String -> HtmlAttr
- maxlength :: Int -> HtmlAttr
- method :: String -> HtmlAttr
- multiple :: HtmlAttr
- name :: String -> HtmlAttr
- nohref :: HtmlAttr
- rel :: String -> HtmlAttr
- rev :: String -> HtmlAttr
- rows :: String -> HtmlAttr
- rowspan :: Int -> HtmlAttr
- rules :: String -> HtmlAttr
- selected :: HtmlAttr
- shape :: String -> HtmlAttr
- size :: String -> HtmlAttr
- src :: String -> HtmlAttr
- theclass :: String -> HtmlAttr
- thefor :: String -> HtmlAttr
- thestyle :: String -> HtmlAttr
- thetype :: String -> HtmlAttr
- title :: String -> HtmlAttr
- usemap :: String -> HtmlAttr
- valign :: String -> HtmlAttr
- value :: String -> HtmlAttr
- width :: String -> HtmlAttr
- action :: String -> HtmlAttr
- align :: String -> HtmlAttr
- alt :: String -> HtmlAttr
- altcode :: String -> HtmlAttr
- archive :: String -> HtmlAttr
- base :: String -> HtmlAttr
- border :: Int -> HtmlAttr
- bordercolor :: String -> HtmlAttr
- cellpadding :: Int -> HtmlAttr
- cellspacing :: Int -> HtmlAttr
- checked :: HtmlAttr
- codebase :: String -> HtmlAttr
- cols :: String -> HtmlAttr
- colspan :: Int -> HtmlAttr
- content :: String -> HtmlAttr
- coords :: String -> HtmlAttr
- disabled :: HtmlAttr
- enctype :: String -> HtmlAttr
- height :: String -> HtmlAttr
- href :: String -> HtmlAttr
- hreflang :: String -> HtmlAttr
- httpequiv :: String -> HtmlAttr
- identifier :: String -> HtmlAttr
- ismap :: HtmlAttr
- lang :: String -> HtmlAttr
- maxlength :: Int -> HtmlAttr
- method :: String -> HtmlAttr
- multiple :: HtmlAttr
- name :: String -> HtmlAttr
- nohref :: HtmlAttr
- rel :: String -> HtmlAttr
- rev :: String -> HtmlAttr
- rows :: String -> HtmlAttr
- rowspan :: Int -> HtmlAttr
- rules :: String -> HtmlAttr
- selected :: HtmlAttr
- shape :: String -> HtmlAttr
- size :: String -> HtmlAttr
- src :: String -> HtmlAttr
- theclass :: String -> HtmlAttr
- thefor :: String -> HtmlAttr
- thestyle :: String -> HtmlAttr
- thetype :: String -> HtmlAttr
- title :: String -> HtmlAttr
- usemap :: String -> HtmlAttr
- valign :: String -> HtmlAttr
- value :: String -> HtmlAttr
- width :: String -> HtmlAttr
- frameborder :: Int -> HtmlAttr
- frameborder :: Int -> HtmlAttr
- marginheight :: Int -> HtmlAttr
- marginheight :: Int -> HtmlAttr
- marginwidth :: Int -> HtmlAttr
- marginwidth :: Int -> HtmlAttr
- noresize :: HtmlAttr
- noresize :: HtmlAttr
- scrolling :: String -> HtmlAttr
- scrolling :: String -> HtmlAttr
- alink :: String -> HtmlAttr
- alink :: String -> HtmlAttr
- background :: String -> HtmlAttr
- background :: String -> HtmlAttr
- bgcolor :: String -> HtmlAttr
- bgcolor :: String -> HtmlAttr
- clear :: String -> HtmlAttr
- clear :: String -> HtmlAttr
- code :: String -> HtmlAttr
- code :: String -> HtmlAttr
- color :: String -> HtmlAttr
- color :: String -> HtmlAttr
- compact :: HtmlAttr
- compact :: HtmlAttr
- face :: String -> HtmlAttr
- face :: String -> HtmlAttr
- hspace :: Int -> HtmlAttr
- hspace :: Int -> HtmlAttr
- link :: String -> HtmlAttr
- link :: String -> HtmlAttr
- noshade :: HtmlAttr
- noshade :: HtmlAttr
- nowrap :: HtmlAttr
- nowrap :: HtmlAttr
- start :: Int -> HtmlAttr
- start :: Int -> HtmlAttr
- target :: String -> HtmlAttr
- target :: String -> HtmlAttr
- text :: String -> HtmlAttr
- text :: String -> HtmlAttr
- version :: String -> HtmlAttr
- version :: String -> HtmlAttr
- vlink :: String -> HtmlAttr
- vlink :: String -> HtmlAttr
- vspace :: Int -> HtmlAttr
- vspace :: Int -> HtmlAttr
- aqua :: String
- black :: String
- blue :: String
- fuchsia :: String
- gray :: String
- green :: String
- lime :: String
- maroon :: String
- navy :: String
- olive :: String
- purple :: String
- red :: String
- silver :: String
- teal :: String
- yellow :: String
- white :: String
- aqua :: String
- black :: String
- blue :: String
- fuchsia :: String
- gray :: String
- green :: String
- lime :: String
- maroon :: String
- navy :: String
- olive :: String
- purple :: String
- red :: String
- silver :: String
- teal :: String
- yellow :: String
- white :: String
- stringToHtml :: String -> Html
- stringToHtml :: String -> Html
- lineToHtml :: String -> Html
- lineToHtml :: String -> Html
- linesToHtml :: [String] -> Html
- linesToHtml :: [String] -> Html
- primHtmlChar :: String -> Html
- copyright :: Html
- spaceHtml :: Html
- bullet :: Html
- primHtmlChar :: String -> Html
- copyright :: Html
- spaceHtml :: Html
- bullet :: Html
- p :: Html -> Html
- p :: Html -> Html
- type URL = String
- data HotLink = HotLink {}
- hotlink :: URL -> Html -> HotLink
- hotlink :: URL -> Html -> HotLink
- ordList :: HTML a => [a] -> Html
- ordList :: HTML a => [a] -> Html
- unordList :: HTML a => [a] -> Html
- unordList :: HTML a => [a] -> Html
- defList :: (HTML a, HTML b) => [(a, b)] -> Html
- defList :: (HTML a, HTML b) => [(a, b)] -> Html
- widget :: String -> String -> [HtmlAttr] -> Html
- widget :: String -> String -> [HtmlAttr] -> Html
- checkbox :: String -> String -> Html
- hidden :: String -> String -> Html
- radio :: String -> String -> Html
- reset :: String -> String -> Html
- submit :: String -> String -> Html
- password :: String -> Html
- textfield :: String -> Html
- afile :: String -> Html
- clickmap :: String -> Html
- checkbox :: String -> String -> Html
- hidden :: String -> String -> Html
- radio :: String -> String -> Html
- reset :: String -> String -> Html
- submit :: String -> String -> Html
- password :: String -> Html
- textfield :: String -> Html
- afile :: String -> Html
- clickmap :: String -> Html
- menu :: String -> [Html] -> Html
- menu :: String -> [Html] -> Html
- gui :: String -> Html -> Html
- gui :: String -> Html -> Html
Data types
Attributes with name and value.
Classes
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.
class CHANGEATTRS a where Source #
CHANGEATTRS is a more expressive alternative to ADDATTRS
changeAttrs :: a -> ([HtmlAttr] -> [HtmlAttr]) -> a Source #
Instances
CHANGEATTRS Html # | |
CHANGEATTRS b => CHANGEATTRS (a -> b) # | |
changeAttrs :: (a -> b) -> ([HtmlAttr] -> [HtmlAttr]) -> a -> b Source # |
Primitives and basic combinators
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.
Constructs an element with a custom name.
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
.
blockquote :: Html -> Html Source #
blockquote :: Html -> Html Source #
bordercolor :: String -> HtmlAttr Source #
cellpadding :: Int -> HtmlAttr Source #
cellspacing :: Int -> HtmlAttr Source #
identifier :: String -> HtmlAttr Source #
bordercolor :: String -> HtmlAttr Source #
cellpadding :: Int -> HtmlAttr Source #
cellspacing :: Int -> HtmlAttr Source #
identifier :: String -> HtmlAttr Source #
frameborder :: Int -> HtmlAttr Source #
frameborder :: Int -> HtmlAttr Source #
marginheight :: Int -> HtmlAttr Source #
marginheight :: Int -> HtmlAttr Source #
marginwidth :: Int -> HtmlAttr Source #
marginwidth :: Int -> HtmlAttr Source #
background :: String -> HtmlAttr Source #
Deprecated: This attribute is deprecated in XHTML 1.0
background :: String -> HtmlAttr Source #
Deprecated: This attribute is deprecated in XHTML 1.0
stringToHtml :: String -> Html Source #
stringToHtml :: String -> Html Source #
lineToHtml :: String -> Html Source #
This converts a string, but keeps spaces as non-line-breakable.
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.
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.
primHtmlChar :: String -> Html Source #
primHtmlChar :: String -> Html Source #
HotLink | |
|
menu :: String -> [Html] -> Html Source #
Deprecated: menu generates strange XHTML, and is not flexible enough. Roll your own that suits your needs.