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


-- | Add support for using HSP with Reform
--   
--   Reform is a library for building and validating forms using
--   applicative functors. This package add support for using reform with
--   HSP.
@package reform-hsp
@version 0.2.7.2

module Text.Reform.HSP.Common
inputText :: (Monad m, FormError error, XMLGenerator x, StringType x ~ Text, EmbedAsAttr x (Attr Text FormId), EmbedAsAttr x (Attr Text text)) => (input -> Either error text) -> text -> Form m input error [XMLGenT x (XMLType x)] () text
inputEmail :: (Monad m, FormError error, XMLGenerator x, StringType x ~ Text, EmbedAsAttr x (Attr Text FormId), EmbedAsAttr x (Attr Text text)) => (input -> Either error text) -> text -> Form m input error [XMLGenT x (XMLType x)] () text
inputPassword :: (Monad m, FormError error, XMLGenerator x, StringType x ~ Text, EmbedAsAttr x (Attr Text FormId), EmbedAsAttr x (Attr Text text)) => (input -> Either error text) -> text -> Form m input error [XMLGenT x (XMLType x)] () text
inputSubmit :: (Monad m, FormError error, XMLGenerator x, StringType x ~ Text, EmbedAsAttr x (Attr Text FormId), EmbedAsAttr x (Attr Text text)) => (input -> Either error text) -> text -> Form m input error [XMLGenT x (XMLType x)] () (Maybe text)
inputReset :: (Monad m, FormError error, XMLGenerator x, StringType x ~ Text, EmbedAsAttr x (Attr Text FormId), EmbedAsAttr x (Attr Text text)) => text -> Form m input error [XMLGenT x (XMLType x)] () ()
inputHidden :: (Monad m, FormError error, XMLGenerator x, StringType x ~ Text, EmbedAsAttr x (Attr Text FormId), EmbedAsAttr x (Attr Text text)) => (input -> Either error text) -> text -> Form m input error [XMLGenT x (XMLType x)] () text
inputButton :: (Monad m, FormError error, XMLGenerator x, StringType x ~ Text, EmbedAsAttr x (Attr Text FormId), EmbedAsAttr x (Attr Text text)) => text -> Form m input error [XMLGenT x (XMLType x)] () ()
textarea :: (Monad m, FormError error, XMLGenerator x, StringType x ~ Text, EmbedAsAttr x (Attr Text FormId), EmbedAsChild x text) => (input -> Either error text) -> Int -> Int -> text -> Form m input error [XMLGenT x (XMLType x)] () text

-- | Create an <tt>&lt;input type="file"&gt;</tt> element
--   
--   This control may succeed even if the user does not actually select a
--   file to upload. In that case the uploaded name will likely be "" and
--   the file contents will be empty as well.
inputFile :: (Monad m, FormError error, FormInput input, ErrorInputType error ~ input, XMLGenerator x, StringType x ~ Text, EmbedAsAttr x (Attr Text FormId)) => Form m input error [XMLGenT x (XMLType x)] () (FileType input)

