packages feed

digestive-functors 0.2.0.0 → 0.2.0.1

raw patch · 2 files changed

+8/−8 lines, 2 filesdep ~mtlPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: mtl

API changes (from Hackage documentation)

Files

digestive-functors.cabal view
@@ -1,5 +1,5 @@ Name:     digestive-functors-Version:  0.2.0.0+Version:  0.2.0.1 Synopsis: A general way to consume input using applicative functors  Description:         Digestive functors is a library to generate and process@@ -35,5 +35,5 @@     base       >= 4       && < 5,     bytestring >= 0.9,     containers >= 0.3,-    mtl        >= 2.0.0.0 && < 3,+    mtl        >= 1.1.0.0 && < 3,     text       >= 0.10
src/Text/Digestive/Forms.hs view
@@ -178,13 +178,13 @@      -- We need to evaluate the count     countRes <- lift $ lift mcountRes-    let countFromForm = getResult countRes-        count = fromMaybe defCount (getResult countRes)+    let count = fromMaybe defCount (getResult countRes) -        fs = replicate count single-        forms = zipWith ($) fs $ maybe (maybe [Nothing] (map Just) defaults)-                                       (flip replicate Nothing)-                                       countFromForm+        -- Use the provided defaults, then loop Nothing+        defaults' = map Just (fromMaybe [] defaults) ++ repeat Nothing++        -- Apply the single form to the defaults+        forms = zipWith ($) (replicate count single) defaults'     down 2     list <- mapM (incAfter . unForm) forms     up 2