on develop help sign in
Get rid of entirely-_ pattern in Group instances
cf7b8fbJohn Ericson
src/Data/Patch.hs+4−4
@@ -62,8 +62,8 @@ instance (Ord k, Additive q) => Additive (MonoidalMap k q)
62
62
63-- | Trivial group.
63-- | Trivial group.
64instance Group () where
64instance Group () where
65− negateG _ = ()
65+ negateG ~() = ()
66− _ ~~ _ = ()
66+ ~() ~~ ~() = ()
67instance Additive ()
67instance Additive ()
68
68
69-- | Product group. A Pair of groups gives rise to a group
69-- | Product group. A Pair of groups gives rise to a group
@@ -88,8 +88,8 @@ instance (Additive (f a), Additive (g a)) => Additive ((f :*: g) a)
88
88
89-- | Trivial group, Functor style
89-- | Trivial group, Functor style
90instance Group (Proxy x) where
90instance Group (Proxy x) where
91− negateG _ = Proxy
91+ negateG ~Proxy = Proxy
92− _ ~~ _ = Proxy
92+ ~Proxy ~~ ~Proxy = Proxy
93instance Additive (Proxy x)
93instance Additive (Proxy x)
94
94
95-- | Const lifts groups into a functor.
95-- | Const lifts groups into a functor.