-- | Create a <tt>&lt;button type="submit"&gt;</tt> element
buttonSubmit :: (Monad m, FormError error, XMLGenerator x, StringType x ~ Text, EmbedAsChild x children, EmbedAsAttr x (Attr Text FormId), EmbedAsAttr x (Attr Text text)) => (input -> Either error text) -> text -> children -> Form m input error [XMLGenT x (XMLType x)] () (Maybe text)
buttonReset :: (Monad m, FormError error, XMLGenerator x, StringType x ~ Text, EmbedAsChild x children, EmbedAsAttr x (Attr Text FormId)) => children -> Form m input error [XMLGenT x (XMLType x)] () ()
button :: (Monad m, FormError error, XMLGenerator x, StringType x ~ Text, EmbedAsChild x children, EmbedAsAttr x (Attr Text FormId)) => children -> Form m input error [XMLGenT x (XMLType x)] () ()
label :: (Monad m, XMLGenerator x, StringType x ~ Text, EmbedAsAttr x (Attr Text FormId), EmbedAsChild x c) => c -> Form m input error [XMLGenT x (XMLType x)] () ()
inputCheckbox :: forall x error input m. (Monad m, FormInput input, FormError error, ErrorInputType error ~ input, XMLGenerator x, StringType x ~ Text, EmbedAsAttr x (Attr Text FormId)) => Bool -> Form m input error [XMLGenT x (XMLType x)] () Bool
inputCheckboxes :: (Functor m, Monad m, FormError error, ErrorInputType error ~ input, FormInput input, XMLGenerator x, StringType x ~ Text, EmbedAsChild x lbl, EmbedAsAttr x (Attr Text FormId)) => [(a, lbl)] -> (a -> Bool) -> Form m input error [XMLGenT x (XMLType x)] () [a]
inputRadio :: (Functor m, Monad m, FormError error, ErrorInputType error ~ input, FormInput input, XMLGenerator x, StringType x ~ Text, EmbedAsChild x lbl, EmbedAsAttr x (Attr Text FormId)) => [(a, lbl)] -> (a -> Bool) -> Form m input error [XMLGenT x (XMLType x)] () a
inputRadioForms :: forall m x error input lbl proof a. (Functor m, Monad m, FormError error, ErrorInputType error ~ input, FormInput input, XMLGenerator x, StringType x ~ Text, EmbedAsChild x lbl, EmbedAsAttr x (Attr Text FormId)) => [(Form m input error [XMLGenT x (XMLType x)] proof a, lbl)] -> a -> Form m input error [XMLGenT x (XMLType x)] proof a
inputRadioForms' :: forall m x error input lbl proof a. (Functor m, Monad m, FormError error, ErrorInputType error ~ input, FormInput input, XMLGenerator x, StringType x ~ Text, EmbedAsChild x lbl, EmbedAsAttr x (Attr Text FormId)) => (FormId -> FormId -> [FormId] -> Text) -> [(Form m input error [XMLGenT x (XMLType x)] proof a, lbl)] -> a -> Form m input error [XMLGenT x (XMLType x)] proof a
select :: (Functor m, Monad m, FormError error, ErrorInputType error ~ input, FormInput input, XMLGenerator x, StringType x ~ Text, EmbedAsChild x lbl, EmbedAsAttr x (Attr Text FormId)) => [(a, lbl)] -> (a -> Bool) -> Form m input error [XMLGenT x (XMLType x)] () a
selectMultiple :: (Functor m, Monad m, FormError error, ErrorInputType error ~ input, FormInput input, XMLGenerator x, StringType x ~ Text, EmbedAsChild x lbl, EmbedAsAttr x (Attr Text FormId)) => [(a, lbl)] -> (a -> Bool) -> Form m input error [XMLGenT x (XMLType x)] () [a]
errorList :: (Monad m, XMLGenerator x, StringType x ~ Text, EmbedAsChild x error) => Form m input error [XMLGenT x (XMLType x)] () ()
childErrorList :: (Monad m, XMLGenerator x, StringType x ~ Text, EmbedAsChild x error) => Form m input error [XMLGenT x (XMLType x)] () ()
br :: (Monad m, XMLGenerator x, StringType x ~ Text) => Form m input error [XMLGenT x (XMLType x)] () ()
fieldset :: (Monad m, Functor m, XMLGenerator x, StringType x ~ Text, EmbedAsChild x c) => Form m input error c proof a -> Form m input error [XMLGenT x (XMLType x)] proof a
ol :: (Monad m, Functor m, XMLGenerator x, StringType x ~ Text, EmbedAsChild x c) => Form m input error c proof a -> Form m input error [XMLGenT x (XMLType x)] proof a
ul :: (Monad m, Functor m, XMLGenerator x, StringType x ~ Text, EmbedAsChild x c) => Form m input error c proof a -> Form m input error [XMLGenT x (XMLType x)] proof a
li :: (Monad m, Functor m, XMLGenerator x, StringType x ~ Text, EmbedAsChild x c) => Form m input error c proof a -> Form m input error [XMLGenT x (XMLType x)] proof a

-- | create <tt>&lt;form action=action method="POST"
--   enctype="multipart/form-data"&gt;</tt>
form :: (XMLGenerator x, StringType x ~ Text, EmbedAsAttr x (Attr Text action)) => action -> [(Text, Text)] -> [XMLGenT x (XMLType x)] -> [XMLGenT x (XMLType x)]
setAttrs :: (EmbedAsAttr x attr, XMLGenerator x, StringType x ~ Text, Monad m, Functor m) => Form m input error [GenXML x] proof a -> attr -> Form m input error [GenXML x] proof a
instance (HSP.XMLGenerator.XMLGen m, HSP.XMLGenerator.EmbedAsAttr m (HSP.XMLGenerator.Attr Data.Text.Internal.Lazy.Text Data.Text.Internal.Lazy.Text)) => HSP.XMLGenerator.EmbedAsAttr m (HSP.XMLGenerator.Attr Data.Text.Internal.Lazy.Text Text.Reform.Result.FormId)


-- | This module provides functions creating Reform using HSP markup.
--   
--   This module assumes that you wish for text based controls such as
--   <a>inputText</a> and <a>textarea</a> to using <a>String</a> values. If
--   you prefer <a>Text</a> see <a>Text.Reform.HSP.Text</a>.
module Text.Reform.HSP.String

-- | Create an <tt>&lt;input type="email"&gt;</tt> element
inputEmail :: (Monad m, FormInput input, FormError error, ErrorInputType error ~ input, XMLGenerator x, StringType x ~ Text, EmbedAsAttr x (Attr Text FormId), EmbedAsAttr x (Attr Text String)) => String -> Form m input error [XMLGenT x (XMLType x)] () String

-- | Create an <tt>&lt;input type="text"&gt;</tt> element
inputText :: (Monad m, FormInput input, FormError error, ErrorInputType error ~ input, XMLGenerator x, StringType x ~ Text, EmbedAsAttr x (Attr Text FormId), EmbedAsAttr x (Attr Text String)) => String -> Form m input error [XMLGenT x (XMLType x)] () String

-- | Create an <tt>&lt;input type="password"&gt;</tt> element
inputPassword :: (Monad m, FormInput input, FormError error, ErrorInputType error ~ input, XMLGenerator x, StringType x ~ Text, EmbedAsAttr x (Attr Text FormId), EmbedAsAttr x (Attr Text String)) => Form m input error [XMLGenT x (XMLType x)] () String

-- | Create an <tt>&lt;input type="submit"&gt;</tt> element
--   
--   returns:
--   
--   <ul>
--   <li><i><tt>Just</tt> <i>value</i></i> if this button was used to
--   submit the form.</li>
--   <li><i><tt>Nothing</tt></i> if this button was not used to submit the
--   form.</li>
--   </ul>
inputSubmit :: (Monad m, FormInput input, FormError error, ErrorInputType error ~ input, XMLGenerator x, StringType x ~ Text, EmbedAsAttr x (Attr Text FormId), EmbedAsAttr x (Attr Text String)) => String -> Form m input error [XMLGenT x (XMLType x)] () (Maybe String)

-- | Create an <tt>&lt;input type="reset"&gt;</tt> element
--   
--   This element does not add any data to the form data set.
inputReset :: (Monad m, FormInput input, FormError error, ErrorInputType error ~ input, XMLGenerator x, StringType x ~ Text, EmbedAsAttr x (Attr Text FormId), EmbedAsAttr x (Attr Text String)) => String -> Form m input error [XMLGenT x (XMLType x)] () ()

-- | Create an <tt>&lt;input type="hidden"&gt;</tt> element
inputHidden :: (Monad m, FormInput input, FormError error, ErrorInputType error ~ input, XMLGenerator x, StringType x ~ Text, EmbedAsAttr x (Attr Text FormId), EmbedAsAttr x (Attr Text String)) => String -> Form m input error [XMLGenT x (XMLType x)] () String

-- | Create an <tt>&lt;input type="button"&gt;</tt> element
--   
--   The element is a push button with a text label. The button does
--   nothing by default, but actions can be added using javascript. This
--   element does not add any data to the form data set.
--   
--   see also: <a>button</a>
inputButton :: (Monad m, FormInput input, FormError error, ErrorInputType error ~ input, XMLGenerator x, StringType x ~ Text, EmbedAsAttr x (Attr Text FormId), EmbedAsAttr x (Attr Text String)) => String -> Form m input error [XMLGenT x (XMLType x)] () ()

-- | Create a single <tt>&lt;input type="checkbox"&gt;</tt> element
--   
--   returns a <a>Bool</a> indicating if it was checked or not.
--   
--   see also <a>inputCheckboxes</a>
inputCheckbox :: forall x error input m. (Monad m, FormInput input, FormError error, ErrorInputType error ~ input, XMLGenerator x, StringType x ~ Text, EmbedAsAttr x (Attr Text FormId)) => Bool -> Form m input error [XMLGenT x (XMLType x)] () Bool

