Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- class PIsData a
- pfromDataImpl :: PIsData a => Term s (PAsData a) -> Term s a
- pdataImpl :: PIsData a => Term s a -> Term s PData
- pdata :: PIsData a => Term s a -> Term s (PAsData a)
- pfromData :: PIsData a => Term s (PAsData a) -> Term s a
- pforgetData :: forall s a. Term s (PAsData a) -> Term s PData
- prememberData :: forall (p :: (S -> Type) -> S -> Type) (s :: S). PVariant p => Proxy p -> Term s (p PData) -> Term s (p (PAsData PData))
- pforgetData' :: forall a (p :: (S -> Type) -> S -> Type) (s :: S). PCovariant p => Proxy p -> Term s (p (PAsData a)) -> Term s (p PData)
- prememberData' :: forall a (p :: (S -> Type) -> S -> Type) (s :: S). (PSubtype PData a, PVariant p) => Proxy p -> Term s (p a) -> Term s (p (PAsData a))
Documentation
Laws:
- If PSubtype PData a
, then pdataImpl a
must be pupcast
.
- pdataImpl . pupcast . pfromDataImpl ≡ id
- pfromDataImpl . punsafeDowncast . pdataImpl ≡ id
Instances
prememberData :: forall (p :: (S -> Type) -> S -> Type) (s :: S). PVariant p => Proxy p -> Term s (p PData) -> Term s (p (PAsData PData)) Source #
Inverse of pforgetData'
.