ddc-core-simpl-0.4.3.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 #

Minimal complete definition

anonymizeWithT

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.

Instances

AnonymizeT Bound Source # 

Methods

anonymizeWithT :: Ord n => [Bind n] -> Bound n -> Bound n Source #

AnonymizeT Type Source # 

Methods

anonymizeWithT :: Ord n => [Bind n] -> Type n -> Type n Source #

AnonymizeT TypeSum Source # 

Methods

anonymizeWithT :: Ord n => [Bind n] -> TypeSum n -> TypeSum n Source #

pushAnonymizeBindT Source #

Arguments

:: [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.