Hoogle Search
Within LTS Haskell 24.45 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
-
For a good explanation of profunctors in Haskell see Dan Piponi's article: http://blog.sigfpe.com/2011/07/profunctors-in-haskell.html For more information on strength and costrength, see: http://comonad.com/reader/2008/deriving-strength-from-laziness/
class
Profunctor (p :: Type -> Type -> Type)profunctors Data.Profunctor Formally, the class Profunctor represents a profunctor from Hask -> Hask. Intuitively it is a bifunctor where the first argument is contravariant and the second argument is covariant. You can define a Profunctor by either defining dimap or by defining both lmap and rmap. If you supply dimap, you should ensure that:
dimap id id ≡ id
If you supply lmap and rmap, ensure:lmap id ≡ id rmap id ≡ id
If you supply both, you should also ensure:dimap f g ≡ lmap f . rmap g
These ensure by parametricity:dimap (f . g) (h . i) ≡ dimap g h . dimap f i lmap (f . g) ≡ lmap g . lmap f rmap (f . g) ≡ rmap f . rmap g
-
profunctors Data.Profunctor.Adjunction Laws:
unit . counit ≡ id counit . unit ≡ id
data
PastroSum (p :: Type -> Type -> Type) a bprofunctors Data.Profunctor.Choice PastroSum -| TambaraSum PastroSum freely constructs strength with respect to Either.
-
profunctors Data.Profunctor.Choice No documentation available.
data
Procompose (p :: k -> k1 -> Type) (q :: k2 -> k -> Type) (d :: k2) (c :: k1)profunctors Data.Profunctor.Composition Procompose p q is the Profunctor composition of the Profunctors p and q. For a good explanation of Profunctor composition in Haskell see Dan Piponi's article: http://blog.sigfpe.com/2011/07/profunctors-in-haskell.html Procompose has a polymorphic kind since 5.6.
class ProfunctorFunctor t =>
ProfunctorComonad (t :: Type -> Type -> Type -> Type -> Type -> Type)profunctors Data.Profunctor.Monad Laws:
proextract . promap f ≡ f . proextract proextract . produplicate ≡ id promap proextract . produplicate ≡ id produplicate . produplicate ≡ promap produplicate . produplicate
class
ProfunctorFunctor (t :: Type -> Type -> Type -> k -> k1 -> Type)profunctors Data.Profunctor.Monad ProfunctorFunctor has a polymorphic kind since 5.6.
class ProfunctorFunctor t =>
ProfunctorMonad (t :: Type -> Type -> Type -> Type -> Type -> Type)profunctors Data.Profunctor.Monad Laws:
promap f . proreturn ≡ proreturn . f projoin . proreturn ≡ id projoin . promap proreturn ≡ id projoin . projoin ≡ projoin . promap projoin
data
Prep (p :: Type -> k -> Type) (a :: k)profunctors Data.Profunctor.Rep Prep -| Star :: [Hask, Hask] -> Prof
This gives rise to a monad in Prof, (Star.Prep), and a comonad in [Hask,Hask] (Prep.Star) Prep has a polymorphic kind since 5.6.