-- | Create a group of <tt>&lt;input type="checkbox"&gt;</tt> elements
inputCheckboxes :: (Functor m, Monad m, FormError error, ErrorInputType error ~ input, FormInput input, XMLGenerator x, StringType x ~ Text, EmbedAsChild x lbl, EmbedAsAttr x (Attr Text FormId)) => [(a, lbl)] -> (a -> Bool) -> Form m input error [XMLGenT x (XMLType x)] () [a]

-- | Create a group of <tt>&lt;input type="radio"&gt;</tt> elements
inputRadio :: (Functor m, Monad m, FormError error, ErrorInputType error ~ input, FormInput input, XMLGenerator x, StringType x ~ Text, EmbedAsChild x lbl, EmbedAsAttr x (Attr Text FormId)) => [(a, lbl)] -> (a -> Bool) -> Form m input error [XMLGenT x (XMLType x)] () a

-- | Create a group of radio buttons that select between sub-forms
inputRadioForms :: (Functor m, Monad m, FormError error, ErrorInputType error ~ input, FormInput input, XMLGenerator x, StringType x ~ Text, EmbedAsChild x lbl, EmbedAsAttr x (Attr Text FormId)) => [(Form m input error [XMLGenT x (XMLType x)] proof a, lbl)] -> a -> Form m input error [XMLGenT x (XMLType x)] proof a

-- | Create an <tt>&lt;input type="file"&gt;</tt> element
--   
--   This control may succeed even if the user does not actually select a
--   file to upload. In that case the uploaded name will likely be "" and
--   the file contents will be empty as well.
inputFile :: (Monad m, FormError error, FormInput input, ErrorInputType error ~ input, XMLGenerator x, StringType x ~ Text, EmbedAsAttr x (Attr Text FormId)) => Form m input error [XMLGenT x (XMLType x)] () (FileType input)

-- | Create a &lt;textarea&gt;&lt;/textarea&gt; element
textarea :: (Monad m, FormInput input, FormError error, ErrorInputType error ~ input, XMLGenerator x, StringType x ~ Text, EmbedAsAttr x (Attr Text FormId)) => Int -> Int -> String -> Form m input error [XMLGenT x (XMLType x)] () String

-- | create a <tt>&lt;button type="submit"&gt;&lt;/button&gt;</tt> element
buttonSubmit :: (Monad m, FormError error, FormInput input, ErrorInputType error ~ input, XMLGenerator x, StringType x ~ Text, EmbedAsChild x children, EmbedAsAttr x (Attr Text FormId), EmbedAsAttr x (Attr Text String)) => String -> children -> Form m input error [XMLGenT x (XMLType x)] () (Maybe String)

-- | create a <tt>&lt;button type="reset"&gt;&lt;/button&gt;</tt> element
--   
--   This element does not add any data to the form data set.
buttonReset :: (Monad m, FormError error, XMLGenerator x, StringType x ~ Text, EmbedAsChild x children, EmbedAsAttr x (Attr Text FormId)) => children -> Form m input error [XMLGenT x (XMLType x)] () ()

-- | create a <tt>&lt;button type="button"&gt;&lt;/button&gt;</tt> element
--   
--   This element does not add any data to the form data set.
button :: (Monad m, FormError error, FormInput input, ErrorInputType error ~ input, XMLGenerator x, StringType x ~ Text, EmbedAsChild x children, EmbedAsAttr x (Attr Text FormId)) => children -> Form m input error [XMLGenT x (XMLType x)] () ()

-- | create <tt>&lt;select&gt;&lt;/select&gt;</tt> element plus its
--   <tt>&lt;option&gt;&lt;/option&gt;</tt> children.
--   
--   see also: <a>selectMultiple</a>
select :: (Functor m, Monad m, FormError error, ErrorInputType error ~ input, FormInput input, XMLGenerator x, StringType x ~ Text, EmbedAsChild x lbl, EmbedAsAttr x (Attr Text FormId)) => [(a, lbl)] -> (a -> Bool) -> Form m input error [XMLGenT x (XMLType x)] () a

