semigroupoid-extras-0.2.7.2: Semigroupoids requiring Haskell extensions

Safe HaskellSafe-Infered

Data.Semifunctor.Associative

Documentation

class Semifunctor p (Product k k) k => Associative k p whereSource

Methods

associate :: k (p (p (a, b), c)) (p (a, p (b, c)))Source

Instances

kleisliAssociate :: (Monad m, Semifunctor p (Product (Kleisli m) (Kleisli m)) (Kleisli m), Associative (->) p) => Kleisli m (p (p (a, b), c)) (p (a, p (b, c)))Source

cokleisliAssociate :: (Comonad m, Semifunctor p (Product (Cokleisli m) (Cokleisli m)) (Cokleisli m), Associative (->) p) => Cokleisli m (p (p (a, b), c)) (p (a, p (b, c)))Source

class Semifunctor p (Product k k) k => Disassociative k p whereSource

Methods

disassociate :: k (p (a, p (b, c))) (p (p (a, b), c))Source

kleisliDisassociate :: (Monad m, Semifunctor p (Product (Kleisli m) (Kleisli m)) (Kleisli m), Disassociative (->) p) => Kleisli m (p (a, p (b, c))) (p (p (a, b), c))Source

cokleisliDisassociate :: (Comonad m, Semifunctor p (Product (Cokleisli m) (Cokleisli m)) (Cokleisli m), Disassociative (->) p) => Cokleisli m (p (a, p (b, c))) (p (p (a, b), c))Source