plutarch
Safe HaskellNone
LanguageGHC2021

Plutarch.Internal.Subtype

Synopsis

Documentation

type family PSubtype (a :: S -> Type) (b :: S -> Type) 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 :: S -> Type) (b :: S -> Type) (s :: 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 :: forall (s :: S) (a :: S -> Type). 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.