packages feed

validation 0.3.1 → 0.3.2

raw patch · 3 files changed

+27/−1 lines, 3 files

Files

+ changelog view
@@ -0,0 +1,15 @@+0.3.0++A restructuring of 0.2.x where:++* Tests updated to use doctest+* Update API to use Prism and Iso (Control.Lens)+* Rename package Validation (deprecated) to validation ++0.3.1++Use Safe Haskell pragma++0.3.2++Implement Validate on Either
src/Data/Validation.hs view
@@ -358,6 +358,16 @@                               Failure e -> Right e                               Success a -> Left (Success a)) +instance Validate Either where+  _Success =+    prism Right (\v -> case v of+                              Left e -> Left (Left e)+                              Right a -> Right a)+  _Failure =+    prism Left (\v -> case v of+                              Left e -> Right e+                              Right a -> Left (Right a))+ instance Swapped AccValidation where   swapped =     iso
validation.cabal view
@@ -1,5 +1,5 @@ name:               validation-version:            0.3.1+version:            0.3.2 license:            BSD3 license-file:       LICENSE author:             Tony Morris <ʇǝu˙sıɹɹoɯʇ@ןןǝʞsɐɥ>, Nick Partridge@@ -12,6 +12,7 @@ bug-reports:        https://github.com/tonymorris/validation/issues cabal-version:      >= 1.10 build-type:         Custom+extra-source-files: changelog  source-repository   head   type:             git