-- | create <tt>&lt;select multiple="multiple"&gt;&lt;/select&gt;</tt>
--   element plus its <tt>&lt;option&gt;&lt;/option&gt;</tt> children.
--   
--   This creates a <tt>&lt;select&gt;</tt> element which allows more than
--   one item to be selected.
selectMultiple :: (Functor m, Monad m, FormError error, ErrorInputType error ~ input, FormInput input, XMLGenerator x, StringType x ~ Text, EmbedAsChild x lbl, EmbedAsAttr x (Attr Text FormId)) => [(a, lbl)] -> (a -> Bool) -> Form m input error [XMLGenT x (XMLType x)] () [a]

-- | create a <tt>&lt;label&gt;</tt> element.
--   
--   Use this with <a>or ++</a> to ensure that the <tt>for</tt> attribute
--   references the correct <tt>id</tt>.
--   
--   <pre>
--   label "some input field: " ++&gt; inputText ""
--   </pre>
label :: (Monad m, XMLGenerator x, StringType x ~ Text, EmbedAsAttr x (Attr Text FormId), EmbedAsChild x c) => c -> Form m input error [XMLGenT x (XMLType x)] () ()

-- | create a <tt>&lt;ul&gt;</tt> which contains all the errors related to
--   the <a>Form</a>.
--   
--   The <tt><a>ul</a></tt> will have the attribute
--   <tt>class="reform-error-list"</tt>.
errorList :: (Monad m, XMLGenerator x, StringType x ~ Text, EmbedAsChild x error) => Form m input error [XMLGenT x (XMLType x)] () ()

-- | create a <tt>&lt;ul&gt;</tt> which contains all the errors related to
--   the <a>Form</a>.
--   
--   Includes errors from children of the current form.
--   
--   The <tt><a>ul</a></tt> will have the attribute
--   <tt>class="reform-error-list"</tt>.
childErrorList :: (Monad m, XMLGenerator x, StringType x ~ Text, EmbedAsChild x error) => Form m input error [XMLGenT x (XMLType x)] () ()

-- | create a <tt>&lt;br&gt;</tt> tag.
br :: (Monad m, XMLGenerator x, StringType x ~ Text) => Form m input error [XMLGenT x (XMLType x)] () ()

-- | wrap a <tt>&lt;fieldset class="reform"&gt;</tt> around a <a>Form</a>
fieldset :: (Monad m, Functor m, XMLGenerator x, StringType x ~ Text, EmbedAsChild x c) => Form m input error c proof a -> Form m input error [XMLGenT x (XMLType x)] proof a

-- | wrap an <tt>&lt;ol class="reform"&gt;</tt> around a <a>Form</a>
ol :: (Monad m, Functor m, XMLGenerator x, StringType x ~ Text, EmbedAsChild x c) => Form m input error c proof a -> Form m input error [XMLGenT x (XMLType x)] proof a

-- | wrap a <tt>&lt;ul class="reform"&gt;</tt> around a <a>Form</a>
ul :: (Monad m, Functor m, XMLGenerator x, StringType x ~ Text, EmbedAsChild x c) => Form m input error c proof a -> Form m input error [XMLGenT x (XMLType x)] proof a

-- | wrap a <tt>&lt;li class="reform"&gt;</tt> around a <a>Form</a>
li :: (Monad m, Functor m, XMLGenerator x, StringType x ~ Text, EmbedAsChild x c) => Form m input error c proof a -> Form m input error [XMLGenT x (XMLType x)] proof a

-- | create <tt>&lt;form action=action method="POST"
--   enctype="multipart/form-data"&gt;</tt>
form :: (XMLGenerator x, StringType x ~ Text, EmbedAsAttr x (Attr Text action)) => action -> [(Text, Text)] -> [XMLGenT x (XMLType x)] -> [XMLGenT x (XMLType x)]

-- | set the attributes on the top-level elements of <a>Form</a>
setAttrs :: (EmbedAsAttr x attr, XMLGenerator x, StringType x ~ Text, Monad m, Functor m) => Form m input error [XMLGenT x (XMLType x)] proof a -> attr -> Form m input error [GenXML x] proof a


-- | This module provides functions creating Reform using HSP markup.
--   
--   This module assumes that you wish for text based controls such as
--   <a>inputText</a> and <a>textarea</a> to using <a>Text</a> values. If
--   you prefer <a>String</a> see <a>Text.Reform.HSP.String</a>.
module Text.Reform.HSP.Text

