packages feed

simple-form 0.4 → 0.4.1

raw patch · 4 files changed

+14/−1 lines, 4 files

Files

SimpleForm.hs view
@@ -57,6 +57,7 @@ ) where  import Data.Maybe+import Data.Fixed (Fixed, HasResolution) import Data.Char (isUpper) import Data.Monoid import Data.Ratio@@ -188,6 +189,9 @@ 	wdef = number  instance DefaultWidget Double where+	wdef = number++instance (HasResolution a) => DefaultWidget (Fixed a) where 	wdef = number  instance DefaultWidget UTCTime where
SimpleForm/Digestive/Combined.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP #-} -- | SimpleForm implementation that works along with digestive-functors -- -- The Combined module both renders to 'Html' and also parses input.@@ -70,8 +71,12 @@ 	-> SimpleForm' m a -- ^ The simple form to render 	-> m (Html, Maybe a) postSimpleForm render env form = do+#if MIN_VERSION_digestive_functors(0,7,0)+		(view, val) <- postForm T.empty initialForm (const env)+#else 		env' <- env 		(view, val) <- postForm T.empty initialForm env'+#endif 		let html = snd $ simpleForm' render (view, val) form 		return (html, val) 	where
SimpleForm/Validation.hs view
@@ -38,6 +38,7 @@ ) where  import Prelude hiding (read)+import Data.Fixed (Fixed, HasResolution) import Control.Arrow (first, second) import Control.Monad import Data.Monoid@@ -116,6 +117,9 @@ 	vdef = read  instance DefaultValidation Double where+	vdef = read++instance (HasResolution a) => DefaultValidation (Fixed a) where 	vdef = read  instance DefaultValidation UTCTime where
simple-form.cabal view
@@ -1,5 +1,5 @@ name:            simple-form-version:         0.4+version:         0.4.1 cabal-version:   >= 1.8 license:         OtherLicense license-file:    COPYING