type-of-html-0.3.0.0: High performance type driven html generation.

Safe HaskellNone
LanguageHaskell2010

Html

Contents

Description

type-of-html has three main goals:

  • Type safety
  • Modularity
  • Performance

Let's check out the type safety in ghci:

>>> td_ (tr_ "a")

<interactive>:1:1: error:
    • 'Tr is not a valid child of 'Td
    • In the expression: td_ (tr_ "a")
      In an equation for ‘it’: it = td_ (tr_ "a")

<interactive>:1:6: error:
    • 'Tr can't contain a string
    • In the first argument of ‘td_’, namely ‘(tr_ "a")’
      In the expression: td_ (tr_ "a")
      In an equation for ‘it’: it = td_ (tr_ "a")
>>> tr_ (td_ "a")
<tr><td>a</tr>

For every child, it is checked if it could possibly be lawful.

The checking is a bit lenient at the moment:

  • some elements can't contain itself as any descendant: at the moment we look only at direct children. This allows some (quite exotic) invalid html documents.
  • some elements change their permitted content based on attributes: we don't know at compile time the attributes, therefore we always allow content as if all relevant attributes are set.
  • some elements can't be brethren: we look only at parent child relations, therefore if you don't specify the parent, it'll compile

Never the less: these cases are seldom. In the vast majority of cases you're only allowed to construct valid html.

Let's talk about modularity:

Rosetrees of html are just ordinary haskell values which can be composed or abstracted over:

>>> let table = table_ . map (tr_ . map td_)
>>> :t table
table :: ('Td ?> a) => [[a]] -> 'Table > ['Tr > ['Td > a]]
>>> table [["A","B"],["C"]]
<table><tr><td>A<td>B<tr><td>C</table>
>>> import Data.Char
>>> html_ . body_ . table $ map (\c -> [[c], show $ ord c]) ['a'..'d']
<html><body><table><tr><td>a<td>97<tr><td>b<td>98<tr><td>c<td>99<tr><td>d<td>100</table></body></html>

And here's an example module