-- | Create an <tt>&lt;input type="email"&gt;</tt> element
inputEmail :: (Monad m, FormInput input, FormError error, ErrorInputType error ~ input, XMLGenerator x, StringType x ~ Text, EmbedAsAttr x (Attr Text FormId), EmbedAsAttr x (Attr Text Text)) => Text -> Form m input error [XMLGenT x (XMLType x)] () Text

-- | Create an <tt>&lt;input type="text"&gt;</tt> element
inputText :: (Monad m, FormInput input, FormError error, ErrorInputType error ~ input, XMLGenerator x, StringType x ~ Text, EmbedAsAttr x (Attr Text FormId), EmbedAsAttr x (Attr Text Text)) => Text -> Form m input error [XMLGenT x (XMLType x)] () Text

-- | Create an <tt>&lt;input type="password"&gt;</tt> element
inputPassword :: (Monad m, FormInput input, FormError error, ErrorInputType error ~ input, XMLGenerator x, StringType x ~ Text, EmbedAsAttr x (Attr Text FormId), EmbedAsAttr x (Attr Text Text)) => Form m input error [XMLGenT x (XMLType x)] () Text

-- | Create an <tt>&lt;input type="submit"&gt;</tt> element
--   
--   returns:
--   
--   <ul>
--   <li><i><tt>Just</tt> <i>value</i></i> if this button was used to
--   submit the form.</li>
--   <li><i><tt>Nothing</tt></i> if this button was not used to submit the
--   form.</li>
--   </ul>
inputSubmit :: (Monad m, FormInput input, FormError error, ErrorInputType error ~ input, XMLGenerator x, StringType x ~ Text, EmbedAsAttr x (Attr Text FormId), EmbedAsAttr x (Attr Text Text)) => Text -> Form m input error [XMLGenT x (XMLType x)] () (Maybe Text)

-- | Create an <tt>&lt;input type="reset"&gt;</tt> element
--   
--   This element does not add any data to the form data set.
inputReset :: (Monad m, FormInput input, FormError error, ErrorInputType error ~ input, XMLGenerator x, StringType x ~ Text, EmbedAsAttr x (Attr Text FormId), EmbedAsAttr x (Attr Text Text)) => Text -> Form m input error [XMLGenT x (XMLType x)] () ()

-- | Create an <tt>&lt;input type="hidden"&gt;</tt> element
inputHidden :: (Monad m, FormInput input, FormError error, ErrorInputType error ~ input, XMLGenerator x, StringType x ~ Text, EmbedAsAttr x (Attr Text FormId), EmbedAsAttr x (Attr Text Text)) => Text -> Form m input error [XMLGenT x (XMLType x)] () Text

-- | Create an <tt>&lt;input type="button"&gt;</tt> element
--   
--   The element is a push button with a text label. The button does
--   nothing by default, but actions can be added using javascript. This
--   element does not add any data to the form data set.
--   
--   see also: <a>button</a>
inputButton :: (Monad m, FormInput input, FormError error, ErrorInputType error ~ input, XMLGenerator x, StringType x ~ Text, EmbedAsAttr x (Attr Text FormId), EmbedAsAttr x (Attr Text Text)) => Text -> Form m input error [XMLGenT x (XMLType x)] () ()

-- | Create a single <tt>&lt;input type="checkbox"&gt;</tt> element
--   
--   returns a <a>Bool</a> indicating if it was checked or not.
--   
--   see also <a>inputCheckboxes</a>
inputCheckbox :: forall x error input m. (Monad m, FormInput input, FormError error, ErrorInputType error ~ input, XMLGenerator x, StringType x ~ Text, EmbedAsAttr x (Attr Text FormId)) => Bool -> Form m input error [XMLGenT x (XMLType x)] () Bool

-- | Create a group of <tt>&lt;input type="checkbox"&gt;</tt> elements
inputCheckboxes :: (Functor m, Monad m, FormError error, ErrorInputType error ~ input, FormInput input, XMLGenerator x, StringType x ~ Text, EmbedAsChild x lbl, EmbedAsAttr x (Attr Text FormId)) => [(a, lbl)] -> (a -> Bool) -> Form m input error [XMLGenT x (XMLType x)] () [a]

