profunctor-arrows-0.0.0.1: Profunctor arrows

Safe HaskellSafe
LanguageHaskell2010

Data.Profunctor.Arrow

Synopsis

Documentation

newtype PArrow p a b Source #

Constructors

PArrow 

Fields

  • runPArrow :: forall x y. p (b, x) y -> p (a, x) y
     
Instances
Profunctor p => Strong (PArrow p) Source # 
Instance details

Defined in Data.Profunctor.Arrow

Methods

first' :: PArrow p a b -> PArrow p (a, c) (b, c) #

second' :: PArrow p a b -> PArrow p (c, a) (c, b) #

Profunctor p => Profunctor (PArrow p) Source # 
Instance details

Defined in Data.Profunctor.Arrow

Methods

dimap :: (a -> b) -> (c -> d) -> PArrow p b c -> PArrow p a d #

lmap :: (a -> b) -> PArrow p b c -> PArrow p a c #

rmap :: (b -> c) -> PArrow p a b -> PArrow p a c #

(#.) :: Coercible c b => q b c -> PArrow p a b -> PArrow p a c #

(.#) :: Coercible b a => PArrow p b c -> q a b -> PArrow p a c #

Profunctor p => Category (PArrow p :: Type -> Type -> Type) Source # 
Instance details

Defined in Data.Profunctor.Arrow

Methods

id :: PArrow p a a #

(.) :: PArrow p b c -> PArrow p a b -> PArrow p a c #

toArrow :: Arrow a => PArrow a b c -> a b c Source #

fromArrow :: Arrow a => a b c -> PArrow a b c Source #

arr :: Category p => Profunctor p => (a -> b) -> p a b Source #

preturn :: Category p => Profunctor p => p a a Source #

ex1 :: Category p => Profunctor p => p (a, b) b Source #

ex2 :: Category p => Profunctor p => p (a, b) a Source #

inl :: Category p => Profunctor p => p a (a + b) Source #

inr :: Category p => Profunctor p => p b (a + b) Source #

braid :: Category p => Profunctor p => p (a, b) (b, a) Source #

braide :: Category p => Profunctor p => p (a + b) (b + a) Source #

loop :: Costrong p => p (a, d) (b, d) -> p a b Source #

left :: Choice p => p a b -> p (a + c) (b + c) Source #

right :: Choice p => p a b -> p (c + a) (c + b) Source #

first :: Strong p => p a b -> p (a, c) (b, c) Source #

second :: Strong p => p a b -> p (c, a) (c, b) Source #

returnA :: Category p => Profunctor p => p a a Source #

(***) :: Category p => Strong p => p a1 b1 -> p a2 b2 -> p (a1, a2) (b1, b2) infixr 3 Source #

(+++) :: Category p => Choice p => p a1 b1 -> p a2 b2 -> p (a1 + a2) (b1 + b2) infixr 2 Source #

(&&&) :: Category p => Strong p => p a b1 -> p a b2 -> p a (b1, b2) infixr 3 Source #

(|||) :: Category p => Choice p => p a1 b -> p a2 b -> p (a1 + a2) b infixr 2 Source #

($$$) :: Category p => Strong p => p a (b -> c) -> p a b -> p a c infixr 0 Source #

achoose :: Category p => Choice p => (a -> a1 + a2) -> p a1 b -> p a2 b -> p a b Source #

adivide :: Category p => Strong p => (a -> (a1, a2)) -> p a1 b -> p a2 b -> p a b Source #

Profunctor arrow equivalent of divide.

aselect :: Category p => Choice p => ((b1 + b2) -> b) -> p a b1 -> p a b2 -> p a b Source #

adivided :: Category p => Strong p => p a1 b -> p a2 b -> p (a1, a2) b Source #

Profunctor arrow equivalent of divided.

aselected :: Category p => Choice p => p a b1 -> p a b2 -> p a (b1 + b2) Source #