semigroupoids-4.3: Semigroupoids: Category sans id

Safe HaskellSafe
LanguageHaskell98

Data.Semifunctor

Synopsis

Documentation

class (Semigroupoid c, Semigroupoid d) => Semifunctor f c d | f c -> d, f d -> c where

Semifunctors map objects to objects, and arrows to arrows preserving connectivity as normal functors, but do not purport to preserve identity arrows. We apply them to semigroupoids, because those don't even claim to offer identity arrows!

Methods

semimap :: c a b -> d (f a) (f b)

data Bi p a where

Used to map a more traditional bifunctor into a semifunctor

Constructors

Bi :: p a b -> Bi p (a, b) 

Instances

Disassociative (->) (Bi Either) 
Disassociative (->) (Bi (,)) 
Associative (->) (Bi Either) 
Associative (->) (Bi (,)) 
Symmetric (->) (Bi Either) 
Symmetric (->) (Bi (,)) 
Braided (->) (Bi Either) 
Braided (->) (Bi (,)) 
(Bind m, Monad m) => Disassociative (Kleisli m) (Bi (,)) 
(Bind m, Monad m) => Disassociative (Kleisli m) (Bi Either) 
(Extend m, Comonad m) => Disassociative (Cokleisli m) (Bi (,)) 
(Bind m, Monad m) => Associative (Kleisli m) (Bi (,)) 
(Bind m, Monad m) => Associative (Kleisli m) (Bi Either) 
(Extend m, Comonad m) => Associative (Cokleisli m) (Bi (,)) 
(Bind m, Monad m) => Symmetric (Kleisli m) (Bi (,)) 
(Bind m, Monad m) => Symmetric (Kleisli m) (Bi Either) 
(Extend w, Comonad w) => Symmetric (Cokleisli w) (Bi (,)) 
(Bind m, Monad m) => Braided (Kleisli m) (Bi (,)) 
(Bind m, Monad m) => Braided (Kleisli m) (Bi Either) 
(Extend w, Comonad w) => Braided (Cokleisli w) (Bi (,)) 
Semifunctor (Bi Either) (Product (->) (->)) (->) 
Semifunctor (Bi (,)) (Product (->) (->)) (->) 
Bind m => Semifunctor (Bi Either) (Product (Kleisli m) (Kleisli m)) (Kleisli m) 
Bind m => Semifunctor (Bi (,)) (Product (Kleisli m) (Kleisli m)) (Kleisli m) 
Extend w => Semifunctor (Bi (,)) (Product (Cokleisli w) (Cokleisli w)) (Cokleisli w) 

(#) :: a -> b -> Bi (,) (a, b)

semibimap :: Semifunctor p (Product l r) cod => l a b -> r c d -> cod (p (a, c)) (p (b, d))

semifirst :: (Semifunctor p (Product l r) cod, Ob r c) => l a b -> cod (p (a, c)) (p (b, c))

semisecond :: (Semifunctor p (Product l r) cod, Ob l a) => r b c -> cod (p (a, b)) (p (a, c))

first :: (Semifunctor p (Product l r) cod, Category r) => l a b -> cod (p (a, c)) (p (b, c))

second :: (Semifunctor p (Product l r) cod, Category l) => r b c -> cod (p (a, b)) (p (a, c))

data WrappedFunctor f a

Constructors

WrapFunctor 

Fields

unwrapFunctor :: f a
 

data WrappedTraversable1 f a

Constructors

WrapTraversable1 

Fields

unwrapTraversable1 :: f a