Copyright | (C) 2014-2018 Edward Kmett |
---|---|
License | BSD-style (see the file LICENSE) |
Maintainer | Edward Kmett <ekmett@gmail.com> |
Stability | experimental |
Portability | portable |
Safe Haskell | Trustworthy |
Language | Haskell2010 |
Synopsis
- class Profunctor p => Closed (p :: Type -> Type -> Type) where
- closed :: p a b -> p (x -> a) (x -> b)
- newtype Closure (p :: Type -> Type -> Type) a b = Closure {
- runClosure :: forall x. p (x -> a) (x -> b)
- close :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). Closed p => (p :-> q) -> p :-> Closure q
- unclose :: forall (q :: Type -> Type -> Type) (p :: Type -> Type -> Type). Profunctor q => (p :-> Closure q) -> p :-> q
- data Environment (p :: Type -> Type -> Type) a b where
- Environment :: forall z y b (p :: Type -> Type -> Type) x a. ((z -> y) -> b) -> p x y -> (a -> z -> x) -> Environment p a b
- curry' :: Closed p => p (a, b) c -> p a (b -> c)
Documentation
class Profunctor p => Closed (p :: Type -> Type -> Type) where Source #
A strong profunctor allows the monoidal structure to pass through.
A closed profunctor allows the closed structure to pass through.
Instances
newtype Closure (p :: Type -> Type -> Type) a b Source #
Closure
adjoins a Closed
structure to any Profunctor
.
Closure | |
|
Instances
close :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). Closed p => (p :-> q) -> p :-> Closure q Source #
unclose :: forall (q :: Type -> Type -> Type) (p :: Type -> Type -> Type). Profunctor q => (p :-> Closure q) -> p :-> q Source #
data Environment (p :: Type -> Type -> Type) a b where Source #
Environment :: forall z y b (p :: Type -> Type -> Type) x a. ((z -> y) -> b) -> p x y -> (a -> z -> x) -> Environment p a b |