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

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

module Text.Reform.Blaze.Common
inputText :: (Monad m, FormError error, ToValue text) => (input -> Either error text) -> text -> Form m input error Html () text
inputPassword :: (Monad m, FormError error, ToValue text) => (input -> Either error text) -> text -> Form m input error Html () text
inputSubmit :: (Monad m, FormError error, ToValue text) => (input -> Either error text) -> text -> Form m input error Html () (Maybe text)
inputReset :: (Monad m, FormError error, ToValue text) => text -> Form m input error Html () ()
inputHidden :: (Monad m, FormError error, ToValue text) => (input -> Either error text) -> text -> Form m input error Html () text
inputButton :: (Monad m, FormError error, ToValue text) => text -> Form m input error Html () ()
textarea :: (Monad m, FormError error, ToMarkup text) => (input -> Either error text) -> Int -> Int -> text -> Form m input error Html () 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) => Form m input error Html () (FileType input)

-- | Create a <button type="submit"> element
buttonSubmit :: (Monad m, FormError error, ToValue text, ToMarkup children) => (input -> Either error text) -> text -> children -> Form m input error Html () (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, ToMarkup children) => children -> Form m input error Html () ()

-- | create a <button type="button"></button> element
--   
--   This element does not add any data to the form data set.
button :: (Monad m, FormError error, ToMarkup children) => children -> Form m input error Html () ()

-- | 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, ToMarkup children) => children -> Form m input error Html () ()

-- | Create a single <input type="checkbox"> element
--   
--   returns a Bool indicating if it was checked or not.
--   
--   see also inputCheckboxes FIXME: Should this built on something
--   in Generalized?
inputCheckbox :: (Monad m, FormInput input, FormError error, ErrorInputType error ~ input) => Bool -> Form m input error Html () Bool

-- | Create a group of <input type="checkbox"> elements
inputCheckboxes :: (Functor m, Monad m, FormError error, ErrorInputType error ~ input, FormInput input, ToMarkup lbl) => [(a, lbl)] -> (a -> Bool) -> Form m input error Html () [a]

-- | Create a group of <input type="radio"> elements
inputRadio :: (Functor m, Monad m, FormError error, ErrorInputType error ~ input, FormInput input, ToMarkup lbl) => [(a, lbl)] -> (a -> Bool) -> Form m input error Html () a

-- | create <select></select> element plus its
--   <option></option> children.
--   
--   see also: selectMultiple
select :: (Functor m, Monad m, FormError error, ErrorInputType error ~ input, FormInput input, ToMarkup lbl) => [(a, lbl)] -> (a -> Bool) -> Form m input error Html () 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, ToMarkup lbl) => [(a, lbl)] -> (a -> Bool) -> Form m input error Html () [a]

-- | 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, ToMarkup error) => Form m input error Html () ()

-- | create a <ul> which contains all the errors related to
--   the Form.
--   
--   Includes errors from child forms.
--   
--   The \ul\ will have the attribute
--   class="reform-error-list".
childErrorList :: (Monad m, ToMarkup error) => Form m input error Html () ()

-- | create a <br> tag.
br :: Monad m => Form m input error Html () ()

-- | wrap a <fieldset class="reform"> around a Form
fieldset :: (Monad m, Functor m) => Form m input error Html proof a -> Form m input error Html proof a

-- | wrap an <ol class="reform"> around a Form
ol :: (Monad m, Functor m) => Form m input error Html proof a -> Form m input error Html proof a

-- | wrap a <ul class="reform"> around a Form
ul :: (Monad m, Functor m) => Form m input error Html proof a -> Form m input error Html proof a

-- | wrap a <li class="reform"> around a Form
li :: (Monad m, Functor m) => Form m input error Html proof a -> Form m input error Html proof a

-- | create <form action=action method="POST"
--   enctype="multipart/form-data">
form :: ToValue action => action -> [(Text, Text)] -> Html -> Html

