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

Pandora.Pattern.Functor.Bivariant

Synopsis

Documentation

class (forall i. Covariant_ (v i) left target, forall i. Covariant_ (Flip v i) right target) => Bivariant v left right target where Source #

When providing a new instance, you should ensure it satisfies:
* Identity: identity <-> identity ≡ identity
* Parametricity: (f . g) <-> (h . i) ≡ f <-> h . g <-> i

Methods

(<->) :: left a b -> right c d -> target (v a c) (v b d) infixl 4 Source #

Instances

Instances details
Bivariant (:*:) ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) Source # 
Instance details

Defined in Pandora.Paradigm.Primary.Algebraic.Product

Methods

(<->) :: (a -> b) -> (c -> d) -> (a :*: c) -> (b :*: d) Source #

Bivariant Validation ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) Source # 
Instance details

Defined in Pandora.Paradigm.Primary.Functor.Validation

Methods

(<->) :: (a -> b) -> (c -> d) -> Validation a c -> Validation b d Source #

Bivariant Conclusion ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) Source # 
Instance details

Defined in Pandora.Paradigm.Primary.Functor.Conclusion

Methods

(<->) :: (a -> b) -> (c -> d) -> Conclusion a c -> Conclusion b d Source #

Bivariant (Constant :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) Source # 
Instance details

Defined in Pandora.Paradigm.Primary.Functor.Constant

Methods

(<->) :: (a -> b) -> (c -> d) -> Constant a c -> Constant b d Source #

Bivariant (Tagged :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) Source # 
Instance details

Defined in Pandora.Paradigm.Primary.Functor.Tagged

Methods

(<->) :: (a -> b) -> (c -> d) -> Tagged a c -> Tagged b d Source #