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

Safe HaskellSafe
LanguageHaskell98

DDC.Type.Transform.AnonymizeT

Synopsis

Documentation

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

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

class AnonymizeT c where Source

Methods

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

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.

pushAnonymizeBindT Source

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.