ddc-core-simpl-0.2.1.2: Disciple Core language simplifying code transformations.

Safe HaskellSafe-Inferred

DDC.Core.Transform.TransformX

Description

General purpose tree walking boilerplate.

Synopsis

Documentation

class TransformUpMX m c whereSource

Methods

transformUpMXSource

Arguments

:: Ord n 
=> (Env n -> Env n -> Exp a n -> m (Exp a n))

The worker function is given the current kind and type environments.

-> Env n

Initial kind environment.

-> Env n

Initial type environment.

-> c a n

Transform this thing.

-> m (c a n) 

Bottom-up monadic rewrite of all core expressions in a thing.

transformUpXSource

Arguments

:: forall c a n . (Ord n, TransformUpMX Identity c) 
=> (Env n -> Env n -> Exp a n -> Exp a n)

The worker function is given the current kind and type environments.

-> Env n

Initial kind environment.

-> Env n

Initial type environment.

-> c a n

Transform this thing.

-> c a n 

Bottom up rewrite of all core expressions in a thing.