witness-0.7: values that witness types
Safe HaskellNone
LanguageGHC2021

Data.Type.Witness.Specific.List.Sum

Synopsis

Documentation

type family ListSum (w :: [Type]) = (r :: Type) | r -> w where ... Source #

Equations

ListSum ('[] :: [Type]) = Void 
ListSum (t ': tt) = Either t (ListSum tt) 

listSumEq :: forall w (t :: [Type]). (forall a. w a -> Dict (Eq a)) -> ListType w t -> Dict (Eq (ListSum t)) Source #

listSumShow :: forall w (t :: [Type]). (forall a. w a -> Dict (Show a)) -> ListType w t -> Dict (Show (ListSum t)) Source #

mapListSum :: forall w (t :: [Type]). ListType w t -> (forall a. w a -> a -> a) -> ListSum t -> ListSum t Source #

data ListSumType (wit :: Type -> Type) t where Source #

Constructors

MkListSumType :: forall (wit :: Type -> Type) (lt :: [Type]). ListType wit lt -> ListSumType wit (ListSum lt) 

Instances

Instances details
WitnessConstraint Eq w => WitnessConstraint Eq (ListSumType w :: Type -> Type) Source # 
Instance details

Defined in Data.Type.Witness.Specific.List.Sum

TestEquality wit => TestEquality (ListSumType wit :: Type -> Type) Source # 
Instance details

Defined in Data.Type.Witness.Specific.List.Sum

Methods

testEquality :: ListSumType wit a -> ListSumType wit b -> Maybe (a :~: b) #

Representative w => Representative (ListSumType w :: Type -> Type) Source # 
Instance details

Defined in Data.Type.Witness.Specific.List.Sum

Representative w => Is (ListSumType w :: Type -> Type) Void Source # 
Instance details

Defined in Data.Type.Witness.Specific.List.Sum

(Is w a, Is (ListSumType w) ar) => Is (ListSumType w :: Type -> Type) (Either a ar :: Type) Source # 
Instance details

Defined in Data.Type.Witness.Specific.List.Sum