Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- class PFromDataable (a :: PType) (b :: PType) | b -> a, a -> b
- pmaybeFromAsData :: PFromDataable a b => Term s (PAsData a) -> Term s b
Documentation
class PFromDataable (a :: PType) (b :: PType) | b -> a, a -> b Source #
removes the PAsData if the hole requires it but leaves it there if it doesn't
>>>
:t pmaybeFromAsData (pdata 3 :: (Term s (PAsData PInteger))) :: (Term (s::S) PInteger)
pmaybeFromAsData (pdata 3 :: (Term s (PAsData PInteger))) :: (Term (s::S) PInteger) :: forall (s :: S). Term s (PInteger @{S})
>>>
:t pmaybeFromAsData (pdata 3 :: (Term s (PAsData PInteger))) :: (Term (s::S) (PAsData PInteger))
pmaybeFromAsData (pdata 3 :: (Term s (PAsData PInteger))) :: (Term (s::S) (PAsData PInteger)) :: forall (s :: S). Term s (PAsData (PInteger @{S}))
Instances
(PIsData a, b ~ a) => PFromDataable a b Source # | |
Defined in Plutarch.DataRepr.Internal.FromData | |
PFromDataable a (PAsData a) Source # | |
Defined in Plutarch.DataRepr.Internal.FromData |
pmaybeFromAsData :: PFromDataable a b => Term s (PAsData a) -> Term s b Source #