packages feed

isomorphism-class 0.2.0.3 → 0.2.1

raw patch · 5 files changed

+32/−20 lines, 5 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

isomorphism-class.cabal view
@@ -1,6 +1,6 @@ cabal-version: 3.0 name: isomorphism-class-version: 0.2.0.3+version: 0.2.1 synopsis: Lawful typeclasses for conversion between types category: Conversion homepage: https://github.com/nikita-volkov/isomorphism-class@@ -65,7 +65,7 @@     IsomorphismClass.Relations.Int8AndWord8     IsomorphismClass.Relations.IntAndWord     IsomorphismClass.Relations.IntMapAndMapOfInt-    IsomorphismClass.Relations.IntSetAndSetOfInts+    IsomorphismClass.Relations.IntSetAndSetOfInt     IsomorphismClass.Relations.LazyByteStringAndLazyByteStringBuilder     IsomorphismClass.Relations.LazyByteStringAndLazyText     IsomorphismClass.Relations.LazyByteStringAndShortByteString
library/IsomorphismClass/Classes/IsSome.hs view
@@ -23,6 +23,8 @@ -- -- > \a -> maybeFrom (to a) == Just a --+-- === Testing+-- -- For testing whether your instances conform to these laws use 'IsomorphismClass.isSomeLawsProperties'. class IsSome sup sub where   -- |
library/IsomorphismClass/Proxies/ViaIsSome.hs view
@@ -1,6 +1,6 @@ module IsomorphismClass.Proxies.ViaIsSome where -import IsomorphismClass.Classes.IsSome+import IsomorphismClass.Classes import IsomorphismClass.Prelude import qualified Test.QuickCheck as QuickCheck @@ -11,7 +11,7 @@ -- -- > newtype Percent = Percent Double -- >   deriving newtype (Show, Eq, Ord)--- >   deriving (Read, IsString, Arbitrary) via (ViaIsSome Double Percent)+-- >   deriving (Read, Arbitrary) via (ViaIsSome Double Percent) -- > -- > instance IsSome Double Percent where -- >   to (Percent double) = double@@ -27,6 +27,16 @@ instance (IsSome sup sub) => IsSome sup (ViaIsSome sup sub) where   to (ViaIsSome a) = to a   maybeFrom = fmap ViaIsSome . maybeFrom++instance IsSome sub (ViaIsSome sup sub) where+  to = coerce++instance IsSome (ViaIsSome sup sub) sub where+  to = coerce++instance Is sub (ViaIsSome sup sub)++instance Is (ViaIsSome sup sub) sub  instance (IsSome sup sub, Show sup) => Show (ViaIsSome sup sub) where   show (ViaIsSome a) = show (to @sup a)
+ library/IsomorphismClass/Relations/IntSetAndSetOfInt.hs view
@@ -0,0 +1,16 @@+{-# OPTIONS_GHC -Wno-orphans #-}++module IsomorphismClass.Relations.IntSetAndSetOfInt where++import IsomorphismClass.Classes+import IsomorphismClass.Prelude++instance IsSome (Set Int) IntSet where+  to = fromList . toList++instance IsSome IntSet (Set Int) where+  to = fromList . toList++instance Is (Set Int) IntSet++instance Is IntSet (Set Int)
− library/IsomorphismClass/Relations/IntSetAndSetOfInts.hs
@@ -1,16 +0,0 @@-{-# OPTIONS_GHC -Wno-orphans #-}--module IsomorphismClass.Relations.IntSetAndSetOfInts where--import IsomorphismClass.Classes-import IsomorphismClass.Prelude--instance IsSome (Set Int) IntSet where-  to = fromList . toList--instance IsSome IntSet (Set Int) where-  to = fromList . toList--instance Is (Set Int) IntSet--instance Is IntSet (Set Int)