uniform-pair 0.1.7 → 0.1.8
raw patch · 2 files changed
+10/−3 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- src/Data/UniformPair.hs +9/−2
- uniform-pair.cabal +1/−1
src/Data/UniformPair.hs view
@@ -76,8 +76,15 @@ -- | Update a component, indexing by 'False' for the first element and 'True' for -- the second. onElemP :: Bool -> (a -> a) -> Pair a -> Pair a-onElemP False f (a :# b) = f a :# b-onElemP True f (a :# b) = a :# f b+onElemP c f ~(a :# b) | c = f a :# b+ | otherwise = a :# f b++-- -- Too strict:+-- onElemP False f (a :# b) = f a :# b+-- onElemP True f (a :# b) = a :# f b++-- onElemP False = \ f (a :# b) -> f a :# b+-- onElemP True = \ f (a :# b) -> a :# f b -- | Extract an element, indexing by 'False' for the first element and 'True' -- for the second.
uniform-pair.cabal view
@@ -1,5 +1,5 @@ Name: uniform-pair-Version: 0.1.7+Version: 0.1.8 Cabal-Version: >= 1.6 Synopsis: Uniform pairs with class instances Category: Data