digestive-functors 0.7.1.3 → 0.7.1.4
raw patch · 3 files changed
+16/−2 lines, 3 filesdep ~basedep ~timePVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base, time
API changes (from Hackage documentation)
Files
- CHANGELOG +6/−0
- digestive-functors.cabal +3/−2
- src/Text/Digestive/Form.hs +7/−0
CHANGELOG view
@@ -1,3 +1,9 @@+- 0.7.1.4+ * Bump `time` dependency to allow up to `time-1.5`++- 0.7.1.3+ * Bump `text` dependency again+ - 0.7.1.2 * Bump `text` dependency to allow up to `text-1.3`
digestive-functors.cabal view
@@ -1,5 +1,5 @@ Name: digestive-functors-Version: 0.7.1.3+Version: 0.7.1.4 Synopsis: A practical formlet library Description:@@ -67,7 +67,8 @@ mtl >= 1.1.0.0 && < 3, old-locale >= 1.0 && < 1.1, text >= 0.10 && < 1.3,- time >= 1.4 && < 1.5+ time >= 1.4 && < 1.6+ Extensions: CPP Test-suite digestive-functors-tests Type: exitcode-stdio-1.0
src/Text/Digestive/Form.hs view
@@ -3,6 +3,7 @@ {-# LANGUAGE GADTs #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE Rank2Types #-}+{-# LANGUAGE CPP #-} -- | End-user interface - provides the main functionality for -- form creation and validation. For an interface for front-end -- implementation, see "View".@@ -67,7 +68,9 @@ import Data.Text (Text) import qualified Data.Text as T import Data.Time+#if !MIN_VERSION_time(1,5,0) import System.Locale+#endif --------------------------------------------------------------------------------@@ -483,7 +486,11 @@ vFunc :: ParseTime a => String -> Text -> String -> Result Text a vFunc fmt err x+#if MIN_VERSION_time(1,5,0)+ | length x < 40 = maybe (Error err) Success $ parseTimeM True defaultTimeLocale fmt x+#else | length x < 40 = maybe (Error err) Success $ parseTime defaultTimeLocale fmt x+#endif | otherwise = Error "Not a valid date/time string"