Data.Profunctor.Sieve

profunctors-5.2: Profunctors

Copyright | (C) 2015 Edward Kmett
License | BSD-style (see the file LICENSE)
Maintainer | Edward Kmett <ekmett@gmail.com>
Stability | provisional
Portability | MPTCs, fundeps
Safe Haskell | Safe
Language | Haskell2010

Data.Profunctor.Sieve

Description

Synopsis

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

# Documentation

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

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`.

Minimal complete definition

sieve

Methods

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

Instances

Sieve (->) Identity # |
Methods sieve :: (a -> b) -> a -> Identity b #
(Monad m, Functor m) => Sieve (Kleisli m) m # |
Methods sieve :: Kleisli m a b -> a -> m b #
Functor f => Sieve (Star f) f # |
Methods sieve :: Star f a b -> a -> f b #
Sieve (Forget r) (Const * r) # |
Methods sieve :: Forget r a b -> a -> Const * r b #
(Sieve p f, Sieve q g) => Sieve (Procompose p q) (Compose * * g f) # |
Methods sieve :: Procompose p q a b -> a -> Compose * * g f b #

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

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`.

Minimal complete definition

cosieve

Methods

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

Instances

Cosieve (->) Identity # |
Methods cosieve :: (a -> b) -> Identity a -> b #
Functor w => Cosieve (Cokleisli w) w # |
Methods cosieve :: Cokleisli w a b -> w a -> b #
Functor f => Cosieve (Costar f) f # |
Methods cosieve :: Costar f a b -> f a -> b #
Cosieve (Tagged *) (Proxy *) # |
Methods cosieve :: Tagged * a b -> Proxy * a -> b #
(Cosieve p f, Cosieve q g) => Cosieve (Procompose p q) (Compose * * f g) # |
Methods cosieve :: Procompose p q a b -> Compose * * f g a -> b #