-- | Create a group of <tt>&lt;input type="radio"&gt;</tt> elements
inputRadio :: (Functor m, Monad m, FormError error, ErrorInputType error ~ input, FormInput input, XMLGenerator x, StringType x ~ Text, EmbedAsChild x lbl, EmbedAsAttr x (Attr Text FormId)) => [(a, lbl)] -> (a -> Bool) -> Form m input error [XMLGenT x (XMLType x)] () a

-- | Create a group of radio buttons that select between sub-forms
inputRadioForms :: (Functor m, Monad m, FormError error, ErrorInputType error ~ input, FormInput input, XMLGenerator x, StringType x ~ Text, EmbedAsChild x lbl, EmbedAsAttr x (Attr Text FormId)) => [(Form m input error [XMLGenT x (XMLType x)] proof a, lbl)] -> a -> Form m input error [XMLGenT x (XMLType x)] proof a

-- | Create an <tt>&lt;input type="file"&gt;</tt> element
--   
--   This control may succeed even if the user does not actually select a
--   file to upload. In that case the uploaded name will likely be "" and
--   the file contents will be empty as well.
inputFile :: (Monad m, FormError error, FormInput input, ErrorInputType error ~ input, XMLGenerator x, StringType x ~ Text, EmbedAsAttr x (Attr Text FormId)) => Form m input error [XMLGenT x (XMLType x)] () (FileType input)

-- | Create a &lt;textarea&gt;&lt;/textarea&gt; element
textarea :: (Monad m, FormInput input, FormError error, ErrorInputType error ~ input, XMLGenerator x, StringType x ~ Text, EmbedAsAttr x (Attr Text FormId), EmbedAsAttr x (Attr Text Text), EmbedAsChild x Text) => Int -> Int -> Text -> Form m input error [XMLGenT x (XMLType x)] () Text

-- | create a <tt>&lt;button type="submit"&gt;&lt;/button&gt;</tt> element
buttonSubmit :: (Monad m, FormError error, FormInput input, ErrorInputType error ~ input, XMLGenerator x, StringType x ~ Text, EmbedAsChild x children, EmbedAsAttr x (Attr Text FormId), EmbedAsAttr x (Attr Text Text)) => Text -> children -> Form m input error [XMLGenT x (XMLType x)] () (Maybe Text)

-- | create a <tt>&lt;button type="reset"&gt;&lt;/button&gt;</tt> element
--   
--   This element does not add any data to the form data set.
buttonReset :: (Monad m, FormError error, XMLGenerator x, StringType x ~ Text, EmbedAsChild x children, EmbedAsAttr x (Attr Text FormId)) => children -> Form m input error [XMLGenT x (XMLType x)] () ()

-- | create a <tt>&lt;button type="button"&gt;&lt;/button&gt;</tt> element
--   
--   This element does not add any data to the form data set.
button :: (Monad m, FormError error, FormInput input, ErrorInputType error ~ input, XMLGenerator x, StringType x ~ Text, EmbedAsChild x children, EmbedAsAttr x (Attr Text FormId)) => children -> Form m input error [XMLGenT x (XMLType x)] () ()

-- | create <tt>&lt;select&gt;&lt;/select&gt;</tt> element plus its
--   <tt>&lt;option&gt;&lt;/option&gt;</tt> children.
--   
--   see also: <a>selectMultiple</a>
select :: (Functor m, Monad m, FormError error, ErrorInputType error ~ input, FormInput input, XMLGenerator x, StringType x ~ Text, EmbedAsChild x lbl, EmbedAsAttr x (Attr Text FormId)) => [(a, lbl)] -> (a -> Bool) -> Form m input error [XMLGenT x (XMLType x)] () a

-- | create <tt>&lt;select multiple="multiple"&gt;&lt;/select&gt;</tt>
--   element plus its <tt>&lt;option&gt;&lt;/option&gt;</tt> children.
--   
--   This creates a <tt>&lt;select&gt;</tt> element which allows more than
--   one item to be selected.
selectMultiple :: (Functor m, Monad m, FormError error, ErrorInputType error ~ input, FormInput input, XMLGenerator x, StringType x ~ Text, EmbedAsChild x lbl, EmbedAsAttr x (Attr Text FormId)) => [(a, lbl)] -> (a -> Bool) -> Form m input error [XMLGenT x (XMLType x)] () [a]

