git.iko.soy/semi-iso-optics
on master help sign in
Add minimal pragmas.
commitc97679d0e3e0f9821a32632e387237496f52e155 authorPaweł Nowak <pawel834@gmail.com> dateThu 11 Dec 2014, 16:29 (12 years ago) parent67c1554
2 files changed+10
Control/Category/Structures.hs+8 Control/SIArrow.hs+2
Control/Category/Structures.hs+8
@@ -32,6 +32,8 @@ class Category cat => Products cat where
3232 (***) :: cat a b -> cat c d -> cat (a, c) (b, d)
3333 a *** b = first a >>> second b
3434
35+ {-# MINIMAL (***) | first, second #-}
36+
3537instance Monad m => Products (Kleisli m) where
3638 (***) = (BadArrow.***)
3739
@@ -45,6 +47,8 @@ class Category cat => Coproducts cat where
4547 (+++) :: cat a b -> cat c d -> cat (Either a c) (Either b d)
4648 a +++ b = left a >>> right b
4749
50+ {-# MINIMAL (+++) | left, right #-}
51+
4852instance Monad m => Coproducts (Kleisli m) where
4953 (+++) = (BadArrow.+++)
5054
@@ -52,9 +56,13 @@ class Category cat => CatPlus cat where
5256 cempty :: cat a b
5357 (/+/) :: cat a b -> cat a b -> cat a b
5458
59+ {-# MINIMAL cempty, (/+/) #-}
60+
5561instance MonadPlus m => CatPlus (Kleisli m) where
5662 cempty = BadArrow.zeroArrow
5763 (/+/) = (BadArrow.<+>)
5864
5965class CategoryTrans t where
6066 clift :: Category cat => cat a b -> t cat a b
67+
68+ {-# MINIMAL clift #-}
Control/SIArrow.hs+2
@@ -41,6 +41,8 @@ class (Products cat, Coproducts cat, CatPlus cat) => SIArrow cat where
4141 simany :: cat () b -> cat () [b]
4242 simany v = sisome v /+/ sipure _Empty
4343
44+ {-# MINIMAL siarr #-}
45+
4446instance MonadPlus m => SIArrow (Kleisli m) where
4547 siarr ai = Kleisli $ either fail return . apply ai
4648