packages feed

lawful-conversions 0.2 → 0.2.0.1

raw patch · 2 files changed

+5/−4 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

lawful-conversions.cabal view
@@ -1,6 +1,6 @@ cabal-version: 3.0 name: lawful-conversions-version: 0.2+version: 0.2.0.1 synopsis: Lawful typeclasses for bidirectional conversion between types category: Conversion homepage: https://github.com/nikita-volkov/lawful-conversions
src/library/LawfulConversions/Properties.hs view
@@ -54,6 +54,7 @@ -- >       (uncurry prop) -- >       (isManyProperties @String @Text Proxy Proxy) isManyProperties ::+  forall a b.   (IsMany a b, Eq a, Eq b, Show a, Show b, Arbitrary a, Arbitrary b) =>   Proxy a ->   Proxy b ->@@ -63,9 +64,9 @@       property \b -> b === from' (to' b)     ),     ( "'from' is consistent with 'maybeFrom'",-      property \a -> case maybeFrom a of-        Nothing -> property Discard-        Just b -> b === from' a+      property \(b :: b) ->+        let a = to @a b+         in maybeFrom (to @a b) === Just (from @a @b a)     ),     ( "'to' after 'from' always succeeds with 'maybeFrom'",       property \a ->