Copyright | (c) 2023 Yamada Ryo |
---|---|
License | MPL-2.0 (see the file LICENSE) |
Maintainer | ymdfield@outlook.jp |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | GHC2021 |
A type class to abstract away the encoding details of the Heftia carriers.
Synopsis
- class (forall sig. HFunctor sig => c (h sig)) => Heftia c h | h -> c where
- liftSig :: HFunctor sig => sig (h sig) a -> h sig a
- interpretHH :: (c m, HFunctor sig) => (sig m ~> m) -> h sig a -> m a
- translateHH :: (HFunctor sig, HFunctor sig') => (sig (h sig') ~> sig' (h sig')) -> h sig a -> h sig' a
- reinterpretHH :: HFunctor sig => (sig (h sig) ~> h sig) -> h sig a -> h sig a
- retractH :: (Heftia c h, c m) => h (LiftIns m) a -> m a
Documentation
class (forall sig. HFunctor sig => c (h sig)) => Heftia c h | h -> c where Source #
A type class to abstract away the encoding details of the Heftia carrier.
liftSig :: HFunctor sig => sig (h sig) a -> h sig a Source #
Lift a signature into a Heftia carrier.
interpretHH :: (c m, HFunctor sig) => (sig m ~> m) -> h sig a -> m a Source #
translateHH :: (HFunctor sig, HFunctor sig') => (sig (h sig') ~> sig' (h sig')) -> h sig a -> h sig' a Source #
Translate signatures embedded in a Heftia carrier.
reinterpretHH :: HFunctor sig => (sig (h sig) ~> h sig) -> h sig a -> h sig a Source #