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

Safe HaskellSafe-Inferred

DDC.Core.Transform.AnonymizeX

Synopsis

Documentation

anonymizeX :: (Ord n, AnonymizeX c) => c n -> c nSource

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

class AnonymizeX c whereSource

Methods

anonymizeWithXSource

Arguments

:: forall n . Ord n 
=> [Bind n]

Stack for Spec binders (level-1).

-> [Bind n]

Stack for Data and Witness binders (level-0).

-> c n 
-> c n 

Rewrite all binders in a thing to be anonymous. The stacks 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 these stacks.