@@ -10,7 +10,24 @@ Maintainer : Paweł Nowak <pawel834@gmail.com>
1010Stability : experimental
1111
1212-}
13−module Control.SIArrow where
13+module Control.SIArrow (
14+ -- * Arrow.
15+ SIArrow(..),
16+ (^>>), (>>^), (^<<), (<<^),
17+
18+ -- * Functor and applicative.
19+ (/$/), (/$~),
20+ (/*/), (/*), (*/),
21+
22+ -- * Signaling errors.
23+ sifail, (/?/),
24+
25+ -- * Combinators.
26+ sisequence,
27+ sisequence_,
28+ sireplicate,
29+ sireplicate_
30+ ) where
1431
1532import Control.Arrow (Kleisli(..))
1633import Control.Category
@@ -24,7 +41,7 @@ import Prelude hiding (id, (.))
2441
2542infixr 1 ^>>, >>^
2643infixr 1 ^<<, <<^
27−infixl 4 /$/, /$~, ~$/, ~$~
44+infixl 4 /$/, /$~
2845infixl 5 /*/, */, /*
2946
3047-- Categories.
@@ -75,21 +92,6 @@ ai /$/ f = sipure ai . f
7592 => ASemiIso' a b' -> cat c b -> cat c a
7693ai /$~ h = cloneSemiIso ai . morphed /$/ h
7794
78−-- | > ai ~$/ f = morphed . ai /$/ f
79−(~$/) :: (SIArrow cat, HFoldable a', HFoldable a,
80− HUnfoldable a', HUnfoldable a, Rep a' ~ Rep a)
81− => ASemiIso' a' b -> cat c b -> cat c a
82−ai ~$/ h = morphed . cloneSemiIso ai /$/ h
83−
84−-- | > ai ~$~ f = morphed . ai . morphed /$/ f
85−(~$~) :: (SIArrow cat,
86− HFoldable a, HUnfoldable a,
87− HFoldable b, HUnfoldable b,
88− HFoldable b', HUnfoldable b',
89− Rep b' ~ Rep b, Rep b' ~ Rep a)
90− => ASemiIso b' b' b' b' -> cat c b -> cat c a
91−ai ~$~ h = morphed . cloneSemiIso ai . morphed /$/ h
92−
9395(/*/) :: SIArrow cat => cat () b -> cat () c -> cat () (b, c)
9496a /*/ b = unit ^>> (a *** b)
9597