-- | add an attribute to the Html for a form element.
setAttr :: (Monad m, Functor m) => Form m input error Html proof a -> Attribute -> Form m input error Html proof a
instance ToValue FormId

-- | This module provides functions creating Reform using blaze-html
--   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.Blaze.Text.
module Text.Reform.Blaze.String

-- | Create an <input type="text"> element
inputText :: (Monad m, FormInput input, FormError error, ErrorInputType error ~ input) => String -> Form m input error Html () String

-- | Create an <input type="password"> element
inputPassword :: (Monad m, FormInput input, FormError error, ErrorInputType error ~ input) => Form m input error Html () 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) => String -> Form m input error Html () (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) => String -> Form m input error Html () ()

-- | Create an <input type="hidden"> element
inputHidden :: (Monad m, FormInput input, FormError error, ErrorInputType error ~ input) => String -> Form m input error Html () 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) => String -> Form m input error Html () ()

-- | Create a single <input type="checkbox"> element
--   
--   returns a Bool indicating if it was checked or not.
--   
--   see also inputCheckboxes FIXME: Should this built on something
--   in Generalized?
inputCheckbox :: (Monad m, FormInput input, FormError error, ErrorInputType error ~ input) => Bool -> Form m input error Html () Bool

-- | Create a group of <input type="checkbox"> elements
inputCheckboxes :: (Functor m, Monad m, FormError error, ErrorInputType error ~ input, FormInput input, ToMarkup lbl) => [(a, lbl)] -> (a -> Bool) -> Form m input error Html () [a]

-- | Create a group of <input type="radio"> elements
inputRadio :: (Functor m, Monad m, FormError error, ErrorInputType error ~ input, FormInput input, ToMarkup lbl) => [(a, lbl)] -> (a -> Bool) -> Form m input error Html () 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) => Form m input error Html () (FileType input)

-- | Create a <textarea></textarea> element
textarea :: (Monad m, FormInput input, FormError error, ErrorInputType error ~ input) => Int -> Int -> String -> Form m input error Html () String

-- | create a <button type="submit"></button> element
buttonSubmit :: (Monad m, FormError error, FormInput input, ErrorInputType error ~ input, ToMarkup children) => String -> children -> Form m input error Html () (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, ToMarkup children) => children -> Form m input error Html () ()

-- | create a <button type="button"></button> element
--   
--   This element does not add any data to the form data set.
button :: (Monad m, FormError error, ToMarkup children) => children -> Form m input error Html () ()

-- | create <select></select> element plus its
--   <option></option> children.
--   
--   see also: selectMultiple
select :: (Functor m, Monad m, FormError error, ErrorInputType error ~ input, FormInput input, ToMarkup lbl) => [(a, lbl)] -> (a -> Bool) -> Form m input error Html () 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, ToMarkup lbl) => [(a, lbl)] -> (a -> Bool) -> Form m input error Html () [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, ToMarkup children) => children -> Form m input error Html () ()

-- | 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, ToMarkup error) => Form m input error Html () ()

-- | create a <ul> which contains all the errors related to
--   the Form.
--   
--   Includes errors from child forms.
--   
--   The \ul\ will have the attribute
--   class="reform-error-list".
childErrorList :: (Monad m, ToMarkup error) => Form m input error Html () ()

-- | create a <br> tag.
br :: Monad m => Form m input error Html () ()

-- | wrap a <fieldset class="reform"> around a Form
fieldset :: (Monad m, Functor m) => Form m input error Html proof a -> Form m input error Html proof a

-- | wrap an <ol class="reform"> around a Form
ol :: (Monad m, Functor m) => Form m input error Html proof a -> Form m input error Html proof a

-- | wrap a <ul class="reform"> around a Form
ul :: (Monad m, Functor m) => Form m input error Html proof a -> Form m input error Html proof a

-- | wrap a <li class="reform"> around a Form
li :: (Monad m, Functor m) => Form m input error Html proof a -> Form m input error Html proof a

-- | create <form action=action method="POST"
--   enctype="multipart/form-data">
form :: ToValue action => action -> [(Text, Text)] -> Html -> Html

