Equations
- Lean.Compiler.LCNF.Phase.toNat x = match x with | Lean.Compiler.LCNF.Phase.base => 0 | Lean.Compiler.LCNF.Phase.mono => 1 | Lean.Compiler.LCNF.Phase.impure => 2
Instances For
Equations
- Lean.Compiler.LCNF.instLTPhase = { lt := fun l r => Lean.Compiler.LCNF.Phase.toNat l < Lean.Compiler.LCNF.Phase.toNat r }
Equations
- Lean.Compiler.LCNF.instLEPhase = { le := fun l r => Lean.Compiler.LCNF.Phase.toNat l ≤ Lean.Compiler.LCNF.Phase.toNat r }
instance
Lean.Compiler.LCNF.instDecidableLtPhaseInstLTPhase
{p1 : Lean.Compiler.LCNF.Phase}
{p2 : Lean.Compiler.LCNF.Phase}
:
Equations
- Lean.Compiler.LCNF.instDecidableLtPhaseInstLTPhase = Nat.decLt (Lean.Compiler.LCNF.Phase.toNat p1) (Lean.Compiler.LCNF.Phase.toNat p2)
instance
Lean.Compiler.LCNF.instDecidableLePhaseInstLEPhase
{p1 : Lean.Compiler.LCNF.Phase}
{p2 : Lean.Compiler.LCNF.Phase}
:
Equations
- Lean.Compiler.LCNF.instDecidableLePhaseInstLEPhase = Nat.decLe (Lean.Compiler.LCNF.Phase.toNat p1) (Lean.Compiler.LCNF.Phase.toNat p2)
- occurrence : Nat
Which occurrence of the pass in the pipeline this is. Some passes, like simp, can occur multiple times in the pipeline. For most passes this value does not matter.
- phase : Lean.Compiler.LCNF.Phase
Which phase this
Pass
is supposed to run in - phaseOut : Lean.Compiler.LCNF.Phase
Resulting phase.
- phaseInv : s.phaseOut ≥ s.phase
- name : Lake.Name
The name of the
Pass
The actual pass function, operating on the
Decl
s.
A single compiler Pass
, consisting of the actual pass function operating
on the Decl
s as well as meta information.
Instances For
Equations
- Lean.Compiler.LCNF.instInhabitedPass = { default := Lean.Compiler.LCNF.Pass.mk 0 Lean.Compiler.LCNF.Phase.base Lean.Compiler.LCNF.Phase.base default fun decls => pure decls }
- install : Array Lean.Compiler.LCNF.Pass → Lean.CoreM (Array Lean.Compiler.LCNF.Pass)
Can be used to install, remove, replace etc. passes by tagging a declaration
of type PassInstaller
with the cpass
attribute.
Instances For
Equations
- Lean.Compiler.LCNF.instInhabitedPassInstaller = { default := { install := default } }
- passes : Array Lean.Compiler.LCNF.Pass
The PassManager
used to store all Pass
es that will be run within
pipeline.
Instances For
Equations
- Lean.Compiler.LCNF.instInhabitedPassManager = { default := { passes := default } }
Equations
- One or more equations did not get rendered due to their size.
def
Lean.Compiler.LCNF.Pass.mkPerDeclaration
(name : Lake.Name)
(run : Lean.Compiler.LCNF.Decl → Lean.Compiler.LCNF.CompilerM Lean.Compiler.LCNF.Decl)
(phase : Lean.Compiler.LCNF.Phase)
(occurrence : optParam Nat 0)
:
Equations
- Lean.Compiler.LCNF.Pass.mkPerDeclaration name run phase occurrence = Lean.Compiler.LCNF.Pass.mk occurrence phase phase name fun xs => Array.mapM run xs
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Lean.Compiler.LCNF.PassManager.findHighestOccurrence
(targetName : Lake.Name)
(passes : Array Lean.Compiler.LCNF.Pass)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.Compiler.LCNF.PassInstaller.installAtEnd p = { install := fun passes => pure (Array.push passes p) }
Instances For
Equations
- Lean.Compiler.LCNF.PassInstaller.append passesNew = { install := fun passes => pure (passes ++ passesNew) }
Instances For
def
Lean.Compiler.LCNF.PassInstaller.withEachOccurrence
(targetName : Lake.Name)
(f : Nat → Lean.Compiler.LCNF.PassInstaller)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Lean.Compiler.LCNF.PassInstaller.installAfter
(targetName : Lake.Name)
(p : Lean.Compiler.LCNF.Pass → Lean.Compiler.LCNF.Pass)
(occurrence : optParam Nat 0)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Lean.Compiler.LCNF.PassInstaller.installAfterEach
(targetName : Lake.Name)
(p : Lean.Compiler.LCNF.Pass → Lean.Compiler.LCNF.Pass)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Lean.Compiler.LCNF.PassInstaller.installBefore
(targetName : Lake.Name)
(p : Lean.Compiler.LCNF.Pass → Lean.Compiler.LCNF.Pass)
(occurrence : optParam Nat 0)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Lean.Compiler.LCNF.PassInstaller.installBeforeEachOccurrence
(targetName : Lake.Name)
(p : Lean.Compiler.LCNF.Pass → Lean.Compiler.LCNF.Pass)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Lean.Compiler.LCNF.PassInstaller.replacePass
(targetName : Lake.Name)
(p : Lean.Compiler.LCNF.Pass → Lean.Compiler.LCNF.Pass)
(occurrence : optParam Nat 0)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Lean.Compiler.LCNF.PassInstaller.replaceEachOccurrence
(targetName : Lake.Name)
(p : Lean.Compiler.LCNF.Pass → Lean.Compiler.LCNF.Pass)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Lean.Compiler.LCNF.PassInstaller.run
(manager : Lean.Compiler.LCNF.PassManager)
(installer : Lean.Compiler.LCNF.PassInstaller)
:
Equations
- Lean.Compiler.LCNF.PassInstaller.run manager installer = do let __do_lift ← Lean.Compiler.LCNF.PassInstaller.install installer manager.passes pure { passes := __do_lift }
Instances For
def
Lean.Compiler.LCNF.PassInstaller.runFromDecl
(manager : Lean.Compiler.LCNF.PassManager)
(declName : Lake.Name)
:
Equations
- One or more equations did not get rendered due to their size.