git.iko.soy/semi-iso-optics
on master help sign in
Fix a subtle bug in the implementation of (+++) and (***) for dual categories.
commit689792e009b9eac749b57a4dc38af3b53df26806 authorPaweł Nowak <pawel834@gmail.com> dateSat 13 Dec 2014, 00:22 (12 years ago) parent49e56e3
1 file changed+2−2
Control/Category/Structures.hs+2−2
Control/Category/Structures.hs+2−2
@@ -53,7 +53,7 @@ instance Monad m => Products (Kleisli m) where
5353 (***) = (BadArrow.***)
5454
5555instance Products cat => Products (Dual cat) where
56− Dual f *** Dual g = Dual $ f *** g
56+ Dual f *** Dual g = Dual $ second g >>> first f
5757
5858instance Products (->) where
5959 (***) = (BadArrow.***)
@@ -83,7 +83,7 @@ instance Monad m => Coproducts (Kleisli m) where
8383 (+++) = (BadArrow.+++)
8484
8585instance Coproducts cat => Coproducts (Dual cat) where
86− Dual f +++ Dual g = Dual $ f +++ g
86+ Dual f +++ Dual g = Dual $ right g >>> left f
8787
8888instance Coproducts (->) where
8989 (+++) = (BadArrow.+++)