on develop help sign in
Get rid of entirely-_ pattern in Group instances

Do this without changing strictness using ~.

commitcf7b8fb7237e01a9eec43c0c7bca81134ee702c6 authorJohn Ericson <git@JohnEricson.me> dateSat 11 Jan 2020, 01:33 (7 years ago) parenta74f716
1 file changed+4−4
src/Data/Patch.hs+4−4
src/Data/Patch.hs+4−4
@@ -62,8 +62,8 @@ instance (Ord k, Additive q) => Additive (MonoidalMap k q)
6262
6363-- | Trivial group.
6464instance Group () where
65− negateG _ = ()
66− _ ~~ _ = ()
65+ negateG ~() = ()
66+ ~() ~~ ~() = ()
6767instance Additive ()
6868
6969-- | 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)
8888
8989-- | Trivial group, Functor style
9090instance Group (Proxy x) where
91− negateG _ = Proxy
92− _ ~~ _ = Proxy
91+ negateG ~Proxy = Proxy
92+ ~Proxy ~~ ~Proxy = Proxy
9393instance Additive (Proxy x)
9494
9595-- | Const lifts groups into a functor.