chore: update stage0
This commit is contained in:
parent
94a5026790
commit
827e50ef1d
22 changed files with 8245 additions and 4812 deletions
|
|
@ -13,7 +13,7 @@ namespace Elab
|
|||
namespace Term
|
||||
|
||||
def mkTacticMVar (ref : Syntax) (type : Expr) (tacticCode : Syntax) : TermElabM Expr := do
|
||||
mvar ← mkFreshExprMVar ref type MetavarKind.synthetic `main;
|
||||
mvar ← mkFreshExprMVar ref type MetavarKind.syntheticOpaque `main;
|
||||
let mvarId := mvar.mvarId!;
|
||||
registerSyntheticMVar ref mvarId $ SyntheticMVarKind.tactic tacticCode;
|
||||
pure mvar
|
||||
|
|
@ -24,7 +24,7 @@ fun stx expectedType? =>
|
|||
| some expectedType => mkTacticMVar stx expectedType (stx.getArg 1)
|
||||
| none => throwError stx ("invalid tactic block, expected type has not been provided")
|
||||
|
||||
open Tactic (TacticM evalTactic)
|
||||
open Tactic (TacticM evalTactic getUnsolvedGoals)
|
||||
|
||||
def liftTacticElabM {α} (ref : Syntax) (mvarId : MVarId) (x : TacticM α) : TermElabM α :=
|
||||
withMVarContext mvarId $ fun ctx s =>
|
||||
|
|
@ -32,16 +32,13 @@ withMVarContext mvarId $ fun ctx s =>
|
|||
| EStateM.Result.error ex newS => EStateM.Result.error (Term.Exception.ex ex) newS.toTermState
|
||||
| EStateM.Result.ok a newS => EStateM.Result.ok a newS.toTermState
|
||||
|
||||
def reportUnsolvedGoals (ref : Syntax) (goals : List MVarId) : TermElabM Unit :=
|
||||
throwError ref $ "unsolved goals" ++ Format.line ++ MessageData.joinSep (goals.map $ MessageData.ofGoal) Format.line
|
||||
|
||||
def ensureAssignmentHasNoMVars (ref : Syntax) (mvarId : MVarId) : TermElabM Unit := do
|
||||
val ← instantiateMVars ref (mkMVar mvarId);
|
||||
when val.hasMVar $ throwError ref ("tactic failed, result still contain metavariables" ++ indentExpr val)
|
||||
|
||||
def runTactic (ref : Syntax) (mvarId : MVarId) (tacticCode : Syntax) : TermElabM Unit := do
|
||||
modify $ fun s => { mctx := s.mctx.instantiateMVarDeclMVars mvarId, .. s };
|
||||
remainingGoals ← liftTacticElabM ref mvarId $ do { evalTactic tacticCode; s ← get; pure s.goals };
|
||||
remainingGoals ← liftTacticElabM ref mvarId $ do { evalTactic tacticCode; getUnsolvedGoals };
|
||||
let tailRef := ref.getTailWithInfo.getD ref;
|
||||
unless remainingGoals.isEmpty (reportUnsolvedGoals tailRef remainingGoals);
|
||||
ensureAssignmentHasNoMVars tailRef mvarId
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
|
|||
Authors: Leonardo de Moura, Sebastian Ullrich
|
||||
-/
|
||||
prelude
|
||||
import Init.Lean.Util.CollectMVars
|
||||
import Init.Lean.Elab.Util
|
||||
import Init.Lean.Elab.Term
|
||||
import Init.Lean.Meta.Tactic.Assumption
|
||||
|
|
@ -11,6 +12,11 @@ import Init.Lean.Meta.Tactic.Intro
|
|||
|
||||
namespace Lean
|
||||
namespace Elab
|
||||
|
||||
def Term.reportUnsolvedGoals (ref : Syntax) (goals : List MVarId) : TermElabM Unit :=
|
||||
let tailRef := ref.getTailWithInfo.getD ref;
|
||||
Term.throwError tailRef $ "unsolved goals" ++ Format.line ++ MessageData.joinSep (goals.map $ MessageData.ofGoal) (Format.line ++ Format.line)
|
||||
|
||||
namespace Tactic
|
||||
|
||||
structure Context extends toTermCtx : Term.Context :=
|
||||
|
|
@ -22,12 +28,27 @@ structure State extends toTermState : Term.State :=
|
|||
|
||||
instance State.inhabited : Inhabited State := ⟨{ goals := [], toTermState := arbitrary _ }⟩
|
||||
|
||||
structure BacktrackableState :=
|
||||
(env : Environment)
|
||||
(mctx : MetavarContext)
|
||||
(goals : List MVarId)
|
||||
|
||||
abbrev Exception := Elab.Exception
|
||||
|
||||
abbrev TacticM := ReaderT Context (EStateM Exception State)
|
||||
|
||||
abbrev Tactic := Syntax → TacticM Unit
|
||||
|
||||
protected def save (s : State) : BacktrackableState :=
|
||||
{ .. s }
|
||||
|
||||
protected def restore (s : State) (bs : BacktrackableState) : State :=
|
||||
{ env := bs.env, mctx := bs.mctx, goals := bs.goals, .. s }
|
||||
|
||||
instance : EStateM.Backtrackable BacktrackableState State :=
|
||||
{ save := Tactic.save,
|
||||
restore := Tactic.restore }
|
||||
|
||||
def liftTermElabM {α} (x : TermElabM α) : TacticM α :=
|
||||
fun ctx s => match x ctx.toTermCtx s.toTermState with
|
||||
| EStateM.Result.ok a newS => EStateM.Result.ok a { toTermState := newS, .. s }
|
||||
|
|
@ -44,9 +65,17 @@ def getOptions : TacticM Options := do ctx ← read; pure ctx.config.opts
|
|||
def getMVarDecl (mvarId : MVarId) : TacticM MetavarDecl := do mctx ← getMCtx; pure $ mctx.getDecl mvarId
|
||||
def instantiateMVars (ref : Syntax) (e : Expr) : TacticM Expr := liftTermElabM $ Term.instantiateMVars ref e
|
||||
def addContext (msg : MessageData) : TacticM MessageData := liftTermElabM $ Term.addContext msg
|
||||
def isExprMVarAssigned (mvarId : MVarId) : TacticM Bool := liftTermElabM $ Term.isExprMVarAssigned mvarId
|
||||
def assignExprMVar (mvarId : MVarId) (val : Expr) : TacticM Unit := liftTermElabM $ Term.assignExprMVar mvarId val
|
||||
def ensureHasType (ref : Syntax) (expectedType? : Option Expr) (e : Expr) : TacticM Expr := liftTermElabM $ Term.ensureHasType ref expectedType? e
|
||||
def elabTerm (stx : Syntax) (expectedType? : Option Expr) : TacticM Expr := liftTermElabM $ Term.elabTerm stx expectedType?
|
||||
def reportUnsolvedGoals (ref : Syntax) (goals : List MVarId) : TacticM Unit := liftTermElabM $ Term.reportUnsolvedGoals ref goals
|
||||
|
||||
/-- Collect unassigned metavariables -/
|
||||
def collectMVars (ref : Syntax) (e : Expr) : TacticM (List MVarId) := do
|
||||
e ← instantiateMVars ref e;
|
||||
let s := Lean.collectMVars {} e;
|
||||
pure s.result.toList
|
||||
|
||||
instance monadLog : MonadLog TacticM :=
|
||||
{ getCmdPos := do ctx ← read; pure ctx.cmdPos,
|
||||
|
|
@ -180,8 +209,13 @@ let needReset := ctx.localInstances == mvarDecl.localInstances;
|
|||
withLCtx mvarDecl.lctx mvarDecl.localInstances $ resettingSynthInstanceCacheWhen needReset x
|
||||
|
||||
def getGoals : TacticM (List MVarId) := do s ← get; pure s.goals
|
||||
def getMainGoal (ref : Syntax) : TacticM (MVarId × List MVarId) := do (g::gs) ← getGoals | throwError ref "no goals to be solved"; pure (g, gs)
|
||||
def updateGoals (gs : List MVarId) : TacticM Unit := modify $ fun s => { goals := gs, .. s }
|
||||
def setGoals (gs : List MVarId) : TacticM Unit := modify $ fun s => { goals := gs, .. s }
|
||||
def pruneSolvedGoals : TacticM Unit := do
|
||||
gs ← getGoals;
|
||||
gs ← gs.filterM $ fun g => not <$> isExprMVarAssigned g;
|
||||
setGoals gs
|
||||
def getUnsolvedGoals : TacticM (List MVarId) := do pruneSolvedGoals; getGoals
|
||||
def getMainGoal (ref : Syntax) : TacticM (MVarId × List MVarId) := do (g::gs) ← getUnsolvedGoals | throwError ref "no goals to be solved"; pure (g, gs)
|
||||
def ensureHasNoMVars (ref : Syntax) (e : Expr) : TacticM Unit := do
|
||||
e ← instantiateMVars ref e;
|
||||
when e.hasMVar $ throwError ref ("tactic failed, resulting expression contains metavariables" ++ indentExpr e)
|
||||
|
|
@ -190,7 +224,19 @@ when e.hasMVar $ throwError ref ("tactic failed, resulting expression contains m
|
|||
(g, gs) ← getMainGoal ref;
|
||||
withMVarContext g $ do
|
||||
gs' ← liftMetaM ref $ tactic g;
|
||||
updateGoals (gs' ++ gs)
|
||||
setGoals (gs' ++ gs)
|
||||
|
||||
def done (ref : Syntax) : TacticM Unit := do
|
||||
gs ← getUnsolvedGoals;
|
||||
unless gs.isEmpty $ reportUnsolvedGoals ref gs
|
||||
|
||||
def focus {α} (ref : Syntax) (tactic : TacticM α) : TacticM α := do
|
||||
(g, gs) ← getMainGoal ref;
|
||||
setGoals [g];
|
||||
a ← tactic;
|
||||
done ref;
|
||||
setGoals gs;
|
||||
pure a
|
||||
|
||||
@[builtinTactic seq] def evalSeq : Tactic :=
|
||||
fun stx => (stx.getArg 0).forSepArgsM evalTactic
|
||||
|
|
@ -216,9 +262,30 @@ fun stx => match_syntax stx with
|
|||
ensureHasNoMVars ref val;
|
||||
assignExprMVar g val
|
||||
};
|
||||
updateGoals gs
|
||||
setGoals gs
|
||||
| _ => throwUnsupportedSyntax
|
||||
|
||||
@[builtinTactic «refine»] def evalRefine : Tactic :=
|
||||
fun stx => match_syntax stx with
|
||||
| `(tactic| refine $e) => do
|
||||
let ref := stx;
|
||||
(g, gs) ← getMainGoal stx;
|
||||
gs' ← withMVarContext g $ do {
|
||||
decl ← getMVarDecl g;
|
||||
val ← elabTerm e decl.type;
|
||||
val ← ensureHasType ref decl.type val;
|
||||
assignExprMVar g val;
|
||||
collectMVars ref val
|
||||
};
|
||||
setGoals (gs' ++ gs)
|
||||
| _ => throwUnsupportedSyntax
|
||||
|
||||
@[builtinTactic nestedTacticBlock] def evalNestedTacticBlock : Tactic :=
|
||||
fun stx => focus stx (evalTactic (stx.getArg 1))
|
||||
|
||||
@[builtinTactic nestedTacticBlockCurly] def evalNestedTacticBlockCurly : Tactic :=
|
||||
evalNestedTacticBlock
|
||||
|
||||
@[init] private def regTraceClasses : IO Unit := do
|
||||
registerTraceClass `Elab.tactic;
|
||||
pure ()
|
||||
|
|
|
|||
|
|
@ -638,6 +638,11 @@ fun _ _ => pure $ mkSort levelOne
|
|||
@[builtinTermElab «hole»] def elabHole : TermElab :=
|
||||
fun stx expectedType? => mkFreshExprMVar stx expectedType?
|
||||
|
||||
@[builtinTermElab «namedHole»] def elabNamedHole : TermElab :=
|
||||
fun stx expectedType? =>
|
||||
let name := stx.getIdAt 1;
|
||||
mkFreshExprMVar stx expectedType? MetavarKind.syntheticOpaque name
|
||||
|
||||
/-- Main loop for `mkPairs`. -/
|
||||
private partial def mkPairsAux (elems : Array Syntax) : Nat → Syntax → TermElabM Syntax
|
||||
| i, acc =>
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ prelude
|
|||
import Init.Data.PersistentArray.Basic
|
||||
import Init.Data.PersistentHashMap.Basic
|
||||
import Init.Lean.Expr
|
||||
import Init.Lean.Hygiene
|
||||
|
||||
namespace Lean
|
||||
|
||||
|
|
@ -149,7 +150,7 @@ lctx.decls.findRev? (fun decl =>
|
|||
def usesUserName (lctx : LocalContext) (userName : Name) : Bool :=
|
||||
(lctx.findFromUserName? userName).isSome
|
||||
|
||||
partial def getUnusedNameAux (lctx : LocalContext) (suggestion : Name) : Nat → Name × Nat
|
||||
private partial def getUnusedNameAux (lctx : LocalContext) (suggestion : Name) : Nat → Name × Nat
|
||||
| i =>
|
||||
let curr := suggestion.appendIndexAfter i;
|
||||
if lctx.usesUserName curr then getUnusedNameAux (i + 1)
|
||||
|
|
@ -157,7 +158,8 @@ partial def getUnusedNameAux (lctx : LocalContext) (suggestion : Name) : Nat →
|
|||
|
||||
@[export lean_local_ctx_get_unused_name]
|
||||
def getUnusedName (lctx : LocalContext) (suggestion : Name) : Name :=
|
||||
if lctx.usesUserName suggestion then (lctx.getUnusedNameAux suggestion 1).1
|
||||
let (suggestion, _) := extractMacroScopes suggestion;
|
||||
if lctx.usesUserName suggestion then (getUnusedNameAux lctx suggestion 1).1
|
||||
else suggestion
|
||||
|
||||
@[export lean_local_ctx_last_decl]
|
||||
|
|
|
|||
|
|
@ -16,7 +16,8 @@ def introNCoreAux {σ} (mvarId : MVarId) (mkName : LocalContext → Name → σ
|
|||
let type := type.instantiateRevRange j fvars.size fvars;
|
||||
adaptReader (fun (ctx : Context) => { lctx := lctx, .. ctx }) $
|
||||
withNewLocalInstances isClassExpensive fvars j $ do
|
||||
newMVar ← mkFreshExprSyntheticOpaqueMVar type;
|
||||
tag ← getMVarTag mvarId;
|
||||
newMVar ← mkFreshExprSyntheticOpaqueMVar type tag;
|
||||
lctx ← getLCtx;
|
||||
newVal ← mkLambda fvars newMVar;
|
||||
modify $ fun s => { mctx := s.mctx.assignExpr mvarId newVal, .. s };
|
||||
|
|
|
|||
|
|
@ -9,6 +9,11 @@ import Init.Lean.Meta.Basic
|
|||
namespace Lean
|
||||
namespace Meta
|
||||
|
||||
/-- Aka user name -/
|
||||
def getMVarTag (mvarId : MVarId) : MetaM Name := do
|
||||
mvarDecl ← getMVarDecl mvarId;
|
||||
pure mvarDecl.userName
|
||||
|
||||
def mkFreshExprSyntheticOpaqueMVar (type : Expr) (userName : Name := Name.anonymous) : MetaM Expr :=
|
||||
mkFreshExprMVar type userName MetavarKind.syntheticOpaque
|
||||
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ def seq := parser! sepBy tacticParser "; " true
|
|||
@[builtinTacticParser] def «apply» := parser! nonReservedSymbol "apply " >> termParser
|
||||
@[builtinTacticParser] def «exact» := parser! nonReservedSymbol "exact " >> termParser
|
||||
@[builtinTacticParser] def «refine» := parser! nonReservedSymbol "refine " >> termParser
|
||||
@[builtinTacticParser] def «case» := parser! nonReservedSymbol "case " >> ident >> tacticParser
|
||||
@[builtinTacticParser] def nestedTacticBlock := parser! "begin " >> seq >> "end"
|
||||
@[builtinTacticParser] def nestedTacticBlockCurly := parser! "{" >> seq >> "}"
|
||||
@[builtinTacticParser] def orelse := tparser! pushLeading >> " <|> " >> tacticParser 1
|
||||
|
|
|
|||
41
stage0/src/Init/Lean/Util/CollectMVars.lean
Normal file
41
stage0/src/Init/Lean/Util/CollectMVars.lean
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
/-
|
||||
Copyright (c) 2020 Microsoft Corporation. All rights reserved.
|
||||
Released under Apache 2.0 license as described in the file LICENSE.
|
||||
Authors: Leonardo de Moura
|
||||
-/
|
||||
prelude
|
||||
import Init.Lean.Expr
|
||||
|
||||
namespace Lean
|
||||
|
||||
namespace CollectMVars
|
||||
|
||||
structure State :=
|
||||
(visitedExpr : ExprSet := {})
|
||||
(result : Array MVarId := #[])
|
||||
|
||||
instance State.inhabited : Inhabited State := ⟨{}⟩
|
||||
|
||||
abbrev Visitor := State → State
|
||||
|
||||
@[inline] def visit (f : Expr → Visitor) (e : Expr) : Visitor :=
|
||||
fun s =>
|
||||
if !e.hasMVar || s.visitedExpr.contains e then s
|
||||
else f e { visitedExpr := s.visitedExpr.insert e, .. s }
|
||||
|
||||
partial def main : Expr → Visitor
|
||||
| Expr.proj _ _ e _ => visit main e
|
||||
| Expr.forallE _ d b _ => visit main b ∘ visit main d
|
||||
| Expr.lam _ d b _ => visit main b ∘ visit main d
|
||||
| Expr.letE _ t v b _ => visit main b ∘ visit main v ∘ visit main t
|
||||
| Expr.app f a _ => visit main a ∘ visit main f
|
||||
| Expr.mdata _ b _ => visit main b
|
||||
| Expr.mvar mvarId _ => fun s => { result := s.result.push mvarId, .. s }
|
||||
| _ => id
|
||||
|
||||
end CollectMVars
|
||||
|
||||
def collectMVars (s : CollectMVars.State) (e : Expr) : CollectMVars.State :=
|
||||
CollectMVars.visit CollectMVars.main e s
|
||||
|
||||
end Lean
|
||||
|
|
@ -43,6 +43,9 @@ match mctx.findDecl? mvarId with
|
|||
([], none, Format.nil);
|
||||
let fmt := pushPending varNames type? fmt;
|
||||
let fmt := addLine fmt;
|
||||
fmt ++ "⊢" ++ " " ++ Format.nest indent (pp mvarDecl.type)
|
||||
let fmt := fmt ++ "⊢" ++ " " ++ Format.nest indent (pp mvarDecl.type);
|
||||
match mvarDecl.userName with
|
||||
| Name.anonymous => fmt
|
||||
| name => "case " ++ format name ++ Format.line ++ fmt
|
||||
|
||||
end Lean
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -149,6 +149,7 @@ size_t l_USize_shiftRight(size_t, size_t);
|
|||
lean_object* l_Lean_SMap_find_x3f___at_Lean_Elab_Command_elabCommand___main___spec__1___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_getPos___at_Lean_Elab_Command_throwError___spec__2___boxed(lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_Elab_Exception_inhabited___closed__1;
|
||||
extern lean_object* l_Lean_FileMap_ofString___closed__1;
|
||||
lean_object* l_Lean_Elab_Command_Scope_inhabited;
|
||||
extern lean_object* l_Lean_Parser_Command_section___elambda__1___closed__1;
|
||||
extern lean_object* l_Lean_Meta_MetaHasEval___rarg___closed__4;
|
||||
|
|
@ -463,7 +464,6 @@ lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabUniverse___closed__
|
|||
extern lean_object* l_Lean_Parser_Command_universes___elambda__1___closed__2;
|
||||
lean_object* l_Lean_Elab_Command_elabEnd___closed__3;
|
||||
lean_object* lean_io_ref_set(lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_mkOptionalNode___closed__1;
|
||||
lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabCheck___closed__4;
|
||||
lean_object* l___private_Init_Lean_Elab_Command_6__mkTermContext___boxed(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Command_getLevelNames(lean_object*, lean_object*);
|
||||
|
|
@ -14518,7 +14518,7 @@ lean_object* l_Lean_Elab_Command_elabVariable___lambda__1(lean_object* x_1, lean
|
|||
_start:
|
||||
{
|
||||
lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8;
|
||||
x_5 = l_Lean_mkOptionalNode___closed__1;
|
||||
x_5 = l_Lean_FileMap_ofString___closed__1;
|
||||
x_6 = lean_array_push(x_5, x_1);
|
||||
x_7 = l_Lean_Meta_dbgTrace___rarg___closed__1;
|
||||
x_8 = l_Lean_Elab_Term_elabBinders___rarg(x_6, x_7, x_3, x_4);
|
||||
|
|
|
|||
|
|
@ -121,6 +121,7 @@ lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__98;
|
|||
lean_object* lean_string_utf8_byte_size(lean_object*);
|
||||
lean_object* l_Lean_mkAtom(lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__20;
|
||||
extern lean_object* l_Lean_FileMap_ofString___closed__1;
|
||||
lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__10;
|
||||
lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__32;
|
||||
lean_object* l_Array_umapMAux___main___at_Lean_Elab_Command_elabNotation___spec__3(lean_object*, lean_object*);
|
||||
|
|
@ -411,7 +412,6 @@ lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__17;
|
|||
lean_object* l_Lean_Elab_Command_elabSyntax___closed__23;
|
||||
lean_object* l_Lean_Elab_Command_elabMacroRules___lambda__1___closed__12;
|
||||
lean_object* l___private_Init_Lean_Elab_Syntax_3__getMode___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_mkOptionalNode___closed__1;
|
||||
lean_object* l_Array_findIdxAux___main___at___private_Init_Lean_Elab_Syntax_8__antiquote___main___spec__4___boxed(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Command_elabSyntax___closed__13;
|
||||
lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__57;
|
||||
|
|
@ -949,7 +949,7 @@ x_4 = l_Nat_repr(x_3);
|
|||
x_5 = lean_box(0);
|
||||
x_6 = l_Lean_numLitKind;
|
||||
x_7 = l_Lean_mkStxLit(x_6, x_4, x_5);
|
||||
x_8 = l_Lean_mkOptionalNode___closed__1;
|
||||
x_8 = l_Lean_FileMap_ofString___closed__1;
|
||||
x_9 = lean_array_push(x_8, x_7);
|
||||
x_10 = l_Lean_Parser_Term_num___elambda__1___closed__1;
|
||||
x_11 = lean_alloc_ctor(1, 2, 0);
|
||||
|
|
@ -3654,7 +3654,7 @@ lean_ctor_set(x_1067, 0, x_1066);
|
|||
lean_ctor_set(x_1067, 1, x_1065);
|
||||
x_1068 = lean_array_push(x_1062, x_1067);
|
||||
x_1069 = l_Lean_mkStxStrLit(x_1049, x_1056);
|
||||
x_1070 = l_Lean_mkOptionalNode___closed__1;
|
||||
x_1070 = l_Lean_FileMap_ofString___closed__1;
|
||||
x_1071 = lean_array_push(x_1070, x_1069);
|
||||
x_1072 = l_Lean_Parser_Term_str___elambda__1___closed__2;
|
||||
x_1073 = lean_alloc_ctor(1, 2, 0);
|
||||
|
|
@ -3707,7 +3707,7 @@ lean_ctor_set(x_1097, 0, x_1096);
|
|||
lean_ctor_set(x_1097, 1, x_1095);
|
||||
x_1098 = lean_array_push(x_1092, x_1097);
|
||||
x_1099 = l_Lean_mkStxStrLit(x_1049, x_1086);
|
||||
x_1100 = l_Lean_mkOptionalNode___closed__1;
|
||||
x_1100 = l_Lean_FileMap_ofString___closed__1;
|
||||
x_1101 = lean_array_push(x_1100, x_1099);
|
||||
x_1102 = l_Lean_Parser_Term_str___elambda__1___closed__2;
|
||||
x_1103 = lean_alloc_ctor(1, 2, 0);
|
||||
|
|
@ -4067,7 +4067,7 @@ x_1151 = lean_array_push(x_1143, x_1150);
|
|||
x_1152 = l_Nat_repr(x_1133);
|
||||
x_1153 = l_Lean_numLitKind;
|
||||
x_1154 = l_Lean_mkStxLit(x_1153, x_1152, x_1137);
|
||||
x_1155 = l_Lean_mkOptionalNode___closed__1;
|
||||
x_1155 = l_Lean_FileMap_ofString___closed__1;
|
||||
x_1156 = lean_array_push(x_1155, x_1154);
|
||||
x_1157 = l_Lean_Parser_Term_num___elambda__1___closed__1;
|
||||
x_1158 = lean_alloc_ctor(1, 2, 0);
|
||||
|
|
@ -4125,7 +4125,7 @@ x_1182 = lean_array_push(x_1174, x_1181);
|
|||
x_1183 = l_Nat_repr(x_1133);
|
||||
x_1184 = l_Lean_numLitKind;
|
||||
x_1185 = l_Lean_mkStxLit(x_1184, x_1183, x_1168);
|
||||
x_1186 = l_Lean_mkOptionalNode___closed__1;
|
||||
x_1186 = l_Lean_FileMap_ofString___closed__1;
|
||||
x_1187 = lean_array_push(x_1186, x_1185);
|
||||
x_1188 = l_Lean_Parser_Term_num___elambda__1___closed__1;
|
||||
x_1189 = lean_alloc_ctor(1, 2, 0);
|
||||
|
|
@ -11437,7 +11437,7 @@ lean_inc(x_22);
|
|||
x_23 = lean_ctor_get(x_21, 1);
|
||||
lean_inc(x_23);
|
||||
lean_dec(x_21);
|
||||
x_24 = l_Lean_mkOptionalNode___closed__1;
|
||||
x_24 = l_Lean_FileMap_ofString___closed__1;
|
||||
x_25 = lean_array_push(x_24, x_18);
|
||||
x_26 = l_Array_iterateMAux___main___at_Array_append___spec__1___rarg(x_22, x_22, x_20, x_25);
|
||||
lean_dec(x_22);
|
||||
|
|
|
|||
|
|
@ -20,28 +20,23 @@ lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabTacticBlock(lean_object*)
|
|||
lean_object* l_Lean_Elab_Term_instantiateMVars(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_mkFreshExprMVar(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_liftTacticElabM___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_MessageData_ofList___closed__3;
|
||||
lean_object* l_Lean_Elab_Term_runTactic___lambda__1(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_ensureAssignmentHasNoMVars___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_mkMVar(lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_liftTacticElabM___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Tactic_evalTactic(lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_Parser_Term_tacticBlock___elambda__1___closed__2;
|
||||
lean_object* l_Lean_Elab_Term_reportUnsolvedGoals___closed__3;
|
||||
lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabTacticBlock___closed__3;
|
||||
lean_object* l_Lean_Syntax_getTailWithInfo___main(lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_ensureAssignmentHasNoMVars___closed__3;
|
||||
lean_object* l_ReaderT_bind___at_Lean_Elab_Tactic_monadLog___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_List_map___main___at_Lean_Elab_Term_reportUnsolvedGoals___spec__1(lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_elabTacticBlock___closed__1;
|
||||
lean_object* l_Lean_Elab_Tactic_getUnsolvedGoals(lean_object*, lean_object*);
|
||||
lean_object* lean_name_mk_string(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_throwError___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_elabTacticBlock___closed__2;
|
||||
lean_object* l_Lean_Elab_Term_reportUnsolvedGoals___closed__1;
|
||||
lean_object* l_Lean_Elab_Term_liftTacticElabM(lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_reportUnsolvedGoals___closed__4;
|
||||
lean_object* l_Lean_Elab_Term_withMVarContext___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_MessageData_joinSep___main(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_runTactic(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_runTactic___closed__1;
|
||||
lean_object* l_Lean_Elab_Term_elabTacticBlock___closed__3;
|
||||
|
|
@ -59,9 +54,7 @@ lean_object* l_Lean_Elab_Term_elabTacticBlock(lean_object*, lean_object*, lean_o
|
|||
uint8_t l_List_isEmpty___rarg(lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_mkTacticMVar(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_indentExpr(lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_reportUnsolvedGoals___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_mkTacticMVar___closed__1;
|
||||
lean_object* l_Lean_Elab_Term_reportUnsolvedGoals___closed__2;
|
||||
lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabTacticBlock___closed__1;
|
||||
lean_object* l_Lean_Elab_Term_ensureAssignmentHasNoMVars(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* _init_l_Lean_Elab_Term_mkTacticMVar___closed__1() {
|
||||
|
|
@ -88,7 +81,7 @@ _start:
|
|||
lean_object* x_6; uint8_t 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; uint8_t x_15;
|
||||
x_6 = lean_alloc_ctor(1, 1, 0);
|
||||
lean_ctor_set(x_6, 0, x_2);
|
||||
x_7 = 1;
|
||||
x_7 = 2;
|
||||
x_8 = l_Lean_Elab_Term_mkTacticMVar___closed__2;
|
||||
lean_inc(x_4);
|
||||
x_9 = l_Lean_Elab_Term_mkFreshExprMVar(x_1, x_6, x_7, x_8, x_4, x_5);
|
||||
|
|
@ -562,115 +555,6 @@ x_2 = lean_alloc_closure((void*)(l_Lean_Elab_Term_liftTacticElabM___rarg), 5, 0)
|
|||
return x_2;
|
||||
}
|
||||
}
|
||||
lean_object* l_List_map___main___at_Lean_Elab_Term_reportUnsolvedGoals___spec__1(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
if (lean_obj_tag(x_1) == 0)
|
||||
{
|
||||
lean_object* x_2;
|
||||
x_2 = lean_box(0);
|
||||
return x_2;
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_3;
|
||||
x_3 = !lean_is_exclusive(x_1);
|
||||
if (x_3 == 0)
|
||||
{
|
||||
lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7;
|
||||
x_4 = lean_ctor_get(x_1, 0);
|
||||
x_5 = lean_ctor_get(x_1, 1);
|
||||
x_6 = lean_alloc_ctor(5, 1, 0);
|
||||
lean_ctor_set(x_6, 0, x_4);
|
||||
x_7 = l_List_map___main___at_Lean_Elab_Term_reportUnsolvedGoals___spec__1(x_5);
|
||||
lean_ctor_set(x_1, 1, x_7);
|
||||
lean_ctor_set(x_1, 0, x_6);
|
||||
return x_1;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12;
|
||||
x_8 = lean_ctor_get(x_1, 0);
|
||||
x_9 = lean_ctor_get(x_1, 1);
|
||||
lean_inc(x_9);
|
||||
lean_inc(x_8);
|
||||
lean_dec(x_1);
|
||||
x_10 = lean_alloc_ctor(5, 1, 0);
|
||||
lean_ctor_set(x_10, 0, x_8);
|
||||
x_11 = l_List_map___main___at_Lean_Elab_Term_reportUnsolvedGoals___spec__1(x_9);
|
||||
x_12 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_12, 0, x_10);
|
||||
lean_ctor_set(x_12, 1, x_11);
|
||||
return x_12;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_Lean_Elab_Term_reportUnsolvedGoals___closed__1() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_mk_string("unsolved goals");
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_Lean_Elab_Term_reportUnsolvedGoals___closed__2() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2;
|
||||
x_1 = l_Lean_Elab_Term_reportUnsolvedGoals___closed__1;
|
||||
x_2 = lean_alloc_ctor(2, 1, 0);
|
||||
lean_ctor_set(x_2, 0, x_1);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_Lean_Elab_Term_reportUnsolvedGoals___closed__3() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2;
|
||||
x_1 = l_Lean_Elab_Term_reportUnsolvedGoals___closed__2;
|
||||
x_2 = lean_alloc_ctor(0, 1, 0);
|
||||
lean_ctor_set(x_2, 0, x_1);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_Lean_Elab_Term_reportUnsolvedGoals___closed__4() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
x_1 = l_Lean_Elab_Term_reportUnsolvedGoals___closed__3;
|
||||
x_2 = l_Lean_MessageData_ofList___closed__3;
|
||||
x_3 = lean_alloc_ctor(9, 2, 0);
|
||||
lean_ctor_set(x_3, 0, x_1);
|
||||
lean_ctor_set(x_3, 1, x_2);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_Term_reportUnsolvedGoals(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; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10;
|
||||
x_5 = l_List_map___main___at_Lean_Elab_Term_reportUnsolvedGoals___spec__1(x_2);
|
||||
x_6 = l_Lean_MessageData_ofList___closed__3;
|
||||
x_7 = l_Lean_MessageData_joinSep___main(x_5, x_6);
|
||||
lean_dec(x_5);
|
||||
x_8 = l_Lean_Elab_Term_reportUnsolvedGoals___closed__4;
|
||||
x_9 = lean_alloc_ctor(9, 2, 0);
|
||||
lean_ctor_set(x_9, 0, x_8);
|
||||
lean_ctor_set(x_9, 1, x_7);
|
||||
x_10 = l_Lean_Elab_Term_throwError___rarg(x_1, x_9, x_3, x_4);
|
||||
return x_10;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_Term_reportUnsolvedGoals___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_Term_reportUnsolvedGoals(x_1, x_2, x_3, x_4);
|
||||
lean_dec(x_1);
|
||||
return x_5;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_Lean_Elab_Term_ensureAssignmentHasNoMVars___closed__1() {
|
||||
_start:
|
||||
{
|
||||
|
|
@ -785,13 +669,9 @@ return x_5;
|
|||
lean_object* l_Lean_Elab_Term_runTactic___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_4; lean_object* x_5;
|
||||
x_4 = lean_ctor_get(x_3, 1);
|
||||
lean_inc(x_4);
|
||||
x_5 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_5, 0, x_4);
|
||||
lean_ctor_set(x_5, 1, x_3);
|
||||
return x_5;
|
||||
lean_object* x_4;
|
||||
x_4 = l_Lean_Elab_Tactic_getUnsolvedGoals(x_2, x_3);
|
||||
return x_4;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_Lean_Elab_Term_runTactic___closed__1() {
|
||||
|
|
@ -847,7 +727,6 @@ if (x_18 == 0)
|
|||
lean_object* x_19; uint8_t x_20;
|
||||
lean_dec(x_2);
|
||||
x_19 = l_Lean_Elab_Term_reportUnsolvedGoals(x_1, x_15, x_4, x_16);
|
||||
lean_dec(x_1);
|
||||
x_20 = !lean_is_exclusive(x_19);
|
||||
if (x_20 == 0)
|
||||
{
|
||||
|
|
@ -887,7 +766,6 @@ x_25 = lean_ctor_get(x_17, 0);
|
|||
lean_inc(x_25);
|
||||
lean_dec(x_17);
|
||||
x_26 = l_Lean_Elab_Term_reportUnsolvedGoals(x_25, x_15, x_4, x_16);
|
||||
lean_dec(x_25);
|
||||
x_27 = !lean_is_exclusive(x_26);
|
||||
if (x_27 == 0)
|
||||
{
|
||||
|
|
@ -1000,7 +878,6 @@ if (x_52 == 0)
|
|||
lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57;
|
||||
lean_dec(x_2);
|
||||
x_53 = l_Lean_Elab_Term_reportUnsolvedGoals(x_1, x_49, x_4, x_50);
|
||||
lean_dec(x_1);
|
||||
x_54 = lean_ctor_get(x_53, 0);
|
||||
lean_inc(x_54);
|
||||
x_55 = lean_ctor_get(x_53, 1);
|
||||
|
|
@ -1042,7 +919,6 @@ x_59 = lean_ctor_get(x_51, 0);
|
|||
lean_inc(x_59);
|
||||
lean_dec(x_51);
|
||||
x_60 = l_Lean_Elab_Term_reportUnsolvedGoals(x_59, x_49, x_4, x_50);
|
||||
lean_dec(x_59);
|
||||
x_61 = lean_ctor_get(x_60, 0);
|
||||
lean_inc(x_61);
|
||||
x_62 = lean_ctor_get(x_60, 1);
|
||||
|
|
@ -1194,7 +1070,6 @@ if (x_94 == 0)
|
|||
lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99;
|
||||
lean_dec(x_2);
|
||||
x_95 = l_Lean_Elab_Term_reportUnsolvedGoals(x_1, x_91, x_4, x_92);
|
||||
lean_dec(x_1);
|
||||
x_96 = lean_ctor_get(x_95, 0);
|
||||
lean_inc(x_96);
|
||||
x_97 = lean_ctor_get(x_95, 1);
|
||||
|
|
@ -1236,7 +1111,6 @@ x_101 = lean_ctor_get(x_93, 0);
|
|||
lean_inc(x_101);
|
||||
lean_dec(x_93);
|
||||
x_102 = l_Lean_Elab_Term_reportUnsolvedGoals(x_101, x_91, x_4, x_92);
|
||||
lean_dec(x_101);
|
||||
x_103 = lean_ctor_get(x_102, 0);
|
||||
lean_inc(x_103);
|
||||
x_104 = lean_ctor_get(x_102, 1);
|
||||
|
|
@ -1306,7 +1180,6 @@ _start:
|
|||
{
|
||||
lean_object* x_4;
|
||||
x_4 = l_Lean_Elab_Term_runTactic___lambda__1(x_1, x_2, x_3);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
return x_4;
|
||||
}
|
||||
|
|
@ -1343,14 +1216,6 @@ lean_mark_persistent(l___regBuiltinTermElab_Lean_Elab_Term_elabTacticBlock___clo
|
|||
res = l___regBuiltinTermElab_Lean_Elab_Term_elabTacticBlock(lean_io_mk_world());
|
||||
if (lean_io_result_is_error(res)) return res;
|
||||
lean_dec_ref(res);
|
||||
l_Lean_Elab_Term_reportUnsolvedGoals___closed__1 = _init_l_Lean_Elab_Term_reportUnsolvedGoals___closed__1();
|
||||
lean_mark_persistent(l_Lean_Elab_Term_reportUnsolvedGoals___closed__1);
|
||||
l_Lean_Elab_Term_reportUnsolvedGoals___closed__2 = _init_l_Lean_Elab_Term_reportUnsolvedGoals___closed__2();
|
||||
lean_mark_persistent(l_Lean_Elab_Term_reportUnsolvedGoals___closed__2);
|
||||
l_Lean_Elab_Term_reportUnsolvedGoals___closed__3 = _init_l_Lean_Elab_Term_reportUnsolvedGoals___closed__3();
|
||||
lean_mark_persistent(l_Lean_Elab_Term_reportUnsolvedGoals___closed__3);
|
||||
l_Lean_Elab_Term_reportUnsolvedGoals___closed__4 = _init_l_Lean_Elab_Term_reportUnsolvedGoals___closed__4();
|
||||
lean_mark_persistent(l_Lean_Elab_Term_reportUnsolvedGoals___closed__4);
|
||||
l_Lean_Elab_Term_ensureAssignmentHasNoMVars___closed__1 = _init_l_Lean_Elab_Term_ensureAssignmentHasNoMVars___closed__1();
|
||||
lean_mark_persistent(l_Lean_Elab_Term_ensureAssignmentHasNoMVars___closed__1);
|
||||
l_Lean_Elab_Term_ensureAssignmentHasNoMVars___closed__2 = _init_l_Lean_Elab_Term_ensureAssignmentHasNoMVars___closed__2();
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -68,6 +68,7 @@ lean_object* l_Lean_Elab_Term_mkTermElabAttribute___closed__3;
|
|||
lean_object* l_Lean_Elab_Term_synthesizeInstMVarCore___closed__2;
|
||||
extern lean_object* l_IO_Prim_fopenFlags___closed__12;
|
||||
lean_object* l_Lean_Elab_Term_resettingSynthInstanceCacheWhen(lean_object*);
|
||||
lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabNamedHole___closed__2;
|
||||
lean_object* l_Lean_Elab_Term_monadLog___closed__3;
|
||||
lean_object* l_Lean_Format_pretty(lean_object*, lean_object*);
|
||||
lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabChar___closed__3;
|
||||
|
|
@ -83,6 +84,7 @@ lean_object* l___private_Init_Lean_Elab_Term_14__mkConsts___boxed(lean_object*,
|
|||
lean_object* l_Lean_Meta_mkAppM(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_levelMVarToParam___closed__1;
|
||||
lean_object* l_Lean_Elab_Term_elabParen(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Syntax_getIdAt(lean_object*, lean_object*);
|
||||
lean_object* l_ReaderT_read___at_Lean_Elab_Term_monadLog___spec__1(lean_object*, lean_object*);
|
||||
lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabNum___closed__2;
|
||||
extern lean_object* l_Lean_maxRecDepthErrorMessage;
|
||||
|
|
@ -100,6 +102,7 @@ extern lean_object* l_Lean_Parser_Term_type___elambda__1___closed__2;
|
|||
uint8_t l_List_elem___main___at_Lean_addAliasEntry___spec__18(lean_object*, lean_object*);
|
||||
extern lean_object* l_Prod_HasRepr___rarg___closed__1;
|
||||
lean_object* l___private_Init_Lean_Elab_Term_4__isCDot___boxed(lean_object*);
|
||||
lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabNamedHole___closed__1;
|
||||
lean_object* l_Lean_Meta_Exception_toMessageData(lean_object*);
|
||||
lean_object* l_Lean_mkMVar(lean_object*);
|
||||
extern lean_object* l_Array_empty___closed__1;
|
||||
|
|
@ -215,6 +218,7 @@ lean_object* l_Lean_Elab_Term_termElabAttribute___closed__2;
|
|||
lean_object* l_Lean_Elab_Term_ensureHasType(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_IO_ofExcept___at_Lean_registerClassAttr___spec__1(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_getTraceState(lean_object*);
|
||||
lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabNamedHole___closed__3;
|
||||
lean_object* l_Array_foldlStepMAux___main___at_Lean_Syntax_foldSepRevArgsM___spec__1(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_mkFreshTypeMVar(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_elabTermAux___main___closed__1;
|
||||
|
|
@ -352,6 +356,7 @@ lean_object* l___private_Init_Lean_Elab_Term_6__exceptionToSorry___closed__2;
|
|||
lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabListLit___closed__3;
|
||||
lean_object* l_Lean_Elab_Term_expandCDot_x3f___closed__3;
|
||||
lean_object* l_Lean_Elab_Term_logTrace(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_Parser_Term_namedHole___elambda__1___closed__2;
|
||||
lean_object* l_Lean_Elab_Term_trySynthInstance(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_liftLevelM___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_elabStr___closed__2;
|
||||
|
|
@ -473,6 +478,7 @@ lean_object* l_Lean_Elab_Term_withNode___rarg(lean_object*, lean_object*, lean_o
|
|||
extern lean_object* l_Lean_nullKind___closed__2;
|
||||
lean_object* l_Lean_ParametricAttribute_setParam___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_List_foldlM___main___at___private_Init_Lean_Elab_Term_14__mkConsts___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_elabNamedHole___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_termElabAttribute;
|
||||
lean_object* l_Lean_Elab_Term_expandCDot_x3f___closed__1;
|
||||
lean_object* l_fix1___rarg___lambda__1___boxed(lean_object*, lean_object*);
|
||||
|
|
@ -484,6 +490,7 @@ lean_object* l_Lean_Elab_Term_getDeclName_x3f___boxed(lean_object*, lean_object*
|
|||
lean_object* l_Lean_Elab_Term_isDefEq(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_synthesizeInstMVarCore___closed__10;
|
||||
lean_object* l_Lean_ConstantInfo_lparams(lean_object*);
|
||||
lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabNamedHole(lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_mkFreshAnonymousName(lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_withLCtx(lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_withNode(lean_object*);
|
||||
|
|
@ -555,6 +562,7 @@ lean_object* l_PersistentArray_foldlM___at___private_Init_Lean_Elab_Term_3__from
|
|||
lean_object* l_Lean_Elab_Term_decLevel_x3f___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_ensureType___closed__1;
|
||||
lean_object* l_Lean_Elab_log___at_Lean_Elab_Term_logTrace___spec__1(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_elabNamedHole(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_getPos___at_Lean_Elab_Term_throwError___spec__2(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Array_umapMAux___main___at_Lean_Elab_Term_expandCDot_x3f___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_elabTerm___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -17362,6 +17370,63 @@ x_5 = l_Lean_Elab_Term_addBuiltinTermElab(x_2, x_3, x_4, x_1);
|
|||
return x_5;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_Term_elabNamedHole(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; lean_object* x_8;
|
||||
x_5 = lean_unsigned_to_nat(1u);
|
||||
x_6 = l_Lean_Syntax_getIdAt(x_1, x_5);
|
||||
x_7 = 2;
|
||||
x_8 = l_Lean_Elab_Term_mkFreshExprMVar(x_1, x_2, x_7, x_6, x_3, x_4);
|
||||
return x_8;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_Term_elabNamedHole___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_Term_elabNamedHole(x_1, x_2, x_3, x_4);
|
||||
lean_dec(x_1);
|
||||
return x_5;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l___regBuiltinTermElab_Lean_Elab_Term_elabNamedHole___closed__1() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_mk_string("elabNamedHole");
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l___regBuiltinTermElab_Lean_Elab_Term_elabNamedHole___closed__2() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
x_1 = l_Lean_Elab_Term_declareBuiltinTermElab___closed__4;
|
||||
x_2 = l___regBuiltinTermElab_Lean_Elab_Term_elabNamedHole___closed__1;
|
||||
x_3 = lean_name_mk_string(x_1, x_2);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l___regBuiltinTermElab_Lean_Elab_Term_elabNamedHole___closed__3() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_alloc_closure((void*)(l_Lean_Elab_Term_elabNamedHole___boxed), 4, 0);
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabNamedHole(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5;
|
||||
x_2 = l_Lean_Parser_Term_namedHole___elambda__1___closed__2;
|
||||
x_3 = l___regBuiltinTermElab_Lean_Elab_Term_elabNamedHole___closed__2;
|
||||
x_4 = l___regBuiltinTermElab_Lean_Elab_Term_elabNamedHole___closed__3;
|
||||
x_5 = l_Lean_Elab_Term_addBuiltinTermElab(x_2, x_3, x_4, x_1);
|
||||
return x_5;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l___private_Init_Lean_Elab_Term_9__mkPairsAux___main___closed__1() {
|
||||
_start:
|
||||
{
|
||||
|
|
@ -20802,6 +20867,15 @@ lean_mark_persistent(l___regBuiltinTermElab_Lean_Elab_Term_elabHole___closed__3)
|
|||
res = l___regBuiltinTermElab_Lean_Elab_Term_elabHole(lean_io_mk_world());
|
||||
if (lean_io_result_is_error(res)) return res;
|
||||
lean_dec_ref(res);
|
||||
l___regBuiltinTermElab_Lean_Elab_Term_elabNamedHole___closed__1 = _init_l___regBuiltinTermElab_Lean_Elab_Term_elabNamedHole___closed__1();
|
||||
lean_mark_persistent(l___regBuiltinTermElab_Lean_Elab_Term_elabNamedHole___closed__1);
|
||||
l___regBuiltinTermElab_Lean_Elab_Term_elabNamedHole___closed__2 = _init_l___regBuiltinTermElab_Lean_Elab_Term_elabNamedHole___closed__2();
|
||||
lean_mark_persistent(l___regBuiltinTermElab_Lean_Elab_Term_elabNamedHole___closed__2);
|
||||
l___regBuiltinTermElab_Lean_Elab_Term_elabNamedHole___closed__3 = _init_l___regBuiltinTermElab_Lean_Elab_Term_elabNamedHole___closed__3();
|
||||
lean_mark_persistent(l___regBuiltinTermElab_Lean_Elab_Term_elabNamedHole___closed__3);
|
||||
res = l___regBuiltinTermElab_Lean_Elab_Term_elabNamedHole(lean_io_mk_world());
|
||||
if (lean_io_result_is_error(res)) return res;
|
||||
lean_dec_ref(res);
|
||||
l___private_Init_Lean_Elab_Term_9__mkPairsAux___main___closed__1 = _init_l___private_Init_Lean_Elab_Term_9__mkPairsAux___main___closed__1();
|
||||
lean_mark_persistent(l___private_Init_Lean_Elab_Term_9__mkPairsAux___main___closed__1);
|
||||
l___private_Init_Lean_Elab_Term_9__mkPairsAux___main___closed__2 = _init_l___private_Init_Lean_Elab_Term_9__mkPairsAux___main___closed__2();
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// Lean compiler output
|
||||
// Module: Init.Lean.LocalContext
|
||||
// Imports: Init.Data.PersistentArray.Basic Init.Data.PersistentHashMap.Basic Init.Lean.Expr
|
||||
// Imports: Init.Data.PersistentArray.Basic Init.Data.PersistentHashMap.Basic Init.Lean.Expr Init.Lean.Hygiene
|
||||
#include "runtime/lean.h"
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic ignored "-Wunused-parameter"
|
||||
|
|
@ -19,6 +19,7 @@ lean_object* l_PersistentArray_forM___rarg(lean_object*, lean_object*, lean_obje
|
|||
lean_object* l_PersistentArray_foldlFromMAux___main___at_Lean_LocalContext_foldlFrom___spec__3___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* lean_array_set(lean_object*, lean_object*, lean_object*);
|
||||
uint8_t lean_local_ctx_uses_user_name(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_extractMacroScopes(lean_object*);
|
||||
lean_object* l_Lean_LocalContext_mkLambda___boxed(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_PersistentArray_anyMAux___main___at_Lean_LocalContext_anyM___spec__2___rarg(lean_object*, lean_object*, lean_object*);
|
||||
size_t l_USize_add(size_t, size_t);
|
||||
|
|
@ -99,6 +100,7 @@ lean_object* l_PersistentArray_findM_x3f___rarg(lean_object*, lean_object*, lean
|
|||
size_t l_USize_shiftRight(size_t, size_t);
|
||||
lean_object* l_Array_indexOfAux___main___at_Lean_LocalContext_erase___spec__3(lean_object*, lean_object*, lean_object*);
|
||||
uint8_t l_PersistentArray_anyMAux___main___at_Lean_LocalContext_any___spec__2(lean_object*, lean_object*);
|
||||
lean_object* l___private_Init_Lean_LocalContext_2__getUnusedNameAux(lean_object*, lean_object*, lean_object*);
|
||||
uint8_t l_Lean_LocalContext_contains(lean_object*, lean_object*);
|
||||
lean_object* l_PersistentArray_anyMAux___main___at_Lean_LocalContext_any___spec__2___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_Array_iterateMAux___main___at_Lean_LocalContext_foldl___spec__4___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -170,7 +172,6 @@ lean_object* l_Nat_foldRevAux___main___at_Lean_LocalContext_mkBinding___spec__1_
|
|||
lean_object* l_Array_findRevMAux___main___at_Lean_LocalContext_findDeclRev_x3f___spec__5(lean_object*);
|
||||
uint8_t l_PersistentHashMap_isEmpty___at_Lean_LocalContext_isEmpty___spec__1(lean_object*);
|
||||
lean_object* lean_array_fset(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_LocalContext_getUnusedNameAux___main(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_LocalContext_findDeclM_x3f___rarg___lambda__1(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Array_anyRangeMAux___main___at_Lean_LocalContext_anyM___spec__5___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_PersistentArray_findM_x3f___at_Lean_LocalContext_findDecl_x3f___spec__2___rarg___boxed(lean_object*, lean_object*);
|
||||
|
|
@ -310,10 +311,10 @@ lean_object* l_Lean_LocalContext_foldlFromM___boxed(lean_object*);
|
|||
lean_object* l_PersistentArray_anyM___at_Lean_LocalContext_anyM___spec__1___boxed(lean_object*);
|
||||
lean_object* l_Lean_mkForall(lean_object*, uint8_t, lean_object*, lean_object*);
|
||||
lean_object* l_PersistentArray_get_x21___at___private_Init_Lean_LocalContext_1__popTailNoneAux___main___spec__1(lean_object*, lean_object*);
|
||||
lean_object* l___private_Init_Lean_LocalContext_2__getUnusedNameAux___main(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_PersistentHashMap_eraseAux___main___at_Lean_LocalContext_erase___spec__2(lean_object*, size_t, lean_object*);
|
||||
lean_object* l_Lean_LocalContext_foldl___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_PersistentArray_foldlFromM___at_Lean_LocalContext_foldlFrom___spec__2(lean_object*);
|
||||
lean_object* l_Lean_LocalContext_getUnusedNameAux(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Array_anyRangeMAux___main___at_Lean_LocalContext_anyM___spec__5___boxed(lean_object*);
|
||||
uint8_t l_Lean_LocalContext_any(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_LocalContext_get_x21___closed__1;
|
||||
|
|
@ -578,7 +579,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_LocalDecl_value___closed__1;
|
||||
x_2 = lean_unsigned_to_nat(49u);
|
||||
x_2 = lean_unsigned_to_nat(50u);
|
||||
x_3 = lean_unsigned_to_nat(21u);
|
||||
x_4 = l_Lean_LocalDecl_value___closed__2;
|
||||
x_5 = l___private_Init_Util_1__mkPanicMessage(x_1, x_2, x_3, x_4);
|
||||
|
|
@ -1626,7 +1627,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_LocalDecl_value___closed__1;
|
||||
x_2 = lean_unsigned_to_nat(106u);
|
||||
x_2 = lean_unsigned_to_nat(107u);
|
||||
x_3 = lean_unsigned_to_nat(12u);
|
||||
x_4 = l_Lean_LocalContext_get_x21___closed__1;
|
||||
x_5 = l___private_Init_Util_1__mkPanicMessage(x_1, x_2, x_3, x_4);
|
||||
|
|
@ -3114,7 +3115,7 @@ x_4 = lean_box(x_3);
|
|||
return x_4;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_LocalContext_getUnusedNameAux___main(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
|
||||
lean_object* l___private_Init_Lean_LocalContext_2__getUnusedNameAux___main(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_4; uint8_t x_5;
|
||||
|
|
@ -3149,35 +3150,39 @@ goto _start;
|
|||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_LocalContext_getUnusedNameAux(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
|
||||
lean_object* l___private_Init_Lean_LocalContext_2__getUnusedNameAux(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_4;
|
||||
x_4 = l_Lean_LocalContext_getUnusedNameAux___main(x_1, x_2, x_3);
|
||||
x_4 = l___private_Init_Lean_LocalContext_2__getUnusedNameAux___main(x_1, x_2, x_3);
|
||||
return x_4;
|
||||
}
|
||||
}
|
||||
lean_object* lean_local_ctx_get_unused_name(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
uint8_t x_3;
|
||||
lean_inc(x_2);
|
||||
lean_object* x_3; lean_object* x_4; uint8_t x_5;
|
||||
x_3 = l_Lean_extractMacroScopes(x_2);
|
||||
x_4 = lean_ctor_get(x_3, 0);
|
||||
lean_inc(x_4);
|
||||
lean_dec(x_3);
|
||||
lean_inc(x_4);
|
||||
lean_inc(x_1);
|
||||
x_3 = lean_local_ctx_uses_user_name(x_1, x_2);
|
||||
if (x_3 == 0)
|
||||
x_5 = lean_local_ctx_uses_user_name(x_1, x_4);
|
||||
if (x_5 == 0)
|
||||
{
|
||||
lean_dec(x_1);
|
||||
return x_2;
|
||||
return x_4;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_4; lean_object* x_5; lean_object* x_6;
|
||||
x_4 = lean_unsigned_to_nat(1u);
|
||||
x_5 = l_Lean_LocalContext_getUnusedNameAux___main(x_1, x_2, x_4);
|
||||
x_6 = lean_ctor_get(x_5, 0);
|
||||
lean_inc(x_6);
|
||||
lean_dec(x_5);
|
||||
return x_6;
|
||||
lean_object* x_6; lean_object* x_7; lean_object* x_8;
|
||||
x_6 = lean_unsigned_to_nat(1u);
|
||||
x_7 = l___private_Init_Lean_LocalContext_2__getUnusedNameAux___main(x_1, x_4, x_6);
|
||||
x_8 = lean_ctor_get(x_7, 0);
|
||||
lean_inc(x_8);
|
||||
lean_dec(x_7);
|
||||
return x_8;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -5178,7 +5183,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_LocalDecl_value___closed__1;
|
||||
x_2 = lean_unsigned_to_nat(270u);
|
||||
x_2 = lean_unsigned_to_nat(272u);
|
||||
x_3 = lean_unsigned_to_nat(12u);
|
||||
x_4 = l_Lean_LocalContext_get_x21___closed__1;
|
||||
x_5 = l___private_Init_Util_1__mkPanicMessage(x_1, x_2, x_3, x_4);
|
||||
|
|
@ -7215,6 +7220,7 @@ return x_4;
|
|||
lean_object* initialize_Init_Data_PersistentArray_Basic(lean_object*);
|
||||
lean_object* initialize_Init_Data_PersistentHashMap_Basic(lean_object*);
|
||||
lean_object* initialize_Init_Lean_Expr(lean_object*);
|
||||
lean_object* initialize_Init_Lean_Hygiene(lean_object*);
|
||||
static bool _G_initialized = false;
|
||||
lean_object* initialize_Init_Lean_LocalContext(lean_object* w) {
|
||||
lean_object * res;
|
||||
|
|
@ -7229,6 +7235,9 @@ lean_dec_ref(res);
|
|||
res = initialize_Init_Lean_Expr(lean_io_mk_world());
|
||||
if (lean_io_result_is_error(res)) return res;
|
||||
lean_dec_ref(res);
|
||||
res = initialize_Init_Lean_Hygiene(lean_io_mk_world());
|
||||
if (lean_io_result_is_error(res)) return res;
|
||||
lean_dec_ref(res);
|
||||
l_Lean_LocalDecl_Inhabited___closed__1 = _init_l_Lean_LocalDecl_Inhabited___closed__1();
|
||||
lean_mark_persistent(l_Lean_LocalDecl_Inhabited___closed__1);
|
||||
l_Lean_LocalDecl_Inhabited = _init_l_Lean_LocalDecl_Inhabited();
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -18,6 +18,7 @@ lean_object* l_Lean_Meta_throwTacticEx(lean_object*);
|
|||
lean_object* l_Lean_Meta_checkNotAssigned___closed__3;
|
||||
extern lean_object* l___private_Init_Lean_Meta_Basic_10__regTraceClasses___closed__2;
|
||||
lean_object* l_Lean_Meta_checkNotAssigned___closed__1;
|
||||
lean_object* l_Lean_Meta_getMVarTag(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_checkNotAssigned___closed__2;
|
||||
lean_object* l_Lean_Meta_throwTacticEx___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_checkNotAssigned___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -35,6 +36,76 @@ lean_object* l_Lean_Meta_getMVarDecl(lean_object*, lean_object*, lean_object*);
|
|||
lean_object* l___private_Init_Lean_Meta_Tactic_Util_1__regTraceClasses___closed__1;
|
||||
lean_object* l___private_Init_Lean_Meta_Tactic_Util_1__regTraceClasses___closed__2;
|
||||
lean_object* l_Lean_Meta_mkFreshExprSyntheticOpaqueMVar(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_getMVarTag___boxed(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_getMVarTag(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_4;
|
||||
x_4 = l_Lean_Meta_getMVarDecl(x_1, x_2, x_3);
|
||||
if (lean_obj_tag(x_4) == 0)
|
||||
{
|
||||
uint8_t x_5;
|
||||
x_5 = !lean_is_exclusive(x_4);
|
||||
if (x_5 == 0)
|
||||
{
|
||||
lean_object* x_6; lean_object* x_7;
|
||||
x_6 = lean_ctor_get(x_4, 0);
|
||||
x_7 = lean_ctor_get(x_6, 0);
|
||||
lean_inc(x_7);
|
||||
lean_dec(x_6);
|
||||
lean_ctor_set(x_4, 0, x_7);
|
||||
return x_4;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11;
|
||||
x_8 = lean_ctor_get(x_4, 0);
|
||||
x_9 = lean_ctor_get(x_4, 1);
|
||||
lean_inc(x_9);
|
||||
lean_inc(x_8);
|
||||
lean_dec(x_4);
|
||||
x_10 = lean_ctor_get(x_8, 0);
|
||||
lean_inc(x_10);
|
||||
lean_dec(x_8);
|
||||
x_11 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_11, 0, x_10);
|
||||
lean_ctor_set(x_11, 1, x_9);
|
||||
return x_11;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_12;
|
||||
x_12 = !lean_is_exclusive(x_4);
|
||||
if (x_12 == 0)
|
||||
{
|
||||
return x_4;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_13; lean_object* x_14; lean_object* x_15;
|
||||
x_13 = lean_ctor_get(x_4, 0);
|
||||
x_14 = lean_ctor_get(x_4, 1);
|
||||
lean_inc(x_14);
|
||||
lean_inc(x_13);
|
||||
lean_dec(x_4);
|
||||
x_15 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_15, 0, x_13);
|
||||
lean_ctor_set(x_15, 1, x_14);
|
||||
return x_15;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Meta_getMVarTag___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_4;
|
||||
x_4 = l_Lean_Meta_getMVarTag(x_1, x_2, x_3);
|
||||
lean_dec(x_2);
|
||||
return x_4;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Meta_mkFreshExprSyntheticOpaqueMVar(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ lean_object* l_Lean_Parser_Term_tacticStxQuot___elambda__1___closed__4;
|
|||
extern lean_object* l_Lean_Parser_manyAux___main___closed__1;
|
||||
extern lean_object* l_Lean_Parser_declareLeadingBuiltinParser___closed__1;
|
||||
lean_object* l_Lean_Parser_Term_tacticStxQuot___closed__5;
|
||||
lean_object* l_Lean_Parser_Tactic_case___closed__6;
|
||||
lean_object* l_Lean_Parser_andthenInfo(lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_Parser_Term_have___elambda__1___closed__7;
|
||||
lean_object* l_Lean_Parser_Tactic_apply___closed__2;
|
||||
|
|
@ -101,9 +102,11 @@ lean_object* l_Lean_Parser_Tactic_ident_x27___elambda__1(lean_object*, lean_obje
|
|||
lean_object* l_Lean_Parser_Tactic_refine___elambda__1___closed__4;
|
||||
lean_object* l_Lean_Parser_Tactic_intros___closed__3;
|
||||
lean_object* l_Lean_Parser_Tactic_apply___closed__5;
|
||||
lean_object* l_Lean_Parser_Tactic_case___elambda__1___closed__3;
|
||||
lean_object* l_Lean_Parser_Tactic_assumption___closed__4;
|
||||
lean_object* l_Lean_Parser_Tactic_intros___closed__6;
|
||||
lean_object* l_Lean_Parser_tacticParser(uint8_t, lean_object*);
|
||||
lean_object* l_Lean_Parser_Tactic_case___closed__4;
|
||||
lean_object* l_Lean_Parser_regBuiltinTacticParserAttr___closed__2;
|
||||
lean_object* l_Lean_Parser_Tactic_nestedTacticBlock___elambda__1___closed__13;
|
||||
lean_object* l_Lean_Parser_Tactic_refine___elambda__1___closed__6;
|
||||
|
|
@ -118,6 +121,8 @@ extern lean_object* l_Lean_Parser_Term_structInst___elambda__1___closed__5;
|
|||
lean_object* l_Lean_Parser_Tactic_refine___elambda__1___closed__3;
|
||||
extern lean_object* l_Lean_Parser_identNoAntiquot___closed__1;
|
||||
lean_object* l_Lean_Parser_Tactic_assumption___elambda__1___closed__4;
|
||||
lean_object* l_Lean_Parser_Tactic_case___elambda__1(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Parser_Tactic_case;
|
||||
uint8_t lean_nat_dec_eq(lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_Parser_Term_orelse___elambda__1___closed__3;
|
||||
lean_object* l_Lean_Parser_nonReservedSymbolFnAux(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -125,9 +130,11 @@ extern lean_object* l_Lean_Name_appendIndexAfter___closed__1;
|
|||
lean_object* l_Lean_Parser_Tactic_refine___closed__3;
|
||||
lean_object* l_Lean_Parser_Tactic_nestedTacticBlock___closed__1;
|
||||
lean_object* l_Lean_Parser_Term_tacticStxQuot___closed__1;
|
||||
lean_object* l___regBuiltinParser_Lean_Parser_Tactic_case(lean_object*);
|
||||
lean_object* l_Lean_Parser_Tactic_seq___closed__5;
|
||||
lean_object* l_Lean_Parser_Tactic_ident_x27___closed__2;
|
||||
lean_object* l_Lean_Parser_Tactic_refine___elambda__1___closed__5;
|
||||
lean_object* l_Lean_Parser_Tactic_case___elambda__1___closed__5;
|
||||
lean_object* l_Lean_Parser_nodeInfo(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Parser_Tactic_seq___closed__3;
|
||||
lean_object* l_Lean_Parser_Tactic_assumption___closed__1;
|
||||
|
|
@ -198,13 +205,16 @@ lean_object* l_Array_back___at___private_Init_Lean_Parser_Parser_6__updateCache_
|
|||
lean_object* l_Lean_Parser_ParserState_restore(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Parser_Term_tacticStxQuot___elambda__1___closed__7;
|
||||
lean_object* l_Lean_Parser_ParserState_popSyntax(lean_object*);
|
||||
lean_object* l_Lean_Parser_Tactic_case___elambda__1___closed__1;
|
||||
extern lean_object* l_Lean_Parser_Level_paren___closed__4;
|
||||
lean_object* l___regBuiltinParser_Lean_Parser_Term_tacticStxQuot___closed__1;
|
||||
extern lean_object* l_Lean_Parser_Term_seq___elambda__1___closed__1;
|
||||
lean_object* l_Lean_Parser_Tactic_intros___elambda__1___closed__1;
|
||||
extern lean_object* l_Lean_Parser_Term_explicitUniv___elambda__1___closed__9;
|
||||
lean_object* l_Lean_Parser_Tactic_case___closed__5;
|
||||
lean_object* l_Lean_Parser_Tactic_orelse___elambda__1___closed__2;
|
||||
lean_object* l_Lean_Parser_Tactic_orelse;
|
||||
lean_object* l_Lean_Parser_Tactic_case___elambda__1___closed__2;
|
||||
lean_object* l_Lean_Parser_manyAux___main___at_Lean_Parser_Tactic_intros___elambda__1___spec__1(uint8_t, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Parser_categoryParserFn(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Parser_Tactic_intros___closed__4;
|
||||
|
|
@ -214,17 +224,20 @@ lean_object* l_Lean_Parser_sepBy1Fn___at_Lean_Parser_Term_tacticStxQuot___elambd
|
|||
lean_object* l_Lean_Parser_Tactic_apply___elambda__1___closed__5;
|
||||
extern lean_object* l_Lean_Parser_regBuiltinTermParserAttr___closed__4;
|
||||
lean_object* l_Lean_Parser_Tactic_underscoreFn(uint8_t, lean_object*);
|
||||
lean_object* l_Lean_Parser_Tactic_case___elambda__1___closed__4;
|
||||
lean_object* l_Lean_Parser_Tactic_refine___closed__1;
|
||||
lean_object* l_Lean_Parser_Tactic_nestedTacticBlock___closed__2;
|
||||
lean_object* l_Lean_Parser_Tactic_refine___closed__2;
|
||||
lean_object* l___regBuiltinParser_Lean_Parser_Tactic_exact(lean_object*);
|
||||
lean_object* l_Lean_Parser_Tactic_assumption___elambda__1___closed__1;
|
||||
lean_object* l_Lean_Parser_Tactic_case___closed__3;
|
||||
lean_object* l_Lean_Parser_Tactic_underscoreFn___rarg___closed__3;
|
||||
lean_object* l_Lean_Parser_mergeOrElseErrors(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Parser_Tactic_refine___closed__4;
|
||||
lean_object* l_Lean_Parser_categoryParser(uint8_t, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Parser_Tactic_exact;
|
||||
lean_object* l_Lean_Parser_Tactic_intro___elambda__1___closed__4;
|
||||
lean_object* l_Lean_Parser_Tactic_case___closed__1;
|
||||
lean_object* l_Lean_Parser_regTacticParserAttribute(lean_object*);
|
||||
lean_object* l_Lean_Parser_symbolInfo(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Parser_Tactic_underscoreFn___rarg___closed__2;
|
||||
|
|
@ -233,10 +246,12 @@ extern lean_object* l_Lean_Parser_epsilonInfo;
|
|||
lean_object* l_Lean_Parser_Tactic_orelse___elambda__1___closed__1;
|
||||
lean_object* l_Lean_Parser_Tactic_nestedTacticBlockCurly___closed__4;
|
||||
lean_object* l_Lean_Parser_Tactic_assumption___closed__3;
|
||||
lean_object* l_Lean_Parser_Tactic_case___elambda__1___closed__7;
|
||||
lean_object* l_Lean_Parser_Term_tacticBlock___closed__4;
|
||||
lean_object* l_Lean_Parser_Term_tacticBlock___closed__1;
|
||||
lean_object* l_Lean_Parser_Tactic_nestedTacticBlock___closed__8;
|
||||
lean_object* l_Lean_Parser_Term_tacticBlock;
|
||||
lean_object* l_Lean_Parser_Tactic_case___closed__2;
|
||||
lean_object* l_Lean_Parser_Tactic_nestedTacticBlock___closed__4;
|
||||
lean_object* l_Lean_Parser_Tactic_intros___elambda__1___closed__6;
|
||||
lean_object* l_Lean_Parser_Tactic_nestedTacticBlockCurly___closed__3;
|
||||
|
|
@ -246,6 +261,7 @@ lean_object* l___private_Init_Lean_Parser_Parser_2__sepByFnAux___main___at_Lean_
|
|||
lean_object* l_Lean_Parser_Tactic_intros;
|
||||
lean_object* l_Lean_Parser_Tactic_nestedTacticBlockCurly___elambda__1___closed__3;
|
||||
lean_object* l_Lean_Parser_Tactic_nestedTacticBlockCurly___closed__5;
|
||||
lean_object* l_Lean_Parser_Tactic_case___closed__7;
|
||||
lean_object* l_Lean_Parser_Term_tacticStxQuot___elambda__1(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Parser_Tactic_exact___closed__4;
|
||||
lean_object* l_Lean_Parser_Tactic_exact___elambda__1___closed__2;
|
||||
|
|
@ -299,10 +315,12 @@ lean_object* l_Lean_Parser_Tactic_refine;
|
|||
extern lean_object* l_Lean_Parser_Term_orelse___elambda__1___closed__1;
|
||||
lean_object* l_Lean_Parser_Tactic_seq___elambda__1(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Parser_Tactic_assumption___elambda__1___closed__3;
|
||||
extern lean_object* l_Lean_ppGoal___closed__7;
|
||||
lean_object* l___regBuiltinParser_Lean_Parser_Tactic_refine(lean_object*);
|
||||
lean_object* l_Lean_Parser_Tactic_assumption___elambda__1___closed__5;
|
||||
lean_object* l_Lean_Parser_Tactic_nestedTacticBlock___elambda__1___closed__2;
|
||||
lean_object* l_Lean_Parser_sepBy1Fn___at_Lean_Parser_Term_tacticStxQuot___elambda__1___spec__1(uint8_t, uint8_t, uint8_t, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Parser_Tactic_case___elambda__1___closed__6;
|
||||
lean_object* l_Lean_Parser_Tactic_seq___closed__4;
|
||||
extern lean_object* l_Lean_Parser_Level_paren___closed__1;
|
||||
uint8_t lean_string_dec_eq(lean_object*, lean_object*);
|
||||
|
|
@ -2676,6 +2694,285 @@ x_6 = l_Lean_Parser_addBuiltinParser(x_2, x_3, x_4, x_5, x_1);
|
|||
return x_6;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_Lean_Parser_Tactic_case___elambda__1___closed__1() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_mk_string("case");
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_Lean_Parser_Tactic_case___elambda__1___closed__2() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
x_1 = l_Lean_Parser_Tactic_seq___elambda__1___closed__2;
|
||||
x_2 = l_Lean_Parser_Tactic_case___elambda__1___closed__1;
|
||||
x_3 = lean_name_mk_string(x_1, x_2);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_Lean_Parser_Tactic_case___elambda__1___closed__3() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2;
|
||||
x_1 = l_Lean_Parser_Tactic_case___elambda__1___closed__2;
|
||||
x_2 = lean_alloc_ctor(1, 1, 0);
|
||||
lean_ctor_set(x_2, 0, x_1);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_Lean_Parser_Tactic_case___elambda__1___closed__4() {
|
||||
_start:
|
||||
{
|
||||
uint8_t x_1; lean_object* x_2; lean_object* x_3; uint8_t x_4; lean_object* x_5;
|
||||
x_1 = 0;
|
||||
x_2 = l_Lean_Parser_Tactic_case___elambda__1___closed__1;
|
||||
x_3 = l_Lean_Parser_Tactic_case___elambda__1___closed__3;
|
||||
x_4 = 1;
|
||||
x_5 = l_Lean_Parser_mkAntiquot(x_1, x_2, x_3, x_4);
|
||||
return x_5;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_Lean_Parser_Tactic_case___elambda__1___closed__5() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2;
|
||||
x_1 = l_Lean_ppGoal___closed__7;
|
||||
x_2 = l_String_trim(x_1);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_Lean_Parser_Tactic_case___elambda__1___closed__6() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
x_1 = l_Char_HasRepr___closed__1;
|
||||
x_2 = l_Lean_Parser_Tactic_case___elambda__1___closed__5;
|
||||
x_3 = lean_string_append(x_1, x_2);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_Lean_Parser_Tactic_case___elambda__1___closed__7() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
x_1 = l_Lean_Parser_Tactic_case___elambda__1___closed__6;
|
||||
x_2 = l_Char_HasRepr___closed__1;
|
||||
x_3 = lean_string_append(x_1, x_2);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Parser_Tactic_case___elambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
|
||||
_start:
|
||||
{
|
||||
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* x_11; lean_object* x_12;
|
||||
x_4 = l_Lean_Parser_Level_ident___elambda__1___closed__4;
|
||||
x_5 = lean_ctor_get(x_4, 1);
|
||||
lean_inc(x_5);
|
||||
x_6 = l_Lean_Parser_Tactic_case___elambda__1___closed__4;
|
||||
x_7 = lean_ctor_get(x_6, 1);
|
||||
lean_inc(x_7);
|
||||
x_8 = lean_ctor_get(x_3, 0);
|
||||
lean_inc(x_8);
|
||||
x_9 = lean_array_get_size(x_8);
|
||||
lean_dec(x_8);
|
||||
x_10 = lean_ctor_get(x_3, 1);
|
||||
lean_inc(x_10);
|
||||
lean_inc(x_2);
|
||||
lean_inc(x_1);
|
||||
x_11 = lean_apply_3(x_7, x_1, x_2, x_3);
|
||||
x_12 = lean_ctor_get(x_11, 3);
|
||||
lean_inc(x_12);
|
||||
if (lean_obj_tag(x_12) == 0)
|
||||
{
|
||||
lean_dec(x_10);
|
||||
lean_dec(x_9);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
return x_11;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_13; lean_object* x_14; uint8_t x_15;
|
||||
x_13 = lean_ctor_get(x_12, 0);
|
||||
lean_inc(x_13);
|
||||
lean_dec(x_12);
|
||||
x_14 = lean_ctor_get(x_11, 1);
|
||||
lean_inc(x_14);
|
||||
x_15 = lean_nat_dec_eq(x_14, x_10);
|
||||
lean_dec(x_14);
|
||||
if (x_15 == 0)
|
||||
{
|
||||
lean_dec(x_13);
|
||||
lean_dec(x_10);
|
||||
lean_dec(x_9);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
return x_11;
|
||||
}
|
||||
else
|
||||
{
|
||||
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_inc(x_10);
|
||||
x_16 = l_Lean_Parser_ParserState_restore(x_11, x_9, x_10);
|
||||
lean_dec(x_9);
|
||||
x_17 = lean_ctor_get(x_16, 0);
|
||||
lean_inc(x_17);
|
||||
x_18 = lean_array_get_size(x_17);
|
||||
lean_dec(x_17);
|
||||
x_19 = l_Lean_Parser_Tactic_case___elambda__1___closed__5;
|
||||
x_20 = l_Lean_Parser_Tactic_case___elambda__1___closed__7;
|
||||
lean_inc(x_2);
|
||||
x_21 = l_Lean_Parser_nonReservedSymbolFnAux(x_19, x_20, x_2, x_16);
|
||||
x_22 = lean_ctor_get(x_21, 3);
|
||||
lean_inc(x_22);
|
||||
if (lean_obj_tag(x_22) == 0)
|
||||
{
|
||||
lean_object* x_23; lean_object* x_24;
|
||||
lean_inc(x_2);
|
||||
x_23 = lean_apply_3(x_5, x_1, x_2, x_21);
|
||||
x_24 = lean_ctor_get(x_23, 3);
|
||||
lean_inc(x_24);
|
||||
if (lean_obj_tag(x_24) == 0)
|
||||
{
|
||||
lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30;
|
||||
x_25 = l_Lean_Parser_regBuiltinTacticParserAttr___closed__4;
|
||||
x_26 = lean_unsigned_to_nat(0u);
|
||||
x_27 = l_Lean_Parser_categoryParserFn(x_25, x_26, x_2, x_23);
|
||||
x_28 = l_Lean_Parser_Tactic_case___elambda__1___closed__2;
|
||||
x_29 = l_Lean_Parser_ParserState_mkNode(x_27, x_28, x_18);
|
||||
x_30 = l_Lean_Parser_mergeOrElseErrors(x_29, x_13, x_10);
|
||||
lean_dec(x_10);
|
||||
return x_30;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_31; lean_object* x_32; lean_object* x_33;
|
||||
lean_dec(x_24);
|
||||
lean_dec(x_2);
|
||||
x_31 = l_Lean_Parser_Tactic_case___elambda__1___closed__2;
|
||||
x_32 = l_Lean_Parser_ParserState_mkNode(x_23, x_31, x_18);
|
||||
x_33 = l_Lean_Parser_mergeOrElseErrors(x_32, x_13, x_10);
|
||||
lean_dec(x_10);
|
||||
return x_33;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_34; lean_object* x_35; lean_object* x_36;
|
||||
lean_dec(x_22);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
x_34 = l_Lean_Parser_Tactic_case___elambda__1___closed__2;
|
||||
x_35 = l_Lean_Parser_ParserState_mkNode(x_21, x_34, x_18);
|
||||
x_36 = l_Lean_Parser_mergeOrElseErrors(x_35, x_13, x_10);
|
||||
lean_dec(x_10);
|
||||
return x_36;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_Lean_Parser_Tactic_case___closed__1() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; uint8_t x_2; lean_object* x_3;
|
||||
x_1 = l_Lean_Parser_Tactic_case___elambda__1___closed__5;
|
||||
x_2 = 0;
|
||||
x_3 = l_Lean_Parser_nonReservedSymbolInfo(x_1, x_2);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_Lean_Parser_Tactic_case___closed__2() {
|
||||
_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_Parser_Level_ident___elambda__1___closed__4;
|
||||
x_2 = lean_ctor_get(x_1, 0);
|
||||
lean_inc(x_2);
|
||||
x_3 = l_Lean_Parser_Tactic_seq___closed__1;
|
||||
x_4 = lean_ctor_get(x_3, 0);
|
||||
lean_inc(x_4);
|
||||
x_5 = l_Lean_Parser_andthenInfo(x_2, x_4);
|
||||
return x_5;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_Lean_Parser_Tactic_case___closed__3() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
x_1 = l_Lean_Parser_Tactic_case___closed__1;
|
||||
x_2 = l_Lean_Parser_Tactic_case___closed__2;
|
||||
x_3 = l_Lean_Parser_andthenInfo(x_1, x_2);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_Lean_Parser_Tactic_case___closed__4() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
x_1 = l_Lean_Parser_Tactic_case___elambda__1___closed__2;
|
||||
x_2 = l_Lean_Parser_Tactic_case___closed__3;
|
||||
x_3 = l_Lean_Parser_nodeInfo(x_1, x_2);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_Lean_Parser_Tactic_case___closed__5() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_1 = l_Lean_Parser_Tactic_case___elambda__1___closed__4;
|
||||
x_2 = lean_ctor_get(x_1, 0);
|
||||
lean_inc(x_2);
|
||||
x_3 = l_Lean_Parser_Tactic_case___closed__4;
|
||||
x_4 = l_Lean_Parser_orelseInfo(x_2, x_3);
|
||||
return x_4;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_Lean_Parser_Tactic_case___closed__6() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_alloc_closure((void*)(l_Lean_Parser_Tactic_case___elambda__1), 3, 0);
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_Lean_Parser_Tactic_case___closed__7() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
x_1 = l_Lean_Parser_Tactic_case___closed__5;
|
||||
x_2 = l_Lean_Parser_Tactic_case___closed__6;
|
||||
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* _init_l_Lean_Parser_Tactic_case() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = l_Lean_Parser_Tactic_case___closed__7;
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
lean_object* l___regBuiltinParser_Lean_Parser_Tactic_case(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
uint8_t x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6;
|
||||
x_2 = 0;
|
||||
x_3 = l_Lean_Parser_regBuiltinTacticParserAttr___closed__4;
|
||||
x_4 = l_Lean_Parser_Tactic_case___elambda__1___closed__2;
|
||||
x_5 = l_Lean_Parser_Tactic_case;
|
||||
x_6 = l_Lean_Parser_addBuiltinParser(x_2, x_3, x_4, x_5, x_1);
|
||||
return x_6;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_Lean_Parser_Tactic_nestedTacticBlock___elambda__1___closed__1() {
|
||||
_start:
|
||||
{
|
||||
|
|
@ -4719,6 +5016,39 @@ lean_mark_persistent(l_Lean_Parser_Tactic_refine);
|
|||
res = l___regBuiltinParser_Lean_Parser_Tactic_refine(lean_io_mk_world());
|
||||
if (lean_io_result_is_error(res)) return res;
|
||||
lean_dec_ref(res);
|
||||
l_Lean_Parser_Tactic_case___elambda__1___closed__1 = _init_l_Lean_Parser_Tactic_case___elambda__1___closed__1();
|
||||
lean_mark_persistent(l_Lean_Parser_Tactic_case___elambda__1___closed__1);
|
||||
l_Lean_Parser_Tactic_case___elambda__1___closed__2 = _init_l_Lean_Parser_Tactic_case___elambda__1___closed__2();
|
||||
lean_mark_persistent(l_Lean_Parser_Tactic_case___elambda__1___closed__2);
|
||||
l_Lean_Parser_Tactic_case___elambda__1___closed__3 = _init_l_Lean_Parser_Tactic_case___elambda__1___closed__3();
|
||||
lean_mark_persistent(l_Lean_Parser_Tactic_case___elambda__1___closed__3);
|
||||
l_Lean_Parser_Tactic_case___elambda__1___closed__4 = _init_l_Lean_Parser_Tactic_case___elambda__1___closed__4();
|
||||
lean_mark_persistent(l_Lean_Parser_Tactic_case___elambda__1___closed__4);
|
||||
l_Lean_Parser_Tactic_case___elambda__1___closed__5 = _init_l_Lean_Parser_Tactic_case___elambda__1___closed__5();
|
||||
lean_mark_persistent(l_Lean_Parser_Tactic_case___elambda__1___closed__5);
|
||||
l_Lean_Parser_Tactic_case___elambda__1___closed__6 = _init_l_Lean_Parser_Tactic_case___elambda__1___closed__6();
|
||||
lean_mark_persistent(l_Lean_Parser_Tactic_case___elambda__1___closed__6);
|
||||
l_Lean_Parser_Tactic_case___elambda__1___closed__7 = _init_l_Lean_Parser_Tactic_case___elambda__1___closed__7();
|
||||
lean_mark_persistent(l_Lean_Parser_Tactic_case___elambda__1___closed__7);
|
||||
l_Lean_Parser_Tactic_case___closed__1 = _init_l_Lean_Parser_Tactic_case___closed__1();
|
||||
lean_mark_persistent(l_Lean_Parser_Tactic_case___closed__1);
|
||||
l_Lean_Parser_Tactic_case___closed__2 = _init_l_Lean_Parser_Tactic_case___closed__2();
|
||||
lean_mark_persistent(l_Lean_Parser_Tactic_case___closed__2);
|
||||
l_Lean_Parser_Tactic_case___closed__3 = _init_l_Lean_Parser_Tactic_case___closed__3();
|
||||
lean_mark_persistent(l_Lean_Parser_Tactic_case___closed__3);
|
||||
l_Lean_Parser_Tactic_case___closed__4 = _init_l_Lean_Parser_Tactic_case___closed__4();
|
||||
lean_mark_persistent(l_Lean_Parser_Tactic_case___closed__4);
|
||||
l_Lean_Parser_Tactic_case___closed__5 = _init_l_Lean_Parser_Tactic_case___closed__5();
|
||||
lean_mark_persistent(l_Lean_Parser_Tactic_case___closed__5);
|
||||
l_Lean_Parser_Tactic_case___closed__6 = _init_l_Lean_Parser_Tactic_case___closed__6();
|
||||
lean_mark_persistent(l_Lean_Parser_Tactic_case___closed__6);
|
||||
l_Lean_Parser_Tactic_case___closed__7 = _init_l_Lean_Parser_Tactic_case___closed__7();
|
||||
lean_mark_persistent(l_Lean_Parser_Tactic_case___closed__7);
|
||||
l_Lean_Parser_Tactic_case = _init_l_Lean_Parser_Tactic_case();
|
||||
lean_mark_persistent(l_Lean_Parser_Tactic_case);
|
||||
res = l___regBuiltinParser_Lean_Parser_Tactic_case(lean_io_mk_world());
|
||||
if (lean_io_result_is_error(res)) return res;
|
||||
lean_dec_ref(res);
|
||||
l_Lean_Parser_Tactic_nestedTacticBlock___elambda__1___closed__1 = _init_l_Lean_Parser_Tactic_nestedTacticBlock___elambda__1___closed__1();
|
||||
lean_mark_persistent(l_Lean_Parser_Tactic_nestedTacticBlock___elambda__1___closed__1);
|
||||
l_Lean_Parser_Tactic_nestedTacticBlock___elambda__1___closed__2 = _init_l_Lean_Parser_Tactic_nestedTacticBlock___elambda__1___closed__2();
|
||||
|
|
|
|||
1472
stage0/stdlib/Init/Lean/Util/CollectMVars.c
Normal file
1472
stage0/stdlib/Init/Lean/Util/CollectMVars.c
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -49,6 +49,8 @@ lean_object* l_Lean_LocalContext_foldlM___at_Lean_ppGoal___spec__2(lean_object*,
|
|||
lean_object* l_Lean_Name_toStringWithSep___main(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_ppGoal___closed__3;
|
||||
lean_object* l_Array_iterateMAux___main___at_Lean_ppGoal___spec__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_ppGoal___closed__8;
|
||||
lean_object* l_Lean_ppGoal___closed__7;
|
||||
lean_object* l_Lean_ppGoal___closed__1;
|
||||
lean_object* l_Lean_Format_joinSep___main___at_Lean_ppGoal___spec__1(lean_object*, lean_object*);
|
||||
uint8_t lean_nat_dec_lt(lean_object*, lean_object*);
|
||||
|
|
@ -3927,6 +3929,24 @@ lean_ctor_set(x_2, 0, x_1);
|
|||
return x_2;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_Lean_ppGoal___closed__7() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_mk_string("case ");
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_Lean_ppGoal___closed__8() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2;
|
||||
x_1 = l_Lean_ppGoal___closed__7;
|
||||
x_2 = lean_alloc_ctor(2, 1, 0);
|
||||
lean_ctor_set(x_2, 0, x_1);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_ppGoal(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
|
||||
_start:
|
||||
{
|
||||
|
|
@ -3945,7 +3965,7 @@ return x_7;
|
|||
}
|
||||
else
|
||||
{
|
||||
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; uint8_t 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_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; uint8_t 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;
|
||||
x_8 = lean_ctor_get(x_6, 0);
|
||||
lean_inc(x_8);
|
||||
lean_dec(x_6);
|
||||
|
|
@ -3971,7 +3991,6 @@ lean_dec(x_12);
|
|||
x_16 = l_Lean_Format_isNil(x_15);
|
||||
x_17 = lean_ctor_get(x_8, 2);
|
||||
lean_inc(x_17);
|
||||
lean_dec(x_8);
|
||||
lean_inc(x_4);
|
||||
lean_inc(x_3);
|
||||
lean_inc(x_2);
|
||||
|
|
@ -3981,235 +4000,250 @@ x_19 = lean_unsigned_to_nat(2u);
|
|||
x_20 = lean_alloc_ctor(3, 2, 0);
|
||||
lean_ctor_set(x_20, 0, x_19);
|
||||
lean_ctor_set(x_20, 1, x_18);
|
||||
x_21 = lean_ctor_get(x_8, 0);
|
||||
lean_inc(x_21);
|
||||
lean_dec(x_8);
|
||||
if (x_16 == 0)
|
||||
{
|
||||
uint8_t x_61; lean_object* x_62; lean_object* x_63;
|
||||
x_61 = 0;
|
||||
x_62 = lean_box(1);
|
||||
x_63 = lean_alloc_ctor(4, 2, 1);
|
||||
lean_ctor_set(x_63, 0, x_15);
|
||||
lean_ctor_set(x_63, 1, x_62);
|
||||
lean_ctor_set_uint8(x_63, sizeof(void*)*2, x_61);
|
||||
uint8_t x_60; lean_object* x_61; lean_object* x_62;
|
||||
x_60 = 0;
|
||||
x_61 = lean_box(1);
|
||||
x_62 = lean_alloc_ctor(4, 2, 1);
|
||||
lean_ctor_set(x_62, 0, x_15);
|
||||
lean_ctor_set(x_62, 1, x_61);
|
||||
lean_ctor_set_uint8(x_62, sizeof(void*)*2, x_60);
|
||||
if (lean_obj_tag(x_13) == 0)
|
||||
{
|
||||
uint8_t x_64;
|
||||
lean_dec(x_14);
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_3);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
x_64 = l_Lean_Format_isNil(x_63);
|
||||
if (x_64 == 0)
|
||||
{
|
||||
lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70;
|
||||
x_65 = lean_alloc_ctor(4, 2, 1);
|
||||
lean_ctor_set(x_65, 0, x_63);
|
||||
lean_ctor_set(x_65, 1, x_62);
|
||||
lean_ctor_set_uint8(x_65, sizeof(void*)*2, x_61);
|
||||
x_66 = l_Lean_ppGoal___closed__6;
|
||||
x_67 = lean_alloc_ctor(4, 2, 1);
|
||||
lean_ctor_set(x_67, 0, x_65);
|
||||
lean_ctor_set(x_67, 1, x_66);
|
||||
lean_ctor_set_uint8(x_67, sizeof(void*)*2, x_61);
|
||||
x_68 = l_Lean_Format_flatten___main___closed__1;
|
||||
x_69 = lean_alloc_ctor(4, 2, 1);
|
||||
lean_ctor_set(x_69, 0, x_67);
|
||||
lean_ctor_set(x_69, 1, x_68);
|
||||
lean_ctor_set_uint8(x_69, sizeof(void*)*2, x_61);
|
||||
x_70 = lean_alloc_ctor(4, 2, 1);
|
||||
lean_ctor_set(x_70, 0, x_69);
|
||||
lean_ctor_set(x_70, 1, x_20);
|
||||
lean_ctor_set_uint8(x_70, sizeof(void*)*2, x_61);
|
||||
return x_70;
|
||||
x_22 = x_62;
|
||||
goto block_59;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75;
|
||||
x_71 = l_Lean_ppGoal___closed__6;
|
||||
x_72 = lean_alloc_ctor(4, 2, 1);
|
||||
lean_ctor_set(x_72, 0, x_63);
|
||||
lean_ctor_set(x_72, 1, x_71);
|
||||
lean_ctor_set_uint8(x_72, sizeof(void*)*2, x_61);
|
||||
x_73 = l_Lean_Format_flatten___main___closed__1;
|
||||
x_74 = lean_alloc_ctor(4, 2, 1);
|
||||
lean_ctor_set(x_74, 0, x_72);
|
||||
lean_ctor_set(x_74, 1, x_73);
|
||||
lean_ctor_set_uint8(x_74, sizeof(void*)*2, x_61);
|
||||
x_75 = lean_alloc_ctor(4, 2, 1);
|
||||
lean_ctor_set(x_75, 0, x_74);
|
||||
lean_ctor_set(x_75, 1, x_20);
|
||||
lean_ctor_set_uint8(x_75, sizeof(void*)*2, x_61);
|
||||
return x_75;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
x_21 = x_63;
|
||||
goto block_60;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (lean_obj_tag(x_13) == 0)
|
||||
{
|
||||
uint8_t x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81;
|
||||
lean_dec(x_14);
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_3);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
x_76 = 0;
|
||||
x_77 = l_Lean_ppGoal___closed__6;
|
||||
x_78 = lean_alloc_ctor(4, 2, 1);
|
||||
lean_ctor_set(x_78, 0, x_15);
|
||||
lean_ctor_set(x_78, 1, x_77);
|
||||
lean_ctor_set_uint8(x_78, sizeof(void*)*2, x_76);
|
||||
x_79 = l_Lean_Format_flatten___main___closed__1;
|
||||
x_80 = lean_alloc_ctor(4, 2, 1);
|
||||
lean_ctor_set(x_80, 0, x_78);
|
||||
lean_ctor_set(x_80, 1, x_79);
|
||||
lean_ctor_set_uint8(x_80, sizeof(void*)*2, x_76);
|
||||
x_81 = lean_alloc_ctor(4, 2, 1);
|
||||
lean_ctor_set(x_81, 0, x_80);
|
||||
lean_ctor_set(x_81, 1, x_20);
|
||||
lean_ctor_set_uint8(x_81, sizeof(void*)*2, x_76);
|
||||
return x_81;
|
||||
}
|
||||
else
|
||||
{
|
||||
x_21 = x_15;
|
||||
goto block_60;
|
||||
}
|
||||
}
|
||||
block_60:
|
||||
{
|
||||
if (lean_obj_tag(x_14) == 0)
|
||||
{
|
||||
uint8_t x_22;
|
||||
lean_dec(x_13);
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_3);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
x_22 = l_Lean_Format_isNil(x_21);
|
||||
if (x_22 == 0)
|
||||
{
|
||||
uint8_t x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30;
|
||||
x_23 = 0;
|
||||
x_24 = lean_box(1);
|
||||
x_25 = lean_alloc_ctor(4, 2, 1);
|
||||
lean_ctor_set(x_25, 0, x_21);
|
||||
lean_ctor_set(x_25, 1, x_24);
|
||||
lean_ctor_set_uint8(x_25, sizeof(void*)*2, x_23);
|
||||
x_26 = l_Lean_ppGoal___closed__6;
|
||||
x_27 = lean_alloc_ctor(4, 2, 1);
|
||||
lean_ctor_set(x_27, 0, x_25);
|
||||
lean_ctor_set(x_27, 1, x_26);
|
||||
lean_ctor_set_uint8(x_27, sizeof(void*)*2, x_23);
|
||||
x_28 = l_Lean_Format_flatten___main___closed__1;
|
||||
x_29 = lean_alloc_ctor(4, 2, 1);
|
||||
lean_ctor_set(x_29, 0, x_27);
|
||||
lean_ctor_set(x_29, 1, x_28);
|
||||
lean_ctor_set_uint8(x_29, sizeof(void*)*2, x_23);
|
||||
x_30 = lean_alloc_ctor(4, 2, 1);
|
||||
lean_ctor_set(x_30, 0, x_29);
|
||||
lean_ctor_set(x_30, 1, x_20);
|
||||
lean_ctor_set_uint8(x_30, sizeof(void*)*2, x_23);
|
||||
return x_30;
|
||||
x_22 = x_62;
|
||||
goto block_59;
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36;
|
||||
x_31 = 0;
|
||||
x_32 = l_Lean_ppGoal___closed__6;
|
||||
x_33 = lean_alloc_ctor(4, 2, 1);
|
||||
lean_ctor_set(x_33, 0, x_21);
|
||||
lean_ctor_set(x_33, 1, x_32);
|
||||
lean_ctor_set_uint8(x_33, sizeof(void*)*2, x_31);
|
||||
x_34 = l_Lean_Format_flatten___main___closed__1;
|
||||
x_35 = lean_alloc_ctor(4, 2, 1);
|
||||
lean_ctor_set(x_35, 0, x_33);
|
||||
lean_ctor_set(x_35, 1, x_34);
|
||||
lean_ctor_set_uint8(x_35, sizeof(void*)*2, x_31);
|
||||
x_36 = lean_alloc_ctor(4, 2, 1);
|
||||
lean_ctor_set(x_36, 0, x_35);
|
||||
lean_ctor_set(x_36, 1, x_20);
|
||||
lean_ctor_set_uint8(x_36, sizeof(void*)*2, x_31);
|
||||
return x_36;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_37; lean_object* x_38; lean_object* x_39; uint8_t x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; uint8_t x_50;
|
||||
x_37 = lean_ctor_get(x_14, 0);
|
||||
lean_inc(x_37);
|
||||
lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73;
|
||||
x_63 = lean_ctor_get(x_14, 0);
|
||||
lean_inc(x_63);
|
||||
lean_dec(x_14);
|
||||
x_38 = l_Lean_Format_flatten___main___closed__1;
|
||||
x_39 = l_Lean_Format_joinSep___main___at_Lean_ppGoal___spec__1(x_13, x_38);
|
||||
x_40 = 0;
|
||||
x_41 = l_Array_iterateMAux___main___at_Lean_ppGoal___spec__6___closed__2;
|
||||
x_42 = lean_alloc_ctor(4, 2, 1);
|
||||
lean_ctor_set(x_42, 0, x_39);
|
||||
lean_ctor_set(x_42, 1, x_41);
|
||||
lean_ctor_set_uint8(x_42, sizeof(void*)*2, x_40);
|
||||
x_43 = l_Lean_ppExpr(x_1, x_2, x_3, x_4, x_37);
|
||||
x_44 = lean_box(1);
|
||||
x_45 = lean_alloc_ctor(4, 2, 1);
|
||||
lean_ctor_set(x_45, 0, x_44);
|
||||
lean_ctor_set(x_45, 1, x_43);
|
||||
lean_ctor_set_uint8(x_45, sizeof(void*)*2, x_40);
|
||||
x_46 = lean_alloc_ctor(3, 2, 0);
|
||||
lean_ctor_set(x_46, 0, x_19);
|
||||
lean_ctor_set(x_46, 1, x_45);
|
||||
x_47 = lean_alloc_ctor(4, 2, 1);
|
||||
lean_ctor_set(x_47, 0, x_42);
|
||||
lean_ctor_set(x_47, 1, x_46);
|
||||
lean_ctor_set_uint8(x_47, sizeof(void*)*2, x_40);
|
||||
x_48 = lean_format_group(x_47);
|
||||
x_49 = lean_alloc_ctor(4, 2, 1);
|
||||
lean_ctor_set(x_49, 0, x_21);
|
||||
lean_ctor_set(x_49, 1, x_48);
|
||||
lean_ctor_set_uint8(x_49, sizeof(void*)*2, x_40);
|
||||
x_50 = l_Lean_Format_isNil(x_49);
|
||||
if (x_50 == 0)
|
||||
{
|
||||
lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55;
|
||||
x_51 = lean_alloc_ctor(4, 2, 1);
|
||||
lean_ctor_set(x_51, 0, x_49);
|
||||
lean_ctor_set(x_51, 1, x_44);
|
||||
lean_ctor_set_uint8(x_51, sizeof(void*)*2, x_40);
|
||||
x_52 = l_Lean_ppGoal___closed__6;
|
||||
x_53 = lean_alloc_ctor(4, 2, 1);
|
||||
lean_ctor_set(x_53, 0, x_51);
|
||||
lean_ctor_set(x_53, 1, x_52);
|
||||
lean_ctor_set_uint8(x_53, sizeof(void*)*2, x_40);
|
||||
x_54 = lean_alloc_ctor(4, 2, 1);
|
||||
lean_ctor_set(x_54, 0, x_53);
|
||||
lean_ctor_set(x_54, 1, x_38);
|
||||
lean_ctor_set_uint8(x_54, sizeof(void*)*2, x_40);
|
||||
x_55 = lean_alloc_ctor(4, 2, 1);
|
||||
lean_ctor_set(x_55, 0, x_54);
|
||||
lean_ctor_set(x_55, 1, x_20);
|
||||
lean_ctor_set_uint8(x_55, sizeof(void*)*2, x_40);
|
||||
return x_55;
|
||||
x_64 = l_Lean_Format_flatten___main___closed__1;
|
||||
x_65 = l_Lean_Format_joinSep___main___at_Lean_ppGoal___spec__1(x_13, x_64);
|
||||
x_66 = l_Array_iterateMAux___main___at_Lean_ppGoal___spec__6___closed__2;
|
||||
x_67 = lean_alloc_ctor(4, 2, 1);
|
||||
lean_ctor_set(x_67, 0, x_65);
|
||||
lean_ctor_set(x_67, 1, x_66);
|
||||
lean_ctor_set_uint8(x_67, sizeof(void*)*2, x_60);
|
||||
x_68 = l_Lean_ppExpr(x_1, x_2, x_3, x_4, x_63);
|
||||
x_69 = lean_alloc_ctor(4, 2, 1);
|
||||
lean_ctor_set(x_69, 0, x_61);
|
||||
lean_ctor_set(x_69, 1, x_68);
|
||||
lean_ctor_set_uint8(x_69, sizeof(void*)*2, x_60);
|
||||
x_70 = lean_alloc_ctor(3, 2, 0);
|
||||
lean_ctor_set(x_70, 0, x_19);
|
||||
lean_ctor_set(x_70, 1, x_69);
|
||||
x_71 = lean_alloc_ctor(4, 2, 1);
|
||||
lean_ctor_set(x_71, 0, x_67);
|
||||
lean_ctor_set(x_71, 1, x_70);
|
||||
lean_ctor_set_uint8(x_71, sizeof(void*)*2, x_60);
|
||||
x_72 = lean_format_group(x_71);
|
||||
x_73 = lean_alloc_ctor(4, 2, 1);
|
||||
lean_ctor_set(x_73, 0, x_62);
|
||||
lean_ctor_set(x_73, 1, x_72);
|
||||
lean_ctor_set_uint8(x_73, sizeof(void*)*2, x_60);
|
||||
x_22 = x_73;
|
||||
goto block_59;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59;
|
||||
x_56 = l_Lean_ppGoal___closed__6;
|
||||
x_57 = lean_alloc_ctor(4, 2, 1);
|
||||
lean_ctor_set(x_57, 0, x_49);
|
||||
lean_ctor_set(x_57, 1, x_56);
|
||||
lean_ctor_set_uint8(x_57, sizeof(void*)*2, x_40);
|
||||
x_58 = lean_alloc_ctor(4, 2, 1);
|
||||
lean_ctor_set(x_58, 0, x_57);
|
||||
lean_ctor_set(x_58, 1, x_38);
|
||||
lean_ctor_set_uint8(x_58, sizeof(void*)*2, x_40);
|
||||
x_59 = lean_alloc_ctor(4, 2, 1);
|
||||
lean_ctor_set(x_59, 0, x_58);
|
||||
lean_ctor_set(x_59, 1, x_20);
|
||||
lean_ctor_set_uint8(x_59, sizeof(void*)*2, x_40);
|
||||
return x_59;
|
||||
if (lean_obj_tag(x_13) == 0)
|
||||
{
|
||||
lean_dec(x_14);
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_3);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
x_22 = x_15;
|
||||
goto block_59;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (lean_obj_tag(x_14) == 0)
|
||||
{
|
||||
lean_dec(x_13);
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_3);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
x_22 = x_15;
|
||||
goto block_59;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_74; lean_object* x_75; lean_object* x_76; uint8_t x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86;
|
||||
x_74 = lean_ctor_get(x_14, 0);
|
||||
lean_inc(x_74);
|
||||
lean_dec(x_14);
|
||||
x_75 = l_Lean_Format_flatten___main___closed__1;
|
||||
x_76 = l_Lean_Format_joinSep___main___at_Lean_ppGoal___spec__1(x_13, x_75);
|
||||
x_77 = 0;
|
||||
x_78 = l_Array_iterateMAux___main___at_Lean_ppGoal___spec__6___closed__2;
|
||||
x_79 = lean_alloc_ctor(4, 2, 1);
|
||||
lean_ctor_set(x_79, 0, x_76);
|
||||
lean_ctor_set(x_79, 1, x_78);
|
||||
lean_ctor_set_uint8(x_79, sizeof(void*)*2, x_77);
|
||||
x_80 = l_Lean_ppExpr(x_1, x_2, x_3, x_4, x_74);
|
||||
x_81 = lean_box(1);
|
||||
x_82 = lean_alloc_ctor(4, 2, 1);
|
||||
lean_ctor_set(x_82, 0, x_81);
|
||||
lean_ctor_set(x_82, 1, x_80);
|
||||
lean_ctor_set_uint8(x_82, sizeof(void*)*2, x_77);
|
||||
x_83 = lean_alloc_ctor(3, 2, 0);
|
||||
lean_ctor_set(x_83, 0, x_19);
|
||||
lean_ctor_set(x_83, 1, x_82);
|
||||
x_84 = lean_alloc_ctor(4, 2, 1);
|
||||
lean_ctor_set(x_84, 0, x_79);
|
||||
lean_ctor_set(x_84, 1, x_83);
|
||||
lean_ctor_set_uint8(x_84, sizeof(void*)*2, x_77);
|
||||
x_85 = lean_format_group(x_84);
|
||||
x_86 = lean_alloc_ctor(4, 2, 1);
|
||||
lean_ctor_set(x_86, 0, x_15);
|
||||
lean_ctor_set(x_86, 1, x_85);
|
||||
lean_ctor_set_uint8(x_86, sizeof(void*)*2, x_77);
|
||||
x_22 = x_86;
|
||||
goto block_59;
|
||||
}
|
||||
}
|
||||
}
|
||||
block_59:
|
||||
{
|
||||
uint8_t x_23;
|
||||
x_23 = l_Lean_Format_isNil(x_22);
|
||||
if (x_23 == 0)
|
||||
{
|
||||
uint8_t x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32;
|
||||
x_24 = 0;
|
||||
x_25 = lean_box(1);
|
||||
x_26 = lean_alloc_ctor(4, 2, 1);
|
||||
lean_ctor_set(x_26, 0, x_22);
|
||||
lean_ctor_set(x_26, 1, x_25);
|
||||
lean_ctor_set_uint8(x_26, sizeof(void*)*2, x_24);
|
||||
x_27 = l_Lean_ppGoal___closed__6;
|
||||
x_28 = lean_alloc_ctor(4, 2, 1);
|
||||
lean_ctor_set(x_28, 0, x_26);
|
||||
lean_ctor_set(x_28, 1, x_27);
|
||||
lean_ctor_set_uint8(x_28, sizeof(void*)*2, x_24);
|
||||
x_29 = l_Lean_Format_flatten___main___closed__1;
|
||||
x_30 = lean_alloc_ctor(4, 2, 1);
|
||||
lean_ctor_set(x_30, 0, x_28);
|
||||
lean_ctor_set(x_30, 1, x_29);
|
||||
lean_ctor_set_uint8(x_30, sizeof(void*)*2, x_24);
|
||||
x_31 = lean_alloc_ctor(4, 2, 1);
|
||||
lean_ctor_set(x_31, 0, x_30);
|
||||
lean_ctor_set(x_31, 1, x_20);
|
||||
lean_ctor_set_uint8(x_31, sizeof(void*)*2, x_24);
|
||||
if (lean_obj_tag(x_21) == 0)
|
||||
{
|
||||
return x_31;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_41;
|
||||
x_41 = lean_box(0);
|
||||
x_32 = x_41;
|
||||
goto block_40;
|
||||
}
|
||||
block_40:
|
||||
{
|
||||
lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39;
|
||||
lean_dec(x_32);
|
||||
x_33 = l_Lean_Name_toString___closed__1;
|
||||
x_34 = l_Lean_Name_toStringWithSep___main(x_33, x_21);
|
||||
x_35 = lean_alloc_ctor(2, 1, 0);
|
||||
lean_ctor_set(x_35, 0, x_34);
|
||||
x_36 = l_Lean_ppGoal___closed__8;
|
||||
x_37 = lean_alloc_ctor(4, 2, 1);
|
||||
lean_ctor_set(x_37, 0, x_36);
|
||||
lean_ctor_set(x_37, 1, x_35);
|
||||
lean_ctor_set_uint8(x_37, sizeof(void*)*2, x_24);
|
||||
x_38 = lean_alloc_ctor(4, 2, 1);
|
||||
lean_ctor_set(x_38, 0, x_37);
|
||||
lean_ctor_set(x_38, 1, x_25);
|
||||
lean_ctor_set_uint8(x_38, sizeof(void*)*2, x_24);
|
||||
x_39 = lean_alloc_ctor(4, 2, 1);
|
||||
lean_ctor_set(x_39, 0, x_38);
|
||||
lean_ctor_set(x_39, 1, x_31);
|
||||
lean_ctor_set_uint8(x_39, sizeof(void*)*2, x_24);
|
||||
return x_39;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48;
|
||||
x_42 = 0;
|
||||
x_43 = l_Lean_ppGoal___closed__6;
|
||||
x_44 = lean_alloc_ctor(4, 2, 1);
|
||||
lean_ctor_set(x_44, 0, x_22);
|
||||
lean_ctor_set(x_44, 1, x_43);
|
||||
lean_ctor_set_uint8(x_44, sizeof(void*)*2, x_42);
|
||||
x_45 = l_Lean_Format_flatten___main___closed__1;
|
||||
x_46 = lean_alloc_ctor(4, 2, 1);
|
||||
lean_ctor_set(x_46, 0, x_44);
|
||||
lean_ctor_set(x_46, 1, x_45);
|
||||
lean_ctor_set_uint8(x_46, sizeof(void*)*2, x_42);
|
||||
x_47 = lean_alloc_ctor(4, 2, 1);
|
||||
lean_ctor_set(x_47, 0, x_46);
|
||||
lean_ctor_set(x_47, 1, x_20);
|
||||
lean_ctor_set_uint8(x_47, sizeof(void*)*2, x_42);
|
||||
if (lean_obj_tag(x_21) == 0)
|
||||
{
|
||||
return x_47;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_58;
|
||||
x_58 = lean_box(0);
|
||||
x_48 = x_58;
|
||||
goto block_57;
|
||||
}
|
||||
block_57:
|
||||
{
|
||||
lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56;
|
||||
lean_dec(x_48);
|
||||
x_49 = l_Lean_Name_toString___closed__1;
|
||||
x_50 = l_Lean_Name_toStringWithSep___main(x_49, x_21);
|
||||
x_51 = lean_alloc_ctor(2, 1, 0);
|
||||
lean_ctor_set(x_51, 0, x_50);
|
||||
x_52 = l_Lean_ppGoal___closed__8;
|
||||
x_53 = lean_alloc_ctor(4, 2, 1);
|
||||
lean_ctor_set(x_53, 0, x_52);
|
||||
lean_ctor_set(x_53, 1, x_51);
|
||||
lean_ctor_set_uint8(x_53, sizeof(void*)*2, x_42);
|
||||
x_54 = lean_box(1);
|
||||
x_55 = lean_alloc_ctor(4, 2, 1);
|
||||
lean_ctor_set(x_55, 0, x_53);
|
||||
lean_ctor_set(x_55, 1, x_54);
|
||||
lean_ctor_set_uint8(x_55, sizeof(void*)*2, x_42);
|
||||
x_56 = lean_alloc_ctor(4, 2, 1);
|
||||
lean_ctor_set(x_56, 0, x_55);
|
||||
lean_ctor_set(x_56, 1, x_47);
|
||||
lean_ctor_set_uint8(x_56, sizeof(void*)*2, x_42);
|
||||
return x_56;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -4306,6 +4340,10 @@ l_Lean_ppGoal___closed__5 = _init_l_Lean_ppGoal___closed__5();
|
|||
lean_mark_persistent(l_Lean_ppGoal___closed__5);
|
||||
l_Lean_ppGoal___closed__6 = _init_l_Lean_ppGoal___closed__6();
|
||||
lean_mark_persistent(l_Lean_ppGoal___closed__6);
|
||||
l_Lean_ppGoal___closed__7 = _init_l_Lean_ppGoal___closed__7();
|
||||
lean_mark_persistent(l_Lean_ppGoal___closed__7);
|
||||
l_Lean_ppGoal___closed__8 = _init_l_Lean_ppGoal___closed__8();
|
||||
lean_mark_persistent(l_Lean_ppGoal___closed__8);
|
||||
return lean_mk_io_result(lean_box(0));
|
||||
}
|
||||
#ifdef __cplusplus
|
||||
|
|
|
|||
|
|
@ -98,6 +98,7 @@ lean_object* l___private_Init_Lean_Util_WHNF_4__getRecRuleFor___lambda__1___boxe
|
|||
lean_object* l_Lean_WHNF_whnfCore___main___rarg___lambda__7(lean_object*, lean_object*, lean_object*, 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_WHNF_whnfMain(lean_object*);
|
||||
lean_object* l_Lean_Syntax_mreplace___main___rarg___lambda__1(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_WHNF_whnfCore(lean_object*);
|
||||
uint8_t l_Lean_ConstantInfo_hasValue(lean_object*);
|
||||
lean_object* l_Lean_WHNF_whnfMain___main___boxed(lean_object*);
|
||||
|
|
@ -110,7 +111,6 @@ uint8_t l_Lean_Expr_isConstOf(lean_object*, lean_object*);
|
|||
lean_object* l_Lean_WHNF_unfoldDefinitionAux___rarg___lambda__4___boxed(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Init_Lean_Expr_3__getAppArgsAux___main(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Init_Lean_Util_WHNF_2__mkNullaryCtor___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_WHNF_reduceRec___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*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_WHNF_whnfCore___main___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_WHNF_smartUnfoldingSuffix;
|
||||
lean_object* l_Lean_WHNF_reduceQuotRec___boxed(lean_object*, lean_object*);
|
||||
|
|
@ -186,7 +186,7 @@ lean_object* l___private_Init_Lean_Util_WHNF_10__whnfCoreUnstuck___main___rarg(l
|
|||
lean_object* l___private_Init_Lean_Util_WHNF_3__toCtorIfLit___closed__3;
|
||||
lean_object* l_Lean_mkConst(lean_object*, lean_object*);
|
||||
lean_object* l___private_Init_Lean_Util_WHNF_8__deltaDefinition___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_WHNF_reduceRec___rarg___lambda__2(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_WHNF_reduceRec___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* l_Lean_WHNF_reduceQuotRec___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_WHNF_whnfEasyCases___main___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Init_Lean_Util_WHNF_5__toCtorWhenK___rarg___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -1165,40 +1165,7 @@ return x_42;
|
|||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_WHNF_reduceRec___rarg___lambda__2(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
|
||||
_start:
|
||||
{
|
||||
if (lean_obj_tag(x_3) == 0)
|
||||
{
|
||||
lean_object* x_4; lean_object* x_5; lean_object* x_6;
|
||||
x_4 = lean_ctor_get(x_1, 0);
|
||||
lean_inc(x_4);
|
||||
lean_dec(x_1);
|
||||
x_5 = lean_ctor_get(x_4, 1);
|
||||
lean_inc(x_5);
|
||||
lean_dec(x_4);
|
||||
x_6 = lean_apply_2(x_5, lean_box(0), x_2);
|
||||
return x_6;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10;
|
||||
lean_dec(x_2);
|
||||
x_7 = lean_ctor_get(x_1, 0);
|
||||
lean_inc(x_7);
|
||||
lean_dec(x_1);
|
||||
x_8 = lean_ctor_get(x_7, 1);
|
||||
lean_inc(x_8);
|
||||
lean_dec(x_7);
|
||||
x_9 = lean_ctor_get(x_3, 0);
|
||||
lean_inc(x_9);
|
||||
lean_dec(x_3);
|
||||
x_10 = lean_apply_2(x_8, lean_box(0), x_9);
|
||||
return x_10;
|
||||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_WHNF_reduceRec___rarg___lambda__3(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* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14) {
|
||||
lean_object* l_Lean_WHNF_reduceRec___rarg___lambda__2(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* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14) {
|
||||
_start:
|
||||
{
|
||||
uint8_t x_15; lean_object* x_16;
|
||||
|
|
@ -1236,7 +1203,7 @@ lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24;
|
|||
lean_inc(x_14);
|
||||
lean_inc(x_8);
|
||||
x_21 = l___private_Init_Lean_Util_WHNF_5__toCtorWhenK___rarg(x_8, x_10, x_11, x_12, x_13, x_1, x_14);
|
||||
x_22 = lean_alloc_closure((void*)(l_Lean_WHNF_reduceRec___rarg___lambda__2), 3, 2);
|
||||
x_22 = lean_alloc_closure((void*)(l_Lean_Syntax_mreplace___main___rarg___lambda__1), 3, 2);
|
||||
lean_closure_set(x_22, 0, x_8);
|
||||
lean_closure_set(x_22, 1, x_14);
|
||||
lean_inc(x_9);
|
||||
|
|
@ -1280,7 +1247,7 @@ lean_inc(x_17);
|
|||
lean_inc(x_3);
|
||||
x_18 = lean_apply_1(x_3, x_16);
|
||||
lean_inc(x_17);
|
||||
x_19 = lean_alloc_closure((void*)(l_Lean_WHNF_reduceRec___rarg___lambda__3), 14, 13);
|
||||
x_19 = lean_alloc_closure((void*)(l_Lean_WHNF_reduceRec___rarg___lambda__2), 14, 13);
|
||||
lean_closure_set(x_19, 0, x_6);
|
||||
lean_closure_set(x_19, 1, x_9);
|
||||
lean_closure_set(x_19, 2, x_7);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue