-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Clear to write, read and edit DSL for HTML
--   
--   Clear to write, read and edit DSL for HTML. See the <a>Lucid</a>
--   module for description and documentation.
@package lucid
@version 2.9.6


-- | Base types and combinators.
module Lucid.Base

-- | Render the HTML to a lazy <a>Text</a>.
--   
--   This is a convenience function defined in terms of <a>execHtmlT</a>,
--   <a>runIdentity</a> and <a>toLazyByteString</a>, and <a>decodeUtf8</a>.
--   Check the source if you're interested in the lower-level behaviour.
renderText :: Html a -> Text

-- | Render the HTML to a lazy <a>ByteString</a>.
--   
--   This is a convenience function defined in terms of <a>execHtmlT</a>,
--   <a>runIdentity</a> and <a>toLazyByteString</a>. Check the source if
--   you're interested in the lower-level behaviour.
renderBS :: Html a -> ByteString

-- | Render the HTML to a lazy <a>Text</a>, but in a monad.
--   
--   This is a convenience function defined in terms of <a>execHtmlT</a>
--   and <a>toLazyByteString</a>, and <a>decodeUtf8</a>. Check the source
--   if you're interested in the lower-level behaviour.
renderTextT :: Monad m => HtmlT m a -> m Text

-- | Render the HTML to a lazy <a>ByteString</a>, but in a monad.
--   
--   This is a convenience function defined in terms of <a>execHtmlT</a>
--   and <a>toLazyByteString</a>. Check the source if you're interested in
--   the lower-level behaviour.
renderBST :: Monad m => HtmlT m a -> m ByteString

-- | Render the HTML to a lazy <a>ByteString</a>.
--   
--   This is a convenience function defined in terms of <a>execHtmlT</a>,
--   <a>runIdentity</a> and <a>toLazyByteString</a>. Check the source if
--   you're interested in the lower-level behaviour.
renderToFile :: FilePath -> Html a -> IO ()

-- | Build the HTML. Analogous to <tt>execState</tt>.
--   
--   You might want to use this is if you want to do something with the raw
--   <a>Builder</a>. Otherwise for simple cases you can just use
--   <a>renderText</a> or <a>renderBS</a>.
execHtmlT :: Monad m => HtmlT m a -> m Builder

-- | Evaluate the HTML to its return value. Analogous to
--   <tt>evalState</tt>.
--   
--   Use this if you want to ignore the HTML output of an action completely
--   and just get the result.
--   
--   For using with the <a>Html</a> type, you'll need <a>runIdentity</a>
--   e.g.
--   
--   <pre>
--   &gt;&gt;&gt; runIdentity (evalHtmlT (p_ "Hello!"))
--   ()
--   </pre>
evalHtmlT :: Monad m => HtmlT m a -> m a

-- | Generalize the underlying monad.
--   
--   Some builders are happy to deliver results in a pure underlying monad,
--   here <a>Identity</a>, but have trouble maintaining the polymorphic
--   type. This utility generalizes from <a>Identity</a>.
relaxHtmlT :: Monad m => HtmlT Identity a -> HtmlT m a

-- | Make an HTML builder.
makeElement :: Monad m => Text -> HtmlT m a -> HtmlT m a

-- | Make an HTML builder for elements which have no ending tag.
makeElementNoEnd :: Monad m => Text -> HtmlT m ()

-- | Make an XML builder for elements which have no ending tag.
makeXmlElementNoEnd :: Monad m => Text -> HtmlT m ()

-- | Make an attribute builder.
makeAttribute :: Text -> Text -> Attribute

-- | Simple HTML builder type. Defined in terms of <a>HtmlT</a>. Check out
--   that type for instance information.
--   
--   Simple use-cases will just use this type. But if you want to
--   transformer over Reader or something, you can go and use <a>HtmlT</a>.
type Html = HtmlT Identity

-- | A monad transformer that generates HTML. Use the simpler <a>Html</a>
--   type if you don't want to transform over some other monad.
newtype HtmlT m a
HtmlT :: m (HashMap Text Text -> Builder, a) -> HtmlT m a

-- | This is the low-level way to run the HTML transformer, finally
--   returning an element builder and a value. You can pass <a>mempty</a>
--   for this argument for a top-level call. See <a>evalHtmlT</a> and
--   <a>execHtmlT</a> for easier to use functions.
[runHtmlT] :: HtmlT m a -> m (HashMap Text Text -> Builder, a)

-- | A simple attribute. Don't use the constructor, use
--   <a>makeAttribute</a>.
data Attribute
Attribute :: !Text -> !Text -> Attribute

-- | Used to construct HTML terms.
--   
--   Simplest use: p_ = term "p" yields <a>p_</a>.
--   
--   Very overloaded for three cases:
--   
--   <ul>
--   <li>The first case is the basic <tt>arg</tt> of <tt>[(Text,Text)]</tt>
--   which will return a function that wants children.</li>
--   <li>The second is an <tt>arg</tt> which is <tt>HtmlT m ()</tt>, in
--   which case the term accepts no attributes and just the children are
--   used for the element.</li>
--   <li>Finally, this is also used for overloaded attributes, like
--   <a>style_</a> or <a>title_</a>. If a return type of
--   <tt>(Text,Text)</tt> is inferred then an attribute will be made.</li>
--   </ul>
--   
--   The instances look intimidating but actually the constraints make it
--   very general so that type inference works well even in the presence of
--   things like <tt>OverloadedLists</tt> and such.
class Term arg result | result -> arg where term = flip termWith []

-- | Used for constructing elements e.g. <tt>term "p"</tt> yields
--   <a>p_</a>.
term :: Term arg result => Text -> arg -> result

-- | Use this if you want to make an element which inserts some
--   pre-prepared attributes into the element.
termWith :: Term arg result => Text -> [Attribute] -> arg -> result

-- | Same as the <a>Term</a> class, but will not HTML escape its children.
--   Useful for elements like <a>style_</a> or <a>script_</a>.
class TermRaw arg result | result -> arg where termRaw = flip termRawWith []

-- | Used for constructing elements e.g. <tt>termRaw "p"</tt> yields
--   <a>p_</a>.
termRaw :: TermRaw arg result => Text -> arg -> result

-- | Use this if you want to make an element which inserts some
--   pre-prepared attributes into the element.
termRawWith :: TermRaw arg result => Text -> [Attribute] -> arg -> result

-- | Can be converted to HTML.
class ToHtml a
toHtml :: (ToHtml a, Monad m) => a -> HtmlT m ()
toHtmlRaw :: (ToHtml a, Monad m) => a -> HtmlT m ()

-- | With an element use these attributes. An overloaded way of adding
--   attributes either to an element accepting attributes-and-children or
--   one that just accepts attributes. See the two instances.
class With a

-- | With the given element(s), use the given attributes.
with :: With a => a -> [Attribute] -> a
instance GHC.Classes.Eq Lucid.Base.Attribute
instance GHC.Show.Show Lucid.Base.Attribute
instance Data.Hashable.Class.Hashable Lucid.Base.Attribute
instance Control.Monad.Morph.MFunctor Lucid.Base.HtmlT
instance (a ~ (), GHC.Base.Monad m) => GHC.Base.Monoid (Lucid.Base.HtmlT m a)
instance GHC.Base.Monad m => GHC.Base.Applicative (Lucid.Base.HtmlT m)
instance GHC.Base.Monad m => GHC.Base.Functor (Lucid.Base.HtmlT m)
instance GHC.Base.Monad m => GHC.Base.Monad (Lucid.Base.HtmlT m)
instance Control.Monad.Trans.Class.MonadTrans Lucid.Base.HtmlT
instance Control.Monad.IO.Class.MonadIO m => Control.Monad.IO.Class.MonadIO (Lucid.Base.HtmlT m)
instance (GHC.Base.Monad m, a ~ ()) => Data.String.IsString (Lucid.Base.HtmlT m a)
instance m ~ Data.Functor.Identity.Identity => GHC.Show.Show (Lucid.Base.HtmlT m a)
instance Lucid.Base.ToHtml GHC.Base.String
instance Lucid.Base.ToHtml Data.Text.Internal.Text
instance Lucid.Base.ToHtml Data.Text.Internal.Lazy.Text
instance Lucid.Base.ToHtml Data.ByteString.Internal.ByteString
instance Lucid.Base.ToHtml Data.ByteString.Lazy.Internal.ByteString
instance (GHC.Base.Monad m, f ~ Lucid.Base.HtmlT m a) => Lucid.Base.Term [Lucid.Base.Attribute] (f -> Lucid.Base.HtmlT m a)
instance GHC.Base.Monad m => Lucid.Base.Term (Lucid.Base.HtmlT m a) (Lucid.Base.HtmlT m a)
instance Lucid.Base.Term Data.Text.Internal.Text Lucid.Base.Attribute
instance (GHC.Base.Monad m, Lucid.Base.ToHtml f, a ~ ()) => Lucid.Base.TermRaw [Lucid.Base.Attribute] (f -> Lucid.Base.HtmlT m a)
instance (GHC.Base.Monad m, a ~ ()) => Lucid.Base.TermRaw Data.Text.Internal.Text (Lucid.Base.HtmlT m a)
instance Lucid.Base.TermRaw Data.Text.Internal.Text Lucid.Base.Attribute
instance GHC.Base.Monad m => Lucid.Base.With (Lucid.Base.HtmlT m a)
instance GHC.Base.Monad m => Lucid.Base.With (Lucid.Base.HtmlT m a -> Lucid.Base.HtmlT m a)


-- | Html5 terms.
module Lucid.Html5

-- | <tt>DOCTYPE</tt> element
doctype_ :: Monad m => HtmlT m ()

-- | <tt>DOCTYPE</tt> element + <tt>html</tt> element
doctypehtml_ :: Monad m => HtmlT m a -> HtmlT m a

-- | <tt>a</tt> element
a_ :: Term arg result => arg -> result

-- | <tt>abbr</tt> element
abbr_ :: Term arg result => arg -> result

-- | <tt>address</tt> element
address_ :: Term arg result => arg -> result

-- | <tt>area</tt> element
area_ :: Monad m => [Attribute] -> HtmlT m ()

-- | <tt>article</tt> element
article_ :: Term arg result => arg -> result

-- | <tt>aside</tt> element
aside_ :: Term arg result => arg -> result

-- | <tt>audio</tt> element
audio_ :: Term arg result => arg -> result

-- | <tt>b</tt> element
b_ :: Term arg result => arg -> result

-- | <tt>base</tt> element
base_ :: Monad m => [Attribute] -> HtmlT m ()

-- | <tt>bdo</tt> element
bdo_ :: Term arg result => arg -> result

-- | <tt>blockquote</tt> element
blockquote_ :: Term arg result => arg -> result

-- | <tt>body</tt> element
body_ :: Term arg result => arg -> result

-- | <tt>br</tt> element
br_ :: Monad m => [Attribute] -> HtmlT m ()

-- | <tt>button</tt> element
button_ :: Term arg result => arg -> result

-- | <tt>canvas</tt> element
canvas_ :: Term arg result => arg -> result

-- | <tt>caption</tt> element
caption_ :: Term arg result => arg -> result

-- | <tt>cite</tt> element or <tt>cite</tt> attribute.
cite_ :: Term arg result => arg -> result

-- | <tt>code</tt> element
code_ :: Term arg result => arg -> result

-- | <tt>col</tt> element
col_ :: Monad m => [Attribute] -> HtmlT m ()

-- | <tt>colgroup</tt> element
colgroup_ :: Term arg result => arg -> result

-- | <tt>command</tt> element
command_ :: Term arg result => arg -> result

-- | <tt>datalist</tt> element
datalist_ :: Term arg result => arg -> result

-- | <tt>dd</tt> element
dd_ :: Term arg result => arg -> result

-- | <tt>del</tt> element
del_ :: Term arg result => arg -> result

-- | <tt>details</tt> element
details_ :: Term arg result => arg -> result

-- | <tt>dfn</tt> element
dfn_ :: Term arg result => arg -> result

-- | <tt>div</tt> element
div_ :: Term arg result => arg -> result

-- | <tt>dl</tt> element
dl_ :: Term arg result => arg -> result

-- | <tt>dt</tt> element
dt_ :: Term arg result => arg -> result

-- | <tt>em</tt> element
em_ :: Term arg result => arg -> result

-- | <tt>embed</tt> element
embed_ :: Monad m => [Attribute] -> HtmlT m ()

-- | <tt>fieldset</tt> element
fieldset_ :: Term arg result => arg -> result

-- | <tt>figcaption</tt> element
figcaption_ :: Term arg result => arg -> result

-- | <tt>figure</tt> element
figure_ :: Term arg result => arg -> result

-- | <tt>footer</tt> element
footer_ :: Term arg result => arg -> result

-- | <tt>form</tt> element or <tt>form</tt> attribute
form_ :: Term arg result => arg -> result

-- | <tt>h1</tt> element
h1_ :: Term arg result => arg -> result

-- | <tt>h2</tt> element
h2_ :: Term arg result => arg -> result

-- | <tt>h3</tt> element
h3_ :: Term arg result => arg -> result

-- | <tt>h4</tt> element
h4_ :: Term arg result => arg -> result

-- | <tt>h5</tt> element
h5_ :: Term arg result => arg -> result

-- | <tt>h6</tt> element
h6_ :: Term arg result => arg -> result

-- | <tt>head</tt> element
head_ :: Term arg result => arg -> result

-- | <tt>header</tt> element
header_ :: Term arg result => arg -> result

-- | <tt>hgroup</tt> element
hgroup_ :: Term arg result => arg -> result

-- | <tt>hr</tt> element
hr_ :: Monad m => [Attribute] -> HtmlT m ()

-- | <tt>html</tt> element
html_ :: Term arg result => arg -> result

-- | <tt>i</tt> element
i_ :: Term arg result => arg -> result

-- | <tt>iframe</tt> element
iframe_ :: Term arg result => arg -> result

-- | <tt>img</tt> element
img_ :: Monad m => [Attribute] -> HtmlT m ()

-- | <tt>input</tt> element
input_ :: Monad m => [Attribute] -> HtmlT m ()

-- | <tt>ins</tt> element
ins_ :: Term arg result => arg -> result

-- | <tt>kbd</tt> element
kbd_ :: Term arg result => arg -> result

-- | <tt>keygen</tt> element
keygen_ :: Monad m => [Attribute] -> HtmlT m ()

-- | <tt>label</tt> element or <tt>label</tt> attribute
label_ :: Term arg result => arg -> result

-- | <tt>legend</tt> element
legend_ :: Term arg result => arg -> result

-- | <tt>li</tt> element
li_ :: Term arg result => arg -> result

-- | <tt>link</tt> element
link_ :: Monad m => [Attribute] -> HtmlT m ()

-- | <tt>map</tt> element
map_ :: Term arg result => arg -> result

-- | <tt>main</tt> element
main_ :: Term arg result => arg -> result

-- | <tt>mark</tt> element
mark_ :: Term arg result => arg -> result

-- | <tt>menu</tt> element
menu_ :: Term arg result => arg -> result

-- | <tt>menuitem</tt> element
menuitem_ :: Monad m => [Attribute] -> HtmlT m ()

-- | <tt>meta</tt> element
meta_ :: Monad m => [Attribute] -> HtmlT m ()

-- | <tt>meter</tt> element
meter_ :: Term arg result => arg -> result

-- | <tt>nav</tt> element
nav_ :: Term arg result => arg -> result

-- | <tt>noscript</tt> element
noscript_ :: Term arg result => arg -> result

-- | <tt>object</tt> element
object_ :: Term arg result => arg -> result

-- | <tt>ol</tt> element
ol_ :: Term arg result => arg -> result

-- | <tt>optgroup</tt> element
optgroup_ :: Term arg result => arg -> result

-- | <tt>option</tt> element
option_ :: Term arg result => arg -> result

-- | <tt>output</tt> element
output_ :: Term arg result => arg -> result

-- | <tt>p</tt> element
p_ :: Term arg result => arg -> result

-- | <tt>param</tt> element
param_ :: Monad m => [Attribute] -> HtmlT m ()

-- | The <tt>svg</tt> attribute.
svg_ :: Term arg result => arg -> result

-- | <tt>pre</tt> element
pre_ :: Term arg result => arg -> result

-- | <tt>progress</tt> element
progress_ :: Term arg result => arg -> result

-- | <tt>q</tt> element
q_ :: Term arg result => arg -> result

-- | <tt>rp</tt> element
rp_ :: Term arg result => arg -> result

-- | <tt>rt</tt> element
rt_ :: Term arg result => arg -> result

-- | <tt>ruby</tt> element
ruby_ :: Term arg result => arg -> result

-- | <tt>samp</tt> element
samp_ :: Term arg result => arg -> result

-- | <tt>script</tt> element
script_ :: TermRaw arg result => arg -> result

-- | <tt>section</tt> element
section_ :: Term arg result => arg -> result

-- | <tt>select</tt> element
select_ :: Term arg result => arg -> result

-- | <tt>small</tt> element
small_ :: Term arg result => arg -> result

-- | <tt>source</tt> element
source_ :: Monad m => [Attribute] -> HtmlT m ()

-- | <tt>span</tt> element or <tt>span</tt> attribute
span_ :: Term arg result => arg -> result

-- | <tt>strong</tt> element
strong_ :: Term arg result => arg -> result

-- | <tt>style</tt> element or <tt>style</tt> attribute
style_ :: TermRaw arg result => arg -> result

-- | <tt>sub</tt> element
sub_ :: Term arg result => arg -> result

-- | <tt>summary</tt> element or <tt>summary</tt> attribute
summary_ :: Term arg result => arg -> result

-- | <tt>sup</tt> element
sup_ :: Term arg result => arg -> result

-- | <tt>table</tt> element
table_ :: Term arg result => arg -> result

-- | <tt>tbody</tt> element
tbody_ :: Term arg result => arg -> result

-- | <tt>td</tt> element
td_ :: Term arg result => arg -> result

-- | <tt>textarea</tt> element
textarea_ :: Term arg result => arg -> result

-- | <tt>tfoot</tt> element
tfoot_ :: Term arg result => arg -> result

-- | <tt>th</tt> element
th_ :: Term arg result => arg -> result

-- | <tt>template</tt> element
template_ :: Term arg result => arg -> result

-- | <tt>thead</tt> element
thead_ :: Term arg result => arg -> result

-- | <tt>time</tt> element
time_ :: Term arg result => arg -> result

-- | <tt>title</tt> element or <tt>title</tt> attribute
title_ :: Term arg result => arg -> result

-- | <tt>tr</tt> element
tr_ :: Term arg result => arg -> result

-- | <tt>track</tt> element
track_ :: Monad m => [Attribute] -> HtmlT m ()

-- | <tt>ul</tt> element
ul_ :: Term arg result => arg -> result

-- | <tt>var</tt> element
var_ :: Term arg result => arg -> result

-- | <tt>video</tt> element
video_ :: Term arg result => arg -> result

-- | <tt>wbr</tt> element
wbr_ :: Monad m => [Attribute] -> HtmlT m ()

-- | The <tt>accept</tt> attribute.
accept_ :: Text -> Attribute

-- | The <tt>acceptCharset</tt> attribute.
acceptCharset_ :: Text -> Attribute

-- | The <tt>accesskey</tt> attribute.
accesskey_ :: Text -> Attribute

-- | The <tt>action</tt> attribute.
action_ :: Text -> Attribute

-- | The <tt>alt</tt> attribute.
alt_ :: Text -> Attribute

-- | The <tt>async</tt> attribute.
async_ :: Text -> Attribute

-- | The <tt>autocomplete</tt> attribute.
autocomplete_ :: Text -> Attribute

-- | The <tt>autofocus</tt> attribute.
autofocus_ :: Attribute

-- | The <tt>autoplay</tt> attribute.
autoplay_ :: Text -> Attribute

-- | The <tt>challenge</tt> attribute.
challenge_ :: Text -> Attribute

-- | The <tt>charset</tt> attribute.
charset_ :: Text -> Attribute

-- | The <tt>checked</tt> attribute.
checked_ :: Attribute

-- | The <tt>class</tt> attribute.
class_ :: Text -> Attribute

-- | The <tt>cols</tt> attribute.
cols_ :: Text -> Attribute

-- | The <tt>colspan</tt> attribute.
colspan_ :: Text -> Attribute

-- | The <tt>content</tt> attribute.
content_ :: Text -> Attribute

-- | The <tt>contenteditable</tt> attribute.
contenteditable_ :: Text -> Attribute

-- | The <tt>contextmenu</tt> attribute.
contextmenu_ :: Text -> Attribute

-- | The <tt>controls</tt> attribute.
controls_ :: Text -> Attribute

-- | The <tt>coords</tt> attribute.
coords_ :: Text -> Attribute

-- | The <tt>data</tt> attribute.
data_ :: Text -> Text -> Attribute

-- | The <tt>datetime</tt> attribute.
datetime_ :: Text -> Attribute

-- | The <tt>defer</tt> attribute.
defer_ :: Text -> Attribute

-- | The <tt>dir</tt> attribute.
dir_ :: Text -> Attribute

-- | The <tt>disabled</tt> attribute.
disabled_ :: Text -> Attribute

-- | The <tt>download</tt> attribute.
download_ :: Text -> Attribute

-- | The <tt>draggable</tt> attribute.
draggable_ :: Text -> Attribute

-- | The <tt>enctype</tt> attribute.
enctype_ :: Text -> Attribute

-- | The <tt>for</tt> attribute.
for_ :: Text -> Attribute

-- | The <tt>formaction</tt> attribute.
formaction_ :: Text -> Attribute

-- | The <tt>formenctype</tt> attribute.
formenctype_ :: Text -> Attribute

-- | The <tt>formmethod</tt> attribute.
formmethod_ :: Text -> Attribute

-- | The <tt>formnovalidate</tt> attribute.
formnovalidate_ :: Text -> Attribute

-- | The <tt>formtarget</tt> attribute.
formtarget_ :: Text -> Attribute

-- | The <tt>headers</tt> attribute.
headers_ :: Text -> Attribute

-- | The <tt>height</tt> attribute.
height_ :: Text -> Attribute

-- | The <tt>hidden</tt> attribute.
hidden_ :: Text -> Attribute

-- | The <tt>high</tt> attribute.
high_ :: Text -> Attribute

-- | The <tt>href</tt> attribute.
href_ :: Text -> Attribute

-- | The <tt>hreflang</tt> attribute.
hreflang_ :: Text -> Attribute

-- | The <tt>httpEquiv</tt> attribute.
httpEquiv_ :: Text -> Attribute

-- | The <tt>icon</tt> attribute.
icon_ :: Text -> Attribute

-- | The <tt>id</tt> attribute.
id_ :: Text -> Attribute

-- | The <tt>ismap</tt> attribute.
ismap_ :: Text -> Attribute

-- | The <tt>item</tt> attribute.
item_ :: Text -> Attribute

-- | The <tt>itemprop</tt> attribute.
itemprop_ :: Text -> Attribute

-- | The <tt>keytype</tt> attribute.
keytype_ :: Text -> Attribute

-- | The <tt>lang</tt> attribute.
lang_ :: Text -> Attribute

-- | The <tt>list</tt> attribute.
list_ :: Text -> Attribute

-- | The <tt>loop</tt> attribute.
loop_ :: Text -> Attribute

-- | The <tt>low</tt> attribute.
low_ :: Text -> Attribute

-- | The <tt>manifest</tt> attribute.
manifest_ :: Text -> Attribute

-- | The <tt>max</tt> attribute.
max_ :: Text -> Attribute

-- | The <tt>maxlength</tt> attribute.
maxlength_ :: Text -> Attribute

-- | The <tt>media</tt> attribute.
media_ :: Text -> Attribute

-- | The <tt>method</tt> attribute.
method_ :: Text -> Attribute

-- | The <tt>min</tt> attribute.
min_ :: Text -> Attribute

-- | The <tt>multiple</tt> attribute.
multiple_ :: Text -> Attribute

-- | The <tt>name</tt> attribute.
name_ :: Text -> Attribute

-- | The <tt>novalidate</tt> attribute.
novalidate_ :: Text -> Attribute

-- | The <tt>onbeforeonload</tt> attribute.
onbeforeonload_ :: Text -> Attribute

-- | The <tt>onbeforeprint</tt> attribute.
onbeforeprint_ :: Text -> Attribute

-- | The <tt>onblur</tt> attribute.
onblur_ :: Text -> Attribute

-- | The <tt>oncanplay</tt> attribute.
oncanplay_ :: Text -> Attribute

-- | The <tt>oncanplaythrough</tt> attribute.
oncanplaythrough_ :: Text -> Attribute

-- | The <tt>onchange</tt> attribute.
onchange_ :: Text -> Attribute

-- | The <tt>onclick</tt> attribute.
onclick_ :: Text -> Attribute

-- | The <tt>oncontextmenu</tt> attribute.
oncontextmenu_ :: Text -> Attribute

-- | The <tt>ondblclick</tt> attribute.
ondblclick_ :: Text -> Attribute

