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


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

module Text.Reform.Hamlet.Common
inputText :: (FormError error, Monad m, ToMarkup text) => (input -> Either error text) -> text -> Form m input error (HtmlUrl url) () text
inputPassword :: (Monad m, FormError error, ToMarkup text) => (input -> Either error text) -> text -> Form m input error (HtmlUrl url) () text
inputSubmit :: (Monad m, FormError error, ToMarkup text) => (input -> Either error text) -> text -> Form m input error (HtmlUrl url) () (Maybe text)
inputReset :: (Monad m, FormError error, ToMarkup text) => text -> Form m input error (HtmlUrl url) () ()
inputHidden :: (Monad m, FormError error, ToMarkup text) => (input -> Either error text) -> text -> Form m input error (HtmlUrl url) () text
inputButton :: (Monad m, FormError error, ToMarkup text) => text -> Form m input error (HtmlUrl url) () ()
textarea :: (Monad m, FormError error, ToMarkup text) => (input -> Either error text) -> Int -> Int -> text -> Form m input error (HtmlUrl url) () text
inputFile :: (Monad m, FormError error, FormInput input, ErrorInputType error ~ input) => Form m input error (HtmlUrl url) () (FileType input)

-- | Create a <tt>&lt;button type="submit"&gt;</tt> element
buttonSubmit :: (Monad m, FormError error, ToMarkup text, ToMarkup children) => (input -> Either error text) -> text -> children -> Form m input error (HtmlUrl url) () (Maybe text)
buttonReset :: (Monad m, FormError error, ToMarkup children) => children -> Form m input error (HtmlUrl url) () ()
button :: (Monad m, FormError error, ToMarkup children) => children -> Form m input error (HtmlUrl url) () ()
label :: (Monad m, ToMarkup c) => c -> Form m input error (HtmlUrl url) () ()
inputCheckbox :: (Monad m, FormInput input, FormError error, ErrorInputType error ~ input) => Bool -> Form m input error (HtmlUrl url) () Bool
inputCheckboxes :: (Functor m, Monad m, FormError error, ErrorInputType error ~ input, FormInput input, ToMarkup lbl) => [(a, lbl)] -> (a -> Bool) -> Form m input error (HtmlUrl url) () [a]
inputRadio :: (Functor m, Monad m, FormError error, ErrorInputType error ~ input, FormInput input, ToMarkup lbl) => [(a, lbl)] -> (a -> Bool) -> Form m input error (HtmlUrl url) () a
select :: (Functor m, Monad m, FormError error, ErrorInputType error ~ input, FormInput input, ToMarkup lbl) => [(a, lbl)] -> (a -> Bool) -> Form m input error (HtmlUrl url) () a
selectMultiple :: (Functor m, Monad m, FormError error, ErrorInputType error ~ input, FormInput input, ToMarkup lbl) => [(a, lbl)] -> (a -> Bool) -> Form m input error (HtmlUrl url) () [a]
errorList :: (Monad m, ToMarkup error) => Form m input error (HtmlUrl url) () ()
childErrorList :: (Monad m, ToMarkup error) => Form m input error (HtmlUrl url) () ()
br :: Monad m => Form m input error (HtmlUrl url) () ()
fieldset :: (Monad m, Functor m, ToMarkup c) => Form m input error c proof a -> Form m input error (HtmlUrl url) proof a
ol :: (Monad m, Functor m, ToMarkup c) => Form m input error c proof a -> Form m input error (HtmlUrl url) proof a
ul :: (Monad m, Functor m, ToMarkup c) => Form m input error c proof a -> Form m input error (HtmlUrl url) proof a
li :: (Monad m, Functor m, ToMarkup c) => Form m input error c proof a -> Form m input error (HtmlUrl url) proof a

-- | create <tt>&lt;form action=action method="POST"
--   enctype="multipart/form-data"&gt;</tt>
form :: ToMarkup action => action -> [(Text, Text)] -> HtmlUrl url -> HtmlUrl url
instance ToMarkup FormId


-- | This module provides functions creating Reform using Hamlet 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.Hamlet.Text</a>.
module Text.Reform.Hamlet.String

-- | Create an <tt>&lt;input type="text"&gt;</tt> element
inputText :: (Monad m, FormInput input, FormError error, ErrorInputType error ~ input) => String -> Form m input error (HtmlUrl url) () String

-- | Create an <tt>&lt;input type="password"&gt;</tt> element
inputPassword :: (Monad m, FormInput input, FormError error, ErrorInputType error ~ input) => Form m input error (HtmlUrl url) () 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) => String -> Form m input error (HtmlUrl url) () (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) => String -> Form m input error (HtmlUrl url) () ()

-- | Create an <tt>&lt;input type="hidden"&gt;</tt> element
inputHidden :: (Monad m, FormInput input, FormError error, ErrorInputType error ~ input) => String -> Form m input error (HtmlUrl url) () 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) => String -> Form m input error (HtmlUrl url) () ()

-- | 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 :: (Monad m, FormInput input, FormError error, ErrorInputType error ~ input) => Bool -> Form m input error (HtmlUrl url) () 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, ToMarkup lbl) => [(a, lbl)] -> (a -> Bool) -> Form m input error (HtmlUrl url) () [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, ToMarkup lbl) => [(a, lbl)] -> (a -> Bool) -> Form m input error (HtmlUrl url) () 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) => Form m input error (HtmlUrl url) () (FileType input)

