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

Data.ZipMatchK.Functor

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

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

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

Instance details

Methods

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

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

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

Instance details

Methods

zipMatchWithK :: forall (as :: LoT (Type -> Type)) (bs :: LoT (Type -> Type)) (cs :: LoT (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 -> Type) Source # 
Instance details

Associated Types

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

Defined in Data.ZipMatchK.Functor

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

Methods

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

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

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

Associated Types

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

Defined in Data.ZipMatchK.Functor

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

Methods

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

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