-- | The <tt>ondrag</tt> attribute.
ondrag_ :: Text -> Attribute

-- | The <tt>ondragend</tt> attribute.
ondragend_ :: Text -> Attribute

-- | The <tt>ondragenter</tt> attribute.
ondragenter_ :: Text -> Attribute

-- | The <tt>ondragleave</tt> attribute.
ondragleave_ :: Text -> Attribute

-- | The <tt>ondragover</tt> attribute.
ondragover_ :: Text -> Attribute

-- | The <tt>ondragstart</tt> attribute.
ondragstart_ :: Text -> Attribute

-- | The <tt>ondrop</tt> attribute.
ondrop_ :: Text -> Attribute

-- | The <tt>ondurationchange</tt> attribute.
ondurationchange_ :: Text -> Attribute

-- | The <tt>onemptied</tt> attribute.
onemptied_ :: Text -> Attribute

-- | The <tt>onended</tt> attribute.
onended_ :: Text -> Attribute

-- | The <tt>onerror</tt> attribute.
onerror_ :: Text -> Attribute

-- | The <tt>onfocus</tt> attribute.
onfocus_ :: Text -> Attribute

-- | The <tt>onformchange</tt> attribute.
onformchange_ :: Text -> Attribute

-- | The <tt>onforminput</tt> attribute.
onforminput_ :: Text -> Attribute

-- | The <tt>onhaschange</tt> attribute.
onhaschange_ :: Text -> Attribute

-- | The <tt>oninput</tt> attribute.
oninput_ :: Text -> Attribute

-- | The <tt>oninvalid</tt> attribute.
oninvalid_ :: Text -> Attribute

-- | The <tt>onkeydown</tt> attribute.
onkeydown_ :: Text -> Attribute

-- | The <tt>onkeyup</tt> attribute.
onkeyup_ :: Text -> Attribute

-- | The <tt>onload</tt> attribute.
onload_ :: Text -> Attribute

-- | The <tt>onloadeddata</tt> attribute.
onloadeddata_ :: Text -> Attribute

-- | The <tt>onloadedmetadata</tt> attribute.
onloadedmetadata_ :: Text -> Attribute

-- | The <tt>onloadstart</tt> attribute.
onloadstart_ :: Text -> Attribute

-- | The <tt>onmessage</tt> attribute.
onmessage_ :: Text -> Attribute

-- | The <tt>onmousedown</tt> attribute.
onmousedown_ :: Text -> Attribute

-- | The <tt>onmousemove</tt> attribute.
onmousemove_ :: Text -> Attribute

-- | The <tt>onmouseout</tt> attribute.
onmouseout_ :: Text -> Attribute

-- | The <tt>onmouseover</tt> attribute.
onmouseover_ :: Text -> Attribute

-- | The <tt>onmouseup</tt> attribute.
onmouseup_ :: Text -> Attribute

-- | The <tt>onmousewheel</tt> attribute.
onmousewheel_ :: Text -> Attribute

-- | The <tt>ononline</tt> attribute.
ononline_ :: Text -> Attribute

-- | The <tt>onpagehide</tt> attribute.
onpagehide_ :: Text -> Attribute

-- | The <tt>onpageshow</tt> attribute.
onpageshow_ :: Text -> Attribute

-- | The <tt>onpause</tt> attribute.
onpause_ :: Text -> Attribute

-- | The <tt>onplay</tt> attribute.
onplay_ :: Text -> Attribute

-- | The <tt>onplaying</tt> attribute.
onplaying_ :: Text -> Attribute

-- | The <tt>onprogress</tt> attribute.
onprogress_ :: Text -> Attribute

-- | The <tt>onpropstate</tt> attribute.
onpropstate_ :: Text -> Attribute

-- | The <tt>onratechange</tt> attribute.
onratechange_ :: Text -> Attribute

-- | The <tt>onreadystatechange</tt> attribute.
onreadystatechange_ :: Text -> Attribute

-- | The <tt>onredo</tt> attribute.
onredo_ :: Text -> Attribute

-- | The <tt>onresize</tt> attribute.
onresize_ :: Text -> Attribute

-- | The <tt>onscroll</tt> attribute.
onscroll_ :: Text -> Attribute

-- | The <tt>onseeked</tt> attribute.
onseeked_ :: Text -> Attribute

-- | The <tt>onseeking</tt> attribute.
onseeking_ :: Text -> Attribute

-- | The <tt>onselect</tt> attribute.
onselect_ :: Text -> Attribute

-- | The <tt>onstalled</tt> attribute.
onstalled_ :: Text -> Attribute

-- | The <tt>onstorage</tt> attribute.
onstorage_ :: Text -> Attribute

-- | The <tt>onsubmit</tt> attribute.
onsubmit_ :: Text -> Attribute

-- | The <tt>onsuspend</tt> attribute.
onsuspend_ :: Text -> Attribute

-- | The <tt>ontimeupdate</tt> attribute.
ontimeupdate_ :: Text -> Attribute

-- | The <tt>onundo</tt> attribute.
onundo_ :: Text -> Attribute

-- | The <tt>onunload</tt> attribute.
onunload_ :: Text -> Attribute

