plutarch-1.9.0
Safe HaskellSafe-Inferred
LanguageGHC2021

Plutarch.Internal.Subtype

Documentation

type family PSubtype (a :: PType) (b :: PType) :: Constraint where ... Source #

Equations

PSubtype a b = (PSubtype' a b ~ 'PSubtypeRelation, PSubtypeHelper a b (PSubtype' a b)) 

type family PSubtype' (a :: PType) (b :: PType) :: PSubtypeRelation where ... Source #

Equations

PSubtype' a a = 'PSubtypeRelation 
PSubtype' a b = Helper a b (PInner b) 

pupcast :: forall a b s. PSubtype a b => Term s b -> Term s a Source #

pupcastF :: forall a b (p :: PType -> PType) s. (PSubtype a b, PCovariant p) => Proxy p -> Term s (p b) -> Term s (p a) Source #

pdowncastF :: forall a b (p :: PType -> PType) s. (PSubtype a b, PContravariant p) => Proxy p -> Term s (p a) -> Term s (p b) Source #