profunctor-arrows-0.0.0.2: Profunctor arrows

Safe HaskellSafe
LanguageHaskell2010

Data.Profunctor.Extra

Synopsis

Documentation

type (+) = Either infixr 5 Source #

rgt :: (a -> b) -> (a + b) -> b Source #

rgt' :: (Void + b) -> b Source #

lft :: (b -> a) -> (a + b) -> a Source #

lft' :: (a + Void) -> a Source #

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

Swap the components of a pair.

eswap :: (a1 + a2) -> a2 + a1 Source #

fork :: a -> (a, a) Source #

join :: (a + a) -> a Source #

eval :: (a, a -> b) -> b Source #

apply :: (b -> a, b) -> a Source #

coeval :: b -> ((b -> a) + a) -> a Source #

branch :: (a -> Bool) -> b -> c -> a -> b + c Source #

branch' :: (a -> Bool) -> a -> a + a Source #

assocl :: (a, (b, c)) -> ((a, b), c) Source #

assocr :: ((a, b), c) -> (a, (b, c)) Source #

assocl' :: (a, b + c) -> (a, b) + c Source #

assocr' :: (a + b, c) -> a + (b, c) Source #

eassocl :: (a + (b + c)) -> (a + b) + c Source #

eassocr :: ((a + b) + c) -> a + (b + c) Source #

eassocr' :: ((a -> b) + c) -> a -> b + c Source #

forget1 :: ((c, a) -> (c, b)) -> a -> b Source #

forget2 :: ((a, c) -> (b, c)) -> a -> b Source #

forgetl :: ((c + a) -> c + b) -> a -> b Source #

forgetr :: ((a + c) -> b + c) -> a -> b Source #

unarr :: Comonad w => Sieve p w => p a b -> a -> b Source #

peval :: Strong p => p a (a -> b) -> p a b Source #

constl :: Profunctor p => b -> p b c -> p a c Source #

constr :: Profunctor p => c -> p a b -> p a c Source #

shiftl :: Profunctor p => p (a + b) c -> p b (c + d) Source #

shiftr :: Profunctor p => p b (c, d) -> p (a, b) c Source #

coercel :: Profunctor p => Bifunctor p => p a b -> p c b Source #

coercer :: Profunctor p => Contravariant (p a) => p a b -> p a c Source #

coercel' :: Corepresentable p => Contravariant (Corep p) => p a b -> p c b Source #

coercer' :: Representable p => Contravariant (Rep p) => p a b -> p a c Source #

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

costrong :: Costrong p => ((a, b) -> c) -> p c a -> p b a Source #

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

cochoice :: Cochoice p => (c -> a + b) -> p a c -> p a b Source #

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

repn :: Representable p => ((a -> Rep p b) -> s -> Rep p t) -> p a b -> p s t Source #

corepn :: Corepresentable p => ((Corep p a -> b) -> Corep p s -> t) -> p a b -> p s t Source #

star :: Applicative f => Star f a a Source #

toStar :: Sieve p f => p d c -> Star f d c Source #

fromStar :: Representable p => Star (Rep p) a b -> p a b Source #

costar :: Foldable f => Monoid b => (a -> b) -> Costar f a b Source #

uncostar :: Applicative f => Costar f a b -> a -> b Source #

toCostar :: Cosieve p f => p a b -> Costar f a b Source #

fromCostar :: Corepresentable p => Costar (Corep p) a b -> p a b Source #

pushr :: Closed p => Representable p => Applicative (Rep p) => p (a, b) c -> p a b -> p a c Source #

pushl :: Closed p => Representable p => Applicative (Rep p) => p a c -> p b c -> p a (b -> c) Source #

pliftA :: Representable p => Applicative (Rep p) => (b -> c -> d) -> p a b -> p a c -> p a d Source #

pdivide :: Representable p => Applicative (Rep p) => (a -> (a1, a2)) -> p a1 b -> p a2 b -> p a b Source #

pappend :: Representable p => Applicative (Rep p) => p a b -> p a b -> p a b Source #

(<<*>>) :: Representable p => Applicative (Rep p) => p a (b -> c) -> p a b -> p a c infixl 4 Source #

(****) :: Representable p => Applicative (Rep p) => p a1 b1 -> p a2 b2 -> p (a1, a2) (b1, b2) infixr 3 Source #

(&&&&) :: Representable p => Applicative (Rep p) => p a b1 -> p a b2 -> p a (b1, b2) infixr 3 Source #