chore: update stage0
This commit is contained in:
parent
1e1a085ab3
commit
8feb14186e
175 changed files with 70938 additions and 23749 deletions
63
stage0/src/CMakeLists.txt
generated
63
stage0/src/CMakeLists.txt
generated
|
|
@ -35,8 +35,6 @@ option(SPLIT_STACK "SPLIT_STACK" OFF)
|
|||
# When OFF we disable LLVM support
|
||||
option(LLVM "LLVM" OFF)
|
||||
|
||||
# Include MSYS2 required DLLs and binaries in the binary distribution package
|
||||
option(INCLUDE_MSYS2_DLLS "INCLUDE_MSYS2_DLLS" OFF)
|
||||
# When ON we include githash in the version string
|
||||
option(USE_GITHASH "GIT_HASH" ON)
|
||||
# When ON thread storage is automatically finalized, it assumes platform support pthreads.
|
||||
|
|
@ -59,13 +57,13 @@ option(FAKE_FREE "Disable actually freeing runtime objects, useful for
|
|||
option(SMALL_ALLOCATOR "SMALL_ALLOCATOR" ON)
|
||||
option(LAZY_RC "LAZY_RC" OFF)
|
||||
option(RUNTIME_STATS "RUNTIME_STATS" OFF)
|
||||
option(BSYMBOLIC_FUNCTIONS "Link with -Bsymbolic-functions to reduce call overhead in shared libraries (Linux)" ON)
|
||||
option(BSYMBOLIC "Link with -Bsymbolic to reduce call overhead in shared libraries (Linux)" ON)
|
||||
|
||||
# development-specific options
|
||||
option(CHECK_OLEAN_VERSION "Only load .olean files compiled with the current version of Lean" ON)
|
||||
|
||||
set(LEAN_EXTRA_MAKE_OPTS "" CACHE STRING "extra options to lean --make")
|
||||
set(MINGW_LOCAL_DIR "C:/msys64/mingw64/bin" CACHE STRING "where to find MSYS2 required DLLs and binaries")
|
||||
set(LEANC_CC "cc" CACHE STRING "C compiler to use in `leanc`")
|
||||
|
||||
if ("${FAKE_FREE}" MATCHES "ON")
|
||||
set(LEAN_EXTRA_CXX_FLAGS "${LEAN_EXTRA_CXX_FLAGS} -D LEAN_FAKE_FREE")
|
||||
|
|
@ -283,10 +281,23 @@ else()
|
|||
set(LEANC_STATIC_LINKER_FLAGS "-Wl,--start-group -lleancpp -lLean -Wl,--end-group -Wl,--start-group -lInit -lStd -lleanrt -Wl,--end-group")
|
||||
endif()
|
||||
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
set(LEANC_STATIC_LINKER_FLAGS "${LEANC_STATIC_LINKER_FLAGS} -lc++")
|
||||
set(LEANSHARED_LINKER_FLAGS "${LEANSHARED_LINKER_FLAGS} -lc++")
|
||||
set(LEAN_EXE_LINKER_FLAGS "${LEAN_EXE_LINKER_FLAGS} -lc++")
|
||||
else()
|
||||
set(LEANC_STATIC_LINKER_FLAGS "${LEANC_STATIC_LINKER_FLAGS} -lstdc++")
|
||||
set(LEANSHARED_LINKER_FLAGS "${LEANSHARED_LINKER_FLAGS} -lstdc++")
|
||||
set(LEAN_EXE_LINKER_FLAGS "${LEAN_EXE_LINKER_FLAGS} -lstdc++")
|
||||
endif()
|
||||
|
||||
set(LEANC_STATIC_LINKER_FLAGS "${LEANC_STATIC_LINKER_FLAGS} -lm")
|
||||
set(LEANSHARED_LINKER_FLAGS "${LEANSHARED_LINKER_FLAGS} -lm")
|
||||
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
if(BSYMBOLIC_FUNCTIONS)
|
||||
set(LEANC_SHARED_LINKER_FLAGS "${LEANC_SHARED_LINKER_FLAGS} -Wl,-Bsymbolic-functions")
|
||||
set(LEANSHARED_LINKER_FLAGS "${LEANSHARED_LINKER_FLAGS} -Wl,-Bsymbolic-functions")
|
||||
if(BSYMBOLIC)
|
||||
set(LEANC_SHARED_LINKER_FLAGS "${LEANC_SHARED_LINKER_FLAGS} -Wl,-Bsymbolic")
|
||||
set(LEANSHARED_LINKER_FLAGS "${LEANSHARED_LINKER_FLAGS} -Wl,-Bsymbolic")
|
||||
endif()
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -ftls-model=initial-exec")
|
||||
set(LEANC_EXTRA_FLAGS "${LEANC_EXTRA_FLAGS} -fPIC")
|
||||
|
|
@ -437,37 +448,33 @@ else()
|
|||
endif()
|
||||
|
||||
# Escape for `make`. Yes, twice.
|
||||
string(REPLACE "$" "$$$$" CMAKE_EXE_LINKER_FLAGS_MAKE "${CMAKE_EXE_LINKER_FLAGS}")
|
||||
string(REPLACE "$" "$$" CMAKE_EXE_LINKER_FLAGS_MAKE "${CMAKE_EXE_LINKER_FLAGS}")
|
||||
string(REPLACE "$" "$$" CMAKE_EXE_LINKER_FLAGS_MAKE_MAKE "${CMAKE_EXE_LINKER_FLAGS_MAKE}")
|
||||
configure_file(${LEAN_SOURCE_DIR}/stdlib.make.in ${CMAKE_BINARY_DIR}/stdlib.make)
|
||||
add_custom_target(make_stdlib ALL
|
||||
WORKING_DIRECTORY ${LEAN_SOURCE_DIR}
|
||||
# needed for linking `leanpkg`
|
||||
DEPENDS leancpp leanrt_initial-exec
|
||||
# The actual rule is in a separate makefile because we want to prefix it with '+' to use the Make job server
|
||||
# for a parallelized nested build, but CMake doesn't let us do that.
|
||||
# We use `lean` from the previous stage, but `leanc`, headers, etc. from the current stage
|
||||
COMMAND $(MAKE) -f ${CMAKE_BINARY_DIR}/stdlib.make leanshared $<IF:$<EQUAL:${STAGE},0>,MORE_LEANMAKE_OPTS=C_ONLY=1\ C_OUT=../stdlib/,Leanpkg>
|
||||
COMMAND $(MAKE) -f ${CMAKE_BINARY_DIR}/stdlib.make Init Std Lean
|
||||
VERBATIM)
|
||||
|
||||
add_library(Init STATIC IMPORTED)
|
||||
set_target_properties(Init PROPERTIES
|
||||
IMPORTED_LOCATION ${CMAKE_BINARY_DIR}/lib/lean/libInit.a)
|
||||
add_dependencies(Init make_stdlib)
|
||||
# We declare these as separate custom targets so they use separate `make` invocations, which makes `make` recompute which dependencies
|
||||
# (e.g. `libLean.a`) are now newer than the target file
|
||||
|
||||
add_library(Std STATIC IMPORTED)
|
||||
set_target_properties(Std PROPERTIES
|
||||
IMPORTED_LOCATION ${CMAKE_BINARY_DIR}/lib/lean/libStd.a)
|
||||
add_dependencies(Std make_stdlib)
|
||||
add_custom_target(leanshared ALL
|
||||
WORKING_DIRECTORY ${LEAN_SOURCE_DIR}
|
||||
DEPENDS make_stdlib leancpp leanrt_initial-exec
|
||||
COMMAND $(MAKE) -f ${CMAKE_BINARY_DIR}/stdlib.make leanshared
|
||||
VERBATIM)
|
||||
|
||||
add_library(Lean STATIC IMPORTED)
|
||||
set_target_properties(Lean PROPERTIES
|
||||
IMPORTED_LOCATION ${CMAKE_BINARY_DIR}/lib/lean/libLean.a)
|
||||
add_dependencies(Lean make_stdlib)
|
||||
|
||||
add_library(leanshared SHARED IMPORTED)
|
||||
set_target_properties(leanshared PROPERTIES
|
||||
IMPORTED_LOCATION ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libleanshared${CMAKE_SHARED_LIBRARY_SUFFIX})
|
||||
add_dependencies(leanshared make_stdlib)
|
||||
if(${STAGE} GREATER 0)
|
||||
add_custom_target(leanpkg ALL
|
||||
WORKING_DIRECTORY ${LEAN_SOURCE_DIR}
|
||||
DEPENDS leanshared
|
||||
COMMAND $(MAKE) -f ${CMAKE_BINARY_DIR}/stdlib.make Leanpkg
|
||||
VERBATIM)
|
||||
endif()
|
||||
|
||||
if(PREV_STAGE)
|
||||
add_custom_target(update-stage0
|
||||
|
|
|
|||
5
stage0/src/Init/Conv.lean
generated
5
stage0/src/Init/Conv.lean
generated
|
|
@ -21,14 +21,19 @@ syntax (name := conv) "conv " (" at " ident)? (" in " term)? " => " convSeq : ta
|
|||
syntax (name := lhs) "lhs" : conv
|
||||
syntax (name := rhs) "rhs" : conv
|
||||
syntax (name := whnf) "whnf" : conv
|
||||
/-- Put term in normal form, this tactic is ment for debugging purposes only -/
|
||||
syntax (name := reduce) "reduce" : conv
|
||||
syntax (name := congr) "congr" : conv
|
||||
syntax (name := arg) "arg " num : conv
|
||||
syntax (name := ext) "ext " (colGt ident)* : conv
|
||||
syntax (name := change) "change " term : conv
|
||||
syntax (name := delta) "delta " ident : conv
|
||||
syntax (name := pattern) "pattern " term : conv
|
||||
syntax (name := rewrite) "rewrite " rwRuleSeq : conv
|
||||
syntax (name := erewrite) "erewrite " rwRuleSeq : conv
|
||||
syntax (name := simp) "simp " ("(" &"config" " := " term ")")? (&"only ")? ("[" (simpStar <|> simpErase <|> simpLemma),* "]")? : conv
|
||||
syntax (name := simpMatch) "simpMatch " : conv
|
||||
|
||||
/-- Execute the given tactic block without converting `conv` goal into a regular goal -/
|
||||
syntax (name := nestedTacticCore) "tactic'" " => " tacticSeq : conv
|
||||
/-- Focus, convert the `conv` goal `⊢ lhs` into a regular goal `⊢ lhs = rhs`, and then execute the given tactic block. -/
|
||||
|
|
|
|||
3
stage0/src/Init/Data/Nat/Basic.lean
generated
3
stage0/src/Init/Data/Nat/Basic.lean
generated
|
|
@ -44,6 +44,9 @@ namespace Nat
|
|||
@[simp] theorem zero_eq : Nat.zero = 0 :=
|
||||
rfl
|
||||
|
||||
@[simp] theorem add_eq : Nat.add x y = x + y :=
|
||||
rfl
|
||||
|
||||
@[simp] protected theorem zero_add : ∀ (n : Nat), 0 + n = n
|
||||
| 0 => rfl
|
||||
| n+1 => congrArg succ (Nat.zero_add n)
|
||||
|
|
|
|||
15
stage0/src/Init/Notation.lean
generated
15
stage0/src/Init/Notation.lean
generated
|
|
@ -316,6 +316,8 @@ macro dot:("·" <|> ".") ts:tacticSeq : tactic => `(tactic| {%$dot ($ts:tacticSe
|
|||
macro "rfl" : tactic => `(exact rfl)
|
||||
/-- `admit` is a shorthand for `exact sorry`. -/
|
||||
macro "admit" : tactic => `(exact sorry)
|
||||
/-- The `sorry` tactic isnxo a shorthand for `exact sorry`. -/
|
||||
macro "sorry" : tactic => `(exact sorry)
|
||||
macro "inferInstance" : tactic => `(exact inferInstance)
|
||||
|
||||
syntax locationWildcard := "*"
|
||||
|
|
@ -362,6 +364,11 @@ syntax simpStar := "*"
|
|||
syntax (name := simp) "simp " ("(" &"config" " := " term ")")? (&"only ")? ("[" (simpStar <|> simpErase <|> simpLemma),* "]")? (location)? : tactic
|
||||
syntax (name := simpAll) "simp_all " ("(" &"config" " := " term ")")? (&"only ")? ("[" (simpErase <|> simpLemma),* "]")? : tactic
|
||||
|
||||
/--
|
||||
Delta expand the given definition.
|
||||
This is a low-level tactic, it will expose how recursive definitions have been compiled by Lean. -/
|
||||
syntax (name := delta) "delta " ident (location)? : tactic
|
||||
|
||||
-- Auxiliary macro for lifting have/suffices/let/...
|
||||
-- It makes sure the "continuation" `?_` is the main goal after refining
|
||||
macro "refineLift " e:term : tactic => `(focus (refine noImplicitLambda% $e; rotateRight))
|
||||
|
|
@ -408,6 +415,14 @@ syntax "trivial" : tactic
|
|||
|
||||
syntax (name := split) "split " (colGt term)? (location)? : tactic
|
||||
|
||||
/--
|
||||
The tactic `specialize h a₁ ... aₙ` works on local hypothesis `h`.
|
||||
The premises of this hypothesis, either universal quantifications or non-dependent implications,
|
||||
are instantiated by concrete terms coming either from arguments `a₁` ... `aₙ`.
|
||||
The tactic adds a new hypothesis with the same name `h := h a₁ ... aₙ` and tries to clear the previous one.
|
||||
-/
|
||||
syntax (name := specialize) "specialize " term : tactic
|
||||
|
||||
macro_rules | `(tactic| trivial) => `(tactic| assumption)
|
||||
macro_rules | `(tactic| trivial) => `(tactic| rfl)
|
||||
macro_rules | `(tactic| trivial) => `(tactic| contradiction)
|
||||
|
|
|
|||
2
stage0/src/Lean/Class.lean
generated
2
stage0/src/Lean/Class.lean
generated
|
|
@ -69,7 +69,7 @@ def isOutParam (e : Expr) : Bool :=
|
|||
private partial def checkOutParam : Nat → Array FVarId → Expr → Except String Bool
|
||||
| i, outParams, Expr.forallE _ d b _ =>
|
||||
if isOutParam d then
|
||||
let fvarId := Name.mkNum `_fvar outParams.size
|
||||
let fvarId := { name := Name.mkNum `_fvar outParams.size }
|
||||
let outParams := outParams.push fvarId
|
||||
let fvar := mkFVar fvarId
|
||||
let b := b.instantiate1 fvar
|
||||
|
|
|
|||
6
stage0/src/Lean/Compiler/Util.lean
generated
6
stage0/src/Lean/Compiler/Util.lean
generated
|
|
@ -31,12 +31,12 @@ instance : AndThen Visitor where
|
|||
|
||||
@[inline] def skip : Visitor := id
|
||||
|
||||
@[inline] def visitFVar (x y : Name) : Visitor
|
||||
@[inline] def visitFVar (x y : FVarId) : Visitor
|
||||
| d@{result := false, ..} => d
|
||||
| {found := false, result := true} => {found := x == y, result := true}
|
||||
| {found := true, result := true} => {found := true, result := x != y}
|
||||
|
||||
def visit (x : Name) : Expr → Visitor
|
||||
def visit (x : FVarId) : Expr → Visitor
|
||||
| Expr.fvar y _ => visitFVar y x
|
||||
| Expr.app f a _ => visit x a >> visit x f
|
||||
| Expr.lam _ d b _ => visit x d >> visit x b
|
||||
|
|
@ -51,7 +51,7 @@ end atMostOnce
|
|||
open atMostOnce (visit) in
|
||||
/-- Return true iff the free variable with id `x` occurs at most once in `e` -/
|
||||
@[export lean_at_most_once]
|
||||
def atMostOnce (e : Expr) (x : Name) : Bool :=
|
||||
def atMostOnce (e : Expr) (x : FVarId) : Bool :=
|
||||
let {result := result, ..} := visit x e {found := false, result := true}
|
||||
result
|
||||
|
||||
|
|
|
|||
2
stage0/src/Lean/Elab/Command.lean
generated
2
stage0/src/Lean/Elab/Command.lean
generated
|
|
@ -219,7 +219,7 @@ private def elabCommandUsing (s : State) (stx : Syntax) : List (KeyedDeclsAttrib
|
|||
| [] => throwError "unexpected syntax{indentD stx}"
|
||||
| (elabFn::elabFns) =>
|
||||
catchInternalId unsupportedSyntaxExceptionId
|
||||
(withInfoTreeContext (mkInfoTree := mkInfoTree elabFn.decl stx) <| elabFn.value stx)
|
||||
(withInfoTreeContext (mkInfoTree := mkInfoTree elabFn.declName stx) <| elabFn.value stx)
|
||||
(fun _ => do set s; elabCommandUsing s stx elabFns)
|
||||
|
||||
/- Elaborate `x` with `stx` on the macro stack -/
|
||||
|
|
|
|||
16
stage0/src/Lean/Elab/Deriving/BEq.lean
generated
16
stage0/src/Lean/Elab/Deriving/BEq.lean
generated
|
|
@ -97,10 +97,24 @@ private def mkBEqInstanceCmds (declNames : Array Name) : TermElabM (Array Syntax
|
|||
trace[Elab.Deriving.beq] "\n{cmds}"
|
||||
return cmds
|
||||
|
||||
private def mkBEqEnumFun (ctx : Context) (name : Name) : TermElabM Syntax := do
|
||||
let auxFunName ← ctx.auxFunNames[0]
|
||||
`(private def $(mkIdent auxFunName):ident (x y : $(mkIdent name)) : Bool := x.toCtorIdx == y.toCtorIdx)
|
||||
|
||||
private def mkBEqEnumCmd (name : Name): TermElabM (Array Syntax) := do
|
||||
let ctx ← mkContext "beq" name
|
||||
let cmds := #[← mkBEqEnumFun ctx name] ++ (← mkInstanceCmds ctx `BEq #[name])
|
||||
trace[Elab.Deriving.beq] "\n{cmds}"
|
||||
return cmds
|
||||
|
||||
open Command
|
||||
|
||||
def mkBEqInstanceHandler (declNames : Array Name) : CommandElabM Bool := do
|
||||
if (← declNames.allM isInductive) && declNames.size > 0 then
|
||||
if declNames.size == 1 && (← isEnumType declNames[0]) then
|
||||
let cmds ← liftTermElabM none <| mkBEqEnumCmd declNames[0]
|
||||
cmds.forM elabCommand
|
||||
return true
|
||||
else if (← declNames.allM isInductive) && declNames.size > 0 then
|
||||
let cmds ← liftTermElabM none <| mkBEqInstanceCmds declNames
|
||||
cmds.forM elabCommand
|
||||
return true
|
||||
|
|
|
|||
85
stage0/src/Lean/Elab/Deriving/DecEq.lean
generated
85
stage0/src/Lean/Elab/Deriving/DecEq.lean
generated
|
|
@ -95,17 +95,88 @@ def mkDecEqCmds (indVal : InductiveVal) : TermElabM (Array Syntax) := do
|
|||
|
||||
open Command
|
||||
|
||||
def mkDecEq (declName : Name) : CommandElabM Bool := do
|
||||
let indVal ← getConstInfoInduct declName
|
||||
if indVal.isNested then
|
||||
return false -- nested inductive types are not supported yet
|
||||
else
|
||||
let cmds ← liftTermElabM none <| mkDecEqCmds indVal
|
||||
cmds.forM elabCommand
|
||||
return true
|
||||
|
||||
partial def mkEnumOfNat (declName : Name) : MetaM Unit := do
|
||||
let indVal ← getConstInfoInduct declName
|
||||
let enumType := mkConst declName
|
||||
let ctors := indVal.ctors.toArray
|
||||
withLocalDeclD `n (mkConst ``Nat) fun n => do
|
||||
let cond := mkConst ``cond [levelZero]
|
||||
let rec mkDecTree (low high : Nat) : Expr :=
|
||||
if low + 1 == high then
|
||||
mkConst ctors[low]
|
||||
else if low + 2 == high then
|
||||
mkApp4 cond enumType (mkApp2 (mkConst ``Nat.beq) n (mkRawNatLit low)) (mkConst ctors[low]) (mkConst ctors[low+1])
|
||||
else
|
||||
let mid := (low + high)/2
|
||||
let lowBranch := mkDecTree low mid
|
||||
let highBranch := mkDecTree mid high
|
||||
mkApp4 cond enumType (mkApp2 (mkConst ``Nat.ble) (mkRawNatLit mid) n) highBranch lowBranch
|
||||
let value ← mkLambdaFVars #[n] (mkDecTree 0 ctors.size)
|
||||
let type ← mkArrow (mkConst ``Nat) enumType
|
||||
addAndCompile <| Declaration.defnDecl {
|
||||
name := Name.mkStr declName "ofNat"
|
||||
levelParams := []
|
||||
safety := DefinitionSafety.safe
|
||||
hints := ReducibilityHints.abbrev
|
||||
value, type
|
||||
}
|
||||
|
||||
def mkEnumOfNatThm (declName : Name) : MetaM Unit := do
|
||||
let indVal ← getConstInfoInduct declName
|
||||
let toCtorIdx := mkConst (Name.mkStr declName "toCtorIdx")
|
||||
let ofNat := mkConst (Name.mkStr declName "ofNat")
|
||||
let enumType := mkConst declName
|
||||
let eqEnum := mkApp (mkConst ``Eq [levelOne]) enumType
|
||||
let rflEnum := mkApp (mkConst ``Eq.refl [levelOne]) enumType
|
||||
let ctors := indVal.ctors
|
||||
withLocalDeclD `x enumType fun x => do
|
||||
let resultType := mkApp2 eqEnum (mkApp ofNat (mkApp toCtorIdx x)) x
|
||||
let motive ← mkLambdaFVars #[x] resultType
|
||||
let casesOn := mkConst (mkCasesOnName declName) [levelZero]
|
||||
let mut value := mkApp2 casesOn motive x
|
||||
for ctor in ctors do
|
||||
value := mkApp value (mkApp rflEnum (mkConst ctor))
|
||||
value ← mkLambdaFVars #[x] value
|
||||
let type ← mkForallFVars #[x] resultType
|
||||
addAndCompile <| Declaration.thmDecl {
|
||||
name := Name.mkStr declName "ofNat_toCtorIdx"
|
||||
levelParams := []
|
||||
value, type
|
||||
}
|
||||
|
||||
def mkDecEqEnum (declName : Name) : CommandElabM Unit := do
|
||||
liftTermElabM none <| mkEnumOfNat declName
|
||||
liftTermElabM none <| mkEnumOfNatThm declName
|
||||
let ofNatIdent := mkIdent (Name.mkStr declName "ofNat")
|
||||
let auxThmIdent := mkIdent (Name.mkStr declName "ofNat_toCtorIdx")
|
||||
let indVal ← getConstInfoInduct declName
|
||||
let cmd ← `(
|
||||
instance : DecidableEq $(mkIdent declName) :=
|
||||
fun x y =>
|
||||
if h : x.toCtorIdx = y.toCtorIdx then
|
||||
isTrue (by have aux := congrArg $ofNatIdent h; rw [$auxThmIdent:ident, $auxThmIdent:ident] at aux; assumption)
|
||||
else
|
||||
isFalse fun h => by subst h; contradiction
|
||||
)
|
||||
elabCommand cmd
|
||||
|
||||
def mkDecEqInstanceHandler (declNames : Array Name) : CommandElabM Bool := do
|
||||
if declNames.size != 1 then
|
||||
return false -- mutually inductive types are not supported yet
|
||||
else if (← isEnumType declNames[0]) then
|
||||
mkDecEqEnum declNames[0]
|
||||
return true
|
||||
else
|
||||
let indVal ← getConstInfoInduct declNames[0]
|
||||
if indVal.isNested then
|
||||
return false -- nested inductive types are not supported yet
|
||||
else
|
||||
let cmds ← liftTermElabM none <| mkDecEqCmds indVal
|
||||
cmds.forM elabCommand
|
||||
return true
|
||||
mkDecEq declNames[0]
|
||||
|
||||
builtin_initialize
|
||||
registerBuiltinDerivingHandler `DecidableEq mkDecEqInstanceHandler
|
||||
|
|
|
|||
2
stage0/src/Lean/Elab/Deriving/Inhabited.lean
generated
2
stage0/src/Lean/Elab/Deriving/Inhabited.lean
generated
|
|
@ -10,7 +10,7 @@ open Command
|
|||
open Meta
|
||||
|
||||
private abbrev IndexSet := Std.RBTree Nat compare
|
||||
private abbrev LocalInst2Index := NameMap Nat
|
||||
private abbrev LocalInst2Index := FVarIdMap Nat
|
||||
|
||||
private def implicitBinderF := Parser.Term.implicitBinder
|
||||
private def instBinderF := Parser.Term.instBinder
|
||||
|
|
|
|||
2
stage0/src/Lean/Elab/InfoTree.lean
generated
2
stage0/src/Lean/Elab/InfoTree.lean
generated
|
|
@ -243,7 +243,7 @@ def Info.updateContext? : Option ContextInfo → Info → Option ContextInfo
|
|||
partial def InfoTree.format (tree : InfoTree) (ctx? : Option ContextInfo := none) : IO Format := do
|
||||
match tree with
|
||||
| ofJson j => return toString j
|
||||
| hole id => return toString id
|
||||
| hole id => return toString id.name
|
||||
| context i t => format t i
|
||||
| node i cs => match ctx? with
|
||||
| none => return "<context-not-available>"
|
||||
|
|
|
|||
2
stage0/src/Lean/Elab/Level.lean
generated
2
stage0/src/Lean/Elab/Level.lean
generated
|
|
@ -38,7 +38,7 @@ instance : MonadNameGenerator LevelElabM where
|
|||
setNGen ngen := modify fun s => { s with ngen := ngen }
|
||||
|
||||
def mkFreshLevelMVar : LevelElabM Level := do
|
||||
let mvarId ← mkFreshId
|
||||
let mvarId ← mkFreshMVarId
|
||||
modify fun s => { s with mctx := s.mctx.addLevelMVarDecl mvarId }
|
||||
return mkLevelMVar mvarId
|
||||
|
||||
|
|
|
|||
10
stage0/src/Lean/Elab/Match.lean
generated
10
stage0/src/Lean/Elab/Match.lean
generated
|
|
@ -406,7 +406,7 @@ def finalizePatternDecls (patternVarDecls : Array PatternVarDecl) : TermElabM (A
|
|||
decls := decls.push decl
|
||||
| PatternVarDecl.anonymousVar mvarId fvarId =>
|
||||
let e ← instantiateMVars (mkMVar mvarId);
|
||||
trace[Elab.match] "finalizePatternDecls: mvarId: {mvarId} := {e}, fvar: {mkFVar fvarId}"
|
||||
trace[Elab.match] "finalizePatternDecls: mvarId: {mvarId.name} := {e}, fvar: {mkFVar fvarId}"
|
||||
match e with
|
||||
| Expr.mvar newMVarId _ =>
|
||||
/- Metavariable was not assigned, or assigned to another metavariable. So,
|
||||
|
|
@ -425,9 +425,9 @@ open Meta.Match (Pattern Pattern.var Pattern.inaccessible Pattern.ctor Pattern.a
|
|||
namespace ToDepElimPattern
|
||||
|
||||
structure State where
|
||||
found : NameSet := {}
|
||||
found : FVarIdSet := {}
|
||||
localDecls : Array LocalDecl
|
||||
newLocals : NameSet := {}
|
||||
newLocals : FVarIdSet := {}
|
||||
|
||||
abbrev M := StateRefT State TermElabM
|
||||
|
||||
|
|
@ -448,7 +448,7 @@ private def mkLocalDeclFor (mvar : Expr) : M Pattern := do
|
|||
match (← getExprMVarAssignment? mvarId) with
|
||||
| some val => return Pattern.inaccessible val
|
||||
| none =>
|
||||
let fvarId ← mkFreshId
|
||||
let fvarId ← mkFreshFVarId
|
||||
let type ← inferType mvar
|
||||
/- HACK: `fvarId` is not in the scope of `mvarId`
|
||||
If this generates problems in the future, we should update the metavariable declarations. -/
|
||||
|
|
@ -857,7 +857,7 @@ private def expandNonAtomicDiscrs? (matchStx : Syntax) : TermElabM (Option Synta
|
|||
else
|
||||
-- We use `foundFVars` to make sure the discriminants are distinct variables.
|
||||
-- See: code for computing "matchType" at `elabMatchTypeAndDiscrs`
|
||||
let rec loop (discrs : List Syntax) (discrsNew : Array Syntax) (foundFVars : NameSet) := do
|
||||
let rec loop (discrs : List Syntax) (discrsNew : Array Syntax) (foundFVars : FVarIdSet) := do
|
||||
match discrs with
|
||||
| [] =>
|
||||
let discrs := Syntax.mkSep discrsNew (mkAtomFrom matchStx ", ");
|
||||
|
|
|
|||
8
stage0/src/Lean/Elab/MutualDef.lean
generated
8
stage0/src/Lean/Elab/MutualDef.lean
generated
|
|
@ -266,7 +266,7 @@ private def checkLetRecsToLiftTypes (funVars : Array Expr) (letRecsToLift : List
|
|||
namespace MutualClosure
|
||||
|
||||
/- A mapping from FVarId to Set of FVarIds. -/
|
||||
abbrev UsedFVarsMap := NameMap NameSet
|
||||
abbrev UsedFVarsMap := FVarIdMap FVarIdSet
|
||||
|
||||
/-
|
||||
Create the `UsedFVarsMap` mapping that takes the variable id for the mutually recursive functions being defined to the set of
|
||||
|
|
@ -369,7 +369,7 @@ private def getUsedFVarsMap : M UsedFVarsMap := do pure (← get).usedFVarsMap
|
|||
private def modifyUsedFVars (f : UsedFVarsMap → UsedFVarsMap) : M Unit := modify fun s => { s with usedFVarsMap := f s.usedFVarsMap }
|
||||
|
||||
-- merge s₂ into s₁
|
||||
private def merge (s₁ s₂ : NameSet) : M NameSet :=
|
||||
private def merge (s₁ s₂ : FVarIdSet) : M FVarIdSet :=
|
||||
s₂.foldM (init := s₁) fun s₁ k => do
|
||||
if s₁.contains k then
|
||||
pure s₁
|
||||
|
|
@ -408,7 +408,7 @@ def run (letRecFVarIds : List FVarId) (usedFVarsMap : UsedFVarsMap) : UsedFVarsM
|
|||
|
||||
end FixPoint
|
||||
|
||||
abbrev FreeVarMap := NameMap (Array FVarId)
|
||||
abbrev FreeVarMap := FVarIdMap (Array FVarId)
|
||||
|
||||
private def mkFreeVarMap
|
||||
(mctx : MetavarContext) (sectionVars : Array Expr) (mainFVarIds : Array FVarId)
|
||||
|
|
@ -524,7 +524,7 @@ private def mkLetRecClosures (letRecsToLift : List LetRecToLift) (freeVarMap : F
|
|||
letRecsToLift.mapM fun toLift => mkLetRecClosureFor toLift (freeVarMap.find? toLift.fvarId).get!
|
||||
|
||||
/- Mapping from FVarId of mutually recursive functions being defined to "closure" expression. -/
|
||||
abbrev Replacement := NameMap Expr
|
||||
abbrev Replacement := FVarIdMap Expr
|
||||
|
||||
def insertReplacementForMainFns (r : Replacement) (sectionVars : Array Expr) (mainHeaders : Array DefViewElabHeader) (mainFVars : Array Expr) : Replacement :=
|
||||
mainFVars.size.fold (init := r) fun i r =>
|
||||
|
|
|
|||
4
stage0/src/Lean/Elab/PatternVar.lean
generated
4
stage0/src/Lean/Elab/PatternVar.lean
generated
|
|
@ -18,7 +18,7 @@ inductive PatternVar where
|
|||
|
||||
instance : ToString PatternVar := ⟨fun
|
||||
| PatternVar.localVar x => toString x
|
||||
| PatternVar.anonymousVar mvarId => s!"?m{mvarId}"⟩
|
||||
| PatternVar.anonymousVar mvarId => s!"?m{mvarId.name}"⟩
|
||||
|
||||
/--
|
||||
Create an auxiliary Syntax node wrapping a fresh metavariable id.
|
||||
|
|
@ -30,7 +30,7 @@ private def mkMVarSyntax : TermElabM Syntax := do
|
|||
|
||||
/-- Given a syntax node constructed using `mkMVarSyntax`, return its MVarId -/
|
||||
def getMVarSyntaxMVarId (stx : Syntax) : MVarId :=
|
||||
stx[0].getKind
|
||||
{ name := stx[0].getKind }
|
||||
|
||||
/-
|
||||
Patterns define new local variables.
|
||||
|
|
|
|||
1
stage0/src/Lean/Elab/Tactic.lean
generated
1
stage0/src/Lean/Elab/Tactic.lean
generated
|
|
@ -16,3 +16,4 @@ import Lean.Elab.Tactic.Simp
|
|||
import Lean.Elab.Tactic.BuiltinTactic
|
||||
import Lean.Elab.Tactic.Split
|
||||
import Lean.Elab.Tactic.Conv
|
||||
import Lean.Elab.Tactic.Delta
|
||||
|
|
|
|||
4
stage0/src/Lean/Elab/Tactic/Basic.lean
generated
4
stage0/src/Lean/Elab/Tactic/Basic.lean
generated
|
|
@ -141,7 +141,7 @@ private def evalTacticUsing (s : SavedState) (stx : Syntax) (tactics : List (Key
|
|||
| [] => throwErrorAt stx "unexpected syntax {indentD stx}"
|
||||
| evalFn::evalFns => do
|
||||
try
|
||||
withReader ({ · with elaborator := evalFn.decl }) <| withTacticInfoContext stx <| evalFn.value stx
|
||||
withReader ({ · with elaborator := evalFn.declName }) <| withTacticInfoContext stx <| evalFn.value stx
|
||||
catch
|
||||
| ex@(Exception.error _ _) =>
|
||||
match evalFns with
|
||||
|
|
@ -162,7 +162,7 @@ mutual
|
|||
| m::ms => do
|
||||
let scp ← getCurrMacroScope
|
||||
try
|
||||
withReader ({ · with elaborator := m.decl }) do
|
||||
withReader ({ · with elaborator := m.declName }) do
|
||||
withTacticInfoContext stx do
|
||||
let stx' ← adaptMacro m.value stx
|
||||
evalTactic stx'
|
||||
|
|
|
|||
2
stage0/src/Lean/Elab/Tactic/BuiltinTactic.lean
generated
2
stage0/src/Lean/Elab/Tactic/BuiltinTactic.lean
generated
|
|
@ -181,7 +181,7 @@ private def sortFVarIds (fvarIds : Array FVarId) : TacticM (Array FVarId) :=
|
|||
| some d₁, some d₂ => d₁.index > d₂.index
|
||||
| some _, none => false
|
||||
| none, some _ => true
|
||||
| none, none => Name.quickLt fvarId₁ fvarId₂
|
||||
| none, none => Name.quickLt fvarId₁.name fvarId₂.name
|
||||
|
||||
@[builtinTactic Lean.Parser.Tactic.clear] def evalClear : Tactic := fun stx =>
|
||||
match stx with
|
||||
|
|
|
|||
1
stage0/src/Lean/Elab/Tactic/Conv.lean
generated
1
stage0/src/Lean/Elab/Tactic/Conv.lean
generated
|
|
@ -9,3 +9,4 @@ import Lean.Elab.Tactic.Conv.Rewrite
|
|||
import Lean.Elab.Tactic.Conv.Change
|
||||
import Lean.Elab.Tactic.Conv.Simp
|
||||
import Lean.Elab.Tactic.Conv.Pattern
|
||||
import Lean.Elab.Tactic.Conv.Delta
|
||||
|
|
|
|||
8
stage0/src/Lean/Elab/Tactic/Conv/Basic.lean
generated
8
stage0/src/Lean/Elab/Tactic/Conv/Basic.lean
generated
|
|
@ -3,6 +3,7 @@ Copyright (c) 2021 Microsoft Corporation. All rights reserved.
|
|||
Released under Apache 2.0 license as described in the file LICENSE.
|
||||
Authors: Leonardo de Moura
|
||||
-/
|
||||
import Lean.Meta.Reduce
|
||||
import Lean.Meta.Tactic.Apply
|
||||
import Lean.Meta.Tactic.Replace
|
||||
import Lean.Elab.Tactic.Basic
|
||||
|
|
@ -72,8 +73,11 @@ def changeLhs (lhs' : Expr) : TacticM Unit := do
|
|||
|
||||
@[builtinTactic Lean.Parser.Tactic.Conv.whnf] def evalWhnf : Tactic := fun stx =>
|
||||
withMainContext do
|
||||
let lhs ← getLhs
|
||||
changeLhs (← whnf lhs)
|
||||
changeLhs (← whnf (← getLhs))
|
||||
|
||||
@[builtinTactic Lean.Parser.Tactic.Conv.reduce] def evalReduce : Tactic := fun stx =>
|
||||
withMainContext do
|
||||
changeLhs (← reduce (← getLhs))
|
||||
|
||||
@[builtinTactic Lean.Parser.Tactic.Conv.convSeq1Indented] def evalConvSeq1Indented : Tactic := fun stx => do
|
||||
evalTacticSeq1Indented stx
|
||||
|
|
|
|||
17
stage0/src/Lean/Elab/Tactic/Conv/Delta.lean
generated
Normal file
17
stage0/src/Lean/Elab/Tactic/Conv/Delta.lean
generated
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
/-
|
||||
Copyright (c) 2021 Microsoft Corporation. All rights reserved.
|
||||
Released under Apache 2.0 license as described in the file LICENSE.
|
||||
Authors: Leonardo de Moura
|
||||
-/
|
||||
import Lean.Elab.Tactic.Delta
|
||||
import Lean.Elab.Tactic.Conv.Basic
|
||||
|
||||
namespace Lean.Elab.Tactic.Conv
|
||||
open Meta
|
||||
|
||||
@[builtinTactic Lean.Parser.Tactic.Conv.delta] def evalDelta : Tactic := fun stx => withMainContext do
|
||||
let declName ← resolveGlobalConstNoOverload stx[1]
|
||||
let lhsNew ← deltaExpand (← getLhs) (. == declName)
|
||||
changeLhs lhsNew
|
||||
|
||||
end Lean.Elab.Tactic.Conv
|
||||
13
stage0/src/Lean/Elab/Tactic/Conv/Simp.lean
generated
13
stage0/src/Lean/Elab/Tactic/Conv/Simp.lean
generated
|
|
@ -4,18 +4,23 @@ Released under Apache 2.0 license as described in the file LICENSE.
|
|||
Authors: Leonardo de Moura
|
||||
-/
|
||||
import Lean.Elab.Tactic.Simp
|
||||
import Lean.Elab.Tactic.Split
|
||||
import Lean.Elab.Tactic.Conv.Basic
|
||||
|
||||
namespace Lean.Elab.Tactic.Conv
|
||||
open Meta
|
||||
|
||||
@[builtinTactic Lean.Parser.Tactic.Conv.simp] def evalSimp : Tactic := fun stx => withMainContext do
|
||||
let { ctx, .. } ← mkSimpContext stx (eraseLocal := false)
|
||||
let lhs ← getLhs
|
||||
let result ← simp lhs ctx
|
||||
def applySimpResult (result : Simp.Result) : TacticM Unit := do
|
||||
if result.proof?.isNone then
|
||||
changeLhs result.expr
|
||||
else
|
||||
updateLhs result.expr (← result.getProof)
|
||||
|
||||
@[builtinTactic Lean.Parser.Tactic.Conv.simp] def evalSimp : Tactic := fun stx => withMainContext do
|
||||
let { ctx, .. } ← mkSimpContext stx (eraseLocal := false)
|
||||
applySimpResult (← simp (← getLhs) ctx)
|
||||
|
||||
@[builtinTactic Lean.Parser.Tactic.Conv.simpMatch] def evalSimpMatch : Tactic := fun stx => withMainContext do
|
||||
applySimpResult (← Split.simpMatch (← getLhs))
|
||||
|
||||
end Lean.Elab.Tactic.Conv
|
||||
|
|
|
|||
37
stage0/src/Lean/Elab/Tactic/Delta.lean
generated
Normal file
37
stage0/src/Lean/Elab/Tactic/Delta.lean
generated
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/-
|
||||
Copyright (c) 2021 Microsoft Corporation. All rights reserved.
|
||||
Released under Apache 2.0 license as described in the file LICENSE.
|
||||
Authors: Leonardo de Moura
|
||||
-/
|
||||
import Lean.Meta.Tactic.Delta
|
||||
import Lean.Elab.Tactic.Basic
|
||||
import Lean.Elab.Tactic.Location
|
||||
|
||||
namespace Lean.Elab.Tactic
|
||||
open Meta
|
||||
|
||||
def deltaLocalDecl (declName : Name) (fvarId : FVarId) : TacticM Unit := do
|
||||
let mvarId ← getMainGoal
|
||||
let localDecl ← getLocalDecl fvarId
|
||||
let typeNew ← deltaExpand localDecl.type (. == declName)
|
||||
if typeNew == localDecl.type then
|
||||
throwTacticEx `delta mvarId m!"did not delta reduce '{declName}' at '{localDecl.userName}'"
|
||||
replaceMainGoal [← replaceLocalDeclDefEq mvarId fvarId typeNew]
|
||||
|
||||
def deltaTarget (declName : Name) : TacticM Unit := do
|
||||
let mvarId ← getMainGoal
|
||||
let target ← getMainTarget
|
||||
let targetNew ← deltaExpand target (. == declName)
|
||||
if targetNew == target then
|
||||
throwTacticEx `delta mvarId m!"did not delta reduce '{declName}'"
|
||||
replaceMainGoal [← replaceTargetDefEq mvarId targetNew]
|
||||
|
||||
/--
|
||||
"delta " ident (location)?
|
||||
-/
|
||||
@[builtinTactic Lean.Parser.Tactic.delta] def evalDelta : Tactic := fun stx => do
|
||||
let declName ← resolveGlobalConstNoOverload stx[1]
|
||||
let loc := expandOptLocation stx[2]
|
||||
withLocation loc (deltaLocalDecl declName) (deltaTarget declName) (throwTacticEx `delta . m!"did not delta reduce '{declName}'")
|
||||
|
||||
end Lean.Elab.Tactic
|
||||
15
stage0/src/Lean/Elab/Tactic/ElabTerm.lean
generated
15
stage0/src/Lean/Elab/Tactic/ElabTerm.lean
generated
|
|
@ -98,6 +98,21 @@ def refineCore (stx : Syntax) (tagSuffix : Name) (allowNaturalHoles : Bool) : Ta
|
|||
| `(tactic| refine' $e) => refineCore e `refine' (allowNaturalHoles := true)
|
||||
| _ => throwUnsupportedSyntax
|
||||
|
||||
@[builtinTactic «specialize»] def evalSpecialize : Tactic := fun stx => withMainContext do
|
||||
match stx with
|
||||
| `(tactic| specialize $e:term) =>
|
||||
let (e, mvarIds') ← elabTermWithHoles e (← getMainTarget) `specialize (allowNaturalHoles := true)
|
||||
let h := e.getAppFn
|
||||
if h.isFVar then
|
||||
let localDecl ← getLocalDecl h.fvarId!
|
||||
let mvarId ← assert (← getMainGoal) localDecl.userName (← inferType e).headBeta e
|
||||
let (_, mvarId) ← intro1P mvarId
|
||||
let mvarId ← tryClear mvarId h.fvarId!
|
||||
replaceMainGoal (mvarId :: mvarIds')
|
||||
else
|
||||
throwError "'specialize' requires a term of the form `h x_1 .. x_n` where `h` appears in the local context"
|
||||
| _ => throwUnsupportedSyntax
|
||||
|
||||
/--
|
||||
Given a tactic
|
||||
```
|
||||
|
|
|
|||
2
stage0/src/Lean/Elab/Tactic/Induction.lean
generated
2
stage0/src/Lean/Elab/Tactic/Induction.lean
generated
|
|
@ -376,7 +376,7 @@ private def generalizeTargets (exprs : Array Expr) : TacticM (Array Expr) := do
|
|||
appendGoals result.others.toList
|
||||
where
|
||||
checkTargets (targets : Array Expr) : MetaM Unit := do
|
||||
let mut foundFVars : NameSet := {}
|
||||
let mut foundFVars : FVarIdSet := {}
|
||||
for target in targets do
|
||||
unless target.isFVar do
|
||||
throwError "index in target's type is not a variable (consider using the `cases` tactic instead){indentExpr target}"
|
||||
|
|
|
|||
22
stage0/src/Lean/Elab/Tactic/Location.lean
generated
22
stage0/src/Lean/Elab/Tactic/Location.lean
generated
|
|
@ -3,6 +3,8 @@ Copyright (c) 2020 Microsoft Corporation. All rights reserved.
|
|||
Released under Apache 2.0 license as described in the file LICENSE.
|
||||
Authors: Leonardo de Moura
|
||||
-/
|
||||
import Lean.Elab.Tactic.Basic
|
||||
|
||||
namespace Lean.Elab.Tactic
|
||||
|
||||
inductive Location where
|
||||
|
|
@ -30,4 +32,24 @@ def expandOptLocation (stx : Syntax) : Location :=
|
|||
else
|
||||
expandLocation stx[0]
|
||||
|
||||
open Meta
|
||||
|
||||
def withLocation (loc : Location) (atLocal : FVarId → TacticM Unit) (atTarget : TacticM Unit) (failed : MVarId → TacticM Unit) : TacticM Unit := do
|
||||
match loc with
|
||||
| Location.targets hyps type =>
|
||||
hyps.forM fun userName => withMainContext do
|
||||
let localDecl ← getLocalDeclFromUserName userName
|
||||
atLocal localDecl.fvarId
|
||||
if type then
|
||||
atTarget
|
||||
| Location.wildcard =>
|
||||
let worked ← tryTactic <| withMainContext <| atTarget
|
||||
withMainContext do
|
||||
let mut worked := worked
|
||||
-- We must traverse backwards because the given `atLocal` may use the revert/intro idiom
|
||||
for fvarId in (← getLCtx).getFVarIds.reverse do
|
||||
worked := worked || (← tryTactic <| withMainContext <| atLocal fvarId)
|
||||
unless worked do
|
||||
failed (← getMainGoal)
|
||||
|
||||
end Lean.Elab.Tactic
|
||||
|
|
|
|||
28
stage0/src/Lean/Elab/Tactic/Rewrite.lean
generated
28
stage0/src/Lean/Elab/Tactic/Rewrite.lean
generated
|
|
@ -18,7 +18,7 @@ def rewriteTarget (stx : Syntax) (symm : Bool) (mode : TransparencyMode) : Tacti
|
|||
let mvarId' ← replaceTargetEq (← getMainGoal) r.eNew r.eqProof
|
||||
replaceMainGoal (mvarId' :: r.mvarIds)
|
||||
|
||||
def rewriteLocalDeclFVarId (stx : Syntax) (symm : Bool) (fvarId : FVarId) (mode : TransparencyMode) : TacticM Unit := do
|
||||
def rewriteLocalDecl (stx : Syntax) (symm : Bool) (fvarId : FVarId) (mode : TransparencyMode) : TacticM Unit := do
|
||||
Term.withSynthesize <| withMainContext do
|
||||
let e ← elabTerm stx none true
|
||||
let localDecl ← getLocalDecl fvarId
|
||||
|
|
@ -26,22 +26,6 @@ def rewriteLocalDeclFVarId (stx : Syntax) (symm : Bool) (fvarId : FVarId) (mode
|
|||
let replaceResult ← replaceLocalDecl (← getMainGoal) fvarId rwResult.eNew rwResult.eqProof
|
||||
replaceMainGoal (replaceResult.mvarId :: rwResult.mvarIds)
|
||||
|
||||
def rewriteLocalDecl (stx : Syntax) (symm : Bool) (userName : Name) (mode : TransparencyMode) : TacticM Unit :=
|
||||
withMainContext do
|
||||
let localDecl ← getLocalDeclFromUserName userName
|
||||
rewriteLocalDeclFVarId stx symm localDecl.fvarId mode
|
||||
|
||||
def rewriteAll (stx : Syntax) (symm : Bool) (mode : TransparencyMode) : TacticM Unit := do
|
||||
let worked ← tryTactic <| rewriteTarget stx symm mode
|
||||
withMainContext do
|
||||
let mut worked := worked
|
||||
-- We must traverse backwards because `replaceLocalDecl` uses the revert/intro idiom
|
||||
for fvarId in (← getLCtx).getFVarIds.reverse do
|
||||
worked := worked || (← tryTactic <| rewriteLocalDeclFVarId stx symm fvarId mode)
|
||||
unless worked do
|
||||
let mvarId ← getMainGoal
|
||||
throwTacticEx `rewrite mvarId "did not find instance of the pattern in the current goal"
|
||||
|
||||
def withRWRulesSeq (token : Syntax) (rwRulesSeqStx : Syntax) (x : (symm : Bool) → (term : Syntax) → TacticM Unit) : TacticM Unit := do
|
||||
let lbrak := rwRulesSeqStx[0]
|
||||
let rules := rwRulesSeqStx[1].getArgs
|
||||
|
|
@ -63,12 +47,10 @@ def withRWRulesSeq (token : Syntax) (rwRulesSeqStx : Syntax) (x : (symm : Bool)
|
|||
def evalRewriteCore (mode : TransparencyMode) : Tactic := fun stx => do
|
||||
let loc := expandOptLocation stx[2]
|
||||
withRWRulesSeq stx[0] stx[1] fun symm term => do
|
||||
match loc with
|
||||
| Location.targets hyps type =>
|
||||
hyps.forM (rewriteLocalDecl term symm · mode)
|
||||
if type then
|
||||
rewriteTarget term symm mode
|
||||
| Location.wildcard => rewriteAll term symm mode
|
||||
withLocation loc
|
||||
(rewriteLocalDecl term symm · mode)
|
||||
(rewriteTarget term symm mode)
|
||||
(throwTacticEx `rewrite . "did not find instance of the pattern in the current goal")
|
||||
|
||||
@[builtinTactic Lean.Parser.Tactic.rewriteSeq] def evalRewriteSeq : Tactic :=
|
||||
evalRewriteCore TransparencyMode.instances
|
||||
|
|
|
|||
2
stage0/src/Lean/Elab/Tactic/Simp.lean
generated
2
stage0/src/Lean/Elab/Tactic/Simp.lean
generated
|
|
@ -121,7 +121,7 @@ where
|
|||
else
|
||||
Term.elabCDotFunctionAlias? simpArgTerm
|
||||
|
||||
abbrev FVarIdToLemmaId := NameMap Name
|
||||
abbrev FVarIdToLemmaId := FVarIdMap Name
|
||||
|
||||
-- TODO: move?
|
||||
private def getPropHyps : MetaM (Array FVarId) := do
|
||||
|
|
|
|||
4
stage0/src/Lean/Elab/Term.lean
generated
4
stage0/src/Lean/Elab/Term.lean
generated
|
|
@ -483,7 +483,7 @@ def logUnassignedUsingErrorInfos (pendingMVarIds : Array MVarId) (extraMsg? : Op
|
|||
let s ← get
|
||||
let hasOtherErrors := s.messages.hasErrors
|
||||
let mut hasNewErrors := false
|
||||
let mut alreadyVisited : NameSet := {}
|
||||
let mut alreadyVisited : MVarIdSet := {}
|
||||
for mvarErrorInfo in s.mvarErrorInfos do
|
||||
let mvarId := mvarErrorInfo.mvarId
|
||||
unless alreadyVisited.contains mvarId do
|
||||
|
|
@ -1032,7 +1032,7 @@ private def elabUsingElabFnsAux (s : SavedState) (stx : Syntax) (expectedType? :
|
|||
| (elabFn::elabFns) =>
|
||||
try
|
||||
-- record elaborator in info tree, but only when not backtracking to other elaborators (outer `try`)
|
||||
withInfoContext' (mkInfo := mkTermInfo elabFn.decl (expectedType? := expectedType?) stx)
|
||||
withInfoContext' (mkInfo := mkTermInfo elabFn.declName (expectedType? := expectedType?) stx)
|
||||
(try
|
||||
elabFn.value stx expectedType?
|
||||
catch ex => match ex with
|
||||
|
|
|
|||
2
stage0/src/Lean/Elab/Util.lean
generated
2
stage0/src/Lean/Elab/Util.lean
generated
|
|
@ -119,7 +119,7 @@ def expandMacroImpl? (env : Environment) : Syntax → MacroM (Option (Name × Sy
|
|||
for e in macroAttribute.getEntries env stx.getKind do
|
||||
try
|
||||
let stx' ← e.value stx
|
||||
return (e.decl, stx')
|
||||
return (e.declName, stx')
|
||||
catch
|
||||
| Macro.Exception.unsupportedSyntax => pure ()
|
||||
| ex => throw ex
|
||||
|
|
|
|||
29
stage0/src/Lean/Expr.lean
generated
29
stage0/src/Lean/Expr.lean
generated
|
|
@ -157,8 +157,27 @@ def Expr.mkDataForLet (h : UInt64) (looseBVarRange : Nat) (approxDepth : UInt8)
|
|||
|
||||
open Expr
|
||||
|
||||
abbrev MVarId := Name
|
||||
abbrev FVarId := Name
|
||||
structure FVarId where
|
||||
name : Name
|
||||
deriving Inhabited, BEq, Hashable
|
||||
|
||||
instance : Repr FVarId where
|
||||
reprPrec n p := reprPrec n.name p
|
||||
|
||||
def FVarIdSet := Std.RBTree FVarId (Name.quickCmp ·.name ·.name)
|
||||
deriving Inhabited, EmptyCollection
|
||||
|
||||
instance : ForIn m FVarIdSet FVarId := inferInstanceAs (ForIn _ (Std.RBTree ..) ..)
|
||||
|
||||
def FVarIdHashSet := Std.HashSet FVarId
|
||||
deriving Inhabited, EmptyCollection
|
||||
|
||||
def FVarIdMap (α : Type) := Std.RBMap FVarId α (Name.quickCmp ·.name ·.name)
|
||||
|
||||
instance : EmptyCollection (FVarIdMap α) := inferInstanceAs (EmptyCollection (Std.RBMap ..))
|
||||
|
||||
instance : Inhabited (FVarIdMap α) where
|
||||
default := {}
|
||||
|
||||
/- We use the `E` suffix (short for `Expr`) to avoid collision with keywords.
|
||||
We considered using «...», but it is too inconvenient to use. -/
|
||||
|
|
@ -1077,10 +1096,10 @@ def isLHSGoal? (e : Expr) : Option Expr :=
|
|||
none
|
||||
|
||||
def mkFreshFVarId {m : Type → Type} [Monad m] [MonadNameGenerator m] : m FVarId :=
|
||||
mkFreshId
|
||||
return { name := (← mkFreshId) }
|
||||
|
||||
def mkFreshMVarId {m : Type → Type} [Monad m] [MonadNameGenerator m] : m FVarId :=
|
||||
mkFreshId
|
||||
def mkFreshMVarId {m : Type → Type} [Monad m] [MonadNameGenerator m] : m MVarId :=
|
||||
return { name := (← mkFreshId) }
|
||||
|
||||
def mkNot (p : Expr) : Expr := mkApp (mkConst ``Not) p
|
||||
def mkOr (p q : Expr) : Expr := mkApp2 (mkConst ``Or) p q
|
||||
|
|
|
|||
57
stage0/src/Lean/KeyedDeclsAttribute.lean
generated
57
stage0/src/Lean/KeyedDeclsAttribute.lean
generated
|
|
@ -38,13 +38,13 @@ structure Def (γ : Type) where
|
|||
deriving Inhabited
|
||||
|
||||
structure OLeanEntry where
|
||||
key : Key
|
||||
decl : Name -- Name of a declaration stored in the environment which has type `mkConst Def.valueTypeName`.
|
||||
key : Key
|
||||
declName : Name -- Name of a declaration stored in the environment which has type `mkConst Def.valueTypeName`.
|
||||
deriving Inhabited
|
||||
|
||||
structure AttributeEntry (γ : Type) extends OLeanEntry where
|
||||
/- Recall that we cannot store `γ` into .olean files because it is a closure.
|
||||
Given `OLeanEntry.decl`, we convert it into a `γ` by using the unsafe function `evalConstCheck`. -/
|
||||
Given `OLeanEntry.declName`, we convert it into a `γ` by using the unsafe function `evalConstCheck`. -/
|
||||
value : γ
|
||||
|
||||
abbrev Table (γ : Type) := SMap Key (List (AttributeEntry γ))
|
||||
|
|
@ -52,6 +52,8 @@ abbrev Table (γ : Type) := SMap Key (List (AttributeEntry γ))
|
|||
structure ExtensionState (γ : Type) where
|
||||
newEntries : List OLeanEntry := []
|
||||
table : Table γ := {}
|
||||
declNames : Std.PHashSet Name := {}
|
||||
erased : Std.PHashSet Name := {}
|
||||
deriving Inhabited
|
||||
|
||||
abbrev Extension (γ : Type) := ScopedEnvExtension OLeanEntry (AttributeEntry γ) (ExtensionState γ)
|
||||
|
|
@ -68,13 +70,30 @@ structure KeyedDeclsAttribute (γ : Type) where
|
|||
|
||||
namespace KeyedDeclsAttribute
|
||||
|
||||
def Table.insert {γ : Type} (table : Table γ) (v : AttributeEntry γ) : Table γ :=
|
||||
private def Table.insert (table : Table γ) (v : AttributeEntry γ) : Table γ :=
|
||||
match table.find? v.key with
|
||||
| some vs => SMap.insert table v.key (v::vs)
|
||||
| none => SMap.insert table v.key [v]
|
||||
|
||||
def addBuiltin {γ} (attr : KeyedDeclsAttribute γ) (key : Key) (decl : Name) (value : γ) : IO Unit :=
|
||||
attr.tableRef.modify fun m => m.insert { key, decl, value }
|
||||
def ExtensionState.insert (s : ExtensionState γ) (v : AttributeEntry γ) : ExtensionState γ := {
|
||||
table := s.table.insert v
|
||||
newEntries := v.toOLeanEntry :: s.newEntries
|
||||
declNames := s.declNames.insert v.declName
|
||||
erased := s.erased.erase v.declName
|
||||
}
|
||||
|
||||
def addBuiltin (attr : KeyedDeclsAttribute γ) (key : Key) (declName : Name) (value : γ) : IO Unit :=
|
||||
attr.tableRef.modify fun m => m.insert { key, declName, value }
|
||||
|
||||
def mkStateOfTable (table : Table γ) : ExtensionState γ := {
|
||||
table
|
||||
declNames := table.fold (init := {}) fun s _ es => es.foldl (init := s) fun s e => s.insert e.declName
|
||||
}
|
||||
|
||||
def ExtensionState.erase (s : ExtensionState γ) (attrName : Name) (declName : Name) : CoreM (ExtensionState γ) := do
|
||||
unless s.declNames.contains declName do
|
||||
throwError "'{declName}' does not have [{attrName}] attribute"
|
||||
return { s with erased := s.erased.insert declName, declNames := s.declNames.erase declName }
|
||||
|
||||
/--
|
||||
def _regBuiltin$(declName) : IO Unit :=
|
||||
|
|
@ -97,14 +116,13 @@ protected unsafe def init {γ} (df : Def γ) (attrDeclName : Name) : IO (KeyedDe
|
|||
let tableRef ← IO.mkRef ({} : Table γ)
|
||||
let ext : Extension γ ← registerScopedEnvExtension {
|
||||
name := df.name
|
||||
mkInitial := do return { table := (← tableRef.get) }
|
||||
mkInitial := return mkStateOfTable (← tableRef.get)
|
||||
ofOLeanEntry := fun s entry => do
|
||||
let ctx ← read
|
||||
match ctx.env.evalConstCheck γ ctx.opts df.valueTypeName entry.decl with
|
||||
match ctx.env.evalConstCheck γ ctx.opts df.valueTypeName entry.declName with
|
||||
| Except.ok f => return { toOLeanEntry := entry, value := f }
|
||||
| Except.error ex => throw (IO.userError ex)
|
||||
addEntry := fun s e =>
|
||||
{ table := s.table.insert e, newEntries := e.toOLeanEntry :: s.newEntries }
|
||||
addEntry := fun s e => s.insert e
|
||||
toOLeanEntry := (·.toOLeanEntry)
|
||||
}
|
||||
unless df.builtinName.isAnonymous do
|
||||
|
|
@ -128,12 +146,16 @@ protected unsafe def init {γ} (df : Def γ) (attrDeclName : Name) : IO (KeyedDe
|
|||
registerBuiltinAttribute {
|
||||
name := df.name
|
||||
descr := df.descr
|
||||
add := fun constName stx attrKind => do
|
||||
erase := fun declName => do
|
||||
let s ← ext.getState (← getEnv)
|
||||
let s ← s.erase df.name declName
|
||||
modifyEnv fun env => ext.modifyState env fun _ => s
|
||||
add := fun declName stx attrKind => do
|
||||
let key ← df.evalKey false stx
|
||||
match IR.getSorryDep (← getEnv) constName with
|
||||
match IR.getSorryDep (← getEnv) declName with
|
||||
| none =>
|
||||
let val ← evalConstCheck γ df.valueTypeName constName
|
||||
ext.add { key := key, decl := constName, value := val } attrKind
|
||||
let val ← evalConstCheck γ df.valueTypeName declName
|
||||
ext.add { key := key, declName := declName, value := val } attrKind
|
||||
| _ =>
|
||||
-- If the declaration contains `sorry`, we skip `evalConstCheck` to avoid unnecessary bizarre error message
|
||||
pure ()
|
||||
|
|
@ -143,7 +165,12 @@ protected unsafe def init {γ} (df : Def γ) (attrDeclName : Name) : IO (KeyedDe
|
|||
|
||||
/-- Retrieve entries tagged with `[attr key]` or `[builtinAttr key]`. -/
|
||||
def getEntries {γ} (attr : KeyedDeclsAttribute γ) (env : Environment) (key : Name) : List (AttributeEntry γ) :=
|
||||
(attr.ext.getState env).table.findD key []
|
||||
let s := attr.ext.getState env
|
||||
let attrs := s.table.findD key []
|
||||
if s.erased.isEmpty then
|
||||
attrs
|
||||
else
|
||||
attrs.filter fun attr => !s.erased.contains attr.declName
|
||||
|
||||
/-- Retrieve values tagged with `[attr key]` or `[builtinAttr key]`. -/
|
||||
def getValues {γ} (attr : KeyedDeclsAttribute γ) (env : Environment) (key : Name) : List γ :=
|
||||
|
|
|
|||
33
stage0/src/Lean/Level.lean
generated
33
stage0/src/Lean/Level.lean
generated
|
|
@ -50,13 +50,32 @@ def Level.mkData (h : UInt64) (depth : Nat) (hasMVar hasParam : Bool) : Level.Da
|
|||
|
||||
open Level
|
||||
|
||||
structure MVarId where
|
||||
name : Name
|
||||
deriving Inhabited, BEq, Hashable
|
||||
|
||||
instance : Repr MVarId where
|
||||
reprPrec n p := reprPrec n.name p
|
||||
|
||||
def MVarIdSet := Std.RBTree MVarId (Name.quickCmp ·.name ·.name)
|
||||
deriving Inhabited, EmptyCollection
|
||||
|
||||
instance : ForIn m MVarIdSet MVarId := inferInstanceAs (ForIn _ (Std.RBTree ..) ..)
|
||||
|
||||
def MVarIdMap (α : Type) := Std.RBMap MVarId α (Name.quickCmp ·.name ·.name)
|
||||
|
||||
instance : EmptyCollection (MVarIdMap α) := inferInstanceAs (EmptyCollection (Std.RBMap ..))
|
||||
|
||||
instance : Inhabited (MVarIdMap α) where
|
||||
default := {}
|
||||
|
||||
inductive Level where
|
||||
| zero : Data → Level
|
||||
| succ : Level → Data → Level
|
||||
| max : Level → Level → Data → Level
|
||||
| imax : Level → Level → Data → Level
|
||||
| param : Name → Data → Level
|
||||
| mvar : Name → Data → Level
|
||||
| mvar : MVarId → Data → Level
|
||||
deriving Inhabited
|
||||
|
||||
namespace Level
|
||||
|
|
@ -93,7 +112,7 @@ end Level
|
|||
def levelZero :=
|
||||
Level.zero $ mkData 2221 0 false false
|
||||
|
||||
def mkLevelMVar (mvarId : Name) :=
|
||||
def mkLevelMVar (mvarId : MVarId) :=
|
||||
Level.mvar mvarId $ mkData (mixHash 2237 $ hash mvarId) 0 true false
|
||||
|
||||
def mkLevelParam (name : Name) :=
|
||||
|
|
@ -116,7 +135,7 @@ def levelOne := mkLevelSucc levelZero
|
|||
|
||||
@[export lean_level_mk_zero] def mkLevelZeroEx : Unit → Level := fun _ => levelZero
|
||||
@[export lean_level_mk_succ] def mkLevelSuccEx : Level → Level := mkLevelSucc
|
||||
@[export lean_level_mk_mvar] def mkLevelMVarEx : Name → Level := mkLevelMVar
|
||||
@[export lean_level_mk_mvar] def mkLevelMVarEx : MVarId → Level := mkLevelMVar
|
||||
@[export lean_level_mk_param] def mkLevelParamEx : Name → Level := mkLevelParam
|
||||
@[export lean_level_mk_max] def mkLevelMaxEx : Level → Level → Level := mkLevelMax
|
||||
@[export lean_level_mk_imax] def mkLevelIMaxEx : Level → Level → Level := mkLevelIMax
|
||||
|
|
@ -152,7 +171,7 @@ def isMVar : Level → Bool
|
|||
| mvar .. => true
|
||||
| _ => false
|
||||
|
||||
def mvarId! : Level → Name
|
||||
def mvarId! : Level → MVarId
|
||||
| mvar mvarId _ => mvarId
|
||||
| _ => panic! "metavariable expected"
|
||||
|
||||
|
|
@ -231,7 +250,7 @@ partial def normLtAux : Level → Nat → Level → Nat → Bool
|
|||
else if l₁₁ != l₂₁ then normLtAux l₁₁ 0 l₂₁ 0
|
||||
else normLtAux l₁₂ 0 l₂₂ 0
|
||||
| param n₁ _, k₁, param n₂ _, k₂ => if n₁ == n₂ then k₁ < k₂ else Name.lt n₁ n₂ -- use Name.lt because it is lexicographical
|
||||
| mvar n₁ _, k₁, mvar n₂ _, k₂ => if n₁ == n₂ then k₁ < k₂ else Name.quickLt n₁ n₂ -- metavariables are temporary, the actual order doesn't matter
|
||||
| mvar n₁ _, k₁, mvar n₂ _, k₂ => if n₁ == n₂ then k₁ < k₂ else Name.quickLt n₁.name n₂.name -- metavariables are temporary, the actual order doesn't matter
|
||||
| l₁, k₁, l₂, k₂ => if l₁ == l₂ then k₁ < k₂ else ctorToNat l₁ < ctorToNat l₂
|
||||
|
||||
/--
|
||||
|
|
@ -386,7 +405,7 @@ def toResult : Level → Result
|
|||
| imax l₁ l₂ _ => Result.imax (toResult l₁) (toResult l₂)
|
||||
| param n _ => Result.leaf n
|
||||
| mvar n _ =>
|
||||
let n := n.replacePrefix `_uniq (Name.mkSimple "?u");
|
||||
let n := n.name.replacePrefix `_uniq (Name.mkSimple "?u");
|
||||
Result.leaf n
|
||||
|
||||
private def parenIfFalse : Format → Bool → Format
|
||||
|
|
@ -531,7 +550,7 @@ abbrev LevelSet := HashSet Level
|
|||
abbrev PersistentLevelSet := PHashSet Level
|
||||
abbrev PLevelSet := PersistentLevelSet
|
||||
|
||||
def Level.collectMVars (u : Level) (s : NameSet := {}) : NameSet :=
|
||||
def Level.collectMVars (u : Level) (s : MVarIdSet := {}) : MVarIdSet :=
|
||||
match u with
|
||||
| succ v _ => collectMVars v s
|
||||
| max u v _ => collectMVars u (collectMVars v s)
|
||||
|
|
|
|||
9
stage0/src/Lean/Meta/AbstractMVars.lean
generated
9
stage0/src/Lean/Meta/AbstractMVars.lean
generated
|
|
@ -24,8 +24,8 @@ structure State where
|
|||
nextParamIdx : Nat := 0
|
||||
paramNames : Array Name := #[]
|
||||
fvars : Array Expr := #[]
|
||||
lmap : HashMap Name Level := {}
|
||||
emap : HashMap Name Expr := {}
|
||||
lmap : HashMap MVarId Level := {}
|
||||
emap : HashMap MVarId Expr := {}
|
||||
|
||||
abbrev M := StateM State
|
||||
|
||||
|
|
@ -35,6 +35,9 @@ def mkFreshId : M Name := do
|
|||
modify fun s => { s with ngen := s.ngen.next }
|
||||
pure fresh
|
||||
|
||||
def mkFreshFVarId : M FVarId :=
|
||||
return { name := (← mkFreshId) }
|
||||
|
||||
private partial def abstractLevelMVars (u : Level) : M Level := do
|
||||
if !u.hasMVar then
|
||||
return u
|
||||
|
|
@ -91,7 +94,7 @@ partial def abstractExprMVars (e : Expr) : M Expr := do
|
|||
return e
|
||||
| none =>
|
||||
let type ← abstractExprMVars decl.type
|
||||
let fvarId ← mkFreshId
|
||||
let fvarId ← mkFreshFVarId
|
||||
let fvar := mkFVar fvarId;
|
||||
let userName := if decl.userName.isAnonymous then (`x).appendIndexAfter s.fvars.size else decl.userName
|
||||
modify fun s => {
|
||||
|
|
|
|||
22
stage0/src/Lean/Meta/Basic.lean
generated
22
stage0/src/Lean/Meta/Basic.lean
generated
|
|
@ -157,7 +157,7 @@ structure State where
|
|||
mctx : MetavarContext := {}
|
||||
cache : Cache := {}
|
||||
/- When `trackZeta == true`, then any let-decl free variable that is zeta expansion performed by `MetaM` is stored in `zetaFVarIds`. -/
|
||||
zetaFVarIds : NameSet := {}
|
||||
zetaFVarIds : FVarIdSet := {}
|
||||
postponed : PersistentArray PostponedEntry := {}
|
||||
deriving Inhabited
|
||||
|
||||
|
|
@ -264,7 +264,7 @@ def setMCtx (mctx : MetavarContext) : MetaM Unit :=
|
|||
def resetZetaFVarIds : MetaM Unit :=
|
||||
modify fun s => { s with zetaFVarIds := {} }
|
||||
|
||||
def getZetaFVarIds : MetaM NameSet :=
|
||||
def getZetaFVarIds : MetaM FVarIdSet :=
|
||||
return (← get).zetaFVarIds
|
||||
|
||||
def getPostponed : MetaM (PersistentArray PostponedEntry) :=
|
||||
|
|
@ -302,10 +302,10 @@ def mkFreshExprMVarAt
|
|||
(lctx : LocalContext) (localInsts : LocalInstances) (type : Expr)
|
||||
(kind : MetavarKind := MetavarKind.natural) (userName : Name := Name.anonymous) (numScopeArgs : Nat := 0)
|
||||
: MetaM Expr := do
|
||||
mkFreshExprMVarAtCore (← mkFreshId) lctx localInsts type kind userName numScopeArgs
|
||||
mkFreshExprMVarAtCore (← mkFreshMVarId) lctx localInsts type kind userName numScopeArgs
|
||||
|
||||
def mkFreshLevelMVar : MetaM Level := do
|
||||
let mvarId ← mkFreshId
|
||||
let mvarId ← mkFreshMVarId
|
||||
modifyMCtx fun mctx => mctx.addLevelMVarDecl mvarId;
|
||||
return mkLevelMVar mvarId
|
||||
|
||||
|
|
@ -365,7 +365,7 @@ def shouldReduceReducibleOnly : MetaM Bool :=
|
|||
def getMVarDecl (mvarId : MVarId) : MetaM MetavarDecl := do
|
||||
match (← getMCtx).findDecl? mvarId with
|
||||
| some d => pure d
|
||||
| none => throwError "unknown metavariable '?{mvarId}'"
|
||||
| none => throwError "unknown metavariable '?{mvarId.name}'"
|
||||
|
||||
def setMVarKind (mvarId : MVarId) (kind : MetavarKind) : MetaM Unit :=
|
||||
modifyMCtx fun mctx => mctx.setMVarKind mvarId kind
|
||||
|
|
@ -387,7 +387,7 @@ def isReadOnlyOrSyntheticOpaqueExprMVar (mvarId : MVarId) : MetaM Bool := do
|
|||
def getLevelMVarDepth (mvarId : MVarId) : MetaM Nat := do
|
||||
match (← getMCtx).findLevelDepth? mvarId with
|
||||
| some depth => return depth
|
||||
| _ => throwError "unknown universe metavariable '?{mvarId}'"
|
||||
| _ => throwError "unknown universe metavariable '?{mvarId.name}'"
|
||||
|
||||
def isReadOnlyLevelMVar (mvarId : MVarId) : MetaM Bool := do
|
||||
if (← getConfig).ignoreLevelMVarDepth then
|
||||
|
|
@ -684,7 +684,7 @@ mutual
|
|||
| Expr.forallE n d b c =>
|
||||
if fvarsSizeLtMaxFVars fvars maxFVars? then
|
||||
let d := d.instantiateRevRange j fvars.size fvars
|
||||
let fvarId ← mkFreshId
|
||||
let fvarId ← mkFreshFVarId
|
||||
let lctx := lctx.mkLocalDecl fvarId n d c.binderInfo
|
||||
let fvar := mkFVar fvarId
|
||||
let fvars := fvars.push fvar
|
||||
|
|
@ -785,14 +785,14 @@ where
|
|||
match consumeLet, e with
|
||||
| _, Expr.lam n d b c =>
|
||||
let d := d.instantiateRevRange j fvars.size fvars
|
||||
let fvarId ← mkFreshId
|
||||
let fvarId ← mkFreshFVarId
|
||||
let lctx := lctx.mkLocalDecl fvarId n d c.binderInfo
|
||||
let fvar := mkFVar fvarId
|
||||
process consumeLet lctx (fvars.push fvar) j b
|
||||
| true, Expr.letE n t v b _ => do
|
||||
let t := t.instantiateRevRange j fvars.size fvars
|
||||
let v := v.instantiateRevRange j fvars.size fvars
|
||||
let fvarId ← mkFreshId
|
||||
let fvarId ← mkFreshFVarId
|
||||
let lctx := lctx.mkLetDecl fvarId n t v
|
||||
let fvar := mkFVar fvarId
|
||||
process true lctx (fvars.push fvar) j b
|
||||
|
|
@ -884,7 +884,7 @@ private def withNewFVar (fvar fvarType : Expr) (k : Expr → MetaM α) : MetaM
|
|||
| some c => withNewLocalInstance c fvar <| k fvar
|
||||
|
||||
private def withLocalDeclImp (n : Name) (bi : BinderInfo) (type : Expr) (k : Expr → MetaM α) : MetaM α := do
|
||||
let fvarId ← mkFreshId
|
||||
let fvarId ← mkFreshFVarId
|
||||
let ctx ← read
|
||||
let lctx := ctx.lctx.mkLocalDecl fvarId n type bi
|
||||
let fvar := mkFVar fvarId
|
||||
|
|
@ -924,7 +924,7 @@ def withNewBinderInfos (bs : Array (FVarId × BinderInfo)) (k : n α) : n α :=
|
|||
mapMetaM (fun k => withNewBinderInfosImp bs k) k
|
||||
|
||||
private def withLetDeclImp (n : Name) (type : Expr) (val : Expr) (k : Expr → MetaM α) : MetaM α := do
|
||||
let fvarId ← mkFreshId
|
||||
let fvarId ← mkFreshFVarId
|
||||
let ctx ← read
|
||||
let lctx := ctx.lctx.mkLetDecl fvarId n type val
|
||||
let fvar := mkFVar fvarId
|
||||
|
|
|
|||
31
stage0/src/Lean/Meta/DiscrTree.lean
generated
31
stage0/src/Lean/Meta/DiscrTree.lean
generated
|
|
@ -60,7 +60,7 @@ def Key.ctorIdx : Key → Nat
|
|||
|
||||
def Key.lt : Key → Key → Bool
|
||||
| Key.lit v₁, Key.lit v₂ => v₁ < v₂
|
||||
| Key.fvar n₁ a₁, Key.fvar n₂ a₂ => Name.quickLt n₁ n₂ || (n₁ == n₂ && a₁ < a₂)
|
||||
| Key.fvar n₁ a₁, Key.fvar n₂ a₂ => Name.quickLt n₁.name n₂.name || (n₁ == n₂ && a₁ < a₂)
|
||||
| Key.const n₁ a₁, Key.const n₂ a₂ => Name.quickLt n₁ n₂ || (n₁ == n₂ && a₁ < a₂)
|
||||
| Key.proj s₁ i₁, Key.proj s₂ i₂ => Name.quickLt s₁ s₂ || (s₁ == s₂ && i₁ < i₂)
|
||||
| k₁, k₂ => k₁.ctorIdx < k₂.ctorIdx
|
||||
|
|
@ -75,7 +75,7 @@ def Key.format : Key → Format
|
|||
| Key.lit (Literal.strVal v) => repr v
|
||||
| Key.const k _ => Std.format k
|
||||
| Key.proj s i => Std.format s ++ "." ++ Std.format i
|
||||
| Key.fvar k _ => Std.format k
|
||||
| Key.fvar k _ => Std.format k.name
|
||||
| Key.arrow => "→"
|
||||
|
||||
instance : ToFormat Key := ⟨Key.format⟩
|
||||
|
|
@ -109,7 +109,7 @@ instance [ToFormat α] : ToFormat (DiscrTree α) := ⟨format⟩
|
|||
|
||||
/- The discrimination tree ignores implicit arguments and proofs.
|
||||
We use the following auxiliary id as a "mark". -/
|
||||
private def tmpMVarId : MVarId := `_discr_tree_tmp
|
||||
private def tmpMVarId : MVarId := { name := `_discr_tree_tmp }
|
||||
private def tmpStar := mkMVar tmpMVarId
|
||||
|
||||
instance : Inhabited (DiscrTree α) where
|
||||
|
|
@ -424,17 +424,32 @@ private def getStarResult (d : DiscrTree α) : Array α :=
|
|||
private abbrev findKey (cs : Array (Key × Trie α)) (k : Key) : Option (Key × Trie α) :=
|
||||
cs.binSearch (k, arbitrary) (fun a b => a.1 < b.1)
|
||||
|
||||
partial def getMatch (d : DiscrTree α) (e : Expr) : MetaM (Array α) :=
|
||||
/--
|
||||
Find values that match `e` in `d`.
|
||||
If `allowExtraArgs == true`, we also return solutions that match prefixes of `e`.
|
||||
-/
|
||||
partial def getMatch (d : DiscrTree α) (e : Expr) (allowExtraArgs := false) : MetaM (Array α) :=
|
||||
withReducible do
|
||||
let result := getStarResult d
|
||||
let (k, args) ← getMatchKeyArgs e (root := true)
|
||||
match k with
|
||||
| Key.star => return result
|
||||
| _ =>
|
||||
match d.root.find? k with
|
||||
| none => return result
|
||||
| some c => process args c result
|
||||
| _ => if allowExtraArgs then processRootWithExtra k args result else processRoot k args result
|
||||
where
|
||||
processRoot (k : Key) (args : Array Expr) (result : Array α) : MetaM (Array α) := do
|
||||
match d.root.find? k with
|
||||
| none => return result
|
||||
| some c => process args c result
|
||||
|
||||
processRootWithExtra (k : Key) (args : Array Expr) (result : Array α) : MetaM (Array α) := do
|
||||
let result ← processRoot k args result
|
||||
match k with
|
||||
| Key.const f 0 => return result
|
||||
| Key.const f (n+1) => processRootWithExtra (Key.const f n) args.pop result
|
||||
| Key.fvar f 0 => return result
|
||||
| Key.fvar f (n+1) => processRootWithExtra (Key.fvar f n) args.pop result
|
||||
| _ => return result
|
||||
|
||||
process (todo : Array Expr) (c : Trie α) (result : Array α) : MetaM (Array α) := do
|
||||
match c with
|
||||
| Trie.node vs cs =>
|
||||
|
|
|
|||
10
stage0/src/Lean/Meta/ExprDefEq.lean
generated
10
stage0/src/Lean/Meta/ExprDefEq.lean
generated
|
|
@ -211,7 +211,7 @@ private partial def isDefEqBindingAux (lctx : LocalContext) (fvars : Array Expr)
|
|||
let process (n : Name) (d₁ d₂ b₁ b₂ : Expr) : MetaM Bool := do
|
||||
let d₁ := d₁.instantiateRev fvars
|
||||
let d₂ := d₂.instantiateRev fvars
|
||||
let fvarId ← mkFreshId
|
||||
let fvarId ← mkFreshFVarId
|
||||
let lctx := lctx.mkLocalDecl fvarId n d₁
|
||||
let fvars := fvars.push (mkFVar fvarId)
|
||||
isDefEqBindingAux lctx fvars b₁ b₂ (ds₂.push d₂)
|
||||
|
|
@ -303,8 +303,8 @@ where
|
|||
|
||||
/- Traverse `e` and stores in the state `NameHashSet` any let-declaration with index greater than `(← read)`.
|
||||
The context `Nat` is the position of `xs[0]` in the local context. -/
|
||||
collectLetDeclsFrom (e : Expr) : ReaderT Nat (StateRefT NameHashSet MetaM) Unit := do
|
||||
let rec visit (e : Expr) : MonadCacheT Expr Unit (ReaderT Nat (StateRefT NameHashSet MetaM)) Unit :=
|
||||
collectLetDeclsFrom (e : Expr) : ReaderT Nat (StateRefT FVarIdHashSet MetaM) Unit := do
|
||||
let rec visit (e : Expr) : MonadCacheT Expr Unit (ReaderT Nat (StateRefT FVarIdHashSet MetaM)) Unit :=
|
||||
checkCache e fun _ => do
|
||||
match e with
|
||||
| Expr.forallE _ d b _ => visit d; visit b
|
||||
|
|
@ -326,7 +326,7 @@ where
|
|||
or equal to the position of `xs.back` in the local context.
|
||||
The `Nat` context `(← read)` is the position of `xs[0]` in the local context.
|
||||
-/
|
||||
collectLetDepsAux : Nat → ReaderT Nat (StateRefT NameHashSet MetaM) Unit
|
||||
collectLetDepsAux : Nat → ReaderT Nat (StateRefT FVarIdHashSet MetaM) Unit
|
||||
| 0 => return ()
|
||||
| i+1 => do
|
||||
if i+1 == (← read) then
|
||||
|
|
@ -343,7 +343,7 @@ where
|
|||
collectLetDepsAux i
|
||||
|
||||
/- Computes the set `ys`. It is a set of `FVarId`s, -/
|
||||
collectLetDeps : MetaM NameHashSet := do
|
||||
collectLetDeps : MetaM FVarIdHashSet := do
|
||||
let lctx ← getLCtx
|
||||
let start := lctx.getFVar! xs[0] |>.index
|
||||
let stop := lctx.getFVar! xs.back |>.index
|
||||
|
|
|
|||
16
stage0/src/Lean/Meta/GeneralizeVars.lean
generated
16
stage0/src/Lean/Meta/GeneralizeVars.lean
generated
|
|
@ -11,7 +11,7 @@ namespace Lean.Meta
|
|||
/--
|
||||
Add to `forbidden` all a set of `FVarId`s containing `targets` and all variables they depend on.
|
||||
-/
|
||||
partial def mkGeneralizationForbiddenSet (targets : Array Expr) (forbidden : NameSet := {}) : MetaM NameSet := do
|
||||
partial def mkGeneralizationForbiddenSet (targets : Array Expr) (forbidden : FVarIdSet := {}) : MetaM FVarIdSet := do
|
||||
let mut s := { fvarSet := forbidden }
|
||||
let mut todo := #[]
|
||||
for target in targets do
|
||||
|
|
@ -21,7 +21,7 @@ partial def mkGeneralizationForbiddenSet (targets : Array Expr) (forbidden : Nam
|
|||
s := collectFVars s (← instantiateMVars (← inferType target))
|
||||
loop todo.toList s.fvarSet
|
||||
where
|
||||
visit (fvarId : FVarId) (todo : List FVarId) (s : NameSet) : MetaM (List FVarId × NameSet) := do
|
||||
visit (fvarId : FVarId) (todo : List FVarId) (s : FVarIdSet) : MetaM (List FVarId × FVarIdSet) := do
|
||||
let localDecl ← getLocalDecl fvarId
|
||||
let mut s' := collectFVars {} (← instantiateMVars localDecl.type)
|
||||
if let some val := localDecl.value? then
|
||||
|
|
@ -34,7 +34,7 @@ where
|
|||
s := s.insert fvarId
|
||||
return (todo, s)
|
||||
|
||||
loop (todo : List FVarId) (s : NameSet) : MetaM NameSet := do
|
||||
loop (todo : List FVarId) (s : FVarIdSet) : MetaM FVarIdSet := do
|
||||
match todo with
|
||||
| [] => return s
|
||||
| fvarId::todo =>
|
||||
|
|
@ -54,9 +54,9 @@ where
|
|||
Remark: we *not* collect instance implicit arguments nor auxiliary declarations for compiling
|
||||
recursive declarations.
|
||||
-/
|
||||
def getFVarSetToGeneralize (targets : Array Expr) (forbidden : NameSet) : MetaM NameSet := do
|
||||
let mut s : NameSet := targets.foldl (init := {}) fun s target => if target.isFVar then s.insert target.fvarId! else s
|
||||
let mut r : NameSet := {}
|
||||
def getFVarSetToGeneralize (targets : Array Expr) (forbidden : FVarIdSet) : MetaM FVarIdSet := do
|
||||
let mut s : FVarIdSet := targets.foldl (init := {}) fun s target => if target.isFVar then s.insert target.fvarId! else s
|
||||
let mut r : FVarIdSet := {}
|
||||
for localDecl in (← getLCtx) do
|
||||
unless forbidden.contains localDecl.fvarId do
|
||||
unless localDecl.isAuxDecl || localDecl.binderInfo.isInstImplicit do
|
||||
|
|
@ -65,12 +65,12 @@ def getFVarSetToGeneralize (targets : Array Expr) (forbidden : NameSet) : MetaM
|
|||
s := s.insert localDecl.fvarId
|
||||
return r
|
||||
|
||||
def sortFVars (fvars : NameSet) : MetaM (Array FVarId) := do
|
||||
def sortFVars (fvars : FVarIdSet) : MetaM (Array FVarId) := do
|
||||
let fvarIds := fvars.fold (init := #[]) fun s fvarId => s.push fvarId
|
||||
let lctx ← getLCtx
|
||||
return fvarIds.qsort fun x y => (lctx.get! x).index < (lctx.get! y).index
|
||||
|
||||
def getFVarsToGeneralize (targets : Array Expr) (forbidden : NameSet := {}) : MetaM (Array FVarId) := do
|
||||
def getFVarsToGeneralize (targets : Array Expr) (forbidden : FVarIdSet := {}) : MetaM (Array FVarId) := do
|
||||
let forbidden ← mkGeneralizationForbiddenSet targets forbidden
|
||||
let s ← getFVarSetToGeneralize targets forbidden
|
||||
sortFVars s
|
||||
|
|
|
|||
4
stage0/src/Lean/Meta/InferType.lean
generated
4
stage0/src/Lean/Meta/InferType.lean
generated
|
|
@ -152,12 +152,12 @@ private def inferLambdaType (e : Expr) : MetaM Expr :=
|
|||
|
||||
@[inline] private def withLocalDecl' {α} (name : Name) (bi : BinderInfo) (type : Expr) (x : Expr → MetaM α) : MetaM α :=
|
||||
savingCache do
|
||||
let fvarId ← mkFreshId
|
||||
let fvarId ← mkFreshFVarId
|
||||
withReader (fun ctx => { ctx with lctx := ctx.lctx.mkLocalDecl fvarId name type bi }) do
|
||||
x (mkFVar fvarId)
|
||||
|
||||
def throwUnknownMVar {α} (mvarId : MVarId) : MetaM α :=
|
||||
throwError "unknown metavariable '?{mvarId}'"
|
||||
throwError "unknown metavariable '?{mvarId.name}'"
|
||||
|
||||
private def inferMVarType (mvarId : MVarId) : MetaM Expr := do
|
||||
match (← getMCtx).findDecl? mvarId with
|
||||
|
|
|
|||
2
stage0/src/Lean/Meta/Match/CaseValues.lean
generated
2
stage0/src/Lean/Meta/Match/CaseValues.lean
generated
|
|
@ -46,7 +46,7 @@ private def caseValueAux (mvarId : MVarId) (fvarId : FVarId) (value : Expr) (hNa
|
|||
let clearH := false
|
||||
let (thenSubst, thenMVarId) ← substCore thenMVarId thenH symm subst clearH
|
||||
withMVarContext thenMVarId do
|
||||
trace[Meta] "subst domain: {thenSubst.domain}"
|
||||
trace[Meta] "subst domain: {thenSubst.domain.map (·.name)}"
|
||||
let thenH := (thenSubst.get thenH).fvarId!
|
||||
trace[Meta] "searching for decl"
|
||||
let decl ← getLocalDecl thenH
|
||||
|
|
|
|||
2
stage0/src/Lean/Meta/Match/MVarRenaming.lean
generated
2
stage0/src/Lean/Meta/Match/MVarRenaming.lean
generated
|
|
@ -9,7 +9,7 @@ namespace Lean.Meta
|
|||
|
||||
/- A mapping from MVarId to MVarId -/
|
||||
structure MVarRenaming where
|
||||
map : NameMap MVarId := {}
|
||||
map : MVarIdMap MVarId := {}
|
||||
|
||||
def MVarRenaming.isEmpty (s : MVarRenaming) : Bool :=
|
||||
s.map.isEmpty
|
||||
|
|
|
|||
4
stage0/src/Lean/Meta/Match/MatchEqs.lean
generated
4
stage0/src/Lean/Meta/Match/MatchEqs.lean
generated
|
|
@ -197,13 +197,13 @@ private partial def mkSplitterProof (matchDeclName : Name) (template : Expr) (al
|
|||
proveSubgoal mvarId
|
||||
instantiateMVars proof
|
||||
where
|
||||
mkMap : NameMap Expr := do
|
||||
mkMap : FVarIdMap Expr := do
|
||||
let mut m := {}
|
||||
for alt in alts, altNew in altsNew do
|
||||
m := m.insert alt.fvarId! altNew
|
||||
return m
|
||||
|
||||
convertTemplate (m : NameMap Expr) : StateRefT (Array MVarId) MetaM Expr :=
|
||||
convertTemplate (m : FVarIdMap Expr) : StateRefT (Array MVarId) MetaM Expr :=
|
||||
transform template fun e => do
|
||||
match e.getAppFn with
|
||||
| Expr.fvar fvarId .. =>
|
||||
|
|
|
|||
6
stage0/src/Lean/Meta/PPGoal.lean
generated
6
stage0/src/Lean/Meta/PPGoal.lean
generated
|
|
@ -29,8 +29,8 @@ def withPPInaccessibleNames [MonadControlT MetaM m] [Monad m] (x : m α) (flag :
|
|||
namespace ToHide
|
||||
|
||||
structure State where
|
||||
hiddenInaccessibleProp : NameSet := {} -- FVarIds of Propostions with inaccessible names but containing only visible names. We show only their types
|
||||
hiddenInaccessible : NameSet := {} -- FVarIds with inaccessible names, but not in hiddenInaccessibleProp
|
||||
hiddenInaccessibleProp : FVarIdSet := {} -- FVarIds of Propostions with inaccessible names but containing only visible names. We show only their types
|
||||
hiddenInaccessible : FVarIdSet := {} -- FVarIds with inaccessible names, but not in hiddenInaccessibleProp
|
||||
modified : Bool := false
|
||||
|
||||
structure Context where
|
||||
|
|
@ -125,7 +125,7 @@ The `goalTarget` counts as a forward dependency.
|
|||
|
||||
We say a name is visible if it is a free variable with FVarId not in `hiddenInaccessible` nor `hiddenInaccessibleProp`
|
||||
-/
|
||||
def collect (goalTarget : Expr) : MetaM (NameSet × NameSet) := do
|
||||
def collect (goalTarget : Expr) : MetaM (FVarIdSet × FVarIdSet) := do
|
||||
if pp.inaccessibleNames.get (← getOptions) then
|
||||
/- Don't hide inaccessible names when `pp.inaccessibleNames` is set to true. -/
|
||||
return ({}, {})
|
||||
|
|
|
|||
2
stage0/src/Lean/Meta/Reduce.lean
generated
2
stage0/src/Lean/Meta/Reduce.lean
generated
|
|
@ -20,7 +20,7 @@ partial def reduce (e : Expr) (explicitOnly skipTypes skipProofs := true) : Meta
|
|||
let e ← whnf e
|
||||
match e with
|
||||
| Expr.app .. =>
|
||||
let f := e.getAppFn
|
||||
let f ← visit e.getAppFn
|
||||
let nargs := e.getAppNumArgs
|
||||
let finfo ← getFunInfoNArgs f nargs
|
||||
let mut args := e.getAppArgs
|
||||
|
|
|
|||
10
stage0/src/Lean/Meta/SortLocalDecls.lean
generated
10
stage0/src/Lean/Meta/SortLocalDecls.lean
generated
|
|
@ -28,12 +28,12 @@ mutual
|
|||
| Expr.app f a _ => visitExpr f; visitExpr a
|
||||
| Expr.mdata _ b _ => visitExpr b
|
||||
| Expr.mvar _ _ => let v ← instantiateMVars e; unless v.isMVar do visitExpr v
|
||||
| Expr.fvar fvarId _ => if let some localDecl := (← read).localDecls.find? fvarId then visitLocalDecl localDecl
|
||||
| Expr.fvar fvarId _ => if let some localDecl := (← read).localDecls.find? fvarId.name then visitLocalDecl localDecl
|
||||
| _ => return ()
|
||||
|
||||
partial def visitLocalDecl (localDecl : LocalDecl) : M Unit := do
|
||||
unless (← get).visited.contains localDecl.fvarId do
|
||||
modify fun s => { s with visited := s.visited.insert localDecl.fvarId }
|
||||
unless (← get).visited.contains localDecl.fvarId.name do
|
||||
modify fun s => { s with visited := s.visited.insert localDecl.fvarId.name }
|
||||
visitExpr localDecl.type
|
||||
if let some val := localDecl.value? then
|
||||
visitExpr val
|
||||
|
|
@ -45,6 +45,6 @@ end SortLocalDecls
|
|||
open SortLocalDecls in
|
||||
def sortLocalDecls (localDecls : Array LocalDecl) : MetaM (Array LocalDecl) :=
|
||||
let aux : M (Array LocalDecl) := do localDecls.forM visitLocalDecl; return (← get).result
|
||||
aux.run { localDecls := localDecls.foldl (init := {}) fun s d => s.insert d.fvarId d } |>.run' {}
|
||||
aux.run { localDecls := localDecls.foldl (init := {}) fun s d => s.insert d.fvarId.name d } |>.run' {}
|
||||
|
||||
end Lean.Meta
|
||||
end Lean.Meta
|
||||
|
|
|
|||
2
stage0/src/Lean/Meta/SynthInstance.lean
generated
2
stage0/src/Lean/Meta/SynthInstance.lean
generated
|
|
@ -131,7 +131,7 @@ partial def normExpr (e : Expr) : M Expr := do
|
|||
match s.emap.find? mvarId with
|
||||
| some e' => pure e'
|
||||
| none => do
|
||||
let e' := mkFVar $ Name.mkNum `_tc s.nextIdx
|
||||
let e' := mkFVar { name := Name.mkNum `_tc s.nextIdx }
|
||||
modify fun s => { s with nextIdx := s.nextIdx + 1, emap := s.emap.insert mvarId e' }
|
||||
pure e'
|
||||
| _ => pure e
|
||||
|
|
|
|||
4
stage0/src/Lean/Meta/Tactic/Intro.lean
generated
4
stage0/src/Lean/Meta/Tactic/Intro.lean
generated
|
|
@ -28,7 +28,7 @@ namespace Lean.Meta
|
|||
let type := type.instantiateRevRange j fvars.size fvars
|
||||
let type := type.headBeta
|
||||
let val := val.instantiateRevRange j fvars.size fvars
|
||||
let fvarId ← mkFreshId
|
||||
let fvarId ← mkFreshFVarId
|
||||
let (n, s) ← mkName lctx n true s
|
||||
let lctx := lctx.mkLetDecl fvarId n type val
|
||||
let fvar := mkFVar fvarId
|
||||
|
|
@ -37,7 +37,7 @@ namespace Lean.Meta
|
|||
| (i+1), lctx, fvars, j, s, Expr.forallE n type body c => do
|
||||
let type := type.instantiateRevRange j fvars.size fvars
|
||||
let type := type.headBeta
|
||||
let fvarId ← mkFreshId
|
||||
let fvarId ← mkFreshFVarId
|
||||
let (n, s) ← mkName lctx n c.binderInfo.isExplicit s
|
||||
let lctx := lctx.mkLocalDecl fvarId n type c.binderInfo
|
||||
let fvar := mkFVar fvarId
|
||||
|
|
|
|||
18
stage0/src/Lean/Meta/Tactic/Replace.lean
generated
18
stage0/src/Lean/Meta/Tactic/Replace.lean
generated
|
|
@ -28,7 +28,7 @@ def replaceTargetEq (mvarId : MVarId) (targetNew : Expr) (eqProof : Expr) : Meta
|
|||
let newProof ← mkExpectedTypeHint eqProof eq
|
||||
let val := mkAppN (Lean.mkConst `Eq.mpr [u]) #[target, targetNew, eqProof, mvarNew]
|
||||
assignExprMVar mvarId val
|
||||
pure mvarNew.mvarId!
|
||||
return mvarNew.mvarId!
|
||||
|
||||
/--
|
||||
Convert the given goal `Ctx | target` into `Ctx |- targetNew`. It assumes the goals are definitionally equal.
|
||||
|
|
@ -41,13 +41,14 @@ def replaceTargetDefEq (mvarId : MVarId) (targetNew : Expr) : MetaM MVarId :=
|
|||
withMVarContext mvarId do
|
||||
checkNotAssigned mvarId `change
|
||||
let target ← getMVarType mvarId
|
||||
if target == targetNew then pure mvarId
|
||||
if target == targetNew then
|
||||
return mvarId
|
||||
else
|
||||
let tag ← getMVarTag mvarId
|
||||
let mvarNew ← mkFreshExprSyntheticOpaqueMVar targetNew tag
|
||||
let newVal ← mkExpectedTypeHint mvarNew target
|
||||
assignExprMVar mvarId mvarNew
|
||||
pure mvarNew.mvarId!
|
||||
return mvarNew.mvarId!
|
||||
|
||||
/--
|
||||
Replace type of the local declaration with id `fvarId` with one with the same user-facing name, but with type `typeNew`.
|
||||
|
|
@ -77,6 +78,17 @@ where
|
|||
else
|
||||
return e.hasFVar
|
||||
|
||||
def replaceLocalDeclDefEq (mvarId : MVarId) (fvarId : FVarId) (typeNew : Expr) : MetaM MVarId := do
|
||||
withMVarContext mvarId do
|
||||
let mvarDecl ← getMVarDecl mvarId
|
||||
if typeNew == mvarDecl.type then
|
||||
return mvarId
|
||||
else
|
||||
let lctxNew := (← getLCtx).modifyLocalDecl fvarId (·.setType typeNew)
|
||||
let mvarNew ← mkFreshExprMVarAt lctxNew (← getLocalInstances) mvarDecl.type mvarDecl.kind mvarDecl.userName
|
||||
assignExprMVar mvarId mvarNew
|
||||
return mvarNew.mvarId!
|
||||
|
||||
def change (mvarId : MVarId) (targetNew : Expr) (checkDefEq := true) : MetaM MVarId := withMVarContext mvarId do
|
||||
let target ← getMVarType mvarId
|
||||
if checkDefEq then
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ def mkCongrLemma (declName : Name) (prio : Nat) : MetaM CongrLemma := withReduci
|
|||
lhs.withApp fun lhsFn lhsArgs => rhs.withApp fun rhsFn rhsArgs => do
|
||||
unless lhsFn.isConst && rhsFn.isConst && lhsFn.constName! == rhsFn.constName! && lhsArgs.size == rhsArgs.size do
|
||||
throwError "invalid 'congr' theorem, equality left/right-hand sides must be applications of the same function{indentExpr type}"
|
||||
let mut foundMVars : NameSet := {}
|
||||
let mut foundMVars : MVarIdSet := {}
|
||||
for lhsArg in lhsArgs do
|
||||
unless lhsArg.isSort do
|
||||
unless lhsArg.isMVar do
|
||||
|
|
@ -98,7 +98,7 @@ def mkCongrLemma (declName : Name) (prio : Nat) : MetaM CongrLemma := withReduci
|
|||
}
|
||||
where
|
||||
/-- Return `true` if `t` contains a metavariable that is not in `mvarSet` -/
|
||||
onlyMVarsAt (t : Expr) (mvarSet : NameSet) : Bool :=
|
||||
onlyMVarsAt (t : Expr) (mvarSet : MVarIdSet) : Bool :=
|
||||
Option.isNone <| t.find? fun e => e.isMVar && !mvarSet.contains e.mvarId!
|
||||
|
||||
def addCongrLemma (declName : Name) (attrKind : AttributeKind) (prio : Nat) : MetaM Unit := do
|
||||
|
|
|
|||
16
stage0/src/Lean/Meta/Tactic/Simp/Main.lean
generated
16
stage0/src/Lean/Meta/Tactic/Simp/Main.lean
generated
|
|
@ -50,6 +50,10 @@ private def mkImpCongr (r₁ r₂ : Result) : MetaM Result := do
|
|||
| none, none => return { expr := e, proof? := none }
|
||||
| _, _ => return { expr := e, proof? := (← Meta.mkImpCongr (← r₁.getProof) (← r₂.getProof)) } -- TODO specialize if bootleneck
|
||||
|
||||
/-- Return true if `e` is of the form `ofNat n` where `n` is a kernel Nat literal -/
|
||||
def isOfNatNatLit (e : Expr) : Bool :=
|
||||
e.isAppOfArity ``OfNat.ofNat 3 && e.appFn!.appArg!.isNatLit
|
||||
|
||||
private def reduceProj (e : Expr) : MetaM Expr := do
|
||||
match (← reduceProj? e) with
|
||||
| some e => return e
|
||||
|
|
@ -160,7 +164,7 @@ where
|
|||
| Expr.const .. => simpConst e
|
||||
| Expr.bvar .. => unreachable!
|
||||
| Expr.sort .. => pure { expr := e }
|
||||
| Expr.lit .. => pure { expr := e }
|
||||
| Expr.lit .. => simpLit e
|
||||
| Expr.mvar .. => pure { expr := (← instantiateMVars e) }
|
||||
| Expr.fvar .. => pure { expr := (← reduceFVar (← getConfig) e) }
|
||||
|
||||
|
|
@ -180,6 +184,11 @@ where
|
|||
i := i + 1
|
||||
return r
|
||||
|
||||
simpLit (e : Expr) : M Result :=
|
||||
match e.natLit? with
|
||||
| some n => return { expr := (← mkNumeral (mkConst ``Nat) n) }
|
||||
| none => return { expr := e }
|
||||
|
||||
/- Return true iff processing the given congruence lemma hypothesis produced a non-refl proof. -/
|
||||
processCongrHypothesis (h : Expr) : M Bool := do
|
||||
forallTelescopeReducing (← inferType h) fun xs hType => withNewLemmas xs do
|
||||
|
|
@ -242,6 +251,9 @@ where
|
|||
let e ← reduce e
|
||||
if !e.isApp then
|
||||
simp e
|
||||
else if isOfNatNatLit e then
|
||||
-- Recall that we expand "orphan" kernel nat literals `n` into `ofNat n`
|
||||
return { expr := e }
|
||||
else
|
||||
congr e
|
||||
|
||||
|
|
@ -430,7 +442,7 @@ def simpLocalDecl (mvarId : MVarId) (fvarId : FVarId) (ctx : Simp.Context) (disc
|
|||
else
|
||||
return some (fvarId, mvarId)
|
||||
|
||||
abbrev FVarIdToLemmaId := NameMap Name
|
||||
abbrev FVarIdToLemmaId := FVarIdMap Name
|
||||
|
||||
def simpGoal (mvarId : MVarId) (ctx : Simp.Context) (discharge? : Option Simp.Discharge := none) (simplifyTarget : Bool := true) (fvarIdsToSimp : Array FVarId := #[]) (fvarIdToLemmaId : FVarIdToLemmaId := {}) : MetaM (Option (Array FVarId × MVarId)) := do
|
||||
withMVarContext mvarId do
|
||||
|
|
|
|||
66
stage0/src/Lean/Meta/Tactic/Simp/Rewrite.lean
generated
66
stage0/src/Lean/Meta/Tactic/Simp/Rewrite.lean
generated
|
|
@ -3,6 +3,7 @@ Copyright (c) 2020 Microsoft Corporation. All rights reserved.
|
|||
Released under Apache 2.0 license as described in the file LICENSE.
|
||||
Authors: Leonardo de Moura
|
||||
-/
|
||||
import Lean.Meta.AppBuilder
|
||||
import Lean.Meta.SynthInstance
|
||||
import Lean.Meta.Tactic.Simp.Types
|
||||
|
||||
|
|
@ -48,34 +49,57 @@ def tryLemma? (e : Expr) (lemma : SimpLemma) (discharge? : Expr → SimpM (Optio
|
|||
let (xs, bis, type) ← forallMetaTelescopeReducing type
|
||||
let type ← whnf (← instantiateMVars type)
|
||||
let lhs := type.appFn!.appArg!
|
||||
if (← isDefEq lhs e) then
|
||||
unless (← synthesizeArgs lemma.getName xs bis discharge?) do
|
||||
let rec go (e : Expr) : SimpM (Option Result) := do
|
||||
if (← isDefEq lhs e) then
|
||||
unless (← synthesizeArgs lemma.getName xs bis discharge?) do
|
||||
return none
|
||||
let proof ← instantiateMVars (mkAppN val xs)
|
||||
if ← hasAssignableMVar proof then
|
||||
trace[Meta.Tactic.simp.rewrite] "{lemma}, has unassigned metavariables after unification"
|
||||
return none
|
||||
let rhs ← instantiateMVars type.appArg!
|
||||
if e == rhs then
|
||||
return none
|
||||
if lemma.perm && !Expr.lt rhs e then
|
||||
trace[Meta.Tactic.simp.rewrite] "{lemma}, perm rejected {e} ==> {rhs}"
|
||||
return none
|
||||
trace[Meta.Tactic.simp.rewrite] "{lemma}, {e} ==> {rhs}"
|
||||
return some { expr := rhs, proof? := proof }
|
||||
else
|
||||
unless lhs.isMVar do
|
||||
-- We do not report unification failures when `lhs` is a metavariable
|
||||
-- Example: `x = ()`
|
||||
-- TODO: reconsider if we want lemmas such as `(x : Unit) → x = ()`
|
||||
trace[Meta.Tactic.simp.unify] "{lemma}, failed to unify {lhs} with {e}"
|
||||
return none
|
||||
let proof ← instantiateMVars (mkAppN val xs)
|
||||
if ← hasAssignableMVar proof then
|
||||
trace[Meta.Tactic.simp.rewrite] "{lemma}, has unassigned metavariables after unification"
|
||||
return none
|
||||
let rhs ← instantiateMVars type.appArg!
|
||||
if e == rhs then
|
||||
return none
|
||||
if lemma.perm && !Expr.lt rhs e then
|
||||
trace[Meta.Tactic.simp.rewrite] "{lemma}, perm rejected {e} ==> {rhs}"
|
||||
return none
|
||||
trace[Meta.Tactic.simp.rewrite] "{lemma}, {e} ==> {rhs}"
|
||||
return some { expr := rhs, proof? := proof }
|
||||
else
|
||||
unless lhs.isMVar do
|
||||
-- We do not report unification failures when `lhs` is a metavariable
|
||||
-- Example: `x = ()`
|
||||
-- TODO: reconsider if we want lemmas such as `(x : Unit) → x = ()`
|
||||
trace[Meta.Tactic.simp.unify] "{lemma}, failed to unify {lhs} with {e}"
|
||||
let lhsNumArgs := lhs.getAppNumArgs
|
||||
let eNumArgs := e.getAppNumArgs
|
||||
if eNumArgs == lhsNumArgs then
|
||||
go e
|
||||
else if eNumArgs < lhsNumArgs then
|
||||
return none
|
||||
else
|
||||
/- Check whether we need something more sophisticated here.
|
||||
This simple approach was good enough for Mathlib 3 -/
|
||||
let mut extraArgs := #[]
|
||||
let mut e := e
|
||||
for i in [:eNumArgs - lhsNumArgs] do
|
||||
extraArgs := extraArgs.push e.appArg!
|
||||
e := e.appFn!
|
||||
match (← go e) with
|
||||
| none => return none
|
||||
| some { expr := eNew, proof? := none } => return some { expr := mkAppN eNew extraArgs }
|
||||
| some { expr := eNew, proof? := some proof } =>
|
||||
let mut proof := proof
|
||||
for extraArg in extraArgs do
|
||||
proof ← mkCongrFun proof extraArg
|
||||
return some { expr := mkAppN eNew extraArgs, proof? := some proof }
|
||||
|
||||
/-
|
||||
Remark: the parameter tag is used for creating trace messages. It is irrelevant otherwise.
|
||||
-/
|
||||
def rewrite (e : Expr) (s : DiscrTree SimpLemma) (erased : Std.PHashSet Name) (discharge? : Expr → SimpM (Option Expr)) (tag : String) : SimpM Result := do
|
||||
let lemmas ← s.getMatch e
|
||||
let lemmas ← s.getMatch e (allowExtraArgs := true)
|
||||
if lemmas.isEmpty then
|
||||
trace[Debug.Meta.Tactic.simp] "no theorems found for {tag}-rewriting {e}"
|
||||
return { expr := e }
|
||||
|
|
|
|||
42
stage0/src/Lean/Meta/Tactic/Split.lean
generated
42
stage0/src/Lean/Meta/Tactic/Split.lean
generated
|
|
@ -21,26 +21,42 @@ private def getSimpMatchContext : MetaM Simp.Context :=
|
|||
config.decide := false
|
||||
}
|
||||
|
||||
private def simpMatchPre (matchDeclName : Name) (matchEqDeclName : Name) (e : Expr) : SimpM Simp.Step := do
|
||||
if e.isAppOf matchDeclName then
|
||||
def simpMatch (e : Expr) : MetaM Simp.Result := do
|
||||
Simp.main e (← getSimpMatchContext) (methods := { pre })
|
||||
where
|
||||
pre (e : Expr) : SimpM Simp.Step := do
|
||||
let some app ← matchMatcherApp? e | return Simp.Step.visit { expr := e }
|
||||
-- First try to reduce matcher
|
||||
match (← reduceRecMatcher? e) with
|
||||
| some e' => return Simp.Step.done { expr := e' }
|
||||
| none =>
|
||||
-- Try lemma
|
||||
match (← Simp.tryLemma? e { proof := mkConst matchEqDeclName, name? := matchEqDeclName } SplitIf.discharge?) with
|
||||
| none => return Simp.Step.visit { expr := e }
|
||||
| some r => return Simp.Step.done r
|
||||
else
|
||||
return Simp.Step.visit { expr := e }
|
||||
for matchEq in (← Match.getEquationsFor app.matcherName).eqnNames do
|
||||
-- Try lemma
|
||||
match (← Simp.tryLemma? e { proof := mkConst matchEq, name? := some matchEq } SplitIf.discharge?) with
|
||||
| none => pure ()
|
||||
| some r => return Simp.Step.done r
|
||||
return Simp.Step.visit { expr := e }
|
||||
|
||||
private def simpMatch (matchDeclName : Name) (matchEqDeclName : Name) (e : Expr) : MetaM Simp.Result := do
|
||||
Simp.main e (← getSimpMatchContext) (methods := { pre := simpMatchPre matchDeclName matchEqDeclName })
|
||||
private def simpMatchCore (matchDeclName : Name) (matchEqDeclName : Name) (e : Expr) : MetaM Simp.Result := do
|
||||
Simp.main e (← getSimpMatchContext) (methods := { pre })
|
||||
where
|
||||
pre (e : Expr) : SimpM Simp.Step := do
|
||||
if e.isAppOf matchDeclName then
|
||||
-- First try to reduce matcher
|
||||
match (← reduceRecMatcher? e) with
|
||||
| some e' => return Simp.Step.done { expr := e' }
|
||||
| none =>
|
||||
-- Try lemma
|
||||
match (← Simp.tryLemma? e { proof := mkConst matchEqDeclName, name? := matchEqDeclName } SplitIf.discharge?) with
|
||||
| none => return Simp.Step.visit { expr := e }
|
||||
| some r => return Simp.Step.done r
|
||||
else
|
||||
return Simp.Step.visit { expr := e }
|
||||
|
||||
private def simpMatchTarget (mvarId : MVarId) (matchDeclName : Name) (matchEqDeclName : Name) : MetaM MVarId := do
|
||||
private def simpMatchTargetCore (mvarId : MVarId) (matchDeclName : Name) (matchEqDeclName : Name) : MetaM MVarId := do
|
||||
withMVarContext mvarId do
|
||||
let target ← instantiateMVars (← getMVarType mvarId)
|
||||
let r ← simpMatch matchDeclName matchEqDeclName target
|
||||
let r ← simpMatchCore matchDeclName matchEqDeclName target
|
||||
match r.proof? with
|
||||
| some proof => replaceTargetEq mvarId r.expr proof
|
||||
| none => replaceTargetDefEq mvarId r.expr
|
||||
|
|
@ -78,7 +94,7 @@ def splitMatch (mvarId : MVarId) (e : Expr) : MetaM (List MVarId) := do
|
|||
let (_, mvarId) ← introN mvarId numParams
|
||||
let (_, mvarId) ← introNP mvarId numExtra
|
||||
trace[Meta.debug] "before simpMatch:\n{MessageData.ofGoal mvarId}"
|
||||
let mvarId ← simpMatchTarget mvarId app.matcherName matchEqns.eqnNames[i]
|
||||
let mvarId ← simpMatchTargetCore mvarId app.matcherName matchEqns.eqnNames[i]
|
||||
return (i+1, mvarId::mvarIds)
|
||||
return mvarIds.reverse
|
||||
|
||||
|
|
|
|||
4
stage0/src/Lean/Meta/Tactic/Subst.lean
generated
4
stage0/src/Lean/Meta/Tactic/Subst.lean
generated
|
|
@ -28,7 +28,7 @@ def substCore (mvarId : MVarId) (hFVarId : FVarId) (symm := false) (fvarSubst :
|
|||
match a with
|
||||
| Expr.fvar aFVarId _ => do
|
||||
let aFVarIdOriginal := aFVarId
|
||||
trace[Meta.Tactic.subst] "substituting {a} (id: {aFVarId}) with {b}"
|
||||
trace[Meta.Tactic.subst] "substituting {a} (id: {aFVarId.name}) with {b}"
|
||||
let mctx ← getMCtx
|
||||
if mctx.exprDependsOn b aFVarId then
|
||||
throwTacticEx `subst mvarId m!"'{a}' occurs at{indentExpr b}"
|
||||
|
|
@ -37,7 +37,7 @@ def substCore (mvarId : MVarId) (hFVarId : FVarId) (symm := false) (fvarSubst :
|
|||
trace[Meta.Tactic.subst] "after revert {MessageData.ofGoal mvarId}"
|
||||
let (twoVars, mvarId) ← introNP mvarId 2
|
||||
trace[Meta.Tactic.subst] "after intro2 {MessageData.ofGoal mvarId}"
|
||||
trace[Meta.Tactic.subst] "reverted variables {vars}"
|
||||
trace[Meta.Tactic.subst] "reverted variables {vars.map (·.name)}"
|
||||
let aFVarId := twoVars[0]
|
||||
let a := mkFVar aFVarId
|
||||
let hFVarId := twoVars[1]
|
||||
|
|
|
|||
6
stage0/src/Lean/Meta/Tactic/Util.lean
generated
6
stage0/src/Lean/Meta/Tactic/Util.lean
generated
|
|
@ -59,7 +59,7 @@ def headBetaMVarType (mvarId : MVarId) : MetaM Unit := do
|
|||
/-- Collect nondependent hypotheses that are propositions. -/
|
||||
def getNondepPropHyps (mvarId : MVarId) : MetaM (Array FVarId) :=
|
||||
withMVarContext mvarId do
|
||||
let mut candidates : NameHashSet := {}
|
||||
let mut candidates : FVarIdHashSet := {}
|
||||
for localDecl in (← getLCtx) do
|
||||
unless localDecl.isAuxDecl do
|
||||
candidates ← removeDeps localDecl.type candidates
|
||||
|
|
@ -78,9 +78,9 @@ def getNondepPropHyps (mvarId : MVarId) : MetaM (Array FVarId) :=
|
|||
result := result.push localDecl.fvarId
|
||||
return result
|
||||
where
|
||||
removeDeps (e : Expr) (candidates : NameHashSet) : MetaM NameHashSet := do
|
||||
removeDeps (e : Expr) (candidates : FVarIdHashSet) : MetaM FVarIdHashSet := do
|
||||
let e ← instantiateMVars e
|
||||
let visit : StateRefT NameHashSet MetaM NameHashSet := do
|
||||
let visit : StateRefT FVarIdHashSet MetaM FVarIdHashSet := do
|
||||
e.forEach fun
|
||||
| Expr.fvar fvarId _ => modify fun s => s.erase fvarId
|
||||
| _ => pure ()
|
||||
|
|
|
|||
2
stage0/src/Lean/MetavarContext.lean
generated
2
stage0/src/Lean/MetavarContext.lean
generated
|
|
@ -906,7 +906,7 @@ mutual
|
|||
let newLocalInsts := mvarDecl.localInstances.filter fun inst => toRevert.all fun x => inst.fvar != x
|
||||
-- Remark: we must reset the before processing `mkAuxMVarType` because `toRevert` may not be equal to `xs`
|
||||
let newMVarType ← withFreshCache do mkAuxMVarType mvarLCtx toRevert newMVarKind mvarDecl.type
|
||||
let newMVarId := (← get).ngen.curr
|
||||
let newMVarId := { name := (← get).ngen.curr }
|
||||
let newMVar := mkMVar newMVarId
|
||||
let result := mkMVarApp mvarLCtx newMVar toRevert newMVarKind
|
||||
let numScopeArgs := mvarDecl.numScopeArgs + result.getAppNumArgs
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ try
|
|||
maybeAddBlockImplicit (mkIdent l.userName)
|
||||
catch _ =>
|
||||
-- loose free variable, use internal name
|
||||
maybeAddBlockImplicit $ mkIdent id
|
||||
maybeAddBlockImplicit $ mkIdent id.name
|
||||
|
||||
-- loose bound variable, use pseudo syntax
|
||||
@[builtinDelab bvar]
|
||||
|
|
@ -43,7 +43,7 @@ def delabMVar : Delab := do
|
|||
let mvarDecl ← getMVarDecl n
|
||||
let n :=
|
||||
match mvarDecl.userName with
|
||||
| Name.anonymous => n.replacePrefix `_uniq `m
|
||||
| Name.anonymous => n.name.replacePrefix `_uniq `m
|
||||
| n => n
|
||||
`(?$(mkIdent n))
|
||||
|
||||
|
|
|
|||
15
stage0/src/Lean/Server/FileWorker.lean
generated
15
stage0/src/Lean/Server/FileWorker.lean
generated
|
|
@ -154,8 +154,7 @@ section Initialization
|
|||
else
|
||||
throwServerError s!"`leanpkg print-paths` failed:\n{stdout}\nstderr:\n{stderr}"
|
||||
|
||||
def compileHeader (m : DocumentMeta) (hOut : FS.Stream) : IO (Snapshot × SearchPath) := do
|
||||
let opts := {} -- TODO
|
||||
def compileHeader (m : DocumentMeta) (hOut : FS.Stream) (opts : Options) : IO (Snapshot × SearchPath) := do
|
||||
let inputCtx := Parser.mkInputContext m.text.source "<input>"
|
||||
let (headerStx, headerParserState, msgLog) ← Parser.parseHeader inputCtx
|
||||
let leanpkgPath ← match (← IO.getEnv "LEAN_SYSROOT") with
|
||||
|
|
@ -186,9 +185,9 @@ section Initialization
|
|||
publishDiagnostics m headerSnap.diagnostics.toArray hOut
|
||||
return (headerSnap, srcSearchPath)
|
||||
|
||||
def initializeWorker (meta : DocumentMeta) (i o e : FS.Stream)
|
||||
def initializeWorker (meta : DocumentMeta) (i o e : FS.Stream) (opts : Options)
|
||||
: IO (WorkerContext × WorkerState) := do
|
||||
let (headerSnap, srcSearchPath) ← compileHeader meta o
|
||||
let (headerSnap, srcSearchPath) ← compileHeader meta o opts
|
||||
let cancelTk ← CancelToken.new
|
||||
let ctx :=
|
||||
{ hIn := i
|
||||
|
|
@ -404,7 +403,7 @@ section MainLoop
|
|||
| _ => throwServerError "Got invalid JSON-RPC message"
|
||||
end MainLoop
|
||||
|
||||
def initAndRunWorker (i o e : FS.Stream) : IO UInt32 := do
|
||||
def initAndRunWorker (i o e : FS.Stream) (opts : Options) : IO UInt32 := do
|
||||
let i ← maybeTee "fwIn.txt" false i
|
||||
let o ← maybeTee "fwOut.txt" true o
|
||||
let _ ← i.readLspRequestAs "initialize" InitializeParams
|
||||
|
|
@ -419,7 +418,7 @@ def initAndRunWorker (i o e : FS.Stream) : IO UInt32 := do
|
|||
let e ← e.withPrefix s!"[{param.textDocument.uri}] "
|
||||
let _ ← IO.setStderr e
|
||||
try
|
||||
let (ctx, st) ← initializeWorker meta i o e
|
||||
let (ctx, st) ← initializeWorker meta i o e opts
|
||||
let _ ← StateRefT'.run (s := st) <| ReaderT.run (r := ctx) mainLoop
|
||||
return (0 : UInt32)
|
||||
catch e =>
|
||||
|
|
@ -428,14 +427,14 @@ def initAndRunWorker (i o e : FS.Stream) : IO UInt32 := do
|
|||
return (1 : UInt32)
|
||||
|
||||
@[export lean_server_worker_main]
|
||||
def workerMain : IO UInt32 := do
|
||||
def workerMain (opts : Options) : IO UInt32 := do
|
||||
let i ← IO.getStdin
|
||||
let o ← IO.getStdout
|
||||
let e ← IO.getStderr
|
||||
try
|
||||
let seed ← (UInt64.toNat ∘ ByteArray.toUInt64LE!) <$> IO.getRandomBytes 8
|
||||
IO.setRandSeed seed
|
||||
let exitCode ← initAndRunWorker i o e
|
||||
let exitCode ← initAndRunWorker i o e opts
|
||||
-- HACK: all `Task`s are currently "foreground", i.e. we join on them on main thread exit, but we definitely don't
|
||||
-- want to do that in the case of the worker processes, which can produce non-terminating tasks evaluating user code
|
||||
o.flush
|
||||
|
|
|
|||
2
stage0/src/Lean/Util/CollectFVars.lean
generated
2
stage0/src/Lean/Util/CollectFVars.lean
generated
|
|
@ -9,7 +9,7 @@ namespace Lean.CollectFVars
|
|||
|
||||
structure State where
|
||||
visitedExpr : ExprSet := {}
|
||||
fvarSet : NameSet := {}
|
||||
fvarSet : FVarIdSet := {}
|
||||
deriving Inhabited
|
||||
|
||||
abbrev Visitor := State → State
|
||||
|
|
|
|||
2
stage0/src/Lean/Widget/InteractiveGoal.lean
generated
2
stage0/src/Lean/Widget/InteractiveGoal.lean
generated
|
|
@ -68,7 +68,7 @@ open Meta in
|
|||
/-- A variant of `Meta.ppGoal` which preserves subexpression information for interactivity. -/
|
||||
def goalToInteractive (mvarId : MVarId) : MetaM InteractiveGoal := do
|
||||
let some mvarDecl ← (← getMCtx).findDecl? mvarId
|
||||
| throwError "unknown goal {mvarId}"
|
||||
| throwError "unknown goal {mvarId.name}"
|
||||
let ppAuxDecls := pp.auxDecls.get (← getOptions)
|
||||
let lctx := mvarDecl.lctx
|
||||
let lctx := lctx.sanitizeNames.run' { options := (← getOptions) }
|
||||
|
|
|
|||
41
stage0/src/bin/leanc.in
generated
41
stage0/src/bin/leanc.in
generated
|
|
@ -1,10 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
# Lean compiler
|
||||
#
|
||||
# A simple wrapper around a C++ compiler. Defaults to the compiler Lean was built with,
|
||||
# which can be overridden with the environment variable `LEAN_CXX`. All parameters are passed
|
||||
# as-is to the wrapped compiler. Note that we use a C++ compiler purely for linking against
|
||||
# the C++ standard library Lean depends on, all input files are treated as C code.
|
||||
# A simple wrapper around a C compiler. Defaults to `@LEANC_CC@`,
|
||||
# which can be overridden with the environment variable `LEAN_CC`. All parameters are passed
|
||||
# as-is to the wrapped compiler.
|
||||
#
|
||||
# Interesting options:
|
||||
# * `-U LEAN_MULTI_THREAD` can be used to optimize programs not making use of multi-threading
|
||||
|
|
@ -21,16 +20,30 @@ ldflags=("-L$bindir/../lib/lean" "${LEANC_GMP:--lgmp}" @LEAN_EXTRA_LINKER_FLAGS@
|
|||
ldflags_ext=(@LEANC_STATIC_LINKER_FLAGS@)
|
||||
args=("$@")
|
||||
for arg in "$@"; do
|
||||
# passed -shared ~> switch to shared linker flags
|
||||
[[ $arg == "-shared" ]] && ldflags_ext=(@LEANC_SHARED_LINKER_FLAGS@) && args=("-x" "c" "$@" "-x" "none")
|
||||
# linking against libleanshared explicitly (or linking libleanshared itself) ~> do not link against static stdlib
|
||||
[[ $arg == "-lleanshared" || $arg == *libleanshared.* ]] && ldflags_ext=()
|
||||
# Note the `-x c` for treating all input as C code
|
||||
[[ $arg == "-c" ]] && ldflags=() && ldflags_ext=() && args=("-x" "c" "$@" "-x" "none")
|
||||
[[ $arg == "--print-cflags" ]] && echo "${cflags[@]}" && exit
|
||||
[[ $arg == "--print-ldflags" ]] && echo "${cflags[@]} ${ldflags_ext[@]} ${ldflags[@]}" && exit
|
||||
case $arg in
|
||||
-shared)
|
||||
# switch to shared linker flags
|
||||
ldflags_ext=(@LEANC_SHARED_LINKER_FLAGS@)
|
||||
;;
|
||||
-lleanshared | *libleanshared.*)
|
||||
# linking against libleanshared explicitly (or linking libleanshared itself) ~> do not link against static stdlib
|
||||
ldflags_ext=()
|
||||
;;
|
||||
-c)
|
||||
ldflags=()
|
||||
ldflags_ext=()
|
||||
;;
|
||||
--print-cflags)
|
||||
echo "${cflags[@]}"
|
||||
exit
|
||||
;;
|
||||
--print-ldflags)
|
||||
echo "${cflags[@]} ${ldflags_ext[@]} ${ldflags[@]}"
|
||||
exit
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
[ -n "$LEAN_CXX" ] || LEAN_CXX=c++
|
||||
[ -n "$LEAN_CC" ] || LEAN_CC="@LEANC_CC@"
|
||||
|
||||
$LEAN_CXX "${cflags[@]}" "${args[@]}" "${ldflags_ext[@]}" "${ldflags[@]}" -Wno-unused-command-line-argument
|
||||
$LEAN_CC "${cflags[@]}" "${args[@]}" "${ldflags_ext[@]}" "${ldflags[@]}" -Wno-unused-command-line-argument
|
||||
|
|
|
|||
6
stage0/src/runtime/object.cpp
generated
6
stage0/src/runtime/object.cpp
generated
|
|
@ -57,6 +57,12 @@ extern "C" object * lean_panic_fn(object * default_val, object * msg) {
|
|||
if (g_panic_messages) {
|
||||
std::cerr << lean_string_cstr(msg) << "\n";
|
||||
}
|
||||
#ifndef LEAN_EMSCRIPTEN
|
||||
if (std::getenv("LEAN_ABORT_ON_PANIC")) {
|
||||
int * v = nullptr;
|
||||
*v = 0;
|
||||
}
|
||||
#endif
|
||||
if (g_exit_on_panic) {
|
||||
std::exit(1);
|
||||
}
|
||||
|
|
|
|||
11
stage0/src/shell/CMakeLists.txt
generated
11
stage0/src/shell/CMakeLists.txt
generated
|
|
@ -21,14 +21,11 @@ if(LLVM)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE)
|
||||
add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/bin/lean${CMAKE_EXECUTABLE_SUFFIX}
|
||||
COMMAND sh -c "LEAN_CXX='${CMAKE_CXX_COMPILER_LAUNCHER} ${CMAKE_CXX_COMPILER}' ${CMAKE_BINARY_DIR}/bin/leanc $<TARGET_OBJECTS:shell> -lleanshared ${CMAKE_EXE_LINKER_FLAGS} ${LEAN_EXE_LINKER_FLAGS} ${CMAKE_CXX_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} -o ${CMAKE_BINARY_DIR}/bin/lean${CMAKE_EXECUTABLE_SUFFIX}"
|
||||
VERBATIM
|
||||
DEPENDS leanshared shell $<IF:$<BOOL:${LLVM}>,runtime_bc,>)
|
||||
|
||||
add_custom_target(lean ALL
|
||||
DEPENDS ${CMAKE_BINARY_DIR}/bin/lean${CMAKE_EXECUTABLE_SUFFIX})
|
||||
WORKING_DIRECTORY ${LEAN_SOURCE_DIR}
|
||||
DEPENDS leanshared shell
|
||||
COMMAND $(MAKE) -f ${CMAKE_BINARY_DIR}/stdlib.make lean LEAN_SHELL=$<TARGET_OBJECTS:shell>
|
||||
VERBATIM)
|
||||
|
||||
# use executable of current stage for tests
|
||||
string(REGEX REPLACE "^([a-zA-Z]):" "/\\1" LEAN_BIN "${CMAKE_BINARY_DIR}/bin")
|
||||
|
|
|
|||
10
stage0/src/shell/lean.cpp
generated
10
stage0/src/shell/lean.cpp
generated
|
|
@ -325,10 +325,10 @@ pair_ref<environment, object_ref> run_new_frontend(std::string const & input, op
|
|||
lean_run_frontend(mk_string(input), opts.to_obj_arg(), mk_string(file_name), main_module_name.to_obj_arg(), io_mk_world()));
|
||||
}
|
||||
|
||||
/* def workerMain : IO UInt32 */
|
||||
extern "C" object* lean_server_worker_main(object* w);
|
||||
uint32_t run_server_worker() {
|
||||
return get_io_scalar_result<uint32_t>(lean_server_worker_main(io_mk_world()));
|
||||
/* def workerMain : Options → IO UInt32 */
|
||||
extern "C" object * lean_server_worker_main(object * opts, object * w);
|
||||
uint32_t run_server_worker(options const & opts) {
|
||||
return get_io_scalar_result<uint32_t>(lean_server_worker_main(opts.to_obj_arg(), io_mk_world()));
|
||||
}
|
||||
|
||||
/* def watchdogMain (args : List String) : IO Uint32 */
|
||||
|
|
@ -580,7 +580,7 @@ int main(int argc, char ** argv) {
|
|||
if (run_server == 1)
|
||||
return run_server_watchdog(forwarded_args);
|
||||
else if (run_server == 2)
|
||||
return run_server_worker();
|
||||
return run_server_worker(opts);
|
||||
|
||||
if (use_stdin) {
|
||||
if (argc - optind != 0) {
|
||||
|
|
|
|||
30
stage0/src/stdlib.make.in
generated
30
stage0/src/stdlib.make.in
generated
|
|
@ -2,6 +2,8 @@ SHELL := /usr/bin/env bash -euo pipefail
|
|||
|
||||
# any absolute path to the stdlib breaks the Makefile
|
||||
export LEAN_PATH=
|
||||
export LEAN_CC=${CMAKE_C_COMPILER_LAUNCHER} ${CMAKE_C_COMPILER}
|
||||
export LEANC_GMP=${GMP_LIBRARIES}
|
||||
|
||||
# LEAN_OPTS: don't use native code (except for primitives) since it is from the previous stage
|
||||
# MORE_DEPS: rebuild the stdlib whenever the compiler has changed
|
||||
|
|
@ -13,13 +15,15 @@ LEANMAKE_OPTS=\
|
|||
BIN_OUT="${CMAKE_BINARY_DIR}/bin"\
|
||||
LEAN_OPTS+="${LEAN_EXTRA_MAKE_OPTS}"\
|
||||
LEANC_OPTS+="${LEANC_OPTS}"\
|
||||
LEAN_CXX="${CMAKE_CXX_COMPILER_LAUNCHER} ${CMAKE_CXX_COMPILER}"\
|
||||
LEAN_AR="${CMAKE_AR}"\
|
||||
MORE_DEPS+="${PREV_STAGE}/bin/lean${CMAKE_EXECUTABLE_SUFFIX}"\
|
||||
CMAKE_LIKE_OUTPUT=1\
|
||||
$(MORE_LEANMAKE_OPTS)
|
||||
CMAKE_LIKE_OUTPUT=1
|
||||
|
||||
.PHONY: Init Std Lean leanshared Leanpkg
|
||||
ifeq "${STAGE}" "0"
|
||||
LEANMAKE_OPTS+=C_ONLY=1 C_OUT=../stdlib/
|
||||
endif
|
||||
|
||||
.PHONY: Init Std Lean leanshared Leanpkg lean
|
||||
|
||||
# These can be phony since the inner Makefile will have the correct dependencies and avoid rebuilds
|
||||
Init:
|
||||
|
|
@ -32,14 +36,20 @@ Std: Init
|
|||
Lean: Init Std
|
||||
+"${LEAN_BIN}/leanmake" lib PKG=Lean $(LEANMAKE_OPTS)
|
||||
|
||||
# This target will always be remade, but then not trigger further builds downstream if the .a file did not change
|
||||
${LIB}/lean/libLean.a: Lean
|
||||
# the following targets are all invoked by separate `make` calls; see src/CMakeLists.txt
|
||||
|
||||
${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libleanshared${CMAKE_SHARED_LIBRARY_SUFFIX}: ${LIB}/lean/libLean.a ${LIB}/lean/libleancpp.a ${CMAKE_BINARY_DIR}/runtime/libleanrt_initial-exec.a
|
||||
# we specify the precise file names here to avoid rebuilds
|
||||
${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libleanshared${CMAKE_SHARED_LIBRARY_SUFFIX}: ${LIB}/lean/libInit.a ${LIB}/lean/libStd.a ${LIB}/lean/libLean.a ${LIB}/lean/libleancpp.a ${CMAKE_BINARY_DIR}/runtime/libleanrt_initial-exec.a
|
||||
@echo "[ ] Building $@"
|
||||
"${LEAN_BIN}/leanc" -x none -shared -o $@ ${LEANSHARED_LINKER_FLAGS} ${LEANC_OPTS}
|
||||
"${LEAN_BIN}/leanc" -shared -o $@ ${LEANSHARED_LINKER_FLAGS} ${LEANC_OPTS}
|
||||
|
||||
leanshared: ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libleanshared${CMAKE_SHARED_LIBRARY_SUFFIX}
|
||||
|
||||
Leanpkg: Init Std Lean leanshared
|
||||
+"${LEAN_BIN}/leanmake" bin PKG=Leanpkg BIN_NAME=leanpkg${CMAKE_EXECUTABLE_SUFFIX} $(LEANMAKE_OPTS) LINK_OPTS='-lleanshared ${CMAKE_EXE_LINKER_FLAGS_MAKE}'
|
||||
Leanpkg:
|
||||
+"${LEAN_BIN}/leanmake" bin PKG=Leanpkg BIN_NAME=leanpkg${CMAKE_EXECUTABLE_SUFFIX} $(LEANMAKE_OPTS) LINK_OPTS='-lleanshared ${CMAKE_EXE_LINKER_FLAGS_MAKE_MAKE}'
|
||||
|
||||
${CMAKE_BINARY_DIR}/bin/lean${CMAKE_EXECUTABLE_SUFFIX}: ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libleanshared${CMAKE_SHARED_LIBRARY_SUFFIX} $(LEAN_SHELL)
|
||||
@echo "[ ] Building $@"
|
||||
${LEAN_BIN}/leanc $(LEAN_SHELL) -lleanshared ${CMAKE_EXE_LINKER_FLAGS_MAKE} ${LEAN_EXE_LINKER_FLAGS} -o $@
|
||||
|
||||
lean: ${CMAKE_BINARY_DIR}/bin/lean${CMAKE_EXECUTABLE_SUFFIX}
|
||||
|
|
|
|||
732
stage0/stdlib/Init/Conv.c
generated
732
stage0/stdlib/Init/Conv.c
generated
File diff suppressed because it is too large
Load diff
1167
stage0/stdlib/Init/Notation.c
generated
1167
stage0/stdlib/Init/Notation.c
generated
File diff suppressed because it is too large
Load diff
176
stage0/stdlib/Lean/Class.c
generated
176
stage0/stdlib/Lean/Class.c
generated
|
|
@ -14,14 +14,13 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
lean_object* l_List_reverse___rarg(lean_object*);
|
||||
lean_object* l_Lean_initFn____x40_Lean_Class___hyg_673____lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Std_AssocList_find_x3f___at_Lean_hasOutParams___spec__3___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_addMessageContextPartial___at_Lean_Core_instAddMessageContextCoreM___spec__1(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
size_t l_USize_add(size_t, size_t);
|
||||
lean_object* l_Lean_initFn____x40_Lean_Class___hyg_673____lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
uint8_t lean_is_out_param(lean_object*);
|
||||
lean_object* l_Lean_registerSimplePersistentEnvExtension___at_Lean_initFn____x40_Lean_Class___hyg_68____spec__4___lambda__2(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Class_0__Lean_consumeNLambdas_match__1(lean_object*);
|
||||
static lean_object* l_Lean_initFn____x40_Lean_Class___hyg_675____closed__3;
|
||||
lean_object* l_Lean_stringToMessageData(lean_object*);
|
||||
lean_object* lean_mk_empty_array_with_capacity(lean_object*);
|
||||
lean_object* l_Array_foldlMUnsafe_fold___at_Lean_initFn____x40_Lean_Class___hyg_68____spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -38,8 +37,8 @@ lean_object* l_Array_foldlMUnsafe_fold___at_Lean_initFn____x40_Lean_Class___hyg_
|
|||
static lean_object* l_Lean_addClass___closed__4;
|
||||
lean_object* l_Lean_ClassState_addEntry(lean_object*, lean_object*);
|
||||
uint8_t l_Lean_Name_quickLt(lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_initFn____x40_Lean_Class___hyg_673____closed__6;
|
||||
static lean_object* l_Lean_isOutParam___closed__2;
|
||||
static lean_object* l_Lean_initFn____x40_Lean_Class___hyg_675____lambda__3___closed__2;
|
||||
lean_object* l_Lean_instInhabitedClassState;
|
||||
lean_object* l_Lean_classExtension;
|
||||
lean_object* l_Lean_EnvExtensionInterfaceUnsafe_registerExt___rarg(lean_object*, lean_object*);
|
||||
|
|
@ -49,20 +48,18 @@ lean_object* l_Std_HashMapImp_find_x3f___at_Lean_hasOutParams___spec__2(lean_obj
|
|||
static lean_object* l___private_Lean_Class_0__Lean_checkOutParam___closed__3;
|
||||
lean_object* lean_st_ref_get(lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_instHashableName;
|
||||
static lean_object* l_Lean_initFn____x40_Lean_Class___hyg_673____closed__3;
|
||||
lean_object* l_Lean_ofExcept___at_Lean_initFn____x40_Lean_Class___hyg_675____spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_getClassName_match__2(lean_object*);
|
||||
uint8_t lean_name_eq(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_registerSimplePersistentEnvExtension___at_Lean_initFn____x40_Lean_Class___hyg_68____spec__4(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_initFn____x40_Lean_Class___hyg_673____lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
uint8_t l_Lean_ClassEntry_lt(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_SMap_switch___at_Lean_ClassState_switch___spec__1(lean_object*);
|
||||
static lean_object* l_Lean_initFn____x40_Lean_Class___hyg_673____lambda__2___closed__1;
|
||||
static lean_object* l___private_Lean_Class_0__Lean_checkOutParam___closed__1;
|
||||
lean_object* l_Std_AssocList_find_x3f___at_Lean_hasOutParams___spec__3(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_initFn____x40_Lean_Class___hyg_675____lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* lean_expr_instantiate1(lean_object*, lean_object*);
|
||||
lean_object* lean_array_push(lean_object*, lean_object*);
|
||||
lean_object* lean_array_get_size(lean_object*);
|
||||
static lean_object* l_Lean_initFn____x40_Lean_Class___hyg_673____lambda__2___closed__2;
|
||||
lean_object* l_Lean_getClassName_match__1___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_isOutParam___boxed(lean_object*);
|
||||
lean_object* lean_string_append(lean_object*, lean_object*);
|
||||
|
|
@ -71,6 +68,8 @@ static lean_object* l_Lean_isOutParam___closed__1;
|
|||
lean_object* l_Lean_throwError___at_Lean_registerTagAttribute___spec__5(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Class_0__Lean_consumeNLambdas(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_setEnv___at_Lean_registerTagAttribute___spec__4(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_initFn____x40_Lean_Class___hyg_675____closed__6;
|
||||
static lean_object* l_Lean_initFn____x40_Lean_Class___hyg_675____lambda__2___closed__1;
|
||||
size_t l_USize_shiftRight(size_t, size_t);
|
||||
lean_object* l_Lean_getClassName_match__3___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Std_AssocList_contains___at_Lean_isClass___spec__6___boxed(lean_object*, lean_object*);
|
||||
|
|
@ -80,7 +79,6 @@ lean_object* l_Lean_classExtension___elambda__2(lean_object*);
|
|||
lean_object* l_Lean_registerSimplePersistentEnvExtension___at_Lean_initFn____x40_Lean_Class___hyg_68____spec__4___lambda__3(lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_initFn____x40_Lean_Class___hyg_68____closed__4;
|
||||
lean_object* l_Lean_classExtension___elambda__1___boxed(lean_object*);
|
||||
static lean_object* l_Lean_initFn____x40_Lean_Class___hyg_673____closed__5;
|
||||
lean_object* lean_nat_add(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_ClassEntry_lt___boxed(lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_EnvExtensionInterfaceUnsafe_getState___at_Lean_isClass___spec__3___closed__5;
|
||||
|
|
@ -89,6 +87,7 @@ lean_object* l_Std_mkHashMap___at_Lean_ClassState_hasOutParam___default___spec__
|
|||
extern lean_object* l___private_Lean_Environment_0__Lean_EnvExtensionInterfaceUnsafe_invalidExtMsg;
|
||||
size_t l_UInt64_toUSize(uint64_t);
|
||||
lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___at_Lean_initFn____x40_Lean_Class___hyg_68____spec__5(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_initFn____x40_Lean_Class___hyg_675____lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Std_HashMap_insert___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Class_0__Lean_consumeNLambdas_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Array_anyMUnsafe_any___at_Lean_initFn____x40_Lean_Class___hyg_68____spec__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -98,7 +97,6 @@ uint8_t lean_nat_dec_eq(lean_object*, lean_object*);
|
|||
uint8_t l___private_Lean_Attributes_0__Lean_beqAttributeKind____x40_Lean_Attributes___hyg_139_(uint8_t, uint8_t);
|
||||
lean_object* l_Std_mkHashMap___at_Lean_ClassState_hasOutParam___default___spec__2___boxed(lean_object*);
|
||||
static lean_object* l_Lean_classExtension___closed__2;
|
||||
static lean_object* l_Lean_initFn____x40_Lean_Class___hyg_673____closed__7;
|
||||
lean_object* lean_st_ref_take(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_SMap_insert___at_Lean_ClassState_addEntry___spec__1(lean_object*, lean_object*, uint8_t);
|
||||
lean_object* l_EStateM_bind___rarg(lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -106,8 +104,10 @@ lean_object* l___private_Lean_Class_0__Lean_checkOutParam(lean_object*, lean_obj
|
|||
lean_object* l_Lean_getClassName_match__2___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* lean_nat_sub(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_mkStateFromImportedEntries___at_Lean_initFn____x40_Lean_Class___hyg_68____spec__1(lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_initFn____x40_Lean_Class___hyg_673____lambda__3___closed__1;
|
||||
lean_object* l_Lean_throwError___at_Lean_initFn____x40_Lean_Class___hyg_675____spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_throwError___at_Lean_initFn____x40_Lean_Class___hyg_675____spec__2(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Array_foldlMUnsafe_fold___at_Lean_initFn____x40_Lean_Class___hyg_68____spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_initFn____x40_Lean_Class___hyg_675____closed__5;
|
||||
static lean_object* l_Lean_SMap_empty___at_Lean_ClassState_hasOutParam___default___spec__1___closed__3;
|
||||
lean_object* l_Lean_Name_toString(lean_object*, uint8_t);
|
||||
static lean_object* l_Lean_EnvExtensionInterfaceUnsafe_getState___at_Lean_isClass___spec__3___closed__4;
|
||||
|
|
@ -115,19 +115,19 @@ lean_object* lean_array_get(lean_object*, lean_object*, lean_object*);
|
|||
lean_object* l_Std_mkHashMapImp___rarg(lean_object*);
|
||||
static lean_object* l_Lean_EnvExtensionInterfaceUnsafe_getState___at_Lean_isClass___spec__3___closed__2;
|
||||
lean_object* l_Lean_hasOutParams_match__1(lean_object*);
|
||||
static lean_object* l_Lean_initFn____x40_Lean_Class___hyg_673____lambda__3___closed__2;
|
||||
lean_object* l_Lean_isClass___boxed(lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_initFn____x40_Lean_Class___hyg_675____lambda__2___closed__2;
|
||||
static lean_object* l_Lean_classExtension___closed__5;
|
||||
lean_object* l_Lean_SimplePersistentEnvExtension_getState___at_Lean_isClass___spec__1___boxed(lean_object*, lean_object*);
|
||||
uint64_t l_Lean_Name_hash(lean_object*);
|
||||
lean_object* l_Nat_repr(lean_object*);
|
||||
lean_object* l_Lean_EnvExtensionInterfaceUnsafe_getState___at_Lean_isClass___spec__3___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_initFn____x40_Lean_Class___hyg_673____lambda__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
uint8_t l_Array_anyMUnsafe_any___at_Lean_initFn____x40_Lean_Class___hyg_68____spec__6(lean_object*, lean_object*, size_t, size_t);
|
||||
static lean_object* l_Lean_EnvExtensionInterfaceUnsafe_getState___at_Lean_isClass___spec__3___closed__1;
|
||||
static lean_object* l_Lean_EnvExtensionInterfaceUnsafe_getState___at_Lean_isClass___spec__3___closed__3;
|
||||
static lean_object* l_Lean_initFn____x40_Lean_Class___hyg_675____closed__7;
|
||||
lean_object* l_Lean_ofExcept___at_Lean_initFn____x40_Lean_Class___hyg_675____spec__1(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_SimplePersistentEnvExtension_getState___at_Lean_isClass___spec__1(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_ofExcept___at_Lean_initFn____x40_Lean_Class___hyg_673____spec__1(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l___private_Lean_Class_0__Lean_checkOutParam___closed__2;
|
||||
lean_object* l_Std_PersistentHashMap_mkEmptyEntriesArray(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_addClass(lean_object*, lean_object*);
|
||||
|
|
@ -135,7 +135,6 @@ uint8_t l_Lean_Expr_hasAnyFVar_visit___at___private_Lean_Class_0__Lean_checkOutP
|
|||
static lean_object* l_Lean_SMap_empty___at_Lean_ClassState_hasOutParam___default___spec__1___closed__5;
|
||||
uint8_t l_Std_PersistentHashMap_containsAux___at_Lean_isClass___spec__8(lean_object*, size_t, lean_object*);
|
||||
size_t l_USize_shiftLeft(size_t, size_t);
|
||||
lean_object* l_Lean_throwError___at_Lean_initFn____x40_Lean_Class___hyg_673____spec__2(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Std_PersistentHashMap_containsAtAux___at_Lean_isClass___spec__9___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_classExtension___elambda__4___boxed(lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_persistentEnvExtensionsRef;
|
||||
|
|
@ -148,6 +147,7 @@ lean_object* l_Lean_registerBuiltinAttribute(lean_object*, lean_object*);
|
|||
lean_object* l___private_Init_Util_0__mkPanicMessageWithDecl(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_throwError___at_Lean_AttributeImpl_erase___default___spec__1(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
uint8_t l_Std_HashMapImp_contains___at_Lean_isClass___spec__5(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_initFn____x40_Lean_Class___hyg_675____lambda__3(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static size_t l_Std_PersistentHashMap_containsAux___at_Lean_isClass___spec__8___closed__1;
|
||||
lean_object* l_Std_PersistentHashMap_insert___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static size_t l_Std_PersistentHashMap_containsAux___at_Lean_isClass___spec__8___closed__2;
|
||||
|
|
@ -172,7 +172,6 @@ lean_object* l_Lean_EnvExtensionInterfaceUnsafe_instInhabitedExt___lambda__1(lea
|
|||
static lean_object* l_Lean_initFn____x40_Lean_Class___hyg_68____closed__5;
|
||||
lean_object* l_Array_foldlMUnsafe_fold___at_Lean_initFn____x40_Lean_Class___hyg_68____spec__2(lean_object*, size_t, size_t, lean_object*);
|
||||
static lean_object* l_Lean_classExtension___elambda__4___rarg___closed__2;
|
||||
lean_object* l_Lean_initFn____x40_Lean_Class___hyg_673____lambda__3(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Expr_getAppNumArgsAux(lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_instInhabitedClassState___closed__1;
|
||||
lean_object* l_Array_anyMUnsafe_any___at___private_Lean_Class_0__Lean_checkOutParam___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -181,17 +180,17 @@ static lean_object* l_Lean_classExtension___closed__4;
|
|||
lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___at_Lean_initFn____x40_Lean_Class___hyg_68____spec__5___lambda__2(lean_object*, lean_object*, lean_object*);
|
||||
uint8_t lean_nat_dec_le(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_classExtension___elambda__4___rarg(lean_object*);
|
||||
lean_object* l_Lean_initFn____x40_Lean_Class___hyg_673_(lean_object*);
|
||||
lean_object* l_Lean_initFn____x40_Lean_Class___hyg_675_(lean_object*);
|
||||
lean_object* l_Lean_initFn____x40_Lean_Class___hyg_68_(lean_object*);
|
||||
static lean_object* l_Lean_instInhabitedClassState___closed__2;
|
||||
lean_object* lean_panic_fn(lean_object*, lean_object*);
|
||||
static uint32_t l_Lean_classExtension___elambda__4___rarg___closed__1;
|
||||
static lean_object* l_Lean_initFn____x40_Lean_Class___hyg_68____closed__3;
|
||||
lean_object* l_Lean_getClassName_match__1(lean_object*);
|
||||
lean_object* l_Lean_initFn____x40_Lean_Class___hyg_675____lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
uint8_t l_Lean_SMap_contains___at_Lean_isClass___spec__4(lean_object*, lean_object*);
|
||||
uint8_t l_Array_contains___at___private_Lean_Class_0__Lean_checkOutParam___spec__1(lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_SMap_empty___at_Lean_ClassState_hasOutParam___default___spec__1___closed__4;
|
||||
static lean_object* l_Lean_initFn____x40_Lean_Class___hyg_673____closed__4;
|
||||
lean_object* l_Lean_classExtension___elambda__2___boxed(lean_object*);
|
||||
lean_object* lean_st_ref_set(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_instInhabitedPersistentEnvExtensionState___rarg(lean_object*);
|
||||
|
|
@ -201,11 +200,14 @@ lean_object* l_Lean_SMap_empty___at_Lean_ClassState_hasOutParam___default___spec
|
|||
lean_object* lean_name_mk_numeral(lean_object*, lean_object*);
|
||||
uint8_t l_Std_PersistentHashMap_containsAtAux___at_Lean_isClass___spec__9(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___at_Lean_initFn____x40_Lean_Class___hyg_68____spec__5___closed__2;
|
||||
static lean_object* l_Lean_initFn____x40_Lean_Class___hyg_675____closed__2;
|
||||
lean_object* l_Std_PersistentHashMap_contains___at_Lean_isClass___spec__7___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_ClassState_hasOutParam___default;
|
||||
lean_object* l_Lean_SMap_insert___at_Lean_ClassState_addEntry___spec__1___boxed(lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_initFn____x40_Lean_Class___hyg_675____closed__4;
|
||||
static lean_object* l_Lean_initFn____x40_Lean_Class___hyg_68____closed__1;
|
||||
lean_object* l_Lean_initFn____x40_Lean_Class___hyg_673____lambda__2(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_initFn____x40_Lean_Class___hyg_675____lambda__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_initFn____x40_Lean_Class___hyg_675____lambda__3___closed__1;
|
||||
static lean_object* l_Lean_SMap_empty___at_Lean_ClassState_hasOutParam___default___spec__1___closed__1;
|
||||
lean_object* l_List_lengthTRAux___rarg(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_registerSimplePersistentEnvExtension___at_Lean_initFn____x40_Lean_Class___hyg_68____spec__4___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -213,14 +215,12 @@ lean_object* l_Lean_SMap_contains___at_Lean_isClass___spec__4___boxed(lean_objec
|
|||
lean_object* l_Lean_Attribute_Builtin_ensureNoArgs(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_initFn____x40_Lean_Class___hyg_68____lambda__1(lean_object*);
|
||||
static lean_object* l_Lean_SMap_empty___at_Lean_ClassState_hasOutParam___default___spec__1___closed__2;
|
||||
static lean_object* l_Lean_initFn____x40_Lean_Class___hyg_675____closed__1;
|
||||
lean_object* l_Lean_Expr_getAppFn(lean_object*);
|
||||
lean_object* l_Lean_throwError___at_Lean_initFn____x40_Lean_Class___hyg_673____spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Std_PersistentHashMap_find_x3f___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Std_HashMapImp_contains___at_Lean_isClass___spec__5___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_SMap_find_x3f___at_Lean_hasOutParams___spec__1(lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_addClass___closed__2;
|
||||
lean_object* l_Lean_ofExcept___at_Lean_initFn____x40_Lean_Class___hyg_673____spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_initFn____x40_Lean_Class___hyg_673____closed__2;
|
||||
uint8_t l_Array_anyMUnsafe_any___at___private_Lean_Class_0__Lean_checkOutParam___spec__2(lean_object*, lean_object*, size_t, size_t);
|
||||
lean_object* l_unsafeCast(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_registerSimplePersistentEnvExtension___at_Lean_initFn____x40_Lean_Class___hyg_68____spec__4___lambda__4(lean_object*);
|
||||
|
|
@ -234,6 +234,7 @@ uint32_t lean_uint32_of_nat(lean_object*);
|
|||
uint8_t l_Lean_Expr_hasFVar(lean_object*);
|
||||
uint8_t l_Std_PersistentHashMap_contains___at_Lean_isClass___spec__7(lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_registerSimplePersistentEnvExtension___at_Lean_initFn____x40_Lean_Class___hyg_68____spec__4___lambda__4___closed__2;
|
||||
lean_object* l_Lean_initFn____x40_Lean_Class___hyg_675____lambda__2(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_addClass___closed__3;
|
||||
uint8_t lean_has_out_params(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_registerSimplePersistentEnvExtension___at_Lean_initFn____x40_Lean_Class___hyg_68____spec__4___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -247,7 +248,6 @@ static lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___at_Lean_initFn
|
|||
lean_object* l_Lean_registerSimplePersistentEnvExtension___at_Lean_initFn____x40_Lean_Class___hyg_68____spec__4___lambda__4___boxed(lean_object*);
|
||||
uint8_t lean_nat_dec_lt(lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_Name_instBEqName;
|
||||
static lean_object* l_Lean_initFn____x40_Lean_Class___hyg_673____closed__1;
|
||||
uint8_t l_Lean_ClassEntry_lt(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
|
|
@ -3094,7 +3094,7 @@ return x_33;
|
|||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_throwError___at_Lean_initFn____x40_Lean_Class___hyg_673____spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
lean_object* l_Lean_throwError___at_Lean_initFn____x40_Lean_Class___hyg_675____spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_5; lean_object* x_6; uint8_t x_7;
|
||||
|
|
@ -3132,7 +3132,7 @@ return x_13;
|
|||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_ofExcept___at_Lean_initFn____x40_Lean_Class___hyg_673____spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
lean_object* l_Lean_ofExcept___at_Lean_initFn____x40_Lean_Class___hyg_675____spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
if (lean_obj_tag(x_1) == 0)
|
||||
|
|
@ -3145,7 +3145,7 @@ x_6 = lean_alloc_ctor(2, 1, 0);
|
|||
lean_ctor_set(x_6, 0, x_5);
|
||||
x_7 = lean_alloc_ctor(0, 1, 0);
|
||||
lean_ctor_set(x_7, 0, x_6);
|
||||
x_8 = l_Lean_throwError___at_Lean_initFn____x40_Lean_Class___hyg_673____spec__2(x_7, x_2, x_3, x_4);
|
||||
x_8 = l_Lean_throwError___at_Lean_initFn____x40_Lean_Class___hyg_675____spec__2(x_7, x_2, x_3, x_4);
|
||||
return x_8;
|
||||
}
|
||||
else
|
||||
|
|
@ -3161,12 +3161,12 @@ return x_10;
|
|||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_initFn____x40_Lean_Class___hyg_673____lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
|
||||
lean_object* l_Lean_initFn____x40_Lean_Class___hyg_675____lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_7; lean_object* x_8;
|
||||
x_7 = l_Lean_addClass(x_1, x_2);
|
||||
x_8 = l_Lean_ofExcept___at_Lean_initFn____x40_Lean_Class___hyg_673____spec__1(x_7, x_4, x_5, x_6);
|
||||
x_8 = l_Lean_ofExcept___at_Lean_initFn____x40_Lean_Class___hyg_675____spec__1(x_7, x_4, x_5, x_6);
|
||||
if (lean_obj_tag(x_8) == 0)
|
||||
{
|
||||
lean_object* x_9; lean_object* x_10; lean_object* x_11;
|
||||
|
|
@ -3202,7 +3202,7 @@ return x_15;
|
|||
}
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_initFn____x40_Lean_Class___hyg_673____lambda__2___closed__1() {
|
||||
static lean_object* _init_l_Lean_initFn____x40_Lean_Class___hyg_675____lambda__2___closed__1() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
|
|
@ -3210,16 +3210,16 @@ x_1 = lean_mk_string("invalid attribute 'class', must be global");
|
|||
return x_1;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_initFn____x40_Lean_Class___hyg_673____lambda__2___closed__2() {
|
||||
static lean_object* _init_l_Lean_initFn____x40_Lean_Class___hyg_675____lambda__2___closed__2() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2;
|
||||
x_1 = l_Lean_initFn____x40_Lean_Class___hyg_673____lambda__2___closed__1;
|
||||
x_1 = l_Lean_initFn____x40_Lean_Class___hyg_675____lambda__2___closed__1;
|
||||
x_2 = l_Lean_stringToMessageData(x_1);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_initFn____x40_Lean_Class___hyg_673____lambda__2(lean_object* x_1, lean_object* x_2, uint8_t x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
|
||||
lean_object* l_Lean_initFn____x40_Lean_Class___hyg_675____lambda__2(lean_object* x_1, lean_object* x_2, uint8_t x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11;
|
||||
|
|
@ -3248,7 +3248,7 @@ if (x_14 == 0)
|
|||
lean_object* x_15; lean_object* x_16; uint8_t x_17;
|
||||
lean_dec(x_10);
|
||||
lean_dec(x_1);
|
||||
x_15 = l_Lean_initFn____x40_Lean_Class___hyg_673____lambda__2___closed__2;
|
||||
x_15 = l_Lean_initFn____x40_Lean_Class___hyg_675____lambda__2___closed__2;
|
||||
x_16 = l_Lean_throwError___at_Lean_registerTagAttribute___spec__5(x_15, x_4, x_5, x_12);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_4);
|
||||
|
|
@ -3275,7 +3275,7 @@ else
|
|||
{
|
||||
lean_object* x_21; lean_object* x_22;
|
||||
x_21 = lean_box(0);
|
||||
x_22 = l_Lean_initFn____x40_Lean_Class___hyg_673____lambda__1(x_10, x_1, x_21, x_4, x_5, x_12);
|
||||
x_22 = l_Lean_initFn____x40_Lean_Class___hyg_675____lambda__1(x_10, x_1, x_21, x_4, x_5, x_12);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_4);
|
||||
return x_22;
|
||||
|
|
@ -3309,7 +3309,7 @@ return x_26;
|
|||
}
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_initFn____x40_Lean_Class___hyg_673____lambda__3___closed__1() {
|
||||
static lean_object* _init_l_Lean_initFn____x40_Lean_Class___hyg_675____lambda__3___closed__1() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
|
|
@ -3317,25 +3317,25 @@ x_1 = lean_mk_string("attribute cannot be erased");
|
|||
return x_1;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_initFn____x40_Lean_Class___hyg_673____lambda__3___closed__2() {
|
||||
static lean_object* _init_l_Lean_initFn____x40_Lean_Class___hyg_675____lambda__3___closed__2() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2;
|
||||
x_1 = l_Lean_initFn____x40_Lean_Class___hyg_673____lambda__3___closed__1;
|
||||
x_1 = l_Lean_initFn____x40_Lean_Class___hyg_675____lambda__3___closed__1;
|
||||
x_2 = l_Lean_stringToMessageData(x_1);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_initFn____x40_Lean_Class___hyg_673____lambda__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
lean_object* l_Lean_initFn____x40_Lean_Class___hyg_675____lambda__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_5; lean_object* x_6;
|
||||
x_5 = l_Lean_initFn____x40_Lean_Class___hyg_673____lambda__3___closed__2;
|
||||
x_5 = l_Lean_initFn____x40_Lean_Class___hyg_675____lambda__3___closed__2;
|
||||
x_6 = l_Lean_throwError___at_Lean_AttributeImpl_erase___default___spec__1(x_5, x_2, x_3, x_4);
|
||||
return x_6;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_initFn____x40_Lean_Class___hyg_673____closed__1() {
|
||||
static lean_object* _init_l_Lean_initFn____x40_Lean_Class___hyg_675____closed__1() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
|
|
@ -3343,17 +3343,17 @@ x_1 = lean_mk_string("class");
|
|||
return x_1;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_initFn____x40_Lean_Class___hyg_673____closed__2() {
|
||||
static lean_object* _init_l_Lean_initFn____x40_Lean_Class___hyg_675____closed__2() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
x_1 = lean_box(0);
|
||||
x_2 = l_Lean_initFn____x40_Lean_Class___hyg_673____closed__1;
|
||||
x_2 = l_Lean_initFn____x40_Lean_Class___hyg_675____closed__1;
|
||||
x_3 = lean_name_mk_string(x_1, x_2);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_initFn____x40_Lean_Class___hyg_673____closed__3() {
|
||||
static lean_object* _init_l_Lean_initFn____x40_Lean_Class___hyg_675____closed__3() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
|
|
@ -3361,12 +3361,12 @@ x_1 = lean_mk_string("type class");
|
|||
return x_1;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_initFn____x40_Lean_Class___hyg_673____closed__4() {
|
||||
static lean_object* _init_l_Lean_initFn____x40_Lean_Class___hyg_675____closed__4() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; uint8_t x_3; lean_object* x_4;
|
||||
x_1 = l_Lean_initFn____x40_Lean_Class___hyg_673____closed__2;
|
||||
x_2 = l_Lean_initFn____x40_Lean_Class___hyg_673____closed__3;
|
||||
x_1 = l_Lean_initFn____x40_Lean_Class___hyg_675____closed__2;
|
||||
x_2 = l_Lean_initFn____x40_Lean_Class___hyg_675____closed__3;
|
||||
x_3 = 0;
|
||||
x_4 = lean_alloc_ctor(0, 2, 1);
|
||||
lean_ctor_set(x_4, 0, x_1);
|
||||
|
|
@ -3375,29 +3375,29 @@ lean_ctor_set_uint8(x_4, sizeof(void*)*2, x_3);
|
|||
return x_4;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_initFn____x40_Lean_Class___hyg_673____closed__5() {
|
||||
static lean_object* _init_l_Lean_initFn____x40_Lean_Class___hyg_675____closed__5() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_alloc_closure((void*)(l_Lean_initFn____x40_Lean_Class___hyg_673____lambda__2___boxed), 6, 0);
|
||||
x_1 = lean_alloc_closure((void*)(l_Lean_initFn____x40_Lean_Class___hyg_675____lambda__2___boxed), 6, 0);
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_initFn____x40_Lean_Class___hyg_673____closed__6() {
|
||||
static lean_object* _init_l_Lean_initFn____x40_Lean_Class___hyg_675____closed__6() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_alloc_closure((void*)(l_Lean_initFn____x40_Lean_Class___hyg_673____lambda__3___boxed), 4, 0);
|
||||
x_1 = lean_alloc_closure((void*)(l_Lean_initFn____x40_Lean_Class___hyg_675____lambda__3___boxed), 4, 0);
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_initFn____x40_Lean_Class___hyg_673____closed__7() {
|
||||
static lean_object* _init_l_Lean_initFn____x40_Lean_Class___hyg_675____closed__7() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_1 = l_Lean_initFn____x40_Lean_Class___hyg_673____closed__4;
|
||||
x_2 = l_Lean_initFn____x40_Lean_Class___hyg_673____closed__5;
|
||||
x_3 = l_Lean_initFn____x40_Lean_Class___hyg_673____closed__6;
|
||||
x_1 = l_Lean_initFn____x40_Lean_Class___hyg_675____closed__4;
|
||||
x_2 = l_Lean_initFn____x40_Lean_Class___hyg_675____closed__5;
|
||||
x_3 = l_Lean_initFn____x40_Lean_Class___hyg_675____closed__6;
|
||||
x_4 = lean_alloc_ctor(0, 3, 0);
|
||||
lean_ctor_set(x_4, 0, x_1);
|
||||
lean_ctor_set(x_4, 1, x_2);
|
||||
|
|
@ -3405,61 +3405,61 @@ lean_ctor_set(x_4, 2, x_3);
|
|||
return x_4;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_initFn____x40_Lean_Class___hyg_673_(lean_object* x_1) {
|
||||
lean_object* l_Lean_initFn____x40_Lean_Class___hyg_675_(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_2; lean_object* x_3;
|
||||
x_2 = l_Lean_initFn____x40_Lean_Class___hyg_673____closed__7;
|
||||
x_2 = l_Lean_initFn____x40_Lean_Class___hyg_675____closed__7;
|
||||
x_3 = l_Lean_registerBuiltinAttribute(x_2, x_1);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_throwError___at_Lean_initFn____x40_Lean_Class___hyg_673____spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
lean_object* l_Lean_throwError___at_Lean_initFn____x40_Lean_Class___hyg_675____spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_5;
|
||||
x_5 = l_Lean_throwError___at_Lean_initFn____x40_Lean_Class___hyg_673____spec__2(x_1, x_2, x_3, x_4);
|
||||
x_5 = l_Lean_throwError___at_Lean_initFn____x40_Lean_Class___hyg_675____spec__2(x_1, x_2, x_3, x_4);
|
||||
lean_dec(x_3);
|
||||
lean_dec(x_2);
|
||||
return x_5;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_ofExcept___at_Lean_initFn____x40_Lean_Class___hyg_673____spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
lean_object* l_Lean_ofExcept___at_Lean_initFn____x40_Lean_Class___hyg_675____spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_5;
|
||||
x_5 = l_Lean_ofExcept___at_Lean_initFn____x40_Lean_Class___hyg_673____spec__1(x_1, x_2, x_3, x_4);
|
||||
x_5 = l_Lean_ofExcept___at_Lean_initFn____x40_Lean_Class___hyg_675____spec__1(x_1, x_2, x_3, x_4);
|
||||
lean_dec(x_3);
|
||||
lean_dec(x_2);
|
||||
return x_5;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_initFn____x40_Lean_Class___hyg_673____lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
|
||||
lean_object* l_Lean_initFn____x40_Lean_Class___hyg_675____lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_7;
|
||||
x_7 = l_Lean_initFn____x40_Lean_Class___hyg_673____lambda__1(x_1, x_2, x_3, x_4, x_5, x_6);
|
||||
x_7 = l_Lean_initFn____x40_Lean_Class___hyg_675____lambda__1(x_1, x_2, x_3, x_4, x_5, x_6);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_3);
|
||||
return x_7;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_initFn____x40_Lean_Class___hyg_673____lambda__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
|
||||
lean_object* l_Lean_initFn____x40_Lean_Class___hyg_675____lambda__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
|
||||
_start:
|
||||
{
|
||||
uint8_t x_7; lean_object* x_8;
|
||||
x_7 = lean_unbox(x_3);
|
||||
lean_dec(x_3);
|
||||
x_8 = l_Lean_initFn____x40_Lean_Class___hyg_673____lambda__2(x_1, x_2, x_7, x_4, x_5, x_6);
|
||||
x_8 = l_Lean_initFn____x40_Lean_Class___hyg_675____lambda__2(x_1, x_2, x_7, x_4, x_5, x_6);
|
||||
return x_8;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_initFn____x40_Lean_Class___hyg_673____lambda__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
lean_object* l_Lean_initFn____x40_Lean_Class___hyg_675____lambda__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_5;
|
||||
x_5 = l_Lean_initFn____x40_Lean_Class___hyg_673____lambda__3(x_1, x_2, x_3, x_4);
|
||||
x_5 = l_Lean_initFn____x40_Lean_Class___hyg_675____lambda__3(x_1, x_2, x_3, x_4);
|
||||
lean_dec(x_3);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
|
|
@ -3583,29 +3583,29 @@ l_Lean_addClass___closed__4 = _init_l_Lean_addClass___closed__4();
|
|||
lean_mark_persistent(l_Lean_addClass___closed__4);
|
||||
l_Lean_addClass___closed__5 = _init_l_Lean_addClass___closed__5();
|
||||
lean_mark_persistent(l_Lean_addClass___closed__5);
|
||||
l_Lean_initFn____x40_Lean_Class___hyg_673____lambda__2___closed__1 = _init_l_Lean_initFn____x40_Lean_Class___hyg_673____lambda__2___closed__1();
|
||||
lean_mark_persistent(l_Lean_initFn____x40_Lean_Class___hyg_673____lambda__2___closed__1);
|
||||
l_Lean_initFn____x40_Lean_Class___hyg_673____lambda__2___closed__2 = _init_l_Lean_initFn____x40_Lean_Class___hyg_673____lambda__2___closed__2();
|
||||
lean_mark_persistent(l_Lean_initFn____x40_Lean_Class___hyg_673____lambda__2___closed__2);
|
||||
l_Lean_initFn____x40_Lean_Class___hyg_673____lambda__3___closed__1 = _init_l_Lean_initFn____x40_Lean_Class___hyg_673____lambda__3___closed__1();
|
||||
lean_mark_persistent(l_Lean_initFn____x40_Lean_Class___hyg_673____lambda__3___closed__1);
|
||||
l_Lean_initFn____x40_Lean_Class___hyg_673____lambda__3___closed__2 = _init_l_Lean_initFn____x40_Lean_Class___hyg_673____lambda__3___closed__2();
|
||||
lean_mark_persistent(l_Lean_initFn____x40_Lean_Class___hyg_673____lambda__3___closed__2);
|
||||
l_Lean_initFn____x40_Lean_Class___hyg_673____closed__1 = _init_l_Lean_initFn____x40_Lean_Class___hyg_673____closed__1();
|
||||
lean_mark_persistent(l_Lean_initFn____x40_Lean_Class___hyg_673____closed__1);
|
||||
l_Lean_initFn____x40_Lean_Class___hyg_673____closed__2 = _init_l_Lean_initFn____x40_Lean_Class___hyg_673____closed__2();
|
||||
lean_mark_persistent(l_Lean_initFn____x40_Lean_Class___hyg_673____closed__2);
|
||||
l_Lean_initFn____x40_Lean_Class___hyg_673____closed__3 = _init_l_Lean_initFn____x40_Lean_Class___hyg_673____closed__3();
|
||||
lean_mark_persistent(l_Lean_initFn____x40_Lean_Class___hyg_673____closed__3);
|
||||
l_Lean_initFn____x40_Lean_Class___hyg_673____closed__4 = _init_l_Lean_initFn____x40_Lean_Class___hyg_673____closed__4();
|
||||
lean_mark_persistent(l_Lean_initFn____x40_Lean_Class___hyg_673____closed__4);
|
||||
l_Lean_initFn____x40_Lean_Class___hyg_673____closed__5 = _init_l_Lean_initFn____x40_Lean_Class___hyg_673____closed__5();
|
||||
lean_mark_persistent(l_Lean_initFn____x40_Lean_Class___hyg_673____closed__5);
|
||||
l_Lean_initFn____x40_Lean_Class___hyg_673____closed__6 = _init_l_Lean_initFn____x40_Lean_Class___hyg_673____closed__6();
|
||||
lean_mark_persistent(l_Lean_initFn____x40_Lean_Class___hyg_673____closed__6);
|
||||
l_Lean_initFn____x40_Lean_Class___hyg_673____closed__7 = _init_l_Lean_initFn____x40_Lean_Class___hyg_673____closed__7();
|
||||
lean_mark_persistent(l_Lean_initFn____x40_Lean_Class___hyg_673____closed__7);
|
||||
res = l_Lean_initFn____x40_Lean_Class___hyg_673_(lean_io_mk_world());
|
||||
l_Lean_initFn____x40_Lean_Class___hyg_675____lambda__2___closed__1 = _init_l_Lean_initFn____x40_Lean_Class___hyg_675____lambda__2___closed__1();
|
||||
lean_mark_persistent(l_Lean_initFn____x40_Lean_Class___hyg_675____lambda__2___closed__1);
|
||||
l_Lean_initFn____x40_Lean_Class___hyg_675____lambda__2___closed__2 = _init_l_Lean_initFn____x40_Lean_Class___hyg_675____lambda__2___closed__2();
|
||||
lean_mark_persistent(l_Lean_initFn____x40_Lean_Class___hyg_675____lambda__2___closed__2);
|
||||
l_Lean_initFn____x40_Lean_Class___hyg_675____lambda__3___closed__1 = _init_l_Lean_initFn____x40_Lean_Class___hyg_675____lambda__3___closed__1();
|
||||
lean_mark_persistent(l_Lean_initFn____x40_Lean_Class___hyg_675____lambda__3___closed__1);
|
||||
l_Lean_initFn____x40_Lean_Class___hyg_675____lambda__3___closed__2 = _init_l_Lean_initFn____x40_Lean_Class___hyg_675____lambda__3___closed__2();
|
||||
lean_mark_persistent(l_Lean_initFn____x40_Lean_Class___hyg_675____lambda__3___closed__2);
|
||||
l_Lean_initFn____x40_Lean_Class___hyg_675____closed__1 = _init_l_Lean_initFn____x40_Lean_Class___hyg_675____closed__1();
|
||||
lean_mark_persistent(l_Lean_initFn____x40_Lean_Class___hyg_675____closed__1);
|
||||
l_Lean_initFn____x40_Lean_Class___hyg_675____closed__2 = _init_l_Lean_initFn____x40_Lean_Class___hyg_675____closed__2();
|
||||
lean_mark_persistent(l_Lean_initFn____x40_Lean_Class___hyg_675____closed__2);
|
||||
l_Lean_initFn____x40_Lean_Class___hyg_675____closed__3 = _init_l_Lean_initFn____x40_Lean_Class___hyg_675____closed__3();
|
||||
lean_mark_persistent(l_Lean_initFn____x40_Lean_Class___hyg_675____closed__3);
|
||||
l_Lean_initFn____x40_Lean_Class___hyg_675____closed__4 = _init_l_Lean_initFn____x40_Lean_Class___hyg_675____closed__4();
|
||||
lean_mark_persistent(l_Lean_initFn____x40_Lean_Class___hyg_675____closed__4);
|
||||
l_Lean_initFn____x40_Lean_Class___hyg_675____closed__5 = _init_l_Lean_initFn____x40_Lean_Class___hyg_675____closed__5();
|
||||
lean_mark_persistent(l_Lean_initFn____x40_Lean_Class___hyg_675____closed__5);
|
||||
l_Lean_initFn____x40_Lean_Class___hyg_675____closed__6 = _init_l_Lean_initFn____x40_Lean_Class___hyg_675____closed__6();
|
||||
lean_mark_persistent(l_Lean_initFn____x40_Lean_Class___hyg_675____closed__6);
|
||||
l_Lean_initFn____x40_Lean_Class___hyg_675____closed__7 = _init_l_Lean_initFn____x40_Lean_Class___hyg_675____closed__7();
|
||||
lean_mark_persistent(l_Lean_initFn____x40_Lean_Class___hyg_675____closed__7);
|
||||
res = l_Lean_initFn____x40_Lean_Class___hyg_675_(lean_io_mk_world());
|
||||
if (lean_io_result_is_error(res)) return res;
|
||||
lean_dec_ref(res);
|
||||
return lean_io_result_mk_ok(lean_box(0));
|
||||
|
|
|
|||
102
stage0/stdlib/Lean/Compiler/ExternAttr.c
generated
102
stage0/stdlib/Lean/Compiler/ExternAttr.c
generated
|
|
@ -152,6 +152,7 @@ static lean_object* l_Lean_externAttr___lambda__1___closed__1;
|
|||
lean_object* l_Lean_registerParametricAttribute___at_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_342____spec__1___lambda__2(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_externAttr___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_registerParametricAttribute___at_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_342____spec__1___lambda__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_getExternConstArity___closed__21;
|
||||
lean_object* l_Lean_getExternConstArity___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
uint8_t l_Lean_Name_quickCmp(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_registerParametricAttribute___at_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_342____spec__1___lambda__3(lean_object*);
|
||||
|
|
@ -163,9 +164,9 @@ lean_object* l_Nat_repr(lean_object*);
|
|||
lean_object* lean_st_mk_ref(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Core_getMaxHeartbeats(lean_object*);
|
||||
lean_object* l_Lean_Syntax_getId(lean_object*);
|
||||
lean_object* l_Lean_ofExcept___at_Lean_initFn____x40_Lean_Class___hyg_675____spec__1(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_Expr_instHashableExpr;
|
||||
static lean_object* l_Lean_getConstInfo___at_Lean_getExternConstArity___spec__1___closed__4;
|
||||
lean_object* l_Lean_ofExcept___at_Lean_initFn____x40_Lean_Class___hyg_673____spec__1(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Std_PersistentHashMap_mkEmptyEntriesArray(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_getExternConstArity_match__3(lean_object*);
|
||||
lean_object* lean_array_to_list(lean_object*, lean_object*);
|
||||
|
|
@ -198,7 +199,6 @@ static lean_object* l_Lean_registerParametricAttribute___at_Lean_initFn____x40_L
|
|||
lean_object* l_Lean_externAttr___lambda__5(lean_object*);
|
||||
size_t lean_usize_of_nat(lean_object*);
|
||||
lean_object* l_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_342____lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_NameSet_empty;
|
||||
lean_object* l_Lean_getConstInfo___at_Lean_getExternConstArity___spec__1(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_ConstantInfo_type(lean_object*);
|
||||
static lean_object* l_Lean_registerParametricAttribute___at_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_342____spec__1___lambda__6___closed__2;
|
||||
|
|
@ -2329,7 +2329,7 @@ else
|
|||
lean_object* x_15; lean_object* x_16;
|
||||
lean_free_object(x_6);
|
||||
x_15 = lean_add_extern(x_10, x_1);
|
||||
x_16 = l_Lean_ofExcept___at_Lean_initFn____x40_Lean_Class___hyg_673____spec__1(x_15, x_3, x_4, x_9);
|
||||
x_16 = l_Lean_ofExcept___at_Lean_initFn____x40_Lean_Class___hyg_675____spec__1(x_15, x_3, x_4, x_9);
|
||||
if (lean_obj_tag(x_16) == 0)
|
||||
{
|
||||
lean_object* x_17; lean_object* x_18; lean_object* x_19;
|
||||
|
|
@ -2370,7 +2370,7 @@ else
|
|||
lean_object* x_24; lean_object* x_25;
|
||||
lean_free_object(x_6);
|
||||
x_24 = lean_add_extern(x_10, x_1);
|
||||
x_25 = l_Lean_ofExcept___at_Lean_initFn____x40_Lean_Class___hyg_673____spec__1(x_24, x_3, x_4, x_9);
|
||||
x_25 = l_Lean_ofExcept___at_Lean_initFn____x40_Lean_Class___hyg_675____spec__1(x_24, x_3, x_4, x_9);
|
||||
if (lean_obj_tag(x_25) == 0)
|
||||
{
|
||||
lean_object* x_26; lean_object* x_27; lean_object* x_28;
|
||||
|
|
@ -2442,7 +2442,7 @@ else
|
|||
{
|
||||
lean_object* x_41; lean_object* x_42;
|
||||
x_41 = lean_add_extern(x_35, x_1);
|
||||
x_42 = l_Lean_ofExcept___at_Lean_initFn____x40_Lean_Class___hyg_673____spec__1(x_41, x_3, x_4, x_34);
|
||||
x_42 = l_Lean_ofExcept___at_Lean_initFn____x40_Lean_Class___hyg_675____spec__1(x_41, x_3, x_4, x_34);
|
||||
if (lean_obj_tag(x_42) == 0)
|
||||
{
|
||||
lean_object* x_43; lean_object* x_44; lean_object* x_45;
|
||||
|
|
@ -2484,7 +2484,7 @@ else
|
|||
{
|
||||
lean_object* x_50; lean_object* x_51;
|
||||
x_50 = lean_add_extern(x_35, x_1);
|
||||
x_51 = l_Lean_ofExcept___at_Lean_initFn____x40_Lean_Class___hyg_673____spec__1(x_50, x_3, x_4, x_34);
|
||||
x_51 = l_Lean_ofExcept___at_Lean_initFn____x40_Lean_Class___hyg_675____spec__1(x_50, x_3, x_4, x_34);
|
||||
if (lean_obj_tag(x_51) == 0)
|
||||
{
|
||||
lean_object* x_52; lean_object* x_53; lean_object* x_54;
|
||||
|
|
@ -5275,8 +5275,20 @@ static lean_object* _init_l_Lean_getExternConstArity___closed__10() {
|
|||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
x_1 = l_Lean_getExternConstArity___closed__3;
|
||||
x_2 = lean_unsigned_to_nat(0u);
|
||||
x_3 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_3, 0, x_1);
|
||||
lean_ctor_set(x_3, 1, x_2);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_getExternConstArity___closed__11() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
x_1 = lean_unsigned_to_nat(0u);
|
||||
x_2 = l_Lean_getExternConstArity___closed__4;
|
||||
x_2 = l_Lean_getExternConstArity___closed__10;
|
||||
x_3 = lean_alloc_ctor(0, 7, 0);
|
||||
lean_ctor_set(x_3, 0, x_1);
|
||||
lean_ctor_set(x_3, 1, x_1);
|
||||
|
|
@ -5288,7 +5300,7 @@ lean_ctor_set(x_3, 6, x_2);
|
|||
return x_3;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_getExternConstArity___closed__11() {
|
||||
static lean_object* _init_l_Lean_getExternConstArity___closed__12() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
|
|
@ -5300,24 +5312,12 @@ lean_ctor_set(x_3, 1, x_2);
|
|||
return x_3;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_getExternConstArity___closed__12() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_alloc_closure((void*)(l_Lean_Meta_InfoCacheKey_instHashableInfoCacheKey___boxed), 1, 0);
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_getExternConstArity___closed__13() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
x_1 = l_Lean_getExternConstArity___closed__3;
|
||||
x_2 = lean_unsigned_to_nat(0u);
|
||||
x_3 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_3, 0, x_1);
|
||||
lean_ctor_set(x_3, 1, x_2);
|
||||
return x_3;
|
||||
lean_object* x_1;
|
||||
x_1 = lean_alloc_closure((void*)(l_Lean_Meta_InfoCacheKey_instHashableInfoCacheKey___boxed), 1, 0);
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_getExternConstArity___closed__14() {
|
||||
|
|
@ -5335,6 +5335,18 @@ return x_3;
|
|||
static lean_object* _init_l_Lean_getExternConstArity___closed__15() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
x_1 = l_Lean_getExternConstArity___closed__3;
|
||||
x_2 = lean_unsigned_to_nat(0u);
|
||||
x_3 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_3, 0, x_1);
|
||||
lean_ctor_set(x_3, 1, x_2);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_getExternConstArity___closed__16() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2;
|
||||
x_1 = l_Lean_Expr_instBEqExpr;
|
||||
x_2 = lean_alloc_closure((void*)(l_instBEqProd___rarg), 4, 2);
|
||||
|
|
@ -5343,7 +5355,7 @@ lean_closure_set(x_2, 1, x_1);
|
|||
return x_2;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_getExternConstArity___closed__16() {
|
||||
static lean_object* _init_l_Lean_getExternConstArity___closed__17() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2;
|
||||
|
|
@ -5354,7 +5366,7 @@ lean_closure_set(x_2, 1, x_1);
|
|||
return x_2;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_getExternConstArity___closed__17() {
|
||||
static lean_object* _init_l_Lean_getExternConstArity___closed__18() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
|
|
@ -5366,14 +5378,14 @@ lean_ctor_set(x_3, 1, x_2);
|
|||
return x_3;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_getExternConstArity___closed__18() {
|
||||
static lean_object* _init_l_Lean_getExternConstArity___closed__19() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5;
|
||||
x_1 = l_Lean_getExternConstArity___closed__11;
|
||||
x_2 = l_Lean_getExternConstArity___closed__13;
|
||||
x_3 = l_Lean_getExternConstArity___closed__14;
|
||||
x_4 = l_Lean_getExternConstArity___closed__17;
|
||||
x_1 = l_Lean_getExternConstArity___closed__12;
|
||||
x_2 = l_Lean_getExternConstArity___closed__14;
|
||||
x_3 = l_Lean_getExternConstArity___closed__15;
|
||||
x_4 = l_Lean_getExternConstArity___closed__18;
|
||||
x_5 = lean_alloc_ctor(0, 7, 0);
|
||||
lean_ctor_set(x_5, 0, x_1);
|
||||
lean_ctor_set(x_5, 1, x_2);
|
||||
|
|
@ -5385,23 +5397,23 @@ lean_ctor_set(x_5, 6, x_4);
|
|||
return x_5;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_getExternConstArity___closed__19() {
|
||||
static lean_object* _init_l_Lean_getExternConstArity___closed__20() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5;
|
||||
x_1 = l_Lean_getExternConstArity___closed__10;
|
||||
x_2 = l_Lean_getExternConstArity___closed__18;
|
||||
x_3 = l_Lean_NameSet_empty;
|
||||
x_1 = lean_box(0);
|
||||
x_2 = l_Lean_getExternConstArity___closed__11;
|
||||
x_3 = l_Lean_getExternConstArity___closed__19;
|
||||
x_4 = l_Lean_getExternConstArity___closed__7;
|
||||
x_5 = lean_alloc_ctor(0, 4, 0);
|
||||
lean_ctor_set(x_5, 0, x_1);
|
||||
lean_ctor_set(x_5, 1, x_2);
|
||||
lean_ctor_set(x_5, 2, x_3);
|
||||
lean_ctor_set(x_5, 0, x_2);
|
||||
lean_ctor_set(x_5, 1, x_3);
|
||||
lean_ctor_set(x_5, 2, x_1);
|
||||
lean_ctor_set(x_5, 3, x_4);
|
||||
return x_5;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_getExternConstArity___closed__20() {
|
||||
static lean_object* _init_l_Lean_getExternConstArity___closed__21() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
|
|
@ -5466,14 +5478,14 @@ x_20 = lean_st_ref_get(x_3, x_18);
|
|||
x_21 = lean_ctor_get(x_20, 1);
|
||||
lean_inc(x_21);
|
||||
lean_dec(x_20);
|
||||
x_22 = l_Lean_getExternConstArity___closed__19;
|
||||
x_22 = l_Lean_getExternConstArity___closed__20;
|
||||
x_23 = lean_st_mk_ref(x_22, x_21);
|
||||
x_24 = lean_ctor_get(x_23, 0);
|
||||
lean_inc(x_24);
|
||||
x_25 = lean_ctor_get(x_23, 1);
|
||||
lean_inc(x_25);
|
||||
lean_dec(x_23);
|
||||
x_26 = l_Lean_getExternConstArity___closed__20;
|
||||
x_26 = l_Lean_getExternConstArity___closed__21;
|
||||
x_27 = l_Lean_getExternConstArity___closed__9;
|
||||
lean_inc(x_3);
|
||||
lean_inc(x_24);
|
||||
|
|
@ -5622,14 +5634,14 @@ x_55 = lean_st_ref_get(x_3, x_53);
|
|||
x_56 = lean_ctor_get(x_55, 1);
|
||||
lean_inc(x_56);
|
||||
lean_dec(x_55);
|
||||
x_57 = l_Lean_getExternConstArity___closed__19;
|
||||
x_57 = l_Lean_getExternConstArity___closed__20;
|
||||
x_58 = lean_st_mk_ref(x_57, x_56);
|
||||
x_59 = lean_ctor_get(x_58, 0);
|
||||
lean_inc(x_59);
|
||||
x_60 = lean_ctor_get(x_58, 1);
|
||||
lean_inc(x_60);
|
||||
lean_dec(x_58);
|
||||
x_61 = l_Lean_getExternConstArity___closed__20;
|
||||
x_61 = l_Lean_getExternConstArity___closed__21;
|
||||
x_62 = l_Lean_getExternConstArity___closed__9;
|
||||
lean_inc(x_3);
|
||||
lean_inc(x_59);
|
||||
|
|
@ -5810,14 +5822,14 @@ x_98 = lean_st_ref_get(x_3, x_96);
|
|||
x_99 = lean_ctor_get(x_98, 1);
|
||||
lean_inc(x_99);
|
||||
lean_dec(x_98);
|
||||
x_100 = l_Lean_getExternConstArity___closed__19;
|
||||
x_100 = l_Lean_getExternConstArity___closed__20;
|
||||
x_101 = lean_st_mk_ref(x_100, x_99);
|
||||
x_102 = lean_ctor_get(x_101, 0);
|
||||
lean_inc(x_102);
|
||||
x_103 = lean_ctor_get(x_101, 1);
|
||||
lean_inc(x_103);
|
||||
lean_dec(x_101);
|
||||
x_104 = l_Lean_getExternConstArity___closed__20;
|
||||
x_104 = l_Lean_getExternConstArity___closed__21;
|
||||
x_105 = l_Lean_getExternConstArity___closed__9;
|
||||
lean_inc(x_3);
|
||||
lean_inc(x_102);
|
||||
|
|
@ -6490,6 +6502,8 @@ l_Lean_getExternConstArity___closed__19 = _init_l_Lean_getExternConstArity___clo
|
|||
lean_mark_persistent(l_Lean_getExternConstArity___closed__19);
|
||||
l_Lean_getExternConstArity___closed__20 = _init_l_Lean_getExternConstArity___closed__20();
|
||||
lean_mark_persistent(l_Lean_getExternConstArity___closed__20);
|
||||
l_Lean_getExternConstArity___closed__21 = _init_l_Lean_getExternConstArity___closed__21();
|
||||
lean_mark_persistent(l_Lean_getExternConstArity___closed__21);
|
||||
l_Lean_getExternConstArityExport___closed__1 = _init_l_Lean_getExternConstArityExport___closed__1();
|
||||
lean_mark_persistent(l_Lean_getExternConstArityExport___closed__1);
|
||||
l_Lean_getExternConstArityExport___closed__2 = _init_l_Lean_getExternConstArityExport___closed__2();
|
||||
|
|
|
|||
798
stage0/stdlib/Lean/Compiler/IR/Checker.c
generated
798
stage0/stdlib/Lean/Compiler/IR/Checker.c
generated
|
|
@ -4300,13 +4300,86 @@ return x_293;
|
|||
}
|
||||
case 9:
|
||||
{
|
||||
lean_object* x_294; lean_object* x_295; lean_object* x_296; lean_object* x_297;
|
||||
lean_object* x_294; lean_object* x_295; lean_object* x_296; lean_object* x_361; lean_object* x_362;
|
||||
x_294 = lean_ctor_get(x_2, 0);
|
||||
lean_inc(x_294);
|
||||
x_295 = lean_ctor_get(x_2, 1);
|
||||
lean_inc(x_295);
|
||||
lean_dec(x_2);
|
||||
x_296 = l_Lean_IR_Checker_checkObjType(x_1, x_3, x_4);
|
||||
x_361 = l_Lean_IR_Checker_checkObjType(x_1, x_3, x_4);
|
||||
x_362 = lean_ctor_get(x_361, 0);
|
||||
lean_inc(x_362);
|
||||
if (lean_obj_tag(x_362) == 0)
|
||||
{
|
||||
uint8_t x_363;
|
||||
x_363 = !lean_is_exclusive(x_361);
|
||||
if (x_363 == 0)
|
||||
{
|
||||
lean_object* x_364; uint8_t x_365;
|
||||
x_364 = lean_ctor_get(x_361, 0);
|
||||
lean_dec(x_364);
|
||||
x_365 = !lean_is_exclusive(x_362);
|
||||
if (x_365 == 0)
|
||||
{
|
||||
x_296 = x_361;
|
||||
goto block_360;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_366; lean_object* x_367;
|
||||
x_366 = lean_ctor_get(x_362, 0);
|
||||
lean_inc(x_366);
|
||||
lean_dec(x_362);
|
||||
x_367 = lean_alloc_ctor(0, 1, 0);
|
||||
lean_ctor_set(x_367, 0, x_366);
|
||||
lean_ctor_set(x_361, 0, x_367);
|
||||
x_296 = x_361;
|
||||
goto block_360;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_368; lean_object* x_369; lean_object* x_370; lean_object* x_371; lean_object* x_372;
|
||||
x_368 = lean_ctor_get(x_361, 1);
|
||||
lean_inc(x_368);
|
||||
lean_dec(x_361);
|
||||
x_369 = lean_ctor_get(x_362, 0);
|
||||
lean_inc(x_369);
|
||||
if (lean_is_exclusive(x_362)) {
|
||||
lean_ctor_release(x_362, 0);
|
||||
x_370 = x_362;
|
||||
} else {
|
||||
lean_dec_ref(x_362);
|
||||
x_370 = lean_box(0);
|
||||
}
|
||||
if (lean_is_scalar(x_370)) {
|
||||
x_371 = lean_alloc_ctor(0, 1, 0);
|
||||
} else {
|
||||
x_371 = x_370;
|
||||
}
|
||||
lean_ctor_set(x_371, 0, x_369);
|
||||
x_372 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_372, 0, x_371);
|
||||
lean_ctor_set(x_372, 1, x_368);
|
||||
x_296 = x_372;
|
||||
goto block_360;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_373; lean_object* x_374;
|
||||
lean_dec(x_362);
|
||||
x_373 = lean_ctor_get(x_361, 1);
|
||||
lean_inc(x_373);
|
||||
lean_dec(x_361);
|
||||
lean_inc(x_295);
|
||||
x_374 = l_Lean_IR_Checker_checkScalarVar(x_295, x_3, x_373);
|
||||
x_296 = x_374;
|
||||
goto block_360;
|
||||
}
|
||||
block_360:
|
||||
{
|
||||
lean_object* x_297;
|
||||
x_297 = lean_ctor_get(x_296, 0);
|
||||
lean_inc(x_297);
|
||||
if (lean_obj_tag(x_297) == 0)
|
||||
|
|
@ -4372,16 +4445,14 @@ lean_dec(x_297);
|
|||
x_308 = lean_ctor_get(x_296, 1);
|
||||
lean_inc(x_308);
|
||||
lean_dec(x_296);
|
||||
lean_inc(x_295);
|
||||
x_309 = l_Lean_IR_Checker_checkScalarVar(x_295, x_3, x_308);
|
||||
x_309 = l_Lean_IR_Checker_getType(x_295, x_3, x_308);
|
||||
lean_dec(x_3);
|
||||
x_310 = lean_ctor_get(x_309, 0);
|
||||
lean_inc(x_310);
|
||||
if (lean_obj_tag(x_310) == 0)
|
||||
{
|
||||
uint8_t x_311;
|
||||
lean_dec(x_295);
|
||||
lean_dec(x_294);
|
||||
lean_dec(x_3);
|
||||
x_311 = !lean_is_exclusive(x_309);
|
||||
if (x_311 == 0)
|
||||
{
|
||||
|
|
@ -4434,122 +4505,100 @@ return x_320;
|
|||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_321; lean_object* x_322; lean_object* x_323;
|
||||
lean_dec(x_310);
|
||||
x_321 = lean_ctor_get(x_309, 1);
|
||||
lean_inc(x_321);
|
||||
lean_dec(x_309);
|
||||
x_322 = l_Lean_IR_Checker_getType(x_295, x_3, x_321);
|
||||
lean_dec(x_3);
|
||||
x_323 = lean_ctor_get(x_322, 0);
|
||||
lean_inc(x_323);
|
||||
if (lean_obj_tag(x_323) == 0)
|
||||
uint8_t x_321;
|
||||
x_321 = !lean_is_exclusive(x_309);
|
||||
if (x_321 == 0)
|
||||
{
|
||||
uint8_t x_324;
|
||||
lean_dec(x_294);
|
||||
x_324 = !lean_is_exclusive(x_322);
|
||||
if (x_324 == 0)
|
||||
{
|
||||
lean_object* x_325; uint8_t x_326;
|
||||
x_325 = lean_ctor_get(x_322, 0);
|
||||
lean_dec(x_325);
|
||||
x_326 = !lean_is_exclusive(x_323);
|
||||
if (x_326 == 0)
|
||||
{
|
||||
return x_322;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_327; lean_object* x_328;
|
||||
x_327 = lean_ctor_get(x_323, 0);
|
||||
lean_inc(x_327);
|
||||
lean_dec(x_323);
|
||||
x_328 = lean_alloc_ctor(0, 1, 0);
|
||||
lean_ctor_set(x_328, 0, x_327);
|
||||
lean_ctor_set(x_322, 0, x_328);
|
||||
return x_322;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_329; lean_object* x_330; lean_object* x_331; lean_object* x_332; lean_object* x_333;
|
||||
x_329 = lean_ctor_get(x_322, 1);
|
||||
lean_inc(x_329);
|
||||
lean_object* x_322; uint8_t x_323;
|
||||
x_322 = lean_ctor_get(x_309, 0);
|
||||
lean_dec(x_322);
|
||||
x_330 = lean_ctor_get(x_323, 0);
|
||||
lean_inc(x_330);
|
||||
if (lean_is_exclusive(x_323)) {
|
||||
lean_ctor_release(x_323, 0);
|
||||
x_331 = x_323;
|
||||
} else {
|
||||
lean_dec_ref(x_323);
|
||||
x_331 = lean_box(0);
|
||||
}
|
||||
if (lean_is_scalar(x_331)) {
|
||||
x_332 = lean_alloc_ctor(0, 1, 0);
|
||||
} else {
|
||||
x_332 = x_331;
|
||||
}
|
||||
lean_ctor_set(x_332, 0, x_330);
|
||||
x_333 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_333, 0, x_332);
|
||||
lean_ctor_set(x_333, 1, x_329);
|
||||
return x_333;
|
||||
}
|
||||
}
|
||||
else
|
||||
x_323 = !lean_is_exclusive(x_310);
|
||||
if (x_323 == 0)
|
||||
{
|
||||
uint8_t x_334;
|
||||
x_334 = !lean_is_exclusive(x_322);
|
||||
if (x_334 == 0)
|
||||
{
|
||||
lean_object* x_335; uint8_t x_336;
|
||||
x_335 = lean_ctor_get(x_322, 0);
|
||||
lean_dec(x_335);
|
||||
x_336 = !lean_is_exclusive(x_323);
|
||||
if (x_336 == 0)
|
||||
{
|
||||
lean_object* x_337; uint8_t x_338;
|
||||
x_337 = lean_ctor_get(x_323, 0);
|
||||
x_338 = l_Lean_IR_IRType_beq(x_337, x_294);
|
||||
lean_object* x_324; uint8_t x_325;
|
||||
x_324 = lean_ctor_get(x_310, 0);
|
||||
x_325 = l_Lean_IR_IRType_beq(x_324, x_294);
|
||||
lean_dec(x_294);
|
||||
if (x_338 == 0)
|
||||
if (x_325 == 0)
|
||||
{
|
||||
lean_object* x_339; lean_object* x_340; lean_object* x_341; lean_object* x_342; lean_object* x_343; lean_object* x_344; lean_object* x_345;
|
||||
x_339 = l___private_Lean_Compiler_IR_Format_0__Lean_IR_formatIRType(x_337);
|
||||
x_340 = l_Std_Format_defWidth;
|
||||
x_341 = lean_format_pretty(x_339, x_340);
|
||||
x_342 = l_Lean_IR_Checker_checkType___closed__1;
|
||||
x_343 = lean_string_append(x_342, x_341);
|
||||
lean_dec(x_341);
|
||||
x_344 = l_Lean_IR_Checker_getDecl___closed__2;
|
||||
x_345 = lean_string_append(x_343, x_344);
|
||||
lean_ctor_set_tag(x_323, 0);
|
||||
lean_ctor_set(x_323, 0, x_345);
|
||||
return x_322;
|
||||
lean_object* x_326; lean_object* x_327; lean_object* x_328; lean_object* x_329; lean_object* x_330; lean_object* x_331; lean_object* x_332;
|
||||
x_326 = l___private_Lean_Compiler_IR_Format_0__Lean_IR_formatIRType(x_324);
|
||||
x_327 = l_Std_Format_defWidth;
|
||||
x_328 = lean_format_pretty(x_326, x_327);
|
||||
x_329 = l_Lean_IR_Checker_checkType___closed__1;
|
||||
x_330 = lean_string_append(x_329, x_328);
|
||||
lean_dec(x_328);
|
||||
x_331 = l_Lean_IR_Checker_getDecl___closed__2;
|
||||
x_332 = lean_string_append(x_330, x_331);
|
||||
lean_ctor_set_tag(x_310, 0);
|
||||
lean_ctor_set(x_310, 0, x_332);
|
||||
return x_309;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_346;
|
||||
lean_free_object(x_323);
|
||||
lean_dec(x_337);
|
||||
x_346 = l_Lean_IR_Checker_markIndex___lambda__1___closed__1;
|
||||
lean_ctor_set(x_322, 0, x_346);
|
||||
return x_322;
|
||||
lean_object* x_333;
|
||||
lean_free_object(x_310);
|
||||
lean_dec(x_324);
|
||||
x_333 = l_Lean_IR_Checker_markIndex___lambda__1___closed__1;
|
||||
lean_ctor_set(x_309, 0, x_333);
|
||||
return x_309;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_347; uint8_t x_348;
|
||||
x_347 = lean_ctor_get(x_323, 0);
|
||||
lean_inc(x_347);
|
||||
lean_dec(x_323);
|
||||
x_348 = l_Lean_IR_IRType_beq(x_347, x_294);
|
||||
lean_object* x_334; uint8_t x_335;
|
||||
x_334 = lean_ctor_get(x_310, 0);
|
||||
lean_inc(x_334);
|
||||
lean_dec(x_310);
|
||||
x_335 = l_Lean_IR_IRType_beq(x_334, x_294);
|
||||
lean_dec(x_294);
|
||||
if (x_335 == 0)
|
||||
{
|
||||
lean_object* x_336; lean_object* x_337; lean_object* x_338; lean_object* x_339; lean_object* x_340; lean_object* x_341; lean_object* x_342; lean_object* x_343;
|
||||
x_336 = l___private_Lean_Compiler_IR_Format_0__Lean_IR_formatIRType(x_334);
|
||||
x_337 = l_Std_Format_defWidth;
|
||||
x_338 = lean_format_pretty(x_336, x_337);
|
||||
x_339 = l_Lean_IR_Checker_checkType___closed__1;
|
||||
x_340 = lean_string_append(x_339, x_338);
|
||||
lean_dec(x_338);
|
||||
x_341 = l_Lean_IR_Checker_getDecl___closed__2;
|
||||
x_342 = lean_string_append(x_340, x_341);
|
||||
x_343 = lean_alloc_ctor(0, 1, 0);
|
||||
lean_ctor_set(x_343, 0, x_342);
|
||||
lean_ctor_set(x_309, 0, x_343);
|
||||
return x_309;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_344;
|
||||
lean_dec(x_334);
|
||||
x_344 = l_Lean_IR_Checker_markIndex___lambda__1___closed__1;
|
||||
lean_ctor_set(x_309, 0, x_344);
|
||||
return x_309;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_345; lean_object* x_346; lean_object* x_347; uint8_t x_348;
|
||||
x_345 = lean_ctor_get(x_309, 1);
|
||||
lean_inc(x_345);
|
||||
lean_dec(x_309);
|
||||
x_346 = lean_ctor_get(x_310, 0);
|
||||
lean_inc(x_346);
|
||||
if (lean_is_exclusive(x_310)) {
|
||||
lean_ctor_release(x_310, 0);
|
||||
x_347 = x_310;
|
||||
} else {
|
||||
lean_dec_ref(x_310);
|
||||
x_347 = lean_box(0);
|
||||
}
|
||||
x_348 = l_Lean_IR_IRType_beq(x_346, x_294);
|
||||
lean_dec(x_294);
|
||||
if (x_348 == 0)
|
||||
{
|
||||
lean_object* x_349; lean_object* x_350; lean_object* x_351; lean_object* x_352; lean_object* x_353; lean_object* x_354; lean_object* x_355; lean_object* x_356;
|
||||
x_349 = l___private_Lean_Compiler_IR_Format_0__Lean_IR_formatIRType(x_347);
|
||||
lean_object* x_349; lean_object* x_350; lean_object* x_351; lean_object* x_352; lean_object* x_353; lean_object* x_354; lean_object* x_355; lean_object* x_356; lean_object* x_357;
|
||||
x_349 = l___private_Lean_Compiler_IR_Format_0__Lean_IR_formatIRType(x_346);
|
||||
x_350 = l_Std_Format_defWidth;
|
||||
x_351 = lean_format_pretty(x_349, x_350);
|
||||
x_352 = l_Lean_IR_Checker_checkType___closed__1;
|
||||
|
|
@ -4557,71 +4606,28 @@ x_353 = lean_string_append(x_352, x_351);
|
|||
lean_dec(x_351);
|
||||
x_354 = l_Lean_IR_Checker_getDecl___closed__2;
|
||||
x_355 = lean_string_append(x_353, x_354);
|
||||
x_356 = lean_alloc_ctor(0, 1, 0);
|
||||
if (lean_is_scalar(x_347)) {
|
||||
x_356 = lean_alloc_ctor(0, 1, 0);
|
||||
} else {
|
||||
x_356 = x_347;
|
||||
lean_ctor_set_tag(x_356, 0);
|
||||
}
|
||||
lean_ctor_set(x_356, 0, x_355);
|
||||
lean_ctor_set(x_322, 0, x_356);
|
||||
return x_322;
|
||||
x_357 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_357, 0, x_356);
|
||||
lean_ctor_set(x_357, 1, x_345);
|
||||
return x_357;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_357;
|
||||
lean_object* x_358; lean_object* x_359;
|
||||
lean_dec(x_347);
|
||||
x_357 = l_Lean_IR_Checker_markIndex___lambda__1___closed__1;
|
||||
lean_ctor_set(x_322, 0, x_357);
|
||||
return x_322;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_358; lean_object* x_359; lean_object* x_360; uint8_t x_361;
|
||||
x_358 = lean_ctor_get(x_322, 1);
|
||||
lean_inc(x_358);
|
||||
lean_dec(x_322);
|
||||
x_359 = lean_ctor_get(x_323, 0);
|
||||
lean_inc(x_359);
|
||||
if (lean_is_exclusive(x_323)) {
|
||||
lean_ctor_release(x_323, 0);
|
||||
x_360 = x_323;
|
||||
} else {
|
||||
lean_dec_ref(x_323);
|
||||
x_360 = lean_box(0);
|
||||
}
|
||||
x_361 = l_Lean_IR_IRType_beq(x_359, x_294);
|
||||
lean_dec(x_294);
|
||||
if (x_361 == 0)
|
||||
{
|
||||
lean_object* x_362; lean_object* x_363; lean_object* x_364; lean_object* x_365; lean_object* x_366; lean_object* x_367; lean_object* x_368; lean_object* x_369; lean_object* x_370;
|
||||
x_362 = l___private_Lean_Compiler_IR_Format_0__Lean_IR_formatIRType(x_359);
|
||||
x_363 = l_Std_Format_defWidth;
|
||||
x_364 = lean_format_pretty(x_362, x_363);
|
||||
x_365 = l_Lean_IR_Checker_checkType___closed__1;
|
||||
x_366 = lean_string_append(x_365, x_364);
|
||||
lean_dec(x_364);
|
||||
x_367 = l_Lean_IR_Checker_getDecl___closed__2;
|
||||
x_368 = lean_string_append(x_366, x_367);
|
||||
if (lean_is_scalar(x_360)) {
|
||||
x_369 = lean_alloc_ctor(0, 1, 0);
|
||||
} else {
|
||||
x_369 = x_360;
|
||||
lean_ctor_set_tag(x_369, 0);
|
||||
}
|
||||
lean_ctor_set(x_369, 0, x_368);
|
||||
x_370 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_370, 0, x_369);
|
||||
lean_ctor_set(x_370, 1, x_358);
|
||||
return x_370;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_371; lean_object* x_372;
|
||||
lean_dec(x_360);
|
||||
lean_dec(x_359);
|
||||
x_371 = l_Lean_IR_Checker_markIndex___lambda__1___closed__1;
|
||||
x_372 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_372, 0, x_371);
|
||||
lean_ctor_set(x_372, 1, x_358);
|
||||
return x_372;
|
||||
lean_dec(x_346);
|
||||
x_358 = l_Lean_IR_Checker_markIndex___lambda__1___closed__1;
|
||||
x_359 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_359, 0, x_358);
|
||||
lean_ctor_set(x_359, 1, x_345);
|
||||
return x_359;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -4630,304 +4636,304 @@ return x_372;
|
|||
}
|
||||
case 10:
|
||||
{
|
||||
lean_object* x_373; lean_object* x_374; lean_object* x_375;
|
||||
x_373 = lean_ctor_get(x_2, 0);
|
||||
lean_inc(x_373);
|
||||
lean_dec(x_2);
|
||||
x_374 = l_Lean_IR_Checker_checkScalarType(x_1, x_3, x_4);
|
||||
x_375 = lean_ctor_get(x_374, 0);
|
||||
lean_object* x_375; lean_object* x_376; lean_object* x_377;
|
||||
x_375 = lean_ctor_get(x_2, 0);
|
||||
lean_inc(x_375);
|
||||
if (lean_obj_tag(x_375) == 0)
|
||||
lean_dec(x_2);
|
||||
x_376 = l_Lean_IR_Checker_checkScalarType(x_1, x_3, x_4);
|
||||
x_377 = lean_ctor_get(x_376, 0);
|
||||
lean_inc(x_377);
|
||||
if (lean_obj_tag(x_377) == 0)
|
||||
{
|
||||
uint8_t x_376;
|
||||
lean_dec(x_373);
|
||||
uint8_t x_378;
|
||||
lean_dec(x_375);
|
||||
lean_dec(x_3);
|
||||
x_376 = !lean_is_exclusive(x_374);
|
||||
if (x_376 == 0)
|
||||
{
|
||||
lean_object* x_377; uint8_t x_378;
|
||||
x_377 = lean_ctor_get(x_374, 0);
|
||||
lean_dec(x_377);
|
||||
x_378 = !lean_is_exclusive(x_375);
|
||||
x_378 = !lean_is_exclusive(x_376);
|
||||
if (x_378 == 0)
|
||||
{
|
||||
return x_374;
|
||||
lean_object* x_379; uint8_t x_380;
|
||||
x_379 = lean_ctor_get(x_376, 0);
|
||||
lean_dec(x_379);
|
||||
x_380 = !lean_is_exclusive(x_377);
|
||||
if (x_380 == 0)
|
||||
{
|
||||
return x_376;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_379; lean_object* x_380;
|
||||
x_379 = lean_ctor_get(x_375, 0);
|
||||
lean_inc(x_379);
|
||||
lean_dec(x_375);
|
||||
x_380 = lean_alloc_ctor(0, 1, 0);
|
||||
lean_ctor_set(x_380, 0, x_379);
|
||||
lean_ctor_set(x_374, 0, x_380);
|
||||
return x_374;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_381; lean_object* x_382; lean_object* x_383; lean_object* x_384; lean_object* x_385;
|
||||
x_381 = lean_ctor_get(x_374, 1);
|
||||
lean_object* x_381; lean_object* x_382;
|
||||
x_381 = lean_ctor_get(x_377, 0);
|
||||
lean_inc(x_381);
|
||||
lean_dec(x_374);
|
||||
x_382 = lean_ctor_get(x_375, 0);
|
||||
lean_inc(x_382);
|
||||
if (lean_is_exclusive(x_375)) {
|
||||
lean_ctor_release(x_375, 0);
|
||||
x_383 = x_375;
|
||||
} else {
|
||||
lean_dec_ref(x_375);
|
||||
x_383 = lean_box(0);
|
||||
}
|
||||
if (lean_is_scalar(x_383)) {
|
||||
x_384 = lean_alloc_ctor(0, 1, 0);
|
||||
} else {
|
||||
x_384 = x_383;
|
||||
}
|
||||
lean_ctor_set(x_384, 0, x_382);
|
||||
x_385 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_385, 0, x_384);
|
||||
lean_ctor_set(x_385, 1, x_381);
|
||||
return x_385;
|
||||
lean_dec(x_377);
|
||||
x_382 = lean_alloc_ctor(0, 1, 0);
|
||||
lean_ctor_set(x_382, 0, x_381);
|
||||
lean_ctor_set(x_376, 0, x_382);
|
||||
return x_376;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_386; lean_object* x_387;
|
||||
lean_dec(x_375);
|
||||
x_386 = lean_ctor_get(x_374, 1);
|
||||
lean_inc(x_386);
|
||||
lean_dec(x_374);
|
||||
x_387 = l_Lean_IR_Checker_checkObjVar(x_373, x_3, x_386);
|
||||
lean_dec(x_3);
|
||||
lean_object* x_383; lean_object* x_384; lean_object* x_385; lean_object* x_386; lean_object* x_387;
|
||||
x_383 = lean_ctor_get(x_376, 1);
|
||||
lean_inc(x_383);
|
||||
lean_dec(x_376);
|
||||
x_384 = lean_ctor_get(x_377, 0);
|
||||
lean_inc(x_384);
|
||||
if (lean_is_exclusive(x_377)) {
|
||||
lean_ctor_release(x_377, 0);
|
||||
x_385 = x_377;
|
||||
} else {
|
||||
lean_dec_ref(x_377);
|
||||
x_385 = lean_box(0);
|
||||
}
|
||||
if (lean_is_scalar(x_385)) {
|
||||
x_386 = lean_alloc_ctor(0, 1, 0);
|
||||
} else {
|
||||
x_386 = x_385;
|
||||
}
|
||||
lean_ctor_set(x_386, 0, x_384);
|
||||
x_387 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_387, 0, x_386);
|
||||
lean_ctor_set(x_387, 1, x_383);
|
||||
return x_387;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_388; lean_object* x_389;
|
||||
lean_dec(x_377);
|
||||
x_388 = lean_ctor_get(x_376, 1);
|
||||
lean_inc(x_388);
|
||||
lean_dec(x_376);
|
||||
x_389 = l_Lean_IR_Checker_checkObjVar(x_375, x_3, x_388);
|
||||
lean_dec(x_3);
|
||||
return x_389;
|
||||
}
|
||||
}
|
||||
case 11:
|
||||
{
|
||||
lean_object* x_388;
|
||||
x_388 = lean_ctor_get(x_2, 0);
|
||||
lean_inc(x_388);
|
||||
lean_object* x_390;
|
||||
x_390 = lean_ctor_get(x_2, 0);
|
||||
lean_inc(x_390);
|
||||
lean_dec(x_2);
|
||||
if (lean_obj_tag(x_388) == 0)
|
||||
if (lean_obj_tag(x_390) == 0)
|
||||
{
|
||||
lean_object* x_389; lean_object* x_390;
|
||||
lean_dec(x_388);
|
||||
lean_object* x_391; lean_object* x_392;
|
||||
lean_dec(x_390);
|
||||
lean_dec(x_3);
|
||||
lean_dec(x_1);
|
||||
x_389 = l_Lean_IR_Checker_markIndex___lambda__1___closed__1;
|
||||
x_390 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_390, 0, x_389);
|
||||
lean_ctor_set(x_390, 1, x_4);
|
||||
return x_390;
|
||||
x_391 = l_Lean_IR_Checker_markIndex___lambda__1___closed__1;
|
||||
x_392 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_392, 0, x_391);
|
||||
lean_ctor_set(x_392, 1, x_4);
|
||||
return x_392;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_391;
|
||||
lean_dec(x_388);
|
||||
x_391 = l_Lean_IR_Checker_checkObjType(x_1, x_3, x_4);
|
||||
lean_object* x_393;
|
||||
lean_dec(x_390);
|
||||
x_393 = l_Lean_IR_Checker_checkObjType(x_1, x_3, x_4);
|
||||
lean_dec(x_3);
|
||||
return x_391;
|
||||
return x_393;
|
||||
}
|
||||
}
|
||||
default:
|
||||
{
|
||||
lean_object* x_392; lean_object* x_393; lean_object* x_394;
|
||||
x_392 = lean_ctor_get(x_2, 0);
|
||||
lean_inc(x_392);
|
||||
lean_dec(x_2);
|
||||
x_393 = l_Lean_IR_Checker_checkObjVar(x_392, x_3, x_4);
|
||||
lean_dec(x_3);
|
||||
x_394 = lean_ctor_get(x_393, 0);
|
||||
lean_object* x_394; lean_object* x_395; lean_object* x_396;
|
||||
x_394 = lean_ctor_get(x_2, 0);
|
||||
lean_inc(x_394);
|
||||
if (lean_obj_tag(x_394) == 0)
|
||||
lean_dec(x_2);
|
||||
x_395 = l_Lean_IR_Checker_checkObjVar(x_394, x_3, x_4);
|
||||
lean_dec(x_3);
|
||||
x_396 = lean_ctor_get(x_395, 0);
|
||||
lean_inc(x_396);
|
||||
if (lean_obj_tag(x_396) == 0)
|
||||
{
|
||||
uint8_t x_395;
|
||||
uint8_t x_397;
|
||||
lean_dec(x_1);
|
||||
x_395 = !lean_is_exclusive(x_393);
|
||||
if (x_395 == 0)
|
||||
{
|
||||
lean_object* x_396; uint8_t x_397;
|
||||
x_396 = lean_ctor_get(x_393, 0);
|
||||
lean_dec(x_396);
|
||||
x_397 = !lean_is_exclusive(x_394);
|
||||
x_397 = !lean_is_exclusive(x_395);
|
||||
if (x_397 == 0)
|
||||
{
|
||||
return x_393;
|
||||
lean_object* x_398; uint8_t x_399;
|
||||
x_398 = lean_ctor_get(x_395, 0);
|
||||
lean_dec(x_398);
|
||||
x_399 = !lean_is_exclusive(x_396);
|
||||
if (x_399 == 0)
|
||||
{
|
||||
return x_395;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_398; lean_object* x_399;
|
||||
x_398 = lean_ctor_get(x_394, 0);
|
||||
lean_inc(x_398);
|
||||
lean_dec(x_394);
|
||||
x_399 = lean_alloc_ctor(0, 1, 0);
|
||||
lean_ctor_set(x_399, 0, x_398);
|
||||
lean_ctor_set(x_393, 0, x_399);
|
||||
return x_393;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_400; lean_object* x_401; lean_object* x_402; lean_object* x_403; lean_object* x_404;
|
||||
x_400 = lean_ctor_get(x_393, 1);
|
||||
lean_object* x_400; lean_object* x_401;
|
||||
x_400 = lean_ctor_get(x_396, 0);
|
||||
lean_inc(x_400);
|
||||
lean_dec(x_393);
|
||||
x_401 = lean_ctor_get(x_394, 0);
|
||||
lean_inc(x_401);
|
||||
if (lean_is_exclusive(x_394)) {
|
||||
lean_ctor_release(x_394, 0);
|
||||
x_402 = x_394;
|
||||
} else {
|
||||
lean_dec_ref(x_394);
|
||||
x_402 = lean_box(0);
|
||||
}
|
||||
if (lean_is_scalar(x_402)) {
|
||||
x_403 = lean_alloc_ctor(0, 1, 0);
|
||||
} else {
|
||||
x_403 = x_402;
|
||||
}
|
||||
lean_ctor_set(x_403, 0, x_401);
|
||||
x_404 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_404, 0, x_403);
|
||||
lean_ctor_set(x_404, 1, x_400);
|
||||
return x_404;
|
||||
lean_dec(x_396);
|
||||
x_401 = lean_alloc_ctor(0, 1, 0);
|
||||
lean_ctor_set(x_401, 0, x_400);
|
||||
lean_ctor_set(x_395, 0, x_401);
|
||||
return x_395;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_405;
|
||||
x_405 = !lean_is_exclusive(x_394);
|
||||
if (x_405 == 0)
|
||||
lean_object* x_402; lean_object* x_403; lean_object* x_404; lean_object* x_405; lean_object* x_406;
|
||||
x_402 = lean_ctor_get(x_395, 1);
|
||||
lean_inc(x_402);
|
||||
lean_dec(x_395);
|
||||
x_403 = lean_ctor_get(x_396, 0);
|
||||
lean_inc(x_403);
|
||||
if (lean_is_exclusive(x_396)) {
|
||||
lean_ctor_release(x_396, 0);
|
||||
x_404 = x_396;
|
||||
} else {
|
||||
lean_dec_ref(x_396);
|
||||
x_404 = lean_box(0);
|
||||
}
|
||||
if (lean_is_scalar(x_404)) {
|
||||
x_405 = lean_alloc_ctor(0, 1, 0);
|
||||
} else {
|
||||
x_405 = x_404;
|
||||
}
|
||||
lean_ctor_set(x_405, 0, x_403);
|
||||
x_406 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_406, 0, x_405);
|
||||
lean_ctor_set(x_406, 1, x_402);
|
||||
return x_406;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_406; uint8_t x_407;
|
||||
x_406 = lean_ctor_get(x_394, 0);
|
||||
lean_dec(x_406);
|
||||
x_407 = !lean_is_exclusive(x_393);
|
||||
uint8_t x_407;
|
||||
x_407 = !lean_is_exclusive(x_396);
|
||||
if (x_407 == 0)
|
||||
{
|
||||
lean_object* x_408; lean_object* x_409; uint8_t x_410;
|
||||
x_408 = lean_ctor_get(x_393, 0);
|
||||
lean_object* x_408; uint8_t x_409;
|
||||
x_408 = lean_ctor_get(x_396, 0);
|
||||
lean_dec(x_408);
|
||||
x_409 = lean_box(1);
|
||||
x_410 = l_Lean_IR_IRType_beq(x_1, x_409);
|
||||
if (x_410 == 0)
|
||||
x_409 = !lean_is_exclusive(x_395);
|
||||
if (x_409 == 0)
|
||||
{
|
||||
lean_object* x_411; lean_object* x_412; lean_object* x_413; lean_object* x_414; lean_object* x_415; lean_object* x_416; lean_object* x_417;
|
||||
x_411 = l___private_Lean_Compiler_IR_Format_0__Lean_IR_formatIRType(x_1);
|
||||
x_412 = l_Std_Format_defWidth;
|
||||
x_413 = lean_format_pretty(x_411, x_412);
|
||||
x_414 = l_Lean_IR_Checker_checkType___closed__1;
|
||||
x_415 = lean_string_append(x_414, x_413);
|
||||
lean_dec(x_413);
|
||||
x_416 = l_Lean_IR_Checker_getDecl___closed__2;
|
||||
x_417 = lean_string_append(x_415, x_416);
|
||||
lean_ctor_set_tag(x_394, 0);
|
||||
lean_ctor_set(x_394, 0, x_417);
|
||||
return x_393;
|
||||
lean_object* x_410; lean_object* x_411; uint8_t x_412;
|
||||
x_410 = lean_ctor_get(x_395, 0);
|
||||
lean_dec(x_410);
|
||||
x_411 = lean_box(1);
|
||||
x_412 = l_Lean_IR_IRType_beq(x_1, x_411);
|
||||
if (x_412 == 0)
|
||||
{
|
||||
lean_object* x_413; lean_object* x_414; lean_object* x_415; lean_object* x_416; lean_object* x_417; lean_object* x_418; lean_object* x_419;
|
||||
x_413 = l___private_Lean_Compiler_IR_Format_0__Lean_IR_formatIRType(x_1);
|
||||
x_414 = l_Std_Format_defWidth;
|
||||
x_415 = lean_format_pretty(x_413, x_414);
|
||||
x_416 = l_Lean_IR_Checker_checkType___closed__1;
|
||||
x_417 = lean_string_append(x_416, x_415);
|
||||
lean_dec(x_415);
|
||||
x_418 = l_Lean_IR_Checker_getDecl___closed__2;
|
||||
x_419 = lean_string_append(x_417, x_418);
|
||||
lean_ctor_set_tag(x_396, 0);
|
||||
lean_ctor_set(x_396, 0, x_419);
|
||||
return x_395;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_418;
|
||||
lean_free_object(x_394);
|
||||
lean_object* x_420;
|
||||
lean_free_object(x_396);
|
||||
lean_dec(x_1);
|
||||
x_418 = l_Lean_IR_Checker_markIndex___lambda__1___closed__1;
|
||||
lean_ctor_set(x_393, 0, x_418);
|
||||
return x_393;
|
||||
x_420 = l_Lean_IR_Checker_markIndex___lambda__1___closed__1;
|
||||
lean_ctor_set(x_395, 0, x_420);
|
||||
return x_395;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_419; lean_object* x_420; uint8_t x_421;
|
||||
x_419 = lean_ctor_get(x_393, 1);
|
||||
lean_inc(x_419);
|
||||
lean_dec(x_393);
|
||||
x_420 = lean_box(1);
|
||||
x_421 = l_Lean_IR_IRType_beq(x_1, x_420);
|
||||
if (x_421 == 0)
|
||||
lean_object* x_421; lean_object* x_422; uint8_t x_423;
|
||||
x_421 = lean_ctor_get(x_395, 1);
|
||||
lean_inc(x_421);
|
||||
lean_dec(x_395);
|
||||
x_422 = lean_box(1);
|
||||
x_423 = l_Lean_IR_IRType_beq(x_1, x_422);
|
||||
if (x_423 == 0)
|
||||
{
|
||||
lean_object* x_422; lean_object* x_423; lean_object* x_424; lean_object* x_425; lean_object* x_426; lean_object* x_427; lean_object* x_428; lean_object* x_429;
|
||||
x_422 = l___private_Lean_Compiler_IR_Format_0__Lean_IR_formatIRType(x_1);
|
||||
x_423 = l_Std_Format_defWidth;
|
||||
x_424 = lean_format_pretty(x_422, x_423);
|
||||
x_425 = l_Lean_IR_Checker_checkType___closed__1;
|
||||
x_426 = lean_string_append(x_425, x_424);
|
||||
lean_dec(x_424);
|
||||
x_427 = l_Lean_IR_Checker_getDecl___closed__2;
|
||||
x_428 = lean_string_append(x_426, x_427);
|
||||
lean_ctor_set_tag(x_394, 0);
|
||||
lean_ctor_set(x_394, 0, x_428);
|
||||
x_429 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_429, 0, x_394);
|
||||
lean_ctor_set(x_429, 1, x_419);
|
||||
return x_429;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_430; lean_object* x_431;
|
||||
lean_free_object(x_394);
|
||||
lean_dec(x_1);
|
||||
x_430 = l_Lean_IR_Checker_markIndex___lambda__1___closed__1;
|
||||
lean_object* x_424; lean_object* x_425; lean_object* x_426; lean_object* x_427; lean_object* x_428; lean_object* x_429; lean_object* x_430; lean_object* x_431;
|
||||
x_424 = l___private_Lean_Compiler_IR_Format_0__Lean_IR_formatIRType(x_1);
|
||||
x_425 = l_Std_Format_defWidth;
|
||||
x_426 = lean_format_pretty(x_424, x_425);
|
||||
x_427 = l_Lean_IR_Checker_checkType___closed__1;
|
||||
x_428 = lean_string_append(x_427, x_426);
|
||||
lean_dec(x_426);
|
||||
x_429 = l_Lean_IR_Checker_getDecl___closed__2;
|
||||
x_430 = lean_string_append(x_428, x_429);
|
||||
lean_ctor_set_tag(x_396, 0);
|
||||
lean_ctor_set(x_396, 0, x_430);
|
||||
x_431 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_431, 0, x_430);
|
||||
lean_ctor_set(x_431, 1, x_419);
|
||||
lean_ctor_set(x_431, 0, x_396);
|
||||
lean_ctor_set(x_431, 1, x_421);
|
||||
return x_431;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_432; lean_object* x_433; lean_object* x_434; uint8_t x_435;
|
||||
lean_dec(x_394);
|
||||
x_432 = lean_ctor_get(x_393, 1);
|
||||
lean_inc(x_432);
|
||||
if (lean_is_exclusive(x_393)) {
|
||||
lean_ctor_release(x_393, 0);
|
||||
lean_ctor_release(x_393, 1);
|
||||
x_433 = x_393;
|
||||
} else {
|
||||
lean_dec_ref(x_393);
|
||||
x_433 = lean_box(0);
|
||||
}
|
||||
x_434 = lean_box(1);
|
||||
x_435 = l_Lean_IR_IRType_beq(x_1, x_434);
|
||||
if (x_435 == 0)
|
||||
{
|
||||
lean_object* x_436; lean_object* x_437; lean_object* x_438; lean_object* x_439; lean_object* x_440; lean_object* x_441; lean_object* x_442; lean_object* x_443; lean_object* x_444;
|
||||
x_436 = l___private_Lean_Compiler_IR_Format_0__Lean_IR_formatIRType(x_1);
|
||||
x_437 = l_Std_Format_defWidth;
|
||||
x_438 = lean_format_pretty(x_436, x_437);
|
||||
x_439 = l_Lean_IR_Checker_checkType___closed__1;
|
||||
x_440 = lean_string_append(x_439, x_438);
|
||||
lean_dec(x_438);
|
||||
x_441 = l_Lean_IR_Checker_getDecl___closed__2;
|
||||
x_442 = lean_string_append(x_440, x_441);
|
||||
x_443 = lean_alloc_ctor(0, 1, 0);
|
||||
lean_ctor_set(x_443, 0, x_442);
|
||||
if (lean_is_scalar(x_433)) {
|
||||
x_444 = lean_alloc_ctor(0, 2, 0);
|
||||
} else {
|
||||
x_444 = x_433;
|
||||
}
|
||||
lean_ctor_set(x_444, 0, x_443);
|
||||
lean_ctor_set(x_444, 1, x_432);
|
||||
return x_444;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_445; lean_object* x_446;
|
||||
lean_object* x_432; lean_object* x_433;
|
||||
lean_free_object(x_396);
|
||||
lean_dec(x_1);
|
||||
x_445 = l_Lean_IR_Checker_markIndex___lambda__1___closed__1;
|
||||
if (lean_is_scalar(x_433)) {
|
||||
x_432 = l_Lean_IR_Checker_markIndex___lambda__1___closed__1;
|
||||
x_433 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_433, 0, x_432);
|
||||
lean_ctor_set(x_433, 1, x_421);
|
||||
return x_433;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_434; lean_object* x_435; lean_object* x_436; uint8_t x_437;
|
||||
lean_dec(x_396);
|
||||
x_434 = lean_ctor_get(x_395, 1);
|
||||
lean_inc(x_434);
|
||||
if (lean_is_exclusive(x_395)) {
|
||||
lean_ctor_release(x_395, 0);
|
||||
lean_ctor_release(x_395, 1);
|
||||
x_435 = x_395;
|
||||
} else {
|
||||
lean_dec_ref(x_395);
|
||||
x_435 = lean_box(0);
|
||||
}
|
||||
x_436 = lean_box(1);
|
||||
x_437 = l_Lean_IR_IRType_beq(x_1, x_436);
|
||||
if (x_437 == 0)
|
||||
{
|
||||
lean_object* x_438; lean_object* x_439; lean_object* x_440; lean_object* x_441; lean_object* x_442; lean_object* x_443; lean_object* x_444; lean_object* x_445; lean_object* x_446;
|
||||
x_438 = l___private_Lean_Compiler_IR_Format_0__Lean_IR_formatIRType(x_1);
|
||||
x_439 = l_Std_Format_defWidth;
|
||||
x_440 = lean_format_pretty(x_438, x_439);
|
||||
x_441 = l_Lean_IR_Checker_checkType___closed__1;
|
||||
x_442 = lean_string_append(x_441, x_440);
|
||||
lean_dec(x_440);
|
||||
x_443 = l_Lean_IR_Checker_getDecl___closed__2;
|
||||
x_444 = lean_string_append(x_442, x_443);
|
||||
x_445 = lean_alloc_ctor(0, 1, 0);
|
||||
lean_ctor_set(x_445, 0, x_444);
|
||||
if (lean_is_scalar(x_435)) {
|
||||
x_446 = lean_alloc_ctor(0, 2, 0);
|
||||
} else {
|
||||
x_446 = x_433;
|
||||
x_446 = x_435;
|
||||
}
|
||||
lean_ctor_set(x_446, 0, x_445);
|
||||
lean_ctor_set(x_446, 1, x_432);
|
||||
lean_ctor_set(x_446, 1, x_434);
|
||||
return x_446;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_447; lean_object* x_448;
|
||||
lean_dec(x_1);
|
||||
x_447 = l_Lean_IR_Checker_markIndex___lambda__1___closed__1;
|
||||
if (lean_is_scalar(x_435)) {
|
||||
x_448 = lean_alloc_ctor(0, 2, 0);
|
||||
} else {
|
||||
x_448 = x_435;
|
||||
}
|
||||
lean_ctor_set(x_448, 0, x_447);
|
||||
lean_ctor_set(x_448, 1, x_434);
|
||||
return x_448;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
44
stage0/stdlib/Lean/CoreM.c
generated
44
stage0/stdlib/Lean/CoreM.c
generated
|
|
@ -54,6 +54,7 @@ lean_object* l_Lean_Core_withCurrHeartbeats___rarg(lean_object*, lean_object*, l
|
|||
lean_object* l_Lean_Core_instMonadRecDepthCoreM___lambda__3(lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Core_instMonadEnvCoreM___closed__1;
|
||||
lean_object* lean_array_get_size(lean_object*);
|
||||
static lean_object* l_Lean_addMessageContextPartial___at_Lean_Core_instAddMessageContextCoreM___spec__1___closed__3;
|
||||
lean_object* lean_string_append(lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Core_checkMaxHeartbeatsCore___closed__6;
|
||||
lean_object* l_Lean_Core_instMonadRefCoreM___lambda__1(lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -204,6 +205,7 @@ lean_object* l_Lean_Core_instMonadNameGeneratorCoreM___lambda__1(lean_object*, l
|
|||
static lean_object* l_Lean_Core_instInhabitedState___closed__9;
|
||||
lean_object* l_IO_println___at_Lean_instEval__1___spec__1(lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Core_instInhabitedState___closed__4;
|
||||
static lean_object* l_Lean_addMessageContextPartial___at_Lean_Core_instAddMessageContextCoreM___spec__1___closed__4;
|
||||
lean_object* l_Lean_catchInternalId(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_catchInternalId___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Core_instMonadNameGeneratorCoreM___closed__1;
|
||||
|
|
@ -1227,8 +1229,20 @@ static lean_object* _init_l_Lean_addMessageContextPartial___at_Lean_Core_instAdd
|
|||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
x_1 = l_Lean_Core_instInhabitedState___closed__3;
|
||||
x_2 = lean_unsigned_to_nat(0u);
|
||||
x_3 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_3, 0, x_1);
|
||||
lean_ctor_set(x_3, 1, x_2);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_addMessageContextPartial___at_Lean_Core_instAddMessageContextCoreM___spec__1___closed__2() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
x_1 = lean_unsigned_to_nat(0u);
|
||||
x_2 = l_Lean_Core_instInhabitedState___closed__4;
|
||||
x_2 = l_Lean_addMessageContextPartial___at_Lean_Core_instAddMessageContextCoreM___spec__1___closed__1;
|
||||
x_3 = lean_alloc_ctor(0, 7, 0);
|
||||
lean_ctor_set(x_3, 0, x_1);
|
||||
lean_ctor_set(x_3, 1, x_1);
|
||||
|
|
@ -1240,11 +1254,23 @@ lean_ctor_set(x_3, 6, x_2);
|
|||
return x_3;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_addMessageContextPartial___at_Lean_Core_instAddMessageContextCoreM___spec__1___closed__2() {
|
||||
static lean_object* _init_l_Lean_addMessageContextPartial___at_Lean_Core_instAddMessageContextCoreM___spec__1___closed__3() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
x_1 = l_Lean_Core_instInhabitedState___closed__4;
|
||||
x_1 = l_Lean_Core_instInhabitedState___closed__3;
|
||||
x_2 = lean_unsigned_to_nat(0u);
|
||||
x_3 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_3, 0, x_1);
|
||||
lean_ctor_set(x_3, 1, x_2);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_addMessageContextPartial___at_Lean_Core_instAddMessageContextCoreM___spec__1___closed__4() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
x_1 = l_Lean_addMessageContextPartial___at_Lean_Core_instAddMessageContextCoreM___spec__1___closed__3;
|
||||
x_2 = l_Lean_Core_State_traceState___default___closed__3;
|
||||
x_3 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_3, 0, x_1);
|
||||
|
|
@ -1266,8 +1292,8 @@ x_8 = lean_ctor_get(x_7, 0);
|
|||
lean_inc(x_8);
|
||||
lean_dec(x_7);
|
||||
x_9 = lean_ctor_get(x_2, 0);
|
||||
x_10 = l_Lean_addMessageContextPartial___at_Lean_Core_instAddMessageContextCoreM___spec__1___closed__1;
|
||||
x_11 = l_Lean_addMessageContextPartial___at_Lean_Core_instAddMessageContextCoreM___spec__1___closed__2;
|
||||
x_10 = l_Lean_addMessageContextPartial___at_Lean_Core_instAddMessageContextCoreM___spec__1___closed__2;
|
||||
x_11 = l_Lean_addMessageContextPartial___at_Lean_Core_instAddMessageContextCoreM___spec__1___closed__4;
|
||||
lean_inc(x_9);
|
||||
x_12 = lean_alloc_ctor(0, 4, 0);
|
||||
lean_ctor_set(x_12, 0, x_8);
|
||||
|
|
@ -1292,8 +1318,8 @@ x_16 = lean_ctor_get(x_14, 0);
|
|||
lean_inc(x_16);
|
||||
lean_dec(x_14);
|
||||
x_17 = lean_ctor_get(x_2, 0);
|
||||
x_18 = l_Lean_addMessageContextPartial___at_Lean_Core_instAddMessageContextCoreM___spec__1___closed__1;
|
||||
x_19 = l_Lean_addMessageContextPartial___at_Lean_Core_instAddMessageContextCoreM___spec__1___closed__2;
|
||||
x_18 = l_Lean_addMessageContextPartial___at_Lean_Core_instAddMessageContextCoreM___spec__1___closed__2;
|
||||
x_19 = l_Lean_addMessageContextPartial___at_Lean_Core_instAddMessageContextCoreM___spec__1___closed__4;
|
||||
lean_inc(x_17);
|
||||
x_20 = lean_alloc_ctor(0, 4, 0);
|
||||
lean_ctor_set(x_20, 0, x_16);
|
||||
|
|
@ -4780,6 +4806,10 @@ l_Lean_addMessageContextPartial___at_Lean_Core_instAddMessageContextCoreM___spec
|
|||
lean_mark_persistent(l_Lean_addMessageContextPartial___at_Lean_Core_instAddMessageContextCoreM___spec__1___closed__1);
|
||||
l_Lean_addMessageContextPartial___at_Lean_Core_instAddMessageContextCoreM___spec__1___closed__2 = _init_l_Lean_addMessageContextPartial___at_Lean_Core_instAddMessageContextCoreM___spec__1___closed__2();
|
||||
lean_mark_persistent(l_Lean_addMessageContextPartial___at_Lean_Core_instAddMessageContextCoreM___spec__1___closed__2);
|
||||
l_Lean_addMessageContextPartial___at_Lean_Core_instAddMessageContextCoreM___spec__1___closed__3 = _init_l_Lean_addMessageContextPartial___at_Lean_Core_instAddMessageContextCoreM___spec__1___closed__3();
|
||||
lean_mark_persistent(l_Lean_addMessageContextPartial___at_Lean_Core_instAddMessageContextCoreM___spec__1___closed__3);
|
||||
l_Lean_addMessageContextPartial___at_Lean_Core_instAddMessageContextCoreM___spec__1___closed__4 = _init_l_Lean_addMessageContextPartial___at_Lean_Core_instAddMessageContextCoreM___spec__1___closed__4();
|
||||
lean_mark_persistent(l_Lean_addMessageContextPartial___at_Lean_Core_instAddMessageContextCoreM___spec__1___closed__4);
|
||||
l_Lean_Core_instAddMessageContextCoreM___closed__1 = _init_l_Lean_Core_instAddMessageContextCoreM___closed__1();
|
||||
lean_mark_persistent(l_Lean_Core_instAddMessageContextCoreM___closed__1);
|
||||
l_Lean_Core_instAddMessageContextCoreM = _init_l_Lean_Core_instAddMessageContextCoreM();
|
||||
|
|
|
|||
3763
stage0/stdlib/Lean/Data/Xml/Parser.c
generated
3763
stage0/stdlib/Lean/Data/Xml/Parser.c
generated
File diff suppressed because it is too large
Load diff
4
stage0/stdlib/Lean/Elab/App.c
generated
4
stage0/stdlib/Lean/Elab/App.c
generated
|
|
@ -38,6 +38,7 @@ lean_object* l_Lean_Meta_withLocalDecl___at___private_Lean_Elab_App_0__Lean_Elab
|
|||
static lean_object* l_Lean_Elab_Term_throwInvalidNamedArg___rarg___closed__1;
|
||||
lean_object* l_Lean_Expr_mvarId_x21(lean_object*);
|
||||
lean_object* l_List_tail_x21___rarg(lean_object*);
|
||||
lean_object* l_Lean_Meta_mkFreshLevelMVar(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_registerTraceClass(lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Elab_Term_elabAppArgs___closed__12;
|
||||
static lean_object* l___private_Lean_Elab_App_0__Lean_Elab_Term_ElabAppArgs_synthesizePendingAndNormalizeFunType___closed__5;
|
||||
|
|
@ -707,7 +708,6 @@ lean_object* l___private_Lean_Elab_App_0__Lean_Elab_Term_ElabAppArgs_isNextArgHo
|
|||
lean_object* l_Lean_Meta_withLocalDecl___at___private_Lean_Elab_App_0__Lean_Elab_Term_ElabAppArgs_addEtaArg___spec__1(lean_object*);
|
||||
static lean_object* l_Lean_Elab_Term_elabAppArgs___closed__3;
|
||||
lean_object* l_Lean_MonadRef_mkInfoFromRefPos___at___private_Lean_Elab_App_0__Lean_Elab_Term_ElabAppArgs_processExplictArg___spec__2___rarg___boxed(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_mkFreshLevelMVar___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Syntax_getArg(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_throwUnknownConstant___at___private_Lean_Elab_App_0__Lean_Elab_Term_resolveLValAux___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_MonadRef_mkInfoFromRefPos___at___private_Lean_Elab_App_0__Lean_Elab_Term_ElabAppArgs_processExplictArg___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -1924,7 +1924,7 @@ lean_object* l___private_Lean_Elab_App_0__Lean_Elab_Term_tryCoeFun_x3f(lean_obje
|
|||
_start:
|
||||
{
|
||||
lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; uint8_t x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23;
|
||||
x_10 = l_Lean_Meta_mkFreshLevelMVar___rarg(x_6, x_7, x_8, x_9);
|
||||
x_10 = l_Lean_Meta_mkFreshLevelMVar(x_5, x_6, x_7, x_8, x_9);
|
||||
x_11 = lean_ctor_get(x_10, 0);
|
||||
lean_inc(x_11);
|
||||
x_12 = lean_ctor_get(x_10, 1);
|
||||
|
|
|
|||
14
stage0/stdlib/Lean/Elab/Attributes.c
generated
14
stage0/stdlib/Lean/Elab/Attributes.c
generated
|
|
@ -144,7 +144,6 @@ static lean_object* l_Lean_Elab_toAttributeKind___closed__4;
|
|||
lean_object* l_List_forM___at_Lean_Elab_elabAttr___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_List_forM___at_Lean_Elab_elabAttr___spec__2(lean_object*);
|
||||
static lean_object* l_Lean_Elab_toAttributeKind___closed__2;
|
||||
lean_object* l_Lean_Elab_liftMacroM___at_Lean_Elab_elabAttr___spec__1___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_instToFormatAttribute_match__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Elab_toAttributeKind___closed__8;
|
||||
lean_object* l_Lean_Elab_elabAttr___rarg___lambda__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -1360,7 +1359,7 @@ _start:
|
|||
{
|
||||
lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23;
|
||||
lean_inc(x_1);
|
||||
x_13 = lean_alloc_closure((void*)(l_Lean_Elab_liftMacroM___at_Lean_Elab_elabAttr___spec__1___rarg___lambda__1___boxed), 4, 1);
|
||||
x_13 = lean_alloc_closure((void*)(l_Lean_Elab_liftMacroM___at_Lean_Elab_elabAttr___spec__1___rarg___lambda__1), 4, 1);
|
||||
lean_closure_set(x_13, 0, x_1);
|
||||
lean_inc(x_2);
|
||||
x_14 = lean_alloc_closure((void*)(l_ReaderT_pure___at_Lean_Elab_liftMacroM___spec__1___rarg___boxed), 3, 1);
|
||||
|
|
@ -1805,7 +1804,7 @@ _start:
|
|||
{
|
||||
lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23;
|
||||
lean_inc(x_1);
|
||||
x_13 = lean_alloc_closure((void*)(l_Lean_Elab_liftMacroM___at_Lean_Elab_elabAttr___spec__1___rarg___lambda__1___boxed), 4, 1);
|
||||
x_13 = lean_alloc_closure((void*)(l_Lean_Elab_liftMacroM___at_Lean_Elab_elabAttr___spec__1___rarg___lambda__1), 4, 1);
|
||||
lean_closure_set(x_13, 0, x_1);
|
||||
lean_inc(x_2);
|
||||
x_14 = lean_alloc_closure((void*)(l_ReaderT_pure___at_Lean_Elab_liftMacroM___spec__1___rarg___boxed), 3, 1);
|
||||
|
|
@ -2272,15 +2271,6 @@ x_9 = l_List_forM___at_Lean_Elab_elabAttr___spec__2___rarg___lambda__3(x_1, x_2,
|
|||
return x_9;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_liftMacroM___at_Lean_Elab_elabAttr___spec__1___rarg___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_5;
|
||||
x_5 = l_Lean_Elab_liftMacroM___at_Lean_Elab_elabAttr___spec__1___rarg___lambda__1(x_1, x_2, x_3, x_4);
|
||||
lean_dec(x_1);
|
||||
return x_5;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_liftMacroM___at_Lean_Elab_elabAttr___spec__1___rarg___lambda__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
|
|
|
|||
99
stage0/stdlib/Lean/Elab/Binders.c
generated
99
stage0/stdlib/Lean/Elab/Binders.c
generated
|
|
@ -21,6 +21,7 @@ static lean_object* l_Lean_Elab_Term_expandWhereDecls___closed__9;
|
|||
static lean_object* l___private_Lean_Elab_Binders_0__Lean_Elab_Term_matchBinder___closed__6;
|
||||
lean_object* l_Lean_Elab_Term_elabBinder___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_elabLetDeclCore_match__1(lean_object*);
|
||||
lean_object* l_Lean_mkFreshFVarId___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_elabBinders(lean_object*);
|
||||
lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_matchBinder___spec__5(lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_MonadRef_mkInfoFromRefPos___at_myMacro____x40_Init_Notation___hyg_72____spec__1(lean_object*, lean_object*);
|
||||
|
|
@ -46,6 +47,7 @@ lean_object* lean_erase_macro_scopes(lean_object*);
|
|||
static lean_object* l_Lean_Elab_Term_elabLetDeclCore___closed__12;
|
||||
static lean_object* l_Lean_Elab_Term_expandWhereDecls___closed__1;
|
||||
static lean_object* l_Lean_Elab_Term_elabLetDeclAux___lambda__1___closed__3;
|
||||
lean_object* l_Lean_Meta_withLCtx___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__3___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_stringToMessageData(lean_object*);
|
||||
static lean_object* l___private_Lean_Elab_Binders_0__Lean_Elab_Term_expandBinderIdent___closed__2;
|
||||
lean_object* l_Lean_Elab_Term_elabDepArrow___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -63,7 +65,6 @@ lean_object* l_Lean_MonadRef_mkInfoFromRefPos___at_Lean_Elab_Term_quoteAutoTacti
|
|||
static lean_object* l___private_Lean_Elab_Binders_0__Lean_Elab_Term_expandBinderModifier___closed__11;
|
||||
lean_object* lean_name_mk_string(lean_object*, lean_object*);
|
||||
static lean_object* l___private_Lean_Elab_Binders_0__Lean_Elab_Term_elabBinderViews_loop___rarg___closed__2;
|
||||
lean_object* l_Lean_Meta_withLCtx___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_elabDepArrow(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Elab_Term_elabArrow___closed__1;
|
||||
lean_object* lean_array_uget(lean_object*, size_t);
|
||||
|
|
@ -155,6 +156,7 @@ static lean_object* l___regBuiltin_Lean_Elab_Term_elabDepArrow___closed__3;
|
|||
static lean_object* l___regBuiltin_Lean_Elab_Term_expandFun___closed__1;
|
||||
lean_object* l___private_Lean_Elab_Binders_0__Lean_Elab_Term_expandMatchAltsIntoMatchAux_match__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l___regBuiltin_Lean_Elab_Term_expandFun___closed__2;
|
||||
lean_object* l_Lean_mkFreshId___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__2___rarg(lean_object*, lean_object*);
|
||||
lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_Term_expandFunBinders_loop___spec__3(lean_object*, size_t, size_t, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_elabLetDeclCore_match__1___rarg(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_throwError___at_Lean_Elab_Term_elabFun___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -238,7 +240,6 @@ static lean_object* l_Lean_Elab_Term_quoteAutoTactic___closed__30;
|
|||
lean_object* lean_nat_sub(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_declareTacticSyntax(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Elab_Term_quoteAutoTactic___closed__33;
|
||||
lean_object* l_Lean_Meta_withLCtx___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__2(lean_object*);
|
||||
lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_getBinderIds___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Elab_Term_quoteAutoTactic___closed__14;
|
||||
lean_object* l_Lean_Elab_throwUnsupportedSyntax___at_Lean_Elab_Term_precheckFun___spec__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -249,6 +250,7 @@ static lean_object* l___private_Lean_Elab_Binders_0__Lean_Elab_Term_expandBinder
|
|||
static lean_object* l_Lean_Elab_Term_elabLetDeclAux___closed__1;
|
||||
static lean_object* l___private_Lean_Elab_Binders_0__Lean_Elab_Term_expandOptIdent___closed__3;
|
||||
lean_object* l_Lean_Elab_Term_withMacroExpansion___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_withLCtx___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__3(lean_object*);
|
||||
static lean_object* l___regBuiltin_Lean_Elab_Term_elabFun___closed__1;
|
||||
lean_object* l_Lean_Elab_Term_elabLetDeclAux___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Elab_Term_expandLetEqnsDecl___closed__2;
|
||||
|
|
@ -293,6 +295,7 @@ static lean_object* l_Lean_Elab_Term_elabLetDeclCore___closed__1;
|
|||
lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_matchBinder___spec__2(lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
uint8_t l_Lean_Option_get___at_Lean_ppExpr___spec__1(lean_object*, lean_object*);
|
||||
static lean_object* l___private_Lean_Elab_Binders_0__Lean_Elab_Term_expandMatchAltsIntoMatchAux___closed__8;
|
||||
lean_object* l_Lean_mkFreshId___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__2___rarg___boxed(lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Meta_Basic_0__Lean_Meta_forallTelescopeReducingAux___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_mkFreshIdent___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_getFunBinderIds_x3f___spec__1(lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l___private_Lean_Elab_Binders_0__Lean_Elab_Term_expandMatchAltsIntoMatchAux___closed__5;
|
||||
|
|
@ -323,7 +326,6 @@ uint8_t l_Lean_Environment_contains(lean_object*, lean_object*);
|
|||
lean_object* l_Lean_Elab_Term_mkFreshBinderName___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_expandBinderIdent___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_expandOptType(lean_object*, lean_object*);
|
||||
static lean_object* l___private_Lean_Elab_Binders_0__Lean_Elab_Term_registerFailedToInferBinderTypeInfo___closed__3;
|
||||
lean_object* l_Lean_Elab_liftMacroM___at_Lean_Elab_Term_precheckFun___spec__1___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Elab_Term_elabForall___closed__2;
|
||||
lean_object* l_Lean_Elab_Term_elabLetDeclAux___lambda__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Elab_Term_quoteAutoTactic___closed__24;
|
||||
|
|
@ -358,7 +360,6 @@ uint8_t l_Lean_BinderInfo_isInstImplicit(uint8_t);
|
|||
lean_object* l_Lean_Elab_liftMacroM___at_Lean_Elab_Term_precheckFun___spec__1___lambda__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_Term_precheckFun___spec__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l___private_Lean_Elab_Binders_0__Lean_Elab_Term_expandBinderModifier___closed__14;
|
||||
lean_object* l_Lean_mkFreshId___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_expandWhereDeclsOpt___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_mkFVar(lean_object*);
|
||||
static lean_object* l___private_Lean_Elab_Binders_0__Lean_Elab_Term_expandBinderModifier___closed__5;
|
||||
|
|
@ -420,7 +421,6 @@ static lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_Term_quoteAutoTactic
|
|||
lean_object* l_Lean_Elab_Term_elabFunBinders___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Syntax_setArg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* lean_environment_main_module(lean_object*);
|
||||
lean_object* l_Lean_mkFreshId___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Elab_Term_expandWhereDecls___closed__3;
|
||||
static lean_object* l___private_Lean_Elab_Binders_0__Lean_Elab_Term_expandMatchAltsIntoMatchAux___closed__11;
|
||||
lean_object* l___private_Lean_Elab_Binders_0__Lean_Elab_Term_getBinderIds___boxed__const__1;
|
||||
|
|
@ -500,7 +500,6 @@ static lean_object* l_Lean_Elab_Term_expandFunBinders_loop___closed__14;
|
|||
static lean_object* l_Lean_Elab_Term_quoteAutoTactic___closed__1;
|
||||
static lean_object* l___private_Lean_Elab_Binders_0__Lean_Elab_Term_matchBinder___closed__8;
|
||||
lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_Term_expandFunBinders_loop___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_mkFreshId___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__1___rarg(lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Elab_Term_expandFunBinders_loop___closed__5;
|
||||
static lean_object* l_Lean_Elab_Term_expandFunBinders_loop___closed__15;
|
||||
static lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_getFunBinderIds_x3f___spec__3___closed__2;
|
||||
|
|
@ -536,10 +535,12 @@ static lean_object* l_Lean_Elab_Term_elabLetDeclAux___lambda__3___closed__2;
|
|||
lean_object* l_Lean_Elab_throwUnsupportedSyntax___at_Lean_Elab_Term_elabFun___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Elab_Term_elabLetDeclCore___closed__8;
|
||||
static lean_object* l_Lean_Elab_Term_quoteAutoTactic___closed__11;
|
||||
lean_object* l_Lean_mkFreshId___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___regBuiltin_Lean_Elab_Term_elabLetDecl(lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_expandFunBinders_loop_match__3___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Meta_Basic_0__Lean_Meta_withLocalContextImp___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l___regBuiltin_Lean_Elab_Term_elabLetDecl___closed__3;
|
||||
lean_object* l_Lean_mkFreshId___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_unsafeCast(lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Elab_Term_elabLetDeclCore___closed__14;
|
||||
lean_object* l_Lean_Elab_throwUnsupportedSyntax___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_expandBinderModifier___spec__1___rarg(lean_object*);
|
||||
|
|
@ -580,8 +581,8 @@ static lean_object* l_Lean_Elab_Term_expandFunBinders_loop___closed__17;
|
|||
static lean_object* l___private_Lean_Elab_Binders_0__Lean_Elab_Term_expandBinderModifier___closed__1;
|
||||
lean_object* l_Lean_Elab_Term_declareTacticSyntax___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Elab_Term_quoteAutoTactic___closed__34;
|
||||
lean_object* l_Lean_mkFreshFVarId___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_expandWhereDeclsOpt(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_mkFreshId___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__1___rarg___boxed(lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Elab_Binders_0__Lean_Elab_Term_getMatchAltsNumPatterns___boxed(lean_object*);
|
||||
static lean_object* l___private_Lean_Elab_Binders_0__Lean_Elab_Term_matchBinder___closed__1;
|
||||
static lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_Term_quoteAutoTactic___spec__2___closed__6;
|
||||
|
|
@ -17729,7 +17730,7 @@ x_2 = lean_alloc_closure((void*)(l___private_Lean_Elab_Binders_0__Lean_Elab_Term
|
|||
return x_2;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_mkFreshId___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__1___rarg(lean_object* x_1, lean_object* x_2) {
|
||||
lean_object* l_Lean_mkFreshId___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__2___rarg(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; uint8_t x_7;
|
||||
|
|
@ -17896,15 +17897,40 @@ return x_48;
|
|||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_mkFreshId___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
|
||||
lean_object* l_Lean_mkFreshId___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_6;
|
||||
x_6 = lean_alloc_closure((void*)(l_Lean_mkFreshId___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__1___rarg___boxed), 2, 0);
|
||||
x_6 = lean_alloc_closure((void*)(l_Lean_mkFreshId___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__2___rarg___boxed), 2, 0);
|
||||
return x_6;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Meta_withLCtx___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__2___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) {
|
||||
lean_object* l_Lean_mkFreshFVarId___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_8; uint8_t x_9;
|
||||
x_8 = l_Lean_mkFreshId___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__2___rarg(x_6, x_7);
|
||||
x_9 = !lean_is_exclusive(x_8);
|
||||
if (x_9 == 0)
|
||||
{
|
||||
return x_8;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_10; lean_object* x_11; lean_object* x_12;
|
||||
x_10 = lean_ctor_get(x_8, 0);
|
||||
x_11 = lean_ctor_get(x_8, 1);
|
||||
lean_inc(x_11);
|
||||
lean_inc(x_10);
|
||||
lean_dec(x_8);
|
||||
x_12 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_12, 0, x_10);
|
||||
lean_ctor_set(x_12, 1, x_11);
|
||||
return x_12;
|
||||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Meta_withLCtx___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__3___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_11; lean_object* x_12;
|
||||
|
|
@ -17956,11 +17982,11 @@ return x_20;
|
|||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Meta_withLCtx___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__2(lean_object* x_1) {
|
||||
lean_object* l_Lean_Meta_withLCtx___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__3(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_2;
|
||||
x_2 = lean_alloc_closure((void*)(l_Lean_Meta_withLCtx___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__2___rarg), 10, 0);
|
||||
x_2 = lean_alloc_closure((void*)(l_Lean_Meta_withLCtx___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__3___rarg), 10, 0);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
|
|
@ -17988,7 +18014,7 @@ x_18 = l___private_Lean_Elab_Binders_0__Lean_Elab_Term_registerFailedToInferBind
|
|||
x_19 = lean_ctor_get(x_18, 1);
|
||||
lean_inc(x_19);
|
||||
lean_dec(x_18);
|
||||
x_20 = l_Lean_mkFreshId___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__1___rarg(x_13, x_19);
|
||||
x_20 = l_Lean_mkFreshFVarId___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__1(x_8, x_9, x_10, x_11, x_12, x_13, x_19);
|
||||
x_21 = lean_ctor_get(x_20, 0);
|
||||
lean_inc(x_21);
|
||||
x_22 = lean_ctor_get(x_20, 1);
|
||||
|
|
@ -18615,7 +18641,7 @@ x_23 = l_Lean_replaceRef(x_17, x_22);
|
|||
lean_dec(x_22);
|
||||
lean_dec(x_17);
|
||||
lean_ctor_set(x_8, 3, x_23);
|
||||
x_24 = l_Lean_Meta_withLCtx___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__2___rarg(x_18, x_19, x_20, x_4, x_5, x_6, x_7, x_8, x_9, x_16);
|
||||
x_24 = l_Lean_Meta_withLCtx___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__3___rarg(x_18, x_19, x_20, x_4, x_5, x_6, x_7, x_8, x_9, x_16);
|
||||
return x_24;
|
||||
}
|
||||
else
|
||||
|
|
@ -18650,7 +18676,7 @@ lean_ctor_set(x_34, 4, x_29);
|
|||
lean_ctor_set(x_34, 5, x_30);
|
||||
lean_ctor_set(x_34, 6, x_31);
|
||||
lean_ctor_set(x_34, 7, x_32);
|
||||
x_35 = l_Lean_Meta_withLCtx___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__2___rarg(x_18, x_19, x_20, x_4, x_5, x_6, x_7, x_34, x_9, x_16);
|
||||
x_35 = l_Lean_Meta_withLCtx___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__3___rarg(x_18, x_19, x_20, x_4, x_5, x_6, x_7, x_34, x_9, x_16);
|
||||
return x_35;
|
||||
}
|
||||
}
|
||||
|
|
@ -18689,20 +18715,20 @@ return x_39;
|
|||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_mkFreshId___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__1___rarg___boxed(lean_object* x_1, lean_object* x_2) {
|
||||
lean_object* l_Lean_mkFreshId___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__2___rarg___boxed(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_3;
|
||||
x_3 = l_Lean_mkFreshId___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__1___rarg(x_1, x_2);
|
||||
x_3 = l_Lean_mkFreshId___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__2___rarg(x_1, x_2);
|
||||
lean_dec(x_1);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_mkFreshId___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
|
||||
lean_object* l_Lean_mkFreshId___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_6;
|
||||
x_6 = l_Lean_mkFreshId___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__1(x_1, x_2, x_3, x_4, x_5);
|
||||
x_6 = l_Lean_mkFreshId___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__2(x_1, x_2, x_3, x_4, x_5);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_3);
|
||||
|
|
@ -18711,6 +18737,20 @@ lean_dec(x_1);
|
|||
return x_6;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_mkFreshFVarId___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_8;
|
||||
x_8 = l_Lean_mkFreshFVarId___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7);
|
||||
lean_dec(x_6);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_3);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
return x_8;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_Term_FunBinders_elabFunBindersAux(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) {
|
||||
_start:
|
||||
{
|
||||
|
|
@ -18906,7 +18946,7 @@ x_29 = lean_apply_2(x_3, x_27, x_28);
|
|||
if (x_25 == 0)
|
||||
{
|
||||
lean_object* x_30;
|
||||
x_30 = l_Lean_Meta_withLCtx___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__2___rarg(x_26, x_23, x_29, x_4, x_5, x_6, x_7, x_8, x_9, x_21);
|
||||
x_30 = l_Lean_Meta_withLCtx___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__3___rarg(x_26, x_23, x_29, x_4, x_5, x_6, x_7, x_8, x_9, x_21);
|
||||
return x_30;
|
||||
}
|
||||
else
|
||||
|
|
@ -18922,7 +18962,7 @@ lean_inc(x_9);
|
|||
lean_inc(x_8);
|
||||
lean_inc(x_7);
|
||||
lean_inc(x_6);
|
||||
x_34 = l_Lean_Meta_withLCtx___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__2___rarg(x_26, x_23, x_29, x_4, x_5, x_6, x_7, x_8, x_9, x_33);
|
||||
x_34 = l_Lean_Meta_withLCtx___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__3___rarg(x_26, x_23, x_29, x_4, x_5, x_6, x_7, x_8, x_9, x_33);
|
||||
if (lean_obj_tag(x_34) == 0)
|
||||
{
|
||||
lean_object* x_35; lean_object* x_36; lean_object* x_37; uint8_t x_38;
|
||||
|
|
@ -22186,7 +22226,7 @@ lean_inc(x_14);
|
|||
x_15 = lean_ctor_get(x_7, 5);
|
||||
lean_inc(x_15);
|
||||
lean_inc(x_13);
|
||||
x_16 = lean_alloc_closure((void*)(l_Lean_Elab_liftMacroM___at_Lean_Elab_Term_precheckFun___spec__1___lambda__1___boxed), 4, 1);
|
||||
x_16 = lean_alloc_closure((void*)(l_Lean_Elab_liftMacroM___at_Lean_Elab_Term_precheckFun___spec__1___lambda__1), 4, 1);
|
||||
lean_closure_set(x_16, 0, x_13);
|
||||
lean_inc(x_14);
|
||||
x_17 = lean_alloc_closure((void*)(l_ReaderT_pure___at_Lean_Elab_liftMacroM___spec__1___rarg___boxed), 3, 1);
|
||||
|
|
@ -22817,15 +22857,6 @@ lean_dec(x_1);
|
|||
return x_8;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_liftMacroM___at_Lean_Elab_Term_precheckFun___spec__1___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_5;
|
||||
x_5 = l_Lean_Elab_liftMacroM___at_Lean_Elab_Term_precheckFun___spec__1___lambda__1(x_1, x_2, x_3, x_4);
|
||||
lean_dec(x_1);
|
||||
return x_5;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_liftMacroM___at_Lean_Elab_Term_precheckFun___spec__1___lambda__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
|
|
@ -23068,7 +23099,7 @@ lean_inc(x_13);
|
|||
x_14 = lean_ctor_get(x_6, 5);
|
||||
lean_inc(x_14);
|
||||
lean_inc(x_12);
|
||||
x_15 = lean_alloc_closure((void*)(l_Lean_Elab_liftMacroM___at_Lean_Elab_Term_precheckFun___spec__1___lambda__1___boxed), 4, 1);
|
||||
x_15 = lean_alloc_closure((void*)(l_Lean_Elab_liftMacroM___at_Lean_Elab_Term_precheckFun___spec__1___lambda__1), 4, 1);
|
||||
lean_closure_set(x_15, 0, x_12);
|
||||
lean_inc(x_13);
|
||||
x_16 = lean_alloc_closure((void*)(l_ReaderT_pure___at_Lean_Elab_liftMacroM___spec__1___rarg___boxed), 3, 1);
|
||||
|
|
@ -25138,7 +25169,7 @@ lean_inc(x_13);
|
|||
x_14 = lean_ctor_get(x_6, 5);
|
||||
lean_inc(x_14);
|
||||
lean_inc(x_12);
|
||||
x_15 = lean_alloc_closure((void*)(l_Lean_Elab_liftMacroM___at_Lean_Elab_Term_precheckFun___spec__1___lambda__1___boxed), 4, 1);
|
||||
x_15 = lean_alloc_closure((void*)(l_Lean_Elab_liftMacroM___at_Lean_Elab_Term_precheckFun___spec__1___lambda__1), 4, 1);
|
||||
lean_closure_set(x_15, 0, x_12);
|
||||
lean_inc(x_13);
|
||||
x_16 = lean_alloc_closure((void*)(l_ReaderT_pure___at_Lean_Elab_liftMacroM___spec__1___rarg___boxed), 3, 1);
|
||||
|
|
|
|||
12
stage0/stdlib/Lean/Elab/BuiltinNotation.c
generated
12
stage0/stdlib/Lean/Elab/BuiltinNotation.c
generated
|
|
@ -95,7 +95,6 @@ static lean_object* l___regBuiltin_Lean_Elab_Term_expandAssert___closed__5;
|
|||
lean_object* lean_st_ref_get(lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Elab_Term_expandHave___closed__9;
|
||||
static lean_object* l___regBuiltin_Lean_Elab_Term_elabPanic___closed__5;
|
||||
lean_object* l_Lean_Elab_liftMacroM___at_Lean_Elab_Term_elabCDotFunctionAlias_x3f___spec__1___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l___regBuiltin_Lean_Elab_Term_elabAnonymousCtor___closed__5;
|
||||
static lean_object* l_Lean_Elab_Term_elabCDotFunctionAlias_x3f___closed__5;
|
||||
uint8_t lean_name_eq(lean_object*, lean_object*);
|
||||
|
|
@ -12151,7 +12150,7 @@ lean_inc(x_13);
|
|||
x_14 = lean_ctor_get(x_6, 5);
|
||||
lean_inc(x_14);
|
||||
lean_inc(x_12);
|
||||
x_15 = lean_alloc_closure((void*)(l_Lean_Elab_liftMacroM___at_Lean_Elab_Term_elabCDotFunctionAlias_x3f___spec__1___lambda__1___boxed), 4, 1);
|
||||
x_15 = lean_alloc_closure((void*)(l_Lean_Elab_liftMacroM___at_Lean_Elab_Term_elabCDotFunctionAlias_x3f___spec__1___lambda__1), 4, 1);
|
||||
lean_closure_set(x_15, 0, x_12);
|
||||
lean_inc(x_13);
|
||||
x_16 = lean_alloc_closure((void*)(l_ReaderT_pure___at_Lean_Elab_liftMacroM___spec__1___rarg___boxed), 3, 1);
|
||||
|
|
@ -13374,15 +13373,6 @@ lean_dec(x_1);
|
|||
return x_7;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_liftMacroM___at_Lean_Elab_Term_elabCDotFunctionAlias_x3f___spec__1___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_5;
|
||||
x_5 = l_Lean_Elab_liftMacroM___at_Lean_Elab_Term_elabCDotFunctionAlias_x3f___spec__1___lambda__1(x_1, x_2, x_3, x_4);
|
||||
lean_dec(x_1);
|
||||
return x_5;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_liftMacroM___at_Lean_Elab_Term_elabCDotFunctionAlias_x3f___spec__1___lambda__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
|
|
|
|||
129
stage0/stdlib/Lean/Elab/Command.c
generated
129
stage0/stdlib/Lean/Elab/Command.c
generated
|
|
@ -74,12 +74,11 @@ lean_object* l_Lean_Elab_Command_instMonadInfoTreeCommandElabM___lambda__1___box
|
|||
lean_object* l_Array_append___rarg(lean_object*, lean_object*);
|
||||
lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_Command_liftTermElabM___spec__11(lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_Command_liftTermElabM___spec__11___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_liftMacroM___at_Lean_Elab_Command_elabCommand___spec__2___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Command_instMonadTraceCommandElabM___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l___private_Lean_DocString_0__Lean_docStringExt;
|
||||
lean_object* l___private_Std_Data_PersistentArray_0__Std_PersistentArray_foldlMAux___at___private_Lean_Elab_Command_0__Lean_Elab_Command_addTraceAsMessagesCore___spec__10(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Elab_Command_0__Lean_Elab_Command_liftAttrM___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static uint32_t l_Lean_Elab_Command_instInhabitedState___closed__3;
|
||||
static lean_object* l_Lean_Elab_Command_instInhabitedState___closed__3;
|
||||
static lean_object* l_Lean_Elab_Command_instMonadRecDepthCommandElabM___closed__1;
|
||||
lean_object* l_Lean_Elab_Command_liftIO(lean_object*);
|
||||
lean_object* l_Std_PersistentArray_forInAux___at_Lean_Elab_Command_elabCommandTopLevel___spec__3___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -148,7 +147,7 @@ lean_object* lean_array_get_size(lean_object*);
|
|||
static lean_object* l_Lean_Elab_Command_instInhabitedState___closed__5;
|
||||
static lean_object* l_Lean_Elab_addMacroStack___at_Lean_Elab_Command_instAddErrorMessageContextCommandElabM___spec__1___closed__1;
|
||||
static lean_object* l_Lean_Elab_Command_State_messages___default___closed__1;
|
||||
static size_t l_Lean_Elab_Command_instInhabitedState___closed__7;
|
||||
static lean_object* l_Lean_Elab_Command_instInhabitedState___closed__7;
|
||||
static lean_object* l_Lean_Elab_Command_mkCommandElabAttributeUnsafe___closed__10;
|
||||
lean_object* l_Lean_Elab_InfoTree_substitute(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_TermElabM_run___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -179,7 +178,6 @@ lean_object* l_Lean_throwError___at_Lean_Elab_Command_elabCommand___spec__1___bo
|
|||
static lean_object* l_Lean_Elab_Command_instMonadCommandElabM___closed__3;
|
||||
lean_object* l_Lean_Elab_Command_elabCommand_match__2(lean_object*);
|
||||
lean_object* l_Lean_Elab_log___at_Lean_Elab_Command_runLinters___spec__3(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_expandMacroImpl_x3f___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Command_getLevelNames___rarg(lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Elab_Command_instMonadRefCommandElabM___closed__2;
|
||||
lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Elab_Command_0__Lean_Elab_Command_mkTermContext___spec__1(lean_object*, size_t, size_t, lean_object*);
|
||||
|
|
@ -252,7 +250,7 @@ static lean_object* l_Lean_Elab_Command_State_nextMacroScope___default___closed_
|
|||
lean_object* l_Lean_Option_get___at_Lean_initFn____x40_Lean_Util_PPExt___hyg_218____spec__1(lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_addMessageContextPartial___at_Lean_Elab_Command_instAddMessageContextCommandElabM___spec__1___closed__1;
|
||||
uint8_t lean_nat_dec_eq(lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Elab_Command_instInhabitedState___closed__8;
|
||||
static size_t l_Lean_Elab_Command_instInhabitedState___closed__8;
|
||||
lean_object* l_Lean_Elab_Command_instInhabitedCommandElabM(lean_object*);
|
||||
static lean_object* l_Lean_Elab_Command_instMonadEnvCommandElabM___closed__1;
|
||||
lean_object* l_Lean_Elab_Command_liftEIO___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -345,6 +343,7 @@ lean_object* l_Lean_throwError___at___private_Lean_Elab_Command_0__Lean_Elab_Com
|
|||
static lean_object* l_Lean_Elab_Command_instInhabitedState___closed__6;
|
||||
lean_object* l_Lean_Elab_Command_commandElabAttribute___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* lean_st_mk_ref(lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Elab_Command_instInhabitedState___closed__13;
|
||||
lean_object* l_Lean_Core_getMaxHeartbeats(lean_object*);
|
||||
lean_object* l_Lean_Elab_Command_initFn____x40_Lean_Elab_Command___hyg_348_(lean_object*);
|
||||
lean_object* l_Lean_Elab_Command_initFn____x40_Lean_Elab_Command___hyg_1642_(lean_object*);
|
||||
|
|
@ -375,6 +374,7 @@ uint8_t l_Lean_Environment_contains(lean_object*, lean_object*);
|
|||
lean_object* l_Lean_Elab_Command_commandElabAttribute___lambda__1(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_InfoCacheKey_instHashableInfoCacheKey___boxed(lean_object*);
|
||||
lean_object* l_Lean_Elab_Command_getScopes(lean_object*);
|
||||
static lean_object* l_Lean_addMessageContextPartial___at_Lean_Elab_Command_instAddMessageContextCommandElabM___spec__1___closed__3;
|
||||
extern lean_object* l_Lean_protectedExt;
|
||||
static lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_Command_expandDeclId___spec__4___closed__7;
|
||||
lean_object* l_Lean_Elab_Command_Context_currRecDepth___default;
|
||||
|
|
@ -441,7 +441,6 @@ lean_object* l_Lean_Elab_Command_withMacroExpansion(lean_object*);
|
|||
lean_object* l_Lean_Elab_Command_withLogging_match__1(lean_object*);
|
||||
lean_object* l_Lean_Elab_Command_modifyScope_match__1___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_InternalExceptionId_getName(lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_NameSet_empty;
|
||||
lean_object* l_Lean_Elab_expandDeclIdCore(lean_object*);
|
||||
lean_object* l_Lean_Elab_mkDeclName___at_Lean_Elab_Command_expandDeclId___spec__2___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Elab_checkNotAlreadyDeclared___at_Lean_Elab_Command_expandDeclId___spec__6___lambda__2___closed__1;
|
||||
|
|
@ -533,7 +532,7 @@ lean_object* l_Lean_Elab_Command_instInhabitedScope;
|
|||
lean_object* l_Lean_throwErrorAt___at_Lean_Elab_Command_elabCommand___spec__6(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_addTrace___at_Lean_Elab_Command_elabCommand___spec__4___closed__5;
|
||||
static lean_object* l_Lean_Elab_Command_instMonadRecDepthCommandElabM___closed__3;
|
||||
static lean_object* l_Lean_Elab_Command_instInhabitedState___closed__4;
|
||||
static uint32_t l_Lean_Elab_Command_instInhabitedState___closed__4;
|
||||
static lean_object* l_Lean_Elab_Command_Scope_varDecls___default___closed__1;
|
||||
static lean_object* l_Lean_Elab_Command_State_infoState___default___closed__3;
|
||||
lean_object* l_Lean_Elab_Command_runTermElabM_match__1(lean_object*);
|
||||
|
|
@ -1018,10 +1017,22 @@ return x_2;
|
|||
static lean_object* _init_l_Lean_Elab_Command_instInhabitedState___closed__2() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
x_1 = l_Lean_Elab_Command_State_infoState___default___closed__2;
|
||||
x_2 = lean_unsigned_to_nat(0u);
|
||||
x_3 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_3, 0, x_1);
|
||||
lean_ctor_set(x_3, 1, x_2);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Elab_Command_instInhabitedState___closed__3() {
|
||||
_start:
|
||||
{
|
||||
uint8_t x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_1 = 1;
|
||||
x_2 = l_Lean_Elab_Command_instInhabitedState___closed__1;
|
||||
x_3 = l_Lean_Elab_Command_State_infoState___default___closed__3;
|
||||
x_3 = l_Lean_Elab_Command_instInhabitedState___closed__2;
|
||||
x_4 = lean_alloc_ctor(0, 2, 1);
|
||||
lean_ctor_set(x_4, 0, x_2);
|
||||
lean_ctor_set(x_4, 1, x_3);
|
||||
|
|
@ -1029,7 +1040,7 @@ lean_ctor_set_uint8(x_4, sizeof(void*)*2, x_1);
|
|||
return x_4;
|
||||
}
|
||||
}
|
||||
static uint32_t _init_l_Lean_Elab_Command_instInhabitedState___closed__3() {
|
||||
static uint32_t _init_l_Lean_Elab_Command_instInhabitedState___closed__4() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; uint32_t x_2;
|
||||
|
|
@ -1038,11 +1049,11 @@ x_2 = lean_uint32_of_nat(x_1);
|
|||
return x_2;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Elab_Command_instInhabitedState___closed__4() {
|
||||
static lean_object* _init_l_Lean_Elab_Command_instInhabitedState___closed__5() {
|
||||
_start:
|
||||
{
|
||||
uint32_t x_1; uint8_t x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5;
|
||||
x_1 = l_Lean_Elab_Command_instInhabitedState___closed__3;
|
||||
x_1 = l_Lean_Elab_Command_instInhabitedState___closed__4;
|
||||
x_2 = 0;
|
||||
x_3 = lean_box(0);
|
||||
x_4 = l_Lean_Elab_Command_Scope_varDecls___default___closed__1;
|
||||
|
|
@ -1056,14 +1067,14 @@ lean_ctor_set_uint8(x_5, sizeof(void*)*4 + 4, x_2);
|
|||
return x_5;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Elab_Command_instInhabitedState___closed__5() {
|
||||
static lean_object* _init_l_Lean_Elab_Command_instInhabitedState___closed__6() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5;
|
||||
x_1 = l_Lean_Elab_Command_instInhabitedState___closed__1;
|
||||
x_2 = l_Lean_Elab_Command_instInhabitedState___closed__2;
|
||||
x_2 = l_Lean_Elab_Command_instInhabitedState___closed__3;
|
||||
x_3 = l_Lean_Elab_Command_Scope_varDecls___default___closed__1;
|
||||
x_4 = l_Lean_Elab_Command_instInhabitedState___closed__4;
|
||||
x_4 = l_Lean_Elab_Command_instInhabitedState___closed__5;
|
||||
x_5 = lean_alloc_ctor(0, 4, 0);
|
||||
lean_ctor_set(x_5, 0, x_1);
|
||||
lean_ctor_set(x_5, 1, x_2);
|
||||
|
|
@ -1072,7 +1083,7 @@ lean_ctor_set(x_5, 3, x_4);
|
|||
return x_5;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Elab_Command_instInhabitedState___closed__6() {
|
||||
static lean_object* _init_l_Lean_Elab_Command_instInhabitedState___closed__7() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2;
|
||||
|
|
@ -1082,7 +1093,7 @@ lean_ctor_set(x_2, 0, x_1);
|
|||
return x_2;
|
||||
}
|
||||
}
|
||||
static size_t _init_l_Lean_Elab_Command_instInhabitedState___closed__7() {
|
||||
static size_t _init_l_Lean_Elab_Command_instInhabitedState___closed__8() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; size_t x_2;
|
||||
|
|
@ -1091,14 +1102,14 @@ x_2 = lean_usize_of_nat(x_1);
|
|||
return x_2;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Elab_Command_instInhabitedState___closed__8() {
|
||||
static lean_object* _init_l_Lean_Elab_Command_instInhabitedState___closed__9() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3; size_t x_4; lean_object* x_5;
|
||||
x_1 = l_Lean_Elab_Command_instInhabitedState___closed__6;
|
||||
x_1 = l_Lean_Elab_Command_instInhabitedState___closed__7;
|
||||
x_2 = l_Lean_Elab_Command_Scope_varDecls___default___closed__1;
|
||||
x_3 = lean_unsigned_to_nat(0u);
|
||||
x_4 = l_Lean_Elab_Command_instInhabitedState___closed__7;
|
||||
x_4 = l_Lean_Elab_Command_instInhabitedState___closed__8;
|
||||
x_5 = lean_alloc_ctor(0, 4, sizeof(size_t)*1);
|
||||
lean_ctor_set(x_5, 0, x_1);
|
||||
lean_ctor_set(x_5, 1, x_2);
|
||||
|
|
@ -1108,7 +1119,7 @@ lean_ctor_set_usize(x_5, 4, x_4);
|
|||
return x_5;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Elab_Command_instInhabitedState___closed__9() {
|
||||
static lean_object* _init_l_Lean_Elab_Command_instInhabitedState___closed__10() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
|
|
@ -1120,13 +1131,13 @@ lean_ctor_set(x_3, 1, x_2);
|
|||
return x_3;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Elab_Command_instInhabitedState___closed__10() {
|
||||
static lean_object* _init_l_Lean_Elab_Command_instInhabitedState___closed__11() {
|
||||
_start:
|
||||
{
|
||||
uint8_t x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_1 = 0;
|
||||
x_2 = l_Lean_Elab_Command_State_infoState___default___closed__3;
|
||||
x_3 = l_Lean_Elab_Command_instInhabitedState___closed__8;
|
||||
x_3 = l_Lean_Elab_Command_instInhabitedState___closed__9;
|
||||
x_4 = lean_alloc_ctor(0, 2, 1);
|
||||
lean_ctor_set(x_4, 0, x_2);
|
||||
lean_ctor_set(x_4, 1, x_3);
|
||||
|
|
@ -1134,29 +1145,29 @@ lean_ctor_set_uint8(x_4, sizeof(void*)*2, x_1);
|
|||
return x_4;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Elab_Command_instInhabitedState___closed__11() {
|
||||
static lean_object* _init_l_Lean_Elab_Command_instInhabitedState___closed__12() {
|
||||
_start:
|
||||
{
|
||||
uint8_t x_1; lean_object* x_2; lean_object* x_3;
|
||||
x_1 = 0;
|
||||
x_2 = l_Lean_Elab_Command_instInhabitedState___closed__8;
|
||||
x_2 = l_Lean_Elab_Command_instInhabitedState___closed__9;
|
||||
x_3 = lean_alloc_ctor(0, 1, 1);
|
||||
lean_ctor_set(x_3, 0, x_2);
|
||||
lean_ctor_set_uint8(x_3, sizeof(void*)*1, x_1);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Elab_Command_instInhabitedState___closed__12() {
|
||||
static lean_object* _init_l_Lean_Elab_Command_instInhabitedState___closed__13() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8;
|
||||
x_1 = lean_box(0);
|
||||
x_2 = l_Lean_Elab_Command_instInhabitedState___closed__5;
|
||||
x_3 = l_Lean_Elab_Command_instInhabitedState___closed__8;
|
||||
x_2 = l_Lean_Elab_Command_instInhabitedState___closed__6;
|
||||
x_3 = l_Lean_Elab_Command_instInhabitedState___closed__9;
|
||||
x_4 = lean_unsigned_to_nat(0u);
|
||||
x_5 = l_Lean_Elab_Command_instInhabitedState___closed__9;
|
||||
x_6 = l_Lean_Elab_Command_instInhabitedState___closed__10;
|
||||
x_7 = l_Lean_Elab_Command_instInhabitedState___closed__11;
|
||||
x_5 = l_Lean_Elab_Command_instInhabitedState___closed__10;
|
||||
x_6 = l_Lean_Elab_Command_instInhabitedState___closed__11;
|
||||
x_7 = l_Lean_Elab_Command_instInhabitedState___closed__12;
|
||||
x_8 = lean_alloc_ctor(0, 9, 0);
|
||||
lean_ctor_set(x_8, 0, x_2);
|
||||
lean_ctor_set(x_8, 1, x_3);
|
||||
|
|
@ -1174,7 +1185,7 @@ static lean_object* _init_l_Lean_Elab_Command_instInhabitedState() {
|
|||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = l_Lean_Elab_Command_instInhabitedState___closed__12;
|
||||
x_1 = l_Lean_Elab_Command_instInhabitedState___closed__13;
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
|
|
@ -2017,7 +2028,19 @@ static lean_object* _init_l_Lean_addMessageContextPartial___at_Lean_Elab_Command
|
|||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
x_1 = l_Lean_Elab_Command_State_infoState___default___closed__3;
|
||||
x_1 = l_Lean_Elab_Command_State_infoState___default___closed__2;
|
||||
x_2 = lean_unsigned_to_nat(0u);
|
||||
x_3 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_3, 0, x_1);
|
||||
lean_ctor_set(x_3, 1, x_2);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_addMessageContextPartial___at_Lean_Elab_Command_instAddMessageContextCommandElabM___spec__1___closed__3() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
x_1 = l_Lean_addMessageContextPartial___at_Lean_Elab_Command_instAddMessageContextCommandElabM___spec__1___closed__2;
|
||||
x_2 = l_Lean_Elab_Command_State_messages___default___closed__3;
|
||||
x_3 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_3, 0, x_1);
|
||||
|
|
@ -2053,7 +2076,7 @@ x_14 = lean_ctor_get(x_13, 1);
|
|||
lean_inc(x_14);
|
||||
lean_dec(x_13);
|
||||
x_15 = l_Lean_addMessageContextPartial___at_Lean_Elab_Command_instAddMessageContextCommandElabM___spec__1___closed__1;
|
||||
x_16 = l_Lean_addMessageContextPartial___at_Lean_Elab_Command_instAddMessageContextCommandElabM___spec__1___closed__2;
|
||||
x_16 = l_Lean_addMessageContextPartial___at_Lean_Elab_Command_instAddMessageContextCommandElabM___spec__1___closed__3;
|
||||
x_17 = lean_alloc_ctor(0, 4, 0);
|
||||
lean_ctor_set(x_17, 0, x_8);
|
||||
lean_ctor_set(x_17, 1, x_15);
|
||||
|
|
@ -2082,7 +2105,7 @@ x_23 = lean_ctor_get(x_22, 1);
|
|||
lean_inc(x_23);
|
||||
lean_dec(x_22);
|
||||
x_24 = l_Lean_addMessageContextPartial___at_Lean_Elab_Command_instAddMessageContextCommandElabM___spec__1___closed__1;
|
||||
x_25 = l_Lean_addMessageContextPartial___at_Lean_Elab_Command_instAddMessageContextCommandElabM___spec__1___closed__2;
|
||||
x_25 = l_Lean_addMessageContextPartial___at_Lean_Elab_Command_instAddMessageContextCommandElabM___spec__1___closed__3;
|
||||
x_26 = lean_alloc_ctor(0, 4, 0);
|
||||
lean_ctor_set(x_26, 0, x_8);
|
||||
lean_ctor_set(x_26, 1, x_24);
|
||||
|
|
@ -6248,7 +6271,7 @@ _start:
|
|||
{
|
||||
lean_object* x_1; uint32_t x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_1 = lean_box(0);
|
||||
x_2 = l_Lean_Elab_Command_instInhabitedState___closed__3;
|
||||
x_2 = l_Lean_Elab_Command_instInhabitedState___closed__4;
|
||||
x_3 = l_Lean_Elab_Command_instInhabitedScope___closed__1;
|
||||
x_4 = lean_alloc_ctor(0, 2, 4);
|
||||
lean_ctor_set(x_4, 0, x_1);
|
||||
|
|
@ -10643,7 +10666,7 @@ x_16 = lean_ctor_get(x_14, 3);
|
|||
lean_inc(x_16);
|
||||
lean_dec(x_14);
|
||||
lean_inc(x_8);
|
||||
x_17 = lean_alloc_closure((void*)(l_Lean_Elab_liftMacroM___at_Lean_Elab_Command_elabCommand___spec__2___lambda__1___boxed), 4, 1);
|
||||
x_17 = lean_alloc_closure((void*)(l_Lean_Elab_liftMacroM___at_Lean_Elab_Command_elabCommand___spec__2___lambda__1), 4, 1);
|
||||
lean_closure_set(x_17, 0, x_8);
|
||||
lean_inc(x_12);
|
||||
x_18 = lean_alloc_closure((void*)(l_ReaderT_pure___at_Lean_Elab_liftMacroM___spec__1___rarg___boxed), 3, 1);
|
||||
|
|
@ -11257,7 +11280,7 @@ x_11 = lean_ctor_get(x_9, 0);
|
|||
lean_inc(x_11);
|
||||
lean_inc(x_1);
|
||||
lean_inc(x_11);
|
||||
x_12 = lean_alloc_closure((void*)(l_Lean_Elab_expandMacroImpl_x3f___boxed), 4, 2);
|
||||
x_12 = lean_alloc_closure((void*)(l_Lean_Elab_expandMacroImpl_x3f), 4, 2);
|
||||
lean_closure_set(x_12, 0, x_11);
|
||||
lean_closure_set(x_12, 1, x_1);
|
||||
lean_inc(x_5);
|
||||
|
|
@ -11277,7 +11300,6 @@ lean_dec(x_13);
|
|||
x_16 = l_Lean_Elab_Command_commandElabAttribute;
|
||||
lean_inc(x_2);
|
||||
x_17 = l_Lean_KeyedDeclsAttribute_getEntries___rarg(x_16, x_11, x_2);
|
||||
lean_dec(x_11);
|
||||
if (lean_obj_tag(x_17) == 0)
|
||||
{
|
||||
lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23;
|
||||
|
|
@ -11578,15 +11600,6 @@ lean_dec(x_1);
|
|||
return x_3;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_liftMacroM___at_Lean_Elab_Command_elabCommand___spec__2___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_5;
|
||||
x_5 = l_Lean_Elab_liftMacroM___at_Lean_Elab_Command_elabCommand___spec__2___lambda__1(x_1, x_2, x_3, x_4);
|
||||
lean_dec(x_1);
|
||||
return x_5;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_liftMacroM___at_Lean_Elab_Command_elabCommand___spec__2___lambda__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
|
|
@ -14272,7 +14285,7 @@ _start:
|
|||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6;
|
||||
x_1 = lean_box(0);
|
||||
x_2 = l___private_Lean_Elab_Command_0__Lean_Elab_Command_mkMetaContext___closed__1;
|
||||
x_3 = l_Lean_addMessageContextPartial___at_Lean_Elab_Command_instAddMessageContextCommandElabM___spec__1___closed__2;
|
||||
x_3 = l_Lean_addMessageContextPartial___at_Lean_Elab_Command_instAddMessageContextCommandElabM___spec__1___closed__3;
|
||||
x_4 = l_Lean_Elab_Command_Scope_varDecls___default___closed__1;
|
||||
x_5 = lean_unsigned_to_nat(0u);
|
||||
x_6 = lean_alloc_ctor(0, 5, 0);
|
||||
|
|
@ -17356,14 +17369,14 @@ static lean_object* _init_l_Lean_Elab_Command_liftTermElabM___rarg___closed__9()
|
|||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5;
|
||||
x_1 = l_Lean_addMessageContextPartial___at_Lean_Elab_Command_instAddMessageContextCommandElabM___spec__1___closed__1;
|
||||
x_2 = l_Lean_Elab_Command_liftTermElabM___rarg___closed__8;
|
||||
x_3 = l_Lean_NameSet_empty;
|
||||
x_1 = lean_box(0);
|
||||
x_2 = l_Lean_addMessageContextPartial___at_Lean_Elab_Command_instAddMessageContextCommandElabM___spec__1___closed__1;
|
||||
x_3 = l_Lean_Elab_Command_liftTermElabM___rarg___closed__8;
|
||||
x_4 = l_Lean_Elab_Command_State_messages___default___closed__3;
|
||||
x_5 = lean_alloc_ctor(0, 4, 0);
|
||||
lean_ctor_set(x_5, 0, x_1);
|
||||
lean_ctor_set(x_5, 1, x_2);
|
||||
lean_ctor_set(x_5, 2, x_3);
|
||||
lean_ctor_set(x_5, 0, x_2);
|
||||
lean_ctor_set(x_5, 1, x_3);
|
||||
lean_ctor_set(x_5, 2, x_1);
|
||||
lean_ctor_set(x_5, 3, x_4);
|
||||
return x_5;
|
||||
}
|
||||
|
|
@ -21309,15 +21322,15 @@ lean_mark_persistent(l_Lean_Elab_Command_instInhabitedState___closed__1);
|
|||
l_Lean_Elab_Command_instInhabitedState___closed__2 = _init_l_Lean_Elab_Command_instInhabitedState___closed__2();
|
||||
lean_mark_persistent(l_Lean_Elab_Command_instInhabitedState___closed__2);
|
||||
l_Lean_Elab_Command_instInhabitedState___closed__3 = _init_l_Lean_Elab_Command_instInhabitedState___closed__3();
|
||||
lean_mark_persistent(l_Lean_Elab_Command_instInhabitedState___closed__3);
|
||||
l_Lean_Elab_Command_instInhabitedState___closed__4 = _init_l_Lean_Elab_Command_instInhabitedState___closed__4();
|
||||
lean_mark_persistent(l_Lean_Elab_Command_instInhabitedState___closed__4);
|
||||
l_Lean_Elab_Command_instInhabitedState___closed__5 = _init_l_Lean_Elab_Command_instInhabitedState___closed__5();
|
||||
lean_mark_persistent(l_Lean_Elab_Command_instInhabitedState___closed__5);
|
||||
l_Lean_Elab_Command_instInhabitedState___closed__6 = _init_l_Lean_Elab_Command_instInhabitedState___closed__6();
|
||||
lean_mark_persistent(l_Lean_Elab_Command_instInhabitedState___closed__6);
|
||||
l_Lean_Elab_Command_instInhabitedState___closed__7 = _init_l_Lean_Elab_Command_instInhabitedState___closed__7();
|
||||
lean_mark_persistent(l_Lean_Elab_Command_instInhabitedState___closed__7);
|
||||
l_Lean_Elab_Command_instInhabitedState___closed__8 = _init_l_Lean_Elab_Command_instInhabitedState___closed__8();
|
||||
lean_mark_persistent(l_Lean_Elab_Command_instInhabitedState___closed__8);
|
||||
l_Lean_Elab_Command_instInhabitedState___closed__9 = _init_l_Lean_Elab_Command_instInhabitedState___closed__9();
|
||||
lean_mark_persistent(l_Lean_Elab_Command_instInhabitedState___closed__9);
|
||||
l_Lean_Elab_Command_instInhabitedState___closed__10 = _init_l_Lean_Elab_Command_instInhabitedState___closed__10();
|
||||
|
|
@ -21326,6 +21339,8 @@ l_Lean_Elab_Command_instInhabitedState___closed__11 = _init_l_Lean_Elab_Command_
|
|||
lean_mark_persistent(l_Lean_Elab_Command_instInhabitedState___closed__11);
|
||||
l_Lean_Elab_Command_instInhabitedState___closed__12 = _init_l_Lean_Elab_Command_instInhabitedState___closed__12();
|
||||
lean_mark_persistent(l_Lean_Elab_Command_instInhabitedState___closed__12);
|
||||
l_Lean_Elab_Command_instInhabitedState___closed__13 = _init_l_Lean_Elab_Command_instInhabitedState___closed__13();
|
||||
lean_mark_persistent(l_Lean_Elab_Command_instInhabitedState___closed__13);
|
||||
l_Lean_Elab_Command_instInhabitedState = _init_l_Lean_Elab_Command_instInhabitedState();
|
||||
lean_mark_persistent(l_Lean_Elab_Command_instInhabitedState);
|
||||
l_Lean_Elab_Command_Context_currRecDepth___default = _init_l_Lean_Elab_Command_Context_currRecDepth___default();
|
||||
|
|
@ -21385,6 +21400,8 @@ l_Lean_addMessageContextPartial___at_Lean_Elab_Command_instAddMessageContextComm
|
|||
lean_mark_persistent(l_Lean_addMessageContextPartial___at_Lean_Elab_Command_instAddMessageContextCommandElabM___spec__1___closed__1);
|
||||
l_Lean_addMessageContextPartial___at_Lean_Elab_Command_instAddMessageContextCommandElabM___spec__1___closed__2 = _init_l_Lean_addMessageContextPartial___at_Lean_Elab_Command_instAddMessageContextCommandElabM___spec__1___closed__2();
|
||||
lean_mark_persistent(l_Lean_addMessageContextPartial___at_Lean_Elab_Command_instAddMessageContextCommandElabM___spec__1___closed__2);
|
||||
l_Lean_addMessageContextPartial___at_Lean_Elab_Command_instAddMessageContextCommandElabM___spec__1___closed__3 = _init_l_Lean_addMessageContextPartial___at_Lean_Elab_Command_instAddMessageContextCommandElabM___spec__1___closed__3();
|
||||
lean_mark_persistent(l_Lean_addMessageContextPartial___at_Lean_Elab_Command_instAddMessageContextCommandElabM___spec__1___closed__3);
|
||||
l_Lean_Elab_Command_instAddMessageContextCommandElabM___closed__1 = _init_l_Lean_Elab_Command_instAddMessageContextCommandElabM___closed__1();
|
||||
lean_mark_persistent(l_Lean_Elab_Command_instAddMessageContextCommandElabM___closed__1);
|
||||
l_Lean_Elab_Command_instAddMessageContextCommandElabM = _init_l_Lean_Elab_Command_instAddMessageContextCommandElabM();
|
||||
|
|
|
|||
18
stage0/stdlib/Lean/Elab/DefView.c
generated
18
stage0/stdlib/Lean/Elab/DefView.c
generated
|
|
@ -58,7 +58,6 @@ lean_object* lean_array_get_size(lean_object*);
|
|||
lean_object* l_Lean_Elab_DefKind_isTheorem_match__1___rarg___boxed(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_throwError___at_Lean_Elab_Command_mkDefViewOfInstance___spec__3(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Elab_DefView_0__Lean_Elab_Command_MkInstanceName_kindReplacements;
|
||||
lean_object* l_Lean_Elab_liftMacroM___at_Lean_Elab_Command_MkInstanceName_main___spec__1___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* lean_string_append(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_throwError___at_Lean_Elab_Command_mkDefViewOfInstance___spec__7___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l___private_Lean_Elab_DefView_0__Lean_Elab_Command_MkInstanceName_kindReplacements___closed__1;
|
||||
|
|
@ -5331,7 +5330,7 @@ x_16 = lean_ctor_get(x_14, 3);
|
|||
lean_inc(x_16);
|
||||
lean_dec(x_14);
|
||||
lean_inc(x_8);
|
||||
x_17 = lean_alloc_closure((void*)(l_Lean_Elab_liftMacroM___at_Lean_Elab_Command_MkInstanceName_main___spec__1___lambda__1___boxed), 4, 1);
|
||||
x_17 = lean_alloc_closure((void*)(l_Lean_Elab_liftMacroM___at_Lean_Elab_Command_MkInstanceName_main___spec__1___lambda__1), 4, 1);
|
||||
lean_closure_set(x_17, 0, x_8);
|
||||
lean_inc(x_12);
|
||||
x_18 = lean_alloc_closure((void*)(l_ReaderT_pure___at_Lean_Elab_liftMacroM___spec__1___rarg___boxed), 3, 1);
|
||||
|
|
@ -5710,7 +5709,7 @@ x_16 = lean_ctor_get(x_14, 3);
|
|||
lean_inc(x_16);
|
||||
lean_dec(x_14);
|
||||
lean_inc(x_8);
|
||||
x_17 = lean_alloc_closure((void*)(l_Lean_Elab_liftMacroM___at_Lean_Elab_Command_MkInstanceName_main___spec__1___lambda__1___boxed), 4, 1);
|
||||
x_17 = lean_alloc_closure((void*)(l_Lean_Elab_liftMacroM___at_Lean_Elab_Command_MkInstanceName_main___spec__1___lambda__1), 4, 1);
|
||||
lean_closure_set(x_17, 0, x_8);
|
||||
lean_inc(x_12);
|
||||
x_18 = lean_alloc_closure((void*)(l_ReaderT_pure___at_Lean_Elab_liftMacroM___spec__1___rarg___boxed), 3, 1);
|
||||
|
|
@ -6045,15 +6044,6 @@ lean_dec(x_1);
|
|||
return x_3;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_liftMacroM___at_Lean_Elab_Command_MkInstanceName_main___spec__1___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_5;
|
||||
x_5 = l_Lean_Elab_liftMacroM___at_Lean_Elab_Command_MkInstanceName_main___spec__1___lambda__1(x_1, x_2, x_3, x_4);
|
||||
lean_dec(x_1);
|
||||
return x_5;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_liftMacroM___at_Lean_Elab_Command_MkInstanceName_main___spec__1___lambda__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
|
|
@ -6561,7 +6551,7 @@ x_16 = lean_ctor_get(x_14, 3);
|
|||
lean_inc(x_16);
|
||||
lean_dec(x_14);
|
||||
lean_inc(x_8);
|
||||
x_17 = lean_alloc_closure((void*)(l_Lean_Elab_liftMacroM___at_Lean_Elab_Command_MkInstanceName_main___spec__1___lambda__1___boxed), 4, 1);
|
||||
x_17 = lean_alloc_closure((void*)(l_Lean_Elab_liftMacroM___at_Lean_Elab_Command_MkInstanceName_main___spec__1___lambda__1), 4, 1);
|
||||
lean_closure_set(x_17, 0, x_8);
|
||||
lean_inc(x_12);
|
||||
x_18 = lean_alloc_closure((void*)(l_ReaderT_pure___at_Lean_Elab_liftMacroM___spec__1___rarg___boxed), 3, 1);
|
||||
|
|
@ -6940,7 +6930,7 @@ x_16 = lean_ctor_get(x_14, 3);
|
|||
lean_inc(x_16);
|
||||
lean_dec(x_14);
|
||||
lean_inc(x_8);
|
||||
x_17 = lean_alloc_closure((void*)(l_Lean_Elab_liftMacroM___at_Lean_Elab_Command_MkInstanceName_main___spec__1___lambda__1___boxed), 4, 1);
|
||||
x_17 = lean_alloc_closure((void*)(l_Lean_Elab_liftMacroM___at_Lean_Elab_Command_MkInstanceName_main___spec__1___lambda__1), 4, 1);
|
||||
lean_closure_set(x_17, 0, x_8);
|
||||
lean_inc(x_12);
|
||||
x_18 = lean_alloc_closure((void*)(l_ReaderT_pure___at_Lean_Elab_liftMacroM___spec__1___rarg___boxed), 3, 1);
|
||||
|
|
|
|||
2394
stage0/stdlib/Lean/Elab/Deriving/BEq.c
generated
2394
stage0/stdlib/Lean/Elab/Deriving/BEq.c
generated
File diff suppressed because it is too large
Load diff
4
stage0/stdlib/Lean/Elab/Deriving/Basic.c
generated
4
stage0/stdlib/Lean/Elab/Deriving/Basic.c
generated
|
|
@ -126,6 +126,7 @@ lean_object* l_Lean_Elab_resolveGlobalConstNoOverloadWithInfo___at_Lean_Elab_ela
|
|||
static lean_object* l_Lean_Elab_registerBuiltinDerivingHandlerWithArgs___lambda__2___closed__2;
|
||||
static lean_object* l_Lean_Elab_elabDeriving___closed__6;
|
||||
lean_object* l_Lean_throwError___at_Lean_Elab_elabDeriving___spec__15(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_List_mapTRAux___at_Lean_Meta_substCore___spec__6(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_ResolveName_resolveGlobalName(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
size_t lean_usize_of_nat(lean_object*);
|
||||
lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_elabDeriving___spec__18___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -208,7 +209,6 @@ lean_object* l_Lean_Elab_pushInfoTree___at_Lean_Elab_elabDeriving___spec__17(lea
|
|||
lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_elabDeriving___spec__19___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_List_toString___at_Lean_resolveGlobalConstNoOverloadCore___spec__2(lean_object*);
|
||||
static lean_object* l___regBuiltin_Lean_Elab_elabDeriving___closed__1;
|
||||
lean_object* l_List_mapTRAux___at_Lean_Meta_IndPredBelow_mkBelow___spec__4(lean_object*, lean_object*);
|
||||
lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_getOptDerivingClasses___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*);
|
||||
lean_object* l_Lean_mkConst(lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Elab_Deriving_Basic_0__Lean_Elab_tryApplyDefHandler(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -559,7 +559,7 @@ lean_ctor_set(x_10, 0, x_8);
|
|||
lean_ctor_set(x_10, 1, x_9);
|
||||
x_11 = lean_array_to_list(lean_box(0), x_2);
|
||||
x_12 = lean_box(0);
|
||||
x_13 = l_List_mapTRAux___at_Lean_Meta_IndPredBelow_mkBelow___spec__4(x_11, x_12);
|
||||
x_13 = l_List_mapTRAux___at_Lean_Meta_substCore___spec__6(x_11, x_12);
|
||||
x_14 = l_Lean_MessageData_ofList(x_13);
|
||||
lean_dec(x_13);
|
||||
x_15 = lean_alloc_ctor(10, 2, 0);
|
||||
|
|
|
|||
3637
stage0/stdlib/Lean/Elab/Deriving/DecEq.c
generated
3637
stage0/stdlib/Lean/Elab/Deriving/DecEq.c
generated
File diff suppressed because one or more lines are too long
2607
stage0/stdlib/Lean/Elab/Deriving/Inhabited.c
generated
2607
stage0/stdlib/Lean/Elab/Deriving/Inhabited.c
generated
File diff suppressed because it is too large
Load diff
151
stage0/stdlib/Lean/Elab/Do.c
generated
151
stage0/stdlib/Lean/Elab/Do.c
generated
|
|
@ -431,6 +431,7 @@ lean_object* l_Lean_Elab_Term_tryPostponeIfNoneOrMVar(lean_object*, lean_object*
|
|||
static lean_object* l_Lean_Elab_Term_Do_pullExitPointsAux___lambda__1___closed__12;
|
||||
lean_object* l_Lean_Elab_Term_Do_ToTerm_mkJoinPoint_match__1(lean_object*);
|
||||
lean_object* l_Lean_ResolveName_resolveNamespace_x3f(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Std_RBNode_setBlack___rarg(lean_object*);
|
||||
static lean_object* l_Lean_Elab_Term_Do_ToCodeBlock_doTryToCode___lambda__4___closed__1;
|
||||
lean_object* l_Lean_Elab_Term_Do_getLetDeclVars(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___regBuiltin_Lean_Elab_Term_expandTermReturn(lean_object*);
|
||||
|
|
@ -592,6 +593,7 @@ static lean_object* l_Lean_Elab_Term_Do_ToTerm_continueToTerm___closed__32;
|
|||
static lean_object* l_Lean_Elab_Term_Do_ToTerm_continueToTerm___closed__10;
|
||||
lean_object* l_Lean_Syntax_setKind(lean_object*, lean_object*);
|
||||
lean_object* l_instInhabited___rarg(lean_object*, lean_object*);
|
||||
lean_object* l_Std_RBNode_appendTrees___rarg(lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Elab_Term_Do_ToCodeBlock_doForToCode___closed__1;
|
||||
lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_Term_Do_convertTerminalActionIntoJmp_loop___spec__1(lean_object*, size_t, size_t, lean_object*);
|
||||
static lean_object* l_Array_foldrMUnsafe_fold___at___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkTuple___spec__1___closed__3;
|
||||
|
|
@ -610,9 +612,12 @@ static lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_Term_Do_ToCodeBlock_do
|
|||
static lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Elab_Term_Do_ToCodeBlock_doTryToCode___spec__8___closed__9;
|
||||
static lean_object* l_Lean_Elab_Term_Do_ToCodeBlock_ensureInsideFor___closed__2;
|
||||
static lean_object* l_Lean_Elab_Term_Do_ToTerm_breakToTerm___closed__19;
|
||||
lean_object* l_Std_RBNode_balRight___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_Do_convertTerminalActionIntoJmp_loop_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
uint8_t l_Std_RBNode_isBlack___rarg(lean_object*);
|
||||
lean_object* l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_varsToMessageData(lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_Do_mkSimpleJmp___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
uint8_t l_Lean_Name_quickCmp(lean_object*, lean_object*);
|
||||
static lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Elab_Term_Do_ToCodeBlock_doTryToCode___spec__8___closed__4;
|
||||
lean_object* l_Lean_Elab_Term_Do_hasExitPoint___lambda__1___boxed(lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_Do_ToCodeBlock_doIfToCode(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -674,7 +679,6 @@ static lean_object* l_Lean_Elab_Term_Do_pullExitPointsAux___lambda__1___closed__
|
|||
lean_object* l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkDoIfView(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_Do_ToCodeBlock_doLetArrowToCode___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* lean_array_to_list(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_liftMacroM___at_Lean_Elab_Term_Do_mkJmp___spec__2___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Macro_throwErrorAt___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
uint8_t l_Lean_Environment_contains(lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Elab_Do_0__Lean_Elab_Term_toDoElem___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -711,7 +715,6 @@ lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_Do_0__Lean_Elab_Ter
|
|||
lean_object* l_Lean_Elab_Term_Do_extendUpdatedVars(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_Term_Do_mkDoSeq___spec__1(size_t, size_t, lean_object*);
|
||||
static lean_object* l_Lean_Elab_Term_Do_ToCodeBlock_doForToCode___lambda__1___closed__25;
|
||||
lean_object* l_Std_RBNode_erase___at_Lean_Meta_ToHide_unmark___spec__1(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_Do_instInhabitedCode;
|
||||
static lean_object* l_Lean_Elab_Term_Do_ToTerm_breakToTerm___closed__16;
|
||||
static lean_object* l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_mkPureUnit___closed__3;
|
||||
|
|
@ -745,11 +748,13 @@ lean_object* l_Lean_Elab_Term_Do_mkReassignCore___lambda__1(lean_object*, lean_o
|
|||
static lean_object* l_Lean_Elab_Term_Do_ToTerm_returnToTerm___closed__23;
|
||||
static lean_object* l_Lean_Elab_Term_Do_getDoHaveVar___closed__1;
|
||||
lean_object* l_Lean_throwError___at_Lean_Elab_Term_Do_concat___spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Std_RBNode_erase___at_Lean_Elab_Term_Do_eraseVars___spec__2___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_ToCodeBlock_expandLiftMethodAux___spec__3(uint8_t, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_expandDoIf_x3f___spec__6___lambda__1___closed__4;
|
||||
lean_object* l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_expandDoIf_x3f___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_throwError___at_Lean_Elab_Term_Do_ToCodeBlock_checkReassignable___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Elab_Term_Do_ToCodeBlock_checkLetArrowRHS___closed__1;
|
||||
lean_object* l_Std_RBNode_balLeft___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Elab_Term_Do_ToCodeBlock_doTryToCode___spec__8___closed__15;
|
||||
static lean_object* l_Lean_Elab_Term_Do_ToCodeBlock_ensureEOS___closed__2;
|
||||
lean_object* l_Lean_MonadRef_mkInfoFromRefPos___at_Lean_Elab_Term_Do_ToCodeBlock_doTryToCode___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -855,6 +860,7 @@ lean_object* l_Lean_MonadRef_mkInfoFromRefPos___at_Lean_Elab_Term_Do_ToTerm_retu
|
|||
lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_Term_Do_convertTerminalActionIntoJmp_loop___spec__3(lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_Term_Do_ToTerm_mkJoinPoint___spec__2(size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
uint8_t l_Lean_Syntax_isNodeOf(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Std_RBNode_del___at_Lean_Elab_Term_Do_eraseVars___spec__3(lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Elab_Do_0__Lean_Elab_Term_hasLiftMethod_match__1(lean_object*);
|
||||
lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Elab_Term_Do_CodeBlocl_toMessageData_loop___spec__2(lean_object*, lean_object*, size_t, size_t, lean_object*);
|
||||
lean_object* l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at_Lean_Elab_Term_Do_ToCodeBlock_mkForInBody___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -982,6 +988,7 @@ static lean_object* l_Lean_Elab_Term_Do_ToCodeBlock_doForToCode___lambda__1___cl
|
|||
static lean_object* l_Lean_Elab_Term_Do_mkAuxDeclFor___rarg___lambda__7___closed__1;
|
||||
static lean_object* l_Lean_Elab_Term_Do_ToCodeBlock_doTryToCode___lambda__2___closed__2;
|
||||
static lean_object* l_Lean_Elab_Term_Do_ToTerm_continueToTerm___closed__13;
|
||||
lean_object* l_Std_RBNode_del___at_Lean_Elab_Term_Do_eraseVars___spec__3___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_throwErrorAt___at_Lean_Elab_Term_elabLiftMethod___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_expandTermReturn(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_Do_mkAuxDeclFor___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -1362,6 +1369,7 @@ uint8_t lean_nat_dec_lt(lean_object*, lean_object*);
|
|||
lean_object* l_Lean_Elab_liftMacroM___at_Lean_Elab_Term_Do_mkJmp___spec__2___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Elab_Term_Do_ToTerm_matchNestedTermResult___closed__13;
|
||||
lean_object* l___private_Lean_Elab_Do_0__Lean_Elab_Term_extractBind_match__2___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Std_RBNode_erase___at_Lean_Elab_Term_Do_eraseVars___spec__2(lean_object*, lean_object*);
|
||||
static lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_Term_Do_ToCodeBlock_checkReassignable___spec__2___closed__4;
|
||||
lean_object* l_Lean_Elab_Term_Do_ToTerm_toTerm_match__1(lean_object*);
|
||||
lean_object* l___private_Lean_Elab_Do_0__Lean_Elab_Term_Do_expandDoIf_x3f___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, size_t, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -7080,6 +7088,100 @@ lean_dec(x_1);
|
|||
return x_7;
|
||||
}
|
||||
}
|
||||
lean_object* l_Std_RBNode_del___at_Lean_Elab_Term_Do_eraseVars___spec__3(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
if (lean_obj_tag(x_2) == 0)
|
||||
{
|
||||
lean_object* x_3;
|
||||
x_3 = lean_box(0);
|
||||
return x_3;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; uint8_t x_8;
|
||||
x_4 = lean_ctor_get(x_2, 0);
|
||||
lean_inc(x_4);
|
||||
x_5 = lean_ctor_get(x_2, 1);
|
||||
lean_inc(x_5);
|
||||
x_6 = lean_ctor_get(x_2, 2);
|
||||
lean_inc(x_6);
|
||||
x_7 = lean_ctor_get(x_2, 3);
|
||||
lean_inc(x_7);
|
||||
lean_dec(x_2);
|
||||
x_8 = l_Lean_Name_quickCmp(x_1, x_5);
|
||||
switch (x_8) {
|
||||
case 0:
|
||||
{
|
||||
uint8_t x_9;
|
||||
x_9 = l_Std_RBNode_isBlack___rarg(x_4);
|
||||
if (x_9 == 0)
|
||||
{
|
||||
lean_object* x_10; uint8_t x_11; lean_object* x_12;
|
||||
x_10 = l_Std_RBNode_del___at_Lean_Elab_Term_Do_eraseVars___spec__3(x_1, x_4);
|
||||
x_11 = 0;
|
||||
x_12 = lean_alloc_ctor(1, 4, 1);
|
||||
lean_ctor_set(x_12, 0, x_10);
|
||||
lean_ctor_set(x_12, 1, x_5);
|
||||
lean_ctor_set(x_12, 2, x_6);
|
||||
lean_ctor_set(x_12, 3, x_7);
|
||||
lean_ctor_set_uint8(x_12, sizeof(void*)*4, x_11);
|
||||
return x_12;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_13; lean_object* x_14;
|
||||
x_13 = l_Std_RBNode_del___at_Lean_Elab_Term_Do_eraseVars___spec__3(x_1, x_4);
|
||||
x_14 = l_Std_RBNode_balLeft___rarg(x_13, x_5, x_6, x_7);
|
||||
return x_14;
|
||||
}
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
lean_object* x_15;
|
||||
lean_dec(x_6);
|
||||
lean_dec(x_5);
|
||||
x_15 = l_Std_RBNode_appendTrees___rarg(x_4, x_7);
|
||||
return x_15;
|
||||
}
|
||||
default:
|
||||
{
|
||||
uint8_t x_16;
|
||||
x_16 = l_Std_RBNode_isBlack___rarg(x_7);
|
||||
if (x_16 == 0)
|
||||
{
|
||||
lean_object* x_17; uint8_t x_18; lean_object* x_19;
|
||||
x_17 = l_Std_RBNode_del___at_Lean_Elab_Term_Do_eraseVars___spec__3(x_1, x_7);
|
||||
x_18 = 0;
|
||||
x_19 = lean_alloc_ctor(1, 4, 1);
|
||||
lean_ctor_set(x_19, 0, x_4);
|
||||
lean_ctor_set(x_19, 1, x_5);
|
||||
lean_ctor_set(x_19, 2, x_6);
|
||||
lean_ctor_set(x_19, 3, x_17);
|
||||
lean_ctor_set_uint8(x_19, sizeof(void*)*4, x_18);
|
||||
return x_19;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_20; lean_object* x_21;
|
||||
x_20 = l_Std_RBNode_del___at_Lean_Elab_Term_Do_eraseVars___spec__3(x_1, x_7);
|
||||
x_21 = l_Std_RBNode_balRight___rarg(x_4, x_5, x_6, x_20);
|
||||
return x_21;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_Std_RBNode_erase___at_Lean_Elab_Term_Do_eraseVars___spec__2(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_3; lean_object* x_4;
|
||||
x_3 = l_Std_RBNode_del___at_Lean_Elab_Term_Do_eraseVars___spec__3(x_1, x_2);
|
||||
x_4 = l_Std_RBNode_setBlack___rarg(x_3);
|
||||
return x_4;
|
||||
}
|
||||
}
|
||||
lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Elab_Term_Do_eraseVars___spec__1(lean_object* x_1, size_t x_2, size_t x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
|
|
@ -7091,7 +7193,7 @@ lean_object* x_6; size_t x_7; size_t x_8; lean_object* x_9;
|
|||
x_6 = lean_array_uget(x_1, x_2);
|
||||
x_7 = 1;
|
||||
x_8 = x_2 + x_7;
|
||||
x_9 = l_Std_RBNode_erase___at_Lean_Meta_ToHide_unmark___spec__1(x_6, x_4);
|
||||
x_9 = l_Std_RBNode_erase___at_Lean_Elab_Term_Do_eraseVars___spec__2(x_6, x_4);
|
||||
lean_dec(x_6);
|
||||
x_2 = x_8;
|
||||
x_4 = x_9;
|
||||
|
|
@ -7139,6 +7241,24 @@ return x_9;
|
|||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_Std_RBNode_del___at_Lean_Elab_Term_Do_eraseVars___spec__3___boxed(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_3;
|
||||
x_3 = l_Std_RBNode_del___at_Lean_Elab_Term_Do_eraseVars___spec__3(x_1, x_2);
|
||||
lean_dec(x_1);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
lean_object* l_Std_RBNode_erase___at_Lean_Elab_Term_Do_eraseVars___spec__2___boxed(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_3;
|
||||
x_3 = l_Std_RBNode_erase___at_Lean_Elab_Term_Do_eraseVars___spec__2(x_1, x_2);
|
||||
lean_dec(x_1);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Elab_Term_Do_eraseVars___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
|
|
@ -7947,7 +8067,7 @@ lean_inc(x_14);
|
|||
x_15 = lean_ctor_get(x_7, 5);
|
||||
lean_inc(x_15);
|
||||
lean_inc(x_13);
|
||||
x_16 = lean_alloc_closure((void*)(l_Lean_Elab_liftMacroM___at_Lean_Elab_Term_Do_mkJmp___spec__2___lambda__1___boxed), 4, 1);
|
||||
x_16 = lean_alloc_closure((void*)(l_Lean_Elab_liftMacroM___at_Lean_Elab_Term_Do_mkJmp___spec__2___lambda__1), 4, 1);
|
||||
lean_closure_set(x_16, 0, x_13);
|
||||
lean_inc(x_14);
|
||||
x_17 = lean_alloc_closure((void*)(l_ReaderT_pure___at_Lean_Elab_liftMacroM___spec__1___rarg___boxed), 3, 1);
|
||||
|
|
@ -8281,15 +8401,6 @@ lean_dec(x_1);
|
|||
return x_8;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_liftMacroM___at_Lean_Elab_Term_Do_mkJmp___spec__2___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_5;
|
||||
x_5 = l_Lean_Elab_liftMacroM___at_Lean_Elab_Term_Do_mkJmp___spec__2___lambda__1(x_1, x_2, x_3, x_4);
|
||||
lean_dec(x_1);
|
||||
return x_5;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_liftMacroM___at_Lean_Elab_Term_Do_mkJmp___spec__2___lambda__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
|
|
@ -12488,7 +12599,7 @@ lean_inc(x_13);
|
|||
x_14 = lean_ctor_get(x_6, 5);
|
||||
lean_inc(x_14);
|
||||
lean_inc(x_12);
|
||||
x_15 = lean_alloc_closure((void*)(l_Lean_Elab_liftMacroM___at_Lean_Elab_Term_Do_mkJmp___spec__2___lambda__1___boxed), 4, 1);
|
||||
x_15 = lean_alloc_closure((void*)(l_Lean_Elab_liftMacroM___at_Lean_Elab_Term_Do_mkJmp___spec__2___lambda__1), 4, 1);
|
||||
lean_closure_set(x_15, 0, x_12);
|
||||
lean_inc(x_13);
|
||||
x_16 = lean_alloc_closure((void*)(l_ReaderT_pure___at_Lean_Elab_liftMacroM___spec__1___rarg___boxed), 3, 1);
|
||||
|
|
@ -29797,7 +29908,7 @@ lean_inc(x_14);
|
|||
x_15 = lean_ctor_get(x_7, 5);
|
||||
lean_inc(x_15);
|
||||
lean_inc(x_13);
|
||||
x_16 = lean_alloc_closure((void*)(l_Lean_Elab_liftMacroM___at_Lean_Elab_Term_Do_mkJmp___spec__2___lambda__1___boxed), 4, 1);
|
||||
x_16 = lean_alloc_closure((void*)(l_Lean_Elab_liftMacroM___at_Lean_Elab_Term_Do_mkJmp___spec__2___lambda__1), 4, 1);
|
||||
lean_closure_set(x_16, 0, x_13);
|
||||
lean_inc(x_14);
|
||||
x_17 = lean_alloc_closure((void*)(l_ReaderT_pure___at_Lean_Elab_liftMacroM___spec__1___rarg___boxed), 3, 1);
|
||||
|
|
@ -32874,7 +32985,7 @@ lean_inc(x_14);
|
|||
x_15 = lean_ctor_get(x_7, 5);
|
||||
lean_inc(x_15);
|
||||
lean_inc(x_13);
|
||||
x_16 = lean_alloc_closure((void*)(l_Lean_Elab_liftMacroM___at_Lean_Elab_Term_Do_mkJmp___spec__2___lambda__1___boxed), 4, 1);
|
||||
x_16 = lean_alloc_closure((void*)(l_Lean_Elab_liftMacroM___at_Lean_Elab_Term_Do_mkJmp___spec__2___lambda__1), 4, 1);
|
||||
lean_closure_set(x_16, 0, x_13);
|
||||
lean_inc(x_14);
|
||||
x_17 = lean_alloc_closure((void*)(l_ReaderT_pure___at_Lean_Elab_liftMacroM___spec__1___rarg___boxed), 3, 1);
|
||||
|
|
@ -33126,7 +33237,7 @@ lean_inc(x_14);
|
|||
x_15 = lean_ctor_get(x_7, 5);
|
||||
lean_inc(x_15);
|
||||
lean_inc(x_13);
|
||||
x_16 = lean_alloc_closure((void*)(l_Lean_Elab_liftMacroM___at_Lean_Elab_Term_Do_mkJmp___spec__2___lambda__1___boxed), 4, 1);
|
||||
x_16 = lean_alloc_closure((void*)(l_Lean_Elab_liftMacroM___at_Lean_Elab_Term_Do_mkJmp___spec__2___lambda__1), 4, 1);
|
||||
lean_closure_set(x_16, 0, x_13);
|
||||
lean_inc(x_14);
|
||||
x_17 = lean_alloc_closure((void*)(l_ReaderT_pure___at_Lean_Elab_liftMacroM___spec__1___rarg___boxed), 3, 1);
|
||||
|
|
@ -35328,7 +35439,7 @@ lean_inc(x_14);
|
|||
x_15 = lean_ctor_get(x_7, 5);
|
||||
lean_inc(x_15);
|
||||
lean_inc(x_13);
|
||||
x_16 = lean_alloc_closure((void*)(l_Lean_Elab_liftMacroM___at_Lean_Elab_Term_Do_mkJmp___spec__2___lambda__1___boxed), 4, 1);
|
||||
x_16 = lean_alloc_closure((void*)(l_Lean_Elab_liftMacroM___at_Lean_Elab_Term_Do_mkJmp___spec__2___lambda__1), 4, 1);
|
||||
lean_closure_set(x_16, 0, x_13);
|
||||
lean_inc(x_14);
|
||||
x_17 = lean_alloc_closure((void*)(l_ReaderT_pure___at_Lean_Elab_liftMacroM___spec__1___rarg___boxed), 3, 1);
|
||||
|
|
@ -39803,7 +39914,7 @@ lean_inc(x_14);
|
|||
x_15 = lean_ctor_get(x_7, 5);
|
||||
lean_inc(x_15);
|
||||
lean_inc(x_13);
|
||||
x_16 = lean_alloc_closure((void*)(l_Lean_Elab_liftMacroM___at_Lean_Elab_Term_Do_mkJmp___spec__2___lambda__1___boxed), 4, 1);
|
||||
x_16 = lean_alloc_closure((void*)(l_Lean_Elab_liftMacroM___at_Lean_Elab_Term_Do_mkJmp___spec__2___lambda__1), 4, 1);
|
||||
lean_closure_set(x_16, 0, x_13);
|
||||
lean_inc(x_14);
|
||||
x_17 = lean_alloc_closure((void*)(l_ReaderT_pure___at_Lean_Elab_liftMacroM___spec__1___rarg___boxed), 3, 1);
|
||||
|
|
@ -42296,7 +42407,7 @@ lean_inc(x_13);
|
|||
x_14 = lean_ctor_get(x_6, 5);
|
||||
lean_inc(x_14);
|
||||
lean_inc(x_12);
|
||||
x_15 = lean_alloc_closure((void*)(l_Lean_Elab_liftMacroM___at_Lean_Elab_Term_Do_mkJmp___spec__2___lambda__1___boxed), 4, 1);
|
||||
x_15 = lean_alloc_closure((void*)(l_Lean_Elab_liftMacroM___at_Lean_Elab_Term_Do_mkJmp___spec__2___lambda__1), 4, 1);
|
||||
lean_closure_set(x_15, 0, x_12);
|
||||
lean_inc(x_13);
|
||||
x_16 = lean_alloc_closure((void*)(l_ReaderT_pure___at_Lean_Elab_liftMacroM___spec__1___rarg___boxed), 3, 1);
|
||||
|
|
|
|||
6
stage0/stdlib/Lean/Elab/Extra.c
generated
6
stage0/stdlib/Lean/Elab/Extra.c
generated
|
|
@ -27,6 +27,7 @@ static lean_object* l___private_Lean_Elab_Extra_0__Lean_Elab_Term_BinOp_analyze_
|
|||
lean_object* l___private_Lean_Elab_Extra_0__Lean_Elab_Term_BinOp_applyCoe_go(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l___private_Lean_Elab_Extra_0__Lean_Elab_Term_BinOp_applyCoe_go___lambda__2___closed__3;
|
||||
static lean_object* l_Lean_Elab_Term_elabForIn___lambda__1___closed__1;
|
||||
lean_object* l_Lean_Meta_mkFreshLevelMVar(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_registerTraceClass(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_elabForIn(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Elab_Term_elabForIn_getMonad___closed__4;
|
||||
|
|
@ -326,7 +327,6 @@ lean_object* l___private_Lean_Elab_Extra_0__Lean_Elab_Term_BinOp_hasCoe(lean_obj
|
|||
lean_object* l_Lean_indentD(lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_tryPostpone(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Elab_Term_elabForIn___closed__25;
|
||||
lean_object* l_Lean_Meta_mkFreshLevelMVar___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Syntax_getArg(lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Elab_Term_elabBinRel___lambda__2___closed__5;
|
||||
static lean_object* l___regBuiltin_Lean_Elab_Term_elabBinRel___closed__2;
|
||||
|
|
@ -3826,7 +3826,7 @@ lean_inc(x_83);
|
|||
x_84 = lean_ctor_get(x_82, 1);
|
||||
lean_inc(x_84);
|
||||
lean_dec(x_82);
|
||||
x_85 = l_Lean_Meta_mkFreshLevelMVar___rarg(x_6, x_7, x_8, x_84);
|
||||
x_85 = l_Lean_Meta_mkFreshLevelMVar(x_5, x_6, x_7, x_8, x_84);
|
||||
x_86 = lean_ctor_get(x_85, 0);
|
||||
lean_inc(x_86);
|
||||
x_87 = lean_ctor_get(x_85, 1);
|
||||
|
|
@ -4113,7 +4113,7 @@ lean_inc(x_144);
|
|||
x_145 = lean_ctor_get(x_143, 1);
|
||||
lean_inc(x_145);
|
||||
lean_dec(x_143);
|
||||
x_146 = l_Lean_Meta_mkFreshLevelMVar___rarg(x_6, x_7, x_8, x_145);
|
||||
x_146 = l_Lean_Meta_mkFreshLevelMVar(x_5, x_6, x_7, x_8, x_145);
|
||||
x_147 = lean_ctor_get(x_146, 0);
|
||||
lean_inc(x_147);
|
||||
x_148 = lean_ctor_get(x_146, 1);
|
||||
|
|
|
|||
20
stage0/stdlib/Lean/Elab/Inductive.c
generated
20
stage0/stdlib/Lean/Elab/Inductive.c
generated
|
|
@ -29,10 +29,12 @@ uint8_t l_Lean_Level_isNeverZero(lean_object*);
|
|||
lean_object* l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_mkCtor2InferMod___boxed(lean_object*);
|
||||
lean_object* l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_mkTypeFor(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_withUsed___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_mkFreshLevelMVar(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_registerTraceClass(lean_object*, lean_object*);
|
||||
lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Elab_Inductive_0__Lean_Elab_Command_applyDerivingHandlers___spec__2(lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_Inductive_0__Lean_Elab_Command_mkIndFVar2Const___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Elab_Command_initFn____x40_Lean_Elab_Inductive___hyg_4____closed__4;
|
||||
lean_object* l_Lean_Meta_withLCtx___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__3___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_stringToMessageData(lean_object*);
|
||||
static lean_object* l_Lean_Elab_Command_checkValidCtorModifier___rarg___closed__1;
|
||||
lean_object* l_List_mapTRAux___at___private_Lean_Elab_Inductive_0__Lean_Elab_Command_updateResultingUniverse___spec__1___at___private_Lean_Elab_Inductive_0__Lean_Elab_Command_updateResultingUniverse___spec__2___lambda__1(lean_object*, lean_object*);
|
||||
|
|
@ -49,7 +51,6 @@ lean_object* l_Lean_Elab_Command_liftTermElabM___rarg(lean_object*, lean_object*
|
|||
lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_Inductive_0__Lean_Elab_Command_elabCtors_checkParamOccs___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_MetavarContext_instantiateLevelMVars___at_Lean_Meta_instantiateLevelMVars___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* lean_name_mk_string(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_withLCtx___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
uint8_t l_USize_decEq(size_t, size_t);
|
||||
lean_object* lean_array_uget(lean_object*, size_t);
|
||||
uint64_t lean_uint64_of_nat(lean_object*);
|
||||
|
|
@ -494,7 +495,6 @@ static lean_object* l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_checkPa
|
|||
uint8_t l_Lean_NameSet_contains(lean_object*, lean_object*);
|
||||
lean_object* l_List_forIn_loop___at___private_Lean_Elab_Inductive_0__Lean_Elab_Command_collectUniverses___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_addAutoBoundImplicits(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_mkFreshLevelMVar___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_mkInductiveDecl_match__1(lean_object*);
|
||||
static lean_object* l_Lean_Elab_Command_checkValidCtorModifier___rarg___lambda__2___closed__1;
|
||||
static lean_object* l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_checkParamsAndResultType___lambda__1___closed__5;
|
||||
|
|
@ -1529,7 +1529,7 @@ lean_inc(x_11);
|
|||
if (lean_obj_tag(x_11) == 0)
|
||||
{
|
||||
lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; uint8_t x_16; lean_object* x_17; lean_object* x_18;
|
||||
x_12 = l_Lean_Meta_mkFreshLevelMVar___rarg(x_7, x_8, x_9, x_10);
|
||||
x_12 = l_Lean_Meta_mkFreshLevelMVar(x_6, x_7, x_8, x_9, x_10);
|
||||
x_13 = lean_ctor_get(x_12, 0);
|
||||
lean_inc(x_13);
|
||||
x_14 = lean_ctor_get(x_12, 1);
|
||||
|
|
@ -2563,7 +2563,7 @@ lean_dec(x_1);
|
|||
x_13 = lean_alloc_closure((void*)(l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_mkTypeFor___lambda__1___boxed), 9, 2);
|
||||
lean_closure_set(x_13, 0, x_11);
|
||||
lean_closure_set(x_13, 1, x_12);
|
||||
x_14 = l_Lean_Meta_withLCtx___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__2___rarg(x_9, x_10, x_13, x_2, x_3, x_4, x_5, x_6, x_7, x_8);
|
||||
x_14 = l_Lean_Meta_withLCtx___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__3___rarg(x_9, x_10, x_13, x_2, x_3, x_4, x_5, x_6, x_7, x_8);
|
||||
return x_14;
|
||||
}
|
||||
}
|
||||
|
|
@ -4332,7 +4332,7 @@ lean_closure_set(x_29, 1, x_2);
|
|||
lean_closure_set(x_29, 2, x_18);
|
||||
lean_closure_set(x_29, 3, x_23);
|
||||
lean_closure_set(x_29, 4, x_28);
|
||||
x_30 = l_Lean_Meta_withLCtx___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__2___rarg(x_24, x_25, x_29, x_3, x_4, x_5, x_6, x_7, x_8, x_19);
|
||||
x_30 = l_Lean_Meta_withLCtx___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__3___rarg(x_24, x_25, x_29, x_3, x_4, x_5, x_6, x_7, x_8, x_19);
|
||||
return x_30;
|
||||
}
|
||||
else
|
||||
|
|
@ -9743,11 +9743,11 @@ static lean_object* _init_l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_r
|
|||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
x_1 = l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_removeUnused___closed__1;
|
||||
x_2 = l_Lean_NameSet_empty;
|
||||
x_1 = lean_box(0);
|
||||
x_2 = l___private_Lean_Elab_Inductive_0__Lean_Elab_Command_removeUnused___closed__1;
|
||||
x_3 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_3, 0, x_1);
|
||||
lean_ctor_set(x_3, 1, x_2);
|
||||
lean_ctor_set(x_3, 0, x_2);
|
||||
lean_ctor_set(x_3, 1, x_1);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
|
|
@ -9885,7 +9885,7 @@ x_17 = lean_ctor_get(x_13, 1);
|
|||
lean_inc(x_17);
|
||||
lean_dec(x_13);
|
||||
x_18 = lean_apply_1(x_3, x_17);
|
||||
x_19 = l_Lean_Meta_withLCtx___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__2___rarg(x_15, x_16, x_18, x_4, x_5, x_6, x_7, x_8, x_9, x_14);
|
||||
x_19 = l_Lean_Meta_withLCtx___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__3___rarg(x_15, x_16, x_18, x_4, x_5, x_6, x_7, x_8, x_9, x_14);
|
||||
return x_19;
|
||||
}
|
||||
else
|
||||
|
|
|
|||
173
stage0/stdlib/Lean/Elab/InfoTree.c
generated
173
stage0/stdlib/Lean/Elab/InfoTree.c
generated
|
|
@ -68,10 +68,9 @@ lean_object* l_Lean_Elab_TermInfo_runMetaM(lean_object*);
|
|||
lean_object* l_Lean_Elab_withSaveInfoContext___rarg___lambda__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Std_PersistentArray_append___rarg(lean_object*, lean_object*);
|
||||
lean_object* l_Option_format___at_Lean_Elab_CompletionInfo_format___spec__1___boxed(lean_object*);
|
||||
static lean_object* l_Lean_Elab_instInhabitedContextInfo___closed__5;
|
||||
static uint32_t l_Lean_Elab_instInhabitedContextInfo___closed__5;
|
||||
lean_object* l_Lean_Elab_withInfoContext_x27_match__1(lean_object*);
|
||||
lean_object* lean_st_ref_get(lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_instHashableName;
|
||||
lean_object* l_Lean_Elab_enableInfoTree(lean_object*);
|
||||
lean_object* l_Lean_Elab_MacroExpansionInfo_format(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Elab_InfoTree_0__Lean_Elab_modifyInfoTrees(lean_object*);
|
||||
|
|
@ -143,7 +142,7 @@ static lean_object* l_Lean_Elab_instInhabitedContextInfo___closed__9;
|
|||
lean_object* l_Lean_Elab_resolveGlobalConstWithInfos___rarg___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_resolveGlobalConstWithInfos___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_pushInfoTree___rarg(lean_object*, lean_object*, lean_object*);
|
||||
static uint32_t l_Lean_Elab_instInhabitedContextInfo___closed__4;
|
||||
static lean_object* l_Lean_Elab_instInhabitedContextInfo___closed__4;
|
||||
lean_object* l_Lean_Elab_withMacroExpansionInfo___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_withSaveInfoContext___spec__3___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*);
|
||||
lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_withSaveInfoContext___spec__4___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -229,7 +228,7 @@ lean_object* l_Lean_Elab_TermInfo_format(lean_object*, lean_object*, lean_object
|
|||
lean_object* l_Lean_Elab_instInhabitedInfo;
|
||||
lean_object* l_Lean_Elab_ContextInfo_openDecls___default;
|
||||
lean_object* l_Lean_Elab_withInfoContext_x27___rarg___lambda__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static uint64_t l_Lean_Elab_instInhabitedTermInfo___closed__5;
|
||||
static lean_object* l_Lean_Elab_instInhabitedTermInfo___closed__5;
|
||||
lean_object* l_Lean_Elab_withInfoContext_x27___rarg___lambda__3(lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Elab_instInhabitedElabInfo___closed__1;
|
||||
lean_object* lean_expr_dbg_to_string(lean_object*);
|
||||
|
|
@ -252,6 +251,7 @@ lean_object* l_Lean_Elab_Info_updateContext_x3f_match__1(lean_object*);
|
|||
lean_object* l_Std_PersistentArray_mapMAux___at_Lean_Elab_withSaveInfoContext___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Std_PersistentArray_mapMAux___at_Lean_Elab_withSaveInfoContext___spec__2___rarg___lambda__2(lean_object*);
|
||||
static lean_object* l_Lean_Elab_ContextInfo_ppGoals___closed__2;
|
||||
extern lean_object* l_Lean_instHashableMVarId;
|
||||
lean_object* l_Lean_Elab_getInfoTrees(lean_object*);
|
||||
lean_object* l___private_Lean_Elab_InfoTree_0__Lean_Elab_formatStxRange(lean_object*, lean_object*);
|
||||
lean_object* l_Std_PersistentHashMap_insert___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -261,7 +261,6 @@ lean_object* l_Std_PersistentArray_findSomeMAux___at_Lean_Elab_InfoTree_findInfo
|
|||
lean_object* l_Lean_Elab_withInfoTreeContext___at_Lean_Elab_withMacroExpansionInfo___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_withSaveInfoContext___spec__4___rarg___lambda__7___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
size_t lean_usize_of_nat(lean_object*);
|
||||
extern lean_object* l_Lean_NameSet_empty;
|
||||
lean_object* l_Lean_Elab_ContextInfo_currNamespace___default;
|
||||
lean_object* l_Lean_Elab_pushInfoLeaf___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_instBEqProd___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -292,6 +291,7 @@ lean_object* l_Std_PersistentArray_push___rarg(lean_object*, lean_object*);
|
|||
lean_object* l_Lean_Elab_instInhabitedInfoTree;
|
||||
lean_object* l_Lean_Elab_withInfoTreeContext___rarg___lambda__1(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_withSaveInfoContext___spec__4___rarg___lambda__6(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_instBEqMVarId;
|
||||
lean_object* l_Lean_Elab_CompletionInfo_stx_match__1(lean_object*);
|
||||
static lean_object* l_Lean_Elab_InfoTree_format___closed__2;
|
||||
lean_object* l_Lean_Elab_ContextInfo_runMetaM_match__1___rarg(lean_object*, lean_object*);
|
||||
|
|
@ -312,7 +312,7 @@ lean_object* l_Lean_Elab_assignInfoHoleId(lean_object*);
|
|||
lean_object* lean_panic_fn(lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Elab_MacroExpansionInfo_format___closed__1;
|
||||
lean_object* l_Std_PersistentArray_findSomeM_x3f___at_Lean_Elab_InfoTree_findInfo_x3f___spec__1___boxed(lean_object*, lean_object*);
|
||||
static size_t l_Lean_Elab_instInhabitedTermInfo___closed__2;
|
||||
static lean_object* l_Lean_Elab_instInhabitedTermInfo___closed__2;
|
||||
lean_object* l_List_forIn_loop___at_Lean_Elab_resolveGlobalConstWithInfos___spec__1___rarg___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_withSaveInfoContext___spec__4___rarg___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_getResetInfoTrees___rarg___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -341,7 +341,7 @@ lean_object* l_Lean_Elab_withInfoContext_x27_match__2(lean_object*, lean_object*
|
|||
lean_object* l_Lean_Elab_instInhabitedContextInfo;
|
||||
lean_object* l_Lean_Json_pretty(lean_object*, lean_object*);
|
||||
lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_withSaveInfoContext___spec__4___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*);
|
||||
static lean_object* l_Lean_Elab_instInhabitedTermInfo___closed__3;
|
||||
static size_t l_Lean_Elab_instInhabitedTermInfo___closed__3;
|
||||
lean_object* l_Lean_ppTerm(lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l___private_Lean_Elab_InfoTree_0__Lean_Elab_formatStxRange_fmtPos___closed__9;
|
||||
lean_object* l_Lean_Elab_getResetInfoTrees___rarg___lambda__2___boxed(lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -380,7 +380,7 @@ lean_object* l_Lean_Elab_pushInfoTree(lean_object*);
|
|||
lean_object* l_Lean_Elab_withMacroExpansionInfo___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_withMacroExpansionInfo(lean_object*, lean_object*);
|
||||
lean_object* l_Std_PersistentArray_mapMAux___at_Lean_Elab_withSaveInfoContext___spec__2(lean_object*);
|
||||
static lean_object* l_Lean_Elab_instInhabitedTermInfo___closed__6;
|
||||
static uint64_t l_Lean_Elab_instInhabitedTermInfo___closed__6;
|
||||
lean_object* l_Lean_Elab_assignInfoHoleId___rarg___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_pushInfoTree___rarg___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Std_Format_prefixJoin___at_Lean_Elab_ContextInfo_ppGoals___spec__2(lean_object*, lean_object*);
|
||||
|
|
@ -428,16 +428,17 @@ lean_object* l_Lean_Elab_withInfoTreeContext___rarg___lambda__4___boxed(lean_obj
|
|||
extern lean_object* l_instInhabitedPUnit;
|
||||
lean_object* l_Lean_Syntax_formatStxAux(lean_object*, uint8_t, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Elab_instInhabitedContextInfo___closed__7;
|
||||
static lean_object* l_Lean_Elab_instInhabitedTermInfo___closed__8;
|
||||
lean_object* l_Lean_Elab_CompletionInfo_stx(lean_object*);
|
||||
lean_object* l_Lean_Elab_InfoTree_format_match__1___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_instInhabitedFieldInfo;
|
||||
static lean_object* l_Lean_Elab_instInhabitedContextInfo___closed__10;
|
||||
lean_object* l_Std_Format_nestD(lean_object*);
|
||||
lean_object* l_Std_PersistentArray_mapMAux___at_Lean_Elab_withSaveInfoContext___spec__2___rarg___lambda__1(lean_object*);
|
||||
lean_object* l_Std_PersistentArray_mapM___at_Lean_Elab_withSaveInfoContext___spec__1___rarg___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Elab_ContextInfo_runMetaM___rarg___closed__7;
|
||||
static lean_object* l_Lean_Elab_ContextInfo_ppGoals___closed__3;
|
||||
uint8_t lean_nat_dec_lt(lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_Name_instBEqName;
|
||||
static lean_object* l_Lean_Elab_instInhabitedInfoState___closed__1;
|
||||
lean_object* l_Lean_Elab_getResetInfoTrees___rarg(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_FieldInfo_format(lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -535,10 +536,22 @@ return x_2;
|
|||
static lean_object* _init_l_Lean_Elab_instInhabitedContextInfo___closed__2() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
x_1 = l_Lean_Elab_ContextInfo_mctx___default___closed__2;
|
||||
x_2 = lean_unsigned_to_nat(0u);
|
||||
x_3 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_3, 0, x_1);
|
||||
lean_ctor_set(x_3, 1, x_2);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Elab_instInhabitedContextInfo___closed__3() {
|
||||
_start:
|
||||
{
|
||||
uint8_t x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_1 = 1;
|
||||
x_2 = l_Lean_Elab_instInhabitedContextInfo___closed__1;
|
||||
x_3 = l_Lean_Elab_ContextInfo_mctx___default___closed__3;
|
||||
x_3 = l_Lean_Elab_instInhabitedContextInfo___closed__2;
|
||||
x_4 = lean_alloc_ctor(0, 2, 1);
|
||||
lean_ctor_set(x_4, 0, x_2);
|
||||
lean_ctor_set(x_4, 1, x_3);
|
||||
|
|
@ -546,7 +559,7 @@ lean_ctor_set_uint8(x_4, sizeof(void*)*2, x_1);
|
|||
return x_4;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Elab_instInhabitedContextInfo___closed__3() {
|
||||
static lean_object* _init_l_Lean_Elab_instInhabitedContextInfo___closed__4() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2;
|
||||
|
|
@ -555,7 +568,7 @@ x_2 = lean_mk_empty_array_with_capacity(x_1);
|
|||
return x_2;
|
||||
}
|
||||
}
|
||||
static uint32_t _init_l_Lean_Elab_instInhabitedContextInfo___closed__4() {
|
||||
static uint32_t _init_l_Lean_Elab_instInhabitedContextInfo___closed__5() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; uint32_t x_2;
|
||||
|
|
@ -564,14 +577,14 @@ x_2 = lean_uint32_of_nat(x_1);
|
|||
return x_2;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Elab_instInhabitedContextInfo___closed__5() {
|
||||
static lean_object* _init_l_Lean_Elab_instInhabitedContextInfo___closed__6() {
|
||||
_start:
|
||||
{
|
||||
uint32_t x_1; uint8_t x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5;
|
||||
x_1 = l_Lean_Elab_instInhabitedContextInfo___closed__4;
|
||||
x_1 = l_Lean_Elab_instInhabitedContextInfo___closed__5;
|
||||
x_2 = 0;
|
||||
x_3 = lean_box(0);
|
||||
x_4 = l_Lean_Elab_instInhabitedContextInfo___closed__3;
|
||||
x_4 = l_Lean_Elab_instInhabitedContextInfo___closed__4;
|
||||
x_5 = lean_alloc_ctor(0, 4, 5);
|
||||
lean_ctor_set(x_5, 0, x_3);
|
||||
lean_ctor_set(x_5, 1, x_4);
|
||||
|
|
@ -582,14 +595,14 @@ lean_ctor_set_uint8(x_5, sizeof(void*)*4 + 4, x_2);
|
|||
return x_5;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Elab_instInhabitedContextInfo___closed__6() {
|
||||
static lean_object* _init_l_Lean_Elab_instInhabitedContextInfo___closed__7() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5;
|
||||
x_1 = l_Lean_Elab_instInhabitedContextInfo___closed__1;
|
||||
x_2 = l_Lean_Elab_instInhabitedContextInfo___closed__2;
|
||||
x_3 = l_Lean_Elab_instInhabitedContextInfo___closed__3;
|
||||
x_4 = l_Lean_Elab_instInhabitedContextInfo___closed__5;
|
||||
x_2 = l_Lean_Elab_instInhabitedContextInfo___closed__3;
|
||||
x_3 = l_Lean_Elab_instInhabitedContextInfo___closed__4;
|
||||
x_4 = l_Lean_Elab_instInhabitedContextInfo___closed__6;
|
||||
x_5 = lean_alloc_ctor(0, 4, 0);
|
||||
lean_ctor_set(x_5, 0, x_1);
|
||||
lean_ctor_set(x_5, 1, x_2);
|
||||
|
|
@ -598,7 +611,7 @@ lean_ctor_set(x_5, 3, x_4);
|
|||
return x_5;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Elab_instInhabitedContextInfo___closed__7() {
|
||||
static lean_object* _init_l_Lean_Elab_instInhabitedContextInfo___closed__8() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
|
|
@ -606,12 +619,12 @@ x_1 = lean_mk_string("");
|
|||
return x_1;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Elab_instInhabitedContextInfo___closed__8() {
|
||||
static lean_object* _init_l_Lean_Elab_instInhabitedContextInfo___closed__9() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
x_1 = l_Lean_Elab_instInhabitedContextInfo___closed__7;
|
||||
x_2 = l_Lean_Elab_instInhabitedContextInfo___closed__3;
|
||||
x_1 = l_Lean_Elab_instInhabitedContextInfo___closed__8;
|
||||
x_2 = l_Lean_Elab_instInhabitedContextInfo___closed__4;
|
||||
x_3 = lean_alloc_ctor(0, 3, 0);
|
||||
lean_ctor_set(x_3, 0, x_1);
|
||||
lean_ctor_set(x_3, 1, x_2);
|
||||
|
|
@ -619,13 +632,13 @@ lean_ctor_set(x_3, 2, x_2);
|
|||
return x_3;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Elab_instInhabitedContextInfo___closed__9() {
|
||||
static lean_object* _init_l_Lean_Elab_instInhabitedContextInfo___closed__10() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6;
|
||||
x_1 = lean_box(0);
|
||||
x_2 = l_Lean_Elab_instInhabitedContextInfo___closed__6;
|
||||
x_3 = l_Lean_Elab_instInhabitedContextInfo___closed__8;
|
||||
x_2 = l_Lean_Elab_instInhabitedContextInfo___closed__7;
|
||||
x_3 = l_Lean_Elab_instInhabitedContextInfo___closed__9;
|
||||
x_4 = l_Lean_Elab_ContextInfo_mctx___default___closed__4;
|
||||
x_5 = lean_box(0);
|
||||
x_6 = lean_alloc_ctor(0, 6, 0);
|
||||
|
|
@ -642,7 +655,7 @@ static lean_object* _init_l_Lean_Elab_instInhabitedContextInfo() {
|
|||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = l_Lean_Elab_instInhabitedContextInfo___closed__9;
|
||||
x_1 = l_Lean_Elab_instInhabitedContextInfo___closed__10;
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
|
|
@ -677,14 +690,26 @@ return x_1;
|
|||
static lean_object* _init_l_Lean_Elab_instInhabitedTermInfo___closed__1() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
x_1 = l_Lean_Elab_ContextInfo_mctx___default___closed__2;
|
||||
x_2 = lean_unsigned_to_nat(0u);
|
||||
x_3 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_3, 0, x_1);
|
||||
lean_ctor_set(x_3, 1, x_2);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Elab_instInhabitedTermInfo___closed__2() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2;
|
||||
x_1 = l_Lean_Elab_instInhabitedContextInfo___closed__3;
|
||||
x_1 = l_Lean_Elab_instInhabitedContextInfo___closed__4;
|
||||
x_2 = lean_alloc_ctor(0, 1, 0);
|
||||
lean_ctor_set(x_2, 0, x_1);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
static size_t _init_l_Lean_Elab_instInhabitedTermInfo___closed__2() {
|
||||
static size_t _init_l_Lean_Elab_instInhabitedTermInfo___closed__3() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; size_t x_2;
|
||||
|
|
@ -693,14 +718,14 @@ x_2 = lean_usize_of_nat(x_1);
|
|||
return x_2;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Elab_instInhabitedTermInfo___closed__3() {
|
||||
static lean_object* _init_l_Lean_Elab_instInhabitedTermInfo___closed__4() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3; size_t x_4; lean_object* x_5;
|
||||
x_1 = l_Lean_Elab_instInhabitedTermInfo___closed__1;
|
||||
x_2 = l_Lean_Elab_instInhabitedContextInfo___closed__3;
|
||||
x_1 = l_Lean_Elab_instInhabitedTermInfo___closed__2;
|
||||
x_2 = l_Lean_Elab_instInhabitedContextInfo___closed__4;
|
||||
x_3 = lean_unsigned_to_nat(0u);
|
||||
x_4 = l_Lean_Elab_instInhabitedTermInfo___closed__2;
|
||||
x_4 = l_Lean_Elab_instInhabitedTermInfo___closed__3;
|
||||
x_5 = lean_alloc_ctor(0, 4, sizeof(size_t)*1);
|
||||
lean_ctor_set(x_5, 0, x_1);
|
||||
lean_ctor_set(x_5, 1, x_2);
|
||||
|
|
@ -710,19 +735,19 @@ lean_ctor_set_usize(x_5, 4, x_4);
|
|||
return x_5;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Elab_instInhabitedTermInfo___closed__4() {
|
||||
static lean_object* _init_l_Lean_Elab_instInhabitedTermInfo___closed__5() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
x_1 = l_Lean_Elab_ContextInfo_mctx___default___closed__3;
|
||||
x_2 = l_Lean_Elab_instInhabitedTermInfo___closed__3;
|
||||
x_1 = l_Lean_Elab_instInhabitedTermInfo___closed__1;
|
||||
x_2 = l_Lean_Elab_instInhabitedTermInfo___closed__4;
|
||||
x_3 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_3, 0, x_1);
|
||||
lean_ctor_set(x_3, 1, x_2);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
static uint64_t _init_l_Lean_Elab_instInhabitedTermInfo___closed__5() {
|
||||
static uint64_t _init_l_Lean_Elab_instInhabitedTermInfo___closed__6() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; uint64_t x_2;
|
||||
|
|
@ -731,26 +756,26 @@ x_2 = lean_uint64_of_nat(x_1);
|
|||
return x_2;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Elab_instInhabitedTermInfo___closed__6() {
|
||||
static lean_object* _init_l_Lean_Elab_instInhabitedTermInfo___closed__7() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; uint64_t x_2; lean_object* x_3;
|
||||
x_1 = lean_unsigned_to_nat(0u);
|
||||
x_2 = l_Lean_Elab_instInhabitedTermInfo___closed__5;
|
||||
x_2 = l_Lean_Elab_instInhabitedTermInfo___closed__6;
|
||||
x_3 = lean_alloc_ctor(0, 1, 8);
|
||||
lean_ctor_set(x_3, 0, x_1);
|
||||
lean_ctor_set_uint64(x_3, sizeof(void*)*1, x_2);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Elab_instInhabitedTermInfo___closed__7() {
|
||||
static lean_object* _init_l_Lean_Elab_instInhabitedTermInfo___closed__8() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; uint8_t x_5; lean_object* x_6;
|
||||
x_1 = lean_box(0);
|
||||
x_2 = l_Lean_Elab_instInhabitedElabInfo___closed__1;
|
||||
x_3 = l_Lean_Elab_instInhabitedTermInfo___closed__4;
|
||||
x_4 = l_Lean_Elab_instInhabitedTermInfo___closed__6;
|
||||
x_3 = l_Lean_Elab_instInhabitedTermInfo___closed__5;
|
||||
x_4 = l_Lean_Elab_instInhabitedTermInfo___closed__7;
|
||||
x_5 = 0;
|
||||
x_6 = lean_alloc_ctor(0, 4, 1);
|
||||
lean_ctor_set(x_6, 0, x_2);
|
||||
|
|
@ -765,7 +790,7 @@ static lean_object* _init_l_Lean_Elab_instInhabitedTermInfo() {
|
|||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = l_Lean_Elab_instInhabitedTermInfo___closed__7;
|
||||
x_1 = l_Lean_Elab_instInhabitedTermInfo___closed__8;
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
|
|
@ -927,8 +952,8 @@ _start:
|
|||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5;
|
||||
x_1 = lean_box(0);
|
||||
x_2 = l_Lean_Elab_instInhabitedTermInfo___closed__4;
|
||||
x_3 = l_Lean_Elab_instInhabitedTermInfo___closed__6;
|
||||
x_2 = l_Lean_Elab_instInhabitedTermInfo___closed__5;
|
||||
x_3 = l_Lean_Elab_instInhabitedTermInfo___closed__7;
|
||||
x_4 = lean_box(0);
|
||||
x_5 = lean_alloc_ctor(0, 5, 0);
|
||||
lean_ctor_set(x_5, 0, x_1);
|
||||
|
|
@ -975,7 +1000,7 @@ static lean_object* _init_l_Lean_Elab_instInhabitedMacroExpansionInfo___closed__
|
|||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
x_1 = l_Lean_Elab_instInhabitedTermInfo___closed__4;
|
||||
x_1 = l_Lean_Elab_instInhabitedTermInfo___closed__5;
|
||||
x_2 = lean_box(0);
|
||||
x_3 = lean_alloc_ctor(0, 3, 0);
|
||||
lean_ctor_set(x_3, 0, x_1);
|
||||
|
|
@ -1015,7 +1040,7 @@ _start:
|
|||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
x_1 = l_Lean_Elab_instInhabitedInfo___closed__1;
|
||||
x_2 = l_Lean_Elab_instInhabitedTermInfo___closed__3;
|
||||
x_2 = l_Lean_Elab_instInhabitedTermInfo___closed__4;
|
||||
x_3 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_3, 0, x_1);
|
||||
lean_ctor_set(x_3, 1, x_2);
|
||||
|
|
@ -1638,7 +1663,7 @@ _start:
|
|||
uint8_t x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_1 = 0;
|
||||
x_2 = l_Lean_Elab_ContextInfo_mctx___default___closed__3;
|
||||
x_3 = l_Lean_Elab_instInhabitedTermInfo___closed__3;
|
||||
x_3 = l_Lean_Elab_instInhabitedTermInfo___closed__4;
|
||||
x_4 = lean_alloc_ctor(0, 2, 1);
|
||||
lean_ctor_set(x_4, 0, x_2);
|
||||
lean_ctor_set(x_4, 1, x_3);
|
||||
|
|
@ -2100,8 +2125,8 @@ if (x_20 == 0)
|
|||
{
|
||||
lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24;
|
||||
x_21 = lean_ctor_get(x_1, 0);
|
||||
x_22 = l_Lean_Name_instBEqName;
|
||||
x_23 = l_Lean_instHashableName;
|
||||
x_22 = l_Lean_instBEqMVarId;
|
||||
x_23 = l_Lean_instHashableMVarId;
|
||||
lean_inc(x_21);
|
||||
lean_inc(x_2);
|
||||
x_24 = l_Std_PersistentHashMap_find_x3f___rarg(x_22, x_23, x_2, x_21);
|
||||
|
|
@ -2128,8 +2153,8 @@ lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30;
|
|||
x_27 = lean_ctor_get(x_1, 0);
|
||||
lean_inc(x_27);
|
||||
lean_dec(x_1);
|
||||
x_28 = l_Lean_Name_instBEqName;
|
||||
x_29 = l_Lean_instHashableName;
|
||||
x_28 = l_Lean_instBEqMVarId;
|
||||
x_29 = l_Lean_instHashableMVarId;
|
||||
lean_inc(x_27);
|
||||
lean_inc(x_2);
|
||||
x_30 = l_Std_PersistentHashMap_find_x3f___rarg(x_28, x_29, x_2, x_27);
|
||||
|
|
@ -2404,7 +2429,7 @@ _start:
|
|||
lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24;
|
||||
x_5 = lean_box(0);
|
||||
x_6 = l_Lean_Elab_ContextInfo_runMetaM___rarg___closed__1;
|
||||
x_7 = l_Lean_Elab_instInhabitedContextInfo___closed__3;
|
||||
x_7 = l_Lean_Elab_instInhabitedContextInfo___closed__4;
|
||||
x_8 = lean_unsigned_to_nat(0u);
|
||||
x_9 = lean_alloc_ctor(0, 5, 0);
|
||||
lean_ctor_set(x_9, 0, x_6);
|
||||
|
|
@ -2417,14 +2442,14 @@ x_11 = lean_ctor_get(x_1, 2);
|
|||
x_12 = lean_ctor_get(x_1, 3);
|
||||
x_13 = lean_ctor_get(x_1, 4);
|
||||
x_14 = lean_ctor_get(x_1, 5);
|
||||
x_15 = l_Lean_Elab_ContextInfo_runMetaM___rarg___closed__9;
|
||||
x_16 = l_Lean_NameSet_empty;
|
||||
x_15 = lean_box(0);
|
||||
x_16 = l_Lean_Elab_ContextInfo_runMetaM___rarg___closed__9;
|
||||
x_17 = l_Lean_Elab_InfoState_trees___default___closed__3;
|
||||
lean_inc(x_11);
|
||||
x_18 = lean_alloc_ctor(0, 4, 0);
|
||||
lean_ctor_set(x_18, 0, x_11);
|
||||
lean_ctor_set(x_18, 1, x_15);
|
||||
lean_ctor_set(x_18, 2, x_16);
|
||||
lean_ctor_set(x_18, 1, x_16);
|
||||
lean_ctor_set(x_18, 2, x_15);
|
||||
lean_ctor_set(x_18, 3, x_17);
|
||||
x_19 = l_Lean_Core_getMaxHeartbeats(x_12);
|
||||
x_20 = l_Lean_Elab_ContextInfo_runMetaM___rarg___closed__10;
|
||||
|
|
@ -2823,7 +2848,7 @@ static lean_object* _init_l___private_Lean_Elab_InfoTree_0__Lean_Elab_formatStxR
|
|||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2;
|
||||
x_1 = l_Lean_Elab_instInhabitedContextInfo___closed__7;
|
||||
x_1 = l_Lean_Elab_instInhabitedContextInfo___closed__8;
|
||||
x_2 = lean_alloc_ctor(2, 1, 0);
|
||||
lean_ctor_set(x_2, 0, x_1);
|
||||
return x_2;
|
||||
|
|
@ -4432,7 +4457,7 @@ static lean_object* _init_l_Lean_Elab_ContextInfo_ppGoals___closed__1() {
|
|||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
x_1 = l_Lean_Elab_ContextInfo_mctx___default___closed__3;
|
||||
x_1 = l_Lean_Elab_instInhabitedTermInfo___closed__1;
|
||||
x_2 = l_Lean_Elab_InfoState_trees___default___closed__3;
|
||||
x_3 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_3, 0, x_1);
|
||||
|
|
@ -8227,8 +8252,8 @@ lean_dec(x_4);
|
|||
x_6 = lean_ctor_get(x_3, 0);
|
||||
lean_inc(x_6);
|
||||
lean_dec(x_3);
|
||||
x_7 = l_Lean_Name_instBEqName;
|
||||
x_8 = l_Lean_instHashableName;
|
||||
x_7 = l_Lean_instBEqMVarId;
|
||||
x_8 = l_Lean_instHashableMVarId;
|
||||
x_9 = l_Std_PersistentHashMap_find_x3f___rarg(x_7, x_8, x_6, x_2);
|
||||
x_10 = lean_apply_2(x_5, lean_box(0), x_9);
|
||||
return x_10;
|
||||
|
|
@ -8267,8 +8292,8 @@ if (x_4 == 0)
|
|||
{
|
||||
lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8;
|
||||
x_5 = lean_ctor_get(x_3, 0);
|
||||
x_6 = l_Lean_Name_instBEqName;
|
||||
x_7 = l_Lean_instHashableName;
|
||||
x_6 = l_Lean_instBEqMVarId;
|
||||
x_7 = l_Lean_instHashableMVarId;
|
||||
x_8 = l_Std_PersistentHashMap_insert___rarg(x_6, x_7, x_5, x_1, x_2);
|
||||
lean_ctor_set(x_3, 0, x_8);
|
||||
return x_3;
|
||||
|
|
@ -8282,8 +8307,8 @@ x_11 = lean_ctor_get(x_3, 1);
|
|||
lean_inc(x_11);
|
||||
lean_inc(x_10);
|
||||
lean_dec(x_3);
|
||||
x_12 = l_Lean_Name_instBEqName;
|
||||
x_13 = l_Lean_instHashableName;
|
||||
x_12 = l_Lean_instBEqMVarId;
|
||||
x_13 = l_Lean_instHashableMVarId;
|
||||
x_14 = l_Std_PersistentHashMap_insert___rarg(x_12, x_13, x_10, x_1, x_2);
|
||||
x_15 = lean_alloc_ctor(0, 2, 1);
|
||||
lean_ctor_set(x_15, 0, x_14);
|
||||
|
|
@ -8620,8 +8645,8 @@ x_10 = lean_unsigned_to_nat(1u);
|
|||
x_11 = lean_nat_sub(x_7, x_10);
|
||||
lean_dec(x_7);
|
||||
x_12 = l_Std_PersistentArray_get_x21___at_Lean_Elab_withInfoHole___spec__1(x_6, x_11);
|
||||
x_13 = l_Lean_Name_instBEqName;
|
||||
x_14 = l_Lean_instHashableName;
|
||||
x_13 = l_Lean_instBEqMVarId;
|
||||
x_14 = l_Lean_instHashableMVarId;
|
||||
x_15 = l_Std_PersistentHashMap_insert___rarg(x_13, x_14, x_5, x_2, x_12);
|
||||
lean_ctor_set(x_3, 1, x_1);
|
||||
lean_ctor_set(x_3, 0, x_15);
|
||||
|
|
@ -8660,8 +8685,8 @@ x_23 = lean_unsigned_to_nat(1u);
|
|||
x_24 = lean_nat_sub(x_19, x_23);
|
||||
lean_dec(x_19);
|
||||
x_25 = l_Std_PersistentArray_get_x21___at_Lean_Elab_withInfoHole___spec__1(x_18, x_24);
|
||||
x_26 = l_Lean_Name_instBEqName;
|
||||
x_27 = l_Lean_instHashableName;
|
||||
x_26 = l_Lean_instBEqMVarId;
|
||||
x_27 = l_Lean_instHashableMVarId;
|
||||
x_28 = l_Std_PersistentHashMap_insert___rarg(x_26, x_27, x_17, x_2, x_25);
|
||||
x_29 = lean_alloc_ctor(0, 2, 1);
|
||||
lean_ctor_set(x_29, 0, x_28);
|
||||
|
|
@ -8962,8 +8987,8 @@ lean_mark_persistent(l_Lean_Elab_instInhabitedContextInfo___closed__2);
|
|||
l_Lean_Elab_instInhabitedContextInfo___closed__3 = _init_l_Lean_Elab_instInhabitedContextInfo___closed__3();
|
||||
lean_mark_persistent(l_Lean_Elab_instInhabitedContextInfo___closed__3);
|
||||
l_Lean_Elab_instInhabitedContextInfo___closed__4 = _init_l_Lean_Elab_instInhabitedContextInfo___closed__4();
|
||||
lean_mark_persistent(l_Lean_Elab_instInhabitedContextInfo___closed__4);
|
||||
l_Lean_Elab_instInhabitedContextInfo___closed__5 = _init_l_Lean_Elab_instInhabitedContextInfo___closed__5();
|
||||
lean_mark_persistent(l_Lean_Elab_instInhabitedContextInfo___closed__5);
|
||||
l_Lean_Elab_instInhabitedContextInfo___closed__6 = _init_l_Lean_Elab_instInhabitedContextInfo___closed__6();
|
||||
lean_mark_persistent(l_Lean_Elab_instInhabitedContextInfo___closed__6);
|
||||
l_Lean_Elab_instInhabitedContextInfo___closed__7 = _init_l_Lean_Elab_instInhabitedContextInfo___closed__7();
|
||||
|
|
@ -8972,6 +8997,8 @@ l_Lean_Elab_instInhabitedContextInfo___closed__8 = _init_l_Lean_Elab_instInhabit
|
|||
lean_mark_persistent(l_Lean_Elab_instInhabitedContextInfo___closed__8);
|
||||
l_Lean_Elab_instInhabitedContextInfo___closed__9 = _init_l_Lean_Elab_instInhabitedContextInfo___closed__9();
|
||||
lean_mark_persistent(l_Lean_Elab_instInhabitedContextInfo___closed__9);
|
||||
l_Lean_Elab_instInhabitedContextInfo___closed__10 = _init_l_Lean_Elab_instInhabitedContextInfo___closed__10();
|
||||
lean_mark_persistent(l_Lean_Elab_instInhabitedContextInfo___closed__10);
|
||||
l_Lean_Elab_instInhabitedContextInfo = _init_l_Lean_Elab_instInhabitedContextInfo();
|
||||
lean_mark_persistent(l_Lean_Elab_instInhabitedContextInfo);
|
||||
l_Lean_Elab_instInhabitedElabInfo___closed__1 = _init_l_Lean_Elab_instInhabitedElabInfo___closed__1();
|
||||
|
|
@ -8982,15 +9009,17 @@ l_Lean_Elab_TermInfo_isBinder___default = _init_l_Lean_Elab_TermInfo_isBinder___
|
|||
l_Lean_Elab_instInhabitedTermInfo___closed__1 = _init_l_Lean_Elab_instInhabitedTermInfo___closed__1();
|
||||
lean_mark_persistent(l_Lean_Elab_instInhabitedTermInfo___closed__1);
|
||||
l_Lean_Elab_instInhabitedTermInfo___closed__2 = _init_l_Lean_Elab_instInhabitedTermInfo___closed__2();
|
||||
lean_mark_persistent(l_Lean_Elab_instInhabitedTermInfo___closed__2);
|
||||
l_Lean_Elab_instInhabitedTermInfo___closed__3 = _init_l_Lean_Elab_instInhabitedTermInfo___closed__3();
|
||||
lean_mark_persistent(l_Lean_Elab_instInhabitedTermInfo___closed__3);
|
||||
l_Lean_Elab_instInhabitedTermInfo___closed__4 = _init_l_Lean_Elab_instInhabitedTermInfo___closed__4();
|
||||
lean_mark_persistent(l_Lean_Elab_instInhabitedTermInfo___closed__4);
|
||||
l_Lean_Elab_instInhabitedTermInfo___closed__5 = _init_l_Lean_Elab_instInhabitedTermInfo___closed__5();
|
||||
lean_mark_persistent(l_Lean_Elab_instInhabitedTermInfo___closed__5);
|
||||
l_Lean_Elab_instInhabitedTermInfo___closed__6 = _init_l_Lean_Elab_instInhabitedTermInfo___closed__6();
|
||||
lean_mark_persistent(l_Lean_Elab_instInhabitedTermInfo___closed__6);
|
||||
l_Lean_Elab_instInhabitedTermInfo___closed__7 = _init_l_Lean_Elab_instInhabitedTermInfo___closed__7();
|
||||
lean_mark_persistent(l_Lean_Elab_instInhabitedTermInfo___closed__7);
|
||||
l_Lean_Elab_instInhabitedTermInfo___closed__8 = _init_l_Lean_Elab_instInhabitedTermInfo___closed__8();
|
||||
lean_mark_persistent(l_Lean_Elab_instInhabitedTermInfo___closed__8);
|
||||
l_Lean_Elab_instInhabitedTermInfo = _init_l_Lean_Elab_instInhabitedTermInfo();
|
||||
lean_mark_persistent(l_Lean_Elab_instInhabitedTermInfo);
|
||||
l_Lean_Elab_instInhabitedCommandInfo = _init_l_Lean_Elab_instInhabitedCommandInfo();
|
||||
|
|
|
|||
12
stage0/stdlib/Lean/Elab/LetRec.c
generated
12
stage0/stdlib/Lean/Elab/LetRec.c
generated
|
|
@ -86,7 +86,6 @@ lean_object* l_Lean_throwError___at_Lean_Elab_Term_throwErrorIfErrors___spec__1(
|
|||
uint8_t l_List_foldr___at___private_Lean_Elab_LetRec_0__Lean_Elab_Term_registerLetRecsToLift___spec__1(lean_object*, uint8_t, lean_object*);
|
||||
static lean_object* l_Lean_Elab_elabAttr___at___private_Lean_Elab_LetRec_0__Lean_Elab_Term_mkLetRecDeclView___spec__15___closed__4;
|
||||
lean_object* l_Lean_mkAppN(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_liftMacroM___at___private_Lean_Elab_LetRec_0__Lean_Elab_Term_mkLetRecDeclView___spec__16___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_throwError___at___private_Lean_Elab_Term_0__Lean_Elab_Term_applyAttributesCore___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l___regBuiltin_Lean_Elab_Term_elabLetRec___closed__8;
|
||||
static lean_object* l_Lean_Elab_elabAttr___at___private_Lean_Elab_LetRec_0__Lean_Elab_Term_mkLetRecDeclView___spec__15___closed__9;
|
||||
|
|
@ -1644,7 +1643,7 @@ lean_inc(x_13);
|
|||
x_14 = lean_ctor_get(x_6, 5);
|
||||
lean_inc(x_14);
|
||||
lean_inc(x_12);
|
||||
x_15 = lean_alloc_closure((void*)(l_Lean_Elab_liftMacroM___at___private_Lean_Elab_LetRec_0__Lean_Elab_Term_mkLetRecDeclView___spec__16___lambda__1___boxed), 4, 1);
|
||||
x_15 = lean_alloc_closure((void*)(l_Lean_Elab_liftMacroM___at___private_Lean_Elab_LetRec_0__Lean_Elab_Term_mkLetRecDeclView___spec__16___lambda__1), 4, 1);
|
||||
lean_closure_set(x_15, 0, x_12);
|
||||
lean_inc(x_13);
|
||||
x_16 = lean_alloc_closure((void*)(l_ReaderT_pure___at_Lean_Elab_liftMacroM___spec__1___rarg___boxed), 3, 1);
|
||||
|
|
@ -3565,15 +3564,6 @@ lean_dec(x_1);
|
|||
return x_7;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_liftMacroM___at___private_Lean_Elab_LetRec_0__Lean_Elab_Term_mkLetRecDeclView___spec__16___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_5;
|
||||
x_5 = l_Lean_Elab_liftMacroM___at___private_Lean_Elab_LetRec_0__Lean_Elab_Term_mkLetRecDeclView___spec__16___lambda__1(x_1, x_2, x_3, x_4);
|
||||
lean_dec(x_1);
|
||||
return x_5;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_liftMacroM___at___private_Lean_Elab_LetRec_0__Lean_Elab_Term_mkLetRecDeclView___spec__16___lambda__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
|
|
|
|||
54
stage0/stdlib/Lean/Elab/Level.c
generated
54
stage0/stdlib/Lean/Elab/Level.c
generated
|
|
@ -32,8 +32,8 @@ static lean_object* l_Lean_Elab_Level_elabLevel___closed__16;
|
|||
static lean_object* l_Lean_Elab_Level_instMonadRefLevelElabM___closed__4;
|
||||
size_t l_USize_sub(size_t, size_t);
|
||||
lean_object* l___private_Init_Meta_0__Lean_Syntax_isNatLitAux(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_mkFreshMVarId___at_Lean_Elab_Level_mkFreshLevelMVar___spec__1___boxed(lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Elab_Level_0__Lean_Elab_Level_checkUniverseOffset___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_mkFreshId___at_Lean_Elab_Level_mkFreshLevelMVar___spec__1(lean_object*);
|
||||
uint8_t lean_name_eq(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Level_instMonadRefLevelElabM___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Elab_Level_elabLevel___closed__9;
|
||||
|
|
@ -65,6 +65,7 @@ lean_object* lean_level_mk_max_simp(lean_object*, lean_object*);
|
|||
lean_object* l_Lean_replaceRef(lean_object*, lean_object*);
|
||||
lean_object* l_Array_foldrMUnsafe_fold___at_Lean_Elab_Level_elabLevel___spec__7___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Elab_Level_initFn____x40_Lean_Elab_Level___hyg_203____closed__1;
|
||||
lean_object* l_Lean_mkFreshId___at_Lean_Elab_Level_mkFreshLevelMVar___spec__2___boxed(lean_object*);
|
||||
lean_object* lean_level_mk_imax_simp(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Level_initFn____x40_Lean_Elab_Level___hyg_203_(lean_object*);
|
||||
static lean_object* l_Lean_Elab_Level_elabLevel___closed__12;
|
||||
|
|
@ -76,6 +77,7 @@ static lean_object* l_Lean_Elab_Level_maxUniverseOffset___closed__1;
|
|||
lean_object* l_Lean_throwError___at_Lean_Elab_Level_elabLevel___spec__1(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_throwError___at_Lean_Elab_Level_elabLevel___spec__5(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Level_instMonadNameGeneratorLevelElabM___lambda__3(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_mkFreshId___at_Lean_Elab_Level_mkFreshLevelMVar___spec__2(lean_object*);
|
||||
static lean_object* l_Lean_Elab_Level_elabLevel___closed__2;
|
||||
lean_object* l_Array_foldrMUnsafe_fold___at_Lean_Elab_Level_elabLevel___spec__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Level_instMonadRefLevelElabM___lambda__1(lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -90,6 +92,7 @@ lean_object* l___private_Lean_Elab_Level_0__Lean_Elab_Level_checkUniverseOffset(
|
|||
static lean_object* l_Lean_Elab_Level_elabLevel___closed__8;
|
||||
static lean_object* l_Lean_Elab_Level_elabLevel___closed__4;
|
||||
static lean_object* l_Lean_Elab_Level_elabLevel___closed__17;
|
||||
lean_object* l_Lean_mkFreshId___at_Lean_Elab_Level_mkFreshLevelMVar___spec__2___rarg(lean_object*);
|
||||
static lean_object* l_Lean_Elab_Level_elabLevel___closed__1;
|
||||
lean_object* l_Lean_Option_register___at_Lean_initFn____x40_Lean_Util_RecDepth___hyg_4____spec__1(lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_identKind;
|
||||
|
|
@ -110,7 +113,6 @@ lean_object* l_Array_foldrMUnsafe_fold___at_Lean_Elab_Level_elabLevel___spec__7(
|
|||
static lean_object* l_Lean_Elab_throwIllFormedSyntax___at_Lean_Elab_Level_elabLevel___spec__2___closed__2;
|
||||
lean_object* l_Lean_throwError___at_Lean_Elab_Level_elabLevel___spec__4___boxed(lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l___private_Lean_Elab_Level_0__Lean_Elab_Level_checkUniverseOffset___rarg___lambda__1___closed__2;
|
||||
lean_object* l_Lean_mkFreshId___at_Lean_Elab_Level_mkFreshLevelMVar___spec__1___boxed(lean_object*);
|
||||
static lean_object* l_Lean_Elab_Level_elabLevel___closed__3;
|
||||
static lean_object* l_Lean_Elab_Level_elabLevel___closed__15;
|
||||
static lean_object* l_Lean_Elab_Level_elabLevel___closed__18;
|
||||
|
|
@ -122,11 +124,11 @@ lean_object* lean_name_mk_numeral(lean_object*, lean_object*);
|
|||
lean_object* l___private_Lean_Elab_Level_0__Lean_Elab_Level_checkUniverseOffset___at_Lean_Elab_Level_elabLevel___spec__3(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Level_instMonadNameGeneratorLevelElabM___lambda__1(lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Elab_Level_instMonadRefLevelElabM___closed__2;
|
||||
lean_object* l_Lean_mkFreshId___at_Lean_Elab_Level_mkFreshLevelMVar___spec__1___rarg(lean_object*);
|
||||
lean_object* l_Lean_Elab_Level_instAddMessageContextLevelElabM___boxed(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_ReaderT_read___at_Lean_Elab_Level_instMonadOptionsLevelElabM___spec__1(lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Elab_Level_instMonadNameGeneratorLevelElabM___closed__1;
|
||||
static lean_object* l_Lean_Elab_Level_initFn____x40_Lean_Elab_Level___hyg_203____closed__4;
|
||||
lean_object* l_Lean_mkFreshMVarId___at_Lean_Elab_Level_mkFreshLevelMVar___spec__1(lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Elab_Level_instMonadRefLevelElabM___closed__1;
|
||||
lean_object* l___private_Lean_Elab_Level_0__Lean_Elab_Level_checkUniverseOffset___at_Lean_Elab_Level_elabLevel___spec__3___boxed(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Level_ofNat(lean_object*);
|
||||
|
|
@ -525,7 +527,7 @@ lean_dec(x_2);
|
|||
return x_4;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_mkFreshId___at_Lean_Elab_Level_mkFreshLevelMVar___spec__1___rarg(lean_object* x_1) {
|
||||
lean_object* l_Lean_mkFreshId___at_Lean_Elab_Level_mkFreshLevelMVar___spec__2___rarg(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
uint8_t x_2;
|
||||
|
|
@ -622,19 +624,44 @@ return x_29;
|
|||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_mkFreshId___at_Lean_Elab_Level_mkFreshLevelMVar___spec__1(lean_object* x_1) {
|
||||
lean_object* l_Lean_mkFreshId___at_Lean_Elab_Level_mkFreshLevelMVar___spec__2(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_2;
|
||||
x_2 = lean_alloc_closure((void*)(l_Lean_mkFreshId___at_Lean_Elab_Level_mkFreshLevelMVar___spec__1___rarg), 1, 0);
|
||||
x_2 = lean_alloc_closure((void*)(l_Lean_mkFreshId___at_Lean_Elab_Level_mkFreshLevelMVar___spec__2___rarg), 1, 0);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_mkFreshMVarId___at_Lean_Elab_Level_mkFreshLevelMVar___spec__1(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_3; uint8_t x_4;
|
||||
x_3 = l_Lean_mkFreshId___at_Lean_Elab_Level_mkFreshLevelMVar___spec__2___rarg(x_2);
|
||||
x_4 = !lean_is_exclusive(x_3);
|
||||
if (x_4 == 0)
|
||||
{
|
||||
return x_3;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_5; lean_object* x_6; lean_object* x_7;
|
||||
x_5 = lean_ctor_get(x_3, 0);
|
||||
x_6 = lean_ctor_get(x_3, 1);
|
||||
lean_inc(x_6);
|
||||
lean_inc(x_5);
|
||||
lean_dec(x_3);
|
||||
x_7 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_7, 0, x_5);
|
||||
lean_ctor_set(x_7, 1, x_6);
|
||||
return x_7;
|
||||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_Level_mkFreshLevelMVar(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_3; uint8_t x_4;
|
||||
x_3 = l_Lean_mkFreshId___at_Lean_Elab_Level_mkFreshLevelMVar___spec__1___rarg(x_2);
|
||||
x_3 = l_Lean_mkFreshMVarId___at_Lean_Elab_Level_mkFreshLevelMVar___spec__1(x_1, x_2);
|
||||
x_4 = !lean_is_exclusive(x_3);
|
||||
if (x_4 == 0)
|
||||
{
|
||||
|
|
@ -717,15 +744,24 @@ return x_27;
|
|||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_mkFreshId___at_Lean_Elab_Level_mkFreshLevelMVar___spec__1___boxed(lean_object* x_1) {
|
||||
lean_object* l_Lean_mkFreshId___at_Lean_Elab_Level_mkFreshLevelMVar___spec__2___boxed(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_2;
|
||||
x_2 = l_Lean_mkFreshId___at_Lean_Elab_Level_mkFreshLevelMVar___spec__1(x_1);
|
||||
x_2 = l_Lean_mkFreshId___at_Lean_Elab_Level_mkFreshLevelMVar___spec__2(x_1);
|
||||
lean_dec(x_1);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_mkFreshMVarId___at_Lean_Elab_Level_mkFreshLevelMVar___spec__1___boxed(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_3;
|
||||
x_3 = l_Lean_mkFreshMVarId___at_Lean_Elab_Level_mkFreshLevelMVar___spec__1(x_1, x_2);
|
||||
lean_dec(x_1);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_Level_mkFreshLevelMVar___boxed(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
|
|
|
|||
555
stage0/stdlib/Lean/Elab/Match.c
generated
555
stage0/stdlib/Lean/Elab/Match.c
generated
File diff suppressed because it is too large
Load diff
5839
stage0/stdlib/Lean/Elab/MutualDef.c
generated
5839
stage0/stdlib/Lean/Elab/MutualDef.c
generated
File diff suppressed because it is too large
Load diff
14
stage0/stdlib/Lean/Elab/PatternVar.c
generated
14
stage0/stdlib/Lean/Elab/PatternVar.c
generated
|
|
@ -451,7 +451,6 @@ uint8_t l_List_isEmpty___rarg(lean_object*);
|
|||
static lean_object* l_Lean_addTrace___at_Lean_Elab_Term_CollectPatternVars_main___spec__1___closed__4;
|
||||
lean_object* l_Lean_throwError___at___private_Lean_Elab_PatternVar_0__Lean_Elab_Term_CollectPatternVars_processVar___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_CollectPatternVars_collect_processCtorAppCore_match__3___rarg(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_liftMacroM___at_Lean_Elab_Term_getPatternVars___spec__1___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_throwError___at_Lean_Elab_Term_CollectPatternVars_collect_processExplicitArg___spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_forallTelescopeReducing___at_Lean_Elab_Term_CollectPatternVars_collect_processCtorAppCore___spec__4___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Elab_PatternVar_0__Lean_Elab_Term_CollectPatternVars_throwInvalidPattern___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -10329,7 +10328,7 @@ lean_inc(x_13);
|
|||
x_14 = lean_ctor_get(x_6, 5);
|
||||
lean_inc(x_14);
|
||||
lean_inc(x_12);
|
||||
x_15 = lean_alloc_closure((void*)(l_Lean_Elab_liftMacroM___at_Lean_Elab_Term_getPatternVars___spec__1___lambda__1___boxed), 4, 1);
|
||||
x_15 = lean_alloc_closure((void*)(l_Lean_Elab_liftMacroM___at_Lean_Elab_Term_getPatternVars___spec__1___lambda__1), 4, 1);
|
||||
lean_closure_set(x_15, 0, x_12);
|
||||
lean_inc(x_13);
|
||||
x_16 = lean_alloc_closure((void*)(l_ReaderT_pure___at_Lean_Elab_liftMacroM___spec__1___rarg___boxed), 3, 1);
|
||||
|
|
@ -10698,15 +10697,6 @@ lean_dec(x_1);
|
|||
return x_7;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_liftMacroM___at_Lean_Elab_Term_getPatternVars___spec__1___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_5;
|
||||
x_5 = l_Lean_Elab_liftMacroM___at_Lean_Elab_Term_getPatternVars___spec__1___lambda__1(x_1, x_2, x_3, x_4);
|
||||
lean_dec(x_1);
|
||||
return x_5;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_liftMacroM___at_Lean_Elab_Term_getPatternVars___spec__1___lambda__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
|
|
@ -11164,7 +11154,7 @@ lean_inc(x_14);
|
|||
x_15 = lean_ctor_get(x_7, 5);
|
||||
lean_inc(x_15);
|
||||
lean_inc(x_13);
|
||||
x_16 = lean_alloc_closure((void*)(l_Lean_Elab_liftMacroM___at_Lean_Elab_Term_getPatternVars___spec__1___lambda__1___boxed), 4, 1);
|
||||
x_16 = lean_alloc_closure((void*)(l_Lean_Elab_liftMacroM___at_Lean_Elab_Term_getPatternVars___spec__1___lambda__1), 4, 1);
|
||||
lean_closure_set(x_16, 0, x_13);
|
||||
lean_inc(x_14);
|
||||
x_17 = lean_alloc_closure((void*)(l_ReaderT_pure___at_Lean_Elab_liftMacroM___spec__1___rarg___boxed), 3, 1);
|
||||
|
|
|
|||
4
stage0/stdlib/Lean/Elab/PreDefinition/Main.c
generated
4
stage0/stdlib/Lean/Elab/PreDefinition/Main.c
generated
|
|
@ -122,6 +122,7 @@ size_t lean_usize_modn(size_t, lean_object*);
|
|||
static lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_addPreDefinitions___spec__7___lambda__1___closed__4;
|
||||
lean_object* l___private_Init_Util_0__mkPanicMessageWithDecl(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
uint8_t l_Array_isEmpty___rarg(lean_object*);
|
||||
lean_object* l_List_mapTRAux___at_Lean_Meta_substCore___spec__6(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_mapErrorImp___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_addPreDefinitions___spec__7___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Elab_PreDefinition_Main_0__Lean_Elab_partitionPreDefs(lean_object*);
|
||||
|
|
@ -182,7 +183,6 @@ static lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_addPreDefinitions___
|
|||
lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_addPreDefinitions___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Elab_PreDefinition_Main_0__Lean_Elab_addAndCompilePartial___spec__1___closed__1;
|
||||
static lean_object* l___private_Lean_Util_SCC_0__Lean_SCC_getDataOf___at___private_Lean_Elab_PreDefinition_Main_0__Lean_Elab_partitionPreDefs___spec__6___closed__1;
|
||||
lean_object* l_List_mapTRAux___at_Lean_Meta_IndPredBelow_mkBelow___spec__4(lean_object*, lean_object*);
|
||||
lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Elab_PreDefinition_Main_0__Lean_Elab_addAndCompilePartial___spec__1___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_setMCtx(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Util_SCC_0__Lean_SCC_sccAux___at___private_Lean_Elab_PreDefinition_Main_0__Lean_Elab_partitionPreDefs___spec__9___lambda__2(lean_object*, lean_object*);
|
||||
|
|
@ -4786,7 +4786,7 @@ x_40 = l_Array_mapMUnsafe_map___at_Lean_Elab_addPreDefinitions___spec__6(x_38, x
|
|||
x_41 = x_40;
|
||||
x_42 = lean_array_to_list(lean_box(0), x_41);
|
||||
x_43 = lean_box(0);
|
||||
x_44 = l_List_mapTRAux___at_Lean_Meta_IndPredBelow_mkBelow___spec__4(x_42, x_43);
|
||||
x_44 = l_List_mapTRAux___at_Lean_Meta_substCore___spec__6(x_42, x_43);
|
||||
x_45 = l_Lean_MessageData_ofList(x_44);
|
||||
lean_dec(x_44);
|
||||
x_46 = l_Array_forInUnsafe_loop___at___private_Lean_Elab_PreDefinition_Main_0__Lean_Elab_addAndCompilePartial___spec__1___lambda__2___closed__4;
|
||||
|
|
|
|||
12
stage0/stdlib/Lean/Elab/PreDefinition/Structural.c
generated
12
stage0/stdlib/Lean/Elab/PreDefinition/Structural.c
generated
|
|
@ -22,7 +22,6 @@ lean_object* lean_array_set(lean_object*, lean_object*, lean_object*);
|
|||
lean_object* l_Lean_throwError___at___private_Lean_Elab_PreDefinition_Structural_0__Lean_Elab_Structural_findRecArg_loop___spec__6___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Elab_PreDefinition_Structural_0__Lean_Elab_Structural_shouldBetaReduce___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_Structural_0__Lean_Elab_Structural_withBelowDict___spec__1___rarg___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at_Lean_Meta_mkCongrLemma___spec__8(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_throwError___at___private_Lean_Elab_PreDefinition_Structural_0__Lean_Elab_Structural_findRecArg_loop___spec__6(lean_object*);
|
||||
size_t l_USize_add(size_t, size_t);
|
||||
lean_object* l_Lean_Meta_withLocalDecl___at___private_Lean_Elab_PreDefinition_Structural_0__Lean_Elab_Structural_replaceRecApps_loop___spec__15___rarg(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -72,6 +71,7 @@ uint8_t l___private_Lean_Elab_PreDefinition_Structural_0__Lean_Elab_Structural_c
|
|||
lean_object* l___private_Lean_Elab_PreDefinition_Structural_0__Lean_Elab_Structural_withBelowDict___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Expr_withAppAux___at_Lean_Elab_Structural_addSmartUnfoldingDefAux_visit___spec__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_IndPredBelow_mkBelowMatcher(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at_Lean_Meta_mkCongrLemma___spec__10(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l___private_Lean_Elab_PreDefinition_Structural_0__Lean_Elab_Structural_findRecArg_loop___rarg___closed__7;
|
||||
lean_object* l_Lean_Meta_MatcherApp_addArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Elab_PreDefinition_Structural_0__Lean_Elab_Structural_replaceIndPredRecApps(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -162,7 +162,6 @@ lean_object* l___private_Lean_Elab_PreDefinition_Structural_0__Lean_Elab_Structu
|
|||
static lean_object* l___private_Lean_Elab_PreDefinition_Structural_0__Lean_Elab_Structural_mkBRecOn___lambda__9___closed__2;
|
||||
lean_object* l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_Structural_0__Lean_Elab_Structural_withBelowDict___spec__1___rarg___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
uint8_t l_USize_decLt(size_t, size_t);
|
||||
lean_object* l_Lean_addTrace___at_Lean_Meta_mkCongrLemma___spec__7(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l___private_Lean_Elab_PreDefinition_Structural_0__Lean_Elab_Structural_withBelowDict___rarg___closed__2;
|
||||
static lean_object* l___private_Lean_Elab_PreDefinition_Structural_0__Lean_Elab_Structural_findRecArg_loop___rarg___lambda__1___closed__3;
|
||||
static lean_object* l___private_Lean_Elab_PreDefinition_Structural_0__Lean_Elab_Structural_findRecArg_loop___rarg___closed__3;
|
||||
|
|
@ -238,6 +237,7 @@ static lean_object* l_Lean_Elab_Structural_instInhabitedM___closed__1;
|
|||
static lean_object* l___private_Lean_Elab_PreDefinition_Structural_0__Lean_Elab_Structural_toBelowAux___closed__5;
|
||||
static lean_object* l_Lean_Expr_withAppAux___at___private_Lean_Elab_PreDefinition_Structural_0__Lean_Elab_Structural_withBelowDict___spec__1___rarg___closed__1;
|
||||
lean_object* l___private_Lean_Elab_PreDefinition_Structural_0__Lean_Elab_Structural_replaceRecApps_loop_match__3___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_addTrace___at_Lean_Meta_mkCongrLemma___spec__9(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_ReaderT_bind___at___private_Lean_Elab_PreDefinition_Structural_0__Lean_Elab_Structural_findRecArg_loop___spec__4(lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Elab_PreDefinition_Structural_0__Lean_Elab_Structural_elimRecursion___lambda__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l___private_Lean_Elab_PreDefinition_Structural_0__Lean_Elab_Structural_findRecArg_loop___rarg___lambda__1___closed__4;
|
||||
|
|
@ -6614,7 +6614,7 @@ lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; uint
|
|||
x_38 = lean_ctor_get(x_32, 1);
|
||||
lean_inc(x_38);
|
||||
lean_dec(x_32);
|
||||
x_39 = l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at_Lean_Meta_mkCongrLemma___spec__8(x_13, x_5, x_6, x_7, x_8, x_38);
|
||||
x_39 = l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at_Lean_Meta_mkCongrLemma___spec__10(x_13, x_5, x_6, x_7, x_8, x_38);
|
||||
x_40 = lean_ctor_get(x_39, 0);
|
||||
lean_inc(x_40);
|
||||
x_41 = lean_ctor_get(x_39, 1);
|
||||
|
|
@ -6659,7 +6659,7 @@ x_25 = l___private_Lean_Elab_PreDefinition_Structural_0__Lean_Elab_Structural_fi
|
|||
x_26 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_26, 0, x_24);
|
||||
lean_ctor_set(x_26, 1, x_25);
|
||||
x_27 = l_Lean_addTrace___at_Lean_Meta_mkCongrLemma___spec__7(x_13, x_26, x_5, x_6, x_7, x_8, x_15);
|
||||
x_27 = l_Lean_addTrace___at_Lean_Meta_mkCongrLemma___spec__9(x_13, x_26, x_5, x_6, x_7, x_8, x_15);
|
||||
x_28 = lean_ctor_get(x_27, 0);
|
||||
lean_inc(x_28);
|
||||
x_29 = lean_ctor_get(x_27, 1);
|
||||
|
|
@ -7070,7 +7070,7 @@ lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; uint
|
|||
x_33 = lean_ctor_get(x_27, 1);
|
||||
lean_inc(x_33);
|
||||
lean_dec(x_27);
|
||||
x_34 = l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at_Lean_Meta_mkCongrLemma___spec__8(x_12, x_4, x_5, x_6, x_7, x_33);
|
||||
x_34 = l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at_Lean_Meta_mkCongrLemma___spec__10(x_12, x_4, x_5, x_6, x_7, x_33);
|
||||
x_35 = lean_ctor_get(x_34, 0);
|
||||
lean_inc(x_35);
|
||||
x_36 = lean_ctor_get(x_34, 1);
|
||||
|
|
@ -7105,7 +7105,7 @@ x_20 = l___private_Lean_Elab_PreDefinition_Structural_0__Lean_Elab_Structural_fi
|
|||
x_21 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_21, 0, x_19);
|
||||
lean_ctor_set(x_21, 1, x_20);
|
||||
x_22 = l_Lean_addTrace___at_Lean_Meta_mkCongrLemma___spec__7(x_12, x_21, x_4, x_5, x_6, x_7, x_14);
|
||||
x_22 = l_Lean_addTrace___at_Lean_Meta_mkCongrLemma___spec__9(x_12, x_21, x_4, x_5, x_6, x_7, x_14);
|
||||
x_23 = lean_ctor_get(x_22, 0);
|
||||
lean_inc(x_23);
|
||||
x_24 = lean_ctor_get(x_22, 1);
|
||||
|
|
|
|||
55
stage0/stdlib/Lean/Elab/Print.c
generated
55
stage0/stdlib/Lean/Elab/Print.c
generated
|
|
@ -13,7 +13,6 @@
|
|||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
lean_object* l_List_reverse___rarg(lean_object*);
|
||||
lean_object* l_Lean_Elab_Command_CollectAxioms_collect_match__1(lean_object*);
|
||||
lean_object* l_Lean_Elab_throwUnsupportedSyntax___at_Lean_Elab_Command_elabPrintAxioms___spec__1___boxed(lean_object*, lean_object*);
|
||||
static lean_object* l___private_Lean_Elab_Print_0__Lean_Elab_Command_printDefLike___closed__4;
|
||||
|
|
@ -146,6 +145,7 @@ lean_object* l___private_Init_Util_0__mkPanicMessageWithDecl(lean_object*, lean_
|
|||
uint8_t l_Array_isEmpty___rarg(lean_object*);
|
||||
static lean_object* l___private_Lean_Elab_Print_0__Lean_Elab_Command_throwUnknownId___closed__4;
|
||||
lean_object* l___private_Lean_Elab_Print_0__Lean_Elab_Command_mkHeader(lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_List_mapTRAux___at_Lean_Meta_substCore___spec__6(lean_object*, lean_object*);
|
||||
static lean_object* l___private_Lean_Elab_Print_0__Lean_Elab_Command_levelParamsToMessageData___closed__8;
|
||||
static lean_object* l___private_Lean_Elab_Print_0__Lean_Elab_Command_throwUnknownId___closed__1;
|
||||
lean_object* l_Lean_ResolveName_resolveGlobalName(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -170,7 +170,6 @@ static lean_object* l___private_Lean_Elab_Print_0__Lean_Elab_Command_throwUnknow
|
|||
lean_object* l___private_Lean_Elab_Print_0__Lean_Elab_Command_printQuot___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_List_filterAux___at_Lean_resolveGlobalConstCore___spec__1(lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Elab_Command_elabPrint___closed__10;
|
||||
lean_object* l_List_mapTRAux___at___private_Lean_Elab_Print_0__Lean_Elab_Command_printAxiomsOf___spec__1(lean_object*, lean_object*);
|
||||
lean_object* l_Std_PersistentArray_push___rarg(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_pushInfoLeaf___at___private_Lean_Elab_Print_0__Lean_Elab_Command_printId___spec__8(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Elab_Print_0__Lean_Elab_Command_mkHeader_match__1___rarg(uint8_t, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -5345,56 +5344,6 @@ x_2 = lean_alloc_closure((void*)(l___private_Lean_Elab_Print_0__Lean_Elab_Comman
|
|||
return x_2;
|
||||
}
|
||||
}
|
||||
lean_object* l_List_mapTRAux___at___private_Lean_Elab_Print_0__Lean_Elab_Command_printAxiomsOf___spec__1(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
if (lean_obj_tag(x_1) == 0)
|
||||
{
|
||||
lean_object* x_3;
|
||||
x_3 = l_List_reverse___rarg(x_2);
|
||||
return x_3;
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_4;
|
||||
x_4 = !lean_is_exclusive(x_1);
|
||||
if (x_4 == 0)
|
||||
{
|
||||
lean_object* x_5; lean_object* x_6; lean_object* x_7;
|
||||
x_5 = lean_ctor_get(x_1, 0);
|
||||
x_6 = lean_ctor_get(x_1, 1);
|
||||
x_7 = lean_alloc_ctor(4, 1, 0);
|
||||
lean_ctor_set(x_7, 0, x_5);
|
||||
lean_ctor_set(x_1, 1, x_2);
|
||||
lean_ctor_set(x_1, 0, x_7);
|
||||
{
|
||||
lean_object* _tmp_0 = x_6;
|
||||
lean_object* _tmp_1 = x_1;
|
||||
x_1 = _tmp_0;
|
||||
x_2 = _tmp_1;
|
||||
}
|
||||
goto _start;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12;
|
||||
x_9 = lean_ctor_get(x_1, 0);
|
||||
x_10 = lean_ctor_get(x_1, 1);
|
||||
lean_inc(x_10);
|
||||
lean_inc(x_9);
|
||||
lean_dec(x_1);
|
||||
x_11 = lean_alloc_ctor(4, 1, 0);
|
||||
lean_ctor_set(x_11, 0, x_9);
|
||||
x_12 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_12, 0, x_11);
|
||||
lean_ctor_set(x_12, 1, x_2);
|
||||
x_1 = x_10;
|
||||
x_2 = x_12;
|
||||
goto _start;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l___private_Lean_Elab_Print_0__Lean_Elab_Command_printAxiomsOf___closed__1() {
|
||||
_start:
|
||||
{
|
||||
|
|
@ -5479,7 +5428,7 @@ lean_ctor_set(x_18, 0, x_16);
|
|||
lean_ctor_set(x_18, 1, x_17);
|
||||
x_19 = lean_array_to_list(lean_box(0), x_12);
|
||||
x_20 = lean_box(0);
|
||||
x_21 = l_List_mapTRAux___at___private_Lean_Elab_Print_0__Lean_Elab_Command_printAxiomsOf___spec__1(x_19, x_20);
|
||||
x_21 = l_List_mapTRAux___at_Lean_Meta_substCore___spec__6(x_19, x_20);
|
||||
x_22 = l_Lean_MessageData_ofList(x_21);
|
||||
lean_dec(x_21);
|
||||
x_23 = lean_alloc_ctor(10, 2, 0);
|
||||
|
|
|
|||
12
stage0/stdlib/Lean/Elab/Quotation/Precheck.c
generated
12
stage0/stdlib/Lean/Elab/Quotation/Precheck.c
generated
|
|
@ -115,7 +115,6 @@ lean_object* l_Lean_Elab_Term_Quotation_precheckAttribute___lambda__5(lean_objec
|
|||
lean_object* l_Lean_Elab_expandMacroImpl_x3f(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_Quotation_precheck_hasQuotedIdent_match__1___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* lean_st_ref_take(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_liftMacroM___at_Lean_Elab_Term_Quotation_precheck___spec__1___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Elab_Term_Quotation_precheckParen___closed__1;
|
||||
static lean_object* l_Lean_Elab_Term_Quotation_mkPrecheckAttribute___closed__14;
|
||||
static lean_object* l_Lean_Elab_Term_Quotation_initFn____x40_Lean_Elab_Quotation_Precheck___hyg_71____closed__2;
|
||||
|
|
@ -2013,7 +2012,7 @@ lean_inc(x_14);
|
|||
x_15 = lean_ctor_get(x_7, 5);
|
||||
lean_inc(x_15);
|
||||
lean_inc(x_13);
|
||||
x_16 = lean_alloc_closure((void*)(l_Lean_Elab_liftMacroM___at_Lean_Elab_Term_Quotation_precheck___spec__1___lambda__1___boxed), 4, 1);
|
||||
x_16 = lean_alloc_closure((void*)(l_Lean_Elab_liftMacroM___at_Lean_Elab_Term_Quotation_precheck___spec__1___lambda__1), 4, 1);
|
||||
lean_closure_set(x_16, 0, x_13);
|
||||
lean_inc(x_14);
|
||||
x_17 = lean_alloc_closure((void*)(l_ReaderT_pure___at_Lean_Elab_liftMacroM___spec__1___rarg___boxed), 3, 1);
|
||||
|
|
@ -2888,15 +2887,6 @@ lean_dec(x_1);
|
|||
return x_8;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_liftMacroM___at_Lean_Elab_Term_Quotation_precheck___spec__1___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_5;
|
||||
x_5 = l_Lean_Elab_liftMacroM___at_Lean_Elab_Term_Quotation_precheck___spec__1___lambda__1(x_1, x_2, x_3, x_4);
|
||||
lean_dec(x_1);
|
||||
return x_5;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_liftMacroM___at_Lean_Elab_Term_Quotation_precheck___spec__1___lambda__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
|
|
|
|||
12
stage0/stdlib/Lean/Elab/StructInst.c
generated
12
stage0/stdlib/Lean/Elab/StructInst.c
generated
|
|
@ -537,7 +537,6 @@ uint8_t l_Lean_Syntax_isMissing(lean_object*);
|
|||
lean_object* l_Lean_Elab_throwAbortTerm___at___private_Lean_Elab_StructInst_0__Lean_Elab_Term_StructInst_expandNonAtomicExplicitSources___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_StructInst_findField_x3f_match__1___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_StructInst_instToFormatFieldLHS(lean_object*);
|
||||
lean_object* l_Lean_Elab_liftMacroM___at___private_Lean_Elab_StructInst_0__Lean_Elab_Term_StructInst_elabStructInstAux___spec__1___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Elab_StructInst_0__Lean_Elab_Term_StructInst_groupFields___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Elab_Term_StructInst_instToStringStruct___closed__2;
|
||||
extern lean_object* l_Lean_Expr_FindImpl_initCache;
|
||||
|
|
@ -24822,7 +24821,7 @@ lean_inc(x_13);
|
|||
x_14 = lean_ctor_get(x_6, 5);
|
||||
lean_inc(x_14);
|
||||
lean_inc(x_12);
|
||||
x_15 = lean_alloc_closure((void*)(l_Lean_Elab_liftMacroM___at___private_Lean_Elab_StructInst_0__Lean_Elab_Term_StructInst_elabStructInstAux___spec__1___lambda__1___boxed), 4, 1);
|
||||
x_15 = lean_alloc_closure((void*)(l_Lean_Elab_liftMacroM___at___private_Lean_Elab_StructInst_0__Lean_Elab_Term_StructInst_elabStructInstAux___spec__1___lambda__1), 4, 1);
|
||||
lean_closure_set(x_15, 0, x_12);
|
||||
lean_inc(x_13);
|
||||
x_16 = lean_alloc_closure((void*)(l_ReaderT_pure___at_Lean_Elab_liftMacroM___spec__1___rarg___boxed), 3, 1);
|
||||
|
|
@ -25475,15 +25474,6 @@ lean_dec(x_1);
|
|||
return x_7;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_liftMacroM___at___private_Lean_Elab_StructInst_0__Lean_Elab_Term_StructInst_elabStructInstAux___spec__1___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_5;
|
||||
x_5 = l_Lean_Elab_liftMacroM___at___private_Lean_Elab_StructInst_0__Lean_Elab_Term_StructInst_elabStructInstAux___spec__1___lambda__1(x_1, x_2, x_3, x_4);
|
||||
lean_dec(x_1);
|
||||
return x_5;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_liftMacroM___at___private_Lean_Elab_StructInst_0__Lean_Elab_Term_StructInst_elabStructInstAux___spec__1___lambda__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
|
|
|
|||
40
stage0/stdlib/Lean/Elab/Structure.c
generated
40
stage0/stdlib/Lean/Elab/Structure.c
generated
|
|
@ -43,6 +43,7 @@ lean_object* l_Lean_registerTraceClass(lean_object*, lean_object*);
|
|||
lean_object* lean_erase_macro_scopes(lean_object*);
|
||||
lean_object* l___private_Lean_Elab_Structure_0__Lean_Elab_Command_copyNewFieldsFrom_copyFields_copy___rarg___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Elab_Structure_0__Lean_Elab_Command_mkCoercionToCopiedParent_copyFields___spec__1___closed__1;
|
||||
lean_object* l_Lean_Meta_withLCtx___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__3___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_stringToMessageData(lean_object*);
|
||||
lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Elab_Structure_0__Lean_Elab_Command_mkCoercionToCopiedParent_copyFields___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_addAuxDeclarationRanges___at___private_Lean_Elab_Structure_0__Lean_Elab_Command_expandCtor___spec__15___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -76,7 +77,6 @@ lean_object* l_Lean_MetavarContext_instantiateLevelMVars___at_Lean_Meta_instanti
|
|||
static lean_object* l___private_Lean_Elab_Structure_0__Lean_Elab_Command_expandFields___closed__1;
|
||||
lean_object* lean_name_mk_string(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Syntax_getOptional_x3f(lean_object*);
|
||||
lean_object* l_Lean_Meta_withLCtx___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
uint8_t l_USize_decEq(size_t, size_t);
|
||||
lean_object* l_Array_foldlMUnsafe_fold___at___private_Lean_Elab_Structure_0__Lean_Elab_Command_expandFields___spec__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* lean_array_uget(lean_object*, size_t);
|
||||
|
|
@ -107,8 +107,8 @@ static lean_object* l_Lean_Elab_elabAttr___at___private_Lean_Elab_Structure_0__L
|
|||
lean_object* l_Lean_MonadRef_mkInfoFromRefPos___at_Lean_Elab_Term_quoteAutoTactic___spec__1___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Elab_Structure_0__Lean_Elab_Command_copyNewFieldsFrom_copyFields_copy___rarg___lambda__1___boxed(lean_object**);
|
||||
static lean_object* l___private_Lean_Elab_Structure_0__Lean_Elab_Command_mkAuxConstructions___closed__4;
|
||||
lean_object* l_Std_RBNode_find___at___private_Lean_Meta_Match_MatchEqs_0__Lean_Meta_Match_mkSplitterProof_convertTemplate___spec__1(lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Elab_Structure_0__Lean_Elab_Command_isProjectionOf_x3f_match__1___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Std_RBNode_find___at_Lean_Elab_Term_resolveName___spec__2(lean_object*, lean_object*);
|
||||
static lean_object* l___private_Lean_Elab_Structure_0__Lean_Elab_Command_elabStructureView___lambda__2___closed__1;
|
||||
lean_object* l___private_Lean_Elab_Structure_0__Lean_Elab_Command_copyDefaultValue_x3f_go_x3f_match__2(lean_object*);
|
||||
lean_object* l___private_Lean_Elab_Structure_0__Lean_Elab_Command_withFields_go___rarg___lambda__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -310,6 +310,7 @@ lean_object* l___private_Lean_Elab_Structure_0__Lean_Elab_Command_copyNewFieldsF
|
|||
static lean_object* l___private_Lean_Elab_Structure_0__Lean_Elab_Command_copyNewFieldsFrom_copyFields_copy___rarg___lambda__3___closed__4;
|
||||
lean_object* l_Lean_throwError___at___private_Lean_Elab_Structure_0__Lean_Elab_Command_expandCtor___spec__11(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Elab_Structure_0__Lean_Elab_Command_withFields_go_match__3___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_mkFreshId___at_Lean_Meta_mkFreshExprMVarAt___spec__2___rarg(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_withLocalDecl___at___private_Lean_Elab_Term_0__Lean_Elab_Term_elabImplicitLambda_loop___spec__1___rarg(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
uint8_t l___private_Lean_Elab_Structure_0__Lean_Elab_Command_validStructType(lean_object*);
|
||||
lean_object* l_Lean_Elab_expandMacroImpl_x3f(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -318,7 +319,6 @@ lean_object* l_Lean_throwError___at___private_Lean_Elab_Structure_0__Lean_Elab_C
|
|||
static lean_object* l_Lean_Elab_Command_elabStructure___closed__9;
|
||||
lean_object* l_Lean_Elab_Command_StructFieldInfo_isSubobject_match__1___rarg___boxed(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_elabDeclAttrs___at___private_Lean_Elab_Structure_0__Lean_Elab_Command_expandCtor___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_liftMacroM___at___private_Lean_Elab_Structure_0__Lean_Elab_Command_expandCtor___spec__5___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
uint8_t l_Lean_Elab_Command_StructFieldInfo_isSubobject(lean_object*);
|
||||
lean_object* l_Lean_Elab_throwUnsupportedSyntax___at___private_Lean_Elab_Structure_0__Lean_Elab_Command_expandCtor___spec__8(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Command_checkValidCtorModifier___at___private_Lean_Elab_Structure_0__Lean_Elab_Command_expandCtor___spec__14___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -881,7 +881,6 @@ static lean_object* l_Array_foldlMUnsafe_fold___at___private_Lean_Elab_Structure
|
|||
lean_object* l_Lean_indentExpr(lean_object*);
|
||||
static lean_object* l_Lean_Elab_Command_checkValidInductiveModifier___at_Lean_Elab_Command_elabStructure___spec__1___lambda__1___closed__2;
|
||||
lean_object* l_Lean_Elab_Command_checkValidCtorModifier___at___private_Lean_Elab_Structure_0__Lean_Elab_Command_expandCtor___spec__14___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_mkFreshId___at_Lean_Meta_mkFreshExprMVarAt___spec__1___rarg(lean_object*, lean_object*);
|
||||
lean_object* l_Array_foldlMUnsafe_fold___at___private_Lean_Elab_Structure_0__Lean_Elab_Command_elabStructureView___spec__11___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Elab_elabAttr___at___private_Lean_Elab_Structure_0__Lean_Elab_Command_expandCtor___spec__4___closed__5;
|
||||
static lean_object* l_Array_foldlMUnsafe_fold___at___private_Lean_Elab_Structure_0__Lean_Elab_Command_expandFields___spec__5___lambda__2___closed__2;
|
||||
|
|
@ -1843,7 +1842,7 @@ lean_inc(x_13);
|
|||
x_14 = lean_ctor_get(x_6, 5);
|
||||
lean_inc(x_14);
|
||||
lean_inc(x_12);
|
||||
x_15 = lean_alloc_closure((void*)(l_Lean_Elab_liftMacroM___at___private_Lean_Elab_Structure_0__Lean_Elab_Command_expandCtor___spec__5___lambda__1___boxed), 4, 1);
|
||||
x_15 = lean_alloc_closure((void*)(l_Lean_Elab_liftMacroM___at___private_Lean_Elab_Structure_0__Lean_Elab_Command_expandCtor___spec__5___lambda__1), 4, 1);
|
||||
lean_closure_set(x_15, 0, x_12);
|
||||
lean_inc(x_13);
|
||||
x_16 = lean_alloc_closure((void*)(l_ReaderT_pure___at_Lean_Elab_liftMacroM___spec__1___rarg___boxed), 3, 1);
|
||||
|
|
@ -4442,15 +4441,6 @@ lean_dec(x_1);
|
|||
return x_7;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_liftMacroM___at___private_Lean_Elab_Structure_0__Lean_Elab_Command_expandCtor___spec__5___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_5;
|
||||
x_5 = l_Lean_Elab_liftMacroM___at___private_Lean_Elab_Structure_0__Lean_Elab_Command_expandCtor___spec__5___lambda__1(x_1, x_2, x_3, x_4);
|
||||
lean_dec(x_1);
|
||||
return x_5;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_liftMacroM___at___private_Lean_Elab_Structure_0__Lean_Elab_Command_expandCtor___spec__5___lambda__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
|
|
@ -10608,7 +10598,7 @@ lean_object* l___private_Lean_Elab_Structure_0__Lean_Elab_Command_getFieldType(l
|
|||
_start:
|
||||
{
|
||||
lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; uint8_t x_14; lean_object* x_15;
|
||||
x_10 = l_Lean_mkFreshId___at_Lean_Meta_mkFreshExprMVarAt___spec__1___rarg(x_8, x_9);
|
||||
x_10 = l_Lean_mkFreshId___at_Lean_Meta_mkFreshExprMVarAt___spec__2___rarg(x_8, x_9);
|
||||
x_11 = lean_ctor_get(x_10, 0);
|
||||
lean_inc(x_11);
|
||||
x_12 = lean_ctor_get(x_10, 1);
|
||||
|
|
@ -11117,7 +11107,7 @@ goto _start;
|
|||
else
|
||||
{
|
||||
lean_object* x_27;
|
||||
x_27 = l_Std_RBNode_find___at___private_Lean_Meta_Match_MatchEqs_0__Lean_Meta_Match_mkSplitterProof_convertTemplate___spec__1(x_1, x_13);
|
||||
x_27 = l_Std_RBNode_find___at_Lean_Elab_Term_resolveName___spec__2(x_1, x_13);
|
||||
lean_dec(x_13);
|
||||
if (lean_obj_tag(x_27) == 0)
|
||||
{
|
||||
|
|
@ -11920,7 +11910,7 @@ else
|
|||
{
|
||||
lean_object* x_16; lean_object* x_17;
|
||||
x_16 = lean_array_uget(x_3, x_5);
|
||||
x_17 = l_Std_RBNode_find___at___private_Lean_Meta_Match_MatchEqs_0__Lean_Meta_Match_mkSplitterProof_convertTemplate___spec__1(x_2, x_16);
|
||||
x_17 = l_Std_RBNode_find___at_Lean_Elab_Term_resolveName___spec__2(x_2, x_16);
|
||||
lean_dec(x_16);
|
||||
if (lean_obj_tag(x_17) == 0)
|
||||
{
|
||||
|
|
@ -18484,11 +18474,11 @@ static lean_object* _init_l___private_Lean_Elab_Structure_0__Lean_Elab_Command_r
|
|||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
x_1 = l___private_Lean_Elab_Structure_0__Lean_Elab_Command_removeUnused___closed__1;
|
||||
x_2 = l_Lean_NameSet_empty;
|
||||
x_1 = lean_box(0);
|
||||
x_2 = l___private_Lean_Elab_Structure_0__Lean_Elab_Command_removeUnused___closed__1;
|
||||
x_3 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_3, 0, x_1);
|
||||
lean_ctor_set(x_3, 1, x_2);
|
||||
lean_ctor_set(x_3, 0, x_2);
|
||||
lean_ctor_set(x_3, 1, x_1);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
|
|
@ -18627,7 +18617,7 @@ x_18 = lean_ctor_get(x_14, 1);
|
|||
lean_inc(x_18);
|
||||
lean_dec(x_14);
|
||||
x_19 = lean_apply_1(x_4, x_18);
|
||||
x_20 = l_Lean_Meta_withLCtx___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__2___rarg(x_16, x_17, x_19, x_5, x_6, x_7, x_8, x_9, x_10, x_15);
|
||||
x_20 = l_Lean_Meta_withLCtx___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__3___rarg(x_16, x_17, x_19, x_5, x_6, x_7, x_8, x_9, x_10, x_15);
|
||||
return x_20;
|
||||
}
|
||||
else
|
||||
|
|
@ -22829,7 +22819,7 @@ lean_object* x_16; lean_object* x_17;
|
|||
lean_dec(x_13);
|
||||
lean_dec(x_2);
|
||||
x_16 = l___private_Lean_Elab_Structure_0__Lean_Elab_Command_addDefaults___closed__1;
|
||||
x_17 = l_Lean_Meta_withLCtx___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__2___rarg(x_1, x_11, x_16, x_3, x_4, x_5, x_6, x_7, x_8, x_12);
|
||||
x_17 = l_Lean_Meta_withLCtx___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__3___rarg(x_1, x_11, x_16, x_3, x_4, x_5, x_6, x_7, x_8, x_12);
|
||||
return x_17;
|
||||
}
|
||||
else
|
||||
|
|
@ -22842,7 +22832,7 @@ lean_object* x_19; lean_object* x_20;
|
|||
lean_dec(x_13);
|
||||
lean_dec(x_2);
|
||||
x_19 = l___private_Lean_Elab_Structure_0__Lean_Elab_Command_addDefaults___closed__1;
|
||||
x_20 = l_Lean_Meta_withLCtx___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__2___rarg(x_1, x_11, x_19, x_3, x_4, x_5, x_6, x_7, x_8, x_12);
|
||||
x_20 = l_Lean_Meta_withLCtx___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__3___rarg(x_1, x_11, x_19, x_3, x_4, x_5, x_6, x_7, x_8, x_12);
|
||||
return x_20;
|
||||
}
|
||||
else
|
||||
|
|
@ -22858,7 +22848,7 @@ lean_closure_set(x_25, 0, x_2);
|
|||
lean_closure_set(x_25, 1, x_23);
|
||||
lean_closure_set(x_25, 2, x_24);
|
||||
lean_closure_set(x_25, 3, x_22);
|
||||
x_26 = l_Lean_Meta_withLCtx___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__2___rarg(x_1, x_11, x_25, x_3, x_4, x_5, x_6, x_7, x_8, x_12);
|
||||
x_26 = l_Lean_Meta_withLCtx___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_FunBinders_elabFunBinderViews___spec__3___rarg(x_1, x_11, x_25, x_3, x_4, x_5, x_6, x_7, x_8, x_12);
|
||||
return x_26;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
74
stage0/stdlib/Lean/Elab/Syntax.c
generated
74
stage0/stdlib/Lean/Elab/Syntax.c
generated
|
|
@ -190,7 +190,6 @@ uint8_t l_Lean_Elab_Command_checkRuleKind(lean_object*, lean_object*);
|
|||
extern lean_object* l_Lean_nameLitKind;
|
||||
lean_object* l_Lean_Elab_Term_checkLeftRec___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Elab_Term_toParserDescr_processAtom___closed__1;
|
||||
lean_object* l_Lean_Elab_liftMacroM___at_Lean_Elab_Term_checkLeftRec___spec__1___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_toParserDescr_processSeq___lambda__1___boxed__const__1;
|
||||
static lean_object* l_Subarray_forInUnsafe_loop___at___private_Lean_Elab_Syntax_0__Lean_Elab_Term_mkParserSeq___spec__1___closed__18;
|
||||
static lean_object* l___private_Lean_Elab_Syntax_0__Lean_Elab_Command_declareSyntaxCatQuotParser___closed__84;
|
||||
|
|
@ -309,7 +308,6 @@ static lean_object* l_Lean_Elab_Term_toParserDescr_process___closed__13;
|
|||
static lean_object* l_Lean_Elab_Term_toParserDescr_processNonReserved___closed__7;
|
||||
lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Elab_Command_expandNoKindMacroRulesAux___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_liftMacroM___at_Lean_Elab_Term_checkLeftRec___spec__1___lambda__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_List_mapTRAux___at_Lean_Elab_Term_toParserDescr_processNullaryOrCat___spec__3(lean_object*, lean_object*);
|
||||
static lean_object* l___private_Lean_Elab_Syntax_0__Lean_Elab_Command_declareSyntaxCatQuotParser___closed__44;
|
||||
lean_object* l_Lean_Elab_Command_mkNameFromParserSyntax_visit_match__1(lean_object*);
|
||||
static lean_object* l_Lean_Elab_Command_elabSyntaxAbbrev___closed__15;
|
||||
|
|
@ -384,6 +382,7 @@ extern lean_object* l_Lean_instInhabitedSyntax;
|
|||
lean_object* l_Lean_Elab_Term_toParserDescr_processParserCategory___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Elab_Command_elabSyntax___closed__3;
|
||||
static lean_object* l___private_Lean_Elab_Syntax_0__Lean_Elab_Command_declareSyntaxCatQuotParser___closed__87;
|
||||
lean_object* l_List_mapTRAux___at_Lean_Meta_substCore___spec__6(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Command_elabCommand(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l___private_Lean_Elab_Syntax_0__Lean_Elab_Command_declareSyntaxCatQuotParser___closed__92;
|
||||
lean_object* l_Lean_mkConstWithLevelParams___at_Lean_Elab_Term_toParserDescr_resolveParserName___spec__8___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -2105,7 +2104,7 @@ lean_inc(x_15);
|
|||
x_16 = lean_ctor_get(x_8, 5);
|
||||
lean_inc(x_16);
|
||||
lean_inc(x_14);
|
||||
x_17 = lean_alloc_closure((void*)(l_Lean_Elab_liftMacroM___at_Lean_Elab_Term_checkLeftRec___spec__1___lambda__1___boxed), 4, 1);
|
||||
x_17 = lean_alloc_closure((void*)(l_Lean_Elab_liftMacroM___at_Lean_Elab_Term_checkLeftRec___spec__1___lambda__1), 4, 1);
|
||||
lean_closure_set(x_17, 0, x_14);
|
||||
lean_inc(x_15);
|
||||
x_18 = lean_alloc_closure((void*)(l_ReaderT_pure___at_Lean_Elab_liftMacroM___spec__1___rarg___boxed), 3, 1);
|
||||
|
|
@ -2867,15 +2866,6 @@ lean_dec(x_1);
|
|||
return x_9;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_liftMacroM___at_Lean_Elab_Term_checkLeftRec___spec__1___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_5;
|
||||
x_5 = l_Lean_Elab_liftMacroM___at_Lean_Elab_Term_checkLeftRec___spec__1___lambda__1(x_1, x_2, x_3, x_4);
|
||||
lean_dec(x_1);
|
||||
return x_5;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_liftMacroM___at_Lean_Elab_Term_checkLeftRec___spec__1___lambda__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
|
|
@ -7702,56 +7692,6 @@ goto _start;
|
|||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_List_mapTRAux___at_Lean_Elab_Term_toParserDescr_processNullaryOrCat___spec__3(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
if (lean_obj_tag(x_1) == 0)
|
||||
{
|
||||
lean_object* x_3;
|
||||
x_3 = l_List_reverse___rarg(x_2);
|
||||
return x_3;
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_4;
|
||||
x_4 = !lean_is_exclusive(x_1);
|
||||
if (x_4 == 0)
|
||||
{
|
||||
lean_object* x_5; lean_object* x_6; lean_object* x_7;
|
||||
x_5 = lean_ctor_get(x_1, 0);
|
||||
x_6 = lean_ctor_get(x_1, 1);
|
||||
x_7 = lean_alloc_ctor(4, 1, 0);
|
||||
lean_ctor_set(x_7, 0, x_5);
|
||||
lean_ctor_set(x_1, 1, x_2);
|
||||
lean_ctor_set(x_1, 0, x_7);
|
||||
{
|
||||
lean_object* _tmp_0 = x_6;
|
||||
lean_object* _tmp_1 = x_1;
|
||||
x_1 = _tmp_0;
|
||||
x_2 = _tmp_1;
|
||||
}
|
||||
goto _start;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12;
|
||||
x_9 = lean_ctor_get(x_1, 0);
|
||||
x_10 = lean_ctor_get(x_1, 1);
|
||||
lean_inc(x_10);
|
||||
lean_inc(x_9);
|
||||
lean_dec(x_1);
|
||||
x_11 = lean_alloc_ctor(4, 1, 0);
|
||||
lean_ctor_set(x_11, 0, x_9);
|
||||
x_12 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_12, 0, x_11);
|
||||
lean_ctor_set(x_12, 1, x_2);
|
||||
x_1 = x_10;
|
||||
x_2 = x_12;
|
||||
goto _start;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Elab_Term_toParserDescr_processNullaryOrCat___closed__1() {
|
||||
_start:
|
||||
{
|
||||
|
|
@ -8580,7 +8520,7 @@ lean_inc(x_239);
|
|||
lean_dec(x_13);
|
||||
x_240 = lean_box(0);
|
||||
x_241 = l_List_mapTRAux___at_Lean_Elab_Term_toParserDescr_processNullaryOrCat___spec__2(x_14, x_240);
|
||||
x_242 = l_List_mapTRAux___at_Lean_Elab_Term_toParserDescr_processNullaryOrCat___spec__3(x_241, x_240);
|
||||
x_242 = l_List_mapTRAux___at_Lean_Meta_substCore___spec__6(x_241, x_240);
|
||||
x_243 = l_Lean_MessageData_ofList(x_242);
|
||||
lean_dec(x_242);
|
||||
x_244 = l_Lean_Elab_Term_toParserDescr_processNullaryOrCat___closed__20;
|
||||
|
|
@ -8681,7 +8621,7 @@ lean_inc(x_263);
|
|||
lean_dec(x_13);
|
||||
x_264 = lean_box(0);
|
||||
x_265 = l_List_mapTRAux___at_Lean_Elab_Term_toParserDescr_processNullaryOrCat___spec__2(x_14, x_264);
|
||||
x_266 = l_List_mapTRAux___at_Lean_Elab_Term_toParserDescr_processNullaryOrCat___spec__3(x_265, x_264);
|
||||
x_266 = l_List_mapTRAux___at_Lean_Meta_substCore___spec__6(x_265, x_264);
|
||||
x_267 = l_Lean_MessageData_ofList(x_266);
|
||||
lean_dec(x_266);
|
||||
x_268 = l_Lean_Elab_Term_toParserDescr_processNullaryOrCat___closed__20;
|
||||
|
|
@ -8871,7 +8811,7 @@ lean_inc(x_13);
|
|||
x_14 = lean_ctor_get(x_6, 5);
|
||||
lean_inc(x_14);
|
||||
lean_inc(x_12);
|
||||
x_15 = lean_alloc_closure((void*)(l_Lean_Elab_liftMacroM___at_Lean_Elab_Term_checkLeftRec___spec__1___lambda__1___boxed), 4, 1);
|
||||
x_15 = lean_alloc_closure((void*)(l_Lean_Elab_liftMacroM___at_Lean_Elab_Term_checkLeftRec___spec__1___lambda__1), 4, 1);
|
||||
lean_closure_set(x_15, 0, x_12);
|
||||
lean_inc(x_13);
|
||||
x_16 = lean_alloc_closure((void*)(l_ReaderT_pure___at_Lean_Elab_liftMacroM___spec__1___rarg___boxed), 3, 1);
|
||||
|
|
@ -15239,7 +15179,7 @@ x_16 = lean_ctor_get(x_14, 3);
|
|||
lean_inc(x_16);
|
||||
lean_dec(x_14);
|
||||
lean_inc(x_8);
|
||||
x_17 = lean_alloc_closure((void*)(l_Lean_Elab_liftMacroM___at_Lean_Elab_Term_checkLeftRec___spec__1___lambda__1___boxed), 4, 1);
|
||||
x_17 = lean_alloc_closure((void*)(l_Lean_Elab_liftMacroM___at_Lean_Elab_Term_checkLeftRec___spec__1___lambda__1), 4, 1);
|
||||
lean_closure_set(x_17, 0, x_8);
|
||||
lean_inc(x_12);
|
||||
x_18 = lean_alloc_closure((void*)(l_ReaderT_pure___at_Lean_Elab_liftMacroM___spec__1___rarg___boxed), 3, 1);
|
||||
|
|
@ -15561,7 +15501,7 @@ x_16 = lean_ctor_get(x_14, 3);
|
|||
lean_inc(x_16);
|
||||
lean_dec(x_14);
|
||||
lean_inc(x_8);
|
||||
x_17 = lean_alloc_closure((void*)(l_Lean_Elab_liftMacroM___at_Lean_Elab_Term_checkLeftRec___spec__1___lambda__1___boxed), 4, 1);
|
||||
x_17 = lean_alloc_closure((void*)(l_Lean_Elab_liftMacroM___at_Lean_Elab_Term_checkLeftRec___spec__1___lambda__1), 4, 1);
|
||||
lean_closure_set(x_17, 0, x_8);
|
||||
lean_inc(x_12);
|
||||
x_18 = lean_alloc_closure((void*)(l_ReaderT_pure___at_Lean_Elab_liftMacroM___spec__1___rarg___boxed), 3, 1);
|
||||
|
|
|
|||
60
stage0/stdlib/Lean/Elab/SyntheticMVars.c
generated
60
stage0/stdlib/Lean/Elab/SyntheticMVars.c
generated
|
|
@ -55,7 +55,6 @@ lean_object* l_Lean_Elab_Term_elabTermAndSynthesize(lean_object*, lean_object*,
|
|||
lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_resumeElabTerm(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1___lambda__1___closed__1;
|
||||
lean_object* lean_st_ref_get(lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_instHashableName;
|
||||
lean_object* l_List_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstances___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefault(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_commitWhenSome_x3f___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__2___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__3___closed__4;
|
||||
|
|
@ -171,6 +170,7 @@ lean_object* l_Lean_Elab_Tactic_run(lean_object*, lean_object*, lean_object*, le
|
|||
lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep(uint8_t, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_getResetInfoTrees___at_Lean_Elab_Term_withoutModifyingElabMetaStateWithInfo___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVarsStep___lambda__1___closed__9;
|
||||
extern lean_object* l_Lean_instHashableMVarId;
|
||||
lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_withSynthesizeImp___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_commitWhenSome_x3f___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__2___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__3___closed__7;
|
||||
lean_object* l_Std_PersistentHashMap_insert___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -210,6 +210,7 @@ lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_resumePostpo
|
|||
lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeUsingDefault___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_instBEqMVarId;
|
||||
lean_object* l_List_find_x3f___rarg(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_traceAtCmdPos(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_commitWhenSome_x3f___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__2___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_tryToSynthesizeUsingDefaultInstance___spec__3___closed__10;
|
||||
|
|
@ -301,7 +302,6 @@ lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_withSynthesi
|
|||
static lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_resumePostponed___lambda__2___closed__1;
|
||||
lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizePendingInstMVar_match__1(lean_object*);
|
||||
uint8_t lean_nat_dec_lt(lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_Name_instBEqName;
|
||||
lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_synthesizeSyntheticMVar_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_resumeElabTerm(lean_object* x_1, lean_object* x_2, uint8_t x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) {
|
||||
_start:
|
||||
|
|
@ -988,8 +988,8 @@ x_117 = lean_unsigned_to_nat(1u);
|
|||
x_118 = lean_nat_sub(x_103, x_117);
|
||||
lean_dec(x_103);
|
||||
x_119 = l_Std_PersistentArray_get_x21___at_Lean_Elab_withInfoHole___spec__1(x_102, x_118);
|
||||
x_120 = l_Lean_Name_instBEqName;
|
||||
x_121 = l_Lean_instHashableName;
|
||||
x_120 = l_Lean_instBEqMVarId;
|
||||
x_121 = l_Lean_instHashableMVarId;
|
||||
x_122 = l_Std_PersistentHashMap_insert___rarg(x_120, x_121, x_101, x_1, x_119);
|
||||
lean_ctor_set(x_96, 1, x_88);
|
||||
lean_ctor_set(x_96, 0, x_122);
|
||||
|
|
@ -1087,8 +1087,8 @@ x_148 = lean_unsigned_to_nat(1u);
|
|||
x_149 = lean_nat_sub(x_137, x_148);
|
||||
lean_dec(x_137);
|
||||
x_150 = l_Std_PersistentArray_get_x21___at_Lean_Elab_withInfoHole___spec__1(x_136, x_149);
|
||||
x_151 = l_Lean_Name_instBEqName;
|
||||
x_152 = l_Lean_instHashableName;
|
||||
x_151 = l_Lean_instBEqMVarId;
|
||||
x_152 = l_Lean_instHashableMVarId;
|
||||
x_153 = l_Std_PersistentHashMap_insert___rarg(x_151, x_152, x_135, x_1, x_150);
|
||||
x_154 = lean_alloc_ctor(0, 2, 1);
|
||||
lean_ctor_set(x_154, 0, x_153);
|
||||
|
|
@ -1210,8 +1210,8 @@ x_183 = lean_unsigned_to_nat(1u);
|
|||
x_184 = lean_nat_sub(x_171, x_183);
|
||||
lean_dec(x_171);
|
||||
x_185 = l_Std_PersistentArray_get_x21___at_Lean_Elab_withInfoHole___spec__1(x_169, x_184);
|
||||
x_186 = l_Lean_Name_instBEqName;
|
||||
x_187 = l_Lean_instHashableName;
|
||||
x_186 = l_Lean_instBEqMVarId;
|
||||
x_187 = l_Lean_instHashableMVarId;
|
||||
x_188 = l_Std_PersistentHashMap_insert___rarg(x_186, x_187, x_168, x_1, x_185);
|
||||
if (lean_is_scalar(x_170)) {
|
||||
x_189 = lean_alloc_ctor(0, 2, 1);
|
||||
|
|
@ -1329,8 +1329,8 @@ x_220 = lean_unsigned_to_nat(1u);
|
|||
x_221 = lean_nat_sub(x_212, x_220);
|
||||
lean_dec(x_212);
|
||||
x_222 = l_Std_PersistentArray_get_x21___at_Lean_Elab_withInfoHole___spec__1(x_211, x_221);
|
||||
x_223 = l_Lean_Name_instBEqName;
|
||||
x_224 = l_Lean_instHashableName;
|
||||
x_223 = l_Lean_instBEqMVarId;
|
||||
x_224 = l_Lean_instHashableMVarId;
|
||||
x_225 = l_Std_PersistentHashMap_insert___rarg(x_223, x_224, x_210, x_1, x_222);
|
||||
lean_ctor_set(x_205, 1, x_88);
|
||||
lean_ctor_set(x_205, 0, x_225);
|
||||
|
|
@ -1415,8 +1415,8 @@ x_242 = lean_unsigned_to_nat(1u);
|
|||
x_243 = lean_nat_sub(x_234, x_242);
|
||||
lean_dec(x_234);
|
||||
x_244 = l_Std_PersistentArray_get_x21___at_Lean_Elab_withInfoHole___spec__1(x_233, x_243);
|
||||
x_245 = l_Lean_Name_instBEqName;
|
||||
x_246 = l_Lean_instHashableName;
|
||||
x_245 = l_Lean_instBEqMVarId;
|
||||
x_246 = l_Lean_instHashableMVarId;
|
||||
x_247 = l_Std_PersistentHashMap_insert___rarg(x_245, x_246, x_232, x_1, x_244);
|
||||
x_248 = lean_alloc_ctor(0, 2, 1);
|
||||
lean_ctor_set(x_248, 0, x_247);
|
||||
|
|
@ -1530,8 +1530,8 @@ x_271 = lean_unsigned_to_nat(1u);
|
|||
x_272 = lean_nat_sub(x_262, x_271);
|
||||
lean_dec(x_262);
|
||||
x_273 = l_Std_PersistentArray_get_x21___at_Lean_Elab_withInfoHole___spec__1(x_260, x_272);
|
||||
x_274 = l_Lean_Name_instBEqName;
|
||||
x_275 = l_Lean_instHashableName;
|
||||
x_274 = l_Lean_instBEqMVarId;
|
||||
x_275 = l_Lean_instHashableMVarId;
|
||||
x_276 = l_Std_PersistentHashMap_insert___rarg(x_274, x_275, x_259, x_1, x_273);
|
||||
if (lean_is_scalar(x_261)) {
|
||||
x_277 = lean_alloc_ctor(0, 2, 1);
|
||||
|
|
@ -10283,8 +10283,8 @@ lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean
|
|||
x_93 = lean_nat_sub(x_81, x_10);
|
||||
lean_dec(x_81);
|
||||
x_94 = l_Std_PersistentArray_get_x21___at_Lean_Elab_withInfoHole___spec__1(x_80, x_93);
|
||||
x_95 = l_Lean_Name_instBEqName;
|
||||
x_96 = l_Lean_instHashableName;
|
||||
x_95 = l_Lean_instBEqMVarId;
|
||||
x_96 = l_Lean_instHashableMVarId;
|
||||
x_97 = l_Std_PersistentHashMap_insert___rarg(x_95, x_96, x_79, x_1, x_94);
|
||||
lean_ctor_set(x_74, 1, x_65);
|
||||
lean_ctor_set(x_74, 0, x_97);
|
||||
|
|
@ -10376,8 +10376,8 @@ lean_object* x_120; lean_object* x_121; lean_object* x_122; lean_object* x_123;
|
|||
x_120 = lean_nat_sub(x_110, x_10);
|
||||
lean_dec(x_110);
|
||||
x_121 = l_Std_PersistentArray_get_x21___at_Lean_Elab_withInfoHole___spec__1(x_109, x_120);
|
||||
x_122 = l_Lean_Name_instBEqName;
|
||||
x_123 = l_Lean_instHashableName;
|
||||
x_122 = l_Lean_instBEqMVarId;
|
||||
x_123 = l_Lean_instHashableMVarId;
|
||||
x_124 = l_Std_PersistentHashMap_insert___rarg(x_122, x_123, x_108, x_1, x_121);
|
||||
x_125 = lean_alloc_ctor(0, 2, 1);
|
||||
lean_ctor_set(x_125, 0, x_124);
|
||||
|
|
@ -10494,8 +10494,8 @@ lean_object* x_152; lean_object* x_153; lean_object* x_154; lean_object* x_155;
|
|||
x_152 = lean_nat_sub(x_141, x_10);
|
||||
lean_dec(x_141);
|
||||
x_153 = l_Std_PersistentArray_get_x21___at_Lean_Elab_withInfoHole___spec__1(x_139, x_152);
|
||||
x_154 = l_Lean_Name_instBEqName;
|
||||
x_155 = l_Lean_instHashableName;
|
||||
x_154 = l_Lean_instBEqMVarId;
|
||||
x_155 = l_Lean_instHashableMVarId;
|
||||
x_156 = l_Std_PersistentHashMap_insert___rarg(x_154, x_155, x_138, x_1, x_153);
|
||||
if (lean_is_scalar(x_140)) {
|
||||
x_157 = lean_alloc_ctor(0, 2, 1);
|
||||
|
|
@ -10613,8 +10613,8 @@ lean_object* x_186; lean_object* x_187; lean_object* x_188; lean_object* x_189;
|
|||
x_186 = lean_nat_sub(x_178, x_10);
|
||||
lean_dec(x_178);
|
||||
x_187 = l_Std_PersistentArray_get_x21___at_Lean_Elab_withInfoHole___spec__1(x_177, x_186);
|
||||
x_188 = l_Lean_Name_instBEqName;
|
||||
x_189 = l_Lean_instHashableName;
|
||||
x_188 = l_Lean_instBEqMVarId;
|
||||
x_189 = l_Lean_instHashableMVarId;
|
||||
x_190 = l_Std_PersistentHashMap_insert___rarg(x_188, x_189, x_176, x_1, x_187);
|
||||
lean_ctor_set(x_171, 1, x_65);
|
||||
lean_ctor_set(x_171, 0, x_190);
|
||||
|
|
@ -10696,8 +10696,8 @@ lean_object* x_207; lean_object* x_208; lean_object* x_209; lean_object* x_210;
|
|||
x_207 = lean_nat_sub(x_199, x_10);
|
||||
lean_dec(x_199);
|
||||
x_208 = l_Std_PersistentArray_get_x21___at_Lean_Elab_withInfoHole___spec__1(x_198, x_207);
|
||||
x_209 = l_Lean_Name_instBEqName;
|
||||
x_210 = l_Lean_instHashableName;
|
||||
x_209 = l_Lean_instBEqMVarId;
|
||||
x_210 = l_Lean_instHashableMVarId;
|
||||
x_211 = l_Std_PersistentHashMap_insert___rarg(x_209, x_210, x_197, x_1, x_208);
|
||||
x_212 = lean_alloc_ctor(0, 2, 1);
|
||||
lean_ctor_set(x_212, 0, x_211);
|
||||
|
|
@ -10808,8 +10808,8 @@ lean_object* x_235; lean_object* x_236; lean_object* x_237; lean_object* x_238;
|
|||
x_235 = lean_nat_sub(x_226, x_10);
|
||||
lean_dec(x_226);
|
||||
x_236 = l_Std_PersistentArray_get_x21___at_Lean_Elab_withInfoHole___spec__1(x_224, x_235);
|
||||
x_237 = l_Lean_Name_instBEqName;
|
||||
x_238 = l_Lean_instHashableName;
|
||||
x_237 = l_Lean_instBEqMVarId;
|
||||
x_238 = l_Lean_instHashableMVarId;
|
||||
x_239 = l_Std_PersistentHashMap_insert___rarg(x_237, x_238, x_223, x_1, x_236);
|
||||
if (lean_is_scalar(x_225)) {
|
||||
x_240 = lean_alloc_ctor(0, 2, 1);
|
||||
|
|
@ -11199,8 +11199,8 @@ lean_object* x_322; lean_object* x_323; lean_object* x_324; lean_object* x_325;
|
|||
x_322 = lean_nat_sub(x_311, x_10);
|
||||
lean_dec(x_311);
|
||||
x_323 = l_Std_PersistentArray_get_x21___at_Lean_Elab_withInfoHole___spec__1(x_309, x_322);
|
||||
x_324 = l_Lean_Name_instBEqName;
|
||||
x_325 = l_Lean_instHashableName;
|
||||
x_324 = l_Lean_instBEqMVarId;
|
||||
x_325 = l_Lean_instHashableMVarId;
|
||||
x_326 = l_Std_PersistentHashMap_insert___rarg(x_324, x_325, x_308, x_1, x_323);
|
||||
if (lean_is_scalar(x_310)) {
|
||||
x_327 = lean_alloc_ctor(0, 2, 1);
|
||||
|
|
@ -11359,8 +11359,8 @@ lean_object* x_362; lean_object* x_363; lean_object* x_364; lean_object* x_365;
|
|||
x_362 = lean_nat_sub(x_353, x_10);
|
||||
lean_dec(x_353);
|
||||
x_363 = l_Std_PersistentArray_get_x21___at_Lean_Elab_withInfoHole___spec__1(x_351, x_362);
|
||||
x_364 = l_Lean_Name_instBEqName;
|
||||
x_365 = l_Lean_instHashableName;
|
||||
x_364 = l_Lean_instBEqMVarId;
|
||||
x_365 = l_Lean_instHashableMVarId;
|
||||
x_366 = l_Std_PersistentHashMap_insert___rarg(x_364, x_365, x_350, x_1, x_363);
|
||||
if (lean_is_scalar(x_352)) {
|
||||
x_367 = lean_alloc_ctor(0, 2, 1);
|
||||
|
|
|
|||
6
stage0/stdlib/Lean/Elab/Tactic.c
generated
6
stage0/stdlib/Lean/Elab/Tactic.c
generated
|
|
@ -1,6 +1,6 @@
|
|||
// Lean compiler output
|
||||
// Module: Lean.Elab.Tactic
|
||||
// Imports: Init Lean.Elab.Term Lean.Elab.Tactic.Basic Lean.Elab.Tactic.ElabTerm Lean.Elab.Tactic.Induction Lean.Elab.Tactic.Generalize Lean.Elab.Tactic.Injection Lean.Elab.Tactic.Match Lean.Elab.Tactic.Rewrite Lean.Elab.Tactic.Location Lean.Elab.Tactic.Simp Lean.Elab.Tactic.BuiltinTactic Lean.Elab.Tactic.Split Lean.Elab.Tactic.Conv
|
||||
// Imports: Init Lean.Elab.Term Lean.Elab.Tactic.Basic Lean.Elab.Tactic.ElabTerm Lean.Elab.Tactic.Induction Lean.Elab.Tactic.Generalize Lean.Elab.Tactic.Injection Lean.Elab.Tactic.Match Lean.Elab.Tactic.Rewrite Lean.Elab.Tactic.Location Lean.Elab.Tactic.Simp Lean.Elab.Tactic.BuiltinTactic Lean.Elab.Tactic.Split Lean.Elab.Tactic.Conv Lean.Elab.Tactic.Delta
|
||||
#include <lean/lean.h>
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic ignored "-Wunused-parameter"
|
||||
|
|
@ -27,6 +27,7 @@ lean_object* initialize_Lean_Elab_Tactic_Simp(lean_object*);
|
|||
lean_object* initialize_Lean_Elab_Tactic_BuiltinTactic(lean_object*);
|
||||
lean_object* initialize_Lean_Elab_Tactic_Split(lean_object*);
|
||||
lean_object* initialize_Lean_Elab_Tactic_Conv(lean_object*);
|
||||
lean_object* initialize_Lean_Elab_Tactic_Delta(lean_object*);
|
||||
static bool _G_initialized = false;
|
||||
lean_object* initialize_Lean_Elab_Tactic(lean_object* w) {
|
||||
lean_object * res;
|
||||
|
|
@ -74,6 +75,9 @@ lean_dec_ref(res);
|
|||
res = initialize_Lean_Elab_Tactic_Conv(lean_io_mk_world());
|
||||
if (lean_io_result_is_error(res)) return res;
|
||||
lean_dec_ref(res);
|
||||
res = initialize_Lean_Elab_Tactic_Delta(lean_io_mk_world());
|
||||
if (lean_io_result_is_error(res)) return res;
|
||||
lean_dec_ref(res);
|
||||
return lean_io_result_mk_ok(lean_box(0));
|
||||
}
|
||||
#ifdef __cplusplus
|
||||
|
|
|
|||
14
stage0/stdlib/Lean/Elab/Tactic/Basic.c
generated
14
stage0/stdlib/Lean/Elab/Tactic/Basic.c
generated
|
|
@ -382,7 +382,6 @@ lean_object* l_Lean_Elab_Term_logUnassignedUsingErrorInfos(lean_object*, lean_ob
|
|||
lean_object* l_Lean_Elab_Tactic_instInhabitedState;
|
||||
static lean_object* l_Lean_Elab_Tactic_instAlternativeTacticM___closed__3;
|
||||
static lean_object* l_Lean_Elab_Tactic_tacticElabAttribute___closed__3;
|
||||
lean_object* l_Lean_Elab_liftMacroM___at_Lean_Elab_Tactic_expandTacticMacroFns_loop___spec__1___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Elab_Tactic_Basic_0__Lean_Elab_Tactic_evalTacticUsing_loop_match__2___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Syntax_getTailPos_x3f(lean_object*, uint8_t);
|
||||
lean_object* l_Lean_Elab_liftMacroM___at_Lean_Elab_Tactic_expandTacticMacroFns_loop___spec__1___lambda__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -5675,7 +5674,7 @@ lean_inc(x_15);
|
|||
x_16 = lean_ctor_get(x_8, 5);
|
||||
lean_inc(x_16);
|
||||
lean_inc(x_14);
|
||||
x_17 = lean_alloc_closure((void*)(l_Lean_Elab_liftMacroM___at_Lean_Elab_Tactic_expandTacticMacroFns_loop___spec__1___lambda__1___boxed), 4, 1);
|
||||
x_17 = lean_alloc_closure((void*)(l_Lean_Elab_liftMacroM___at_Lean_Elab_Tactic_expandTacticMacroFns_loop___spec__1___lambda__1), 4, 1);
|
||||
lean_closure_set(x_17, 0, x_14);
|
||||
lean_inc(x_15);
|
||||
x_18 = lean_alloc_closure((void*)(l_ReaderT_pure___at_Lean_Elab_liftMacroM___spec__1___rarg___boxed), 3, 1);
|
||||
|
|
@ -6292,7 +6291,6 @@ lean_inc(x_1);
|
|||
x_19 = l_Lean_Syntax_getKind(x_1);
|
||||
x_20 = l_Lean_Elab_Tactic_tacticElabAttribute;
|
||||
x_21 = l_Lean_KeyedDeclsAttribute_getEntries___rarg(x_20, x_18, x_19);
|
||||
lean_dec(x_18);
|
||||
if (lean_obj_tag(x_21) == 0)
|
||||
{
|
||||
lean_object* x_22;
|
||||
|
|
@ -6874,7 +6872,6 @@ lean_inc(x_1);
|
|||
x_15 = l_Lean_Syntax_getKind(x_1);
|
||||
x_16 = l_Lean_Elab_macroAttribute;
|
||||
x_17 = l_Lean_KeyedDeclsAttribute_getEntries___rarg(x_16, x_14, x_15);
|
||||
lean_dec(x_14);
|
||||
x_18 = l_Lean_Elab_Tactic_expandTacticMacroFns_loop(x_1, x_17, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_13);
|
||||
return x_18;
|
||||
}
|
||||
|
|
@ -6967,15 +6964,6 @@ lean_dec(x_1);
|
|||
return x_9;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_liftMacroM___at_Lean_Elab_Tactic_expandTacticMacroFns_loop___spec__1___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_5;
|
||||
x_5 = l_Lean_Elab_liftMacroM___at_Lean_Elab_Tactic_expandTacticMacroFns_loop___spec__1___lambda__1(x_1, x_2, x_3, x_4);
|
||||
lean_dec(x_1);
|
||||
return x_5;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_liftMacroM___at_Lean_Elab_Tactic_expandTacticMacroFns_loop___spec__1___lambda__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue