semigroupoids-4.3: Semigroupoids: Category sans id

Copyright(C) 2011-2012 Edward Kmett,
LicenseBSD-style (see the file LICENSE)
MaintainerEdward Kmett <ekmett@gmail.com>
Stabilityexperimental
PortabilityMPTCs, GADTs
Safe HaskellSafe-Inferred
LanguageHaskell98

Data.Semifunctor.Associative

Description

 

Documentation

class Semifunctor p (Product k k) k => Associative k p where Source

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 where Source

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