merge 0.3.0.0 → 0.3.0.1
raw patch · 2 files changed
+12/−8 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- README.md +11/−7
- merge.cabal +1/−1
README.md view
@@ -8,7 +8,7 @@ data Friend = Friend { name :: Maybe Text , email :: Maybe Text- , age :: Int+ , age :: Max Int , pubKey :: PublicKey } ```@@ -26,14 +26,18 @@ That's the pattern that this library encapsulates! ```-mergeFriends :: Merge Friend Friend+mergeFriends :: Merge [String] Friend Friend mergeFriends = User- <$> optional name- <*> optional email- <*> combine Max- <*> required pubKey+ <$> optional name .? ["name"]+ <*> optional email .? ["email"]+ <*> combine age .? ["age"]+ <*> required pubKey .? ["pubKey"] -f :: Friend -> Friend -> Maybe Friend+f :: Friend -> Friend -> Validation [String] Friend f x y = runMerge mergeFriends x y ```++We didn't get exactly what we thought we wanted, but this Validation+type is better: it is an Applicative which accumulates the errors for+every field.
merge.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.4 name: merge-version: 0.3.0.0+version: 0.3.0.1 synopsis: A functor for consistent merging of information description: A functor for consistent merging of information. author: Samuel Schlesinger