pandora-0.4.4: A box of patterns and paradigms
Safe HaskellSafe-Inferred
LanguageHaskell2010

Pandora.Pattern.Functor.Contravariant

Synopsis

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)

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

Instances details
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 (Convergence r) Source # 
Instance details

Defined in Pandora.Paradigm.Primary.Functor.Convergence

Methods

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

Defined in Pandora.Paradigm.Primary

Methods

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

(forall i. Covariant (p i), Bivariant p ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type), Contravariant t, Contravariant u) => Contravariant ((t >:.:< u) := p) Source # 
Instance details

Defined in Pandora.Paradigm.Schemes.T_U

Methods

(>$<) :: (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 ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type), Contravariant t, Covariant u) => Covariant ((t >:.:> u) := p) Source # 
Instance details

Defined in Pandora.Paradigm.Schemes.T_U

Methods

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

(.#..) :: (((t >:.:> u) := p) ~ v a, Category v) => v c d -> ((v a :. v b) := c) -> (v a :. v b) := d Source #

(.#...) :: (((t >:.:> u) := p) ~ v a, ((t >:.:> u) := p) ~ v b, Category v, Covariant (v a), Covariant (v b)) => v d e -> ((v a :. (v b :. v c)) := d) -> (v a :. (v b :. v c)) := e Source #

(.#....) :: (((t >:.:> u) := p) ~ v a, ((t >:.:> u) := p) ~ v b, ((t >:.:> u) := p) ~ v c, Category v, Covariant (v a), Covariant (v b), Covariant (v c)) => v e f -> ((v a :. (v b :. (v c :. v d))) := e) -> (v a :. (v b :. (v c :. v d))) := f Source #

(<$$) :: Covariant u0 => b -> ((((t >:.:> u) := p) :. u0) := a) -> (((t >:.:> u) := p) :. u0) := b Source #

(<$$$) :: (Covariant u0, Covariant v) => b -> ((((t >:.:> u) := p) :. (u0 :. v)) := a) -> (((t >:.:> u) := p) :. (u0 :. v)) := b Source #

(<$$$$) :: (Covariant u0, Covariant v, Covariant w) => b -> ((((t >:.:> u) := p) :. (u0 :. (v :. w))) := a) -> (((t >:.:> u) := p) :. (u0 :. (v :. w))) := b Source #

($$>) :: Covariant u0 => ((((t >:.:> u) := p) :. u0) := a) -> b -> (((t >:.:> u) := p) :. u0) := b Source #

($$$>) :: (Covariant u0, Covariant v) => ((((t >:.:> u) := p) :. (u0 :. v)) := a) -> b -> (((t >:.:> u) := p) :. (u0 :. v)) := b Source #

($$$$>) :: (Covariant u0, Covariant v, Covariant w) => ((((t >:.:> u) := p) :. (u0 :. (v :. w))) := a) -> b -> (((t >:.:> u) := p) :. (u0 :. (v :. w))) := b Source #

class (Category source, Category target) => Contravariant_ t source target where Source #

Methods

(->$<-) :: source a b -> target (t b) (t a) infixl 4 Source #

Instances

Instances details
Contravariant_ Predicate ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) Source # 
Instance details

Defined in Pandora.Paradigm.Primary.Functor.Predicate

Methods

(->$<-) :: (a -> b) -> Predicate b -> Predicate a Source #

Contravariant_ (Convergence r) ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) Source # 
Instance details

Defined in Pandora.Paradigm.Primary.Functor.Convergence

Methods

(->$<-) :: (a -> b) -> Convergence r b -> Convergence r a Source #

Contravariant_ (Flip ((->) :: Type -> Type -> Type) a) ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) Source # 
Instance details

Defined in Pandora.Paradigm.Primary.Algebraic.Exponential

Methods

(->$<-) :: (a0 -> b) -> Flip (->) a b -> Flip (->) a a0 Source #

Contravariant_ (Flip Imprint a) ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) Source # 
Instance details

Defined in Pandora.Paradigm.Inventory.Imprint

Methods

(->$<-) :: (a0 -> b) -> Flip Imprint a b -> Flip Imprint a a0 Source #

Contravariant_ (Flip Environment a) ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) Source # 
Instance details

Defined in Pandora.Paradigm.Inventory.Environment

Methods

(->$<-) :: (a0 -> b) -> Flip Environment a b -> Flip Environment a a0 Source #

Contravariant_ (Kan ('Left :: Type -> Wye Type) t u b) ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) 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 #