Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- class (forall i. Covariant (v i)) => Bivariant (v :: * -> * -> *) where
- class (forall i. Covariant_ (v i) left target, forall i. Covariant_ (Flip v i) right target) => Bivariant_ v left right target where
- (-<->-) :: left a b -> right c d -> target (v a c) (v b d)
Documentation
class (forall i. Covariant (v i)) => Bivariant (v :: * -> * -> *) where Source #
When providing a new instance, you should ensure it satisfies: * Identity: bimap identity identity ≡ identity * Parametricity: bimap (f . g) (h . i) ≡ bimap f h . bimap g i
(<->) :: (forall i. Covariant (v i)) => (a -> b) -> (c -> d) -> v a c -> v b d infixl 4 Source #
bimap :: (forall i. Covariant (v i)) => (a -> b) -> (c -> d) -> v a c -> v b d Source #
Prefix version of <->
Instances
Bivariant Product Source # | |
Bivariant Validation Source # | |
Defined in Pandora.Paradigm.Primary.Functor.Validation (<->) :: (forall i. Covariant (Validation i)) => (a -> b) -> (c -> d) -> Validation a c -> Validation b d Source # bimap :: (forall i. Covariant (Validation i)) => (a -> b) -> (c -> d) -> Validation a c -> Validation b d Source # | |
Bivariant Conclusion Source # | |
Defined in Pandora.Paradigm.Primary.Functor.Conclusion (<->) :: (forall i. Covariant (Conclusion i)) => (a -> b) -> (c -> d) -> Conclusion a c -> Conclusion b d Source # bimap :: (forall i. Covariant (Conclusion i)) => (a -> b) -> (c -> d) -> Conclusion a c -> Conclusion b d Source # | |
Bivariant (Tagged :: Type -> Type -> Type) Source # | |
Bivariant (Constant :: Type -> Type -> Type) Source # | |
class (forall i. Covariant_ (v i) left target, forall i. Covariant_ (Flip v i) right target) => Bivariant_ v left right target where Source #
Instances
Bivariant_ Product ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) Source # | |
Bivariant_ Validation ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) Source # | |
Defined in Pandora.Paradigm.Primary.Functor.Validation (-<->-) :: (a -> b) -> (c -> d) -> Validation a c -> Validation b d Source # | |
Bivariant_ Conclusion ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) Source # | |
Defined in Pandora.Paradigm.Primary.Functor.Conclusion (-<->-) :: (a -> b) -> (c -> d) -> Conclusion a c -> Conclusion b d Source # |