regular 0.3.1 → 0.3.2
raw patch · 4 files changed
+10/−1 lines, 4 files
Files
- ChangeLog +3/−0
- regular.cabal +1/−1
- src/Generics/Regular/Functions/ConNames.hs +3/−0
- src/Generics/Regular/Functions/Eq.hs +3/−0
ChangeLog view
@@ -1,3 +1,6 @@+version 0.3.2:+ - Add missing S case to eq.+ version 0.3.1: - Fix a bug in the Template Haskell code (thanks to lists@snowlion.nl)
regular.cabal view
@@ -1,5 +1,5 @@ name: regular-version: 0.3.1+version: 0.3.2 synopsis: Generic programming library for regular datatypes. description:
src/Generics/Regular/Functions/ConNames.hs view
@@ -38,6 +38,9 @@ instance (ConNames f, Constructor c) => ConNames (C c f) where hconNames (x :: (C c f) a) = [conName x] +instance ConNames (S s f) where+ hconNames _ = []+ instance (ConNames f, ConNames g) => ConNames (f :*: g) where hconNames _ = []
src/Generics/Regular/Functions/Eq.hs view
@@ -49,5 +49,8 @@ instance Eq f => Eq (C c f) where eqf f (C x) (C y) = eqf f x y +instance Eq f => Eq (S s f) where+ eqf f (S x) (S y) = eqf f x y+ eq :: (Regular a, Eq (PF a)) => a -> a -> Bool eq x y = eqf eq (from x) (from y)