plutarch
Safe HaskellSafe-Inferred
LanguageGHC2021

Plutarch.Internal.Subtype

Synopsis

Documentation

type family PSubtype (a :: S -> Type) (b :: S -> Type) :: Constraint where ... Source #

Equations

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

type family PSubtype' (a :: S -> Type) (b :: S -> Type) :: 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 #

pto :: forall (a :: S -> Type) (s :: S). Term s a -> Term s (PInner a) Source #

Safely coerce from a Term to it's PInner representation.

punsafeDowncast :: Term s (PInner a) -> Term s a Source #

Unsafely coerce from the PInner representation of a Term, assuming that the value is a safe construction of the Term.