Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- type family Atts (f :: * -> *) a
- newtype Inherited t a = Inherited {}
- newtype Synthesized t a = Synthesized {
- syn :: Atts (Synthesized t) a
- type Semantics t = Inherited t ~> Synthesized t
- type Rule t g = forall sem. sem ~ Semantics t => (Inherited t (g sem sem), g sem (Synthesized t)) -> (Synthesized t (g sem sem), g sem (Inherited t))
- knit :: (Apply (g sem), sem ~ Semantics t) => Rule t g -> g sem sem -> sem (g sem sem)
- class Attribution t g deep shallow where
- attribution :: t -> shallow (g deep deep) -> Rule t g
- bequest :: forall sem. sem ~ Semantics t => t -> shallow (g deep deep) -> Atts (Inherited t) (g sem sem) -> g sem (Synthesized t) -> g sem (Inherited t)
- synthesis :: forall sem. sem ~ Semantics t => t -> shallow (g deep deep) -> Atts (Inherited t) (g sem sem) -> g sem (Synthesized t) -> Atts (Synthesized t) (g sem sem)
- passDown :: (sem ~ Semantics t, Functor (Inherited t (g sem sem)) (g sem)) => Inherited t (g sem sem) -> g sem sem -> g sem (Inherited t)
- applyDefault :: (q ~ Semantics t, x ~ g q q, Apply (g q), Attribution t g q p) => (forall a. p a -> a) -> t -> p x -> q x
- fullMapDefault :: (p ~ Domain t, q ~ Semantics t, q ~ Codomain t, x ~ g q q, Apply (g q), Functor t g, Attribution t g p p) => (forall a. p a -> a) -> t -> p (g p p) -> q (g q q)
Documentation
newtype Inherited t a Source #
Instances
Show (Atts (Inherited t) a) => Show (Inherited t a) Source # | |
Transformation (Inherited t a) Source # | |
Atts (Inherited t) a ~ Atts (Inherited t) b => At (Inherited t a) b Source # | |
type Domain (Inherited t a) Source # | |
Defined in Transformation.AG | |
type Codomain (Inherited t a) Source # | |
Defined in Transformation.AG |
newtype Synthesized t a Source #
Synthesized | |
|
Instances
Show (Atts (Synthesized t) a) => Show (Synthesized t a) Source # | |
Defined in Transformation.AG showsPrec :: Int -> Synthesized t a -> ShowS # show :: Synthesized t a -> String # showList :: [Synthesized t a] -> ShowS # |
type Semantics t = Inherited t ~> Synthesized t Source #
type Rule t g = forall sem. sem ~ Semantics t => (Inherited t (g sem sem), g sem (Synthesized t)) -> (Synthesized t (g sem sem), g sem (Inherited t)) Source #
class Attribution t g deep shallow where Source #
attribution :: t -> shallow (g deep deep) -> Rule t g Source #
bequest :: forall sem. sem ~ Semantics t => t -> shallow (g deep deep) -> Atts (Inherited t) (g sem sem) -> g sem (Synthesized t) -> g sem (Inherited t) Source #
synthesis :: forall sem. sem ~ Semantics t => t -> shallow (g deep deep) -> Atts (Inherited t) (g sem sem) -> g sem (Synthesized t) -> Atts (Synthesized t) (g sem sem) Source #
passDown :: (sem ~ Semantics t, Functor (Inherited t (g sem sem)) (g sem)) => Inherited t (g sem sem) -> g sem sem -> g sem (Inherited t) Source #
applyDefault :: (q ~ Semantics t, x ~ g q q, Apply (g q), Attribution t g q p) => (forall a. p a -> a) -> t -> p x -> q x Source #
Drop-in implementation of $
fullMapDefault :: (p ~ Domain t, q ~ Semantics t, q ~ Codomain t, x ~ g q q, Apply (g q), Functor t g, Attribution t g p p) => (forall a. p a -> a) -> t -> p (g p p) -> q (g q q) Source #
Drop-in implementation of <$>