-- 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.6.1

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
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 <input type="file"> 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 <button type="submit"> 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 :: (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 :: (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' :: (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 <form action=action method="POST"
--   enctype="multipart/form-data">
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.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
--   inputText and textarea to using String values. If
--   you prefer Text see Text.Reform.HSP.Text.
module Text.Reform.HSP.String

-- | Create an <input type="text"> 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 <input type="password"> 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 <input type="submit"> element
--   
--   returns:
--   
--   
--   
- Just value if this button was used to
--   submit the form.
--   
- Nothing if this button was not used to submit the
--   form.
--   
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 <input type="reset"> 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 <input type="hidden"> 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 <input type="button"> 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: button
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 <input type="checkbox"> element
--   
--   returns a Bool indicating if it was checked or not.
--   
--   see also inputCheckboxes
inputCheckbox :: (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 <input type="checkbox"> 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 <input type="radio"> 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 <input type="file"> 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 <textarea></textarea> 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 <button type="submit"></button> 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 <button type="reset"></button> 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 <button type="button"></button> 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 <select></select> element plus its
--   <option></option> children.
--   
--   see also: selectMultiple
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 <select multiple="multiple"></select>
--   element plus its <option></option> children.
--   
--   This creates a <select> 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 <label> element.
--   
--   Use this with or ++ to ensure that the for attribute
--   references the correct id.
--   
--   
--   label "some input field: " ++> inputText ""
--   
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 <ul> which contains all the errors related to
--   the Form.
--   
--   The ul will have the attribute
--   class="reform-error-list".
errorList :: (Monad m, XMLGenerator x, StringType x ~ Text, EmbedAsChild x error) => Form m input error [XMLGenT x (XMLType x)] () ()

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

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

-- | wrap a <fieldset class="reform"> around a Form
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 <ol class="reform"> around a Form
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 <ul class="reform"> around a Form
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 <li class="reform"> around a Form
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 <form action=action method="POST"
--   enctype="multipart/form-data">
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 Form
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
--   inputText and textarea to using Text values. If
--   you prefer String see Text.Reform.HSP.String.
module Text.Reform.HSP.Text

-- | Create an <input type="text"> 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 <input type="password"> 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 <input type="submit"> element
--   
--   returns:
--   
--   
--   
- Just value if this button was used to
--   submit the form.
--   
- Nothing if this button was not used to submit the
--   form.
--   
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 <input type="reset"> 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 <input type="hidden"> 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 <input type="button"> 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: button
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 <input type="checkbox"> element
--   
--   returns a Bool indicating if it was checked or not.
--   
--   see also inputCheckboxes
inputCheckbox :: (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 <input type="checkbox"> 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 <input type="radio"> 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 <input type="file"> 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 <textarea></textarea> 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 <button type="submit"></button> 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 <button type="reset"></button> 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 <button type="button"></button> 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 <select></select> element plus its
--   <option></option> children.
--   
--   see also: selectMultiple
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 <select multiple="multiple"></select>
--   element plus its <option></option> children.
--   
--   This creates a <select> 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 <label> element.
--   
--   Use this with or ++ to ensure that the for attribute
--   references the correct id.
--   
--   
--   label "some input field: " ++> inputText ""
--   
--   
--   see also: labelText
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 <label> element.
--   
--   Use this with or ++ to ensure that the for attribute
--   references the correct id.
--   
--   
--   labelText "some input field: " ++> inputText ""
--   
--   
--   This function is provided as an alternative to label because
--   when the OverloadedStrings extension is enabled, you will get
--   ambiguous type errors when attempting to apply label to a
--   string literal. While the type error can be fixed using an explicit
--   type signature, calling labelText 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 <ul> which contains all the errors related to
--   the Form.
--   
--   The ul will have the attribute
--   class="reform-error-list".
errorList :: (Monad m, XMLGenerator x, StringType x ~ Text, EmbedAsChild x error) => Form m input error [XMLGenT x (XMLType x)] () ()

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

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

-- | wrap a <fieldset class="reform"> around a Form
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 <ol class="reform"> around a Form
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 <ul class="reform"> around a Form
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 <li class="reform"> around a Form
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 <form action=action method="POST"
--   enctype="multipart/form-data">
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 Form
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
