hkd 0.2 → 0.2.1
raw patch · 3 files changed
+25/−5 lines, 3 filesdep ~basedep ~transformersPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base, transformers
API changes (from Hackage documentation)
+ Data.HKD: instance forall k (f :: k -> *) (a :: k). GHC.Classes.Eq (f a) => GHC.Classes.Eq (Data.HKD.Element a f)
+ Data.HKD: instance forall k (f :: k -> *) (a :: k). GHC.Show.Show (f a) => GHC.Show.Show (Data.HKD.Element a f)
Files
- CHANGELOG.md +4/−0
- hkd.cabal +7/−5
- src/Data/HKD.hs +14/−0
CHANGELOG.md view
@@ -1,3 +1,7 @@+# 0.2.1++* Add `Show (Element a f)` and `Eq (Element a f)` instances+ # 0.2 * Generalize kinds of gftraverse, gfzipWith and gfrepeat.
hkd.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.2 name: hkd-version: 0.2+version: 0.2.1 synopsis: "higher-kinded data" description: "Higher-kinded data" utilities, e.g.@@ -37,8 +37,10 @@ || ==8.8.4 || ==8.10.7 || ==9.0.2- || ==9.2.4- || ==9.4.2+ || ==9.2.8+ || ==9.4.7+ || ==9.6.3+ || ==9.8.1 source-repository head type: git@@ -61,11 +63,11 @@ -Wredundant-constraints -Widentities -Wmissing-export-lists build-depends:- , base >=4.6 && <4.18+ , base >=4.6 && <4.20 , some ^>=1.0.0.3 if !impl(ghc >=7.10)- build-depends: transformers >=0.3 && <0.6+ build-depends: transformers >=0.3 && <0.7 if !impl(ghc >=8.0) build-depends: semigroups >=0.18.5 && <1
src/Data/HKD.hs view
@@ -449,6 +449,20 @@ -- | Element in @f@ newtype Element a f = Element { runElement :: f a } +-- |+--+-- @since 0.2.1+--+instance Eq (f a) => Eq (Element a f) where+ Element x == Element y = x == y++-- |+--+-- @since 0.2.1+--+instance Show (f a) => Show (Element a f) where+ showsPrec d (Element x) = showParen (d > 10) $ showString "Element " . showsPrec 11 x+ instance FFunctor (Element a) where ffmap f (Element fa) = Element (f fa)