Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- class (forall i. Covariant (v i)) => Divariant (v :: * -> * -> *) where
- class (forall i. Contravariant_ (Flip v i) left target, forall i. Covariant_ (v i) right target) => Divariant_ v left right target where
- (->->-) :: left a b -> right c d -> target (v b c) (v a d)
Documentation
class (forall i. Covariant (v i)) => Divariant (v :: * -> * -> *) where Source #
When providing a new instance, you should ensure it satisfies: * Identity: dimap identity identity ≡ identity * Interpreted: dimap (f . g) (h . i) ≡ dimap g h . dimap f i
(>->) :: (a -> b) -> (c -> d) -> v b c -> v a d infixl 4 Source #
dimap :: (a -> b) -> (c -> d) -> v b c -> v a d Source #
Prefix version of >->
Instances
Divariant Imprint Source # | |
Divariant Environment Source # | |
Defined in Pandora.Paradigm.Inventory.Environment (>->) :: (a -> b) -> (c -> d) -> Environment b c -> Environment a d Source # dimap :: (a -> b) -> (c -> d) -> Environment b c -> Environment a d Source # | |
Divariant ((->) :: Type -> Type -> Type) Source # | |
class (forall i. Contravariant_ (Flip v i) left target, forall i. Covariant_ (v i) right target) => Divariant_ v left right target where Source #
Instances
Divariant_ ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) Source # | |
Defined in Pandora.Paradigm.Primary.Functor.Function |