pandora-0.2.9: A box of patterns and paradigms

Safe HaskellSafe
LanguageHaskell2010

Pandora.Pattern.Functor.Contravariant

Synopsis

Documentation

class Contravariant (t :: * -> *) where Source #

When providing a new instance, you should ensure it satisfies the two laws:
* Identity morphism: contramap identity ≡ identity
* Interpreted of morphisms: contramap f . contramap g ≡ contramap (g . f)

Minimal complete definition

(>$<)

Methods

(>$<) :: (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 >$

full :: t () -> t a Source #

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 # 
Instance details

Defined in Pandora.Paradigm.Primary.Functor.Predicate

Methods

(>$<) :: (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 # 
Instance details

Defined in Pandora.Paradigm.Primary.Functor.Proxy

Methods

(>$<) :: (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 (Constant a :: Type -> Type) Source # 
Instance details

Defined in Pandora.Paradigm.Primary.Functor.Constant

Methods

(>$<) :: (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 t => Contravariant (Backwards t) Source # 
Instance details

Defined in Pandora.Paradigm.Primary.Transformer.Backwards

Methods

(>$<) :: (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 # 
Instance details

Defined in Pandora.Paradigm.Primary.Transformer.Reverse

Methods

(>$<) :: (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 #

Contravariant (Kan (Left :: Type -> Wye Type) t u b) Source # 
Instance details

Defined in Pandora.Paradigm.Primary.Transformer.Kan

Methods

(>$<) :: (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 #