-- | This module provides functions creating Reform using blaze-html
--   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.Blaze.String.
module Text.Reform.Blaze.Text

-- | Create an <input type="text"> element
inputText :: (Monad m, FormInput input, FormError error, ErrorInputType error ~ input) => Text -> Form m input error Html () Text

-- | Create an <input type="password"> element
inputPassword :: (Monad m, FormInput input, FormError error, ErrorInputType error ~ input) => Form m input error Html () 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) => Text -> Form m input error Html () (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) => Text -> Form m input error Html () ()

-- | Create an <input type="hidden"> element
inputHidden :: (Monad m, FormInput input, FormError error, ErrorInputType error ~ input) => Text -> Form m input error Html () 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) => Text -> Form m input error Html () ()

-- | Create a single <input type="checkbox"> element
--   
--   returns a Bool indicating if it was checked or not.
--   
--   see also inputCheckboxes FIXME: Should this built on something
--   in Generalized?
inputCheckbox :: (Monad m, FormInput input, FormError error, ErrorInputType error ~ input) => Bool -> Form m input error Html () Bool

-- | Create a group of <input type="checkbox"> elements
inputCheckboxes :: (Functor m, Monad m, FormError error, ErrorInputType error ~ input, FormInput input, ToMarkup lbl) => [(a, lbl)] -> (a -> Bool) -> Form m input error Html () [a]

-- | Create a group of <input type="radio"> elements
inputRadio :: (Functor m, Monad m, FormError error, ErrorInputType error ~ input, FormInput input, ToMarkup lbl) => [(a, lbl)] -> (a -> Bool) -> Form m input error Html () 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) => Form m input error Html () (FileType input)

-- | Create a <textarea></textarea> element
textarea :: (Monad m, FormInput input, FormError error, ErrorInputType error ~ input) => Int -> Int -> Text -> Form m input error Html () Text

-- | create a <button type="submit"></button> element
buttonSubmit :: (Monad m, FormError error, FormInput input, ErrorInputType error ~ input, ToMarkup children) => Text -> children -> Form m input error Html () (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, ToMarkup children) => children -> Form m input error Html () ()

-- | create a <button type="button"></button> element
--   
--   This element does not add any data to the form data set.
button :: (Monad m, FormError error, ToMarkup children) => children -> Form m input error Html () ()

-- | create <select></select> element plus its
--   <option></option> children.
--   
--   see also: selectMultiple
select :: (Functor m, Monad m, FormError error, ErrorInputType error ~ input, FormInput input, ToMarkup lbl) => [(a, lbl)] -> (a -> Bool) -> Form m input error Html () 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, ToMarkup lbl) => [(a, lbl)] -> (a -> Bool) -> Form m input error Html () [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, ToMarkup children) => children -> Form m input error Html () ()

-- | 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, ToMarkup error) => Form m input error Html () ()

-- | create a <ul> which contains all the errors related to
--   the Form.
--   
--   Includes errors from child forms.
--   
--   The \ul\ will have the attribute
--   class="reform-error-list".
childErrorList :: (Monad m, ToMarkup error) => Form m input error Html () ()

-- | create a <br> tag.
br :: Monad m => Form m input error Html () ()

-- | wrap a <fieldset class="reform"> around a Form
fieldset :: (Monad m, Functor m) => Form m input error Html proof a -> Form m input error Html proof a

-- | wrap an <ol class="reform"> around a Form
ol :: (Monad m, Functor m) => Form m input error Html proof a -> Form m input error Html proof a

-- | wrap a <ul class="reform"> around a Form
ul :: (Monad m, Functor m) => Form m input error Html proof a -> Form m input error Html proof a

-- | wrap a <li class="reform"> around a Form
li :: (Monad m, Functor m) => Form m input error Html proof a -> Form m input error Html proof a

-- | create <form action=action method="POST"
--   enctype="multipart/form-data">
form :: ToValue action => action -> [(Text, Text)] -> Html -> Html