-- | The <tt>onvolumechange</tt> attribute.
onvolumechange_ :: Text -> Attribute

-- | The <tt>onwaiting</tt> attribute.
onwaiting_ :: Text -> Attribute

-- | The <tt>open</tt> attribute.
open_ :: Text -> Attribute

-- | The <tt>optimum</tt> attribute.
optimum_ :: Text -> Attribute

-- | The <tt>pattern</tt> attribute.
pattern_ :: Text -> Attribute

-- | The <tt>ping</tt> attribute.
ping_ :: Text -> Attribute

-- | The <tt>placeholder</tt> attribute.
placeholder_ :: Text -> Attribute

-- | The <tt>preload</tt> attribute.
preload_ :: Text -> Attribute

-- | The <tt>pubdate</tt> attribute.
pubdate_ :: Text -> Attribute

-- | The <tt>radiogroup</tt> attribute.
radiogroup_ :: Text -> Attribute

-- | The <tt>readonly</tt> attribute.
readonly_ :: Text -> Attribute

-- | The <tt>rel</tt> attribute.
rel_ :: Text -> Attribute

-- | The <tt>required</tt> attribute.
required_ :: Text -> Attribute

-- | The <tt>reversed</tt> attribute.
reversed_ :: Text -> Attribute

-- | The <tt>role</tt> attribute.
role_ :: Text -> Attribute

-- | The <tt>rows</tt> attribute.
rows_ :: Text -> Attribute

-- | The <tt>rowspan</tt> attribute.
rowspan_ :: Text -> Attribute

-- | The <tt>sandbox</tt> attribute.
sandbox_ :: Text -> Attribute

-- | The <tt>scope</tt> attribute.
scope_ :: Text -> Attribute

-- | The <tt>scoped</tt> attribute.
scoped_ :: Text -> Attribute

-- | The <tt>seamless</tt> attribute.
seamless_ :: Text -> Attribute

-- | The <tt>selected</tt> attribute.
selected_ :: Text -> Attribute

-- | The <tt>shape</tt> attribute.
shape_ :: Text -> Attribute

-- | The <tt>size</tt> attribute.
size_ :: Text -> Attribute

-- | The <tt>sizes</tt> attribute.
sizes_ :: Text -> Attribute

-- | The <tt>spellcheck</tt> attribute.
spellcheck_ :: Text -> Attribute

-- | The <tt>src</tt> attribute.
src_ :: Text -> Attribute

-- | The <tt>srcdoc</tt> attribute.
srcdoc_ :: Text -> Attribute

-- | The <tt>start</tt> attribute.
start_ :: Text -> Attribute

-- | The <tt>step</tt> attribute.
step_ :: Text -> Attribute

-- | The <tt>subject</tt> attribute.
subject_ :: Text -> Attribute

-- | The <tt>tabindex</tt> attribute.
tabindex_ :: Text -> Attribute

-- | The <tt>target</tt> attribute.
target_ :: Text -> Attribute

-- | The <tt>type</tt> attribute.
type_ :: Text -> Attribute

-- | The <tt>usemap</tt> attribute.
usemap_ :: Text -> Attribute

-- | The <tt>value</tt> attribute.
value_ :: Text -> Attribute

-- | The <tt>width</tt> attribute.
width_ :: Text -> Attribute

-- | The <tt>wrap</tt> attribute.
wrap_ :: Text -> Attribute

-- | The <tt>xmlns</tt> attribute.
xmlns_ :: Text -> Attribute


-- | Bootstrap layout elements. See
--   <a>http://getbootstrap.com/2.3.2/scaffolding.html</a> for more
--   information.
module Lucid.Bootstrap

-- | A grid container.
container_ :: Term arg result => arg -> result

-- | A fluid grid container.
containerFluid_ :: Term arg result => arg -> result

-- | A grid row.
row_ :: Term arg result => arg -> result

-- | A fluid grid row.
rowFluid_ :: Term arg result => arg -> result

-- | A span of 1 column.
span1_ :: Term arg result => arg -> result

-- | A span of 2 columns.
span2_ :: Term arg result => arg -> result

-- | A span of 3 columns.
span3_ :: Term arg result => arg -> result

-- | A span of 4 columns.
span4_ :: Term arg result => arg -> result

-- | A span of 5 columns.
span5_ :: Term arg result => arg -> result

-- | A span of 6 columns.
span6_ :: Term arg result => arg -> result

-- | A span of 7 columns.
span7_ :: Term arg result => arg -> result

-- | A span of 8 columns.
span8_ :: Term arg result => arg -> result

-- | A span of 9 columns.
span9_ :: Term arg result => arg -> result

-- | A span of 10 columns.
span10_ :: Term arg result => arg -> result

-- | A span of 11 columns.
span11_ :: Term arg result => arg -> result

-- | A span of 12 columns.
span12_ :: Term arg result => arg -> result


-- | Clear to write, read and edit DSL for writing HTML
--   
--   See <a>Lucid.Html5</a> for a complete list of Html5 combinators. That
--   module is re-exported from this module for your convenience.
--   
--   See <a>Lucid.Base</a> for lower level functions like
--   <a>makeElement</a>, <a>makeAttribute</a>, <a>termRaw</a>, etc.
module Lucid

