chore: update stage0
This commit is contained in:
parent
f852606d13
commit
39ae400bab
16 changed files with 4117 additions and 1359 deletions
|
|
@ -83,8 +83,7 @@ withUsedWhen ref vars xs e dummyExpr cond k
|
|||
def mkDef (view : DefView) (declName : Name) (explictLevelNames : List Name) (vars : Array Expr) (xs : Array Expr) (type : Expr) (val : Expr)
|
||||
: TermElabM (Option Declaration) := do
|
||||
let ref := view.ref;
|
||||
valType ← Term.inferType view.val val;
|
||||
val ← Term.ensureHasType ref type valType val;
|
||||
val ← Term.ensureHasType ref type val;
|
||||
Term.synthesizeSyntheticMVars false;
|
||||
type ← Term.instantiateMVars ref type;
|
||||
val ← Term.instantiateMVars view.val val;
|
||||
|
|
|
|||
|
|
@ -143,12 +143,16 @@ fun stx => do
|
|||
env ← liftIO stx $ Parser.registerParserCategory env attrName catName;
|
||||
setEnv env
|
||||
|
||||
def mkFreshKind (catName : Name) : CommandElabM Name := do
|
||||
env ← getEnv;
|
||||
let (env, kind) := Parser.mkFreshKind env catName;
|
||||
setEnv env;
|
||||
pure kind
|
||||
|
||||
|
||||
private def elabKind (stx : Syntax) (catName : Name) : CommandElabM Name := do
|
||||
if stx.isNone then do
|
||||
env ← getEnv;
|
||||
let (env, kind) := Parser.mkFreshKind env catName;
|
||||
setEnv env;
|
||||
pure kind
|
||||
if stx.isNone then
|
||||
mkFreshKind catName
|
||||
else do
|
||||
let kind := stx.getIdAt 1;
|
||||
currNamespace ← getCurrNamespace;
|
||||
|
|
@ -205,6 +209,11 @@ else if k == `Lean.Parser.Command.strLitPrec then
|
|||
else
|
||||
throwUnsupportedSyntax
|
||||
|
||||
def strLitPrecToPattern (stx: Syntax) : CommandElabM Syntax :=
|
||||
match (stx.getArg 0).isStrLit? with
|
||||
| some str => pure $ mkAtomFrom stx str
|
||||
| none => throwUnsupportedSyntax
|
||||
|
||||
/- Convert `notation` command lhs item a pattern element -/
|
||||
def expandNotationItemIntoPattern (stx : Syntax) : CommandElabM Syntax :=
|
||||
let k := stx.getKind;
|
||||
|
|
@ -214,30 +223,92 @@ if k == `Lean.Parser.Command.identPrec then
|
|||
else if k == `Lean.Parser.Command.quotedSymbolPrec then
|
||||
pure $ (stx.getArg 0).getArg 1
|
||||
else if k == `Lean.Parser.Command.strLitPrec then
|
||||
match (stx.getArg 0).isStrLit? with
|
||||
| some str => pure $ mkAtomFrom stx str
|
||||
| none => throwUnsupportedSyntax
|
||||
strLitPrecToPattern stx
|
||||
else
|
||||
throwUnsupportedSyntax
|
||||
|
||||
@[builtinCommandElab «notation»] def elabNotation : CommandElab :=
|
||||
adaptExpander $ fun stx => match_syntax stx with
|
||||
| `(notation $items* => $rhs) => do
|
||||
kind ← mkFreshKind `term;
|
||||
-- build parser
|
||||
syntaxParts ← items.mapM expandNotationItemIntoSyntaxItem;
|
||||
let cat := mkIdentFrom stx `term;
|
||||
-- build macro
|
||||
-- build macro rules
|
||||
let vars := items.filter $ fun item => item.getKind == `Lean.Parser.Command.identPrec;
|
||||
let vars := vars.map $ fun var => var.getArg 0;
|
||||
let rhs := antiquote vars rhs;
|
||||
patArgs ← items.mapM expandNotationItemIntoPattern;
|
||||
scp ← getCurrMacroScope;
|
||||
-- manually create hygienic kind name
|
||||
let kind := addMacroScope `myParser scp;
|
||||
let pat := Syntax.node kind patArgs;
|
||||
`(syntax [$(mkIdentFrom stx kind)] $syntaxParts* : $cat macro_rules | `($pat) => `($rhs))
|
||||
| _ => throwUnsupportedSyntax
|
||||
|
||||
/- Convert `macro` head into a `syntax` command item -/
|
||||
def expandMacroHeadIntoSyntaxItem (stx : Syntax) : CommandElabM Syntax :=
|
||||
let k := stx.getKind;
|
||||
if k == `Lean.Parser.Command.identPrec then
|
||||
let info := stx.getHeadInfo;
|
||||
let id := (stx.getArg 0).getId;
|
||||
pure $ Syntax.node `Lean.Parser.Syntax.atom #[mkStxStrLit (toString id) info, stx.getArg 1]
|
||||
else if k == `Lean.Parser.Command.strLitPrec then
|
||||
pure $ Syntax.node `Lean.Parser.Syntax.atom stx.getArgs
|
||||
else
|
||||
throwUnsupportedSyntax
|
||||
|
||||
/- Convert `macro` argument into a `syntax` command item -/
|
||||
def expandMacroArgIntoSyntaxItem (stx : Syntax) : CommandElabM Syntax :=
|
||||
let k := stx.getKind;
|
||||
if k == `Lean.Parser.Command.macroArgSimple then
|
||||
pure $ Syntax.node `Lean.Parser.Syntax.cat #[stx.getArg 2, stx.getArg 3]
|
||||
else if k == `Lean.Parser.Command.strLitPrec then
|
||||
pure $ Syntax.node `Lean.Parser.Syntax.atom stx.getArgs
|
||||
else
|
||||
throwUnsupportedSyntax
|
||||
|
||||
/- Convert `macro` head into a pattern element -/
|
||||
def expandMacroHeadIntoPattern (stx : Syntax) : CommandElabM Syntax :=
|
||||
let k := stx.getKind;
|
||||
if k == `Lean.Parser.Command.identPrec then
|
||||
let str := toString (stx.getArg 0).getId;
|
||||
pure $ mkAtomFrom stx str
|
||||
else if k == `Lean.Parser.Command.strLitPrec then
|
||||
strLitPrecToPattern stx
|
||||
else
|
||||
throwUnsupportedSyntax
|
||||
|
||||
/- Convert `macro` arg into a pattern element -/
|
||||
def expandMacroArgIntoPattern (stx : Syntax) : CommandElabM Syntax :=
|
||||
let k := stx.getKind;
|
||||
if k == `Lean.Parser.Command.macroArgSimple then
|
||||
let item := stx.getArg 0;
|
||||
pure $ mkNode `antiquot #[mkAtom "$", mkTermIdFromIdent item, mkNullNode, mkNullNode]
|
||||
else if k == `Lean.Parser.Command.strLitPrec then
|
||||
strLitPrecToPattern stx
|
||||
else
|
||||
throwUnsupportedSyntax
|
||||
|
||||
@[builtinCommandElab «macro»] def elabMacro : CommandElab :=
|
||||
adaptExpander $ fun stx => do
|
||||
let head := stx.getArg 1;
|
||||
let args := (stx.getArg 2).getArgs;
|
||||
let cat := stx.getArg 4;
|
||||
let rhsBody := stx.getArg 7;
|
||||
kind ← mkFreshKind cat.getId;
|
||||
-- build parser
|
||||
stxPart ← expandMacroHeadIntoSyntaxItem head;
|
||||
stxParts ← args.mapM expandMacroArgIntoSyntaxItem;
|
||||
let stxParts := #[stxPart] ++ stxParts;
|
||||
-- build macro rules
|
||||
patHead ← expandMacroHeadIntoPattern head;
|
||||
patArgs ← args.mapM expandMacroArgIntoPattern;
|
||||
let pat := Syntax.node kind (#[patHead] ++ patArgs);
|
||||
trace `Elab.syntax stx $ fun _ => pat;
|
||||
`(syntax [$(mkIdentFrom stx kind)] $stxParts* : $cat macro_rules | `($pat) => `($rhsBody))
|
||||
|
||||
@[init] private def regTraceClasses : IO Unit := do
|
||||
registerTraceClass `Elab.syntax;
|
||||
pure ()
|
||||
|
||||
end Command
|
||||
end Elab
|
||||
end Lean
|
||||
|
|
|
|||
|
|
@ -35,12 +35,16 @@ withMVarContext mvarId $ fun ctx s =>
|
|||
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 };
|
||||
unless remainingGoals.isEmpty (reportUnsolvedGoals ref remainingGoals);
|
||||
-- TODO: check unassigned metavariables in mvarId
|
||||
pure ()
|
||||
let tailRef := ref.getTailWithInfo.getD ref;
|
||||
unless remainingGoals.isEmpty (reportUnsolvedGoals tailRef remainingGoals);
|
||||
ensureAssignmentHasNoMVars tailRef mvarId
|
||||
|
||||
end Term
|
||||
|
||||
|
|
|
|||
|
|
@ -44,6 +44,9 @@ 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 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?
|
||||
|
||||
instance monadLog : MonadLog TacticM :=
|
||||
{ getCmdPos := do ctx ← read; pure ctx.cmdPos,
|
||||
|
|
@ -176,12 +179,18 @@ ctx ← read;
|
|||
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 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)
|
||||
|
||||
@[inline] def liftMetaTactic (ref : Syntax) (tactic : MVarId → MetaM (List MVarId)) : TacticM Unit := do
|
||||
s ← get;
|
||||
(g :: gs) ← pure s.goals | throwError ref "no goals to be solved";
|
||||
(g, gs) ← getMainGoal ref;
|
||||
withMVarContext g $ do
|
||||
gs' ← liftMetaM ref $ tactic g;
|
||||
modify $ fun s => { goals := gs' ++ gs, .. s }
|
||||
updateGoals (gs' ++ gs)
|
||||
|
||||
@[builtinTactic seq] def evalSeq : Tactic :=
|
||||
fun stx => (stx.getArg 0).forSepArgsM evalTactic
|
||||
|
|
@ -195,6 +204,21 @@ fun stx => match_syntax stx with
|
|||
| `(tactic| intro $h) => liftMetaTactic stx $ fun mvarId => do (_, mvarId) ← Meta.intro mvarId h.getId; pure [mvarId]
|
||||
| _ => throwUnsupportedSyntax
|
||||
|
||||
@[builtinTactic «exact»] def evalExact : Tactic :=
|
||||
fun stx => match_syntax stx with
|
||||
| `(tactic| exact $e) => do
|
||||
let ref := stx;
|
||||
(g, gs) ← getMainGoal stx;
|
||||
withMVarContext g $ do {
|
||||
decl ← getMVarDecl g;
|
||||
val ← elabTerm e decl.type;
|
||||
val ← ensureHasType ref decl.type val;
|
||||
ensureHasNoMVars ref val;
|
||||
assignExprMVar g val
|
||||
};
|
||||
updateGoals gs
|
||||
| _ => throwUnsupportedSyntax
|
||||
|
||||
@[init] private def regTraceClasses : IO Unit := do
|
||||
registerTraceClass `Elab.tactic;
|
||||
pure ()
|
||||
|
|
|
|||
|
|
@ -571,7 +571,7 @@ match expectedType? with
|
|||
/--
|
||||
If `expectedType?` is `some t`, then ensure `t` and `eType` are definitionally equal.
|
||||
If they are not, then try coercions. -/
|
||||
def ensureHasType (ref : Syntax) (expectedType? : Option Expr) (eType : Expr) (e : Expr) : TermElabM Expr := do
|
||||
def ensureHasTypeAux (ref : Syntax) (expectedType? : Option Expr) (eType : Expr) (e : Expr) : TermElabM Expr := do
|
||||
e? ← tryEnsureHasType? ref expectedType? eType e;
|
||||
match e? with
|
||||
| some e => pure e
|
||||
|
|
@ -582,6 +582,14 @@ match e? with
|
|||
++ Format.line ++ "but it is expected to have type" ++ indentExpr expectedType?.get!;
|
||||
throwError ref msg
|
||||
|
||||
/--
|
||||
If `expectedType?` is `some t`, then ensure `t` and type of `e` are definitionally equal.
|
||||
If they are not, then try coercions. -/
|
||||
def ensureHasType (ref : Syntax) (expectedType? : Option Expr) (e : Expr) : TermElabM Expr :=
|
||||
match expectedType? with
|
||||
| none => pure e
|
||||
| _ => do eType ← inferType ref e; ensureHasTypeAux ref expectedType? eType e
|
||||
|
||||
/- Try to synthesize metavariable using type class resolution.
|
||||
This method assumes the local context and local instances of `instMVar` coincide
|
||||
with the current local context and local instances.
|
||||
|
|
@ -667,8 +675,7 @@ fun stx expectedType? =>
|
|||
| `(($e : $type)) => do
|
||||
type ← elabType type;
|
||||
e ← elabCDot e type;
|
||||
eType ← inferType ref e;
|
||||
ensureHasType ref type eType e
|
||||
ensureHasType ref type e
|
||||
| `(($e)) => elabCDot e expectedType?
|
||||
| `(($e, $es*)) => do
|
||||
pairs ← mkPairs (#[e] ++ es.getEvenElems);
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ private partial def elabAppArgsAux (ref : Syntax) (args : Array Arg) (expectedTy
|
|||
| argIdx, namedArgs, instMVars, eType, e => do
|
||||
let finalize : Unit → TermElabM Expr := fun _ => do {
|
||||
-- all user explicit arguments have been consumed
|
||||
e ← ensureHasType ref expectedType? eType e;
|
||||
e ← ensureHasTypeAux ref expectedType? eType e;
|
||||
synthesizeAppInstMVars ref instMVars;
|
||||
pure e
|
||||
};
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ def namedPattern := checkNoWsBefore "no space before '@'" >> parser! "@" >> term
|
|||
@[builtinTermParser] def sort := parser! symbol "Sort" appPrec
|
||||
@[builtinTermParser] def prop := parser! symbol "Prop" appPrec
|
||||
@[builtinTermParser] def hole := parser! symbol "_" appPrec
|
||||
@[builtinTermParser] def namedHole := parser! symbol "?" appPrec >> ident
|
||||
@[builtinTermParser] def «sorry» := parser! symbol "sorry" appPrec
|
||||
@[builtinTermParser] def cdot := parser! symbol "·" appPrec
|
||||
@[builtinTermParser] def emptyC := parser! symbol "∅" appPrec
|
||||
|
|
|
|||
|
|
@ -216,6 +216,12 @@ partial def getHeadInfo : Syntax → Option SourceInfo
|
|||
def getPos (stx : Syntax) : Option String.Pos :=
|
||||
SourceInfo.pos <$> stx.getHeadInfo
|
||||
|
||||
partial def getTailWithInfo : Syntax → Option Syntax
|
||||
| stx@(atom (some _) _) => some stx
|
||||
| stx@(ident (some _) _ _ _) => some stx
|
||||
| node _ args => args.findRev? getTailWithInfo
|
||||
| _ => none
|
||||
|
||||
partial def getTailInfo : Syntax → Option SourceInfo
|
||||
| atom info _ => info
|
||||
| ident info _ _ _ => info
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ uint8_t l_Lean_Elab_Command_DefKind_isExample(uint8_t);
|
|||
lean_object* l_Lean_Name_getNumParts___main(lean_object*);
|
||||
extern lean_object* l___private_Init_Lean_Elab_Util_8__regTraceClasses___closed__2;
|
||||
lean_object* lean_nat_add(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_ensureHasType(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_ensureHasType(lean_object*, 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_getOptions(lean_object*, lean_object*);
|
||||
lean_object* l___private_Init_Data_Array_Basic_3__iterateRevMAux___main___at_Lean_Elab_Command_removeUnused___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -1731,162 +1731,150 @@ _start:
|
|||
lean_object* x_10; lean_object* x_11; lean_object* x_12;
|
||||
x_10 = lean_ctor_get(x_1, 0);
|
||||
lean_inc(x_10);
|
||||
x_11 = lean_ctor_get(x_1, 5);
|
||||
lean_inc(x_11);
|
||||
lean_inc(x_6);
|
||||
x_11 = lean_alloc_ctor(1, 1, 0);
|
||||
lean_ctor_set(x_11, 0, x_6);
|
||||
lean_inc(x_8);
|
||||
lean_inc(x_7);
|
||||
x_12 = l_Lean_Elab_Term_inferType(x_11, x_7, x_8, x_9);
|
||||
x_12 = l_Lean_Elab_Term_ensureHasType(x_10, x_11, x_7, x_8, x_9);
|
||||
if (lean_obj_tag(x_12) == 0)
|
||||
{
|
||||
lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16;
|
||||
lean_object* x_13; lean_object* x_14; uint8_t x_15; lean_object* x_16; lean_object* x_17;
|
||||
x_13 = lean_ctor_get(x_12, 0);
|
||||
lean_inc(x_13);
|
||||
x_14 = lean_ctor_get(x_12, 1);
|
||||
lean_inc(x_14);
|
||||
lean_dec(x_12);
|
||||
lean_inc(x_6);
|
||||
x_15 = lean_alloc_ctor(1, 1, 0);
|
||||
lean_ctor_set(x_15, 0, x_6);
|
||||
x_15 = 0;
|
||||
x_16 = lean_box(0);
|
||||
lean_inc(x_8);
|
||||
x_16 = l_Lean_Elab_Term_ensureHasType(x_10, x_15, x_13, x_7, x_8, x_14);
|
||||
if (lean_obj_tag(x_16) == 0)
|
||||
x_17 = l___private_Init_Lean_Elab_SynthesizeSyntheticMVars_10__synthesizeSyntheticMVarsAux___main(x_15, x_16, x_8, x_14);
|
||||
if (lean_obj_tag(x_17) == 0)
|
||||
{
|
||||
lean_object* x_17; lean_object* x_18; uint8_t x_19; lean_object* x_20; lean_object* x_21;
|
||||
x_17 = lean_ctor_get(x_16, 0);
|
||||
lean_inc(x_17);
|
||||
x_18 = lean_ctor_get(x_16, 1);
|
||||
lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; uint8_t x_24;
|
||||
x_18 = lean_ctor_get(x_17, 1);
|
||||
lean_inc(x_18);
|
||||
lean_dec(x_16);
|
||||
x_19 = 0;
|
||||
x_20 = lean_box(0);
|
||||
lean_inc(x_8);
|
||||
x_21 = l___private_Init_Lean_Elab_SynthesizeSyntheticMVars_10__synthesizeSyntheticMVarsAux___main(x_19, x_20, x_8, x_18);
|
||||
if (lean_obj_tag(x_21) == 0)
|
||||
{
|
||||
lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; uint8_t x_27;
|
||||
x_22 = lean_ctor_get(x_21, 1);
|
||||
lean_inc(x_22);
|
||||
lean_dec(x_21);
|
||||
lean_inc(x_8);
|
||||
x_23 = l_Lean_Elab_Term_instantiateMVars(x_10, x_6, x_8, x_22);
|
||||
x_24 = lean_ctor_get(x_23, 0);
|
||||
lean_inc(x_24);
|
||||
x_25 = lean_ctor_get(x_23, 1);
|
||||
lean_inc(x_25);
|
||||
lean_dec(x_23);
|
||||
lean_inc(x_8);
|
||||
x_26 = l_Lean_Elab_Term_instantiateMVars(x_11, x_17, x_8, x_25);
|
||||
x_27 = !lean_is_exclusive(x_26);
|
||||
if (x_27 == 0)
|
||||
{
|
||||
lean_object* x_28; lean_object* x_29; uint8_t x_30; uint8_t x_31;
|
||||
x_28 = lean_ctor_get(x_26, 0);
|
||||
x_29 = lean_ctor_get(x_26, 1);
|
||||
x_30 = lean_ctor_get_uint8(x_1, sizeof(void*)*6);
|
||||
x_31 = l_Lean_Elab_Command_DefKind_isExample(x_30);
|
||||
if (x_31 == 0)
|
||||
{
|
||||
uint8_t x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35;
|
||||
lean_free_object(x_26);
|
||||
x_32 = l_Lean_Elab_Command_DefKind_isDefOrOpaque(x_30);
|
||||
x_33 = lean_box(x_30);
|
||||
lean_inc(x_28);
|
||||
lean_inc(x_24);
|
||||
lean_inc(x_5);
|
||||
lean_inc(x_10);
|
||||
x_34 = lean_alloc_closure((void*)(l_Lean_Elab_Command_mkDef___lambda__1___boxed), 12, 9);
|
||||
lean_closure_set(x_34, 0, x_10);
|
||||
lean_closure_set(x_34, 1, x_5);
|
||||
lean_closure_set(x_34, 2, x_24);
|
||||
lean_closure_set(x_34, 3, x_28);
|
||||
lean_closure_set(x_34, 4, x_11);
|
||||
lean_closure_set(x_34, 5, x_3);
|
||||
lean_closure_set(x_34, 6, x_33);
|
||||
lean_closure_set(x_34, 7, x_2);
|
||||
lean_closure_set(x_34, 8, x_1);
|
||||
x_35 = l_Lean_Elab_Command_withUsedWhen___rarg(x_10, x_4, x_5, x_28, x_24, x_32, x_34, x_8, x_29);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_10);
|
||||
return x_35;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_36;
|
||||
lean_dec(x_28);
|
||||
lean_dec(x_24);
|
||||
lean_dec(x_11);
|
||||
lean_dec(x_10);
|
||||
lean_dec(x_8);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_3);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
x_36 = lean_box(0);
|
||||
lean_ctor_set(x_26, 0, x_36);
|
||||
return x_26;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_37; lean_object* x_38; uint8_t x_39; uint8_t x_40;
|
||||
x_37 = lean_ctor_get(x_26, 0);
|
||||
x_38 = lean_ctor_get(x_26, 1);
|
||||
lean_inc(x_38);
|
||||
lean_inc(x_37);
|
||||
lean_dec(x_26);
|
||||
x_39 = lean_ctor_get_uint8(x_1, sizeof(void*)*6);
|
||||
x_40 = l_Lean_Elab_Command_DefKind_isExample(x_39);
|
||||
if (x_40 == 0)
|
||||
{
|
||||
uint8_t x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44;
|
||||
x_41 = l_Lean_Elab_Command_DefKind_isDefOrOpaque(x_39);
|
||||
x_42 = lean_box(x_39);
|
||||
lean_inc(x_37);
|
||||
lean_inc(x_24);
|
||||
lean_inc(x_5);
|
||||
lean_inc(x_10);
|
||||
x_43 = lean_alloc_closure((void*)(l_Lean_Elab_Command_mkDef___lambda__1___boxed), 12, 9);
|
||||
lean_closure_set(x_43, 0, x_10);
|
||||
lean_closure_set(x_43, 1, x_5);
|
||||
lean_closure_set(x_43, 2, x_24);
|
||||
lean_closure_set(x_43, 3, x_37);
|
||||
lean_closure_set(x_43, 4, x_11);
|
||||
lean_closure_set(x_43, 5, x_3);
|
||||
lean_closure_set(x_43, 6, x_42);
|
||||
lean_closure_set(x_43, 7, x_2);
|
||||
lean_closure_set(x_43, 8, x_1);
|
||||
x_44 = l_Lean_Elab_Command_withUsedWhen___rarg(x_10, x_4, x_5, x_37, x_24, x_41, x_43, x_8, x_38);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_10);
|
||||
return x_44;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_45; lean_object* x_46;
|
||||
lean_dec(x_37);
|
||||
lean_dec(x_24);
|
||||
lean_dec(x_11);
|
||||
lean_dec(x_10);
|
||||
lean_dec(x_8);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_3);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
x_45 = lean_box(0);
|
||||
x_46 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_46, 0, x_45);
|
||||
lean_ctor_set(x_46, 1, x_38);
|
||||
return x_46;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_47;
|
||||
lean_dec(x_17);
|
||||
lean_dec(x_11);
|
||||
lean_inc(x_8);
|
||||
x_19 = l_Lean_Elab_Term_instantiateMVars(x_10, x_6, x_8, x_18);
|
||||
x_20 = lean_ctor_get(x_19, 0);
|
||||
lean_inc(x_20);
|
||||
x_21 = lean_ctor_get(x_19, 1);
|
||||
lean_inc(x_21);
|
||||
lean_dec(x_19);
|
||||
x_22 = lean_ctor_get(x_1, 5);
|
||||
lean_inc(x_22);
|
||||
lean_inc(x_8);
|
||||
x_23 = l_Lean_Elab_Term_instantiateMVars(x_22, x_13, x_8, x_21);
|
||||
x_24 = !lean_is_exclusive(x_23);
|
||||
if (x_24 == 0)
|
||||
{
|
||||
lean_object* x_25; lean_object* x_26; uint8_t x_27; uint8_t x_28;
|
||||
x_25 = lean_ctor_get(x_23, 0);
|
||||
x_26 = lean_ctor_get(x_23, 1);
|
||||
x_27 = lean_ctor_get_uint8(x_1, sizeof(void*)*6);
|
||||
x_28 = l_Lean_Elab_Command_DefKind_isExample(x_27);
|
||||
if (x_28 == 0)
|
||||
{
|
||||
uint8_t x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32;
|
||||
lean_free_object(x_23);
|
||||
x_29 = l_Lean_Elab_Command_DefKind_isDefOrOpaque(x_27);
|
||||
x_30 = lean_box(x_27);
|
||||
lean_inc(x_25);
|
||||
lean_inc(x_20);
|
||||
lean_inc(x_5);
|
||||
lean_inc(x_10);
|
||||
x_31 = lean_alloc_closure((void*)(l_Lean_Elab_Command_mkDef___lambda__1___boxed), 12, 9);
|
||||
lean_closure_set(x_31, 0, x_10);
|
||||
lean_closure_set(x_31, 1, x_5);
|
||||
lean_closure_set(x_31, 2, x_20);
|
||||
lean_closure_set(x_31, 3, x_25);
|
||||
lean_closure_set(x_31, 4, x_22);
|
||||
lean_closure_set(x_31, 5, x_3);
|
||||
lean_closure_set(x_31, 6, x_30);
|
||||
lean_closure_set(x_31, 7, x_2);
|
||||
lean_closure_set(x_31, 8, x_1);
|
||||
x_32 = l_Lean_Elab_Command_withUsedWhen___rarg(x_10, x_4, x_5, x_25, x_20, x_29, x_31, x_8, x_26);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_10);
|
||||
return x_32;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_33;
|
||||
lean_dec(x_25);
|
||||
lean_dec(x_22);
|
||||
lean_dec(x_20);
|
||||
lean_dec(x_10);
|
||||
lean_dec(x_8);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_3);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
x_33 = lean_box(0);
|
||||
lean_ctor_set(x_23, 0, x_33);
|
||||
return x_23;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_34; lean_object* x_35; uint8_t x_36; uint8_t x_37;
|
||||
x_34 = lean_ctor_get(x_23, 0);
|
||||
x_35 = lean_ctor_get(x_23, 1);
|
||||
lean_inc(x_35);
|
||||
lean_inc(x_34);
|
||||
lean_dec(x_23);
|
||||
x_36 = lean_ctor_get_uint8(x_1, sizeof(void*)*6);
|
||||
x_37 = l_Lean_Elab_Command_DefKind_isExample(x_36);
|
||||
if (x_37 == 0)
|
||||
{
|
||||
uint8_t x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41;
|
||||
x_38 = l_Lean_Elab_Command_DefKind_isDefOrOpaque(x_36);
|
||||
x_39 = lean_box(x_36);
|
||||
lean_inc(x_34);
|
||||
lean_inc(x_20);
|
||||
lean_inc(x_5);
|
||||
lean_inc(x_10);
|
||||
x_40 = lean_alloc_closure((void*)(l_Lean_Elab_Command_mkDef___lambda__1___boxed), 12, 9);
|
||||
lean_closure_set(x_40, 0, x_10);
|
||||
lean_closure_set(x_40, 1, x_5);
|
||||
lean_closure_set(x_40, 2, x_20);
|
||||
lean_closure_set(x_40, 3, x_34);
|
||||
lean_closure_set(x_40, 4, x_22);
|
||||
lean_closure_set(x_40, 5, x_3);
|
||||
lean_closure_set(x_40, 6, x_39);
|
||||
lean_closure_set(x_40, 7, x_2);
|
||||
lean_closure_set(x_40, 8, x_1);
|
||||
x_41 = l_Lean_Elab_Command_withUsedWhen___rarg(x_10, x_4, x_5, x_34, x_20, x_38, x_40, x_8, x_35);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_10);
|
||||
return x_41;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_42; lean_object* x_43;
|
||||
lean_dec(x_34);
|
||||
lean_dec(x_22);
|
||||
lean_dec(x_20);
|
||||
lean_dec(x_10);
|
||||
lean_dec(x_8);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_3);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
x_42 = lean_box(0);
|
||||
x_43 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_43, 0, x_42);
|
||||
lean_ctor_set(x_43, 1, x_35);
|
||||
return x_43;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_44;
|
||||
lean_dec(x_13);
|
||||
lean_dec(x_10);
|
||||
lean_dec(x_8);
|
||||
lean_dec(x_6);
|
||||
|
|
@ -1895,30 +1883,29 @@ lean_dec(x_4);
|
|||
lean_dec(x_3);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
x_47 = !lean_is_exclusive(x_21);
|
||||
if (x_47 == 0)
|
||||
x_44 = !lean_is_exclusive(x_17);
|
||||
if (x_44 == 0)
|
||||
{
|
||||
return x_21;
|
||||
return x_17;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_48; lean_object* x_49; lean_object* x_50;
|
||||
x_48 = lean_ctor_get(x_21, 0);
|
||||
x_49 = lean_ctor_get(x_21, 1);
|
||||
lean_inc(x_49);
|
||||
lean_inc(x_48);
|
||||
lean_dec(x_21);
|
||||
x_50 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_50, 0, x_48);
|
||||
lean_ctor_set(x_50, 1, x_49);
|
||||
return x_50;
|
||||
lean_object* x_45; lean_object* x_46; lean_object* x_47;
|
||||
x_45 = lean_ctor_get(x_17, 0);
|
||||
x_46 = lean_ctor_get(x_17, 1);
|
||||
lean_inc(x_46);
|
||||
lean_inc(x_45);
|
||||
lean_dec(x_17);
|
||||
x_47 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_47, 0, x_45);
|
||||
lean_ctor_set(x_47, 1, x_46);
|
||||
return x_47;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_51;
|
||||
lean_dec(x_11);
|
||||
uint8_t x_48;
|
||||
lean_dec(x_10);
|
||||
lean_dec(x_8);
|
||||
lean_dec(x_6);
|
||||
|
|
@ -1927,56 +1914,23 @@ lean_dec(x_4);
|
|||
lean_dec(x_3);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
x_51 = !lean_is_exclusive(x_16);
|
||||
if (x_51 == 0)
|
||||
{
|
||||
return x_16;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_52; lean_object* x_53; lean_object* x_54;
|
||||
x_52 = lean_ctor_get(x_16, 0);
|
||||
x_53 = lean_ctor_get(x_16, 1);
|
||||
lean_inc(x_53);
|
||||
lean_inc(x_52);
|
||||
lean_dec(x_16);
|
||||
x_54 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_54, 0, x_52);
|
||||
lean_ctor_set(x_54, 1, x_53);
|
||||
return x_54;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_55;
|
||||
lean_dec(x_11);
|
||||
lean_dec(x_10);
|
||||
lean_dec(x_8);
|
||||
lean_dec(x_7);
|
||||
lean_dec(x_6);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_3);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
x_55 = !lean_is_exclusive(x_12);
|
||||
if (x_55 == 0)
|
||||
x_48 = !lean_is_exclusive(x_12);
|
||||
if (x_48 == 0)
|
||||
{
|
||||
return x_12;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_56; lean_object* x_57; lean_object* x_58;
|
||||
x_56 = lean_ctor_get(x_12, 0);
|
||||
x_57 = lean_ctor_get(x_12, 1);
|
||||
lean_inc(x_57);
|
||||
lean_inc(x_56);
|
||||
lean_object* x_49; lean_object* x_50; lean_object* x_51;
|
||||
x_49 = lean_ctor_get(x_12, 0);
|
||||
x_50 = lean_ctor_get(x_12, 1);
|
||||
lean_inc(x_50);
|
||||
lean_inc(x_49);
|
||||
lean_dec(x_12);
|
||||
x_58 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_58, 0, x_56);
|
||||
lean_ctor_set(x_58, 1, x_57);
|
||||
return x_58;
|
||||
x_51 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_51, 0, x_49);
|
||||
lean_ctor_set(x_51, 1, x_50);
|
||||
return x_51;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -13,17 +13,24 @@
|
|||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
lean_object* l_Lean_Elab_Term_ensureAssignmentHasNoMVars___closed__1;
|
||||
lean_object* l_Lean_Elab_Term_ensureAssignmentHasNoMVars___closed__2;
|
||||
lean_object* l_Lean_Expr_mvarId_x21(lean_object*);
|
||||
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;
|
||||
|
|
@ -38,6 +45,7 @@ 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;
|
||||
uint8_t l_Lean_Expr_hasMVar(lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_registerSyntheticMVar(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_Elab_Term_declareBuiltinTermElab___closed__4;
|
||||
lean_object* l_Lean_Elab_Term_runTactic___lambda__1___boxed(lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -50,10 +58,12 @@ lean_object* l_Lean_Syntax_getArg(lean_object*, lean_object*);
|
|||
lean_object* l_Lean_Elab_Term_elabTacticBlock(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
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() {
|
||||
_start:
|
||||
{
|
||||
|
|
@ -661,6 +671,117 @@ lean_dec(x_1);
|
|||
return x_5;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_Lean_Elab_Term_ensureAssignmentHasNoMVars___closed__1() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_mk_string("tactic failed, result still contain metavariables");
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_Lean_Elab_Term_ensureAssignmentHasNoMVars___closed__2() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2;
|
||||
x_1 = l_Lean_Elab_Term_ensureAssignmentHasNoMVars___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_ensureAssignmentHasNoMVars___closed__3() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2;
|
||||
x_1 = l_Lean_Elab_Term_ensureAssignmentHasNoMVars___closed__2;
|
||||
x_2 = lean_alloc_ctor(0, 1, 0);
|
||||
lean_ctor_set(x_2, 0, x_1);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_Term_ensureAssignmentHasNoMVars(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;
|
||||
x_5 = l_Lean_mkMVar(x_2);
|
||||
lean_inc(x_3);
|
||||
x_6 = l_Lean_Elab_Term_instantiateMVars(x_1, x_5, x_3, x_4);
|
||||
x_7 = !lean_is_exclusive(x_6);
|
||||
if (x_7 == 0)
|
||||
{
|
||||
lean_object* x_8; lean_object* x_9; uint8_t x_10;
|
||||
x_8 = lean_ctor_get(x_6, 0);
|
||||
x_9 = lean_ctor_get(x_6, 1);
|
||||
x_10 = l_Lean_Expr_hasMVar(x_8);
|
||||
if (x_10 == 0)
|
||||
{
|
||||
lean_object* x_11;
|
||||
lean_dec(x_8);
|
||||
lean_dec(x_3);
|
||||
x_11 = lean_box(0);
|
||||
lean_ctor_set(x_6, 0, x_11);
|
||||
return x_6;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16;
|
||||
lean_free_object(x_6);
|
||||
x_12 = lean_alloc_ctor(2, 1, 0);
|
||||
lean_ctor_set(x_12, 0, x_8);
|
||||
x_13 = l_Lean_indentExpr(x_12);
|
||||
x_14 = l_Lean_Elab_Term_ensureAssignmentHasNoMVars___closed__3;
|
||||
x_15 = lean_alloc_ctor(9, 2, 0);
|
||||
lean_ctor_set(x_15, 0, x_14);
|
||||
lean_ctor_set(x_15, 1, x_13);
|
||||
x_16 = l_Lean_Elab_Term_throwError___rarg(x_1, x_15, x_3, x_9);
|
||||
return x_16;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_17; lean_object* x_18; uint8_t x_19;
|
||||
x_17 = lean_ctor_get(x_6, 0);
|
||||
x_18 = lean_ctor_get(x_6, 1);
|
||||
lean_inc(x_18);
|
||||
lean_inc(x_17);
|
||||
lean_dec(x_6);
|
||||
x_19 = l_Lean_Expr_hasMVar(x_17);
|
||||
if (x_19 == 0)
|
||||
{
|
||||
lean_object* x_20; lean_object* x_21;
|
||||
lean_dec(x_17);
|
||||
lean_dec(x_3);
|
||||
x_20 = lean_box(0);
|
||||
x_21 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_21, 0, x_20);
|
||||
lean_ctor_set(x_21, 1, x_18);
|
||||
return x_21;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26;
|
||||
x_22 = lean_alloc_ctor(2, 1, 0);
|
||||
lean_ctor_set(x_22, 0, x_17);
|
||||
x_23 = l_Lean_indentExpr(x_22);
|
||||
x_24 = l_Lean_Elab_Term_ensureAssignmentHasNoMVars___closed__3;
|
||||
x_25 = lean_alloc_ctor(9, 2, 0);
|
||||
lean_ctor_set(x_25, 0, x_24);
|
||||
lean_ctor_set(x_25, 1, x_23);
|
||||
x_26 = l_Lean_Elab_Term_throwError___rarg(x_1, x_25, x_3, x_18);
|
||||
return x_26;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_Term_ensureAssignmentHasNoMVars___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_ensureAssignmentHasNoMVars(x_1, x_2, x_3, x_4);
|
||||
lean_dec(x_1);
|
||||
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:
|
||||
{
|
||||
|
|
@ -705,23 +826,27 @@ x_13 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Elab_Tactic_monadLog_
|
|||
lean_closure_set(x_13, 0, x_11);
|
||||
lean_closure_set(x_13, 1, x_12);
|
||||
lean_inc(x_4);
|
||||
lean_inc(x_2);
|
||||
lean_inc(x_1);
|
||||
x_14 = l_Lean_Elab_Term_liftTacticElabM___rarg(x_1, x_2, x_13, x_4, x_5);
|
||||
if (lean_obj_tag(x_14) == 0)
|
||||
{
|
||||
uint8_t x_15;
|
||||
x_15 = !lean_is_exclusive(x_14);
|
||||
if (x_15 == 0)
|
||||
lean_object* x_15; lean_object* x_16; lean_object* x_17; uint8_t x_18;
|
||||
x_15 = lean_ctor_get(x_14, 0);
|
||||
lean_inc(x_15);
|
||||
x_16 = lean_ctor_get(x_14, 1);
|
||||
lean_inc(x_16);
|
||||
lean_dec(x_14);
|
||||
lean_inc(x_1);
|
||||
x_17 = l_Lean_Syntax_getTailWithInfo___main(x_1);
|
||||
x_18 = l_List_isEmpty___rarg(x_15);
|
||||
if (lean_obj_tag(x_17) == 0)
|
||||
{
|
||||
lean_object* x_16; lean_object* x_17; uint8_t x_18;
|
||||
x_16 = lean_ctor_get(x_14, 0);
|
||||
x_17 = lean_ctor_get(x_14, 1);
|
||||
x_18 = l_List_isEmpty___rarg(x_16);
|
||||
if (x_18 == 0)
|
||||
{
|
||||
lean_object* x_19; uint8_t x_20;
|
||||
lean_free_object(x_14);
|
||||
x_19 = l_Lean_Elab_Term_reportUnsolvedGoals(x_1, x_16, x_4, x_17);
|
||||
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)
|
||||
|
|
@ -745,365 +870,433 @@ return x_23;
|
|||
else
|
||||
{
|
||||
lean_object* x_24;
|
||||
lean_dec(x_16);
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_15);
|
||||
x_24 = l_Lean_Elab_Term_ensureAssignmentHasNoMVars(x_1, x_2, x_4, x_16);
|
||||
lean_dec(x_1);
|
||||
x_24 = lean_box(0);
|
||||
lean_ctor_set(x_14, 0, x_24);
|
||||
return x_14;
|
||||
return x_24;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_dec(x_1);
|
||||
if (x_18 == 0)
|
||||
{
|
||||
lean_object* x_25; lean_object* x_26; uint8_t x_27;
|
||||
x_25 = lean_ctor_get(x_14, 0);
|
||||
x_26 = lean_ctor_get(x_14, 1);
|
||||
lean_inc(x_26);
|
||||
lean_dec(x_2);
|
||||
x_25 = lean_ctor_get(x_17, 0);
|
||||
lean_inc(x_25);
|
||||
lean_dec(x_14);
|
||||
x_27 = l_List_isEmpty___rarg(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)
|
||||
{
|
||||
lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32;
|
||||
x_28 = l_Lean_Elab_Term_reportUnsolvedGoals(x_1, x_25, x_4, x_26);
|
||||
lean_dec(x_1);
|
||||
x_29 = lean_ctor_get(x_28, 0);
|
||||
return x_26;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_28; lean_object* x_29; lean_object* x_30;
|
||||
x_28 = lean_ctor_get(x_26, 0);
|
||||
x_29 = lean_ctor_get(x_26, 1);
|
||||
lean_inc(x_29);
|
||||
x_30 = lean_ctor_get(x_28, 1);
|
||||
lean_inc(x_30);
|
||||
if (lean_is_exclusive(x_28)) {
|
||||
lean_ctor_release(x_28, 0);
|
||||
lean_ctor_release(x_28, 1);
|
||||
x_31 = x_28;
|
||||
} else {
|
||||
lean_dec_ref(x_28);
|
||||
x_31 = lean_box(0);
|
||||
lean_inc(x_28);
|
||||
lean_dec(x_26);
|
||||
x_30 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_30, 0, x_28);
|
||||
lean_ctor_set(x_30, 1, x_29);
|
||||
return x_30;
|
||||
}
|
||||
if (lean_is_scalar(x_31)) {
|
||||
x_32 = lean_alloc_ctor(1, 2, 0);
|
||||
} else {
|
||||
x_32 = x_31;
|
||||
}
|
||||
lean_ctor_set(x_32, 0, x_29);
|
||||
lean_ctor_set(x_32, 1, x_30);
|
||||
else
|
||||
{
|
||||
lean_object* x_31; lean_object* x_32;
|
||||
lean_dec(x_15);
|
||||
x_31 = lean_ctor_get(x_17, 0);
|
||||
lean_inc(x_31);
|
||||
lean_dec(x_17);
|
||||
x_32 = l_Lean_Elab_Term_ensureAssignmentHasNoMVars(x_31, x_2, x_4, x_16);
|
||||
lean_dec(x_31);
|
||||
return x_32;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_33; lean_object* x_34;
|
||||
lean_dec(x_25);
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_1);
|
||||
x_33 = lean_box(0);
|
||||
x_34 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_34, 0, x_33);
|
||||
lean_ctor_set(x_34, 1, x_26);
|
||||
return x_34;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_35;
|
||||
uint8_t x_33;
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
x_35 = !lean_is_exclusive(x_14);
|
||||
if (x_35 == 0)
|
||||
x_33 = !lean_is_exclusive(x_14);
|
||||
if (x_33 == 0)
|
||||
{
|
||||
return x_14;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_36; lean_object* x_37; lean_object* x_38;
|
||||
x_36 = lean_ctor_get(x_14, 0);
|
||||
x_37 = lean_ctor_get(x_14, 1);
|
||||
lean_inc(x_37);
|
||||
lean_inc(x_36);
|
||||
lean_object* x_34; lean_object* x_35; lean_object* x_36;
|
||||
x_34 = lean_ctor_get(x_14, 0);
|
||||
x_35 = lean_ctor_get(x_14, 1);
|
||||
lean_inc(x_35);
|
||||
lean_inc(x_34);
|
||||
lean_dec(x_14);
|
||||
x_38 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_38, 0, x_36);
|
||||
lean_ctor_set(x_38, 1, x_37);
|
||||
return x_38;
|
||||
x_36 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_36, 0, x_34);
|
||||
lean_ctor_set(x_36, 1, x_35);
|
||||
return x_36;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_39; lean_object* 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; lean_object* x_50;
|
||||
x_39 = lean_ctor_get(x_7, 0);
|
||||
x_40 = lean_ctor_get(x_7, 1);
|
||||
x_41 = lean_ctor_get(x_7, 2);
|
||||
x_42 = lean_ctor_get(x_7, 3);
|
||||
x_43 = lean_ctor_get(x_7, 4);
|
||||
x_44 = lean_ctor_get(x_7, 5);
|
||||
lean_inc(x_44);
|
||||
lean_inc(x_43);
|
||||
lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* 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;
|
||||
x_37 = lean_ctor_get(x_7, 0);
|
||||
x_38 = lean_ctor_get(x_7, 1);
|
||||
x_39 = lean_ctor_get(x_7, 2);
|
||||
x_40 = lean_ctor_get(x_7, 3);
|
||||
x_41 = lean_ctor_get(x_7, 4);
|
||||
x_42 = lean_ctor_get(x_7, 5);
|
||||
lean_inc(x_42);
|
||||
lean_inc(x_41);
|
||||
lean_inc(x_40);
|
||||
lean_inc(x_39);
|
||||
lean_inc(x_38);
|
||||
lean_inc(x_37);
|
||||
lean_dec(x_7);
|
||||
lean_inc(x_2);
|
||||
x_45 = l_Lean_MetavarContext_instantiateMVarDeclMVars(x_40, x_2);
|
||||
x_46 = lean_alloc_ctor(0, 6, 0);
|
||||
lean_ctor_set(x_46, 0, x_39);
|
||||
lean_ctor_set(x_46, 1, x_45);
|
||||
lean_ctor_set(x_46, 2, x_41);
|
||||
lean_ctor_set(x_46, 3, x_42);
|
||||
lean_ctor_set(x_46, 4, x_43);
|
||||
lean_ctor_set(x_46, 5, x_44);
|
||||
lean_ctor_set(x_5, 0, x_46);
|
||||
x_47 = lean_alloc_closure((void*)(l_Lean_Elab_Tactic_evalTactic), 3, 1);
|
||||
lean_closure_set(x_47, 0, x_3);
|
||||
x_48 = l_Lean_Elab_Term_runTactic___closed__1;
|
||||
x_49 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Elab_Tactic_monadLog___spec__2___rarg), 4, 2);
|
||||
lean_closure_set(x_49, 0, x_47);
|
||||
lean_closure_set(x_49, 1, x_48);
|
||||
x_43 = l_Lean_MetavarContext_instantiateMVarDeclMVars(x_38, x_2);
|
||||
x_44 = lean_alloc_ctor(0, 6, 0);
|
||||
lean_ctor_set(x_44, 0, x_37);
|
||||
lean_ctor_set(x_44, 1, x_43);
|
||||
lean_ctor_set(x_44, 2, x_39);
|
||||
lean_ctor_set(x_44, 3, x_40);
|
||||
lean_ctor_set(x_44, 4, x_41);
|
||||
lean_ctor_set(x_44, 5, x_42);
|
||||
lean_ctor_set(x_5, 0, x_44);
|
||||
x_45 = lean_alloc_closure((void*)(l_Lean_Elab_Tactic_evalTactic), 3, 1);
|
||||
lean_closure_set(x_45, 0, x_3);
|
||||
x_46 = l_Lean_Elab_Term_runTactic___closed__1;
|
||||
x_47 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Elab_Tactic_monadLog___spec__2___rarg), 4, 2);
|
||||
lean_closure_set(x_47, 0, x_45);
|
||||
lean_closure_set(x_47, 1, x_46);
|
||||
lean_inc(x_4);
|
||||
lean_inc(x_2);
|
||||
lean_inc(x_1);
|
||||
x_50 = l_Lean_Elab_Term_liftTacticElabM___rarg(x_1, x_2, x_49, x_4, x_5);
|
||||
if (lean_obj_tag(x_50) == 0)
|
||||
x_48 = l_Lean_Elab_Term_liftTacticElabM___rarg(x_1, x_2, x_47, x_4, x_5);
|
||||
if (lean_obj_tag(x_48) == 0)
|
||||
{
|
||||
lean_object* x_51; lean_object* x_52; lean_object* x_53; uint8_t x_54;
|
||||
x_51 = lean_ctor_get(x_50, 0);
|
||||
lean_inc(x_51);
|
||||
x_52 = lean_ctor_get(x_50, 1);
|
||||
lean_inc(x_52);
|
||||
if (lean_is_exclusive(x_50)) {
|
||||
lean_ctor_release(x_50, 0);
|
||||
lean_ctor_release(x_50, 1);
|
||||
x_53 = x_50;
|
||||
} else {
|
||||
lean_dec_ref(x_50);
|
||||
x_53 = lean_box(0);
|
||||
}
|
||||
x_54 = l_List_isEmpty___rarg(x_51);
|
||||
if (x_54 == 0)
|
||||
lean_object* x_49; lean_object* x_50; lean_object* x_51; uint8_t x_52;
|
||||
x_49 = lean_ctor_get(x_48, 0);
|
||||
lean_inc(x_49);
|
||||
x_50 = lean_ctor_get(x_48, 1);
|
||||
lean_inc(x_50);
|
||||
lean_dec(x_48);
|
||||
lean_inc(x_1);
|
||||
x_51 = l_Lean_Syntax_getTailWithInfo___main(x_1);
|
||||
x_52 = l_List_isEmpty___rarg(x_49);
|
||||
if (lean_obj_tag(x_51) == 0)
|
||||
{
|
||||
lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59;
|
||||
lean_dec(x_53);
|
||||
x_55 = l_Lean_Elab_Term_reportUnsolvedGoals(x_1, x_51, x_4, x_52);
|
||||
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_56 = lean_ctor_get(x_55, 0);
|
||||
lean_inc(x_56);
|
||||
x_57 = lean_ctor_get(x_55, 1);
|
||||
lean_inc(x_57);
|
||||
if (lean_is_exclusive(x_55)) {
|
||||
lean_ctor_release(x_55, 0);
|
||||
lean_ctor_release(x_55, 1);
|
||||
x_58 = x_55;
|
||||
x_54 = lean_ctor_get(x_53, 0);
|
||||
lean_inc(x_54);
|
||||
x_55 = lean_ctor_get(x_53, 1);
|
||||
lean_inc(x_55);
|
||||
if (lean_is_exclusive(x_53)) {
|
||||
lean_ctor_release(x_53, 0);
|
||||
lean_ctor_release(x_53, 1);
|
||||
x_56 = x_53;
|
||||
} else {
|
||||
lean_dec_ref(x_55);
|
||||
x_58 = lean_box(0);
|
||||
lean_dec_ref(x_53);
|
||||
x_56 = lean_box(0);
|
||||
}
|
||||
if (lean_is_scalar(x_58)) {
|
||||
x_59 = lean_alloc_ctor(1, 2, 0);
|
||||
if (lean_is_scalar(x_56)) {
|
||||
x_57 = lean_alloc_ctor(1, 2, 0);
|
||||
} else {
|
||||
x_59 = x_58;
|
||||
x_57 = x_56;
|
||||
}
|
||||
lean_ctor_set(x_59, 0, x_56);
|
||||
lean_ctor_set(x_59, 1, x_57);
|
||||
return x_59;
|
||||
lean_ctor_set(x_57, 0, x_54);
|
||||
lean_ctor_set(x_57, 1, x_55);
|
||||
return x_57;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_60; lean_object* x_61;
|
||||
lean_object* x_58;
|
||||
lean_dec(x_49);
|
||||
x_58 = l_Lean_Elab_Term_ensureAssignmentHasNoMVars(x_1, x_2, x_4, x_50);
|
||||
lean_dec(x_1);
|
||||
return x_58;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_dec(x_1);
|
||||
if (x_52 == 0)
|
||||
{
|
||||
lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64;
|
||||
lean_dec(x_2);
|
||||
x_59 = lean_ctor_get(x_51, 0);
|
||||
lean_inc(x_59);
|
||||
lean_dec(x_51);
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_1);
|
||||
x_60 = lean_box(0);
|
||||
if (lean_is_scalar(x_53)) {
|
||||
x_61 = lean_alloc_ctor(0, 2, 0);
|
||||
} else {
|
||||
x_61 = x_53;
|
||||
}
|
||||
lean_ctor_set(x_61, 0, x_60);
|
||||
lean_ctor_set(x_61, 1, x_52);
|
||||
return x_61;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65;
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_1);
|
||||
x_62 = lean_ctor_get(x_50, 0);
|
||||
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);
|
||||
lean_inc(x_62);
|
||||
x_63 = lean_ctor_get(x_50, 1);
|
||||
lean_inc(x_63);
|
||||
if (lean_is_exclusive(x_50)) {
|
||||
lean_ctor_release(x_50, 0);
|
||||
lean_ctor_release(x_50, 1);
|
||||
x_64 = x_50;
|
||||
if (lean_is_exclusive(x_60)) {
|
||||
lean_ctor_release(x_60, 0);
|
||||
lean_ctor_release(x_60, 1);
|
||||
x_63 = x_60;
|
||||
} else {
|
||||
lean_dec_ref(x_50);
|
||||
x_64 = lean_box(0);
|
||||
lean_dec_ref(x_60);
|
||||
x_63 = lean_box(0);
|
||||
}
|
||||
if (lean_is_scalar(x_64)) {
|
||||
x_65 = lean_alloc_ctor(1, 2, 0);
|
||||
if (lean_is_scalar(x_63)) {
|
||||
x_64 = lean_alloc_ctor(1, 2, 0);
|
||||
} else {
|
||||
x_65 = x_64;
|
||||
x_64 = x_63;
|
||||
}
|
||||
lean_ctor_set(x_65, 0, x_62);
|
||||
lean_ctor_set(x_65, 1, x_63);
|
||||
return x_65;
|
||||
lean_ctor_set(x_64, 0, x_61);
|
||||
lean_ctor_set(x_64, 1, x_62);
|
||||
return x_64;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_65; lean_object* x_66;
|
||||
lean_dec(x_49);
|
||||
x_65 = lean_ctor_get(x_51, 0);
|
||||
lean_inc(x_65);
|
||||
lean_dec(x_51);
|
||||
x_66 = l_Lean_Elab_Term_ensureAssignmentHasNoMVars(x_65, x_2, x_4, x_50);
|
||||
lean_dec(x_65);
|
||||
return x_66;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
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; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* 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;
|
||||
x_66 = lean_ctor_get(x_5, 0);
|
||||
x_67 = lean_ctor_get(x_5, 1);
|
||||
x_68 = lean_ctor_get(x_5, 2);
|
||||
x_69 = lean_ctor_get(x_5, 3);
|
||||
x_70 = lean_ctor_get(x_5, 4);
|
||||
x_71 = lean_ctor_get(x_5, 5);
|
||||
lean_inc(x_71);
|
||||
lean_inc(x_70);
|
||||
lean_inc(x_69);
|
||||
lean_inc(x_68);
|
||||
lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70;
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
x_67 = lean_ctor_get(x_48, 0);
|
||||
lean_inc(x_67);
|
||||
lean_inc(x_66);
|
||||
lean_dec(x_5);
|
||||
x_72 = lean_ctor_get(x_66, 0);
|
||||
lean_inc(x_72);
|
||||
x_73 = lean_ctor_get(x_66, 1);
|
||||
lean_inc(x_73);
|
||||
x_74 = lean_ctor_get(x_66, 2);
|
||||
lean_inc(x_74);
|
||||
x_75 = lean_ctor_get(x_66, 3);
|
||||
lean_inc(x_75);
|
||||
x_76 = lean_ctor_get(x_66, 4);
|
||||
lean_inc(x_76);
|
||||
x_77 = lean_ctor_get(x_66, 5);
|
||||
lean_inc(x_77);
|
||||
if (lean_is_exclusive(x_66)) {
|
||||
lean_ctor_release(x_66, 0);
|
||||
lean_ctor_release(x_66, 1);
|
||||
lean_ctor_release(x_66, 2);
|
||||
lean_ctor_release(x_66, 3);
|
||||
lean_ctor_release(x_66, 4);
|
||||
lean_ctor_release(x_66, 5);
|
||||
x_78 = x_66;
|
||||
x_68 = lean_ctor_get(x_48, 1);
|
||||
lean_inc(x_68);
|
||||
if (lean_is_exclusive(x_48)) {
|
||||
lean_ctor_release(x_48, 0);
|
||||
lean_ctor_release(x_48, 1);
|
||||
x_69 = x_48;
|
||||
} else {
|
||||
lean_dec_ref(x_66);
|
||||
x_78 = lean_box(0);
|
||||
lean_dec_ref(x_48);
|
||||
x_69 = lean_box(0);
|
||||
}
|
||||
if (lean_is_scalar(x_69)) {
|
||||
x_70 = lean_alloc_ctor(1, 2, 0);
|
||||
} else {
|
||||
x_70 = x_69;
|
||||
}
|
||||
lean_ctor_set(x_70, 0, x_67);
|
||||
lean_ctor_set(x_70, 1, x_68);
|
||||
return x_70;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* 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; lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90;
|
||||
x_71 = lean_ctor_get(x_5, 0);
|
||||
x_72 = lean_ctor_get(x_5, 1);
|
||||
x_73 = lean_ctor_get(x_5, 2);
|
||||
x_74 = lean_ctor_get(x_5, 3);
|
||||
x_75 = lean_ctor_get(x_5, 4);
|
||||
x_76 = lean_ctor_get(x_5, 5);
|
||||
lean_inc(x_76);
|
||||
lean_inc(x_75);
|
||||
lean_inc(x_74);
|
||||
lean_inc(x_73);
|
||||
lean_inc(x_72);
|
||||
lean_inc(x_71);
|
||||
lean_dec(x_5);
|
||||
x_77 = lean_ctor_get(x_71, 0);
|
||||
lean_inc(x_77);
|
||||
x_78 = lean_ctor_get(x_71, 1);
|
||||
lean_inc(x_78);
|
||||
x_79 = lean_ctor_get(x_71, 2);
|
||||
lean_inc(x_79);
|
||||
x_80 = lean_ctor_get(x_71, 3);
|
||||
lean_inc(x_80);
|
||||
x_81 = lean_ctor_get(x_71, 4);
|
||||
lean_inc(x_81);
|
||||
x_82 = lean_ctor_get(x_71, 5);
|
||||
lean_inc(x_82);
|
||||
if (lean_is_exclusive(x_71)) {
|
||||
lean_ctor_release(x_71, 0);
|
||||
lean_ctor_release(x_71, 1);
|
||||
lean_ctor_release(x_71, 2);
|
||||
lean_ctor_release(x_71, 3);
|
||||
lean_ctor_release(x_71, 4);
|
||||
lean_ctor_release(x_71, 5);
|
||||
x_83 = x_71;
|
||||
} else {
|
||||
lean_dec_ref(x_71);
|
||||
x_83 = lean_box(0);
|
||||
}
|
||||
lean_inc(x_2);
|
||||
x_79 = l_Lean_MetavarContext_instantiateMVarDeclMVars(x_73, x_2);
|
||||
if (lean_is_scalar(x_78)) {
|
||||
x_80 = lean_alloc_ctor(0, 6, 0);
|
||||
x_84 = l_Lean_MetavarContext_instantiateMVarDeclMVars(x_78, x_2);
|
||||
if (lean_is_scalar(x_83)) {
|
||||
x_85 = lean_alloc_ctor(0, 6, 0);
|
||||
} else {
|
||||
x_80 = x_78;
|
||||
x_85 = x_83;
|
||||
}
|
||||
lean_ctor_set(x_80, 0, x_72);
|
||||
lean_ctor_set(x_80, 1, x_79);
|
||||
lean_ctor_set(x_80, 2, x_74);
|
||||
lean_ctor_set(x_80, 3, x_75);
|
||||
lean_ctor_set(x_80, 4, x_76);
|
||||
lean_ctor_set(x_80, 5, x_77);
|
||||
x_81 = lean_alloc_ctor(0, 6, 0);
|
||||
lean_ctor_set(x_81, 0, x_80);
|
||||
lean_ctor_set(x_81, 1, x_67);
|
||||
lean_ctor_set(x_81, 2, x_68);
|
||||
lean_ctor_set(x_81, 3, x_69);
|
||||
lean_ctor_set(x_81, 4, x_70);
|
||||
lean_ctor_set(x_81, 5, x_71);
|
||||
x_82 = lean_alloc_closure((void*)(l_Lean_Elab_Tactic_evalTactic), 3, 1);
|
||||
lean_closure_set(x_82, 0, x_3);
|
||||
x_83 = l_Lean_Elab_Term_runTactic___closed__1;
|
||||
x_84 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Elab_Tactic_monadLog___spec__2___rarg), 4, 2);
|
||||
lean_closure_set(x_84, 0, x_82);
|
||||
lean_closure_set(x_84, 1, x_83);
|
||||
lean_ctor_set(x_85, 0, x_77);
|
||||
lean_ctor_set(x_85, 1, x_84);
|
||||
lean_ctor_set(x_85, 2, x_79);
|
||||
lean_ctor_set(x_85, 3, x_80);
|
||||
lean_ctor_set(x_85, 4, x_81);
|
||||
lean_ctor_set(x_85, 5, x_82);
|
||||
x_86 = lean_alloc_ctor(0, 6, 0);
|
||||
lean_ctor_set(x_86, 0, x_85);
|
||||
lean_ctor_set(x_86, 1, x_72);
|
||||
lean_ctor_set(x_86, 2, x_73);
|
||||
lean_ctor_set(x_86, 3, x_74);
|
||||
lean_ctor_set(x_86, 4, x_75);
|
||||
lean_ctor_set(x_86, 5, x_76);
|
||||
x_87 = lean_alloc_closure((void*)(l_Lean_Elab_Tactic_evalTactic), 3, 1);
|
||||
lean_closure_set(x_87, 0, x_3);
|
||||
x_88 = l_Lean_Elab_Term_runTactic___closed__1;
|
||||
x_89 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Elab_Tactic_monadLog___spec__2___rarg), 4, 2);
|
||||
lean_closure_set(x_89, 0, x_87);
|
||||
lean_closure_set(x_89, 1, x_88);
|
||||
lean_inc(x_4);
|
||||
lean_inc(x_2);
|
||||
lean_inc(x_1);
|
||||
x_85 = l_Lean_Elab_Term_liftTacticElabM___rarg(x_1, x_2, x_84, x_4, x_81);
|
||||
if (lean_obj_tag(x_85) == 0)
|
||||
x_90 = l_Lean_Elab_Term_liftTacticElabM___rarg(x_1, x_2, x_89, x_4, x_86);
|
||||
if (lean_obj_tag(x_90) == 0)
|
||||
{
|
||||
lean_object* x_86; lean_object* x_87; lean_object* x_88; uint8_t x_89;
|
||||
x_86 = lean_ctor_get(x_85, 0);
|
||||
lean_inc(x_86);
|
||||
x_87 = lean_ctor_get(x_85, 1);
|
||||
lean_inc(x_87);
|
||||
if (lean_is_exclusive(x_85)) {
|
||||
lean_ctor_release(x_85, 0);
|
||||
lean_ctor_release(x_85, 1);
|
||||
x_88 = x_85;
|
||||
} else {
|
||||
lean_dec_ref(x_85);
|
||||
x_88 = lean_box(0);
|
||||
}
|
||||
x_89 = l_List_isEmpty___rarg(x_86);
|
||||
if (x_89 == 0)
|
||||
{
|
||||
lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94;
|
||||
lean_dec(x_88);
|
||||
x_90 = l_Lean_Elab_Term_reportUnsolvedGoals(x_1, x_86, x_4, x_87);
|
||||
lean_dec(x_1);
|
||||
lean_object* x_91; lean_object* x_92; lean_object* x_93; uint8_t x_94;
|
||||
x_91 = lean_ctor_get(x_90, 0);
|
||||
lean_inc(x_91);
|
||||
x_92 = lean_ctor_get(x_90, 1);
|
||||
lean_inc(x_92);
|
||||
lean_dec(x_90);
|
||||
lean_inc(x_1);
|
||||
x_93 = l_Lean_Syntax_getTailWithInfo___main(x_1);
|
||||
x_94 = l_List_isEmpty___rarg(x_91);
|
||||
if (lean_obj_tag(x_93) == 0)
|
||||
{
|
||||
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);
|
||||
lean_inc(x_97);
|
||||
if (lean_is_exclusive(x_95)) {
|
||||
lean_ctor_release(x_95, 0);
|
||||
lean_ctor_release(x_95, 1);
|
||||
x_98 = x_95;
|
||||
} else {
|
||||
lean_dec_ref(x_95);
|
||||
x_98 = lean_box(0);
|
||||
}
|
||||
if (lean_is_scalar(x_98)) {
|
||||
x_99 = lean_alloc_ctor(1, 2, 0);
|
||||
} else {
|
||||
x_99 = x_98;
|
||||
}
|
||||
lean_ctor_set(x_99, 0, x_96);
|
||||
lean_ctor_set(x_99, 1, x_97);
|
||||
return x_99;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_100;
|
||||
lean_dec(x_91);
|
||||
x_100 = l_Lean_Elab_Term_ensureAssignmentHasNoMVars(x_1, x_2, x_4, x_92);
|
||||
lean_dec(x_1);
|
||||
return x_100;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_dec(x_1);
|
||||
if (x_94 == 0)
|
||||
{
|
||||
lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106;
|
||||
lean_dec(x_2);
|
||||
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);
|
||||
lean_inc(x_104);
|
||||
if (lean_is_exclusive(x_102)) {
|
||||
lean_ctor_release(x_102, 0);
|
||||
lean_ctor_release(x_102, 1);
|
||||
x_105 = x_102;
|
||||
} else {
|
||||
lean_dec_ref(x_102);
|
||||
x_105 = lean_box(0);
|
||||
}
|
||||
if (lean_is_scalar(x_105)) {
|
||||
x_106 = lean_alloc_ctor(1, 2, 0);
|
||||
} else {
|
||||
x_106 = x_105;
|
||||
}
|
||||
lean_ctor_set(x_106, 0, x_103);
|
||||
lean_ctor_set(x_106, 1, x_104);
|
||||
return x_106;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_107; lean_object* x_108;
|
||||
lean_dec(x_91);
|
||||
x_107 = lean_ctor_get(x_93, 0);
|
||||
lean_inc(x_107);
|
||||
lean_dec(x_93);
|
||||
x_108 = l_Lean_Elab_Term_ensureAssignmentHasNoMVars(x_107, x_2, x_4, x_92);
|
||||
lean_dec(x_107);
|
||||
return x_108;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112;
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
x_109 = lean_ctor_get(x_90, 0);
|
||||
lean_inc(x_109);
|
||||
x_110 = lean_ctor_get(x_90, 1);
|
||||
lean_inc(x_110);
|
||||
if (lean_is_exclusive(x_90)) {
|
||||
lean_ctor_release(x_90, 0);
|
||||
lean_ctor_release(x_90, 1);
|
||||
x_93 = x_90;
|
||||
x_111 = x_90;
|
||||
} else {
|
||||
lean_dec_ref(x_90);
|
||||
x_93 = lean_box(0);
|
||||
x_111 = lean_box(0);
|
||||
}
|
||||
if (lean_is_scalar(x_93)) {
|
||||
x_94 = lean_alloc_ctor(1, 2, 0);
|
||||
if (lean_is_scalar(x_111)) {
|
||||
x_112 = lean_alloc_ctor(1, 2, 0);
|
||||
} else {
|
||||
x_94 = x_93;
|
||||
x_112 = x_111;
|
||||
}
|
||||
lean_ctor_set(x_94, 0, x_91);
|
||||
lean_ctor_set(x_94, 1, x_92);
|
||||
return x_94;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_95; lean_object* x_96;
|
||||
lean_dec(x_86);
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_1);
|
||||
x_95 = lean_box(0);
|
||||
if (lean_is_scalar(x_88)) {
|
||||
x_96 = lean_alloc_ctor(0, 2, 0);
|
||||
} else {
|
||||
x_96 = x_88;
|
||||
}
|
||||
lean_ctor_set(x_96, 0, x_95);
|
||||
lean_ctor_set(x_96, 1, x_87);
|
||||
return x_96;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100;
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_1);
|
||||
x_97 = lean_ctor_get(x_85, 0);
|
||||
lean_inc(x_97);
|
||||
x_98 = lean_ctor_get(x_85, 1);
|
||||
lean_inc(x_98);
|
||||
if (lean_is_exclusive(x_85)) {
|
||||
lean_ctor_release(x_85, 0);
|
||||
lean_ctor_release(x_85, 1);
|
||||
x_99 = x_85;
|
||||
} else {
|
||||
lean_dec_ref(x_85);
|
||||
x_99 = lean_box(0);
|
||||
}
|
||||
if (lean_is_scalar(x_99)) {
|
||||
x_100 = lean_alloc_ctor(1, 2, 0);
|
||||
} else {
|
||||
x_100 = x_99;
|
||||
}
|
||||
lean_ctor_set(x_100, 0, x_97);
|
||||
lean_ctor_set(x_100, 1, x_98);
|
||||
return x_100;
|
||||
lean_ctor_set(x_112, 0, x_109);
|
||||
lean_ctor_set(x_112, 1, x_110);
|
||||
return x_112;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1158,6 +1351,12 @@ l_Lean_Elab_Term_reportUnsolvedGoals___closed__3 = _init_l_Lean_Elab_Term_report
|
|||
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();
|
||||
lean_mark_persistent(l_Lean_Elab_Term_ensureAssignmentHasNoMVars___closed__2);
|
||||
l_Lean_Elab_Term_ensureAssignmentHasNoMVars___closed__3 = _init_l_Lean_Elab_Term_ensureAssignmentHasNoMVars___closed__3();
|
||||
lean_mark_persistent(l_Lean_Elab_Term_ensureAssignmentHasNoMVars___closed__3);
|
||||
l_Lean_Elab_Term_runTactic___closed__1 = _init_l_Lean_Elab_Term_runTactic___closed__1();
|
||||
lean_mark_persistent(l_Lean_Elab_Term_runTactic___closed__1);
|
||||
return lean_mk_io_result(lean_box(0));
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -65,7 +65,6 @@ lean_object* l_Lean_Elab_Term_assignExprMVar___boxed(lean_object*, lean_object*,
|
|||
lean_object* l_Lean_Elab_Term_ppGoal___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_Expr_hasSorry___main___closed__1;
|
||||
lean_object* l_Lean_Elab_Term_mkTermElabAttribute___closed__3;
|
||||
lean_object* l_Lean_Elab_Term_ensureHasType___closed__2;
|
||||
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*);
|
||||
|
|
@ -180,6 +179,7 @@ lean_object* l_Lean_Elab_Term_getMCtx(lean_object*);
|
|||
size_t l_USize_shiftRight(size_t, size_t);
|
||||
lean_object* l_Lean_Elab_Term_withLCtx___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_elabArrayLit___closed__6;
|
||||
lean_object* l_Lean_Elab_Term_ensureHasTypeAux___closed__3;
|
||||
lean_object* l_Lean_Elab_Term_monadLog___closed__10;
|
||||
lean_object* l_Lean_Elab_Term_resolveName___closed__6;
|
||||
lean_object* l_Lean_Elab_Term_elabTypeStx___rarg(lean_object*);
|
||||
|
|
@ -212,7 +212,7 @@ lean_object* lean_nat_add(lean_object*, lean_object*);
|
|||
lean_object* l_Lean_Meta_ppGoal(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_mkFreshInstanceName___rarg___closed__1;
|
||||
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*);
|
||||
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_Array_foldlStepMAux___main___at_Lean_Syntax_foldSepRevArgsM___spec__1(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -422,7 +422,7 @@ lean_object* l_Lean_Elab_addMacroStack(lean_object*, lean_object*);
|
|||
lean_object* l_Lean_LocalDecl_toExpr(lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_elabTermAux(lean_object*, uint8_t, uint8_t, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_termElabAttribute___closed__5;
|
||||
lean_object* l_Lean_Elab_Term_ensureHasType___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_ensureHasType___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_mkElabAttribute___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabArrayLit___closed__3;
|
||||
lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabArrayLit(lean_object*);
|
||||
|
|
@ -435,7 +435,6 @@ lean_object* l_Lean_Elab_Term_whnfCore___boxed(lean_object*, lean_object*, lean_
|
|||
lean_object* l_Lean_Elab_Term_getCurrNamespace___boxed(lean_object*, lean_object*);
|
||||
lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabParen___closed__1;
|
||||
lean_object* l_Lean_Elab_Level_elabLevel___boxed(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_ensureHasType___closed__1;
|
||||
lean_object* l_Lean_Elab_Term_addBuiltinTermElab___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_getLocalInsts(lean_object*, lean_object*);
|
||||
lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabProp(lean_object*);
|
||||
|
|
@ -517,7 +516,6 @@ lean_object* l___private_Init_Lean_Elab_Term_9__mkPairsAux___main___closed__6;
|
|||
lean_object* l_Lean_Elab_Term_traceAtCmdPos(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Init_Lean_Elab_Term_5__expandCDot___closed__2;
|
||||
uint8_t l_HashMapImp_contains___at_Lean_Elab_Term_addBuiltinTermElab___spec__2(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_ensureHasType___closed__3;
|
||||
lean_object* l_Lean_Elab_Term_decLevel___closed__5;
|
||||
lean_object* l_PersistentHashMap_contains___at_Lean_Elab_Term_addBuiltinTermElab___spec__4___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_TermElabM_inhabited___rarg(lean_object*);
|
||||
|
|
@ -680,7 +678,9 @@ lean_object* l_Lean_Elab_Term_decLevel___closed__1;
|
|||
lean_object* l_Lean_Elab_Term_elabTermAux___main___closed__2;
|
||||
lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabBadCDot___closed__1;
|
||||
lean_object* l_Lean_Elab_Term_registerBuiltinTermElabAttr___lambda__1(lean_object*, lean_object*, lean_object*, uint8_t, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_ensureHasTypeAux___closed__1;
|
||||
lean_object* l_unsafeCast(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_ensureHasTypeAux___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_builtinTermElabTable;
|
||||
uint8_t l_List_isEmpty___rarg(lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_mkTermElabAttribute___closed__2;
|
||||
|
|
@ -715,6 +715,7 @@ lean_object* l_IO_ofExcept___at___private_Init_Lean_Elab_Util_6__ElabAttribute_a
|
|||
lean_object* l_Lean_Elab_Term_resettingSynthInstanceCache(lean_object*);
|
||||
lean_object* l_Lean_mkConst(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_registerSyntheticMVar___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_ensureHasTypeAux(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Array_iterateMAux___main___at___private_Init_Lean_Elab_Term_3__fromMetaState___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_tryPostponeIfNoneOrMVar___boxed(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* lean_uint32_to_nat(uint32_t);
|
||||
|
|
@ -755,6 +756,7 @@ lean_object* l_Lean_Elab_Term_mkFreshTypeMVar___boxed(lean_object*, lean_object*
|
|||
lean_object* l_Lean_Elab_Term_elabBadCDot(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_elabNum___closed__4;
|
||||
lean_object* l_Lean_Elab_getBetterRef(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_ensureHasTypeAux___closed__2;
|
||||
uint8_t lean_string_dec_eq(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_expandMacro(lean_object*, lean_object*, lean_object*);
|
||||
uint8_t lean_nat_dec_lt(lean_object*, lean_object*);
|
||||
|
|
@ -16318,7 +16320,7 @@ lean_dec(x_1);
|
|||
return x_7;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_Lean_Elab_Term_ensureHasType___closed__1() {
|
||||
lean_object* _init_l_Lean_Elab_Term_ensureHasTypeAux___closed__1() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
|
|
@ -16326,27 +16328,27 @@ x_1 = lean_mk_string("type mismatch");
|
|||
return x_1;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_Lean_Elab_Term_ensureHasType___closed__2() {
|
||||
lean_object* _init_l_Lean_Elab_Term_ensureHasTypeAux___closed__2() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2;
|
||||
x_1 = l_Lean_Elab_Term_ensureHasType___closed__1;
|
||||
x_1 = l_Lean_Elab_Term_ensureHasTypeAux___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_ensureHasType___closed__3() {
|
||||
lean_object* _init_l_Lean_Elab_Term_ensureHasTypeAux___closed__3() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2;
|
||||
x_1 = l_Lean_Elab_Term_ensureHasType___closed__2;
|
||||
x_1 = l_Lean_Elab_Term_ensureHasTypeAux___closed__2;
|
||||
x_2 = lean_alloc_ctor(0, 1, 0);
|
||||
lean_ctor_set(x_2, 0, x_1);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_Term_ensureHasType(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
|
||||
lean_object* l_Lean_Elab_Term_ensureHasTypeAux(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_7;
|
||||
|
|
@ -16369,7 +16371,7 @@ lean_dec(x_7);
|
|||
x_10 = lean_alloc_ctor(2, 1, 0);
|
||||
lean_ctor_set(x_10, 0, x_4);
|
||||
x_11 = l_Lean_indentExpr(x_10);
|
||||
x_12 = l_Lean_Elab_Term_ensureHasType___closed__3;
|
||||
x_12 = l_Lean_Elab_Term_ensureHasTypeAux___closed__3;
|
||||
x_13 = lean_alloc_ctor(9, 2, 0);
|
||||
lean_ctor_set(x_13, 0, x_12);
|
||||
lean_ctor_set(x_13, 1, x_11);
|
||||
|
|
@ -16488,15 +16490,81 @@ return x_45;
|
|||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_Term_ensureHasType___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
|
||||
lean_object* l_Lean_Elab_Term_ensureHasTypeAux___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_7;
|
||||
x_7 = l_Lean_Elab_Term_ensureHasType(x_1, x_2, x_3, x_4, x_5, x_6);
|
||||
x_7 = l_Lean_Elab_Term_ensureHasTypeAux(x_1, x_2, x_3, x_4, x_5, x_6);
|
||||
lean_dec(x_1);
|
||||
return x_7;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_Term_ensureHasType(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
|
||||
_start:
|
||||
{
|
||||
if (lean_obj_tag(x_2) == 0)
|
||||
{
|
||||
lean_object* x_6;
|
||||
lean_dec(x_4);
|
||||
x_6 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_6, 0, x_3);
|
||||
lean_ctor_set(x_6, 1, x_5);
|
||||
return x_6;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_7;
|
||||
lean_inc(x_4);
|
||||
lean_inc(x_3);
|
||||
x_7 = l_Lean_Elab_Term_inferType(x_1, x_3, x_4, x_5);
|
||||
if (lean_obj_tag(x_7) == 0)
|
||||
{
|
||||
lean_object* x_8; lean_object* x_9; lean_object* x_10;
|
||||
x_8 = lean_ctor_get(x_7, 0);
|
||||
lean_inc(x_8);
|
||||
x_9 = lean_ctor_get(x_7, 1);
|
||||
lean_inc(x_9);
|
||||
lean_dec(x_7);
|
||||
x_10 = l_Lean_Elab_Term_ensureHasTypeAux(x_1, x_2, x_8, x_3, x_4, x_9);
|
||||
return x_10;
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_11;
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_3);
|
||||
lean_dec(x_2);
|
||||
x_11 = !lean_is_exclusive(x_7);
|
||||
if (x_11 == 0)
|
||||
{
|
||||
return x_7;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_12; lean_object* x_13; lean_object* x_14;
|
||||
x_12 = lean_ctor_get(x_7, 0);
|
||||
x_13 = lean_ctor_get(x_7, 1);
|
||||
lean_inc(x_13);
|
||||
lean_inc(x_12);
|
||||
lean_dec(x_7);
|
||||
x_14 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_14, 0, x_12);
|
||||
lean_ctor_set(x_14, 1, x_13);
|
||||
return x_14;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_Term_ensureHasType___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_6;
|
||||
x_6 = l_Lean_Elab_Term_ensureHasType(x_1, x_2, x_3, x_4, x_5);
|
||||
lean_dec(x_1);
|
||||
return x_6;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_Lean_Elab_Term_synthesizeInstMVarCore___closed__1() {
|
||||
_start:
|
||||
{
|
||||
|
|
@ -17674,30 +17742,30 @@ return x_3;
|
|||
lean_object* l_Lean_Elab_Term_elabParen(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
uint8_t x_5; lean_object* x_133; uint8_t x_134;
|
||||
x_133 = l_Lean_Parser_Term_paren___elambda__1___closed__1;
|
||||
uint8_t x_5; lean_object* x_144; uint8_t x_145;
|
||||
x_144 = l_Lean_Parser_Term_paren___elambda__1___closed__1;
|
||||
lean_inc(x_1);
|
||||
x_134 = l_Lean_Syntax_isOfKind(x_1, x_133);
|
||||
if (x_134 == 0)
|
||||
x_145 = l_Lean_Syntax_isOfKind(x_1, x_144);
|
||||
if (x_145 == 0)
|
||||
{
|
||||
uint8_t x_135;
|
||||
x_135 = 0;
|
||||
x_5 = x_135;
|
||||
goto block_132;
|
||||
uint8_t x_146;
|
||||
x_146 = 0;
|
||||
x_5 = x_146;
|
||||
goto block_143;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_136; lean_object* x_137; lean_object* x_138; uint8_t x_139;
|
||||
x_136 = l_Lean_Syntax_getArgs(x_1);
|
||||
x_137 = lean_array_get_size(x_136);
|
||||
lean_dec(x_136);
|
||||
x_138 = lean_unsigned_to_nat(3u);
|
||||
x_139 = lean_nat_dec_eq(x_137, x_138);
|
||||
lean_dec(x_137);
|
||||
x_5 = x_139;
|
||||
goto block_132;
|
||||
lean_object* x_147; lean_object* x_148; lean_object* x_149; uint8_t x_150;
|
||||
x_147 = l_Lean_Syntax_getArgs(x_1);
|
||||
x_148 = lean_array_get_size(x_147);
|
||||
lean_dec(x_147);
|
||||
x_149 = lean_unsigned_to_nat(3u);
|
||||
x_150 = lean_nat_dec_eq(x_148, x_149);
|
||||
lean_dec(x_148);
|
||||
x_5 = x_150;
|
||||
goto block_143;
|
||||
}
|
||||
block_132:
|
||||
block_143:
|
||||
{
|
||||
uint8_t x_6;
|
||||
x_6 = l_coeDecidableEq(x_5);
|
||||
|
|
@ -17712,71 +17780,71 @@ return x_8;
|
|||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_9; lean_object* x_10; uint8_t x_11; lean_object* x_117; uint8_t x_118;
|
||||
lean_object* x_9; lean_object* x_10; uint8_t x_11; lean_object* x_128; uint8_t x_129;
|
||||
x_9 = lean_unsigned_to_nat(1u);
|
||||
x_10 = l_Lean_Syntax_getArg(x_1, x_9);
|
||||
x_117 = l_Lean_nullKind___closed__2;
|
||||
x_128 = l_Lean_nullKind___closed__2;
|
||||
lean_inc(x_10);
|
||||
x_118 = l_Lean_Syntax_isOfKind(x_10, x_117);
|
||||
if (x_118 == 0)
|
||||
x_129 = l_Lean_Syntax_isOfKind(x_10, x_128);
|
||||
if (x_129 == 0)
|
||||
{
|
||||
uint8_t x_119;
|
||||
x_119 = l___private_Init_Lean_Elab_Term_4__isCDot___closed__1;
|
||||
if (x_119 == 0)
|
||||
uint8_t x_130;
|
||||
x_130 = l___private_Init_Lean_Elab_Term_4__isCDot___closed__1;
|
||||
if (x_130 == 0)
|
||||
{
|
||||
uint8_t x_120;
|
||||
x_120 = 0;
|
||||
x_11 = x_120;
|
||||
goto block_116;
|
||||
uint8_t x_131;
|
||||
x_131 = 0;
|
||||
x_11 = x_131;
|
||||
goto block_127;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_121; lean_object* x_122;
|
||||
lean_object* x_132; lean_object* x_133;
|
||||
lean_dec(x_10);
|
||||
lean_dec(x_3);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
x_121 = l_Lean_Elab_Term_elabParen___closed__6;
|
||||
x_122 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_122, 0, x_121);
|
||||
lean_ctor_set(x_122, 1, x_4);
|
||||
return x_122;
|
||||
x_132 = l_Lean_Elab_Term_elabParen___closed__6;
|
||||
x_133 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_133, 0, x_132);
|
||||
lean_ctor_set(x_133, 1, x_4);
|
||||
return x_133;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_123; lean_object* x_124; lean_object* x_125; uint8_t x_126; uint8_t x_127;
|
||||
x_123 = l_Lean_Syntax_getArgs(x_10);
|
||||
x_124 = lean_array_get_size(x_123);
|
||||
lean_dec(x_123);
|
||||
x_125 = lean_unsigned_to_nat(0u);
|
||||
x_126 = lean_nat_dec_eq(x_124, x_125);
|
||||
x_127 = l_coeDecidableEq(x_126);
|
||||
if (x_127 == 0)
|
||||
lean_object* x_134; lean_object* x_135; lean_object* x_136; uint8_t x_137; uint8_t x_138;
|
||||
x_134 = l_Lean_Syntax_getArgs(x_10);
|
||||
x_135 = lean_array_get_size(x_134);
|
||||
lean_dec(x_134);
|
||||
x_136 = lean_unsigned_to_nat(0u);
|
||||
x_137 = lean_nat_dec_eq(x_135, x_136);
|
||||
x_138 = l_coeDecidableEq(x_137);
|
||||
if (x_138 == 0)
|
||||
{
|
||||
lean_object* x_128; uint8_t x_129;
|
||||
x_128 = lean_unsigned_to_nat(2u);
|
||||
x_129 = lean_nat_dec_eq(x_124, x_128);
|
||||
lean_dec(x_124);
|
||||
x_11 = x_129;
|
||||
goto block_116;
|
||||
lean_object* x_139; uint8_t x_140;
|
||||
x_139 = lean_unsigned_to_nat(2u);
|
||||
x_140 = lean_nat_dec_eq(x_135, x_139);
|
||||
lean_dec(x_135);
|
||||
x_11 = x_140;
|
||||
goto block_127;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_130; lean_object* x_131;
|
||||
lean_dec(x_124);
|
||||
lean_object* x_141; lean_object* x_142;
|
||||
lean_dec(x_135);
|
||||
lean_dec(x_10);
|
||||
lean_dec(x_3);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
x_130 = l_Lean_Elab_Term_elabParen___closed__6;
|
||||
x_131 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_131, 0, x_130);
|
||||
lean_ctor_set(x_131, 1, x_4);
|
||||
return x_131;
|
||||
x_141 = l_Lean_Elab_Term_elabParen___closed__6;
|
||||
x_142 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_142, 0, x_141);
|
||||
lean_ctor_set(x_142, 1, x_4);
|
||||
return x_142;
|
||||
}
|
||||
}
|
||||
block_116:
|
||||
block_127:
|
||||
{
|
||||
uint8_t x_12;
|
||||
x_12 = l_coeDecidableEq(x_11);
|
||||
|
|
@ -17802,23 +17870,23 @@ lean_inc(x_17);
|
|||
x_19 = l_Lean_Syntax_isOfKind(x_17, x_18);
|
||||
if (x_19 == 0)
|
||||
{
|
||||
uint8_t x_112;
|
||||
x_112 = 0;
|
||||
x_20 = x_112;
|
||||
goto block_111;
|
||||
uint8_t x_123;
|
||||
x_123 = 0;
|
||||
x_20 = x_123;
|
||||
goto block_122;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_113; lean_object* x_114; uint8_t x_115;
|
||||
x_113 = l_Lean_Syntax_getArgs(x_17);
|
||||
x_114 = lean_array_get_size(x_113);
|
||||
lean_dec(x_113);
|
||||
x_115 = lean_nat_dec_eq(x_114, x_9);
|
||||
lean_dec(x_114);
|
||||
x_20 = x_115;
|
||||
goto block_111;
|
||||
lean_object* x_124; lean_object* x_125; uint8_t x_126;
|
||||
x_124 = l_Lean_Syntax_getArgs(x_17);
|
||||
x_125 = lean_array_get_size(x_124);
|
||||
lean_dec(x_124);
|
||||
x_126 = lean_nat_dec_eq(x_125, x_9);
|
||||
lean_dec(x_125);
|
||||
x_20 = x_126;
|
||||
goto block_122;
|
||||
}
|
||||
block_111:
|
||||
block_122:
|
||||
{
|
||||
uint8_t x_21;
|
||||
x_21 = l_coeDecidableEq(x_20);
|
||||
|
|
@ -17878,30 +17946,242 @@ return x_32;
|
|||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_33; uint8_t x_34; uint8_t x_70; lean_object* x_104; uint8_t x_105;
|
||||
lean_object* x_33; uint8_t x_34; lean_object* x_70; uint8_t x_71;
|
||||
x_33 = l_Lean_Syntax_getArg(x_17, x_15);
|
||||
lean_dec(x_17);
|
||||
x_104 = l_Lean_Parser_Term_typeAscription___elambda__1___closed__2;
|
||||
x_70 = l_Lean_Parser_Term_typeAscription___elambda__1___closed__2;
|
||||
lean_inc(x_33);
|
||||
x_105 = l_Lean_Syntax_isOfKind(x_33, x_104);
|
||||
if (x_105 == 0)
|
||||
x_71 = l_Lean_Syntax_isOfKind(x_33, x_70);
|
||||
if (x_71 == 0)
|
||||
{
|
||||
uint8_t x_106;
|
||||
x_106 = 0;
|
||||
x_70 = x_106;
|
||||
goto block_103;
|
||||
uint8_t x_72;
|
||||
x_72 = l___private_Init_Lean_Elab_Term_4__isCDot___closed__1;
|
||||
if (x_72 == 0)
|
||||
{
|
||||
lean_object* x_73; uint8_t x_74;
|
||||
x_73 = l_Lean_Parser_Term_tupleTail___elambda__1___closed__2;
|
||||
lean_inc(x_33);
|
||||
x_74 = l_Lean_Syntax_isOfKind(x_33, x_73);
|
||||
if (x_74 == 0)
|
||||
{
|
||||
uint8_t x_75;
|
||||
x_75 = 0;
|
||||
x_34 = x_75;
|
||||
goto block_69;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_107; lean_object* x_108; lean_object* x_109; uint8_t x_110;
|
||||
x_107 = l_Lean_Syntax_getArgs(x_33);
|
||||
x_108 = lean_array_get_size(x_107);
|
||||
lean_dec(x_107);
|
||||
x_109 = lean_unsigned_to_nat(2u);
|
||||
x_110 = lean_nat_dec_eq(x_108, x_109);
|
||||
lean_dec(x_108);
|
||||
x_70 = x_110;
|
||||
goto block_103;
|
||||
lean_object* x_76; lean_object* x_77; lean_object* x_78; uint8_t x_79;
|
||||
x_76 = l_Lean_Syntax_getArgs(x_33);
|
||||
x_77 = lean_array_get_size(x_76);
|
||||
lean_dec(x_76);
|
||||
x_78 = lean_unsigned_to_nat(2u);
|
||||
x_79 = lean_nat_dec_eq(x_77, x_78);
|
||||
lean_dec(x_77);
|
||||
x_34 = x_79;
|
||||
goto block_69;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_80; lean_object* x_81;
|
||||
lean_dec(x_2);
|
||||
x_80 = l_Lean_Syntax_getArg(x_33, x_9);
|
||||
lean_dec(x_33);
|
||||
lean_inc(x_3);
|
||||
x_81 = l_Lean_Elab_Term_elabType(x_80, x_3, x_4);
|
||||
if (lean_obj_tag(x_81) == 0)
|
||||
{
|
||||
lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85;
|
||||
x_82 = lean_ctor_get(x_81, 0);
|
||||
lean_inc(x_82);
|
||||
x_83 = lean_ctor_get(x_81, 1);
|
||||
lean_inc(x_83);
|
||||
lean_dec(x_81);
|
||||
x_84 = lean_alloc_ctor(1, 1, 0);
|
||||
lean_ctor_set(x_84, 0, x_82);
|
||||
lean_inc(x_3);
|
||||
lean_inc(x_84);
|
||||
x_85 = l___private_Init_Lean_Elab_Term_10__elabCDot(x_16, x_84, x_3, x_83);
|
||||
if (lean_obj_tag(x_85) == 0)
|
||||
{
|
||||
lean_object* x_86; lean_object* x_87; lean_object* x_88;
|
||||
x_86 = lean_ctor_get(x_85, 0);
|
||||
lean_inc(x_86);
|
||||
x_87 = lean_ctor_get(x_85, 1);
|
||||
lean_inc(x_87);
|
||||
lean_dec(x_85);
|
||||
x_88 = l_Lean_Elab_Term_ensureHasType(x_1, x_84, x_86, x_3, x_87);
|
||||
lean_dec(x_1);
|
||||
return x_88;
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_89;
|
||||
lean_dec(x_84);
|
||||
lean_dec(x_3);
|
||||
lean_dec(x_1);
|
||||
x_89 = !lean_is_exclusive(x_85);
|
||||
if (x_89 == 0)
|
||||
{
|
||||
return x_85;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_90; lean_object* x_91; lean_object* x_92;
|
||||
x_90 = lean_ctor_get(x_85, 0);
|
||||
x_91 = lean_ctor_get(x_85, 1);
|
||||
lean_inc(x_91);
|
||||
lean_inc(x_90);
|
||||
lean_dec(x_85);
|
||||
x_92 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_92, 0, x_90);
|
||||
lean_ctor_set(x_92, 1, x_91);
|
||||
return x_92;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_93;
|
||||
lean_dec(x_16);
|
||||
lean_dec(x_3);
|
||||
lean_dec(x_1);
|
||||
x_93 = !lean_is_exclusive(x_81);
|
||||
if (x_93 == 0)
|
||||
{
|
||||
return x_81;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_94; lean_object* x_95; lean_object* x_96;
|
||||
x_94 = lean_ctor_get(x_81, 0);
|
||||
x_95 = lean_ctor_get(x_81, 1);
|
||||
lean_inc(x_95);
|
||||
lean_inc(x_94);
|
||||
lean_dec(x_81);
|
||||
x_96 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_96, 0, x_94);
|
||||
lean_ctor_set(x_96, 1, x_95);
|
||||
return x_96;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_97; lean_object* x_98; lean_object* x_99; uint8_t x_100; uint8_t x_101;
|
||||
x_97 = l_Lean_Syntax_getArgs(x_33);
|
||||
x_98 = lean_array_get_size(x_97);
|
||||
lean_dec(x_97);
|
||||
x_99 = lean_unsigned_to_nat(2u);
|
||||
x_100 = lean_nat_dec_eq(x_98, x_99);
|
||||
lean_dec(x_98);
|
||||
x_101 = l_coeDecidableEq(x_100);
|
||||
if (x_101 == 0)
|
||||
{
|
||||
lean_object* x_102; uint8_t x_103;
|
||||
x_102 = l_Lean_Parser_Term_tupleTail___elambda__1___closed__2;
|
||||
lean_inc(x_33);
|
||||
x_103 = l_Lean_Syntax_isOfKind(x_33, x_102);
|
||||
if (x_103 == 0)
|
||||
{
|
||||
uint8_t x_104;
|
||||
x_104 = 0;
|
||||
x_34 = x_104;
|
||||
goto block_69;
|
||||
}
|
||||
else
|
||||
{
|
||||
x_34 = x_100;
|
||||
goto block_69;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_105; lean_object* x_106;
|
||||
lean_dec(x_2);
|
||||
x_105 = l_Lean_Syntax_getArg(x_33, x_9);
|
||||
lean_dec(x_33);
|
||||
lean_inc(x_3);
|
||||
x_106 = l_Lean_Elab_Term_elabType(x_105, x_3, x_4);
|
||||
if (lean_obj_tag(x_106) == 0)
|
||||
{
|
||||
lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110;
|
||||
x_107 = lean_ctor_get(x_106, 0);
|
||||
lean_inc(x_107);
|
||||
x_108 = lean_ctor_get(x_106, 1);
|
||||
lean_inc(x_108);
|
||||
lean_dec(x_106);
|
||||
x_109 = lean_alloc_ctor(1, 1, 0);
|
||||
lean_ctor_set(x_109, 0, x_107);
|
||||
lean_inc(x_3);
|
||||
lean_inc(x_109);
|
||||
x_110 = l___private_Init_Lean_Elab_Term_10__elabCDot(x_16, x_109, x_3, x_108);
|
||||
if (lean_obj_tag(x_110) == 0)
|
||||
{
|
||||
lean_object* x_111; lean_object* x_112; lean_object* x_113;
|
||||
x_111 = lean_ctor_get(x_110, 0);
|
||||
lean_inc(x_111);
|
||||
x_112 = lean_ctor_get(x_110, 1);
|
||||
lean_inc(x_112);
|
||||
lean_dec(x_110);
|
||||
x_113 = l_Lean_Elab_Term_ensureHasType(x_1, x_109, x_111, x_3, x_112);
|
||||
lean_dec(x_1);
|
||||
return x_113;
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_114;
|
||||
lean_dec(x_109);
|
||||
lean_dec(x_3);
|
||||
lean_dec(x_1);
|
||||
x_114 = !lean_is_exclusive(x_110);
|
||||
if (x_114 == 0)
|
||||
{
|
||||
return x_110;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_115; lean_object* x_116; lean_object* x_117;
|
||||
x_115 = lean_ctor_get(x_110, 0);
|
||||
x_116 = lean_ctor_get(x_110, 1);
|
||||
lean_inc(x_116);
|
||||
lean_inc(x_115);
|
||||
lean_dec(x_110);
|
||||
x_117 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_117, 0, x_115);
|
||||
lean_ctor_set(x_117, 1, x_116);
|
||||
return x_117;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_118;
|
||||
lean_dec(x_16);
|
||||
lean_dec(x_3);
|
||||
lean_dec(x_1);
|
||||
x_118 = !lean_is_exclusive(x_106);
|
||||
if (x_118 == 0)
|
||||
{
|
||||
return x_106;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_119; lean_object* x_120; lean_object* x_121;
|
||||
x_119 = lean_ctor_get(x_106, 0);
|
||||
x_120 = lean_ctor_get(x_106, 1);
|
||||
lean_inc(x_120);
|
||||
lean_inc(x_119);
|
||||
lean_dec(x_106);
|
||||
x_121 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_121, 0, x_119);
|
||||
lean_ctor_set(x_121, 1, x_120);
|
||||
return x_121;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
block_69:
|
||||
{
|
||||
|
|
@ -17999,160 +18279,6 @@ return x_68;
|
|||
}
|
||||
}
|
||||
}
|
||||
block_103:
|
||||
{
|
||||
uint8_t x_71;
|
||||
x_71 = l_coeDecidableEq(x_70);
|
||||
if (x_71 == 0)
|
||||
{
|
||||
lean_object* x_72; uint8_t x_73;
|
||||
x_72 = l_Lean_Parser_Term_tupleTail___elambda__1___closed__2;
|
||||
lean_inc(x_33);
|
||||
x_73 = l_Lean_Syntax_isOfKind(x_33, x_72);
|
||||
if (x_73 == 0)
|
||||
{
|
||||
uint8_t x_74;
|
||||
x_74 = 0;
|
||||
x_34 = x_74;
|
||||
goto block_69;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_75; lean_object* x_76; lean_object* x_77; uint8_t x_78;
|
||||
x_75 = l_Lean_Syntax_getArgs(x_33);
|
||||
x_76 = lean_array_get_size(x_75);
|
||||
lean_dec(x_75);
|
||||
x_77 = lean_unsigned_to_nat(2u);
|
||||
x_78 = lean_nat_dec_eq(x_76, x_77);
|
||||
lean_dec(x_76);
|
||||
x_34 = x_78;
|
||||
goto block_69;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_79; lean_object* x_80;
|
||||
lean_dec(x_2);
|
||||
x_79 = l_Lean_Syntax_getArg(x_33, x_9);
|
||||
lean_dec(x_33);
|
||||
lean_inc(x_3);
|
||||
x_80 = l_Lean_Elab_Term_elabType(x_79, x_3, x_4);
|
||||
if (lean_obj_tag(x_80) == 0)
|
||||
{
|
||||
lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84;
|
||||
x_81 = lean_ctor_get(x_80, 0);
|
||||
lean_inc(x_81);
|
||||
x_82 = lean_ctor_get(x_80, 1);
|
||||
lean_inc(x_82);
|
||||
lean_dec(x_80);
|
||||
x_83 = lean_alloc_ctor(1, 1, 0);
|
||||
lean_ctor_set(x_83, 0, x_81);
|
||||
lean_inc(x_3);
|
||||
lean_inc(x_83);
|
||||
x_84 = l___private_Init_Lean_Elab_Term_10__elabCDot(x_16, x_83, x_3, x_82);
|
||||
if (lean_obj_tag(x_84) == 0)
|
||||
{
|
||||
lean_object* x_85; lean_object* x_86; lean_object* x_87;
|
||||
x_85 = lean_ctor_get(x_84, 0);
|
||||
lean_inc(x_85);
|
||||
x_86 = lean_ctor_get(x_84, 1);
|
||||
lean_inc(x_86);
|
||||
lean_dec(x_84);
|
||||
lean_inc(x_3);
|
||||
lean_inc(x_85);
|
||||
x_87 = l_Lean_Elab_Term_inferType(x_1, x_85, x_3, x_86);
|
||||
if (lean_obj_tag(x_87) == 0)
|
||||
{
|
||||
lean_object* x_88; lean_object* x_89; lean_object* x_90;
|
||||
x_88 = lean_ctor_get(x_87, 0);
|
||||
lean_inc(x_88);
|
||||
x_89 = lean_ctor_get(x_87, 1);
|
||||
lean_inc(x_89);
|
||||
lean_dec(x_87);
|
||||
x_90 = l_Lean_Elab_Term_ensureHasType(x_1, x_83, x_88, x_85, x_3, x_89);
|
||||
lean_dec(x_1);
|
||||
return x_90;
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_91;
|
||||
lean_dec(x_85);
|
||||
lean_dec(x_83);
|
||||
lean_dec(x_3);
|
||||
lean_dec(x_1);
|
||||
x_91 = !lean_is_exclusive(x_87);
|
||||
if (x_91 == 0)
|
||||
{
|
||||
return x_87;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_92; lean_object* x_93; lean_object* x_94;
|
||||
x_92 = lean_ctor_get(x_87, 0);
|
||||
x_93 = lean_ctor_get(x_87, 1);
|
||||
lean_inc(x_93);
|
||||
lean_inc(x_92);
|
||||
lean_dec(x_87);
|
||||
x_94 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_94, 0, x_92);
|
||||
lean_ctor_set(x_94, 1, x_93);
|
||||
return x_94;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_95;
|
||||
lean_dec(x_83);
|
||||
lean_dec(x_3);
|
||||
lean_dec(x_1);
|
||||
x_95 = !lean_is_exclusive(x_84);
|
||||
if (x_95 == 0)
|
||||
{
|
||||
return x_84;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_96; lean_object* x_97; lean_object* x_98;
|
||||
x_96 = lean_ctor_get(x_84, 0);
|
||||
x_97 = lean_ctor_get(x_84, 1);
|
||||
lean_inc(x_97);
|
||||
lean_inc(x_96);
|
||||
lean_dec(x_84);
|
||||
x_98 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_98, 0, x_96);
|
||||
lean_ctor_set(x_98, 1, x_97);
|
||||
return x_98;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_99;
|
||||
lean_dec(x_16);
|
||||
lean_dec(x_3);
|
||||
lean_dec(x_1);
|
||||
x_99 = !lean_is_exclusive(x_80);
|
||||
if (x_99 == 0)
|
||||
{
|
||||
return x_80;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_100; lean_object* x_101; lean_object* x_102;
|
||||
x_100 = lean_ctor_get(x_80, 0);
|
||||
x_101 = lean_ctor_get(x_80, 1);
|
||||
lean_inc(x_101);
|
||||
lean_inc(x_100);
|
||||
lean_dec(x_80);
|
||||
x_102 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_102, 0, x_100);
|
||||
lean_ctor_set(x_102, 1, x_101);
|
||||
return x_102;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -20606,12 +20732,12 @@ l_Lean_Elab_Term_ensureType___closed__1 = _init_l_Lean_Elab_Term_ensureType___cl
|
|||
lean_mark_persistent(l_Lean_Elab_Term_ensureType___closed__1);
|
||||
l_Lean_Elab_Term_ensureType___closed__2 = _init_l_Lean_Elab_Term_ensureType___closed__2();
|
||||
lean_mark_persistent(l_Lean_Elab_Term_ensureType___closed__2);
|
||||
l_Lean_Elab_Term_ensureHasType___closed__1 = _init_l_Lean_Elab_Term_ensureHasType___closed__1();
|
||||
lean_mark_persistent(l_Lean_Elab_Term_ensureHasType___closed__1);
|
||||
l_Lean_Elab_Term_ensureHasType___closed__2 = _init_l_Lean_Elab_Term_ensureHasType___closed__2();
|
||||
lean_mark_persistent(l_Lean_Elab_Term_ensureHasType___closed__2);
|
||||
l_Lean_Elab_Term_ensureHasType___closed__3 = _init_l_Lean_Elab_Term_ensureHasType___closed__3();
|
||||
lean_mark_persistent(l_Lean_Elab_Term_ensureHasType___closed__3);
|
||||
l_Lean_Elab_Term_ensureHasTypeAux___closed__1 = _init_l_Lean_Elab_Term_ensureHasTypeAux___closed__1();
|
||||
lean_mark_persistent(l_Lean_Elab_Term_ensureHasTypeAux___closed__1);
|
||||
l_Lean_Elab_Term_ensureHasTypeAux___closed__2 = _init_l_Lean_Elab_Term_ensureHasTypeAux___closed__2();
|
||||
lean_mark_persistent(l_Lean_Elab_Term_ensureHasTypeAux___closed__2);
|
||||
l_Lean_Elab_Term_ensureHasTypeAux___closed__3 = _init_l_Lean_Elab_Term_ensureHasTypeAux___closed__3();
|
||||
lean_mark_persistent(l_Lean_Elab_Term_ensureHasTypeAux___closed__3);
|
||||
l_Lean_Elab_Term_synthesizeInstMVarCore___closed__1 = _init_l_Lean_Elab_Term_synthesizeInstMVarCore___closed__1();
|
||||
lean_mark_persistent(l_Lean_Elab_Term_synthesizeInstMVarCore___closed__1);
|
||||
l_Lean_Elab_Term_synthesizeInstMVarCore___closed__2 = _init_l_Lean_Elab_Term_synthesizeInstMVarCore___closed__2();
|
||||
|
|
|
|||
|
|
@ -104,7 +104,6 @@ lean_object* l___private_Init_Lean_Elab_TermApp_17__mergeFailures(lean_object*);
|
|||
lean_object* l___private_Init_Lean_Elab_TermApp_8__resolveLValLoop___main(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Array_forMAux___main___at___private_Init_Lean_Elab_TermApp_1__synthesizeAppInstMVars___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* lean_nat_add(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_ensureHasType(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Array_foldlStepMAux___main___at_Lean_Syntax_foldSepRevArgsM___spec__1(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_List_foldlM___main___at___private_Init_Lean_Elab_TermApp_10__mkBaseProjections___spec__1___closed__1;
|
||||
lean_object* l___private_Init_Lean_Elab_TermApp_11__addLValArg___main___closed__7;
|
||||
|
|
@ -331,6 +330,7 @@ lean_object* l___private_Init_Lean_Elab_TermApp_12__elabAppLValsAux___main___box
|
|||
lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabSortApp(lean_object*);
|
||||
lean_object* l___private_Init_Lean_Elab_TermApp_1__synthesizeAppInstMVars(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Init_Lean_Elab_TermApp_7__resolveLValAux___closed__22;
|
||||
lean_object* l_Lean_Elab_Term_ensureHasTypeAux(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_List_map___main___at___private_Init_Lean_Elab_TermApp_14__elabAppFn___main___spec__1(lean_object*);
|
||||
lean_object* l_Array_insertAt___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_findField_x3f___main(lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -1306,7 +1306,7 @@ lean_object* x_87;
|
|||
lean_dec(x_41);
|
||||
lean_dec(x_6);
|
||||
lean_inc(x_10);
|
||||
x_87 = l_Lean_Elab_Term_ensureHasType(x_1, x_3, x_8, x_9, x_10, x_14);
|
||||
x_87 = l_Lean_Elab_Term_ensureHasTypeAux(x_1, x_3, x_8, x_9, x_10, x_14);
|
||||
if (lean_obj_tag(x_87) == 0)
|
||||
{
|
||||
lean_object* x_88; lean_object* x_89; lean_object* x_90;
|
||||
|
|
@ -1530,7 +1530,7 @@ lean_object* x_138;
|
|||
lean_dec(x_41);
|
||||
lean_dec(x_6);
|
||||
lean_inc(x_10);
|
||||
x_138 = l_Lean_Elab_Term_ensureHasType(x_1, x_3, x_8, x_9, x_10, x_14);
|
||||
x_138 = l_Lean_Elab_Term_ensureHasTypeAux(x_1, x_3, x_8, x_9, x_10, x_14);
|
||||
if (lean_obj_tag(x_138) == 0)
|
||||
{
|
||||
lean_object* x_139; lean_object* x_140; lean_object* x_141;
|
||||
|
|
@ -1812,7 +1812,7 @@ else
|
|||
{
|
||||
lean_object* x_23;
|
||||
lean_inc(x_10);
|
||||
x_23 = l_Lean_Elab_Term_ensureHasType(x_1, x_3, x_8, x_9, x_10, x_14);
|
||||
x_23 = l_Lean_Elab_Term_ensureHasTypeAux(x_1, x_3, x_8, x_9, x_10, x_14);
|
||||
if (lean_obj_tag(x_23) == 0)
|
||||
{
|
||||
lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27;
|
||||
|
|
|
|||
|
|
@ -609,6 +609,7 @@ lean_object* l_Lean_Parser_Term_hole___elambda__1___closed__3;
|
|||
lean_object* l_Lean_Parser_Term_sort___closed__2;
|
||||
lean_object* l_Lean_Parser_Term_uminus___closed__3;
|
||||
lean_object* l_Lean_Parser_Term_let___closed__1;
|
||||
lean_object* l_Lean_Parser_Term_namedHole___elambda__1(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Parser_Term_subtype___elambda__1___closed__4;
|
||||
lean_object* l_Lean_Parser_Term_typeAscription;
|
||||
lean_object* l_Lean_Parser_Term_letIdDecl___elambda__1___closed__2;
|
||||
|
|
@ -682,6 +683,7 @@ lean_object* l_Lean_Parser_Term_band___elambda__1___closed__2;
|
|||
lean_object* l_Lean_Parser_Term_fun___elambda__1___closed__8;
|
||||
lean_object* l___private_Init_Lean_Parser_Parser_2__sepByFnAux___main___at_Lean_Parser_Term_where___elambda__1___spec__2___closed__2;
|
||||
lean_object* l_Lean_Parser_Term_nomatch;
|
||||
lean_object* l_Lean_Parser_Term_namedHole___elambda__1___closed__6;
|
||||
lean_object* l_Lean_Parser_Term_parenSpecial;
|
||||
lean_object* l_Lean_Parser_Term_mapConst___elambda__1___closed__4;
|
||||
lean_object* l_Lean_Parser_Term_proj___closed__4;
|
||||
|
|
@ -835,6 +837,7 @@ lean_object* l_Lean_Parser_Term_doElem;
|
|||
lean_object* l_Lean_Parser_Term_where___closed__8;
|
||||
lean_object* l_Lean_Parser_Term_do___closed__6;
|
||||
lean_object* l_Lean_Parser_Term_if___elambda__1___closed__6;
|
||||
lean_object* l_Lean_Parser_Term_namedHole___elambda__1___closed__8;
|
||||
lean_object* l_Lean_Parser_Term_doId___elambda__1___closed__2;
|
||||
lean_object* l_Lean_Parser_Term_typeAscription___elambda__1___closed__7;
|
||||
lean_object* l_Lean_Parser_Term_fun___closed__1;
|
||||
|
|
@ -892,6 +895,7 @@ lean_object* l___regBuiltinParser_Lean_Parser_Term_bindOp(lean_object*);
|
|||
lean_object* l_Lean_Parser_Term_seqRight___closed__2;
|
||||
lean_object* l_Lean_Parser_Term_matchAlt___elambda__1___closed__6;
|
||||
lean_object* l_Lean_Parser_Term_sort___closed__4;
|
||||
lean_object* l_Lean_Parser_Term_namedHole;
|
||||
lean_object* l_Lean_Parser_Term_prod___elambda__1___closed__4;
|
||||
lean_object* l_Lean_Parser_Term_heq___elambda__1(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Parser_Term_paren___closed__6;
|
||||
|
|
@ -919,6 +923,7 @@ lean_object* l_Lean_Parser_Term_forall___elambda__1___closed__9;
|
|||
lean_object* l_Lean_Parser_Term_cdot___closed__5;
|
||||
lean_object* l_Lean_Parser_sepBy1Fn___at_Lean_Parser_Term_tupleTail___elambda__1___spec__1(uint8_t, uint8_t, uint8_t, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Parser_Term_num___closed__1;
|
||||
lean_object* l_Lean_Parser_Term_namedHole___elambda__1___closed__2;
|
||||
lean_object* l_Lean_Parser_orelseInfo(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Parser_dollarSymbol___elambda__1___rarg(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Parser_Term_suffices___elambda__1___closed__8;
|
||||
|
|
@ -1014,6 +1019,7 @@ lean_object* l_Lean_Parser_Term_proj___closed__3;
|
|||
lean_object* l_Lean_Parser_manyAux___main___at_Lean_Parser_Term_match___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Parser_Term_uminus;
|
||||
lean_object* l_Lean_Parser_Term_namedArgument;
|
||||
lean_object* l_Lean_Parser_Term_namedHole___elambda__1___closed__1;
|
||||
lean_object* l_Lean_Parser_Term_implicitBinder(uint8_t);
|
||||
lean_object* l___regBuiltinParser_Lean_Parser_Term_seqLeft(lean_object*);
|
||||
lean_object* l_Lean_Parser_Term_orM___closed__3;
|
||||
|
|
@ -1036,6 +1042,7 @@ lean_object* l_Lean_Parser_Term_show___closed__5;
|
|||
lean_object* l_Lean_Parser_Term_beq___elambda__1___closed__1;
|
||||
lean_object* l_Lean_Parser_Term_uminus___elambda__1___closed__5;
|
||||
lean_object* l_Lean_Parser_Term_have___elambda__1___closed__4;
|
||||
lean_object* l_Lean_Parser_Term_namedHole___elambda__1___closed__3;
|
||||
lean_object* l_Lean_Parser_sepByFn___at_Lean_Parser_Term_listLit___elambda__1___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Parser_Term_char___elambda__1(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Parser_Term_explicitBinder___closed__1;
|
||||
|
|
@ -1055,6 +1062,7 @@ lean_object* l_Lean_Parser_Term_structInstField___elambda__1___closed__4;
|
|||
lean_object* l___regBuiltinParser_Lean_Parser_Term_fcomp(lean_object*);
|
||||
lean_object* l_Lean_Parser_Term_bne___elambda__1(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Parser_Term_let___elambda__1___closed__8;
|
||||
lean_object* l_Lean_Parser_Term_namedHole___closed__5;
|
||||
lean_object* l_Lean_Parser_manyAux___main___at_Lean_Parser_Term_fun___elambda__1___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Parser_Term_mod___elambda__1___closed__4;
|
||||
lean_object* l_Lean_Parser_Term_structInst___closed__2;
|
||||
|
|
@ -1070,6 +1078,7 @@ lean_object* l___regBuiltinParser_Lean_Parser_Term_orM(lean_object*);
|
|||
lean_object* l___regBuiltinParser_Lean_Parser_Term_heq(lean_object*);
|
||||
lean_object* l_Lean_Parser_Term_typeAscription___elambda__1___closed__8;
|
||||
lean_object* l_Lean_Parser_Term_namedArgument___closed__1;
|
||||
lean_object* l_Lean_Parser_Term_namedHole___elambda__1___closed__5;
|
||||
lean_object* l_Lean_Parser_Term_arrow___elambda__1(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Parser_Term_uminus___elambda__1___closed__3;
|
||||
lean_object* l_Lean_Parser_Term_namedPattern___closed__5;
|
||||
|
|
@ -1159,6 +1168,7 @@ lean_object* l_Lean_Parser_Term_anonymousCtor___elambda__1(lean_object*, lean_ob
|
|||
lean_object* l_Lean_Parser_Term_listLit___elambda__1___closed__11;
|
||||
lean_object* l_Lean_Parser_ParserState_popSyntax(lean_object*);
|
||||
lean_object* l_Lean_Parser_Term_parser_x21;
|
||||
extern lean_object* l_Lean_Parser_FirstTokens_toStr___closed__3;
|
||||
lean_object* l_Lean_Parser_Term_mapConstRev___elambda__1___closed__2;
|
||||
lean_object* l_Lean_Parser_Term_inaccessible___elambda__1___closed__9;
|
||||
lean_object* l___regBuiltinParser_Lean_Parser_Term_nomatch(lean_object*);
|
||||
|
|
@ -1217,6 +1227,7 @@ lean_object* l_Lean_Parser_Term_binderType___closed__5;
|
|||
lean_object* l_Lean_Parser_Term_explicitUniv___elambda__1___closed__4;
|
||||
lean_object* l_Lean_Parser_Term_have___elambda__1___closed__8;
|
||||
lean_object* l_Lean_Parser_Term_fromTerm___elambda__1___closed__6;
|
||||
lean_object* l_Lean_Parser_Term_namedHole___elambda__1___closed__7;
|
||||
lean_object* l_Lean_Parser_Term_letIdLhs___closed__2;
|
||||
lean_object* l_Lean_Parser_categoryParserFn(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Parser_Term_doPat___closed__1;
|
||||
|
|
@ -1256,6 +1267,7 @@ lean_object* l_Lean_Parser_Term_instBinder___closed__2;
|
|||
extern lean_object* l_Lean_Parser_regBuiltinTermParserAttr___closed__4;
|
||||
lean_object* l_Lean_Parser_Term_letDecl___closed__1;
|
||||
lean_object* l_Lean_Parser_Term_unicodeInfixL___boxed(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Parser_Term_namedHole___closed__3;
|
||||
lean_object* l_Lean_Parser_Term_doSeq___closed__5;
|
||||
lean_object* l_Lean_Parser_Term_emptyC___closed__4;
|
||||
lean_object* l_Lean_Parser_Term_band___closed__3;
|
||||
|
|
@ -1523,6 +1535,7 @@ lean_object* l_Lean_Parser_Term_mul___closed__3;
|
|||
lean_object* l___regBuiltinParser_Lean_Parser_Term_cons(lean_object*);
|
||||
lean_object* l_Lean_Parser_Term_forall___closed__8;
|
||||
lean_object* l_Lean_Parser_Term_fromTerm___closed__6;
|
||||
lean_object* l___regBuiltinParser_Lean_Parser_Term_namedHole(lean_object*);
|
||||
lean_object* l_Lean_Parser_Term_type;
|
||||
lean_object* l_Lean_Parser_Term_pow___closed__1;
|
||||
lean_object* l_Lean_Parser_Term_binderType___closed__4;
|
||||
|
|
@ -1688,6 +1701,7 @@ lean_object* l_Lean_Parser_Term_fromTerm___elambda__1___closed__7;
|
|||
lean_object* l_Lean_Parser_Term_where___closed__2;
|
||||
lean_object* l_Lean_Parser_Term_do___elambda__1___closed__6;
|
||||
lean_object* l_Lean_Parser_Term_doLet___elambda__1___closed__2;
|
||||
lean_object* l_Lean_Parser_Term_namedHole___closed__6;
|
||||
lean_object* l___regBuiltinParser_Lean_Parser_Term_listLit(lean_object*);
|
||||
lean_object* l_Lean_Parser_Term_type___elambda__1___closed__6;
|
||||
lean_object* l_Lean_Parser_mkAntiquot(uint8_t, lean_object*, lean_object*, uint8_t);
|
||||
|
|
@ -1706,6 +1720,7 @@ lean_object* l_Lean_Parser_Term_doId___elambda__1(lean_object*, lean_object*, le
|
|||
lean_object* l_Lean_Parser_Term_mapConst___elambda__1(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Parser_Term_hole___closed__3;
|
||||
lean_object* l_Lean_Parser_Term_structInstSource___elambda__1___closed__3;
|
||||
lean_object* l_Lean_Parser_Term_namedHole___closed__2;
|
||||
lean_object* l_Lean_Parser_Term_structInstField___closed__3;
|
||||
lean_object* l_Lean_Parser_Term_parser_x21___elambda__1___closed__3;
|
||||
lean_object* l_Lean_Parser_Term_depArrow___elambda__1___closed__12;
|
||||
|
|
@ -1783,6 +1798,7 @@ lean_object* l_Lean_Parser_Term_iff___elambda__1___closed__5;
|
|||
lean_object* l_Lean_Parser_many1Fn___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Parser_Term_letIdLhs;
|
||||
lean_object* l_Lean_Parser_darrow___elambda__1___rarg(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Parser_Term_namedHole___closed__4;
|
||||
lean_object* l_Lean_Parser_Term_show___elambda__1___closed__9;
|
||||
lean_object* l_Lean_Parser_Term_subtype___closed__8;
|
||||
lean_object* l_Lean_Parser_Term_num___elambda__1(lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -1855,6 +1871,7 @@ lean_object* l_Lean_Parser_charLitFn___rarg(lean_object*, lean_object*);
|
|||
lean_object* l_Lean_Parser_Term_bindOp___elambda__1___closed__2;
|
||||
lean_object* l_Lean_Parser_Term_do___elambda__1(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Parser_Term_letDecl___closed__3;
|
||||
lean_object* l_Lean_Parser_Term_namedHole___elambda__1___closed__4;
|
||||
lean_object* l_Lean_Parser_Term_subtype___elambda__1___closed__3;
|
||||
lean_object* l_Lean_Parser_Term_if___closed__7;
|
||||
lean_object* l_Lean_Parser_Term_match___closed__10;
|
||||
|
|
@ -1907,6 +1924,7 @@ lean_object* l_Lean_Parser_Term_char___elambda__1___closed__1;
|
|||
lean_object* l_Lean_Parser_Term_bnot___elambda__1(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Parser_Term_let;
|
||||
lean_object* l_Lean_Parser_Term_depArrow___closed__3;
|
||||
lean_object* l_Lean_Parser_Term_namedHole___closed__1;
|
||||
lean_object* l_Lean_Parser_Term_map;
|
||||
lean_object* l_Lean_Parser_Term_unicodeInfixR(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Parser_Term_tparser_x21___elambda__1___closed__9;
|
||||
|
|
@ -5443,6 +5461,320 @@ 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_Term_namedHole___elambda__1___closed__1() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_mk_string("namedHole");
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_Lean_Parser_Term_namedHole___elambda__1___closed__2() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
x_1 = l_Lean_Parser_Term_explicitUniv___elambda__1___closed__2;
|
||||
x_2 = l_Lean_Parser_Term_namedHole___elambda__1___closed__1;
|
||||
x_3 = lean_name_mk_string(x_1, x_2);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_Lean_Parser_Term_namedHole___elambda__1___closed__3() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2;
|
||||
x_1 = l_Lean_Parser_Term_namedHole___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_Term_namedHole___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_Term_namedHole___elambda__1___closed__1;
|
||||
x_3 = l_Lean_Parser_Term_namedHole___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_Term_namedHole___elambda__1___closed__5() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2;
|
||||
x_1 = l_Lean_Parser_FirstTokens_toStr___closed__3;
|
||||
x_2 = l_String_trim(x_1);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_Lean_Parser_Term_namedHole___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_Term_namedHole___elambda__1___closed__5;
|
||||
x_3 = lean_string_append(x_1, x_2);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_Lean_Parser_Term_namedHole___elambda__1___closed__7() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
x_1 = l_Lean_Parser_Term_namedHole___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* _init_l_Lean_Parser_Term_namedHole___elambda__1___closed__8() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
x_1 = lean_box(0);
|
||||
x_2 = l_Lean_Parser_Term_namedHole___elambda__1___closed__7;
|
||||
x_3 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_3, 0, x_2);
|
||||
lean_ctor_set(x_3, 1, x_1);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Parser_Term_namedHole___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_Term_namedHole___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_29; lean_object* x_30;
|
||||
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);
|
||||
lean_inc(x_2);
|
||||
x_29 = l_Lean_Parser_tokenFn(x_2, x_16);
|
||||
x_30 = lean_ctor_get(x_29, 3);
|
||||
lean_inc(x_30);
|
||||
if (lean_obj_tag(x_30) == 0)
|
||||
{
|
||||
lean_object* x_31; lean_object* x_32;
|
||||
x_31 = lean_ctor_get(x_29, 0);
|
||||
lean_inc(x_31);
|
||||
x_32 = l_Array_back___at___private_Init_Lean_Parser_Parser_6__updateCache___spec__1(x_31);
|
||||
lean_dec(x_31);
|
||||
if (lean_obj_tag(x_32) == 2)
|
||||
{
|
||||
lean_object* x_33; lean_object* x_34; uint8_t x_35;
|
||||
x_33 = lean_ctor_get(x_32, 1);
|
||||
lean_inc(x_33);
|
||||
lean_dec(x_32);
|
||||
x_34 = l_Lean_Parser_Term_namedHole___elambda__1___closed__5;
|
||||
x_35 = lean_string_dec_eq(x_33, x_34);
|
||||
lean_dec(x_33);
|
||||
if (x_35 == 0)
|
||||
{
|
||||
lean_object* x_36; lean_object* x_37;
|
||||
x_36 = l_Lean_Parser_Term_namedHole___elambda__1___closed__8;
|
||||
lean_inc(x_10);
|
||||
x_37 = l_Lean_Parser_ParserState_mkErrorsAt(x_29, x_36, x_10);
|
||||
x_19 = x_37;
|
||||
goto block_28;
|
||||
}
|
||||
else
|
||||
{
|
||||
x_19 = x_29;
|
||||
goto block_28;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_38; lean_object* x_39;
|
||||
lean_dec(x_32);
|
||||
x_38 = l_Lean_Parser_Term_namedHole___elambda__1___closed__8;
|
||||
lean_inc(x_10);
|
||||
x_39 = l_Lean_Parser_ParserState_mkErrorsAt(x_29, x_38, x_10);
|
||||
x_19 = x_39;
|
||||
goto block_28;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_40; lean_object* x_41;
|
||||
lean_dec(x_30);
|
||||
x_40 = l_Lean_Parser_Term_namedHole___elambda__1___closed__8;
|
||||
lean_inc(x_10);
|
||||
x_41 = l_Lean_Parser_ParserState_mkErrorsAt(x_29, x_40, x_10);
|
||||
x_19 = x_41;
|
||||
goto block_28;
|
||||
}
|
||||
block_28:
|
||||
{
|
||||
lean_object* x_20;
|
||||
x_20 = lean_ctor_get(x_19, 3);
|
||||
lean_inc(x_20);
|
||||
if (lean_obj_tag(x_20) == 0)
|
||||
{
|
||||
lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24;
|
||||
x_21 = lean_apply_3(x_5, x_1, x_2, x_19);
|
||||
x_22 = l_Lean_Parser_Term_namedHole___elambda__1___closed__2;
|
||||
x_23 = l_Lean_Parser_ParserState_mkNode(x_21, x_22, x_18);
|
||||
x_24 = l_Lean_Parser_mergeOrElseErrors(x_23, x_13, x_10);
|
||||
lean_dec(x_10);
|
||||
return x_24;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_25; lean_object* x_26; lean_object* x_27;
|
||||
lean_dec(x_20);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
x_25 = l_Lean_Parser_Term_namedHole___elambda__1___closed__2;
|
||||
x_26 = l_Lean_Parser_ParserState_mkNode(x_19, x_25, x_18);
|
||||
x_27 = l_Lean_Parser_mergeOrElseErrors(x_26, x_13, x_10);
|
||||
lean_dec(x_10);
|
||||
return x_27;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_Lean_Parser_Term_namedHole___closed__1() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
x_1 = l_Lean_Parser_Term_namedHole___elambda__1___closed__5;
|
||||
x_2 = l_Lean_Parser_Level_paren___closed__1;
|
||||
x_3 = l_Lean_Parser_symbolInfo(x_1, x_2);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_Lean_Parser_Term_namedHole___closed__2() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
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_Term_namedHole___closed__1;
|
||||
x_4 = l_Lean_Parser_andthenInfo(x_3, x_2);
|
||||
return x_4;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_Lean_Parser_Term_namedHole___closed__3() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
x_1 = l_Lean_Parser_Term_namedHole___elambda__1___closed__2;
|
||||
x_2 = l_Lean_Parser_Term_namedHole___closed__2;
|
||||
x_3 = l_Lean_Parser_nodeInfo(x_1, x_2);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_Lean_Parser_Term_namedHole___closed__4() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_1 = l_Lean_Parser_Term_namedHole___elambda__1___closed__4;
|
||||
x_2 = lean_ctor_get(x_1, 0);
|
||||
lean_inc(x_2);
|
||||
x_3 = l_Lean_Parser_Term_namedHole___closed__3;
|
||||
x_4 = l_Lean_Parser_orelseInfo(x_2, x_3);
|
||||
return x_4;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_Lean_Parser_Term_namedHole___closed__5() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_alloc_closure((void*)(l_Lean_Parser_Term_namedHole___elambda__1), 3, 0);
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_Lean_Parser_Term_namedHole___closed__6() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
x_1 = l_Lean_Parser_Term_namedHole___closed__4;
|
||||
x_2 = l_Lean_Parser_Term_namedHole___closed__5;
|
||||
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_Term_namedHole() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = l_Lean_Parser_Term_namedHole___closed__6;
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
lean_object* l___regBuiltinParser_Lean_Parser_Term_namedHole(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_regBuiltinTermParserAttr___closed__4;
|
||||
x_4 = l_Lean_Parser_Term_namedHole___elambda__1___closed__2;
|
||||
x_5 = l_Lean_Parser_Term_namedHole;
|
||||
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_Term_sorry___elambda__1___closed__1() {
|
||||
_start:
|
||||
{
|
||||
|
|
@ -37549,6 +37881,39 @@ lean_mark_persistent(l_Lean_Parser_Term_hole);
|
|||
res = l___regBuiltinParser_Lean_Parser_Term_hole(lean_io_mk_world());
|
||||
if (lean_io_result_is_error(res)) return res;
|
||||
lean_dec_ref(res);
|
||||
l_Lean_Parser_Term_namedHole___elambda__1___closed__1 = _init_l_Lean_Parser_Term_namedHole___elambda__1___closed__1();
|
||||
lean_mark_persistent(l_Lean_Parser_Term_namedHole___elambda__1___closed__1);
|
||||
l_Lean_Parser_Term_namedHole___elambda__1___closed__2 = _init_l_Lean_Parser_Term_namedHole___elambda__1___closed__2();
|
||||
lean_mark_persistent(l_Lean_Parser_Term_namedHole___elambda__1___closed__2);
|
||||
l_Lean_Parser_Term_namedHole___elambda__1___closed__3 = _init_l_Lean_Parser_Term_namedHole___elambda__1___closed__3();
|
||||
lean_mark_persistent(l_Lean_Parser_Term_namedHole___elambda__1___closed__3);
|
||||
l_Lean_Parser_Term_namedHole___elambda__1___closed__4 = _init_l_Lean_Parser_Term_namedHole___elambda__1___closed__4();
|
||||
lean_mark_persistent(l_Lean_Parser_Term_namedHole___elambda__1___closed__4);
|
||||
l_Lean_Parser_Term_namedHole___elambda__1___closed__5 = _init_l_Lean_Parser_Term_namedHole___elambda__1___closed__5();
|
||||
lean_mark_persistent(l_Lean_Parser_Term_namedHole___elambda__1___closed__5);
|
||||
l_Lean_Parser_Term_namedHole___elambda__1___closed__6 = _init_l_Lean_Parser_Term_namedHole___elambda__1___closed__6();
|
||||
lean_mark_persistent(l_Lean_Parser_Term_namedHole___elambda__1___closed__6);
|
||||
l_Lean_Parser_Term_namedHole___elambda__1___closed__7 = _init_l_Lean_Parser_Term_namedHole___elambda__1___closed__7();
|
||||
lean_mark_persistent(l_Lean_Parser_Term_namedHole___elambda__1___closed__7);
|
||||
l_Lean_Parser_Term_namedHole___elambda__1___closed__8 = _init_l_Lean_Parser_Term_namedHole___elambda__1___closed__8();
|
||||
lean_mark_persistent(l_Lean_Parser_Term_namedHole___elambda__1___closed__8);
|
||||
l_Lean_Parser_Term_namedHole___closed__1 = _init_l_Lean_Parser_Term_namedHole___closed__1();
|
||||
lean_mark_persistent(l_Lean_Parser_Term_namedHole___closed__1);
|
||||
l_Lean_Parser_Term_namedHole___closed__2 = _init_l_Lean_Parser_Term_namedHole___closed__2();
|
||||
lean_mark_persistent(l_Lean_Parser_Term_namedHole___closed__2);
|
||||
l_Lean_Parser_Term_namedHole___closed__3 = _init_l_Lean_Parser_Term_namedHole___closed__3();
|
||||
lean_mark_persistent(l_Lean_Parser_Term_namedHole___closed__3);
|
||||
l_Lean_Parser_Term_namedHole___closed__4 = _init_l_Lean_Parser_Term_namedHole___closed__4();
|
||||
lean_mark_persistent(l_Lean_Parser_Term_namedHole___closed__4);
|
||||
l_Lean_Parser_Term_namedHole___closed__5 = _init_l_Lean_Parser_Term_namedHole___closed__5();
|
||||
lean_mark_persistent(l_Lean_Parser_Term_namedHole___closed__5);
|
||||
l_Lean_Parser_Term_namedHole___closed__6 = _init_l_Lean_Parser_Term_namedHole___closed__6();
|
||||
lean_mark_persistent(l_Lean_Parser_Term_namedHole___closed__6);
|
||||
l_Lean_Parser_Term_namedHole = _init_l_Lean_Parser_Term_namedHole();
|
||||
lean_mark_persistent(l_Lean_Parser_Term_namedHole);
|
||||
res = l___regBuiltinParser_Lean_Parser_Term_namedHole(lean_io_mk_world());
|
||||
if (lean_io_result_is_error(res)) return res;
|
||||
lean_dec_ref(res);
|
||||
l_Lean_Parser_Term_sorry___elambda__1___closed__1 = _init_l_Lean_Parser_Term_sorry___elambda__1___closed__1();
|
||||
lean_mark_persistent(l_Lean_Parser_Term_sorry___elambda__1___closed__1);
|
||||
l_Lean_Parser_Term_sorry___elambda__1___closed__2 = _init_l_Lean_Parser_Term_sorry___elambda__1___closed__2();
|
||||
|
|
|
|||
|
|
@ -41,8 +41,10 @@ lean_object* l_Lean_Syntax_ifNodeKind___rarg(lean_object*, lean_object*, lean_ob
|
|||
lean_object* l_Lean_Syntax_formatStxAux___main___closed__14;
|
||||
lean_object* l_Array_findMAux___main___at_Lean_Syntax_getHeadInfo___main___spec__1(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Syntax_isAtom___boxed(lean_object*);
|
||||
lean_object* l_Array_findRevMAux___main___at_Lean_Syntax_getTailWithInfo___main___spec__1(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Syntax_mrewriteBottomUp___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Syntax_getIdAt(lean_object*, lean_object*);
|
||||
lean_object* l_Array_findRevMAux___main___at_Lean_Syntax_getTailWithInfo___main___spec__1___boxed(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Syntax_toNat___boxed(lean_object*);
|
||||
lean_object* l___private_Init_Lean_Syntax_5__decodeBinLitAux(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Syntax_HasToString;
|
||||
|
|
@ -105,6 +107,7 @@ lean_object* l___private_Init_Lean_Syntax_11__decodeQuotedChar___boxed__const__4
|
|||
lean_object* l___private_Init_Lean_Syntax_11__decodeQuotedChar___boxed__const__1;
|
||||
lean_object* lean_mk_syntax_ident(lean_object*);
|
||||
lean_object* l_Lean_Syntax_hasArgs___boxed(lean_object*);
|
||||
lean_object* l_Lean_Syntax_getTailWithInfo___main(lean_object*);
|
||||
lean_object* l_Lean_Syntax_formatStxAux___main___closed__4;
|
||||
lean_object* l_Array_findRevMAux___main___at_Lean_Syntax_getTailInfo___main___spec__1___boxed(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_mkStxNumLit(lean_object*, lean_object*);
|
||||
|
|
@ -220,6 +223,7 @@ lean_object* l_Lean_SourceInfo_updateTrailing(lean_object*, lean_object*);
|
|||
lean_object* l___private_Init_Lean_Syntax_8__decodeHexLitAux___main(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Init_Lean_Syntax_2__updateLeadingAux(lean_object*, lean_object*);
|
||||
uint8_t l_Lean_Syntax_hasArgs(lean_object*);
|
||||
lean_object* l_Lean_Syntax_getTailWithInfo(lean_object*);
|
||||
lean_object* l_String_quote(lean_object*);
|
||||
lean_object* l_Lean_Syntax_asNode___closed__1;
|
||||
lean_object* l_Lean_Syntax_HasToString___closed__2;
|
||||
|
|
@ -2831,6 +2835,116 @@ lean_dec(x_1);
|
|||
return x_2;
|
||||
}
|
||||
}
|
||||
lean_object* l_Array_findRevMAux___main___at_Lean_Syntax_getTailWithInfo___main___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_4; uint8_t x_5;
|
||||
x_4 = lean_unsigned_to_nat(0u);
|
||||
x_5 = lean_nat_dec_lt(x_4, x_2);
|
||||
if (x_5 == 0)
|
||||
{
|
||||
lean_object* x_6;
|
||||
lean_dec(x_2);
|
||||
x_6 = lean_box(0);
|
||||
return x_6;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10;
|
||||
x_7 = lean_unsigned_to_nat(1u);
|
||||
x_8 = lean_nat_sub(x_2, x_7);
|
||||
lean_dec(x_2);
|
||||
x_9 = lean_array_fget(x_1, x_8);
|
||||
x_10 = l_Lean_Syntax_getTailWithInfo___main(x_9);
|
||||
if (lean_obj_tag(x_10) == 0)
|
||||
{
|
||||
x_2 = x_8;
|
||||
x_3 = lean_box(0);
|
||||
goto _start;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_dec(x_8);
|
||||
return x_10;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Syntax_getTailWithInfo___main(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
switch (lean_obj_tag(x_1)) {
|
||||
case 0:
|
||||
{
|
||||
lean_object* x_2;
|
||||
x_2 = lean_box(0);
|
||||
return x_2;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
lean_object* x_3; lean_object* x_4; lean_object* x_5;
|
||||
x_3 = lean_ctor_get(x_1, 1);
|
||||
lean_inc(x_3);
|
||||
lean_dec(x_1);
|
||||
x_4 = lean_array_get_size(x_3);
|
||||
x_5 = l_Array_findRevMAux___main___at_Lean_Syntax_getTailWithInfo___main___spec__1(x_3, x_4, lean_box(0));
|
||||
lean_dec(x_3);
|
||||
return x_5;
|
||||
}
|
||||
default:
|
||||
{
|
||||
lean_object* x_6;
|
||||
x_6 = lean_ctor_get(x_1, 0);
|
||||
lean_inc(x_6);
|
||||
if (lean_obj_tag(x_6) == 0)
|
||||
{
|
||||
lean_object* x_7;
|
||||
lean_dec(x_1);
|
||||
x_7 = lean_box(0);
|
||||
return x_7;
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_8;
|
||||
x_8 = !lean_is_exclusive(x_6);
|
||||
if (x_8 == 0)
|
||||
{
|
||||
lean_object* x_9;
|
||||
x_9 = lean_ctor_get(x_6, 0);
|
||||
lean_dec(x_9);
|
||||
lean_ctor_set(x_6, 0, x_1);
|
||||
return x_6;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_10;
|
||||
lean_dec(x_6);
|
||||
x_10 = lean_alloc_ctor(1, 1, 0);
|
||||
lean_ctor_set(x_10, 0, x_1);
|
||||
return x_10;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_Array_findRevMAux___main___at_Lean_Syntax_getTailWithInfo___main___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_4;
|
||||
x_4 = l_Array_findRevMAux___main___at_Lean_Syntax_getTailWithInfo___main___spec__1(x_1, x_2, x_3);
|
||||
lean_dec(x_1);
|
||||
return x_4;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Syntax_getTailWithInfo(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_2;
|
||||
x_2 = l_Lean_Syntax_getTailWithInfo___main(x_1);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
lean_object* l_Array_findRevMAux___main___at_Lean_Syntax_getTailInfo___main___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
|
||||
_start:
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue