eq 0.3.4.3 → 0.3.5
raw patch · 2 files changed
+13/−6 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Data.Eq.Type: lower :: f a := f b -> a := b
+ Data.Eq.Type: lower2 :: f a c := f b c -> a := b
+ Data.Eq.Type: lower3 :: f a c d := f b c d -> a := b
Files
- Data/Eq/Type.hs +3/−4
- eq.cabal +10/−2
Data/Eq/Type.hs view
@@ -97,22 +97,21 @@ lift3' ab cd ef = lift3 ab . lift2 cd . lift ef #ifdef LANGUAGE_TypeFamilies--type family Inj f :: *+type family Inj f type instance Inj (f a) = a newtype Lower a b = Lower { unlower :: Inj a := Inj b } -- | Type constructors are injective, so you can lower equality through any type constructor lower :: f a := f b -> a := b lower eq = unlower (subst eq (Lower id :: Lower (f a) (f a))) -type family Inj2 f :: *+type family Inj2 f type instance Inj2 (f a b) = a newtype Lower2 a b = Lower2 { unlower2 :: Inj2 a := Inj2 b } -- | ... in any position lower2 :: f a c := f b c -> a := b lower2 eq = unlower2 (subst eq (Lower2 id :: Lower2 (f a c) (f a c))) -type family Inj3 f :: *+type family Inj3 f type instance Inj3 (f a b c) = a newtype Lower3 a b = Lower3 { unlower3 :: Inj3 a := Inj3 b } lower3 :: f a c d := f b c d -> a := b
eq.cabal view
@@ -1,6 +1,6 @@ name: eq category: Type System-version: 0.3.4.3+version: 0.3.5 license: BSD3 cabal-version: >= 1.6 license-file: LICENSE@@ -17,8 +17,12 @@ type: git location: git://github.com/ekmett/eq.git +flag TypeFamilies+ default: True+ manual: False+ library- other-extensions: + other-extensions: CPP Rank2Types TypeOperators@@ -30,5 +34,9 @@ exposed-modules: Data.Eq.Type++ if flag(TypeFamilies)+ extensions: TypeFamilies+ cpp-options: -DLANGUAGE_TypeFamilies ghc-options: -Wall