Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- class ZipMatchK (f :: k) where
- genericZipMatchK :: forall {k} (f :: k) (as :: LoT k) (bs :: LoT k). (GenericK f, GZipMatch (RepK f), ReqsZipMatch (RepK f) as bs, PairMappings as bs) => (f :@@: as) -> (f :@@: bs) -> Maybe (f :@@: ZipLoT as bs)
- genericZipMatchWithK :: forall {k} (f :: k) (as :: LoT k) (bs :: LoT k) (cs :: LoT k). (GenericK f, GZipMatch (RepK f), ReqsZipMatchWith (RepK f) as bs cs) => Mappings as bs cs -> (f :@@: as) -> (f :@@: bs) -> Maybe (f :@@: cs)
- type ReqsZipMatch (f :: LoT k -> Type) (as :: LoT k) (bs :: LoT k) = ReqsZipMatchWith f as bs (ZipLoT as bs)
- class GZipMatch (f :: LoT k -> Type) where
- type ReqsZipMatchWith (f :: LoT k -> Type) (as :: LoT k) (bs :: LoT k) (cs :: LoT k)
- gzipMatchWith :: forall (as :: LoT k) (bs :: LoT k) (cs :: LoT k). ReqsZipMatchWith f as bs cs => Mappings as bs cs -> f as -> f bs -> Maybe (f cs)
- class ZipMatchFields (t :: Atom d Type) where
Documentation
class ZipMatchK (f :: k) where Source #
Kind-polymorphic syntactic (first-order) unification of two values.
Note: f
is expected to be a traversable n-functor,
but at the moment we lack a TraversableK
constraint.
Nothing
zipMatchWithK :: forall (as :: LoT k) (bs :: LoT k) (cs :: LoT k). Mappings as bs cs -> (f :@@: as) -> (f :@@: bs) -> Maybe (f :@@: cs) Source #
Perform one level of equality testing:
Instances
ZipMatchK Either Source # | |
ZipMatchK (,) Source # | |
ZipMatchK NonEmpty Source # | |
ZipMatchK Maybe Source # | |
ZipMatchK [] Source # | |
ZipMatchK a => ZipMatchK (Either a :: Type -> Type) Source # | |
ZipMatchK a => ZipMatchK ((,) a :: Type -> Type) Source # | |
(Traversable f, Traversable g, ZipMatchK f, ZipMatchK g) => ZipMatchK (Product f g :: Type -> Type) Source # | Note: instance is limited to |
(Traversable f, Traversable g, ZipMatchK f, ZipMatchK g) => ZipMatchK (Sum f g :: Type -> Type) Source # | Note: instance is limited to |
(Bitraversable f, Bitraversable g, ZipMatchK f, ZipMatchK g) => ZipMatchK (Product f g :: Type -> Type -> Type) Source # | Note: instance is limited to |
(Bitraversable f, Bitraversable g, ZipMatchK f, ZipMatchK g) => ZipMatchK (Sum f g :: Type -> Type -> Type) Source # | Note: instance is limited to |
genericZipMatchK :: forall {k} (f :: k) (as :: LoT k) (bs :: LoT k). (GenericK f, GZipMatch (RepK f), ReqsZipMatch (RepK f) as bs, PairMappings as bs) => (f :@@: as) -> (f :@@: bs) -> Maybe (f :@@: ZipLoT as bs) Source #
Generic implementation of zipMatchK
.
genericZipMatchWithK :: forall {k} (f :: k) (as :: LoT k) (bs :: LoT k) (cs :: LoT k). (GenericK f, GZipMatch (RepK f), ReqsZipMatchWith (RepK f) as bs cs) => Mappings as bs cs -> (f :@@: as) -> (f :@@: bs) -> Maybe (f :@@: cs) Source #
Generic implementation of zipMatchWithK
.
type ReqsZipMatch (f :: LoT k -> Type) (as :: LoT k) (bs :: LoT k) = ReqsZipMatchWith f as bs (ZipLoT as bs) Source #
class GZipMatch (f :: LoT k -> Type) where Source #
gzipMatchWith :: forall (as :: LoT k) (bs :: LoT k) (cs :: LoT k). ReqsZipMatchWith f as bs cs => Mappings as bs cs -> f as -> f bs -> Maybe (f cs) Source #
Instances
GZipMatch (U1 :: LoT k -> Type) Source # | |
GZipMatch (V1 :: LoT k -> Type) Source # | |
ZipMatchFields t => GZipMatch (Field t :: LoT k -> Type) Source # | |
Defined in Data.ZipMatchK.Generic | |
(GZipMatch f, GZipMatch g) => GZipMatch (f :*: g :: LoT k -> Type) Source # | |
Defined in Data.ZipMatchK.Generic | |
(GZipMatch f, GZipMatch g) => GZipMatch (f :+: g :: LoT k -> Type) Source # | |
Defined in Data.ZipMatchK.Generic | |
GZipMatch f => GZipMatch (c :=>: f :: LoT k -> Type) Source # | |
Defined in Data.ZipMatchK.Generic | |
(TypeError ('Text "Existentials are not supported") :: Constraint) => GZipMatch (Exists k2 f :: LoT k1 -> Type) Source # | |
Defined in Data.ZipMatchK.Generic | |
GZipMatch f => GZipMatch (M1 i c f :: LoT k -> Type) Source # | |
Defined in Data.ZipMatchK.Generic |
class ZipMatchFields (t :: Atom d Type) where Source #
zipMatchFieldsWith :: forall (as :: LoT d) (bs :: LoT d) (cs :: LoT d). ReqsZipMatchFieldsWith t as bs cs => Mappings as bs cs -> Field t as -> Field t bs -> Maybe (Field t cs) Source #
Instances
(TypeError (('Text "Atom :=>>: is not supported by ZipMatchFields" ':$$: 'Text " when attempting to use a generic instance for") ':$$: 'ShowType (c ':=>>: a)) :: Constraint) => ZipMatchFields (c ':=>>: a :: Atom d Type) Source # | |
(TypeError (('Text "Atom Eval is not supported by ZipMatchFields" ':$$: 'Text " when attempting to use a generic instance for") ':$$: 'ShowType ('Eval a)) :: Constraint) => ZipMatchFields ('Eval a :: Atom d Type) Source # | |
(TypeError (('Text "Atom ForAll is not supported by ZipMatchFields" ':$$: 'Text " when attempting to use a generic instance for") ':$$: 'ShowType ('ForAll a)) :: Constraint) => ZipMatchFields ('ForAll a :: Atom d Type) Source # | |
ZipMatchK k => ZipMatchFields ('Kon k :: Atom d Type) Source # | |
Defined in Data.ZipMatchK.Generic | |
ApplyMappings v => ZipMatchFields ('Var v :: Atom d Type) Source # | |
(ZipMatchFields t1, ZipMatchFields t2, ZipMatchK k) => ZipMatchFields ((('Kon k :: Atom d (Type -> Type -> Type)) ':@: t1) ':@: t2 :: Atom d Type) Source # | |
Defined in Data.ZipMatchK.Generic zipMatchFieldsWith :: forall (as :: LoT d) (bs :: LoT d) (cs :: LoT d). ReqsZipMatchFieldsWith ((('Kon k :: Atom d (Type -> Type -> Type)) ':@: t1) ':@: t2) as bs cs => Mappings as bs cs -> Field ((('Kon k :: Atom d (Type -> Type -> Type)) ':@: t1) ':@: t2) as -> Field ((('Kon k :: Atom d (Type -> Type -> Type)) ':@: t1) ':@: t2) bs -> Maybe (Field ((('Kon k :: Atom d (Type -> Type -> Type)) ':@: t1) ':@: t2) cs) Source # | |
(ZipMatchFields t, ZipMatchK k) => ZipMatchFields (('Kon k :: Atom d (Type -> Type)) ':@: t :: Atom d Type) Source # | |
Defined in Data.ZipMatchK.Generic zipMatchFieldsWith :: forall (as :: LoT d) (bs :: LoT d) (cs :: LoT d). ReqsZipMatchFieldsWith (('Kon k :: Atom d (Type -> Type)) ':@: t) as bs cs => Mappings as bs cs -> Field (('Kon k :: Atom d (Type -> Type)) ':@: t) as -> Field (('Kon k :: Atom d (Type -> Type)) ':@: t) bs -> Maybe (Field (('Kon k :: Atom d (Type -> Type)) ':@: t) cs) Source # | |
(TypeError ((('Text "Atom :@: is not supported by ZipMatchFields is a general form:" ':$$: 'Text " when attempting to use a generic instance for") ':$$: 'ShowType (f ':@: t)) ':$$: (('ShowType f ':<>: 'Text " : ") ':<>: 'ShowType (Atom d (k1 -> Type)))) :: Constraint) => ZipMatchFields (f ':@: t :: Atom d Type) Source # | |
(TypeError (((('Text "The type constructor is kind-polymorphic:" ':$$: ((('Text " " ':<>: 'ShowType k) ':<>: 'Text " : ") ':<>: 'ShowType (kk -> Type))) ':$$: 'Text "Possible fix:") ':$$: 'Text " add an explicit kind signature") ':$$: ((('Text " " ':<>: 'ShowType k) ':<>: 'Text " : ") ':<>: 'ShowType (Type -> Type))) :: Constraint) => ZipMatchFields (('Kon k :: Atom d (kk -> Type)) ':@: t :: Atom d Type) Source # | |
Defined in Data.ZipMatchK.Generic zipMatchFieldsWith :: forall (as :: LoT d) (bs :: LoT d) (cs :: LoT d). ReqsZipMatchFieldsWith (('Kon k :: Atom d (kk -> Type)) ':@: t) as bs cs => Mappings as bs cs -> Field (('Kon k :: Atom d (kk -> Type)) ':@: t) as -> Field (('Kon k :: Atom d (kk -> Type)) ':@: t) bs -> Maybe (Field (('Kon k :: Atom d (kk -> Type)) ':@: t) cs) Source # | |
(TypeError (((('Text "The type constructor is kind-polymorphic:" ':$$: ((('Text " " ':<>: 'ShowType k) ':<>: 'Text " : ") ':<>: 'ShowType (kk1 -> kk2 -> Type))) ':$$: 'Text "Possible fix:") ':$$: 'Text " add an explicit kind signature") ':$$: ((('Text " " ':<>: 'ShowType k) ':<>: 'Text " : ") ':<>: 'ShowType (Type -> Type -> Type))) :: Constraint) => ZipMatchFields ((('Kon k :: Atom d (kk1 -> kk2 -> Type)) ':@: t1) ':@: t2 :: Atom d Type) Source # | |
Defined in Data.ZipMatchK.Generic zipMatchFieldsWith :: forall (as :: LoT d) (bs :: LoT d) (cs :: LoT d). ReqsZipMatchFieldsWith ((('Kon k :: Atom d (kk1 -> kk2 -> Type)) ':@: t1) ':@: t2) as bs cs => Mappings as bs cs -> Field ((('Kon k :: Atom d (kk1 -> kk2 -> Type)) ':@: t1) ':@: t2) as -> Field ((('Kon k :: Atom d (kk1 -> kk2 -> Type)) ':@: t1) ':@: t2) bs -> Maybe (Field ((('Kon k :: Atom d (kk1 -> kk2 -> Type)) ':@: t1) ':@: t2) cs) Source # |