free-foil-0.2.0: Efficient Type-Safe Capture-Avoiding Substitution for Free (Scoped Monads)
Safe HaskellNone
LanguageHaskell2010

Data.ZipMatchK.Bifunctor

Description

This module provides GenericK and ZipMatchK instances for Sum and Product, to enable the use of ZipMatchK with the data types à la carte approach.

Orphan instances

(Bitraversable f, Bitraversable g, ZipMatchK f, ZipMatchK g) => ZipMatchK (Product f g :: Type -> Type -> Type) Source #

Note: instance is limited to Type-kinded bifunctors f and g.

Instance details

Methods

zipMatchWithK :: forall (as :: LoT (Type -> Type -> Type)) (bs :: LoT (Type -> Type -> Type)) (cs :: LoT (Type -> Type -> Type)). Mappings as bs cs -> (Product f g :@@: as) -> (Product f g :@@: bs) -> Maybe (Product f g :@@: cs) Source #

(Bitraversable f, Bitraversable g, ZipMatchK f, ZipMatchK g) => ZipMatchK (Sum f g :: Type -> Type -> Type) Source #

Note: instance is limited to Type-kinded bifunctors f and g.

Instance details

Methods

zipMatchWithK :: forall (as :: LoT (Type -> Type -> Type)) (bs :: LoT (Type -> Type -> Type)) (cs :: LoT (Type -> Type -> Type)). Mappings as bs cs -> (Sum f g :@@: as) -> (Sum f g :@@: bs) -> Maybe (Sum f g :@@: cs) Source #

GenericK (Product f g :: k -> k1 -> Type) Source # 
Instance details

Associated Types

type RepK (Product f g :: k -> k1 -> Type) 
Instance details

Defined in Data.ZipMatchK.Bifunctor

type RepK (Product f g :: k -> k1 -> Type) = Field ((('Kon f :: Atom (k -> k1 -> Type) (k -> k1 -> Type)) ':@: (Var0 :: Atom (k -> k1 -> Type) k)) ':@: (Var1 :: Atom (k -> k1 -> Type) k1)) :*: Field ((('Kon g :: Atom (k -> k1 -> Type) (k -> k1 -> Type)) ':@: (Var0 :: Atom (k -> k1 -> Type) k)) ':@: (Var1 :: Atom (k -> k1 -> Type) k1))

Methods

fromK :: forall (x :: LoT (k -> k1 -> Type)). (Product f g :@@: x) -> RepK (Product f g) x #

toK :: forall (x :: LoT (k -> k1 -> Type)). RepK (Product f g) x -> Product f g :@@: x #

GenericK (Sum f g :: k -> k1 -> Type) Source # 
Instance details

Associated Types

type RepK (Sum f g :: k -> k1 -> Type) 
Instance details

Defined in Data.ZipMatchK.Bifunctor

type RepK (Sum f g :: k -> k1 -> Type) = Field ((('Kon f :: Atom (k -> k1 -> Type) (k -> k1 -> Type)) ':@: (Var0 :: Atom (k -> k1 -> Type) k)) ':@: (Var1 :: Atom (k -> k1 -> Type) k1)) :+: Field ((('Kon g :: Atom (k -> k1 -> Type) (k -> k1 -> Type)) ':@: (Var0 :: Atom (k -> k1 -> Type) k)) ':@: (Var1 :: Atom (k -> k1 -> Type) k1))

Methods

fromK :: forall (x :: LoT (k -> k1 -> Type)). (Sum f g :@@: x) -> RepK (Sum f g) x #

toK :: forall (x :: LoT (k -> k1 -> Type)). RepK (Sum f g) x -> Sum f g :@@: x #