| Copyright | (c) Edward Kmett 2014 |
|---|---|
| License | BSD3 |
| Maintainer | Edward Kmett <ekmett@gmail.com> |
| Stability | experimental |
| Portability | non-portable |
| Safe Haskell | None |
| Language | Haskell2010 |
Hask.Constrained
Description
- newtype p |= q = Constrained {
- runConstrained :: p => q
- data EnvC p q = EnvC (Dict p) q
Documentation
newtype p |= q infixr 9 Source
(|=) :: Constraint -> * -> *
This is a corepresentable profunctor
Constructors
| Constrained | |
Fields
| |
Instances
| Corepresentable Constraint * * (|=) | |
| Monoidal * * ((|=) e) | |
| Semimonoidal * * ((|=) e) | |
| Functor * * ((|=) e) | |
| (-|) * * (EnvC e) ((|=) e) | |
| Monoid Constraint e => Comonad * ((|=) e) | |
| Cosemimonad * ((|=) e) | |
| Semimonad * ((|=) e) | |
| Monoid * p => Monoid * ((|=) e p) | |
| Semigroup * p => Semigroup * ((|=) e p) | |
| Contravariant (* -> *) Constraint (|=) | |
| type Corep Constraint * * (|=) = Dict |
We could flip this around to permit a Curried instance, but then we lose a lot of structure.
Instances
| Comonoidal * * (EnvC p) | |
| Cosemimonoidal * * (EnvC p) | |
| Monoid Constraint p => Monoidal * * (EnvC p) | |
| Semimonoidal * * (EnvC p) | |
| Functor * * (EnvC p) | |
| (-|) * * (EnvC e) ((|=) e) | |
| Comonad * (EnvC p) | |
| Cosemimonad * (EnvC p) | |
| Semimonad * (EnvC p) | |
| Functor Constraint (* -> *) EnvC |