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

Commit de9b85b

Browse files
committed
Update for Semigroupoid
1 parent b05cb84 commit de9b85b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Control/Arrow/Kleisli.purs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@ data Kleisli m a b = Kleisli (a -> m b)
88
runKleisli :: forall m a b. Kleisli m a b -> a -> m b
99
runKleisli (Kleisli f) = f
1010

11+
instance semigroupoidKleisli :: (Monad m) => Semigroupoid (Kleisli m) where
12+
(<<<) (Kleisli f) (Kleisli g) = Kleisli (\b -> g b >>= f)
13+
1114
instance categoryKleisli :: (Monad m) => Category (Kleisli m) where
1215
id = Kleisli return
13-
(<<<) (Kleisli f) (Kleisli g) = Kleisli (\b -> g b >>= f)
1416

1517
instance arrowKleisli :: (Monad m) => Arrow (Kleisli m) where
1618
arr f = Kleisli (return <<< f)

0 commit comments

Comments
 (0)