|Portability||see LANGUAGE pragmas (... GHC)|
Various universes determined by a data constructor type's suitability to be embedded in a data type.
- data HasTagRepU tag c t where
- hasTagRepU :: HasTagRepU tag c t -> RMI c -> t
- type HasTagRepImageU fn dc = HasTagRepU (Tag dc) (CApp fn (Rep dc))
- data ImageInDTU t fn dc where
- imageInDTU :: (forall t. fn IdM t) -> ImageInDTU t fn dc -> RMNI dc -> t
- data ImageInDTDA t fn dc where
- imageInDTAU :: Functor (Idiom (fn IdM)) => (forall t. fn IdM t) -> ImageInDTDA t fn dc -> RMNI dc -> Idiom (fn IdM) t
HasTagRepU tag c t, a trivially-mediated
c value can be embedded into
Often times, we're interested in the universe of types accomodating a data constructor's image under some type-function.
A constructor type
ImageHasTagRepU t fn if
fncan be mapped across the recursive occurrences in
thas a constructor isomorphic to the
|ImageInDTU :: (Generic dc, (Rep dc) ::: (Domain (CMap fn IdM))) => HasTagRepImageU (fn IdM) dc t -> ImageInDTU t fn dc|
ImageInDTU t fn dc, a trivially-mediated
dc value can be
ImageInDTD, but uses an implicitly applicative function.
|ImageInDTDA :: (Generic dc, (Rep dc) ::: (DomainA (CMap fn IdM))) => HasTagRepImageU (fn IdM) dc t -> ImageInDTDA t fn dc|