ddc-core-simpl-0.4.1.2: Disciplined Disciple Compiler code transformations.

Safe HaskellSafe-Inferred

DDC.Core.Transform.TransformDownX

Description

General purpose tree walking boilerplate.

Synopsis

Documentation

class TransformDownMX m c whereSource

Methods

transformDownMXSource

Arguments

:: Ord n 
=> (KindEnv n -> TypeEnv n -> Exp a n -> m (Exp a n))

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

-> KindEnv n

Initial kind environment.

-> TypeEnv n

Initial type environment.

-> c a n

Transform this thing.

-> m (c a n) 

Top-down monadic rewrite of all core expressions in a thing.

transformDownXSource

Arguments

:: forall c a n . (Ord n, TransformDownMX Identity c) 
=> (KindEnv n -> TypeEnv n -> Exp a n -> Exp a n)

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

-> KindEnv n

Initial kind environment.

-> TypeEnv n

Initial type environment.

-> c a n

Transform this thing.

-> c a n 

Top-down rewrite of all core expressions in a thing.

transformDownX'Source

Arguments

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

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

-> c a n

Transform this thing.

-> c a n 

Like transformDownX, but without using environments.