-- | Create a &lt;textarea&gt;&lt;/textarea&gt; element
textarea :: (Monad m, FormInput input, FormError error, ErrorInputType error ~ input) => Int -> Int -> String -> Form m input error (HtmlUrl url) () String

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

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

-- | 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, ToMarkup lbl) => [(a, lbl)] -> (a -> Bool) -> Form m input error (HtmlUrl url) () 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, ToMarkup lbl) => [(a, lbl)] -> (a -> Bool) -> Form m input error (HtmlUrl url) () [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, ToMarkup c) => c -> Form m input error (HtmlUrl url) () ()

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

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

-- | create a <tt>&lt;br&gt;</tt> tag.
br :: Monad m => Form m input error (HtmlUrl url) () ()

-- | wrap a <tt>&lt;fieldset class="reform"&gt;</tt> around a <a>Form</a>
fieldset :: (Monad m, Functor m, ToMarkup c) => Form m input error c proof a -> Form m input error (HtmlUrl url) proof a

-- | wrap an <tt>&lt;ol class="reform"&gt;</tt> around a <a>Form</a>
ol :: (Monad m, Functor m, ToMarkup c) => Form m input error c proof a -> Form m input error (HtmlUrl url) proof a

-- | wrap a <tt>&lt;ul class="reform"&gt;</tt> around a <a>Form</a>
ul :: (Monad m, Functor m, ToMarkup c) => Form m input error c proof a -> Form m input error (HtmlUrl url) proof a

-- | wrap a <tt>&lt;li class="reform"&gt;</tt> around a <a>Form</a>
li :: (Monad m, Functor m, ToMarkup c) => Form m input error c proof a -> Form m input error (HtmlUrl url) proof a

-- | create <tt>&lt;form action=action method="POST"
--   enctype="multipart/form-data"&gt;</tt>
form :: ToMarkup action => action -> [(Text, Text)] -> (HtmlUrl url) -> (HtmlUrl url)


-- | This module provides functions creating Reform using Hamlet 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.Hamlet.String</a>.
module Text.Reform.Hamlet.Text

-- | Create an <tt>&lt;input type="text"&gt;</tt> element
inputText :: (Monad m, FormInput input, FormError error, ErrorInputType error ~ input) => Text -> Form m input error (HtmlUrl url) () Text

-- | Create an <tt>&lt;input type="password"&gt;</tt> element
inputPassword :: (Monad m, FormInput input, FormError error, ErrorInputType error ~ input) => Form m input error (HtmlUrl url) () 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) => Text -> Form m input error (HtmlUrl url) () (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) => Text -> Form m input error (HtmlUrl url) () ()

-- | Create an <tt>&lt;input type="hidden"&gt;</tt> element
inputHidden :: (Monad m, FormInput input, FormError error, ErrorInputType error ~ input) => Text -> Form m input error (HtmlUrl url) () 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) => Text -> Form m input error (HtmlUrl url) () ()

-- | 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 :: (Monad m, FormInput input, FormError error, ErrorInputType error ~ input) => Bool -> Form m input error (HtmlUrl url) () 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, ToMarkup lbl) => [(a, lbl)] -> (a -> Bool) -> Form m input error (HtmlUrl url) () [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, ToMarkup lbl) => [(a, lbl)] -> (a -> Bool) -> Form m input error (HtmlUrl url) () 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) => Form m input error (HtmlUrl url) () (FileType input)

-- | Create a &lt;textarea&gt;&lt;/textarea&gt; element
textarea :: (Monad m, FormInput input, FormError error, ErrorInputType error ~ input) => Int -> Int -> Text -> Form m input error (HtmlUrl url) () Text

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

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

-- | 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, ToMarkup lbl) => [(a, lbl)] -> (a -> Bool) -> Form m input error (HtmlUrl url) () 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, ToMarkup lbl) => [(a, lbl)] -> (a -> Bool) -> Form m input error (HtmlUrl url) () [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, ToMarkup c) => c -> Form m input error (HtmlUrl url) () ()

-- | 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 => Text -> Form m input error (HtmlUrl url) () ()

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

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

-- | create a <tt>&lt;br&gt;</tt> tag.
br :: Monad m => Form m input error (HtmlUrl url) () ()

-- | wrap a <tt>&lt;fieldset class="reform"&gt;</tt> around a <a>Form</a>
fieldset :: (Monad m, Functor m, ToMarkup c) => Form m input error c proof a -> Form m input error (HtmlUrl url) proof a

-- | wrap an <tt>&lt;ol class="reform"&gt;</tt> around a <a>Form</a>
ol :: (Monad m, Functor m, ToMarkup c) => Form m input error c proof a -> Form m input error (HtmlUrl url) proof a

-- | wrap a <tt>&lt;ul class="reform"&gt;</tt> around a <a>Form</a>
ul :: (Monad m, Functor m, ToMarkup c) => Form m input error c proof a -> Form m input error (HtmlUrl url) proof a

-- | wrap a <tt>&lt;li class="reform"&gt;</tt> around a <a>Form</a>
li :: (Monad m, Functor m, ToMarkup c) => Form m input error c proof a -> Form m input error (HtmlUrl url) proof a

-- | create <tt>&lt;form action=action method="POST"
--   enctype="multipart/form-data"&gt;</tt>
form :: ToMarkup action => action -> [(Text, Text)] -> (HtmlUrl url) -> (HtmlUrl url)
