Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- type family ZipLoT (as :: LoT k) (bs :: LoT k) :: LoT k where ...
- data Mappings (as :: LoT k) (bs :: LoT k) (cs :: LoT k) where
- class PairMappings (as :: LoT k) (bs :: LoT k) where
- pairMappings :: Mappings as bs (ZipLoT as bs)
- class ApplyMappings (v :: TyVar d Type) where
- pairA :: Applicative f => a -> b -> f (a, b)
Documentation
type family ZipLoT (as :: LoT k) (bs :: LoT k) :: LoT k where ... Source #
Zip to lists of types into a single list of pair types.
data Mappings (as :: LoT k) (bs :: LoT k) (cs :: LoT k) where Source #
A collection of zipping functions for zipMatchWithK
.
class PairMappings (as :: LoT k) (bs :: LoT k) where Source #
pairMappings :: Mappings as bs (ZipLoT as bs) Source #
A collection of pairing functions (\x y -> Just (x, y))
for zipMatchK
.
Instances
PairMappings 'LoT0 'LoT0 Source # | |
Defined in Data.ZipMatchK.Mappings | |
PairMappings as bs => PairMappings (a ':&&: as :: LoT (Type -> ks)) (b ':&&: bs :: LoT (Type -> ks)) Source # | |
Defined in Data.ZipMatchK.Mappings |
class ApplyMappings (v :: TyVar d Type) where Source #
:: forall (as :: LoT d) (bs :: LoT d) (cs :: LoT d). Mappings as bs cs | A collection of zipping functions. |
-> Interpret ('Var v) as | First collection of values (one per type parameter). |
-> Interpret ('Var v) bs | Second collection of values (one per type parameter). |
-> Maybe (Interpret ('Var v) cs) |
Apply a collection of zipping functions to collections of values.
Instances
ApplyMappings ('VZ :: TyVar (Type -> tys) Type) Source # | |
Defined in Data.ZipMatchK.Mappings applyMappings :: forall (as :: LoT (Type -> tys)) (bs :: LoT (Type -> tys)) (cs :: LoT (Type -> tys)). Mappings as bs cs -> Interpret ('Var ('VZ :: TyVar (Type -> tys) Type)) as -> Interpret ('Var ('VZ :: TyVar (Type -> tys) Type)) bs -> Maybe (Interpret ('Var ('VZ :: TyVar (Type -> tys) Type)) cs) Source # | |
ApplyMappings v => ApplyMappings ('VS v :: TyVar (ty -> tys) Type) Source # | |
Defined in Data.ZipMatchK.Mappings applyMappings :: forall (as :: LoT (ty -> tys)) (bs :: LoT (ty -> tys)) (cs :: LoT (ty -> tys)). Mappings as bs cs -> Interpret ('Var ('VS v :: TyVar (ty -> tys) Type)) as -> Interpret ('Var ('VS v :: TyVar (ty -> tys) Type)) bs -> Maybe (Interpret ('Var ('VS v :: TyVar (ty -> tys) Type)) cs) Source # |
pairA :: Applicative f => a -> b -> f (a, b) Source #
Pair two values in a context.