Skip to content
This repository was archived by the owner on May 24, 2018. It is now read-only.

Commit 4f1021c

Browse files
committed
Update classes, rename zeroArrow
1 parent 5d17cd9 commit 4f1021c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/Control/Arrow.purs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,28 @@ module Control.Arrow where
22

33
import 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

99
instance 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)
1414
second f = arr swap >>> first f >>> arr swap
1515

1616
infixr 3 ***
1717
infixr 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

2525
class ArrowZero a where
26-
zeroArrow :: forall b c. a b c
26+
azero :: forall b c. a b c
2727

2828
infixr 5 <+>
2929

0 commit comments

Comments
 (0)