-- | Render the HTML to a lazy <a>Text</a>.
--   
--   This is a convenience function defined in terms of <a>execHtmlT</a>,
--   <a>runIdentity</a> and <a>toLazyByteString</a>, and <a>decodeUtf8</a>.
--   Check the source if you're interested in the lower-level behaviour.
renderText :: Html a -> Text

-- | Render the HTML to a lazy <a>ByteString</a>.
--   
--   This is a convenience function defined in terms of <a>execHtmlT</a>,
--   <a>runIdentity</a> and <a>toLazyByteString</a>. Check the source if
--   you're interested in the lower-level behaviour.
renderBS :: Html a -> ByteString

-- | Render the HTML to a lazy <a>Text</a>, but in a monad.
--   
--   This is a convenience function defined in terms of <a>execHtmlT</a>
--   and <a>toLazyByteString</a>, and <a>decodeUtf8</a>. Check the source
--   if you're interested in the lower-level behaviour.
renderTextT :: Monad m => HtmlT m a -> m Text

-- | Render the HTML to a lazy <a>ByteString</a>, but in a monad.
--   
--   This is a convenience function defined in terms of <a>execHtmlT</a>
--   and <a>toLazyByteString</a>. Check the source if you're interested in
--   the lower-level behaviour.
renderBST :: Monad m => HtmlT m a -> m ByteString

-- | Render the HTML to a lazy <a>ByteString</a>.
--   
--   This is a convenience function defined in terms of <a>execHtmlT</a>,
--   <a>runIdentity</a> and <a>toLazyByteString</a>. Check the source if
--   you're interested in the lower-level behaviour.
renderToFile :: FilePath -> Html a -> IO ()

-- | Build the HTML. Analogous to <tt>execState</tt>.
--   
--   You might want to use this is if you want to do something with the raw
--   <a>Builder</a>. Otherwise for simple cases you can just use
--   <a>renderText</a> or <a>renderBS</a>.
execHtmlT :: Monad m => HtmlT m a -> m Builder

-- | Evaluate the HTML to its return value. Analogous to
--   <tt>evalState</tt>.
--   
--   Use this if you want to ignore the HTML output of an action completely
--   and just get the result.
--   
--   For using with the <a>Html</a> type, you'll need <a>runIdentity</a>
--   e.g.
--   
--   <pre>
--   &gt;&gt;&gt; runIdentity (evalHtmlT (p_ "Hello!"))
--   ()
--   </pre>
evalHtmlT :: Monad m => HtmlT m a -> m a

-- | This is the low-level way to run the HTML transformer, finally
--   returning an element builder and a value. You can pass <a>mempty</a>
--   for this argument for a top-level call. See <a>evalHtmlT</a> and
--   <a>execHtmlT</a> for easier to use functions.
runHtmlT :: HtmlT m a -> m (HashMap Text Text -> Builder, a)

-- | Simple HTML builder type. Defined in terms of <a>HtmlT</a>. Check out
--   that type for instance information.
--   
--   Simple use-cases will just use this type. But if you want to
--   transformer over Reader or something, you can go and use <a>HtmlT</a>.
type Html = HtmlT Identity

-- | A monad transformer that generates HTML. Use the simpler <a>Html</a>
--   type if you don't want to transform over some other monad.
data HtmlT m a

-- | A simple attribute. Don't use the constructor, use
--   <a>makeAttribute</a>.
data Attribute

-- | Used to construct HTML terms.
--   
--   Simplest use: p_ = term "p" yields <a>p_</a>.
--   
--   Very overloaded for three cases:
--   
--   <ul>
--   <li>The first case is the basic <tt>arg</tt> of <tt>[(Text,Text)]</tt>
--   which will return a function that wants children.</li>
--   <li>The second is an <tt>arg</tt> which is <tt>HtmlT m ()</tt>, in
--   which case the term accepts no attributes and just the children are
--   used for the element.</li>
--   <li>Finally, this is also used for overloaded attributes, like
--   <a>style_</a> or <a>title_</a>. If a return type of
--   <tt>(Text,Text)</tt> is inferred then an attribute will be made.</li>
--   </ul>
--   
--   The instances look intimidating but actually the constraints make it
--   very general so that type inference works well even in the presence of
--   things like <tt>OverloadedLists</tt> and such.
class Term arg result | result -> arg where term = flip termWith []

-- | Used for constructing elements e.g. <tt>term "p"</tt> yields
--   <a>p_</a>.
term :: Term arg result => Text -> arg -> result

-- | Use this if you want to make an element which inserts some
--   pre-prepared attributes into the element.
termWith :: Term arg result => Text -> [Attribute] -> arg -> result

-- | Can be converted to HTML.
class ToHtml a
toHtml :: (ToHtml a, Monad m) => a -> HtmlT m ()
toHtmlRaw :: (ToHtml a, Monad m) => a -> HtmlT m ()

-- | With an element use these attributes. An overloaded way of adding
--   attributes either to an element accepting attributes-and-children or
--   one that just accepts attributes. See the two instances.
class With a

-- | With the given element(s), use the given attributes.
with :: With a => a -> [Attribute] -> a
