profunctors-5.0.0.1: Profunctors

Copyright(C) 2015 Edward Kmett
LicenseBSD-style (see the file LICENSE)
MaintainerEdward Kmett <ekmett@gmail.com>
Stabilityprovisional
PortabilityMPTCs, fundeps
Safe HaskellTrustworthy
LanguageHaskell2010

Data.Profunctor.Sieve

Description

 

Synopsis

Documentation

class (Profunctor p, Functor f) => Sieve p f | p -> f where Source

A Profunctor p is a Sieve on f if it is a subprofunctor of Star f.

That is to say it is a subset of Hom(-,f=) closed under lmap and rmap.

Alternately, you can view it as a sieve in the comma category Hask/f.

Methods

sieve :: p a b -> a -> f b Source

Instances

Sieve (->) Identity 
(Monad m, Functor m) => Sieve (Kleisli m) m 
Functor f => Sieve (Star f) f 
Sieve (Forget r) (Const r) 
(Sieve p f, Sieve q g) => Sieve (Procompose p q) (Compose g f) 

class (Profunctor p, Functor f) => Cosieve p f | p -> f where Source

A Profunctor p is a Cosieve on f if it is a subprofunctor of Costar f.

That is to say it is a subset of Hom(f-,=) closed under lmap and rmap.

Alternately, you can view it as a cosieve in the comma category f/Hask.

Methods

cosieve :: p a b -> f a -> b Source

Instances

Cosieve (->) Identity 
Functor w => Cosieve (Cokleisli w) w 
Functor f => Cosieve (Costar f) f 
Cosieve (Tagged *) (Proxy *) 
(Cosieve p f, Cosieve q g) => Cosieve (Procompose p q) (Compose f g)