{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE DataKinds     #-}

module Main where

import Html

import qualified Html.Attribute as A

main :: IO ()
main
  = print
  . page
  $ map td_ [1..(10::Int)]

page
  :: 'Tr ?> a
  => a
  -> 'Div
     :> ( 'Div > [Char]
       # 'Div > [Char]
       # 'Table > 'Tr > a
       )
page tds =
  div_A [A.class_ "qux", A.id_ "baz"]
    ( div_ "foo"
    # div_ "bar"
    # table_ (tr_ tds)
    )

Please note that the type of page is inferable, so ask ghc-mod or whatever you use to write it for you. If you choose not to write the types, you don't need the language extensions.

All text will be automatically html escaped:

>>> i_ "&"
<i>&amp;</i>
>>> div_A [A.id_ ">"] ()
<div id="&gt;"></div>

If you want to opt out, wrap your types into the Raw constructor. This will increase performance, but can be only used with trusted input. You can use this e.g. to embed some blaze-html code into type-of-html.

>>> i_ (Raw "</i><script></script><i>")
<i></i><script></script><i></i>

Last and fast: performance!

Don't look any further, there is no option for faster html generation. type-of-html is up to 10 times faster than blaze-html, which was until now the fastest generation library and the foundation block of lucid and shakespeare.

Wait! 10 times faster? How is this possible? We supercompile lots of parts of the generation process. This is possible thanks to the new features of GHC 8.2: AppendSymbol. We represent tags as kinds and remove according to the html specification omittable closing tags with type families. Afterwards we map these tags to (a :: [Symbol]) and then fold all neighbouring Proxies with AppendSymbol. Afterwards we retrieve the Proxies with symbolVal which will be embedded in the executable as CString. All this happens at compile time. At runtime we do only generate the content and mconcat.

For example, if you write:

renderText $ tr_ (td_ "test")

The compiler does optimize it to the following (we don't know at compile time if we need to escape the string):

mconcat [ Data.Text.Lazy.unpackCString# "<tr><td>"#
        , escape (Data.Text.Lazy.unpackCString# "test"#)
        , Data.Text.Lazy.unpackCString# "</tr>"#)
        ]

If you write

renderText $ div_ (div_ ())

The compiler does optimize it to the following:

mconcat [ Data.Text.Lazy.unpackCString# "<div><div></div></div>"# ]

Note that optional ending tags were chopped off (tr, td). This sort of compiletime optimization isn't for free, it'll increase compilation times.

Synopsis

Documentation

renderString :: Document a String => a -> String Source #

Render a html document to a String.

renderText :: Document a Text => a -> Text Source #

Render a html document to a lazy Text.

renderByteString :: Document a ByteString => a -> ByteString Source #

Render a html document to a lazy ByteString.

data (a :: Element) > b where infixr 8 Source #

Descend to a valid child of an element. It is recommended to use the predefined elements.

>>> Child "a" :: 'Div > String
<div>a</div>
>>> div_ "a"
<div>a</div>

Constructors

Child :: a ?> b => b -> a > b 

data (a :: Element) :> b where infixr 8 Source #

Decorate an element with attributes and descend to a valid child.

>>> WithAttributes [A.class_ "bar"] "a" :: 'Div :> String
<div class="bar">a</div>

Constructors

WithAttributes :: a ?> b => [Attribute] -> b -> a :> b 

addAttributes :: a ?> b => [Attribute] -> (a > b) -> a :> b Source #

data a # b infixr 5 Source #

Combine two elements sequentially.

>>> render (i_ () # div_ ()) :: String
"<i></i><div></div>"

Constructors

(:#:) a b 

(#) :: a -> b -> a # b infixr 5 Source #

type family (a :: Element) ?> b :: Constraint where ... Source #

Check whether b is a valid child of a. You'll propably never need to call this directly. Through a GADT, it is enforced that every child is lawful.

The only way to circumvent this would be to use undefined or error in combination with only type level values.

>>> undefined :: 'Div > ('Html > ())
<div><html></html></div>
>>> undefined :: 'Div > ('Html > Proxy "a")
<div><html>a</html></div>
>>> undefined :: 'Div > ('Html > String)
<div><html>*** Exception: Prelude.undefined

Equations

a ?> (b # c) = (a ?> b, a ?> c) 
a ?> (b > _) = MaybeTypeError a b (TestPaternity (SingleElement b) (GetInfo a) (GetInfo b)) 
a ?> (b :> _) = MaybeTypeError a b (TestPaternity (SingleElement b) (GetInfo a) (GetInfo b)) 
a ?> (Maybe b) = a ?> b 
a ?> (Either b c) = (a ?> b, a ?> c) 
a ?> (f (b > c)) = a ?> (b > c) 
a ?> (f (b :> c)) = a ?> (b > c) 
a ?> (f (b # c)) = a ?> (b # c) 
a ?> () = () 
a ?> (b -> c) = TypeError (Text "Html elements can't contain functions") 
a ?> b = CheckString a 

class Convert a where Source #

Convert a type efficienctly to different string like types. Add instances if you want use custom types in your document.

{-# LANGUAGE RecordWildCards #-}

module Main where

import Html

data Person
  = Person
  { name :: String
  , age :: Int
  , vegetarian :: Bool
  }

-- | This is not efficient, but understandable.
-- The call to convertText is needed for escaping.
-- This is enforced by a newtype. Wrap it in Raw if you don't want to escape.
instance Convert Person where
  convertText (Person{..})
    = convertText
    $  name
    ++ " is "
    ++ show age
    ++ " years old and likes "
    ++ if vegetarian then "oranges." else "meat."

john :: Person
john = Person {name = John, age = 52, vegetarian = True}

main :: IO ()
main = print (div_ john)

Minimal complete definition

convertText

Instances

Convert Double Source # 
Convert Float Source # 
Convert Int Source # 
Convert Integer Source # 
Convert Word Source # 
Convert String Source # 
Convert Text Source # 
Convert (Raw String) Source # 
Convert (Raw ByteString) Source # 
Convert (Raw Text) Source # 
KnownSymbol a => Convert (Proxy Symbol a) Source # 

data Element Source #

The data type of all html elements and the kind of elements.

Constructors

DOCTYPE 
A 
Abbr 
Acronym

Deprecated: This is an obsolete html element and should not be used.

Address 
Applet

Deprecated: This is an obsolete html element and should not be used.

Area 
Article 
Aside 
Audio 
B 
Base 
Basefont

Deprecated: This is an obsolete html element and should not be used.

Bdi 
Bdo 
Bgsound 
Big

Deprecated: This is an obsolete html element and should not be used.

Blink

Deprecated: This is an obsolete html element and should not be used.

Blockquote 
Body 
Br 
Button 
Canvas 
Caption 
Center

Deprecated: This is an obsolete html element and should not be used.

Cite 
Code 
Col 
Colgroup 
Command

Deprecated: This is an obsolete html element and should not be used.

Content

Deprecated: This is an obsolete html element and should not be used.

Data 
Datalist 
Dd 
Del 
Details 
Dfn 
Dialog 
Dir

Deprecated: This is an obsolete html element and should not be used.

Div 
Dl 
Dt 
Element 
Em 
Embed 
Fieldset 
Figcaption 
Figure 
Font

Deprecated: This is an obsolete html element and should not be used.

Footer 
Form 
Frame

Deprecated: This is an obsolete html element and should not be used.

Frameset

Deprecated: This is an obsolete html element and should not be used.

H1 
H2 
H3 
H4 
H5 
H6 
Head 
Header 
Hgroup 
Hr 
Html 
I 
Iframe 
Image 
Img 
Input 
Ins 
Isindex

Deprecated: This is an obsolete html element and should not be used.

Kbd 
Keygen

Deprecated: This is an obsolete html element and should not be used.

Label 
Legend 
Li 
Link 
Listing

Deprecated: This is an obsolete html element and should not be used.

Main 
Map 
Mark 
Marquee

Deprecated: This is an obsolete html element and should not be used.

Math 
Menu 
Menuitem 
Meta 
Meter 
Multicol

Deprecated: This is an obsolete html element and should not be used.

Nav 
Nextid

Deprecated: This is an obsolete html element and should not be used.

Nobr 
Noembed

Deprecated: This is an obsolete html element and should not be used.

Noframes 
Noscript 
Object 
Ol 
Optgroup 
Option 
Output 
P 
Param 
Picture 
Plaintext

Deprecated: This is an obsolete html element and should not be used.

Pre 
Progress 
Q 
Rp 
Rt 
Rtc 
Ruby 
S 
Samp 
Script 
Section 
Select 
Shadow

Deprecated: This is an obsolete html element and should not be used.

Slot 
Small 
Source 
Spacer

Deprecated: This is an obsolete html element and should not be used.

Span 
Strike

Deprecated: This is an obsolete html element and should not be used.

Strong 
Style 
Sub 
Summary 
Sup 
Svg 
Table 
Tbody 
Td 
Template 
Textarea 
Tfoot 
Th 
Thead 
Time 
Title 
Tr 
Track 
Tt

Deprecated: This is an obsolete html element and should not be used.

U 
Ul 
Var 
Video 
Wbr 
Xmp

Deprecated: This is an obsolete html element and should not be used.

a_ :: A ?> a => a -> A > a Source #

a_A :: A ?> a => [Attribute] -> a -> A :> a Source #

abbr_ :: Abbr ?> a => a -> Abbr > a Source #

abbr_A :: Abbr ?> a => [Attribute] -> a -> Abbr :> a Source #

applet_ :: Applet ?> a => a -> Applet > a Source #

applet_A :: Applet ?> a => [Attribute] -> a -> Applet :> a Source #

aside_ :: Aside ?> a => a -> Aside > a Source #

aside_A :: Aside ?> a => [Attribute] -> a -> Aside :> a Source #

audio_ :: Audio ?> a => a -> Audio > a Source #

audio_A :: Audio ?> a => [Attribute] -> a -> Audio :> a Source #

b_ :: B ?> a => a -> B > a Source #

b_A :: B ?> a => [Attribute] -> a -> B :> a Source #

bdi_ :: Bdi ?> a => a -> Bdi > a Source #

bdi_A :: Bdi ?> a => [Attribute] -> a -> Bdi :> a Source #

bdo_ :: Bdo ?> a => a -> Bdo > a Source #

bdo_A :: Bdo ?> a => [Attribute] -> a -> Bdo :> a Source #

big_ :: Big ?> a => a -> Big > a Source #

big_A :: Big ?> a => [Attribute] -> a -> Big :> a Source #

blink_ :: Blink ?> a => a -> Blink > a Source #

blink_A :: Blink ?> a => [Attribute] -> a -> Blink :> a Source #

body_ :: Body ?> a => a -> Body > a Source #

body_A :: Body ?> a => [Attribute] -> a -> Body :> a Source #

br_ :: Br > () Source #

br_A :: [Attribute] -> Br :> () Source #

button_ :: Button ?> a => a -> Button > a Source #

button_A :: Button ?> a => [Attribute] -> a -> Button :> a Source #

canvas_ :: Canvas ?> a => a -> Canvas > a Source #

canvas_A :: Canvas ?> a => [Attribute] -> a -> Canvas :> a Source #

center_ :: Center ?> a => a -> Center > a Source #

center_A :: Center ?> a => [Attribute] -> a -> Center :> a Source #

cite_ :: Cite ?> a => a -> Cite > a Source #

cite_A :: Cite ?> a => [Attribute] -> a -> Cite :> a Source #

code_ :: Code ?> a => a -> Code > a Source #

code_A :: Code ?> a => [Attribute] -> a -> Code :> a Source #

col_ :: Col > () Source #

data_ :: Data ?> a => a -> Data > a Source #

data_A :: Data ?> a => [Attribute] -> a -> Data :> a Source #

dd_ :: Dd ?> a => a -> Dd > a Source #

dd_A :: Dd ?> a => [Attribute] -> a -> Dd :> a Source #

del_ :: Del ?> a => a -> Del > a Source #

del_A :: Del ?> a => [Attribute] -> a -> Del :> a Source #

dfn_ :: Dfn ?> a => a -> Dfn > a Source #

dfn_A :: Dfn ?> a => [Attribute] -> a -> Dfn :> a Source #

dialog_ :: Dialog ?> a => a -> Dialog > a Source #

dialog_A :: Dialog ?> a => [Attribute] -> a -> Dialog :> a Source #

dir_ :: Dir ?> a => a -> Dir > a Source #

dir_A :: Dir ?> a => [Attribute] -> a -> Dir :> a Source #

div_ :: Div ?> a => a -> Div > a Source #

div_A :: Div ?> a => [Attribute] -> a -> Div :> a Source #

dl_ :: Dl ?> a => a -> Dl > a Source #

dl_A :: Dl ?> a => [Attribute] -> a -> Dl :> a Source #

dt_ :: Dt ?> a => a -> Dt > a Source #

dt_A :: Dt ?> a => [Attribute] -> a -> Dt :> a Source #

em_ :: Em ?> a => a -> Em > a Source #

em_A :: Em ?> a => [Attribute] -> a -> Em :> a Source #

figure_ :: Figure ?> a => a -> Figure > a Source #

figure_A :: Figure ?> a => [Attribute] -> a -> Figure :> a Source #

font_ :: Font ?> a => a -> Font > a Source #

font_A :: Font ?> a => [Attribute] -> a -> Font :> a Source #

footer_ :: Footer ?> a => a -> Footer > a Source #

footer_A :: Footer ?> a => [Attribute] -> a -> Footer :> a Source #

form_ :: Form ?> a => a -> Form > a Source #

form_A :: Form ?> a => [Attribute] -> a -> Form :> a Source #

frame_ :: Frame ?> a => a -> Frame > a Source #

frame_A :: Frame ?> a => [Attribute] -> a -> Frame :> a Source #

h1_ :: H1 ?> a => a -> H1 > a Source #

h1_A :: H1 ?> a => [Attribute] -> a -> H1 :> a Source #

h2_ :: H2 ?> a => a -> H2 > a Source #

h2_A :: H2 ?> a => [Attribute] -> a -> H2 :> a Source #

h3_ :: H3 ?> a => a -> H3 > a Source #

h3_A :: H3 ?> a => [Attribute] -> a -> H3 :> a Source #

h4_ :: H4 ?> a => a -> H4 > a Source #

h4_A :: H4 ?> a => [Attribute] -> a -> H4 :> a Source #

h5_ :: H5 ?> a => a -> H5 > a Source #

h5_A :: H5 ?> a => [Attribute] -> a -> H5 :> a Source #

h6_ :: H6 ?> a => a -> H6 > a Source #

h6_A :: H6 ?> a => [Attribute] -> a -> H6 :> a Source #

head_ :: Head ?> a => a -> Head > a Source #

head_A :: Head ?> a => [Attribute] -> a -> Head :> a Source #

header_ :: Header ?> a => a -> Header > a Source #

header_A :: Header ?> a => [Attribute] -> a -> Header :> a Source #

hgroup_ :: Hgroup ?> a => a -> Hgroup > a Source #

hgroup_A :: Hgroup ?> a => [Attribute] -> a -> Hgroup :> a Source #

hr_ :: Hr > () Source #

hr_A :: [Attribute] -> Hr :> () Source #

html_ :: Html ?> a => a -> Html > a Source #

html_A :: Html ?> a => [Attribute] -> a -> Html :> a Source #

i_ :: I ?> a => a -> I > a Source #

i_A :: I ?> a => [Attribute] -> a -> I :> a Source #

image_ :: Image ?> a => a -> Image > a Source #

image_A :: Image ?> a => [Attribute] -> a -> Image :> a Source #

img_ :: Img > () Source #

input_ :: Input ?> a => a -> Input > a Source #

input_A :: Input ?> a => [Attribute] -> a -> Input :> a Source #

ins_ :: Ins ?> a => a -> Ins > a Source #

ins_A :: Ins ?> a => [Attribute] -> a -> Ins :> a Source #

kbd_ :: Kbd ?> a => a -> Kbd > a Source #

kbd_A :: Kbd ?> a => [Attribute] -> a -> Kbd :> a Source #

keygen_ :: Keygen ?> a => a -> Keygen > a Source #

keygen_A :: Keygen ?> a => [Attribute] -> a -> Keygen :> a Source #

label_ :: Label ?> a => a -> Label > a Source #

label_A :: Label ?> a => [Attribute] -> a -> Label :> a Source #

legend_ :: Legend ?> a => a -> Legend > a Source #

legend_A :: Legend ?> a => [Attribute] -> a -> Legend :> a Source #

li_ :: Li ?> a => a -> Li > a Source #

li_A :: Li ?> a => [Attribute] -> a -> Li :> a Source #

main_ :: Main ?> a => a -> Main > a Source #

main_A :: Main ?> a => [Attribute] -> a -> Main :> a Source #

map_ :: Map ?> a => a -> Map > a Source #

map_A :: Map ?> a => [Attribute] -> a -> Map :> a Source #

mark_ :: Mark ?> a => a -> Mark > a Source #

mark_A :: Mark ?> a => [Attribute] -> a -> Mark :> a Source #

math_ :: Math ?> a => a -> Math > a Source #

math_A :: Math ?> a => [Attribute] -> a -> Math :> a Source #

menu_ :: Menu ?> a => a -> Menu > a Source #

menu_A :: Menu ?> a => [Attribute] -> a -> Menu :> a Source #

meter_ :: Meter ?> a => a -> Meter > a Source #

meter_A :: Meter ?> a => [Attribute] -> a -> Meter :> a Source #

nav_ :: Nav ?> a => a -> Nav > a Source #

nav_A :: Nav ?> a => [Attribute] -> a -> Nav :> a Source #

nextid_ :: Nextid ?> a => a -> Nextid > a Source #

nextid_A :: Nextid ?> a => [Attribute] -> a -> Nextid :> a Source #

nobr_ :: Nobr ?> a => a -> Nobr > a Source #

nobr_A :: Nobr ?> a => [Attribute] -> a -> Nobr :> a Source #

object_ :: Object ?> a => a -> Object > a Source #

object_A :: Object ?> a => [Attribute] -> a -> Object :> a Source #

ol_ :: Ol ?> a => a -> Ol > a Source #

ol_A :: Ol ?> a => [Attribute] -> a -> Ol :> a Source #

option_ :: Option ?> a => a -> Option > a Source #

option_A :: Option ?> a => [Attribute] -> a -> Option :> a Source #

output_ :: Output ?> a => a -> Output > a Source #

output_A :: Output ?> a => [Attribute] -> a -> Output :> a Source #

p_ :: P ?> a => a -> P > a Source #

p_A :: P ?> a => [Attribute] -> a -> P :> a Source #

pre_ :: Pre ?> a => a -> Pre > a Source #

pre_A :: Pre ?> a => [Attribute] -> a -> Pre :> a Source #

q_ :: Q ?> a => a -> Q > a Source #

q_A :: Q ?> a => [Attribute] -> a -> Q :> a Source #

rp_ :: Rp ?> a => a -> Rp > a Source #

rp_A :: Rp ?> a => [Attribute] -> a -> Rp :> a Source #

rt_ :: Rt ?> a => a -> Rt > a Source #

rt_A :: Rt ?> a => [Attribute] -> a -> Rt :> a Source #

rtc_ :: Rtc ?> a => a -> Rtc > a Source #

rtc_A :: Rtc ?> a => [Attribute] -> a -> Rtc :> a Source #

ruby_ :: Ruby ?> a => a -> Ruby > a Source #

ruby_A :: Ruby ?> a => [Attribute] -> a -> Ruby :> a Source #

s_ :: S ?> a => a -> S > a Source #

s_A :: S ?> a => [Attribute] -> a -> S :> a Source #

samp_ :: Samp ?> a => a -> Samp > a Source #

samp_A :: Samp ?> a => [Attribute] -> a -> Samp :> a Source #

script_ :: Script ?> a => a -> Script > a Source #

script_A :: Script ?> a => [Attribute] -> a -> Script :> a Source #

select_ :: Select ?> a => a -> Select > a Source #

select_A :: Select ?> a => [Attribute] -> a -> Select :> a Source #

shadow_ :: Shadow ?> a => a -> Shadow > a Source #

shadow_A :: Shadow ?> a => [Attribute] -> a -> Shadow :> a Source #

slot_ :: Slot ?> a => a -> Slot > a Source #

slot_A :: Slot ?> a => [Attribute] -> a -> Slot :> a Source #

small_ :: Small ?> a => a -> Small > a Source #

small_A :: Small ?> a => [Attribute] -> a -> Small :> a Source #

spacer_ :: Spacer ?> a => a -> Spacer > a Source #

spacer_A :: Spacer ?> a => [Attribute] -> a -> Spacer :> a Source #

span_ :: Span ?> a => a -> Span > a Source #

span_A :: Span ?> a => [Attribute] -> a -> Span :> a Source #

strike_ :: Strike ?> a => a -> Strike > a Source #

strike_A :: Strike ?> a => [Attribute] -> a -> Strike :> a Source #

strong_ :: Strong ?> a => a -> Strong > a Source #

strong_A :: Strong ?> a => [Attribute] -> a -> Strong :> a Source #

style_ :: Style ?> a => a -> Style > a Source #

style_A :: Style ?> a => [Attribute] -> a -> Style :> a Source #

sub_ :: Sub ?> a => a -> Sub > a Source #

sub_A :: Sub ?> a => [Attribute] -> a -> Sub :> a Source #

sup_ :: Sup ?> a => a -> Sup > a Source #

sup_A :: Sup ?> a => [Attribute] -> a -> Sup :> a Source #

svg_ :: Svg ?> a => a -> Svg > a Source #

svg_A :: Svg ?> a => [Attribute] -> a -> Svg :> a Source #

table_ :: Table ?> a => a -> Table > a Source #

table_A :: Table ?> a => [Attribute] -> a -> Table :> a Source #

tbody_ :: Tbody ?> a => a -> Tbody > a Source #

tbody_A :: Tbody ?> a => [Attribute] -> a -> Tbody :> a Source #

td_ :: Td ?> a => a -> Td > a Source #

td_A :: Td ?> a => [Attribute] -> a -> Td :> a Source #

tfoot_ :: Tfoot ?> a => a -> Tfoot > a Source #

tfoot_A :: Tfoot ?> a => [Attribute] -> a -> Tfoot :> a Source #

th_ :: Th ?> a => a -> Th > a Source #

th_A :: Th ?> a => [Attribute] -> a -> Th :> a Source #

thead_ :: Thead ?> a => a -> Thead > a Source #

thead_A :: Thead ?> a => [Attribute] -> a -> Thead :> a Source #

time_ :: Time ?> a => a -> Time > a Source #

time_A :: Time ?> a => [Attribute] -> a -> Time :> a Source #

title_ :: Title ?> a => a -> Title > a Source #

title_A :: Title ?> a => [Attribute] -> a -> Title :> a Source #

tr_ :: Tr ?> a => a -> Tr > a Source #

tr_A :: Tr ?> a => [Attribute] -> a -> Tr :> a Source #

tt_ :: Tt ?> a => a -> Tt > a Source #

tt_A :: Tt ?> a => [Attribute] -> a -> Tt :> a Source #

u_ :: U ?> a => a -> U > a Source #

u_A :: U ?> a => [Attribute] -> a -> U :> a Source #

ul_ :: Ul ?> a => a -> Ul > a Source #

ul_A :: Ul ?> a => [Attribute] -> a -> Ul :> a Source #

var_ :: Var ?> a => a -> Var > a Source #

var_A :: Var ?> a => [Attribute] -> a -> Var :> a Source #

video_ :: Video ?> a => a -> Video > a Source #

video_A :: Video ?> a => [Attribute] -> a -> Video :> a Source #

wbr_ :: Wbr > () Source #

xmp_ :: Xmp ?> a => a -> Xmp > a Source #

xmp_A :: Xmp ?> a => [Attribute] -> a -> Xmp :> a Source #

Orphan instances

Document ((:>) a b) String => Show [(:>) a b] Source # 

Methods

showsPrec :: Int -> [a :> b] -> ShowS #

show :: [a :> b] -> String #

showList :: [[a :> b]] -> ShowS #

Document ((>) a b) String => Show [(>) a b] Source # 

Methods

showsPrec :: Int -> [a > b] -> ShowS #

show :: [a > b] -> String #

showList :: [[a > b]] -> ShowS #

Document ((#) a b) String => Show [(#) a b] Source # 

Methods

showsPrec :: Int -> [a # b] -> ShowS #

show :: [a # b] -> String #

showList :: [[a # b]] -> ShowS #

Document ((:>) a b) String => Show ((:>) a b) Source # 

Methods

showsPrec :: Int -> (a :> b) -> ShowS #

show :: (a :> b) -> String #

showList :: [a :> b] -> ShowS #

Document ((>) a b) String => Show ((>) a b) Source #

Orphan show instances to faciliate ghci development.

Methods

showsPrec :: Int -> (a > b) -> ShowS #

show :: (a > b) -> String #

showList :: [a > b] -> ShowS #

Document ((#) a b) String => Show ((#) a b) Source # 

Methods

showsPrec :: Int -> (a # b) -> ShowS #

show :: (a # b) -> String #

showList :: [a # b] -> ShowS #