-- | create a <tt>&lt;label&gt;</tt> element.
--   
--   Use this with <a>or ++</a> to ensure that the <tt>for</tt> attribute
--   references the correct <tt>id</tt>.
--   
--   <pre>
--   label "some input field: " ++&gt; inputText ""
--   </pre>
--   
--   see also: <a>labelText</a>
label :: (Monad m, XMLGenerator x, StringType x ~ Text, EmbedAsAttr x (Attr Text FormId), EmbedAsChild x c) => c -> Form m input error [XMLGenT x (XMLType x)] () ()

-- | create a <tt>&lt;label&gt;</tt> element.
--   
--   Use this with <a>or ++</a> to ensure that the <tt>for</tt> attribute
--   references the correct <tt>id</tt>.
--   
--   <pre>
--   labelText "some input field: " ++&gt; inputText ""
--   </pre>
--   
--   This function is provided as an alternative to <a>label</a> because
--   when the <tt>OverloadedStrings</tt> extension is enabled, you will get
--   ambiguous type errors when attempting to apply <a>label</a> to a
--   string literal. While the type error can be fixed using an explicit
--   type signature, calling <a>labelText</a> looks nicer.
labelText :: (Monad m, XMLGenerator x, StringType x ~ Text, EmbedAsAttr x (Attr Text FormId), EmbedAsChild x Text) => Text -> Form m input error [XMLGenT x (XMLType x)] () ()

-- | create a <tt>&lt;ul&gt;</tt> which contains all the errors related to
--   the <a>Form</a>.
--   
--   The <tt><a>ul</a></tt> will have the attribute
--   <tt>class="reform-error-list"</tt>.
errorList :: (Monad m, XMLGenerator x, StringType x ~ Text, EmbedAsChild x error) => Form m input error [XMLGenT x (XMLType x)] () ()

-- | create a <tt>&lt;ul&gt;</tt> which contains all the errors related to
--   the <a>Form</a>.
--   
--   Includes errors from children of the current form.
--   
--   The <tt><a>ul</a></tt> will have the attribute
--   <tt>class="reform-error-list"</tt>.
childErrorList :: (Monad m, XMLGenerator x, StringType x ~ Text, EmbedAsChild x error) => Form m input error [XMLGenT x (XMLType x)] () ()

-- | create a <tt>&lt;br&gt;</tt> tag.
br :: (Monad m, XMLGenerator x, StringType x ~ Text) => Form m input error [XMLGenT x (XMLType x)] () ()

-- | wrap a <tt>&lt;fieldset class="reform"&gt;</tt> around a <a>Form</a>
fieldset :: (Monad m, Functor m, XMLGenerator x, StringType x ~ Text, EmbedAsChild x c) => Form m input error c proof a -> Form m input error [XMLGenT x (XMLType x)] proof a

-- | wrap an <tt>&lt;ol class="reform"&gt;</tt> around a <a>Form</a>
ol :: (Monad m, Functor m, XMLGenerator x, StringType x ~ Text, EmbedAsChild x c) => Form m input error c proof a -> Form m input error [XMLGenT x (XMLType x)] proof a

-- | wrap a <tt>&lt;ul class="reform"&gt;</tt> around a <a>Form</a>
ul :: (Monad m, Functor m, XMLGenerator x, StringType x ~ Text, EmbedAsChild x c) => Form m input error c proof a -> Form m input error [XMLGenT x (XMLType x)] proof a

-- | wrap a <tt>&lt;li class="reform"&gt;</tt> around a <a>Form</a>
li :: (Monad m, Functor m, XMLGenerator x, StringType x ~ Text, EmbedAsChild x c) => Form m input error c proof a -> Form m input error [XMLGenT x (XMLType x)] proof a

-- | create <tt>&lt;form action=action method="POST"
--   enctype="multipart/form-data"&gt;</tt>
form :: (XMLGenerator x, StringType x ~ Text, EmbedAsAttr x (Attr Text action)) => action -> [(Text, Text)] -> [XMLGenT x (XMLType x)] -> [XMLGenT x (XMLType x)]

-- | set the attributes on the top-level elements of <a>Form</a>
setAttrs :: (EmbedAsAttr x attr, XMLGenerator x, StringType x ~ Text, Monad m, Functor m) => Form m input error [XMLGenT x (XMLType x)] proof a -> attr -> Form m input error [GenXML x] proof a
