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

Safe HaskellSafe-Inferred

DDC.Type.Transform.AnonymizeT

Synopsis

Documentation

anonymizeT :: (Ord n, AnonymizeT c) => c n -> c nSource

Rewrite all binders in a thing to be of anonymous form.

class AnonymizeT c whereSource

Methods

anonymizeWithT :: forall n. Ord n => [Bind n] -> c n -> c nSource

Rewrite all binders in a thing to be of anonymous form.

The stack contains existing anonymous binders that we have entered into, and named binders that we have rewritten. All bound occurrences of variables will be replaced by references into this stack.

pushAnonymizeBindTSource

Arguments

:: Ord n 
=> [Bind n]

Stack for Spec binders (level-1)

-> Bind n 
-> ([Bind n], Bind n) 

Push a binding occurrence of a level-1 variable on the stack, returning the anonyized binding occurrence and the new stack.