digestive-functors-snap 0.1.2.0 → 0.1.3.0
raw patch · 2 files changed
+18/−7 lines, 2 filesdep ~digestive-functorsPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: digestive-functors
API changes (from Hackage documentation)
+ Text.Digestive.Forms.Snap: runViewSnapForm :: MonadSnap m => SnapForm m e v a -> String -> m (v, Maybe a)
Files
digestive-functors-snap.cabal view
@@ -1,5 +1,5 @@ Name: digestive-functors-snap-Version: 0.1.2.0+Version: 0.1.3.0 Synopsis: Snap backend for the digestive-functors library Description: This is a snap backend for the digestive-functors library. @@ -17,8 +17,8 @@ Hs-source-dirs: src Exposed-modules: Text.Digestive.Forms.Snap Build-depends:- base >= 4 && < 5,- bytestring >= 0.9 && < 0.10,- digestive-functors >= 0.1 && < 0.3,- snap-core >= 0.5 && < 0.8,- utf8-string >= 0.3 && < 0.4+ base >= 4 && < 5,+ bytestring >= 0.9 && < 0.10,+ digestive-functors >= 0.2.1 && < 0.3,+ snap-core >= 0.5 && < 0.8,+ utf8-string >= 0.3 && < 0.4
src/Text/Digestive/Forms/Snap.hs view
@@ -6,6 +6,7 @@ , SnapForm , snapEnvironment , eitherSnapForm+ , runViewSnapForm ) where import Control.Applicative ((<$>))@@ -16,7 +17,7 @@ import Snap.Types import Text.Digestive.Forms (FormInput (..))-import Text.Digestive.Types (Form (..), Environment (..), viewForm, eitherForm)+import Text.Digestive.Types (Form (..), Environment (..), viewForm, runViewForm, eitherForm) newtype SnapInput = SnapInput {unSnapInput :: SB.ByteString} @@ -52,3 +53,13 @@ method' <- rqMethod <$> getRequest case method' of GET -> liftM Left $ viewForm form name _ -> eitherForm form name snapEnvironment+++-------------------------------------------------------------------------------+-- | Render a snap form using the current Params+runViewSnapForm :: (MonadSnap m)+ => SnapForm m e v a+ -> String + -> m (v, Maybe a)+runViewSnapForm form name = runViewForm form name snapEnvironment+