packages feed

digestive-functors 0.1.0.1 → 0.1.0.2

raw patch · 2 files changed

+11/−2 lines, 2 filesPVP: minor bump suggested

API additions: PVP suggests at least a minor version bump

API changes (from Hackage documentation)

+ Text.Digestive.Forms.Html: mapViewHtml :: (Monad m, Functor m) => (v -> w) -> Form m i e (FormHtml v) a -> Form m i e (FormHtml w) a

Files

digestive-functors.cabal view
@@ -1,5 +1,5 @@ Name:                digestive-functors-Version:             0.1.0.1+Version:             0.1.0.2 Synopsis:            A general way to consume input using applicative functors Description:         Digestive functors is a library to generate and process     HTML forms.  You can find an introduction here:
src/Text/Digestive/Forms/Html.hs view
@@ -7,6 +7,7 @@     , createFormHtml     , createFormHtmlWith     , viewHtml+    , mapViewHtml     , applyClasses     , defaultHtmlConfig     , emptyHtmlConfig@@ -19,7 +20,7 @@ import Control.Applicative ((<*>), pure) import Control.Arrow ((&&&)) -import Text.Digestive.Types (Form, view)+import Text.Digestive.Types (Form, mapView, view)  -- | Settings for classes in generated HTML. --@@ -78,6 +79,14 @@ -- viewHtml :: Monad m => a -> Form m i e (FormHtml a) () viewHtml = view . createFormHtml . const++-- | Lifted version of 'mapView'+--+mapViewHtml :: (Monad m, Functor m)+            => (v -> w)                   -- ^ Map over the contained HTML+            -> Form m i e (FormHtml v) a  -- ^ Initial form+            -> Form m i e (FormHtml w) a  -- ^ Resulting form+mapViewHtml f = mapView $ \(FormHtml e h) -> FormHtml e (f . h)  -- | Apply all classes to an HTML element. If no classes are found, nothing -- happens.