deep-transformations-0: Deep natural and unnatural tree transformations, including attribute grammars
Safe HaskellNone
LanguageHaskell2010

Transformation

Synopsis

Documentation

class Transformation t Source #

A Transformation, natural or not, maps one functor to another.

Associated Types

type Domain t :: Type -> Type Source #

type Codomain t :: Type -> Type Source #

Instances

Instances details
(Transformation t1, Transformation t2, Domain t1 ~ Domain t2) => Transformation (Either t1 t2) Source # 
Instance details

Defined in Transformation

Associated Types

type Domain (Either t1 t2) :: Type -> Type Source #

type Codomain (Either t1 t2) :: Type -> Type Source #

(Transformation t1, Transformation t2, Domain t1 ~ Domain t2) => Transformation (t1, t2) Source # 
Instance details

Defined in Transformation

Associated Types

type Domain (t1, t2) :: Type -> Type Source #

type Codomain (t1, t2) :: Type -> Type Source #

(Transformation t, Transformation u, Domain t ~ Codomain u) => Transformation (Compose t u) Source # 
Instance details

Defined in Transformation

Associated Types

type Domain (Compose t u) :: Type -> Type Source #

type Codomain (Compose t u) :: Type -> Type Source #

Transformation (Fold p m) Source # 
Instance details

Defined in Transformation.Rank2

Associated Types

type Domain (Fold p m) :: Type -> Type Source #

type Codomain (Fold p m) :: Type -> Type Source #

Transformation (Map p q) Source # 
Instance details

Defined in Transformation.Rank2

Associated Types

type Domain (Map p q) :: Type -> Type Source #

type Codomain (Map p q) :: Type -> Type Source #

Transformation (Inherited t a) Source # 
Instance details

Defined in Transformation.AG

Associated Types

type Domain (Inherited t a) :: Type -> Type Source #

type Codomain (Inherited t a) :: Type -> Type Source #

Transformation (Traversal p q m) Source # 
Instance details

Defined in Transformation.Rank2

Associated Types

type Domain (Traversal p q m) :: Type -> Type Source #

type Codomain (Traversal p q m) :: Type -> Type Source #

Transformation (Arrow p q x) Source # 
Instance details

Defined in Transformation

Associated Types

type Domain (Arrow p q x) :: Type -> Type Source #

type Codomain (Arrow p q x) :: Type -> Type Source #

class Transformation t => At t x where Source #

An unnatural Transformation can behave differently at different points.

Methods

($) :: t -> Domain t x -> Codomain t x infixr 0 Source #

Apply the transformation t at type x to map Domain to the Codomain functor.

Instances

Instances details
(At t x, At u x, Domain t ~ Domain u) => At (Either t u) x Source # 
Instance details

Defined in Transformation

Methods

($) :: Either t u -> Domain (Either t u) x -> Codomain (Either t u) x Source #

(At t x, At u x, Domain t ~ Domain u) => At (t, u) x Source # 
Instance details

Defined in Transformation

Methods

($) :: (t, u) -> Domain (t, u) x -> Codomain (t, u) x Source #

(At t x, At u x, Domain t ~ Codomain u) => At (Compose t u) x Source # 
Instance details

Defined in Transformation

Methods

($) :: Compose t u -> Domain (Compose t u) x -> Codomain (Compose t u) x Source #

At (Fold p m) x Source # 
Instance details

Defined in Transformation.Rank2

Methods

($) :: Fold p m -> Domain (Fold p m) x -> Codomain (Fold p m) x Source #

At (Map p q) x Source # 
Instance details

Defined in Transformation.Rank2

Methods

($) :: Map p q -> Domain (Map p q) x -> Codomain (Map p q) x Source #

Atts (Inherited t) a ~ Atts (Inherited t) b => At (Inherited t a) b Source # 
Instance details

Defined in Transformation.AG

Methods

($) :: Inherited t a -> Domain (Inherited t a) b -> Codomain (Inherited t a) b Source #

At (Traversal p q m) x Source # 
Instance details

Defined in Transformation.Rank2

Methods

($) :: Traversal p q m -> Domain (Traversal p q m) x -> Codomain (Traversal p q m) x Source #

At (Arrow p q x) x Source # 
Instance details

Defined in Transformation

Methods

($) :: Arrow p q x -> Domain (Arrow p q x) x -> Codomain (Arrow p q x) x Source #

apply :: t `At` x => t -> Domain t x -> Codomain t x Source #

Alphabetical synonym for $

data Compose t u Source #

Composition of two transformations

Constructors

Compose t u 

Instances

Instances details
(Transformation t, Transformation u, Domain t ~ Codomain u) => Transformation (Compose t u) Source # 
Instance details

Defined in Transformation

Associated Types

type Domain (Compose t u) :: Type -> Type Source #

type Codomain (Compose t u) :: Type -> Type Source #

(At t x, At u x, Domain t ~ Codomain u) => At (Compose t u) x Source # 
Instance details

Defined in Transformation

Methods

($) :: Compose t u -> Domain (Compose t u) x -> Codomain (Compose t u) x Source #

type Domain (Compose t u) Source # 
Instance details

Defined in Transformation

type Domain (Compose t u) = Domain u
type Codomain (Compose t u) Source # 
Instance details

Defined in Transformation

type Codomain (Compose t u) = Codomain t