Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- class Contravariant (t :: * -> *) where
- (>$<) :: (a -> b) -> t b -> t a
- contramap :: (a -> b) -> t b -> t a
- (>$) :: b -> t b -> t a
- ($<) :: t b -> b -> t a
- full :: t () -> t a
- (>&<) :: t b -> (a -> b) -> t a
- (>$$<) :: Contravariant u => (a -> b) -> ((t :. u) := a) -> (t :. u) := b
- (>$$$<) :: (Contravariant u, Contravariant v) => (a -> b) -> ((t :. (u :. v)) := b) -> (t :. (u :. v)) := a
- (>$$$$<) :: (Contravariant u, Contravariant v, Contravariant w) => (a -> b) -> ((t :. (u :. (v :. w))) := a) -> (t :. (u :. (v :. w))) := b
- (>&&<) :: Contravariant u => ((t :. u) := a) -> (a -> b) -> (t :. u) := b
- (>&&&<) :: (Contravariant u, Contravariant v) => ((t :. (u :. v)) := b) -> (a -> b) -> (t :. (u :. v)) := a
- (>&&&&<) :: (Contravariant u, Contravariant v, Contravariant w) => ((t :. (u :. (v :. w))) := a) -> (a -> b) -> (t :. (u :. (v :. w))) := b
Documentation
class Contravariant (t :: * -> *) where Source #
When providing a new instance, you should ensure it satisfies: * Identity morphism: contramap identity ≡ identity * Interpreted of morphisms: contramap f . contramap g ≡ contramap (g . f)
(>$<) :: (a -> b) -> t b -> t a infixl 4 Source #
Infix version of contramap
contramap :: (a -> b) -> t b -> t a Source #
Prefix version of >$<
(>$) :: b -> t b -> t a infixl 4 Source #
Replace all locations in the output with the same value
($<) :: t b -> b -> t a infixl 4 Source #
Flipped version of >$
Fill the input of evaluation
(>&<) :: t b -> (a -> b) -> t a Source #
Flipped infix version of contramap
(>$$<) :: Contravariant u => (a -> b) -> ((t :. u) := a) -> (t :. u) := b Source #
Infix versions of contramap
with various nesting levels
(>$$$<) :: (Contravariant u, Contravariant v) => (a -> b) -> ((t :. (u :. v)) := b) -> (t :. (u :. v)) := a Source #
(>$$$$<) :: (Contravariant u, Contravariant v, Contravariant w) => (a -> b) -> ((t :. (u :. (v :. w))) := a) -> (t :. (u :. (v :. w))) := b Source #
(>&&<) :: Contravariant u => ((t :. u) := a) -> (a -> b) -> (t :. u) := b Source #
Infix flipped versions of contramap
with various nesting levels
(>&&&<) :: (Contravariant u, Contravariant v) => ((t :. (u :. v)) := b) -> (a -> b) -> (t :. (u :. v)) := a Source #
(>&&&&<) :: (Contravariant u, Contravariant v, Contravariant w) => ((t :. (u :. (v :. w))) := a) -> (a -> b) -> (t :. (u :. (v :. w))) := b Source #
Instances
Contravariant Predicate Source # | |
Defined in Pandora.Paradigm.Primary.Functor.Predicate (>$<) :: (a -> b) -> Predicate b -> Predicate a Source # contramap :: (a -> b) -> Predicate b -> Predicate a Source # (>$) :: b -> Predicate b -> Predicate a Source # ($<) :: Predicate b -> b -> Predicate a Source # full :: Predicate () -> Predicate a Source # (>&<) :: Predicate b -> (a -> b) -> Predicate a Source # (>$$<) :: Contravariant u => (a -> b) -> ((Predicate :. u) := a) -> (Predicate :. u) := b Source # (>$$$<) :: (Contravariant u, Contravariant v) => (a -> b) -> ((Predicate :. (u :. v)) := b) -> (Predicate :. (u :. v)) := a Source # (>$$$$<) :: (Contravariant u, Contravariant v, Contravariant w) => (a -> b) -> ((Predicate :. (u :. (v :. w))) := a) -> (Predicate :. (u :. (v :. w))) := b Source # (>&&<) :: Contravariant u => ((Predicate :. u) := a) -> (a -> b) -> (Predicate :. u) := b Source # (>&&&<) :: (Contravariant u, Contravariant v) => ((Predicate :. (u :. v)) := b) -> (a -> b) -> (Predicate :. (u :. v)) := a Source # (>&&&&<) :: (Contravariant u, Contravariant v, Contravariant w) => ((Predicate :. (u :. (v :. w))) := a) -> (a -> b) -> (Predicate :. (u :. (v :. w))) := b Source # | |
Contravariant (Proxy :: Type -> Type) Source # | |
Defined in Pandora.Paradigm.Primary.Functor.Proxy (>$<) :: (a -> b) -> Proxy b -> Proxy a Source # contramap :: (a -> b) -> Proxy b -> Proxy a Source # (>$) :: b -> Proxy b -> Proxy a Source # ($<) :: Proxy b -> b -> Proxy a Source # full :: Proxy () -> Proxy a Source # (>&<) :: Proxy b -> (a -> b) -> Proxy a Source # (>$$<) :: Contravariant u => (a -> b) -> ((Proxy :. u) := a) -> (Proxy :. u) := b Source # (>$$$<) :: (Contravariant u, Contravariant v) => (a -> b) -> ((Proxy :. (u :. v)) := b) -> (Proxy :. (u :. v)) := a Source # (>$$$$<) :: (Contravariant u, Contravariant v, Contravariant w) => (a -> b) -> ((Proxy :. (u :. (v :. w))) := a) -> (Proxy :. (u :. (v :. w))) := b Source # (>&&<) :: Contravariant u => ((Proxy :. u) := a) -> (a -> b) -> (Proxy :. u) := b Source # (>&&&<) :: (Contravariant u, Contravariant v) => ((Proxy :. (u :. v)) := b) -> (a -> b) -> (Proxy :. (u :. v)) := a Source # (>&&&&<) :: (Contravariant u, Contravariant v, Contravariant w) => ((Proxy :. (u :. (v :. w))) := a) -> (a -> b) -> (Proxy :. (u :. (v :. w))) := b Source # | |
Contravariant (Convergence r) Source # | |
Defined in Pandora.Paradigm.Primary.Functor.Convergence (>$<) :: (a -> b) -> Convergence r b -> Convergence r a Source # contramap :: (a -> b) -> Convergence r b -> Convergence r a Source # (>$) :: b -> Convergence r b -> Convergence r a Source # ($<) :: Convergence r b -> b -> Convergence r a Source # full :: Convergence r () -> Convergence r a Source # (>&<) :: Convergence r b -> (a -> b) -> Convergence r a Source # (>$$<) :: Contravariant u => (a -> b) -> ((Convergence r :. u) := a) -> (Convergence r :. u) := b Source # (>$$$<) :: (Contravariant u, Contravariant v) => (a -> b) -> ((Convergence r :. (u :. v)) := b) -> (Convergence r :. (u :. v)) := a Source # (>$$$$<) :: (Contravariant u, Contravariant v, Contravariant w) => (a -> b) -> ((Convergence r :. (u :. (v :. w))) := a) -> (Convergence r :. (u :. (v :. w))) := b Source # (>&&<) :: Contravariant u => ((Convergence r :. u) := a) -> (a -> b) -> (Convergence r :. u) := b Source # (>&&&<) :: (Contravariant u, Contravariant v) => ((Convergence r :. (u :. v)) := b) -> (a -> b) -> (Convergence r :. (u :. v)) := a Source # (>&&&&<) :: (Contravariant u, Contravariant v, Contravariant w) => ((Convergence r :. (u :. (v :. w))) := a) -> (a -> b) -> (Convergence r :. (u :. (v :. w))) := b Source # | |
Contravariant (Constant a :: Type -> Type) Source # | |
Defined in Pandora.Paradigm.Primary.Functor.Constant (>$<) :: (a0 -> b) -> Constant a b -> Constant a a0 Source # contramap :: (a0 -> b) -> Constant a b -> Constant a a0 Source # (>$) :: b -> Constant a b -> Constant a a0 Source # ($<) :: Constant a b -> b -> Constant a a0 Source # full :: Constant a () -> Constant a a0 Source # (>&<) :: Constant a b -> (a0 -> b) -> Constant a a0 Source # (>$$<) :: Contravariant u => (a0 -> b) -> ((Constant a :. u) := a0) -> (Constant a :. u) := b Source # (>$$$<) :: (Contravariant u, Contravariant v) => (a0 -> b) -> ((Constant a :. (u :. v)) := b) -> (Constant a :. (u :. v)) := a0 Source # (>$$$$<) :: (Contravariant u, Contravariant v, Contravariant w) => (a0 -> b) -> ((Constant a :. (u :. (v :. w))) := a0) -> (Constant a :. (u :. (v :. w))) := b Source # (>&&<) :: Contravariant u => ((Constant a :. u) := a0) -> (a0 -> b) -> (Constant a :. u) := b Source # (>&&&<) :: (Contravariant u, Contravariant v) => ((Constant a :. (u :. v)) := b) -> (a0 -> b) -> (Constant a :. (u :. v)) := a0 Source # (>&&&&<) :: (Contravariant u, Contravariant v, Contravariant w) => ((Constant a :. (u :. (v :. w))) := a0) -> (a0 -> b) -> (Constant a :. (u :. (v :. w))) := b Source # | |
Contravariant (Flip ((->) :: Type -> Type -> Type) r) Source # | |
Defined in Pandora.Paradigm.Primary (>$<) :: (a -> b) -> Flip (->) r b -> Flip (->) r a Source # contramap :: (a -> b) -> Flip (->) r b -> Flip (->) r a Source # (>$) :: b -> Flip (->) r b -> Flip (->) r a Source # ($<) :: Flip (->) r b -> b -> Flip (->) r a Source # full :: Flip (->) r () -> Flip (->) r a Source # (>&<) :: Flip (->) r b -> (a -> b) -> Flip (->) r a Source # (>$$<) :: Contravariant u => (a -> b) -> ((Flip (->) r :. u) := a) -> (Flip (->) r :. u) := b Source # (>$$$<) :: (Contravariant u, Contravariant v) => (a -> b) -> ((Flip (->) r :. (u :. v)) := b) -> (Flip (->) r :. (u :. v)) := a Source # (>$$$$<) :: (Contravariant u, Contravariant v, Contravariant w) => (a -> b) -> ((Flip (->) r :. (u :. (v :. w))) := a) -> (Flip (->) r :. (u :. (v :. w))) := b Source # (>&&<) :: Contravariant u => ((Flip (->) r :. u) := a) -> (a -> b) -> (Flip (->) r :. u) := b Source # (>&&&<) :: (Contravariant u, Contravariant v) => ((Flip (->) r :. (u :. v)) := b) -> (a -> b) -> (Flip (->) r :. (u :. v)) := a Source # (>&&&&<) :: (Contravariant u, Contravariant v, Contravariant w) => ((Flip (->) r :. (u :. (v :. w))) := a) -> (a -> b) -> (Flip (->) r :. (u :. (v :. w))) := b Source # | |
Contravariant t => Contravariant (Backwards t) Source # | |
Defined in Pandora.Paradigm.Primary.Transformer.Backwards (>$<) :: (a -> b) -> Backwards t b -> Backwards t a Source # contramap :: (a -> b) -> Backwards t b -> Backwards t a Source # (>$) :: b -> Backwards t b -> Backwards t a Source # ($<) :: Backwards t b -> b -> Backwards t a Source # full :: Backwards t () -> Backwards t a Source # (>&<) :: Backwards t b -> (a -> b) -> Backwards t a Source # (>$$<) :: Contravariant u => (a -> b) -> ((Backwards t :. u) := a) -> (Backwards t :. u) := b Source # (>$$$<) :: (Contravariant u, Contravariant v) => (a -> b) -> ((Backwards t :. (u :. v)) := b) -> (Backwards t :. (u :. v)) := a Source # (>$$$$<) :: (Contravariant u, Contravariant v, Contravariant w) => (a -> b) -> ((Backwards t :. (u :. (v :. w))) := a) -> (Backwards t :. (u :. (v :. w))) := b Source # (>&&<) :: Contravariant u => ((Backwards t :. u) := a) -> (a -> b) -> (Backwards t :. u) := b Source # (>&&&<) :: (Contravariant u, Contravariant v) => ((Backwards t :. (u :. v)) := b) -> (a -> b) -> (Backwards t :. (u :. v)) := a Source # (>&&&&<) :: (Contravariant u, Contravariant v, Contravariant w) => ((Backwards t :. (u :. (v :. w))) := a) -> (a -> b) -> (Backwards t :. (u :. (v :. w))) := b Source # | |
Contravariant t => Contravariant (Reverse t) Source # | |
Defined in Pandora.Paradigm.Primary.Transformer.Reverse (>$<) :: (a -> b) -> Reverse t b -> Reverse t a Source # contramap :: (a -> b) -> Reverse t b -> Reverse t a Source # (>$) :: b -> Reverse t b -> Reverse t a Source # ($<) :: Reverse t b -> b -> Reverse t a Source # full :: Reverse t () -> Reverse t a Source # (>&<) :: Reverse t b -> (a -> b) -> Reverse t a Source # (>$$<) :: Contravariant u => (a -> b) -> ((Reverse t :. u) := a) -> (Reverse t :. u) := b Source # (>$$$<) :: (Contravariant u, Contravariant v) => (a -> b) -> ((Reverse t :. (u :. v)) := b) -> (Reverse t :. (u :. v)) := a Source # (>$$$$<) :: (Contravariant u, Contravariant v, Contravariant w) => (a -> b) -> ((Reverse t :. (u :. (v :. w))) := a) -> (Reverse t :. (u :. (v :. w))) := b Source # (>&&<) :: Contravariant u => ((Reverse t :. u) := a) -> (a -> b) -> (Reverse t :. u) := b Source # (>&&&<) :: (Contravariant u, Contravariant v) => ((Reverse t :. (u :. v)) := b) -> (a -> b) -> (Reverse t :. (u :. v)) := a Source # (>&&&&<) :: (Contravariant u, Contravariant v, Contravariant w) => ((Reverse t :. (u :. (v :. w))) := a) -> (a -> b) -> (Reverse t :. (u :. (v :. w))) := b Source # | |
(Bivariant p, Contravariant t, Contravariant u) => Contravariant ((t >:.:< u) := p) Source # | |
Defined in Pandora.Paradigm.Schemes.T_U (>$<) :: (a -> b) -> ((t >:.:< u) := p) b -> ((t >:.:< u) := p) a Source # contramap :: (a -> b) -> ((t >:.:< u) := p) b -> ((t >:.:< u) := p) a Source # (>$) :: b -> ((t >:.:< u) := p) b -> ((t >:.:< u) := p) a Source # ($<) :: ((t >:.:< u) := p) b -> b -> ((t >:.:< u) := p) a Source # full :: ((t >:.:< u) := p) () -> ((t >:.:< u) := p) a Source # (>&<) :: ((t >:.:< u) := p) b -> (a -> b) -> ((t >:.:< u) := p) a Source # (>$$<) :: Contravariant u0 => (a -> b) -> ((((t >:.:< u) := p) :. u0) := a) -> (((t >:.:< u) := p) :. u0) := b Source # (>$$$<) :: (Contravariant u0, Contravariant v) => (a -> b) -> ((((t >:.:< u) := p) :. (u0 :. v)) := b) -> (((t >:.:< u) := p) :. (u0 :. v)) := a Source # (>$$$$<) :: (Contravariant u0, Contravariant v, Contravariant w) => (a -> b) -> ((((t >:.:< u) := p) :. (u0 :. (v :. w))) := a) -> (((t >:.:< u) := p) :. (u0 :. (v :. w))) := b Source # (>&&<) :: Contravariant u0 => ((((t >:.:< u) := p) :. u0) := a) -> (a -> b) -> (((t >:.:< u) := p) :. u0) := b Source # (>&&&<) :: (Contravariant u0, Contravariant v) => ((((t >:.:< u) := p) :. (u0 :. v)) := b) -> (a -> b) -> (((t >:.:< u) := p) :. (u0 :. v)) := a Source # (>&&&&<) :: (Contravariant u0, Contravariant v, Contravariant w) => ((((t >:.:< u) := p) :. (u0 :. (v :. w))) := a) -> (a -> b) -> (((t >:.:< u) := p) :. (u0 :. (v :. w))) := b Source # | |
(Divariant p, Contravariant t, Covariant u) => Covariant ((t >:.:> u) := p) Source # | |
Defined in Pandora.Paradigm.Schemes.T_U (<$>) :: (a -> b) -> ((t >:.:> u) := p) a -> ((t >:.:> u) := p) b Source # comap :: (a -> b) -> ((t >:.:> u) := p) a -> ((t >:.:> u) := p) b Source # (<$) :: a -> ((t >:.:> u) := p) b -> ((t >:.:> u) := p) a Source # ($>) :: ((t >:.:> u) := p) a -> b -> ((t >:.:> u) := p) b Source # void :: ((t >:.:> u) := p) a -> ((t >:.:> u) := p) () Source # loeb :: ((t >:.:> u) := p) (a <:= ((t >:.:> u) := p)) -> ((t >:.:> u) := p) a Source # (<&>) :: ((t >:.:> u) := p) a -> (a -> b) -> ((t >:.:> u) := p) b Source # (<$$>) :: Covariant u0 => (a -> b) -> ((((t >:.:> u) := p) :. u0) := a) -> (((t >:.:> u) := p) :. u0) := b Source # (<$$$>) :: (Covariant u0, Covariant v) => (a -> b) -> ((((t >:.:> u) := p) :. (u0 :. v)) := a) -> (((t >:.:> u) := p) :. (u0 :. v)) := b Source # (<$$$$>) :: (Covariant u0, Covariant v, Covariant w) => (a -> b) -> ((((t >:.:> u) := p) :. (u0 :. (v :. w))) := a) -> (((t >:.:> u) := p) :. (u0 :. (v :. w))) := b Source # (<&&>) :: Covariant u0 => ((((t >:.:> u) := p) :. u0) := a) -> (a -> b) -> (((t >:.:> u) := p) :. u0) := b Source # (<&&&>) :: (Covariant u0, Covariant v) => ((((t >:.:> u) := p) :. (u0 :. v)) := a) -> (a -> b) -> (((t >:.:> u) := p) :. (u0 :. v)) := b Source # (<&&&&>) :: (Covariant u0, Covariant v, Covariant w) => ((((t >:.:> u) := p) :. (u0 :. (v :. w))) := a) -> (a -> b) -> (((t >:.:> u) := p) :. (u0 :. (v :. w))) := b Source # | |
Contravariant (Kan ('Left :: Type -> Wye Type) t u b) Source # | |
Defined in Pandora.Paradigm.Primary.Transformer.Kan (>$<) :: (a -> b0) -> Kan 'Left t u b b0 -> Kan 'Left t u b a Source # contramap :: (a -> b0) -> Kan 'Left t u b b0 -> Kan 'Left t u b a Source # (>$) :: b0 -> Kan 'Left t u b b0 -> Kan 'Left t u b a Source # ($<) :: Kan 'Left t u b b0 -> b0 -> Kan 'Left t u b a Source # full :: Kan 'Left t u b () -> Kan 'Left t u b a Source # (>&<) :: Kan 'Left t u b b0 -> (a -> b0) -> Kan 'Left t u b a Source # (>$$<) :: Contravariant u0 => (a -> b0) -> ((Kan 'Left t u b :. u0) := a) -> (Kan 'Left t u b :. u0) := b0 Source # (>$$$<) :: (Contravariant u0, Contravariant v) => (a -> b0) -> ((Kan 'Left t u b :. (u0 :. v)) := b0) -> (Kan 'Left t u b :. (u0 :. v)) := a Source # (>$$$$<) :: (Contravariant u0, Contravariant v, Contravariant w) => (a -> b0) -> ((Kan 'Left t u b :. (u0 :. (v :. w))) := a) -> (Kan 'Left t u b :. (u0 :. (v :. w))) := b0 Source # (>&&<) :: Contravariant u0 => ((Kan 'Left t u b :. u0) := a) -> (a -> b0) -> (Kan 'Left t u b :. u0) := b0 Source # (>&&&<) :: (Contravariant u0, Contravariant v) => ((Kan 'Left t u b :. (u0 :. v)) := b0) -> (a -> b0) -> (Kan 'Left t u b :. (u0 :. v)) := a Source # (>&&&&<) :: (Contravariant u0, Contravariant v, Contravariant w) => ((Kan 'Left t u b :. (u0 :. (v :. w))) := a) -> (a -> b0) -> (Kan 'Left t u b :. (u0 :. (v :. w))) := b0 Source # |