packages feed

ditto-lucid 0.1.1.0 → 0.1.1.1

raw patch · 3 files changed

+14/−13 lines, 3 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- Ditto.Lucid.Named: inputCheckbox :: forall x error input m f. (Monad m, FormInput input, FormError error, ErrorInputType error ~ input, Applicative f) => Bool -> Form m input error (HtmlT f ()) Bool
+ Ditto.Lucid.Named: inputCheckbox :: forall x error input m f. (Monad m, FormInput input, FormError error, ErrorInputType error ~ input, Applicative f) => Bool -> String -> Form m input error (HtmlT f ()) Bool

Files

ditto-lucid.cabal view
@@ -1,5 +1,5 @@ Name:                ditto-lucid-Version:             0.1.1.0+Version:             0.1.1.1 Synopsis:            Add support for using lucid with Ditto Description:         Ditto is a library for building and validating forms using applicative functors. This package add support for using ditto with lucid. License:             BSD3
src/Ditto/Lucid.hs view
@@ -64,11 +64,11 @@   => Form m input error (HtmlT f ()) () errorList = G.errors mkErrors   where-    mkErrors :: Monad f => ToHtml a => [a] -> HtmlT f ()-    mkErrors [] = mempty-    mkErrors errs = ul_ [class_ "ditto-error-list"] $ traverse_ mkError errs-    mkError :: Monad f => ToHtml a => a -> HtmlT f ()-    mkError e = li_ [] $ toHtml e+  mkErrors :: Monad f => ToHtml a => [a] -> HtmlT f ()+  mkErrors [] = mempty+  mkErrors errs = ul_ [class_ "ditto-error-list"] $ traverse_ mkError errs+  mkError :: Monad f => ToHtml a => a -> HtmlT f ()+  mkError e = li_ [] $ toHtml e  -- | create a @\<ul\>@ which contains all the errors related to the 'Form'. --@@ -80,11 +80,11 @@   => Form m input error (HtmlT f ()) () childErrorList = G.childErrors mkErrors   where-    mkErrors :: Monad f => ToHtml a => [a] -> HtmlT f ()-    mkErrors [] = mempty-    mkErrors errs = ul_ [class_ "ditto-error-list"] $ traverse_ mkError errs-    mkError :: Monad f => ToHtml a => a -> HtmlT f ()-    mkError e = li_ [] $ toHtml e+  mkErrors :: Monad f => ToHtml a => [a] -> HtmlT f ()+  mkErrors [] = mempty+  mkErrors errs = ul_ [class_ "ditto-error-list"] $ traverse_ mkError errs+  mkError :: Monad f => ToHtml a => a -> HtmlT f ()+  mkError e = li_ [] $ toHtml e  -- | create a @\<br\>@ tag. br :: (Monad m, Applicative f) => Form m input error (HtmlT f ()) ()
src/Ditto/Lucid/Named.hs view
@@ -193,10 +193,11 @@ inputCheckbox   :: forall x error input m f. (Monad m, FormInput input, FormError error, ErrorInputType error ~ input, Applicative f)   => Bool -- ^ initially checked+  -> String -- ^ name   -> Form m input error (HtmlT f ()) Bool-inputCheckbox initiallyChecked =+inputCheckbox initiallyChecked name =   Form $ do-    i <- getFormId+    i <- getNamedFormId name     v <- getFormInput' i     case v of       Default -> mkCheckbox i initiallyChecked