This repository was archived by the owner on May 24, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -2,28 +2,28 @@ module Control.Arrow where
22
33import Data.Tuple (Tuple (..), swap )
44
5- class Arrow a where
5+ class ( Category a ) <= Arrow a where
66 arr :: forall b c . (b -> c ) -> a b c
77 first :: forall b c d . a b c -> a (Tuple b d ) (Tuple c d )
88
99instance arrowFunction :: Arrow (-> ) where
1010 arr f = f
1111 first f (Tuple b d) = Tuple (f b) d
1212
13- second :: forall a b c d . (Category a , Arrow a ) => a b c -> a (Tuple d b ) (Tuple d c )
13+ second :: forall a b c d . (Arrow a ) => a b c -> a (Tuple d b ) (Tuple d c )
1414second f = arr swap >>> first f >>> arr swap
1515
1616infixr 3 ***
1717infixr 3 &&&
1818
19- (***) :: forall a b b' c c' . (Category a , Arrow a ) => a b c -> a b' c' -> a (Tuple b b' ) (Tuple c c' )
19+ (***) :: forall a b b' c c' . (Arrow a ) => a b c -> a b' c' -> a (Tuple b b' ) (Tuple c c' )
2020(***) f g = first f >>> second g
2121
22- (&&&) :: forall a b b' c c' . (Category a , Arrow a ) => a b c -> a b c' -> a b (Tuple c c' )
22+ (&&&) :: forall a b b' c c' . (Arrow a ) => a b c -> a b c' -> a b (Tuple c c' )
2323(&&&) f g = arr (\b -> Tuple b b) >>> (f *** g)
2424
2525class ArrowZero a where
26- zeroArrow :: forall b c . a b c
26+ azero :: forall b c . a b c
2727
2828infixr 5 <+>
2929
You can’t perform that action at this time.
0 commit comments