chore: update stage0

This commit is contained in:
Leonardo de Moura 2020-01-15 17:40:44 -08:00
parent 6b8de16ede
commit cbf57fa388
23 changed files with 8746 additions and 5943 deletions

View file

@ -56,7 +56,8 @@ def mkMessageAux (ctx : Context) (ref : Syntax) (msgData : MessageData) (severit
mkMessageCore ctx.fileName ctx.fileMap msgData severity (ref.getPos.getD ctx.cmdPos)
private def ioErrorToMessage (ctx : Context) (ref : Syntax) (err : IO.Error) : Message :=
mkMessageAux ctx ref (toString err) MessageSeverity.error
let ref := getBetterRef ref ctx.macroStack;
mkMessageAux ctx ref (addMacroStack (toString err) ctx.macroStack) MessageSeverity.error
@[inline] def liftIOCore {α} (ctx : Context) (ref : Syntax) (x : IO α) : EIO Exception α :=
EIO.adaptExcept (fun ex => Exception.error $ ioErrorToMessage ctx ref ex) x
@ -93,37 +94,13 @@ instance CommandElabM.monadLog : MonadLog CommandElabM :=
addContext := addContext,
logMessage := fun msg => modify $ fun s => { messages := s.messages.add msg, .. s } }
/- If `ref` does not have position information, then try to use macroStack -/
private def getBetterRef (ref : Syntax) : CommandElabM Syntax :=
match ref.getPos with
| some _ => pure ref
| none => do
ctx ← read;
match ctx.macroStack.find? $ fun (macro : Syntax) => macro.getPos != none with
| some macro => pure macro
| none => pure ref
private def prettyPrint (stx : Syntax) : CommandElabM Format :=
match stx.reprint with -- TODO use syntax pretty printer
| some str => pure $ format str.toFormat
| none => pure $ format stx
private def addMacroStack (msgData : MessageData) : CommandElabM MessageData := do
ctx ← read;
if ctx.macroStack.isEmpty then pure msgData
else
ctx.macroStack.foldlM
(fun (msgData : MessageData) (macro : Syntax) => do
macroFmt ← prettyPrint macro;
pure (msgData ++ Format.line ++ "while expanding" ++ MessageData.nest 2 (Format.line ++ macroFmt)))
msgData
/--
Throws an error with the given `msgData` and extracting position information from `ref`.
If `ref` does not contain position information, then use `cmdPos` -/
def throwError {α} (ref : Syntax) (msgData : MessageData) : CommandElabM α := do
ref ← getBetterRef ref;
msgData ← addMacroStack msgData;
ctx ← read;
let ref := getBetterRef ref ctx.macroStack;
let msgData := addMacroStack msgData ctx.macroStack;
msg ← mkMessage msgData MessageSeverity.error ref;
throw (Exception.error msg)
@ -200,7 +177,7 @@ adaptReader (fun (ctx : Context) => { currRecDepth := ctx.currRecDepth + 1, .. c
private def elabCommandUsing (stx : Syntax) : List CommandElab → CommandElabM Unit
| [] => do
refFmt ← prettyPrint stx;
let refFmt := stx.prettyPrint;
throwError stx ("unexpected syntax" ++ MessageData.nest 2 (Format.line ++ refFmt))
| (elabFn::elabFns) => catch (elabFn stx)
(fun ex => match ex with
@ -506,11 +483,6 @@ fun n => do
else
elabOpenRenaming body
/- We just ignore Lean3 notation declaration commands. -/
@[builtinCommandElab «mixfix»] def elabMixfix : CommandElab := fun _ => pure ()
@[builtinCommandElab «reserve»] def elabReserve : CommandElab := fun _ => pure ()
@[builtinCommandElab «notation»] def elabNotation : CommandElab := fun _ => pure ()
@[builtinCommandElab «variable»] def elabVariable : CommandElab :=
fun n => do
-- `variable` bracktedBinder

View file

@ -25,28 +25,61 @@ else if ds.size == 1 then
else
ds.foldlFromM (fun r d => `(ParserDescr.andthen $r $d)) (ds.get! 0) 1
partial def toParserDescr : Syntax → TermElabM Syntax
/- The translator from `syntax` to `ParserDescr` syntax uses the following modes -/
inductive ToParserDescrMode
| anyCat -- Node kind `Lean.Parser.Syntax.cat` is allowed for any category
| noCat -- Node kind `Lean.Parser.Syntax.cat` is not allowed for any category
| toPushLeading (catName : Name) -- Node kind `Lean.Parser.Syntax.cat` is allowed if the category is `catName`, and it is translated into `ParserDescr.pushLeading`
abbrev ToParserDescrM := ReaderT ToParserDescrMode (StateT Bool TermElabM)
private def getMode : ToParserDescrM ToParserDescrMode := read
private def markAsTrailingParser : ToParserDescrM Unit := set true
@[inline] private def withAnyIfNotFirst {α} (first : Bool) (x : ToParserDescrM α) : ToParserDescrM α :=
fun mode => match mode, first with
| mode, true => x mode
| _, false => x ToParserDescrMode.anyCat
@[inline] private def withNoPushLeading {α} (x : ToParserDescrM α) : ToParserDescrM α :=
fun mode => match mode with
| ToParserDescrMode.toPushLeading _ => x ToParserDescrMode.noCat
| mode => x mode
partial def toParserDescrAux : Syntax → ToParserDescrM Syntax
| stx =>
let kind := stx.getKind;
if kind == nullKind then do
args ← stx.getArgs.mapM toParserDescr;
mkParserSeq args
args ← stx.getArgs.mapIdxM $ fun i arg => withAnyIfNotFirst (i == 0) (toParserDescrAux arg);
liftM $ mkParserSeq args
else if kind == choiceKind then do
toParserDescr (stx.getArg 0)
toParserDescrAux (stx.getArg 0)
else if kind == `Lean.Parser.Syntax.paren then
toParserDescr (stx.getArg 1)
toParserDescrAux (stx.getArg 1)
else if kind == `Lean.Parser.Syntax.cat then do
let cat : Name := stx.getIdAt 0;
let rbp : Nat := (getOptNum (stx.getArg 1)).getD 0;
env ← getEnv;
unless (Parser.isParserCategory env cat) $ throwError (stx.getArg 3) ("unknown category '" ++ cat ++ "'");
`(ParserDescr.parser $(quote cat) $(quote rbp))
let rbp? : Option Nat := getOptNum (stx.getArg 1);
env ← liftM getEnv;
unless (Parser.isParserCategory env cat) $ liftM $ throwError (stx.getArg 3) ("unknown category '" ++ cat ++ "'");
mode ← getMode;
match mode with
| ToParserDescrMode.toPushLeading cat' =>
if cat == cat' then do
unless rbp?.isNone $ liftM $ throwError (stx.getArg 1) ("invalid occurrence of ':<num>' modifier in head");
markAsTrailingParser; -- mark as trailing par
`(ParserDescr.pushLeading)
else
liftM $ throwError (stx.getArg 3) ("invalid occurrence of '" ++ cat ++ "', '" ++ cat' ++ "', atom, or literal expected")
| ToParserDescrMode.anyCat =>
let rbp := rbp?.getD 0;
`(ParserDescr.parser $(quote cat) $(quote rbp))
| ToParserDescrMode.noCat =>
liftM $ throwError (stx.getArg 3) ("invalid occurrence of '" ++ cat ++ "', atom or literal expected")
else if kind == `Lean.Parser.Syntax.atom then do
match (stx.getArg 0).isStrLit? with
| some atom =>
let rbp : Option Nat := getOptNum (stx.getArg 1);
`(ParserDescr.symbol $(quote atom) $(quote rbp))
| none => throwUnsupportedSyntax
| none => liftM throwUnsupportedSyntax
else if kind == `Lean.Parser.Syntax.num then
`(ParserDescr.num)
else if kind == `Lean.Parser.Syntax.str then
@ -56,35 +89,41 @@ partial def toParserDescr : Syntax → TermElabM Syntax
else if kind == `Lean.Parser.Syntax.ident then
`(ParserDescr.ident)
else if kind == `Lean.Parser.Syntax.try then do
d ← toParserDescr $ stx.getArg 1;
d ← withNoPushLeading $ toParserDescrAux (stx.getArg 1);
`(ParserDescr.try $d)
else if kind == `Lean.Parser.Syntax.lookahead then do
d ← toParserDescr $ stx.getArg 1;
d ← withNoPushLeading $ toParserDescrAux (stx.getArg 1);
`(ParserDescr.lookahead $d)
else if kind == `Lean.Parser.Syntax.optional then do
d ← toParserDescr $ stx.getArg 1;
d ← withNoPushLeading $ toParserDescrAux (stx.getArg 1);
`(ParserDescr.optional $d)
else if kind == `Lean.Parser.Syntax.sepBy then do
d₁ ← toParserDescr $ stx.getArg 1;
d₂ ← toParserDescr $ stx.getArg 2;
d₁ ← withNoPushLeading $ toParserDescrAux (stx.getArg 1);
d₂ ← withNoPushLeading $ toParserDescrAux (stx.getArg 2);
`(ParserDescr.sepBy $d₁ $d₂)
else if kind == `Lean.Parser.Syntax.sepBy1 then do
d₁ ← toParserDescr $ stx.getArg 1;
d₂ ← toParserDescr $ stx.getArg 2;
d₁ ← withNoPushLeading $ toParserDescrAux (stx.getArg 1);
d₂ ← withNoPushLeading $ toParserDescrAux (stx.getArg 2);
`(ParserDescr.sepBy1 $d₁ $d₂)
else if kind == `Lean.Parser.Syntax.many then do
d ← toParserDescr $ stx.getArg 0;
d ← withNoPushLeading $ toParserDescrAux (stx.getArg 0);
`(ParserDescr.many $d)
else if kind == `Lean.Parser.Syntax.many1 then do
d ← toParserDescr $ stx.getArg 0;
d ← withNoPushLeading $ toParserDescrAux (stx.getArg 0);
`(ParserDescr.many1 $d)
else if kind == `Lean.Parser.Syntax.orelse then do
d₁ ← toParserDescr $ stx.getArg 0;
d₂ ← toParserDescr $ stx.getArg 2;
d₁ ← withNoPushLeading $ toParserDescrAux (stx.getArg 0);
d₂ ← withNoPushLeading $ toParserDescrAux (stx.getArg 2);
`(ParserDescr.orelse $d₁ $d₂)
else
throwError stx ("ERROR " ++ toString stx)
-- throwUnsupportedSyntax
liftM $ throwUnsupportedSyntax
/--
Given a `stx` of category `syntax`, return a pair `(newStx, trailingParser)`,
where `newStx` is of category `term`. After elaboration, `newStx` should have type
`TrailingParserDescr` if `trailingParser == true`, and `ParserDescr` otherwise. -/
def toParserDescr (stx : Syntax) (catName : Name) : TermElabM (Syntax × Bool) :=
(toParserDescrAux stx (ToParserDescrMode.toPushLeading catName)).run false
end Term
@ -116,8 +155,8 @@ fun stx => do
unless (Parser.isParserCategory env cat) $ throwError (stx.getArg 4) ("unknown category '" ++ cat ++ "'");
kind ← elabKind (stx.getArg 1) cat;
let catParserId := mkIdentFrom stx (cat.appendAfter "Parser");
type ← `(Lean.ParserDescr);
val ← runTermElabM none $ fun _ => Term.toParserDescr (stx.getArg 2);
(val, trailingParser) ← runTermElabM none $ fun _ => Term.toParserDescr (stx.getArg 2) cat;
type ← if trailingParser then `(Lean.TrailingParserDescr) else `(Lean.ParserDescr);
-- TODO: meaningful, unhygienic def name for selective parser `open`ing?
d ← `(@[$catParserId:ident] def myParser : $type := ParserDescr.node $(quote kind) $val);
trace `Elab stx $ fun _ => d;
@ -134,6 +173,11 @@ adaptExpander $ fun stx => match_syntax stx with
`(@[macro $(Lean.mkSimpleIdent k)] def myMacro : Macro := fun stx => match_syntax stx with $alts* | _ => throw ())
| _ => throwUnsupportedSyntax
/- We just ignore Lean3 notation declaration commands. -/
@[builtinCommandElab «mixfix»] def elabMixfix : CommandElab := fun _ => pure ()
@[builtinCommandElab «reserve»] def elabReserve : CommandElab := fun _ => pure ()
@[builtinCommandElab «notation»] def elabNotation : CommandElab := fun _ => pure ()
end Command
end Elab
end Lean

View file

@ -120,37 +120,13 @@ instance TermElabM.MonadLog : MonadLog TermElabM :=
addContext := addContext,
logMessage := fun msg => modify $ fun s => { messages := s.messages.add msg, .. s } }
/- If `ref` does not have position information, then try to use macroStack -/
private def getBetterRef (ref : Syntax) : TermElabM Syntax :=
match ref.getPos with
| some _ => pure ref
| none => do
ctx ← read;
match ctx.macroStack.find? $ fun (macro : Syntax) => macro.getPos != none with
| some macro => pure macro
| none => pure ref
private def prettyPrint (stx : Syntax) : TermElabM Format :=
match stx.reprint with -- TODO use syntax pretty printer
| some str => pure $ str.toFormat
| none => pure $ format stx
private def addMacroStack (msgData : MessageData) : TermElabM MessageData := do
ctx ← read;
if ctx.macroStack.isEmpty then pure msgData
else
ctx.macroStack.foldlM
(fun (msgData : MessageData) (macro : Syntax) => do
macroFmt ← prettyPrint macro;
pure (msgData ++ Format.line ++ "while expanding" ++ MessageData.nest 2 (Format.line ++ macroFmt)))
msgData
/--
Throws an error with the given `msgData` and extracting position information from `ref`.
If `ref` does not contain position information, then use `cmdPos` -/
def throwError {α} (ref : Syntax) (msgData : MessageData) : TermElabM α := do
ref ← getBetterRef ref;
msgData ← addMacroStack msgData;
ctx ← read;
let ref := getBetterRef ref ctx.macroStack;
let msgData := addMacroStack msgData ctx.macroStack;
msg ← mkMessage msgData MessageSeverity.error ref;
throw (Exception.ex (Elab.Exception.error msg))
@ -488,7 +464,7 @@ pure mvar
private def elabTermUsing (s : State) (stx : Syntax) (expectedType? : Option Expr) (errToSorry : Bool) (catchExPostpone : Bool)
: List TermElab → TermElabM Expr
| [] => do
refFmt ← prettyPrint stx;
let refFmt := stx.prettyPrint;
throwError stx ("unexpected syntax" ++ MessageData.nest 2 (Format.line ++ refFmt))
| (elabFn::elabFns) => catch (elabFn stx expectedType?)
(fun ex => match ex with

View file

@ -8,8 +8,32 @@ import Init.Lean.Util.Trace
import Init.Lean.Parser
namespace Lean
def Syntax.prettyPrint (stx : Syntax) : Format :=
match stx.reprint with -- TODO use syntax pretty printer
| some str => format str.toFormat
| none => format stx
namespace Elab
/- If `ref` does not have position information, then try to use macroStack -/
def getBetterRef (ref : Syntax) (macroStack : List Syntax) : Syntax :=
match ref.getPos with
| some _ => ref
| none =>
match macroStack.find? $ fun (macro : Syntax) => macro.getPos != none with
| some macro => macro
| none => ref
def addMacroStack (msgData : MessageData) (macroStack : List Syntax) : MessageData :=
if macroStack.isEmpty then msgData
else
macroStack.foldl
(fun (msgData : MessageData) (macro : Syntax) =>
let macroFmt := macro.prettyPrint;
msgData ++ Format.line ++ "while expanding" ++ MessageData.nest 2 (Format.line ++ macroFmt))
msgData
def checkSyntaxNodeKind (env : Environment) (k : Name) : ExceptT String Id Name :=
if Parser.isValidSyntaxNodeKind env k then pure k
else throw "failed"
@ -156,7 +180,5 @@ fun stx =>
registerTraceClass `Elab;
registerTraceClass `Elab.step
end Elab
end Lean

View file

@ -102,7 +102,6 @@ def maxPrec := parser! nonReservedSymbol "max"
def precedenceLit : Parser := numLit <|> maxPrec
def «precedence» := parser! " : " >> precedenceLit
def quotedSymbolPrec := parser! quotedSymbol >> optional «precedence»
def symbol : Parser := quotedSymbolPrec <|> unquotedSymbol
def «prefix» := parser! "prefix"
def «infix» := parser! "infix"
def «infixl» := parser! "infixl"
@ -112,8 +111,9 @@ def mixfixKind := «prefix» <|> «infix» <|> «infixl» <|> «infixr» <|> «p
@[builtinCommandParser] def «reserve» := parser! "reserve " >> mixfixKind >> quotedSymbolPrec
def mixfixSymbol := quotedSymbolPrec <|> unquotedSymbol
@[builtinCommandParser] def «mixfix» := parser! mixfixKind >> mixfixSymbol >> " := " >> termParser
def identPrec := parser! ident >> optional «precedence»
@[builtinCommandParser] def «notation» := parser! "notation" >> optional ident >> many (quotedSymbolPrec <|> identPrec) >> " := " >> termParser
def strLitPrec := parser! strLit >> optional «precedence»
def identPrec := parser! ident >> optional «precedence»
@[builtinCommandParser] def «notation» := parser! "notation" >> many (strLitPrec <|> quotedSymbolPrec <|> identPrec) >> " := " >> termParser
@[builtinCommandParser] def «macro» := parser! "macro" >> many1Indent Term.matchAlt "'match' alternatives must be indented"
end Command

View file

@ -1521,7 +1521,7 @@ def compileParserDescr (categories : ParserCategories) : forall {k : ParserKind}
| _, ParserDescr.ident => pure $ identNoAntiquot -- Kha, do we need `ident` here?
| ParserKind.leading,
ParserDescr.nonReservedSymbol tk includeIdent => pure $ nonReservedSymbol tk includeIdent
| ParserKind.leading, ParserDescr.parser catName rbp =>
| _, ParserDescr.parser catName rbp =>
match categories.find? catName with
| some _ => pure $ categoryParser catName rbp
| none => throwUnknownParserCategory catName

View file

@ -83,7 +83,7 @@ inductive ParserDescrCore : ParserKind → Type
| char {k : ParserKind} : ParserDescrCore k
| ident {k : ParserKind} : ParserDescrCore k
| pushLeading : ParserDescrCore ParserKind.trailing
| parser : Name → Nat → ParserDescrCore ParserKind.leading
| parser {k : ParserKind} : Name → Nat → ParserDescrCore k
instance ParserDescrCore.inhabited {k} : Inhabited (ParserDescrCore k) := ⟨ParserDescrCore.symbol "" none⟩

View file

@ -55,7 +55,7 @@ void consume_until_end_or_command(parser & p) {
void check_command_period_docstring_or_eof(parser const & p) {
if (!p.curr_is_command() && !p.curr_is_eof() && !p.curr_is_token(get_period_tk()) &&
p.curr() != token_kind::DocBlock && p.curr() != token_kind::ModDocBlock)
p.curr() != token_kind::DocBlock && p.curr() != token_kind::ModDocBlock && p.curr() != token_kind::NewFrontend)
throw parser_error("unexpected token, '.', command, or end-of-file expected", p.pos());
}

View file

@ -60,6 +60,7 @@ lean_object* l_Lean_Elab_Term_elabBOr___boxed(lean_object*, lean_object*, lean_o
lean_object* l_Lean_Elab_Term_elabInfix(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Elab_Term_elabSubtype___lambda__1___closed__8;
lean_object* l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__5;
extern lean_object* l___private_Init_Lean_Elab_Term_18__mkPairsAux___main___closed__5;
lean_object* l_Lean_Elab_Term_elabHave___closed__1;
lean_object* l_Lean_Elab_Term_elabAnoymousCtor___closed__3;
lean_object* l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__30;
@ -170,7 +171,6 @@ lean_object* l_Lean_Elab_Term_elabSub___closed__2;
lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabseq___closed__1;
lean_object* l___private_Init_Lean_Elab_Quotation_1__quoteName___main(lean_object*);
lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabseqRight(lean_object*);
extern lean_object* l___private_Init_Lean_Elab_Term_8__expandCDot___closed__4;
lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabBAnd(lean_object*);
lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabHEq(lean_object*);
lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabMapConstRev(lean_object*);
@ -224,7 +224,6 @@ lean_object* l_Lean_Elab_Term_elabAppend(lean_object*, lean_object*, lean_object
lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabProd___closed__2;
extern lean_object* l_Lean_Parser_Term_or___elambda__1___closed__1;
lean_object* lean_nat_sub(lean_object*, lean_object*);
extern lean_object* l___private_Init_Lean_Elab_Term_21__mkPairsAux___main___closed__5;
lean_object* l_Lean_Elab_Term_throwUnsupportedSyntax___rarg(lean_object*);
lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabseqLeft___closed__1;
extern lean_object* l_Lean_Parser_Term_ne___elambda__1___closed__2;
@ -430,7 +429,6 @@ lean_object* l_Lean_Elab_Term_elabShow(lean_object*, lean_object*, lean_object*,
extern lean_object* l_Lean_Parser_Term_if___elambda__1___closed__2;
lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabAdd___closed__1;
lean_object* l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__16;
extern uint8_t l___private_Init_Lean_Elab_Term_7__hasCDot___main___closed__1;
lean_object* l_Lean_Elab_Term_elabLE___closed__3;
lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabEq___closed__1;
lean_object* l_Lean_Elab_Term_elabLT(lean_object*, lean_object*, lean_object*, lean_object*);
@ -525,6 +523,7 @@ lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabMul___closed__2;
lean_object* l_Lean_Elab_Term_elabMapConst___closed__1;
lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabLE___closed__3;
lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabMapConstRev___closed__1;
extern lean_object* l___private_Init_Lean_Elab_Term_5__expandCDot___closed__4;
lean_object* l_Lean_Elab_Term_elabseqRight(lean_object*, lean_object*, lean_object*, lean_object*);
uint8_t l_List_beq___main___at_Lean_Elab_Term_elabParserMacro___spec__1(lean_object*, lean_object*);
lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabShow(lean_object*);
@ -581,6 +580,7 @@ lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabIf___closed__3;
lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabLE___closed__1;
lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabBind___closed__2;
extern lean_object* l_Lean_Parser_Term_modN___elambda__1___closed__2;
extern uint8_t l___private_Init_Lean_Elab_Term_4__hasCDot___main___closed__1;
lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabEquiv___closed__3;
lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabAndM___closed__1;
lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabAnoymousCtor___closed__2;
@ -633,7 +633,7 @@ x_5 = l_Lean_Syntax_isOfKind(x_1, x_4);
if (x_5 == 0)
{
uint8_t x_6;
x_6 = l___private_Init_Lean_Elab_Term_7__hasCDot___main___closed__1;
x_6 = l___private_Init_Lean_Elab_Term_4__hasCDot___main___closed__1;
if (x_6 == 0)
{
lean_object* x_7;
@ -835,7 +835,7 @@ x_5 = l_Lean_Syntax_isOfKind(x_1, x_4);
if (x_5 == 0)
{
uint8_t x_6;
x_6 = l___private_Init_Lean_Elab_Term_7__hasCDot___main___closed__1;
x_6 = l___private_Init_Lean_Elab_Term_4__hasCDot___main___closed__1;
if (x_6 == 0)
{
lean_object* x_7;
@ -2430,6 +2430,7 @@ lean_inc(x_6);
lean_dec(x_5);
x_7 = l_Lean_Elab_Term_elabAnoymousCtor___closed__3;
x_8 = l_Lean_Elab_Term_throwError___rarg(x_1, x_7, x_3, x_6);
lean_dec(x_1);
return x_8;
}
else
@ -2509,6 +2510,7 @@ x_48 = lean_alloc_ctor(8, 2, 0);
lean_ctor_set(x_48, 0, x_46);
lean_ctor_set(x_48, 1, x_47);
x_49 = l_Lean_Elab_Term_throwError___rarg(x_1, x_48, x_3, x_26);
lean_dec(x_1);
return x_49;
}
else
@ -2611,6 +2613,7 @@ x_32 = lean_alloc_ctor(8, 2, 0);
lean_ctor_set(x_32, 0, x_30);
lean_ctor_set(x_32, 1, x_31);
x_33 = l_Lean_Elab_Term_throwError___rarg(x_1, x_32, x_3, x_26);
lean_dec(x_1);
return x_33;
}
}
@ -2635,6 +2638,7 @@ x_19 = lean_alloc_ctor(8, 2, 0);
lean_ctor_set(x_19, 0, x_18);
lean_ctor_set(x_19, 1, x_17);
x_20 = l_Lean_Elab_Term_throwError___rarg(x_1, x_19, x_3, x_13);
lean_dec(x_1);
return x_20;
}
}
@ -2863,7 +2867,7 @@ x_45 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_45, 0, x_44);
lean_ctor_set(x_45, 1, x_43);
x_46 = lean_array_push(x_20, x_45);
x_47 = l___private_Init_Lean_Elab_Term_8__expandCDot___closed__4;
x_47 = l___private_Init_Lean_Elab_Term_5__expandCDot___closed__4;
x_48 = lean_array_push(x_46, x_47);
x_49 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_49, 0, x_27);
@ -2928,7 +2932,7 @@ x_83 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_83, 0, x_82);
lean_ctor_set(x_83, 1, x_81);
x_84 = lean_array_push(x_58, x_83);
x_85 = l___private_Init_Lean_Elab_Term_8__expandCDot___closed__4;
x_85 = l___private_Init_Lean_Elab_Term_5__expandCDot___closed__4;
x_86 = lean_array_push(x_84, x_85);
x_87 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_87, 0, x_65);
@ -4494,6 +4498,7 @@ lean_inc(x_11);
lean_dec(x_9);
x_12 = l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__3;
x_13 = l_Lean_Elab_Term_throwError___rarg(x_1, x_12, x_2, x_11);
lean_dec(x_1);
return x_13;
}
else
@ -4546,7 +4551,7 @@ lean_ctor_set(x_35, 2, x_31);
lean_ctor_set(x_35, 3, x_34);
x_36 = l_Array_empty___closed__1;
x_37 = lean_array_push(x_36, x_35);
x_38 = l___private_Init_Lean_Elab_Term_8__expandCDot___closed__4;
x_38 = l___private_Init_Lean_Elab_Term_5__expandCDot___closed__4;
x_39 = lean_array_push(x_37, x_38);
x_40 = l_Lean_Parser_Term_id___elambda__1___closed__2;
x_41 = lean_alloc_ctor(1, 2, 0);
@ -4973,6 +4978,7 @@ lean_dec(x_15);
lean_dec(x_8);
x_264 = l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__6;
x_265 = l_Lean_Elab_Term_throwError___rarg(x_1, x_264, x_2, x_14);
lean_dec(x_1);
return x_265;
}
}
@ -5164,6 +5170,7 @@ lean_inc(x_11);
lean_dec(x_9);
x_12 = l_Lean_Elab_Term_elabTParserMacro___lambda__1___closed__3;
x_13 = l_Lean_Elab_Term_throwError___rarg(x_1, x_12, x_2, x_11);
lean_dec(x_1);
return x_13;
}
else
@ -5196,7 +5203,7 @@ lean_ctor_set(x_25, 2, x_22);
lean_ctor_set(x_25, 3, x_24);
x_26 = l_Array_empty___closed__1;
x_27 = lean_array_push(x_26, x_25);
x_28 = l___private_Init_Lean_Elab_Term_8__expandCDot___closed__4;
x_28 = l___private_Init_Lean_Elab_Term_5__expandCDot___closed__4;
x_29 = lean_array_push(x_27, x_28);
x_30 = l_Lean_Parser_Term_id___elambda__1___closed__2;
x_31 = lean_alloc_ctor(1, 2, 0);
@ -5236,7 +5243,7 @@ lean_ctor_set(x_46, 2, x_43);
lean_ctor_set(x_46, 3, x_45);
x_47 = l_Array_empty___closed__1;
x_48 = lean_array_push(x_47, x_46);
x_49 = l___private_Init_Lean_Elab_Term_8__expandCDot___closed__4;
x_49 = l___private_Init_Lean_Elab_Term_5__expandCDot___closed__4;
x_50 = lean_array_push(x_48, x_49);
x_51 = l_Lean_Parser_Term_id___elambda__1___closed__2;
x_52 = lean_alloc_ctor(1, 2, 0);
@ -5332,7 +5339,7 @@ lean_object* l_Lean_Elab_Term_elabProd(lean_object* x_1, lean_object* x_2, lean_
_start:
{
lean_object* x_5; lean_object* x_6;
x_5 = l___private_Init_Lean_Elab_Term_21__mkPairsAux___main___closed__5;
x_5 = l___private_Init_Lean_Elab_Term_18__mkPairsAux___main___closed__5;
x_6 = l_Lean_Elab_Term_elabInfixOp(x_5, x_1, x_2, x_3, x_4);
return x_6;
}

File diff suppressed because it is too large Load diff

View file

@ -72,6 +72,7 @@ lean_object* l_Lean_Elab_Command_elabModifiers___closed__2;
lean_object* l_Lean_Elab_Command_elabAttr___closed__6;
lean_object* l_Lean_Elab_Command_elabAttrs(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Elab_Command_elabAttr___closed__1;
lean_object* l_Lean_Elab_Command_elabAttr___boxed(lean_object*, lean_object*, lean_object*);
extern lean_object* l_Lean_Parser_Command_docComment___elambda__1___closed__5;
lean_object* l_Lean_Elab_Command_Modifiers_hasToString___closed__2;
lean_object* l_Lean_Elab_Command_Modifiers_hasFormat___closed__12;
@ -1128,9 +1129,9 @@ x_48 = l_Lean_Syntax_isIdOrAtom_x3f(x_47);
if (lean_obj_tag(x_48) == 0)
{
lean_object* x_49; lean_object* x_50; uint8_t x_51;
lean_dec(x_1);
x_49 = l_Lean_Elab_Command_elabAttr___closed__6;
x_50 = l_Lean_Elab_Command_throwError___rarg(x_47, x_49, x_2, x_3);
lean_dec(x_47);
x_51 = !lean_is_exclusive(x_50);
if (x_51 == 0)
{
@ -1219,7 +1220,6 @@ lean_object* x_21; lean_object* x_22; lean_object* x_23;
lean_dec(x_2);
x_21 = lean_unsigned_to_nat(1u);
x_22 = l_Lean_Syntax_getArg(x_1, x_21);
lean_dec(x_1);
x_23 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_23, 0, x_4);
lean_ctor_set(x_23, 1, x_22);
@ -1278,7 +1278,6 @@ lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40;
lean_dec(x_2);
x_37 = lean_unsigned_to_nat(1u);
x_38 = l_Lean_Syntax_getArg(x_1, x_37);
lean_dec(x_1);
x_39 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_39, 0, x_4);
lean_ctor_set(x_39, 1, x_38);
@ -1294,7 +1293,6 @@ else
uint8_t x_41;
lean_dec(x_4);
lean_dec(x_2);
lean_dec(x_1);
x_41 = !lean_is_exclusive(x_6);
if (x_41 == 0)
{
@ -1317,6 +1315,15 @@ return x_44;
}
}
}
lean_object* l_Lean_Elab_Command_elabAttr___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4;
x_4 = l_Lean_Elab_Command_elabAttr(x_1, x_2, x_3);
lean_dec(x_1);
return x_4;
}
}
lean_object* l_Lean_Syntax_foldArgsAuxM___main___at_Lean_Elab_Command_elabAttrs___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
@ -1340,6 +1347,7 @@ lean_object* x_10; lean_object* x_11;
x_10 = lean_array_fget(x_2, x_3);
lean_inc(x_5);
x_11 = l_Lean_Elab_Command_elabAttr(x_10, x_5, x_6);
lean_dec(x_10);
if (lean_obj_tag(x_11) == 0)
{
lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15;
@ -1570,6 +1578,7 @@ x_97 = lean_alloc_ctor(8, 2, 0);
lean_ctor_set(x_97, 0, x_96);
lean_ctor_set(x_97, 1, x_95);
x_98 = l_Lean_Elab_Command_throwError___rarg(x_87, x_97, x_2, x_3);
lean_dec(x_87);
x_99 = !lean_is_exclusive(x_98);
if (x_99 == 0)
{
@ -1647,6 +1656,7 @@ x_120 = lean_alloc_ctor(8, 2, 0);
lean_ctor_set(x_120, 0, x_119);
lean_ctor_set(x_120, 1, x_118);
x_121 = l_Lean_Elab_Command_throwError___rarg(x_110, x_120, x_2, x_3);
lean_dec(x_110);
x_122 = lean_ctor_get(x_121, 0);
lean_inc(x_122);
x_123 = lean_ctor_get(x_121, 1);
@ -1709,6 +1719,7 @@ lean_dec(x_11);
lean_dec(x_7);
x_75 = l_Lean_Elab_Command_elabModifiers___closed__4;
x_76 = l_Lean_Elab_Command_throwError___rarg(x_69, x_75, x_2, x_17);
lean_dec(x_69);
x_77 = !lean_is_exclusive(x_76);
if (x_77 == 0)
{
@ -2273,7 +2284,6 @@ lean_object* x_10; lean_object* x_11;
lean_dec(x_6);
lean_dec(x_5);
lean_dec(x_2);
lean_dec(x_1);
x_10 = lean_box(0);
x_11 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_11, 0, x_10);
@ -2403,7 +2413,6 @@ uint8_t x_47;
lean_dec(x_6);
lean_dec(x_5);
lean_dec(x_2);
lean_dec(x_1);
x_47 = !lean_is_exclusive(x_42);
if (x_47 == 0)
{
@ -2435,7 +2444,6 @@ if (x_51 == 0)
lean_object* x_52; lean_object* x_53; lean_object* x_54;
x_52 = lean_ctor_get(x_39, 0);
x_53 = l___private_Init_Lean_Elab_Command_1__ioErrorToMessage(x_6, x_1, x_52);
lean_dec(x_1);
x_54 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_54, 0, x_53);
lean_ctor_set(x_39, 0, x_54);
@ -2450,7 +2458,6 @@ lean_inc(x_56);
lean_inc(x_55);
lean_dec(x_39);
x_57 = l___private_Init_Lean_Elab_Command_1__ioErrorToMessage(x_6, x_1, x_55);
lean_dec(x_1);
x_58 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_58, 0, x_57);
x_59 = lean_alloc_ctor(1, 2, 0);
@ -2468,7 +2475,6 @@ lean_dec(x_12);
lean_dec(x_6);
lean_dec(x_5);
lean_dec(x_2);
lean_dec(x_1);
x_60 = !lean_is_exclusive(x_32);
if (x_60 == 0)
{
@ -2498,7 +2504,6 @@ lean_dec(x_12);
lean_dec(x_6);
lean_dec(x_5);
lean_dec(x_2);
lean_dec(x_1);
x_64 = !lean_is_exclusive(x_13);
if (x_64 == 0)
{
@ -2538,6 +2543,7 @@ x_8 = lean_unbox(x_3);
lean_dec(x_3);
x_9 = l_Array_forMAux___main___at_Lean_Elab_Command_applyAttributes___spec__1(x_1, x_2, x_8, x_4, x_5, x_6, x_7);
lean_dec(x_4);
lean_dec(x_1);
return x_9;
}
}
@ -2549,6 +2555,7 @@ x_7 = lean_unbox(x_4);
lean_dec(x_4);
x_8 = l_Lean_Elab_Command_applyAttributes(x_1, x_2, x_3, x_7, x_5, x_6);
lean_dec(x_3);
lean_dec(x_1);
return x_8;
}
}

View file

@ -43,16 +43,17 @@ lean_object* l_Lean_Elab_Command_elabExample___closed__2;
uint8_t lean_name_eq(lean_object*, lean_object*);
extern lean_object* l_Lean_Parser_Command_declaration___elambda__1___closed__2;
lean_object* l_Lean_mkIdentFrom(lean_object*, lean_object*);
lean_object* l___private_Init_Lean_Elab_Command_8__getVarDecls(lean_object*);
lean_object* lean_array_push(lean_object*, lean_object*);
lean_object* lean_array_get_size(lean_object*);
lean_object* l___private_Init_Lean_Elab_Command_11__addScopes___main(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Elab_Term_mkForallUsedOnly(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabDeclaration___closed__2;
lean_object* lean_string_utf8_byte_size(lean_object*);
lean_object* l___private_Init_Lean_Elab_Term_20__synthesizeSyntheticMVarsAux___main(uint8_t, lean_object*, lean_object*, lean_object*);
extern lean_object* l_Lean_Parser_Command_example___elambda__1___closed__2;
lean_object* l_Lean_Elab_Command_elabAxiom___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Name_getNumParts___main(lean_object*);
lean_object* l_Lean_Elab_Command_elabInductive___rarg(lean_object*);
extern lean_object* l___private_Init_Lean_Elab_Term_8__expandCDot___closed__4;
lean_object* lean_nat_add(lean_object*, lean_object*);
lean_object* l_Lean_Elab_Command_addBuiltinCommandElab(lean_object*, lean_object*, lean_object*, lean_object*);
extern lean_object* l_Lean_Parser_Command_classInductive___elambda__1___closed__2;
@ -71,7 +72,6 @@ extern lean_object* l_Lean_Parser_Command_declValSimple___elambda__1___closed__2
extern lean_object* l_Lean_Meta_registerInstanceAttr___closed__1;
lean_object* l_Lean_Elab_Command_elabConstant(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Elab_Command_elabAxiom___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l___private_Init_Lean_Elab_Command_11__getVarDecls(lean_object*);
lean_object* l_Lean_Elab_Command_expandOptDeclSig(lean_object*);
lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabDeclaration___closed__3;
extern lean_object* l_Lean_Elab_Command_mkDef___lambda__1___closed__1;
@ -84,12 +84,13 @@ extern lean_object* l_Lean_Parser_Command_namespace___elambda__1___closed__1;
extern lean_object* l___regBuiltinParser_Lean_Parser_Command_antiquot___closed__2;
lean_object* l_Lean_Elab_Command_throwError___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
uint8_t l_List_elem___main___at_Lean_Parser_addLeadingParser___spec__7(lean_object*, lean_object*);
lean_object* l___private_Init_Lean_Elab_Command_6__mkTermContext(lean_object*, lean_object*, lean_object*);
extern lean_object* l___private_Init_Lean_Elab_Term_14__synthesizeSyntheticMVar___closed__3;
lean_object* l_Lean_Elab_Command_elabConstant___closed__7;
lean_object* l___private_Init_Lean_Elab_Command_9__mkTermContext(lean_object*, lean_object*, lean_object*);
extern lean_object* l___private_Init_Lean_Elab_Term_17__synthesizeSyntheticMVar___closed__3;
lean_object* l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_elabAxiom___spec__3(lean_object*, lean_object*, lean_object*);
extern lean_object* l_Lean_Parser_Term_hole___elambda__1___closed__1;
lean_object* l_Lean_Elab_Command_elabTheorem(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l___private_Init_Lean_Elab_Term_17__synthesizeSyntheticMVarsAux___main(uint8_t, lean_object*, lean_object*, lean_object*);
extern lean_object* l_Lean_Elab_Command_modifyScope___closed__1;
lean_object* l_Lean_Elab_Command_elabDef(lean_object*, lean_object*, lean_object*, lean_object*);
extern lean_object* l_Lean_Elab_Command_withDeclId___closed__3;
@ -124,10 +125,11 @@ lean_object* l_Lean_Elab_Command_getLevelNames(lean_object*, lean_object*);
lean_object* l_Lean_Elab_Command_elabModifiers(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Elab_Command_elabDefLike(lean_object*, lean_object*, lean_object*);
lean_object* l___private_Init_Lean_Elab_Command_14__addScopes___main(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Syntax_foldArgsAuxM___main___at_Lean_Syntax_foldSepRevArgsM___spec__1(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Elab_Command_expandDeclSig___boxed(lean_object*);
lean_object* l_Lean_Elab_Command_elabDeclaration___boxed(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Elab_Term_elabBinders___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
extern lean_object* l___private_Init_Lean_Elab_Term_5__expandCDot___closed__4;
lean_object* l_List_foldl___main___at_Lean_addMacroScopes___spec__1(lean_object*, lean_object*);
lean_object* l_Lean_Syntax_getArg(lean_object*, lean_object*);
lean_object* l_Lean_Elab_Command_elabDeclaration___closed__2;
@ -139,6 +141,7 @@ lean_object* l_Lean_Elab_Command_elabDeclaration___closed__3;
lean_object* l_Lean_Elab_Command_elabConstant___closed__3;
lean_object* l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_elabAxiom___spec__2(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Elab_Command_elabAbbrev___closed__1;
lean_object* l___private_Init_Lean_Elab_Command_7__mkTermState(lean_object*);
lean_object* l_Lean_Elab_Command_elabAbbrev___closed__4;
lean_object* l_Lean_CollectLevelParams_main___main(lean_object*, lean_object*);
lean_object* l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_elabAxiom___spec__1(lean_object*, lean_object*, lean_object*);
@ -150,7 +153,6 @@ lean_object* l_Lean_Elab_Command_elabClassInductive___rarg(lean_object*);
lean_object* l___private_Init_Lean_Elab_Command_3__setState(lean_object*, lean_object*, lean_object*);
uint8_t lean_nat_dec_lt(lean_object*, lean_object*);
extern lean_object* l_Lean_Parser_Command_declId___elambda__1___closed__2;
lean_object* l___private_Init_Lean_Elab_Command_10__mkTermState(lean_object*);
lean_object* l_Lean_Elab_Command_expandOptDeclSig(lean_object* x_1) {
_start:
{
@ -495,7 +497,7 @@ lean_ctor_set(x_21, 2, x_18);
lean_ctor_set(x_21, 3, x_20);
x_22 = l_Array_empty___closed__1;
x_23 = lean_array_push(x_22, x_21);
x_24 = l___private_Init_Lean_Elab_Term_8__expandCDot___closed__4;
x_24 = l___private_Init_Lean_Elab_Term_5__expandCDot___closed__4;
x_25 = lean_array_push(x_23, x_24);
x_26 = l_Lean_Parser_Term_id___elambda__1___closed__2;
x_27 = lean_alloc_ctor(1, 2, 0);
@ -618,8 +620,9 @@ lean_object* x_15; lean_object* x_16; uint8_t x_17;
lean_dec(x_11);
lean_dec(x_9);
lean_dec(x_8);
x_15 = l___private_Init_Lean_Elab_Term_17__synthesizeSyntheticMVar___closed__3;
x_15 = l___private_Init_Lean_Elab_Term_14__synthesizeSyntheticMVar___closed__3;
x_16 = l_Lean_Elab_Command_throwError___rarg(x_2, x_15, x_3, x_4);
lean_dec(x_2);
x_17 = !lean_is_exclusive(x_16);
if (x_17 == 0)
{
@ -2976,6 +2979,7 @@ lean_object* x_17; uint8_t x_18;
lean_dec(x_12);
lean_dec(x_4);
x_17 = l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg(x_10, x_13, x_5, x_6);
lean_dec(x_10);
x_18 = !lean_is_exclusive(x_17);
if (x_18 == 0)
{
@ -3016,7 +3020,7 @@ lean_dec(x_9);
x_12 = 0;
x_13 = lean_box(0);
lean_inc(x_7);
x_14 = l___private_Init_Lean_Elab_Term_20__synthesizeSyntheticMVarsAux___main(x_12, x_13, x_7, x_11);
x_14 = l___private_Init_Lean_Elab_Term_17__synthesizeSyntheticMVarsAux___main(x_12, x_13, x_7, x_11);
if (lean_obj_tag(x_14) == 0)
{
lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19;
@ -3305,7 +3309,6 @@ lean_dec(x_11);
lean_dec(x_10);
lean_dec(x_6);
lean_dec(x_3);
lean_dec(x_2);
lean_dec(x_1);
x_217 = !lean_is_exclusive(x_214);
if (x_217 == 0)
@ -3359,7 +3362,8 @@ x_28 = l_Lean_Parser_Command_namespace___elambda__1___closed__1;
x_29 = 1;
lean_inc(x_3);
lean_inc(x_23);
x_30 = l___private_Init_Lean_Elab_Command_14__addScopes___main(x_6, x_28, x_29, x_23, x_3, x_19);
x_30 = l___private_Init_Lean_Elab_Command_11__addScopes___main(x_6, x_28, x_29, x_23, x_3, x_19);
lean_dec(x_6);
if (lean_obj_tag(x_30) == 0)
{
lean_object* x_31; lean_object* x_32;
@ -3389,7 +3393,6 @@ lean_inc(x_49);
x_117 = 2;
lean_inc(x_3);
lean_inc(x_47);
lean_inc(x_2);
x_118 = l_Array_forMAux___main___at_Lean_Elab_Command_applyAttributes___spec__1(x_2, x_47, x_117, x_49, x_12, x_3, x_48);
if (lean_obj_tag(x_118) == 0)
{
@ -3427,9 +3430,9 @@ lean_inc(x_126);
x_127 = lean_ctor_get(x_125, 1);
lean_inc(x_127);
lean_dec(x_125);
x_128 = l___private_Init_Lean_Elab_Command_11__getVarDecls(x_126);
x_129 = l___private_Init_Lean_Elab_Command_9__mkTermContext(x_3, x_126, x_123);
x_130 = l___private_Init_Lean_Elab_Command_10__mkTermState(x_126);
x_128 = l___private_Init_Lean_Elab_Command_8__getVarDecls(x_126);
x_129 = l___private_Init_Lean_Elab_Command_6__mkTermContext(x_3, x_126, x_123);
x_130 = l___private_Init_Lean_Elab_Command_7__mkTermState(x_126);
lean_dec(x_126);
x_131 = l_Lean_Elab_Term_elabBinders___rarg(x_128, x_124, x_129, x_130);
lean_dec(x_128);
@ -3488,7 +3491,6 @@ lean_dec(x_132);
lean_dec(x_49);
lean_dec(x_47);
lean_dec(x_23);
lean_dec(x_2);
x_145 = lean_ctor_get(x_143, 0);
lean_inc(x_145);
x_146 = lean_ctor_get(x_143, 1);
@ -3534,7 +3536,6 @@ lean_dec(x_132);
lean_dec(x_49);
lean_dec(x_47);
lean_dec(x_23);
lean_dec(x_2);
x_153 = lean_ctor_get(x_151, 0);
lean_inc(x_153);
x_154 = lean_ctor_get(x_151, 1);
@ -3554,7 +3555,6 @@ lean_dec(x_132);
lean_dec(x_49);
lean_dec(x_47);
lean_dec(x_23);
lean_dec(x_2);
x_155 = lean_ctor_get(x_134, 0);
lean_inc(x_155);
x_156 = lean_ctor_get(x_134, 1);
@ -3576,7 +3576,6 @@ lean_object* x_158; lean_object* x_159; lean_object* x_160;
lean_dec(x_49);
lean_dec(x_47);
lean_dec(x_23);
lean_dec(x_2);
x_158 = lean_ctor_get(x_131, 1);
lean_inc(x_158);
lean_dec(x_131);
@ -3721,7 +3720,6 @@ lean_object* x_188; lean_object* x_189;
lean_dec(x_49);
lean_dec(x_47);
lean_dec(x_23);
lean_dec(x_2);
x_188 = lean_ctor_get(x_185, 0);
lean_inc(x_188);
x_189 = lean_ctor_get(x_185, 1);
@ -3742,7 +3740,6 @@ lean_dec(x_123);
lean_dec(x_49);
lean_dec(x_47);
lean_dec(x_23);
lean_dec(x_2);
x_190 = lean_ctor_get(x_125, 0);
lean_inc(x_190);
x_191 = lean_ctor_get(x_125, 1);
@ -3761,7 +3758,6 @@ lean_dec(x_47);
lean_dec(x_23);
lean_dec(x_11);
lean_dec(x_10);
lean_dec(x_2);
lean_dec(x_1);
x_192 = lean_ctor_get(x_120, 0);
lean_inc(x_192);
@ -3781,7 +3777,6 @@ lean_dec(x_47);
lean_dec(x_23);
lean_dec(x_11);
lean_dec(x_10);
lean_dec(x_2);
lean_dec(x_1);
x_194 = lean_ctor_get(x_118, 0);
lean_inc(x_194);
@ -3796,7 +3791,6 @@ block_116:
{
lean_object* x_52;
lean_inc(x_3);
lean_inc(x_2);
x_52 = l_Lean_Elab_Command_addDecl(x_2, x_50, x_3, x_51);
lean_dec(x_50);
if (lean_obj_tag(x_52) == 0)
@ -3808,7 +3802,6 @@ lean_dec(x_52);
x_54 = 0;
lean_inc(x_3);
lean_inc(x_47);
lean_inc(x_2);
x_55 = l_Array_forMAux___main___at_Lean_Elab_Command_applyAttributes___spec__1(x_2, x_47, x_54, x_49, x_12, x_3, x_53);
if (lean_obj_tag(x_55) == 0)
{
@ -4088,7 +4081,6 @@ lean_object* x_112; lean_object* x_113;
lean_dec(x_49);
lean_dec(x_47);
lean_dec(x_23);
lean_dec(x_2);
x_112 = lean_ctor_get(x_55, 0);
lean_inc(x_112);
x_113 = lean_ctor_get(x_55, 1);
@ -4105,7 +4097,6 @@ lean_object* x_114; lean_object* x_115;
lean_dec(x_49);
lean_dec(x_47);
lean_dec(x_23);
lean_dec(x_2);
x_114 = lean_ctor_get(x_52, 0);
lean_inc(x_114);
x_115 = lean_ctor_get(x_52, 1);
@ -4123,7 +4114,6 @@ lean_object* x_196; lean_object* x_197;
lean_dec(x_23);
lean_dec(x_11);
lean_dec(x_10);
lean_dec(x_2);
lean_dec(x_1);
x_196 = lean_ctor_get(x_46, 0);
lean_inc(x_196);
@ -4197,7 +4187,6 @@ lean_dec(x_16);
lean_dec(x_11);
lean_dec(x_10);
lean_dec(x_3);
lean_dec(x_2);
lean_dec(x_1);
x_198 = !lean_is_exclusive(x_32);
if (x_198 == 0)
@ -4229,7 +4218,6 @@ lean_dec(x_16);
lean_dec(x_11);
lean_dec(x_10);
lean_dec(x_3);
lean_dec(x_2);
lean_dec(x_1);
x_202 = !lean_is_exclusive(x_30);
if (x_202 == 0)
@ -4260,10 +4248,10 @@ lean_dec(x_18);
lean_dec(x_16);
lean_dec(x_11);
lean_dec(x_10);
lean_dec(x_2);
lean_dec(x_1);
x_206 = l_Lean_Elab_Command_withDeclId___closed__3;
x_207 = l_Lean_Elab_Command_throwError___rarg(x_6, x_206, x_3, x_19);
lean_dec(x_6);
return x_207;
}
}
@ -4277,7 +4265,6 @@ lean_dec(x_11);
lean_dec(x_10);
lean_dec(x_6);
lean_dec(x_3);
lean_dec(x_2);
lean_dec(x_1);
x_221 = !lean_is_exclusive(x_15);
if (x_221 == 0)
@ -4328,6 +4315,15 @@ lean_dec(x_1);
return x_9;
}
}
lean_object* l_Lean_Elab_Command_elabAxiom___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_Command_elabAxiom(x_1, x_2, x_3, x_4);
lean_dec(x_2);
return x_5;
}
}
lean_object* l_Lean_Elab_Command_elabInductive___rarg(lean_object* x_1) {
_start:
{
@ -4540,7 +4536,6 @@ else
{
lean_object* x_35;
lean_dec(x_2);
lean_dec(x_1);
x_35 = lean_box(0);
lean_ctor_set(x_6, 0, x_35);
return x_6;
@ -4551,7 +4546,6 @@ else
lean_object* x_36;
lean_dec(x_12);
lean_dec(x_2);
lean_dec(x_1);
x_36 = lean_box(0);
lean_ctor_set(x_6, 0, x_36);
return x_6;
@ -4562,7 +4556,6 @@ else
lean_object* x_37;
lean_dec(x_12);
lean_dec(x_2);
lean_dec(x_1);
x_37 = lean_box(0);
lean_ctor_set(x_6, 0, x_37);
return x_6;
@ -4573,7 +4566,6 @@ else
lean_object* x_38;
lean_dec(x_12);
lean_free_object(x_6);
lean_dec(x_1);
x_38 = l_Lean_Elab_Command_elabExample(x_8, x_11, x_2, x_9);
return x_38;
}
@ -4583,8 +4575,8 @@ else
lean_object* x_39;
lean_dec(x_12);
lean_free_object(x_6);
lean_dec(x_1);
x_39 = l_Lean_Elab_Command_elabAxiom(x_8, x_11, x_2, x_9);
lean_dec(x_11);
return x_39;
}
}
@ -4593,7 +4585,6 @@ else
lean_object* x_40;
lean_dec(x_12);
lean_free_object(x_6);
lean_dec(x_1);
x_40 = l_Lean_Elab_Command_elabInstance(x_8, x_11, x_2, x_9);
return x_40;
}
@ -4603,7 +4594,6 @@ else
lean_object* x_41;
lean_dec(x_12);
lean_free_object(x_6);
lean_dec(x_1);
x_41 = l_Lean_Elab_Command_elabConstant(x_8, x_11, x_2, x_9);
return x_41;
}
@ -4613,7 +4603,6 @@ else
lean_object* x_42;
lean_dec(x_12);
lean_free_object(x_6);
lean_dec(x_1);
x_42 = l_Lean_Elab_Command_elabTheorem(x_8, x_11, x_2, x_9);
return x_42;
}
@ -4623,7 +4612,6 @@ else
lean_object* x_43;
lean_dec(x_12);
lean_free_object(x_6);
lean_dec(x_1);
x_43 = l_Lean_Elab_Command_elabDef(x_8, x_11, x_2, x_9);
return x_43;
}
@ -4633,7 +4621,6 @@ else
lean_object* x_44;
lean_dec(x_12);
lean_free_object(x_6);
lean_dec(x_1);
x_44 = l_Lean_Elab_Command_elabAbbrev(x_8, x_11, x_2, x_9);
return x_44;
}
@ -4711,7 +4698,6 @@ else
{
lean_object* x_72; lean_object* x_73;
lean_dec(x_2);
lean_dec(x_1);
x_72 = lean_box(0);
x_73 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_73, 0, x_72);
@ -4724,7 +4710,6 @@ else
lean_object* x_74; lean_object* x_75;
lean_dec(x_49);
lean_dec(x_2);
lean_dec(x_1);
x_74 = lean_box(0);
x_75 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_75, 0, x_74);
@ -4737,7 +4722,6 @@ else
lean_object* x_76; lean_object* x_77;
lean_dec(x_49);
lean_dec(x_2);
lean_dec(x_1);
x_76 = lean_box(0);
x_77 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_77, 0, x_76);
@ -4749,7 +4733,6 @@ else
{
lean_object* x_78;
lean_dec(x_49);
lean_dec(x_1);
x_78 = l_Lean_Elab_Command_elabExample(x_45, x_48, x_2, x_46);
return x_78;
}
@ -4758,8 +4741,8 @@ else
{
lean_object* x_79;
lean_dec(x_49);
lean_dec(x_1);
x_79 = l_Lean_Elab_Command_elabAxiom(x_45, x_48, x_2, x_46);
lean_dec(x_48);
return x_79;
}
}
@ -4767,7 +4750,6 @@ else
{
lean_object* x_80;
lean_dec(x_49);
lean_dec(x_1);
x_80 = l_Lean_Elab_Command_elabInstance(x_45, x_48, x_2, x_46);
return x_80;
}
@ -4776,7 +4758,6 @@ else
{
lean_object* x_81;
lean_dec(x_49);
lean_dec(x_1);
x_81 = l_Lean_Elab_Command_elabConstant(x_45, x_48, x_2, x_46);
return x_81;
}
@ -4785,7 +4766,6 @@ else
{
lean_object* x_82;
lean_dec(x_49);
lean_dec(x_1);
x_82 = l_Lean_Elab_Command_elabTheorem(x_45, x_48, x_2, x_46);
return x_82;
}
@ -4794,7 +4774,6 @@ else
{
lean_object* x_83;
lean_dec(x_49);
lean_dec(x_1);
x_83 = l_Lean_Elab_Command_elabDef(x_45, x_48, x_2, x_46);
return x_83;
}
@ -4803,7 +4782,6 @@ else
{
lean_object* x_84;
lean_dec(x_49);
lean_dec(x_1);
x_84 = l_Lean_Elab_Command_elabAbbrev(x_45, x_48, x_2, x_46);
return x_84;
}
@ -4813,7 +4791,6 @@ else
{
uint8_t x_85;
lean_dec(x_2);
lean_dec(x_1);
x_85 = !lean_is_exclusive(x_6);
if (x_85 == 0)
{
@ -4835,6 +4812,15 @@ return x_88;
}
}
}
lean_object* l_Lean_Elab_Command_elabDeclaration___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_4;
x_4 = l_Lean_Elab_Command_elabDeclaration(x_1, x_2, x_3);
lean_dec(x_1);
return x_4;
}
}
lean_object* _init_l___regBuiltinCommandElab_Lean_Elab_Command_elabDeclaration___closed__1() {
_start:
{
@ -4857,7 +4843,7 @@ lean_object* _init_l___regBuiltinCommandElab_Lean_Elab_Command_elabDeclaration__
_start:
{
lean_object* x_1;
x_1 = lean_alloc_closure((void*)(l_Lean_Elab_Command_elabDeclaration), 3, 0);
x_1 = lean_alloc_closure((void*)(l_Lean_Elab_Command_elabDeclaration___boxed), 3, 0);
return x_1;
}
}

View file

@ -36,13 +36,14 @@ lean_object* l_Lean_Elab_Command_elabDefVal___closed__2;
uint8_t lean_name_eq(lean_object*, lean_object*);
lean_object* l_Lean_Elab_Command_compileDecl(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Array_reverseAux___main___rarg(lean_object*, lean_object*);
lean_object* l___private_Init_Lean_Elab_Command_8__getVarDecls(lean_object*);
lean_object* l_Lean_Elab_Term_mkLambda(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* lean_array_push(lean_object*, lean_object*);
lean_object* lean_array_get_size(lean_object*);
lean_object* l___private_Init_Lean_Elab_Command_11__addScopes___main(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*);
extern lean_object* l_Lean_Parser_Command_declValEqns___elambda__1___closed__2;
lean_object* l_Lean_Elab_Command_elabDefVal___closed__1;
lean_object* l_Lean_Elab_Command_elabDefVal(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l___private_Init_Lean_Elab_Term_20__synthesizeSyntheticMVarsAux___main(uint8_t, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Elab_Command_collectUsedFVarsAtFVars___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
uint8_t l_Lean_Elab_Command_DefKind_isExample(uint8_t);
lean_object* l_Lean_Name_getNumParts___main(lean_object*);
@ -64,10 +65,8 @@ lean_object* l_Array_iterateMAux___main___at_Lean_Elab_Command_elabDefLike___spe
lean_object* lean_nat_sub(lean_object*, lean_object*);
lean_object* l_Lean_Elab_Term_throwUnsupportedSyntax___rarg(lean_object*);
lean_object* l_Lean_Elab_Command_DefKind_isTheorem___boxed(lean_object*);
extern lean_object* l___private_Init_Lean_Elab_Term_14__resumePostponed___lambda__1___closed__1;
extern lean_object* l_Lean_Parser_Command_declValSimple___elambda__1___closed__2;
lean_object* l_Lean_Expr_fvarId_x21(lean_object*);
lean_object* l___private_Init_Lean_Elab_Command_11__getVarDecls(lean_object*);
lean_object* l_Lean_Elab_Command_mkDef___lambda__1___closed__2;
lean_object* l_Lean_Elab_Command_mkDef___lambda__1___closed__1;
lean_object* l_Lean_Elab_Term_elabTermAux___main(lean_object*, uint8_t, uint8_t, lean_object*, lean_object*, lean_object*);
@ -81,16 +80,18 @@ lean_object* l_Lean_Elab_Term_throwError___rarg(lean_object*, lean_object*, lean
extern lean_object* l_Lean_Elab_Term_elabTypeStx___rarg___closed__1;
lean_object* l_Lean_Elab_Command_collectUsedFVars(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l___private_Init_Lean_Elab_Definition_1__regTraceClasses(lean_object*);
extern lean_object* l___private_Init_Lean_Elab_Term_11__resumePostponed___lambda__1___closed__1;
lean_object* l_Lean_Elab_Command_withUsedWhen___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*);
extern lean_object* l_Lean_Parser_Command_namespace___elambda__1___closed__1;
lean_object* l_Lean_Elab_Command_throwError___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
uint8_t l_List_elem___main___at_Lean_Parser_addLeadingParser___spec__7(lean_object*, lean_object*);
lean_object* l___private_Init_Lean_Elab_Command_6__mkTermContext(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_LocalInstances_erase(lean_object*, lean_object*);
lean_object* l_Lean_CollectFVars_main___main(lean_object*, lean_object*);
lean_object* l_Lean_Elab_Command_withUsedWhen_x27(lean_object*);
lean_object* l___private_Init_Lean_Elab_Command_9__mkTermContext(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Elab_Command_DefKind_isDefOrOpaque___boxed(lean_object*);
lean_object* l_Lean_Elab_Term_getLocalInsts(lean_object*, lean_object*);
lean_object* l___private_Init_Lean_Elab_Term_17__synthesizeSyntheticMVarsAux___main(uint8_t, lean_object*, lean_object*, lean_object*);
extern lean_object* l_Lean_Elab_Command_modifyScope___closed__1;
lean_object* l_Lean_Elab_Command_elabDefLike___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
uint8_t l_Lean_Elab_Command_DefKind_isTheorem(uint8_t);
@ -118,7 +119,6 @@ lean_object* l_Lean_Elab_Command_getLevelNames(lean_object*, lean_object*);
lean_object* l_Lean_Elab_Command_removeUnused(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Elab_Command_elabDefLike(lean_object*, lean_object*, lean_object*);
lean_object* l___private_Init_Lean_Elab_Command_14__addScopes___main(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Syntax_foldArgsAuxM___main___at_Lean_Syntax_foldSepRevArgsM___spec__1(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Elab_Term_elabBinders___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Elab_Command_removeUnused___closed__1;
@ -128,13 +128,13 @@ lean_object* l_Lean_Syntax_getArg(lean_object*, lean_object*);
extern lean_object* l_HashMap_Inhabited___closed__1;
uint8_t l_Lean_Elab_Command_DefKind_isDefOrOpaque(uint8_t);
lean_object* lean_task_pure(lean_object*);
lean_object* l___private_Init_Lean_Elab_Command_7__mkTermState(lean_object*);
lean_object* l_Lean_CollectLevelParams_main___main(lean_object*, lean_object*);
lean_object* l_Lean_Elab_Command_DefKind_isExample___boxed(lean_object*);
lean_object* l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_elabDefLike___spec__1(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Elab_Command_mkDef___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l___private_Init_Lean_Elab_Command_3__setState(lean_object*, lean_object*, lean_object*);
uint8_t lean_nat_dec_lt(lean_object*, lean_object*);
lean_object* l___private_Init_Lean_Elab_Command_10__mkTermState(lean_object*);
uint8_t l_Lean_Elab_Command_DefKind_isTheorem(uint8_t x_1) {
_start:
{
@ -1576,7 +1576,7 @@ lean_dec(x_37);
lean_dec(x_35);
lean_dec(x_32);
lean_dec(x_8);
x_58 = l___private_Init_Lean_Elab_Term_14__resumePostponed___lambda__1___closed__1;
x_58 = l___private_Init_Lean_Elab_Term_11__resumePostponed___lambda__1___closed__1;
x_59 = l_unreachable_x21___rarg(x_58);
x_60 = lean_apply_2(x_59, x_11, x_38);
return x_60;
@ -1748,7 +1748,6 @@ lean_inc(x_6);
x_15 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_15, 0, x_6);
lean_inc(x_8);
lean_inc(x_10);
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)
{
@ -1761,7 +1760,7 @@ lean_dec(x_16);
x_19 = 0;
x_20 = lean_box(0);
lean_inc(x_8);
x_21 = l___private_Init_Lean_Elab_Term_20__synthesizeSyntheticMVarsAux___main(x_19, x_20, x_8, x_18);
x_21 = l___private_Init_Lean_Elab_Term_17__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;
@ -2051,6 +2050,7 @@ else
lean_object* x_11; lean_object* x_12;
x_11 = l_Lean_Elab_Command_elabDefVal___closed__3;
x_12 = l_Lean_Elab_Term_throwError___rarg(x_1, x_11, x_3, x_4);
lean_dec(x_1);
return x_12;
}
}
@ -4300,6 +4300,7 @@ lean_object* x_17; uint8_t x_18;
lean_dec(x_12);
lean_dec(x_4);
x_17 = l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg(x_10, x_13, x_5, x_6);
lean_dec(x_10);
x_18 = !lean_is_exclusive(x_17);
if (x_18 == 0)
{
@ -4457,7 +4458,7 @@ lean_dec(x_26);
x_29 = 0;
x_30 = lean_box(0);
lean_inc(x_8);
x_31 = l___private_Init_Lean_Elab_Term_20__synthesizeSyntheticMVarsAux___main(x_29, x_30, x_8, x_28);
x_31 = l___private_Init_Lean_Elab_Term_17__synthesizeSyntheticMVarsAux___main(x_29, x_30, x_8, x_28);
if (lean_obj_tag(x_31) == 0)
{
lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; uint8_t x_36; uint8_t x_37; lean_object* x_38; lean_object* x_39;
@ -4679,7 +4680,8 @@ x_23 = l_Lean_Parser_Command_namespace___elambda__1___closed__1;
x_24 = 1;
lean_inc(x_2);
lean_inc(x_18);
x_25 = l___private_Init_Lean_Elab_Command_14__addScopes___main(x_5, x_23, x_24, x_18, x_2, x_14);
x_25 = l___private_Init_Lean_Elab_Command_11__addScopes___main(x_5, x_23, x_24, x_18, x_2, x_14);
lean_dec(x_5);
if (lean_obj_tag(x_25) == 0)
{
lean_object* x_26; lean_object* x_27;
@ -4712,7 +4714,6 @@ lean_dec(x_93);
x_122 = 2;
lean_inc(x_2);
lean_inc(x_95);
lean_inc(x_4);
x_123 = l_Array_forMAux___main___at_Lean_Elab_Command_applyAttributes___spec__1(x_4, x_95, x_122, x_97, x_6, x_2, x_96);
if (lean_obj_tag(x_123) == 0)
{
@ -4750,9 +4751,9 @@ lean_inc(x_131);
x_132 = lean_ctor_get(x_130, 1);
lean_inc(x_132);
lean_dec(x_130);
x_133 = l___private_Init_Lean_Elab_Command_11__getVarDecls(x_131);
x_134 = l___private_Init_Lean_Elab_Command_9__mkTermContext(x_2, x_131, x_128);
x_135 = l___private_Init_Lean_Elab_Command_10__mkTermState(x_131);
x_133 = l___private_Init_Lean_Elab_Command_8__getVarDecls(x_131);
x_134 = l___private_Init_Lean_Elab_Command_6__mkTermContext(x_2, x_131, x_128);
x_135 = l___private_Init_Lean_Elab_Command_7__mkTermState(x_131);
lean_dec(x_131);
x_136 = l_Lean_Elab_Term_elabBinders___rarg(x_133, x_129, x_134, x_135);
lean_dec(x_133);
@ -5131,7 +5132,6 @@ x_101 = lean_ctor_get(x_98, 0);
lean_inc(x_101);
lean_dec(x_98);
lean_inc(x_2);
lean_inc(x_4);
x_102 = l_Lean_Elab_Command_addDecl(x_4, x_101, x_2, x_99);
if (lean_obj_tag(x_102) == 0)
{
@ -5142,7 +5142,6 @@ lean_dec(x_102);
x_104 = 0;
lean_inc(x_2);
lean_inc(x_95);
lean_inc(x_4);
x_105 = l_Array_forMAux___main___at_Lean_Elab_Command_applyAttributes___spec__1(x_4, x_95, x_104, x_97, x_6, x_2, x_103);
if (lean_obj_tag(x_105) == 0)
{
@ -5151,7 +5150,6 @@ x_106 = lean_ctor_get(x_105, 1);
lean_inc(x_106);
lean_dec(x_105);
lean_inc(x_2);
lean_inc(x_4);
x_107 = l_Lean_Elab_Command_compileDecl(x_4, x_101, x_2, x_106);
lean_dec(x_101);
if (lean_obj_tag(x_107) == 0)
@ -5164,6 +5162,7 @@ x_109 = 1;
lean_inc(x_2);
x_110 = l_Array_forMAux___main___at_Lean_Elab_Command_applyAttributes___spec__1(x_4, x_95, x_109, x_97, x_6, x_2, x_108);
lean_dec(x_97);
lean_dec(x_4);
if (lean_obj_tag(x_110) == 0)
{
lean_object* x_111; lean_object* x_112;
@ -5628,6 +5627,7 @@ lean_dec(x_4);
lean_dec(x_1);
x_211 = l_Lean_Elab_Command_withDeclId___closed__3;
x_212 = l_Lean_Elab_Command_throwError___rarg(x_5, x_211, x_2, x_14);
lean_dec(x_5);
return x_212;
}
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -67,6 +67,7 @@ x_7 = lean_alloc_ctor(8, 2, 0);
lean_ctor_set(x_7, 0, x_6);
lean_ctor_set(x_7, 1, x_5);
x_8 = l_Lean_Elab_Term_throwError___rarg(x_1, x_7, x_3, x_4);
lean_dec(x_1);
return x_8;
}
}

File diff suppressed because it is too large Load diff

View file

@ -72,6 +72,7 @@ lean_object* l_Lean_Elab_Term_NamedArg_hasToString(lean_object*);
lean_object* lean_array_push(lean_object*, lean_object*);
lean_object* lean_array_get_size(lean_object*);
lean_object* lean_string_append(lean_object*, lean_object*);
lean_object* l___private_Init_Lean_Elab_TermApp_3__elabArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l___private_Init_Lean_Elab_TermApp_16__toMessageData___closed__1;
lean_object* l_Lean_Expr_getOptParamDefault_x3f(lean_object*);
lean_object* l___private_Init_Lean_Elab_TermApp_7__resolveLValAux___closed__20;
@ -92,6 +93,7 @@ lean_object* l_List_foldlM___main___at___private_Init_Lean_Elab_TermApp_14__elab
lean_object* l___private_Init_Lean_Elab_TermApp_7__resolveLValAux___closed__14;
extern lean_object* l_Array_iterateMAux___main___at_Lean_mkAppStx___spec__1___closed__1;
lean_object* l___private_Init_Lean_Elab_TermApp_16__toMessageData___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l___private_Init_Lean_Elab_TermApp_8__resolveLValLoop___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Elab_Term_NamedArg_inhabited;
extern lean_object* l___private_Init_Lean_Elab_Util_8__regTraceClasses___closed__2;
lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabId___closed__3;
@ -119,6 +121,7 @@ extern lean_object* l_Lean_Syntax_getKind___closed__4;
lean_object* l___private_Init_Lean_Elab_TermApp_3__elabArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* lean_array_fget(lean_object*, lean_object*);
lean_object* l_Lean_mkProj(lean_object*, lean_object*, lean_object*);
lean_object* l___private_Init_Lean_Elab_TermApp_8__resolveLValLoop___main___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Elab_Term_elabArrayRef(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l___private_Init_Lean_Elab_TermApp_19__expandApp___main(lean_object*, lean_object*, lean_object*);
lean_object* l___private_Init_Lean_Elab_TermApp_12__elabAppLValsAux___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
@ -139,7 +142,6 @@ lean_object* l_Lean_Elab_Term_elabId(lean_object*, lean_object*, lean_object*, l
lean_object* l_Lean_Name_append___main(lean_object*, lean_object*);
lean_object* l_Array_shrink___main___rarg(lean_object*, lean_object*);
lean_object* l___private_Init_Lean_Elab_TermApp_11__addLValArg___main___closed__2;
extern lean_object* l___private_Init_Lean_Elab_Term_14__resumePostponed___lambda__1___closed__1;
lean_object* l___private_Init_Lean_Elab_TermApp_7__resolveLValAux___closed__26;
lean_object* l___private_Init_Lean_Elab_TermApp_17__mergeFailures___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabChoice___closed__1;
@ -151,6 +153,7 @@ extern lean_object* l_Lean_Elab_Term_mkConst___closed__4;
lean_object* l___private_Init_Lean_Elab_TermApp_13__elabAppLVals___closed__3;
lean_object* l___private_Init_Lean_Elab_TermApp_4__elabAppArgsAux___main(lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l___private_Init_Lean_Elab_TermApp_11__addLValArg___main___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l___private_Init_Lean_Elab_TermApp_2__ensureArgType___boxed(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__4(lean_object*);
lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabArrayRef___closed__2;
lean_object* l_Lean_Elab_Term_NamedArg_inhabited___closed__1;
@ -168,6 +171,7 @@ lean_object* lean_name_mk_string(lean_object*, lean_object*);
extern lean_object* l_Lean_choiceKind;
lean_object* l_Lean_Elab_Term_throwError___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l___private_Init_Lean_Elab_TermApp_7__resolveLValAux___closed__12;
extern lean_object* l___private_Init_Lean_Elab_Term_11__resumePostponed___lambda__1___closed__1;
lean_object* l_Lean_Elab_Term_resolveName(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_getStructureFields(lean_object*, lean_object*);
lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabSortApp___closed__1;
@ -235,8 +239,8 @@ lean_object* l_Array_forMAux___main___at___private_Init_Lean_Elab_TermApp_1__syn
lean_object* l___private_Init_Lean_Elab_TermApp_16__toMessageData___closed__2;
lean_object* l_Lean_Elab_Term_elabSortApp(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l___private_Init_Lean_Elab_TermApp_4__elabAppArgsAux___main___closed__3;
extern uint8_t l___private_Init_Lean_Elab_Term_7__hasCDot___main___closed__1;
lean_object* l_Lean_mkApp(lean_object*, lean_object*);
lean_object* l___private_Init_Lean_Elab_TermApp_9__resolveLVal___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabExplicit___closed__3;
lean_object* l___private_Init_Lean_Elab_TermApp_9__resolveLVal(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabProj___closed__2;
@ -245,10 +249,12 @@ uint8_t l_Lean_BinderInfo_isExplicit(uint8_t);
lean_object* l_Lean_Elab_Term_registerSyntheticMVar(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Syntax_getKind(lean_object*);
lean_object* l_Lean_Elab_Term_synthesizeInstMVarCore(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l___private_Init_Lean_Elab_TermApp_6__throwLValError___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* lean_panic_fn(lean_object*, lean_object*);
lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabChoice(lean_object*);
lean_object* l_Lean_Elab_getPos___at_Lean_Elab_Term_throwError___spec__2(lean_object*, lean_object*, lean_object*);
extern lean_object* l_Lean_Parser_Term_app___elambda__1___closed__2;
lean_object* l___private_Init_Lean_Elab_TermApp_7__resolveLValAux___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l___private_Init_Lean_Elab_TermApp_7__resolveLValAux___closed__2;
lean_object* l_Array_iterateMAux___main___at___private_Init_Lean_Elab_TermApp_14__elabAppFn___main___spec__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l___private_Init_Lean_Elab_TermApp_7__resolveLValAux___closed__9;
@ -278,6 +284,7 @@ lean_object* l_Lean_Expr_consumeMData___main(lean_object*);
lean_object* l_Lean_Elab_Term_addNamedArg___closed__1;
lean_object* l___private_Init_Lean_Elab_TermApp_4__elabAppArgsAux___main___closed__4;
lean_object* l_Array_toList___rarg(lean_object*);
lean_object* l_Lean_Elab_Term_addNamedArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l___private_Init_Lean_Elab_TermApp_18__elabAppAux___closed__2;
lean_object* l_Lean_Elab_Term_addBuiltinTermElab(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabApp___closed__2;
@ -288,6 +295,7 @@ lean_object* l_Lean_Elab_Term_Arg_inhabited___closed__1;
lean_object* l___private_Init_Lean_Elab_TermApp_7__resolveLValAux___closed__6;
lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabApp___closed__1;
lean_object* l___private_Init_Lean_Elab_TermApp_17__mergeFailures___rarg___closed__2;
lean_object* l___private_Init_Lean_Elab_TermApp_17__mergeFailures___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l___private_Init_Lean_Elab_TermApp_11__addLValArg___main___closed__9;
lean_object* l___private_Init_Lean_Elab_TermApp_10__mkBaseProjections___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Elab_Term_tryEnsureHasType_x3f(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
@ -316,6 +324,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;
extern uint8_t l___private_Init_Lean_Elab_Term_4__hasCDot___main___closed__1;
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*);
@ -555,7 +564,6 @@ if (x_8 == 0)
{
lean_object* x_9; lean_object* x_10;
lean_dec(x_4);
lean_dec(x_1);
x_9 = lean_array_push(x_2, x_3);
x_10 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_10, 0, x_9);
@ -618,6 +626,15 @@ x_7 = lean_box(x_6);
return x_7;
}
}
lean_object* l_Lean_Elab_Term_addNamedArg___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_addNamedArg(x_1, x_2, x_3, x_4, x_5);
lean_dec(x_1);
return x_6;
}
}
lean_object* l_Array_forMAux___main___at___private_Init_Lean_Elab_TermApp_1__synthesizeAppInstMVars___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
@ -643,7 +660,6 @@ lean_object* x_10; lean_object* x_11;
x_10 = lean_array_fget(x_2, x_3);
lean_inc(x_4);
lean_inc(x_10);
lean_inc(x_1);
x_11 = l_Lean_Elab_Term_synthesizeInstMVarCore(x_1, x_10, x_4, x_5);
if (lean_obj_tag(x_11) == 0)
{
@ -812,7 +828,6 @@ uint8_t x_29;
lean_dec(x_5);
lean_dec(x_3);
lean_dec(x_2);
lean_dec(x_1);
x_29 = !lean_is_exclusive(x_11);
if (x_29 == 0)
{
@ -847,7 +862,6 @@ uint8_t x_35;
lean_dec(x_5);
lean_dec(x_3);
lean_dec(x_2);
lean_dec(x_1);
x_35 = !lean_is_exclusive(x_11);
if (x_35 == 0)
{
@ -875,7 +889,6 @@ lean_dec(x_5);
lean_dec(x_4);
lean_dec(x_3);
lean_dec(x_2);
lean_dec(x_1);
x_39 = !lean_is_exclusive(x_7);
if (x_39 == 0)
{
@ -897,6 +910,15 @@ return x_42;
}
}
}
lean_object* l___private_Init_Lean_Elab_TermApp_2__ensureArgType___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___private_Init_Lean_Elab_TermApp_2__ensureArgType(x_1, x_2, x_3, x_4, x_5, x_6);
lean_dec(x_1);
return x_7;
}
}
lean_object* l___private_Init_Lean_Elab_TermApp_3__elabArg(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:
{
@ -929,7 +951,6 @@ uint8_t x_14;
lean_dec(x_5);
lean_dec(x_4);
lean_dec(x_2);
lean_dec(x_1);
x_14 = !lean_is_exclusive(x_10);
if (x_14 == 0)
{
@ -961,6 +982,15 @@ return x_19;
}
}
}
lean_object* l___private_Init_Lean_Elab_TermApp_3__elabArg___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___private_Init_Lean_Elab_TermApp_3__elabArg(x_1, x_2, x_3, x_4, x_5, x_6);
lean_dec(x_1);
return x_7;
}
}
lean_object* l_Array_findIdxAux___main___at___private_Init_Lean_Elab_TermApp_4__elabAppArgsAux___main___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
@ -1260,6 +1290,7 @@ x_85 = lean_alloc_ctor(8, 2, 0);
lean_ctor_set(x_85, 0, x_77);
lean_ctor_set(x_85, 1, x_84);
x_86 = l_Lean_Elab_Term_throwError___rarg(x_1, x_85, x_10, x_14);
lean_dec(x_1);
return x_86;
}
else
@ -1268,7 +1299,6 @@ lean_object* x_87;
lean_dec(x_41);
lean_dec(x_6);
lean_inc(x_10);
lean_inc(x_1);
x_87 = l_Lean_Elab_Term_ensureHasType(x_1, x_3, x_8, x_9, x_10, x_14);
if (lean_obj_tag(x_87) == 0)
{
@ -1380,7 +1410,6 @@ lean_dec(x_8);
x_107 = lean_array_fget(x_2, x_5);
lean_inc(x_10);
lean_inc(x_9);
lean_inc(x_1);
x_108 = l___private_Init_Lean_Elab_TermApp_3__elabArg(x_1, x_9, x_107, x_42, x_10, x_14);
if (lean_obj_tag(x_108) == 0)
{
@ -1485,6 +1514,7 @@ x_136 = lean_alloc_ctor(8, 2, 0);
lean_ctor_set(x_136, 0, x_128);
lean_ctor_set(x_136, 1, x_135);
x_137 = l_Lean_Elab_Term_throwError___rarg(x_1, x_136, x_10, x_14);
lean_dec(x_1);
return x_137;
}
else
@ -1493,7 +1523,6 @@ lean_object* x_138;
lean_dec(x_41);
lean_dec(x_6);
lean_inc(x_10);
lean_inc(x_1);
x_138 = l_Lean_Elab_Term_ensureHasType(x_1, x_3, x_8, x_9, x_10, x_14);
if (lean_obj_tag(x_138) == 0)
{
@ -1605,7 +1634,6 @@ lean_dec(x_8);
x_158 = lean_array_fget(x_2, x_5);
lean_inc(x_10);
lean_inc(x_9);
lean_inc(x_1);
x_159 = l___private_Init_Lean_Elab_TermApp_3__elabArg(x_1, x_9, x_158, x_42, x_10, x_14);
if (lean_obj_tag(x_159) == 0)
{
@ -1677,7 +1705,6 @@ lean_inc(x_175);
lean_dec(x_173);
lean_inc(x_10);
lean_inc(x_9);
lean_inc(x_1);
x_176 = l___private_Init_Lean_Elab_TermApp_3__elabArg(x_1, x_9, x_175, x_42, x_10, x_14);
if (lean_obj_tag(x_176) == 0)
{
@ -1752,6 +1779,7 @@ lean_dec(x_5);
lean_dec(x_3);
x_17 = l___private_Init_Lean_Elab_TermApp_4__elabAppArgsAux___main___closed__3;
x_18 = l_Lean_Elab_Term_throwError___rarg(x_1, x_17, x_10, x_14);
lean_dec(x_1);
return x_18;
}
else
@ -1770,13 +1798,13 @@ lean_dec(x_7);
lean_dec(x_3);
x_21 = l___private_Init_Lean_Elab_TermApp_4__elabAppArgsAux___main___closed__3;
x_22 = l_Lean_Elab_Term_throwError___rarg(x_1, x_21, x_10, x_14);
lean_dec(x_1);
return x_22;
}
else
{
lean_object* x_23;
lean_inc(x_10);
lean_inc(x_1);
x_23 = l_Lean_Elab_Term_ensureHasType(x_1, x_3, x_8, x_9, x_10, x_14);
if (lean_obj_tag(x_23) == 0)
{
@ -2073,10 +2101,19 @@ lean_object* l___private_Init_Lean_Elab_TermApp_6__throwLValError(lean_object* x
_start:
{
lean_object* x_2;
x_2 = lean_alloc_closure((void*)(l___private_Init_Lean_Elab_TermApp_6__throwLValError___rarg), 6, 0);
x_2 = lean_alloc_closure((void*)(l___private_Init_Lean_Elab_TermApp_6__throwLValError___rarg___boxed), 6, 0);
return x_2;
}
}
lean_object* l___private_Init_Lean_Elab_TermApp_6__throwLValError___rarg___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___private_Init_Lean_Elab_TermApp_6__throwLValError___rarg(x_1, x_2, x_3, x_4, x_5, x_6);
lean_dec(x_1);
return x_7;
}
}
lean_object* _init_l___private_Init_Lean_Elab_TermApp_7__resolveLValAux___closed__1() {
_start:
{
@ -2450,7 +2487,6 @@ lean_dec(x_26);
lean_dec(x_5);
lean_dec(x_3);
lean_dec(x_2);
lean_dec(x_1);
lean_inc(x_14);
x_36 = l_Lean_isStructure(x_19, x_14);
if (x_36 == 0)
@ -2607,7 +2643,6 @@ lean_dec(x_57);
lean_dec(x_5);
lean_dec(x_3);
lean_dec(x_2);
lean_dec(x_1);
x_87 = lean_alloc_ctor(2, 2, 0);
lean_ctor_set(x_87, 0, x_56);
lean_ctor_set(x_87, 1, x_65);
@ -2667,7 +2702,6 @@ lean_dec(x_57);
lean_dec(x_5);
lean_dec(x_3);
lean_dec(x_2);
lean_dec(x_1);
x_104 = lean_alloc_ctor(2, 2, 0);
lean_ctor_set(x_104, 0, x_56);
lean_ctor_set(x_104, 1, x_65);
@ -2683,7 +2717,6 @@ lean_dec(x_57);
lean_dec(x_5);
lean_dec(x_3);
lean_dec(x_2);
lean_dec(x_1);
x_105 = l_Lean_LocalDecl_toExpr(x_88);
lean_dec(x_88);
x_106 = lean_alloc_ctor(3, 3, 0);
@ -2745,7 +2778,6 @@ lean_dec(x_57);
lean_dec(x_5);
lean_dec(x_3);
lean_dec(x_2);
lean_dec(x_1);
x_122 = lean_alloc_ctor(2, 2, 0);
lean_ctor_set(x_122, 0, x_56);
lean_ctor_set(x_122, 1, x_65);
@ -2806,7 +2838,6 @@ lean_dec(x_57);
lean_dec(x_5);
lean_dec(x_3);
lean_dec(x_2);
lean_dec(x_1);
x_140 = lean_alloc_ctor(2, 2, 0);
lean_ctor_set(x_140, 0, x_56);
lean_ctor_set(x_140, 1, x_65);
@ -2824,7 +2855,6 @@ lean_dec(x_57);
lean_dec(x_5);
lean_dec(x_3);
lean_dec(x_2);
lean_dec(x_1);
x_142 = l_Lean_LocalDecl_toExpr(x_124);
lean_dec(x_124);
x_143 = lean_alloc_ctor(3, 3, 0);
@ -2912,7 +2942,6 @@ lean_dec(x_57);
lean_dec(x_5);
lean_dec(x_3);
lean_dec(x_2);
lean_dec(x_1);
x_170 = lean_alloc_ctor(2, 2, 0);
lean_ctor_set(x_170, 0, x_56);
lean_ctor_set(x_170, 1, x_148);
@ -2972,7 +3001,6 @@ lean_dec(x_57);
lean_dec(x_5);
lean_dec(x_3);
lean_dec(x_2);
lean_dec(x_1);
x_187 = lean_alloc_ctor(2, 2, 0);
lean_ctor_set(x_187, 0, x_56);
lean_ctor_set(x_187, 1, x_148);
@ -2988,7 +3016,6 @@ lean_dec(x_57);
lean_dec(x_5);
lean_dec(x_3);
lean_dec(x_2);
lean_dec(x_1);
x_188 = l_Lean_LocalDecl_toExpr(x_171);
lean_dec(x_171);
x_189 = lean_alloc_ctor(3, 3, 0);
@ -3050,7 +3077,6 @@ lean_dec(x_57);
lean_dec(x_5);
lean_dec(x_3);
lean_dec(x_2);
lean_dec(x_1);
x_205 = lean_alloc_ctor(2, 2, 0);
lean_ctor_set(x_205, 0, x_56);
lean_ctor_set(x_205, 1, x_148);
@ -3111,7 +3137,6 @@ lean_dec(x_57);
lean_dec(x_5);
lean_dec(x_3);
lean_dec(x_2);
lean_dec(x_1);
x_223 = lean_alloc_ctor(2, 2, 0);
lean_ctor_set(x_223, 0, x_56);
lean_ctor_set(x_223, 1, x_148);
@ -3129,7 +3154,6 @@ lean_dec(x_57);
lean_dec(x_5);
lean_dec(x_3);
lean_dec(x_2);
lean_dec(x_1);
x_225 = l_Lean_LocalDecl_toExpr(x_207);
lean_dec(x_207);
x_226 = lean_alloc_ctor(3, 3, 0);
@ -3152,7 +3176,6 @@ lean_dec(x_57);
lean_dec(x_5);
lean_dec(x_3);
lean_dec(x_2);
lean_dec(x_1);
x_228 = lean_ctor_get(x_147, 0);
lean_inc(x_228);
lean_dec(x_147);
@ -3248,7 +3271,6 @@ lean_dec(x_57);
lean_dec(x_5);
lean_dec(x_3);
lean_dec(x_2);
lean_dec(x_1);
x_257 = lean_alloc_ctor(2, 2, 0);
lean_ctor_set(x_257, 0, x_56);
lean_ctor_set(x_257, 1, x_235);
@ -3314,7 +3336,6 @@ lean_dec(x_57);
lean_dec(x_5);
lean_dec(x_3);
lean_dec(x_2);
lean_dec(x_1);
x_275 = lean_alloc_ctor(2, 2, 0);
lean_ctor_set(x_275, 0, x_56);
lean_ctor_set(x_275, 1, x_235);
@ -3336,7 +3357,6 @@ lean_dec(x_57);
lean_dec(x_5);
lean_dec(x_3);
lean_dec(x_2);
lean_dec(x_1);
x_277 = l_Lean_LocalDecl_toExpr(x_259);
lean_dec(x_259);
x_278 = lean_alloc_ctor(3, 3, 0);
@ -3432,7 +3452,6 @@ lean_dec(x_57);
lean_dec(x_5);
lean_dec(x_3);
lean_dec(x_2);
lean_dec(x_1);
x_305 = lean_alloc_ctor(2, 2, 0);
lean_ctor_set(x_305, 0, x_56);
lean_ctor_set(x_305, 1, x_283);
@ -3498,7 +3517,6 @@ lean_dec(x_57);
lean_dec(x_5);
lean_dec(x_3);
lean_dec(x_2);
lean_dec(x_1);
x_323 = lean_alloc_ctor(2, 2, 0);
lean_ctor_set(x_323, 0, x_56);
lean_ctor_set(x_323, 1, x_283);
@ -3520,7 +3538,6 @@ lean_dec(x_57);
lean_dec(x_5);
lean_dec(x_3);
lean_dec(x_2);
lean_dec(x_1);
x_325 = l_Lean_LocalDecl_toExpr(x_307);
lean_dec(x_307);
x_326 = lean_alloc_ctor(3, 3, 0);
@ -3546,7 +3563,6 @@ lean_dec(x_57);
lean_dec(x_5);
lean_dec(x_3);
lean_dec(x_2);
lean_dec(x_1);
x_328 = lean_ctor_get(x_282, 0);
lean_inc(x_328);
lean_dec(x_282);
@ -3607,7 +3623,6 @@ lean_dec(x_339);
lean_dec(x_5);
lean_dec(x_3);
lean_dec(x_2);
lean_dec(x_1);
x_346 = lean_alloc_ctor(4, 2, 0);
lean_ctor_set(x_346, 0, x_338);
lean_ctor_set(x_346, 1, x_332);
@ -3651,7 +3666,6 @@ lean_dec(x_351);
lean_dec(x_5);
lean_dec(x_3);
lean_dec(x_2);
lean_dec(x_1);
x_358 = lean_alloc_ctor(4, 2, 0);
lean_ctor_set(x_358, 0, x_350);
lean_ctor_set(x_358, 1, x_332);
@ -3694,6 +3708,15 @@ return x_11;
}
}
}
lean_object* l___private_Init_Lean_Elab_TermApp_7__resolveLValAux___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___private_Init_Lean_Elab_TermApp_7__resolveLValAux(x_1, x_2, x_3, x_4, x_5, x_6);
lean_dec(x_1);
return x_7;
}
}
lean_object* l_Array_forMAux___main___at___private_Init_Lean_Elab_TermApp_8__resolveLValLoop___main___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
@ -3789,7 +3812,6 @@ lean_inc(x_6);
lean_inc(x_3);
lean_inc(x_9);
lean_inc(x_2);
lean_inc(x_1);
x_13 = l___private_Init_Lean_Elab_TermApp_7__resolveLValAux(x_1, x_2, x_9, x_3, x_6, x_12);
if (lean_obj_tag(x_13) == 0)
{
@ -3798,7 +3820,6 @@ lean_dec(x_6);
lean_dec(x_5);
lean_dec(x_3);
lean_dec(x_2);
lean_dec(x_1);
return x_13;
}
else
@ -3829,7 +3850,6 @@ if (lean_obj_tag(x_19) == 0)
lean_object* x_20; lean_object* x_21; lean_object* x_22; uint8_t x_23;
lean_dec(x_3);
lean_dec(x_2);
lean_dec(x_1);
x_20 = lean_ctor_get(x_18, 1);
lean_inc(x_20);
lean_dec(x_18);
@ -3885,7 +3905,6 @@ lean_dec(x_6);
lean_dec(x_5);
lean_dec(x_3);
lean_dec(x_2);
lean_dec(x_1);
x_31 = !lean_is_exclusive(x_18);
if (x_31 == 0)
{
@ -3914,7 +3933,6 @@ lean_dec(x_6);
lean_dec(x_5);
lean_dec(x_3);
lean_dec(x_2);
lean_dec(x_1);
x_35 = !lean_is_exclusive(x_13);
if (x_35 == 0)
{
@ -3945,7 +3963,6 @@ lean_dec(x_6);
lean_dec(x_5);
lean_dec(x_3);
lean_dec(x_2);
lean_dec(x_1);
x_39 = !lean_is_exclusive(x_11);
if (x_39 == 0)
{
@ -3973,7 +3990,6 @@ lean_dec(x_6);
lean_dec(x_5);
lean_dec(x_3);
lean_dec(x_2);
lean_dec(x_1);
x_43 = !lean_is_exclusive(x_8);
if (x_43 == 0)
{
@ -4005,6 +4021,15 @@ lean_dec(x_2);
return x_6;
}
}
lean_object* l___private_Init_Lean_Elab_TermApp_8__resolveLValLoop___main___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
_start:
{
lean_object* x_8;
x_8 = l___private_Init_Lean_Elab_TermApp_8__resolveLValLoop___main(x_1, x_2, x_3, x_4, x_5, x_6, x_7);
lean_dec(x_1);
return x_8;
}
}
lean_object* l___private_Init_Lean_Elab_TermApp_8__resolveLValLoop(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
_start:
{
@ -4013,6 +4038,15 @@ x_8 = l___private_Init_Lean_Elab_TermApp_8__resolveLValLoop___main(x_1, x_2, x_3
return x_8;
}
}
lean_object* l___private_Init_Lean_Elab_TermApp_8__resolveLValLoop___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
_start:
{
lean_object* x_8;
x_8 = l___private_Init_Lean_Elab_TermApp_8__resolveLValLoop(x_1, x_2, x_3, x_4, x_5, x_6, x_7);
lean_dec(x_1);
return x_8;
}
}
lean_object* l___private_Init_Lean_Elab_TermApp_9__resolveLVal(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
@ -4038,7 +4072,6 @@ uint8_t x_11;
lean_dec(x_4);
lean_dec(x_3);
lean_dec(x_2);
lean_dec(x_1);
x_11 = !lean_is_exclusive(x_6);
if (x_11 == 0)
{
@ -4060,6 +4093,15 @@ return x_14;
}
}
}
lean_object* l___private_Init_Lean_Elab_TermApp_9__resolveLVal___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___private_Init_Lean_Elab_TermApp_9__resolveLVal(x_1, x_2, x_3, x_4, x_5);
lean_dec(x_1);
return x_6;
}
}
lean_object* _init_l_List_foldlM___main___at___private_Init_Lean_Elab_TermApp_10__mkBaseProjections___spec__1___closed__1() {
_start:
{
@ -4101,7 +4143,6 @@ lean_inc(x_8);
lean_dec(x_3);
x_9 = lean_box(0);
lean_inc(x_4);
lean_inc(x_1);
x_10 = l_Lean_Elab_Term_mkConst(x_1, x_7, x_9, x_4, x_5);
if (lean_obj_tag(x_10) == 0)
{
@ -4238,6 +4279,7 @@ lean_object* x_11; lean_object* x_12;
lean_dec(x_4);
x_11 = l___private_Init_Lean_Elab_TermApp_10__mkBaseProjections___closed__3;
x_12 = l_Lean_Elab_Term_throwError___rarg(x_1, x_11, x_5, x_9);
lean_dec(x_1);
return x_12;
}
else
@ -4488,7 +4530,6 @@ lean_dec(x_9);
lean_dec(x_7);
lean_dec(x_3);
lean_dec(x_2);
lean_dec(x_1);
x_45 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_45, 0, x_4);
x_46 = l_Array_insertAt___rarg(x_5, x_6, x_45);
@ -4568,6 +4609,7 @@ _start:
lean_object* x_11;
x_11 = l___private_Init_Lean_Elab_TermApp_11__addLValArg___main(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10);
lean_dec(x_8);
lean_dec(x_1);
return x_11;
}
}
@ -4585,6 +4627,7 @@ _start:
lean_object* x_11;
x_11 = l___private_Init_Lean_Elab_TermApp_11__addLValArg(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10);
lean_dec(x_8);
lean_dec(x_1);
return x_11;
}
}
@ -4626,7 +4669,6 @@ lean_inc(x_12);
lean_dec(x_7);
lean_inc(x_8);
lean_inc(x_6);
lean_inc(x_1);
x_13 = l___private_Init_Lean_Elab_TermApp_9__resolveLVal(x_1, x_6, x_11, x_8, x_9);
if (lean_obj_tag(x_13) == 0)
{
@ -4662,7 +4704,6 @@ x_22 = l_Lean_Name_append___main(x_16, x_18);
lean_dec(x_16);
x_23 = lean_box(0);
lean_inc(x_8);
lean_inc(x_1);
x_24 = l_Lean_Elab_Term_mkConst(x_1, x_22, x_23, x_8, x_21);
if (lean_obj_tag(x_24) == 0)
{
@ -4743,7 +4784,6 @@ x_46 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_46, 0, x_45);
lean_ctor_set(x_46, 1, x_44);
lean_inc(x_8);
lean_inc(x_1);
x_47 = l_Lean_Elab_Term_addNamedArg(x_1, x_2, x_46, x_8, x_26);
if (lean_obj_tag(x_47) == 0)
{
@ -4878,7 +4918,6 @@ lean_dec(x_14);
x_71 = lean_box(0);
lean_inc(x_8);
lean_inc(x_70);
lean_inc(x_1);
x_72 = l_Lean_Elab_Term_mkConst(x_1, x_70, x_71, x_8, x_68);
if (lean_obj_tag(x_72) == 0)
{
@ -4965,7 +5004,6 @@ lean_dec(x_90);
x_93 = lean_unsigned_to_nat(0u);
lean_inc(x_8);
lean_inc(x_2);
lean_inc(x_1);
x_94 = l___private_Init_Lean_Elab_TermApp_11__addLValArg___main(x_1, x_69, x_70, x_6, x_3, x_93, x_2, x_91, x_8, x_92);
lean_dec(x_91);
if (lean_obj_tag(x_94) == 0)
@ -5163,7 +5201,6 @@ lean_dec(x_129);
x_132 = lean_unsigned_to_nat(0u);
lean_inc(x_8);
lean_inc(x_2);
lean_inc(x_1);
x_133 = l___private_Init_Lean_Elab_TermApp_11__addLValArg___main(x_1, x_111, x_112, x_6, x_3, x_132, x_2, x_130, x_8, x_131);
lean_dec(x_130);
if (lean_obj_tag(x_133) == 0)
@ -5252,7 +5289,6 @@ lean_inc(x_147);
lean_dec(x_14);
x_148 = lean_box(0);
lean_inc(x_8);
lean_inc(x_1);
x_149 = l_Lean_Elab_Term_mkConst(x_1, x_146, x_148, x_8, x_145);
if (lean_obj_tag(x_149) == 0)
{
@ -5340,7 +5376,6 @@ x_175 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_175, 0, x_174);
lean_ctor_set(x_175, 1, x_173);
lean_inc(x_8);
lean_inc(x_1);
x_176 = l_Lean_Elab_Term_addNamedArg(x_1, x_2, x_175, x_8, x_151);
if (lean_obj_tag(x_176) == 0)
{
@ -5357,7 +5392,6 @@ x_181 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_181, 0, x_180);
lean_ctor_set(x_181, 1, x_179);
lean_inc(x_8);
lean_inc(x_1);
x_182 = l_Lean_Elab_Term_addNamedArg(x_1, x_177, x_181, x_8, x_178);
if (lean_obj_tag(x_182) == 0)
{
@ -5573,6 +5607,7 @@ lean_dec(x_3);
lean_dec(x_2);
x_12 = l___private_Init_Lean_Elab_TermApp_13__elabAppLVals___closed__3;
x_13 = l_Lean_Elab_Term_throwError___rarg(x_1, x_12, x_8, x_9);
lean_dec(x_1);
x_14 = !lean_is_exclusive(x_13);
if (x_14 == 0)
{
@ -6309,7 +6344,7 @@ x_172 = l_Lean_Syntax_isOfKind(x_2, x_171);
if (x_172 == 0)
{
uint8_t x_173;
x_173 = l___private_Init_Lean_Elab_Term_7__hasCDot___main___closed__1;
x_173 = l___private_Init_Lean_Elab_Term_4__hasCDot___main___closed__1;
if (x_173 == 0)
{
lean_object* x_174; uint8_t x_175;
@ -7799,6 +7834,7 @@ lean_inc(x_142);
lean_dec(x_140);
lean_inc(x_9);
x_143 = l_Lean_Elab_Term_resolveName(x_2, x_132, x_133, x_141, x_9, x_142);
lean_dec(x_2);
if (lean_obj_tag(x_143) == 0)
{
lean_object* x_144; lean_object* x_145; lean_object* x_146;
@ -7880,6 +7916,7 @@ lean_dec(x_136);
x_155 = lean_box(0);
lean_inc(x_9);
x_156 = l_Lean_Elab_Term_resolveName(x_2, x_132, x_133, x_155, x_9, x_10);
lean_dec(x_2);
if (lean_obj_tag(x_156) == 0)
{
lean_object* x_157; lean_object* x_158; lean_object* x_159;
@ -8310,7 +8347,7 @@ x_14 = lean_array_fset(x_3, x_2, x_13);
if (lean_obj_tag(x_11) == 0)
{
lean_object* x_15; lean_object* x_16; lean_object* x_17;
x_15 = l___private_Init_Lean_Elab_Term_14__resumePostponed___lambda__1___closed__1;
x_15 = l___private_Init_Lean_Elab_Term_11__resumePostponed___lambda__1___closed__1;
x_16 = l_unreachable_x21___rarg(x_15);
lean_inc(x_4);
x_17 = lean_apply_2(x_16, x_4, x_5);
@ -8441,7 +8478,6 @@ else
{
uint8_t x_13;
lean_dec(x_3);
lean_dec(x_2);
x_13 = !lean_is_exclusive(x_6);
if (x_13 == 0)
{
@ -8467,7 +8503,7 @@ lean_object* l___private_Init_Lean_Elab_TermApp_17__mergeFailures(lean_object* x
_start:
{
lean_object* x_2;
x_2 = lean_alloc_closure((void*)(l___private_Init_Lean_Elab_TermApp_17__mergeFailures___rarg), 4, 0);
x_2 = lean_alloc_closure((void*)(l___private_Init_Lean_Elab_TermApp_17__mergeFailures___rarg___boxed), 4, 0);
return x_2;
}
}
@ -8480,6 +8516,15 @@ lean_dec(x_1);
return x_6;
}
}
lean_object* l___private_Init_Lean_Elab_TermApp_17__mergeFailures___rarg___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___private_Init_Lean_Elab_TermApp_17__mergeFailures___rarg(x_1, x_2, x_3, x_4);
lean_dec(x_2);
return x_5;
}
}
lean_object* l_Array_umapMAux___main___at___private_Init_Lean_Elab_TermApp_18__elabAppAux___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
@ -8625,6 +8670,7 @@ if (x_21 == 0)
lean_object* x_22;
lean_dec(x_18);
x_22 = l___private_Init_Lean_Elab_TermApp_17__mergeFailures___rarg(x_12, x_2, x_6, x_13);
lean_dec(x_2);
return x_22;
}
else
@ -8651,6 +8697,7 @@ x_32 = lean_alloc_ctor(8, 2, 0);
lean_ctor_set(x_32, 0, x_31);
lean_ctor_set(x_32, 1, x_30);
x_33 = l_Lean_Elab_Term_throwError___rarg(x_2, x_32, x_6, x_28);
lean_dec(x_2);
return x_33;
}
}
@ -8998,6 +9045,7 @@ x_69 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_69, 0, x_67);
lean_ctor_set(x_69, 1, x_68);
x_70 = l_Lean_Elab_Term_addNamedArg(x_54, x_65, x_69, x_2, x_60);
lean_dec(x_54);
if (lean_obj_tag(x_70) == 0)
{
uint8_t x_71;
@ -9067,6 +9115,7 @@ x_84 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_84, 0, x_82);
lean_ctor_set(x_84, 1, x_83);
x_85 = l_Lean_Elab_Term_addNamedArg(x_54, x_80, x_84, x_2, x_60);
lean_dec(x_54);
if (lean_obj_tag(x_85) == 0)
{
lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90;
@ -9149,6 +9198,7 @@ x_101 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_101, 0, x_99);
lean_ctor_set(x_101, 1, x_100);
x_102 = l_Lean_Elab_Term_addNamedArg(x_54, x_96, x_101, x_2, x_60);
lean_dec(x_54);
if (lean_obj_tag(x_102) == 0)
{
lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108;

File diff suppressed because it is too large Load diff

View file

@ -32,6 +32,8 @@ lean_object* l_Lean_Elab_mkElabAttributeAux___rarg(lean_object*, lean_object*, l
lean_object* l___private_Init_Lean_Elab_Util_2__throwUnexpectedElabType(lean_object*);
lean_object* l_Lean_Elab_macroAttribute___closed__2;
lean_object* l_Array_iterateMAux___main___at_Lean_Elab_ElabFnTable_insert___spec__24___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_String_toFormat(lean_object*);
extern lean_object* l_Lean_MessageData_ofList___closed__3;
lean_object* l_PersistentHashMap_insertAux___main___at_Lean_Elab_ElabFnTable_insert___spec__22(lean_object*);
lean_object* lean_array_uget(lean_object*, size_t);
lean_object* l_Array_iterateMAux___main___at_Lean_Elab_ElabFnTable_insert___spec__13___rarg(size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
@ -60,9 +62,11 @@ lean_object* l_PersistentHashMap_find_x3f___at_Lean_Elab_ElabFnTable_insert___sp
lean_object* l___private_Init_Lean_Elab_Util_8__regTraceClasses(lean_object*);
lean_object* lean_get_namespaces(lean_object*);
lean_object* l_HashMapImp_find_x3f___at_Lean_Elab_ElabFnTable_insert___spec__7(lean_object*);
lean_object* l_Lean_Syntax_reprint___main(lean_object*);
lean_object* l_PersistentHashMap_findAtAux___main___at_Lean_Elab_expandMacro___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* lean_array_push(lean_object*, lean_object*);
lean_object* lean_array_get_size(lean_object*);
lean_object* l_List_find_x3f___main___rarg(lean_object*, lean_object*);
lean_object* l___private_Init_Lean_Elab_Util_4__ElabAttribute_addImportedParsers(lean_object*);
lean_object* lean_string_append(lean_object*, lean_object*);
lean_object* l_PersistentHashMap_find_x3f___at_Lean_Elab_expandMacro___spec__2___boxed(lean_object*, lean_object*);
@ -96,6 +100,7 @@ lean_object* l_Lean_Elab_mkElabAttributeAux___rarg___lambda__1(lean_object*);
lean_object* l_Lean_registerEnvExtensionUnsafe___at_Lean_Elab_mkElabAttributeAux___spec__3___rarg___closed__3;
lean_object* l_IO_ofExcept___at___private_Init_Lean_Elab_Util_6__ElabAttribute_add___spec__1___boxed(lean_object*, lean_object*);
lean_object* l_Lean_Elab_ElabAttribute_inhabited___closed__6;
lean_object* l_List_foldl___main___at_Lean_Elab_addMacroStack___spec__1___closed__1;
extern lean_object* l_Lean_PersistentEnvExtension_inhabited___rarg___closed__1;
extern lean_object* l_Lean_mkAttributeImplOfConstant___closed__1;
lean_object* l_Lean_Elab_macroAttribute___closed__5;
@ -105,11 +110,14 @@ lean_object* l___private_Init_Lean_Elab_Util_7__expandMacroFns___main___lambda__
lean_object* l_Lean_Elab_ElabAttribute_inhabited___closed__5;
lean_object* l___private_Init_Lean_Elab_Util_5__ElabAttribute_addExtensionEntry(lean_object*);
lean_object* lean_array_fget(lean_object*, lean_object*);
uint8_t lean_nat_dec_eq(lean_object*, lean_object*);
lean_object* l_Lean_Elab_checkSyntaxNodeKindAtNamespaces(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_SMap_empty___at_Lean_Elab_ElabAttributeExtensionState_inhabited___spec__1(lean_object*);
lean_object* l___private_Init_Lean_Elab_Util_6__ElabAttribute_add(lean_object*);
uint8_t l_Lean_Elab_getBetterRef___lambda__1(lean_object*, lean_object*);
lean_object* l_PersistentHashMap_empty___at_Lean_Elab_ElabAttributeExtensionState_inhabited___spec__3(lean_object*);
extern lean_object* l_Lean_EnvExtension_Inhabited___rarg___closed__1;
lean_object* l_List_foldl___main___at_Lean_Elab_addMacroStack___spec__1(lean_object*, lean_object*);
lean_object* l_EStateM_bind___rarg(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___at_Lean_Elab_mkElabAttributeAux___spec__1(lean_object*);
lean_object* l_Lean_SMap_empty___at_Lean_Elab_mkElabAttributeAux___spec__4___closed__1;
@ -126,6 +134,7 @@ lean_object* l_Lean_Elab_checkSyntaxNodeKindAtNamespaces___boxed(lean_object*, l
lean_object* l_Lean_registerEnvExtensionUnsafe___at_Lean_Elab_mkElabAttributeAux___spec__3(lean_object*);
lean_object* lean_array_get(lean_object*, lean_object*, lean_object*);
uint8_t l_AssocList_contains___main___at_Lean_Elab_ElabFnTable_insert___spec__15___rarg(lean_object*, lean_object*);
lean_object* l_List_foldl___main___at_Lean_Elab_addMacroStack___spec__1___closed__3;
lean_object* l_PersistentHashMap_insertAux___main___at_Lean_Elab_ElabFnTable_insert___spec__22___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* lean_array_fset(lean_object*, lean_object*, lean_object*);
lean_object* l_List_lengthAux___main___rarg(lean_object*, lean_object*);
@ -140,11 +149,13 @@ lean_object* l_Nat_repr(lean_object*);
lean_object* l___private_Init_Lean_Elab_Util_4__ElabAttribute_addImportedParsers___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
extern lean_object* l_Char_HasRepr___closed__1;
extern lean_object* l_PersistentHashMap_insertAux___main___rarg___closed__3;
lean_object* l_Lean_Syntax_prettyPrint(lean_object*);
lean_object* l_mkHashMap___at_Lean_Elab_mkBuiltinMacroFnTable___spec__2(lean_object*);
lean_object* l_AssocList_find___main___at_Lean_Elab_ElabFnTable_insert___spec__6___rarg___boxed(lean_object*, lean_object*);
lean_object* lean_name_mk_string(lean_object*, lean_object*);
lean_object* l_Lean_SMap_empty___at_Lean_Elab_mkElabAttributeAux___spec__4___closed__3;
lean_object* l_Lean_Elab_mkElabAttributeAux___rarg___lambda__2(lean_object*);
lean_object* l_List_foldl___main___at_Lean_Elab_addMacroStack___spec__1___closed__2;
lean_object* lean_eval_const(lean_object*, lean_object*);
lean_object* l_PersistentHashMap_find_x3f___at_Lean_Elab_expandMacro___spec__2(lean_object*, lean_object*);
lean_object* l_Lean_registerEnvExtensionUnsafe___at_Lean_Elab_mkElabAttributeAux___spec__3___rarg___closed__2;
@ -163,6 +174,7 @@ lean_object* l_Lean_registerBuiltinAttribute(lean_object*, lean_object*);
lean_object* l_mkHashMap___at_Lean_Elab_ElabAttribute_inhabited___spec__2(lean_object*);
lean_object* l_AssocList_find___main___at_Lean_Elab_expandMacro___spec__6(lean_object*, lean_object*);
lean_object* l_mkHashMap___at_Lean_Elab_mkElabAttributeAux___spec__5(lean_object*);
lean_object* l_Lean_Elab_addMacroStack(lean_object*, lean_object*);
lean_object* l_HashMapImp_moveEntries___main___at_Lean_Elab_ElabFnTable_insert___spec__28(lean_object*);
lean_object* l_Lean_Elab_mkElabAttribute___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_SMap_empty___at_Lean_Elab_mkBuiltinMacroFnTable___spec__1___closed__1;
@ -172,6 +184,7 @@ lean_object* l_mkHashMapImp___rarg(lean_object*);
lean_object* l_PersistentHashMap_findAux___main___at_Lean_Elab_expandMacro___spec__3___boxed(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Elab_syntaxNodeKindOfAttrParam___closed__3;
lean_object* l_mkHashMap___at_Lean_Elab_ElabAttributeExtensionState_inhabited___spec__2(lean_object*);
lean_object* l_Lean_Elab_getBetterRef___lambda__1___boxed(lean_object*, lean_object*);
lean_object* l___private_Init_Lean_Elab_Util_5__ElabAttribute_addExtensionEntry___rarg(lean_object*, lean_object*);
lean_object* l_Lean_Elab_ElabFnTable_insert(lean_object*);
lean_object* l_AssocList_find___main___at_Lean_Elab_ElabFnTable_insert___spec__8(lean_object*);
@ -240,6 +253,8 @@ lean_object* l_PersistentHashMap_insert___at_Lean_Elab_ElabFnTable_insert___spec
extern lean_object* l_Lean_registerEnvExtensionUnsafe___rarg___closed__2;
lean_object* l_AssocList_replace___main___at_Lean_Elab_ElabFnTable_insert___spec__19___rarg(lean_object*, lean_object*, lean_object*);
lean_object* lean_nat_mul(lean_object*, lean_object*);
lean_object* l_Lean_Syntax_getPos(lean_object*);
lean_object* l_Lean_Elab_getBetterRef___boxed(lean_object*, lean_object*);
lean_object* l_AssocList_contains___main___at_Lean_Elab_ElabFnTable_insert___spec__15___rarg___boxed(lean_object*, lean_object*);
lean_object* l___private_Init_Lean_Elab_Util_1__ElabAttribute_mkInitial___rarg(lean_object*, lean_object*);
lean_object* lean_io_ref_set(lean_object*, lean_object*, lean_object*);
@ -269,10 +284,12 @@ lean_object* l_PersistentHashMap_findAtAux___main___at_Lean_Elab_ElabFnTable_ins
lean_object* l_AssocList_contains___main___at_Lean_Elab_ElabFnTable_insert___spec__26(lean_object*);
lean_object* l_Lean_Elab_checkSyntaxNodeKindAtNamespaces___main___boxed(lean_object*, lean_object*, lean_object*);
lean_object* l_AssocList_foldlM___main___at_Lean_Elab_ElabFnTable_insert___spec__18(lean_object*);
lean_object* l_Lean_Syntax_formatStxAux___main(lean_object*, lean_object*, lean_object*);
lean_object* l_List_toArrayAux___main___rarg(lean_object*, lean_object*);
lean_object* l_HashMapImp_find_x3f___at_Lean_Elab_ElabFnTable_insert___spec__7___rarg(lean_object*, lean_object*);
lean_object* l_unsafeCast(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Elab_ElabAttributeExtensionState_inhabited(lean_object*);
uint8_t l_List_isEmpty___rarg(lean_object*);
lean_object* l_Lean_Name_toStringWithSep___main(lean_object*, lean_object*);
lean_object* l___private_Init_Lean_Elab_Util_8__regTraceClasses___closed__1;
lean_object* lean_usize_to_nat(size_t);
@ -299,12 +316,234 @@ lean_object* l_AssocList_find___main___at_Lean_Elab_ElabFnTable_insert___spec__6
lean_object* l_Lean_Elab_expandMacro___boxed(lean_object*, lean_object*, lean_object*);
lean_object* l_HashMapImp_expand___at_Lean_Elab_ElabFnTable_insert___spec__27(lean_object*);
lean_object* l_Lean_Elab_mkElabFnOfConstant___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Elab_getBetterRef(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*);
lean_object* l_PersistentHashMap_insertAtCollisionNodeAux___main___at_Lean_Elab_ElabFnTable_insert___spec__12___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l___private_Init_Lean_Elab_Util_8__regTraceClasses___closed__3;
lean_object* l_PersistentHashMap_insert___at_Lean_Elab_ElabFnTable_insert___spec__21___rarg(lean_object*, lean_object*, lean_object*);
lean_object* l_PersistentHashMap_insertAtCollisionNodeAux___main___at_Lean_Elab_ElabFnTable_insert___spec__12(lean_object*);
lean_object* l_Lean_Syntax_prettyPrint(lean_object* x_1) {
_start:
{
lean_object* x_2;
x_2 = l_Lean_Syntax_reprint___main(x_1);
if (lean_obj_tag(x_2) == 0)
{
lean_object* x_3; lean_object* x_4; lean_object* x_5;
x_3 = lean_box(0);
x_4 = lean_unsigned_to_nat(0u);
x_5 = l_Lean_Syntax_formatStxAux___main(x_3, x_4, x_1);
return x_5;
}
else
{
lean_object* x_6; lean_object* x_7;
lean_dec(x_1);
x_6 = lean_ctor_get(x_2, 0);
lean_inc(x_6);
lean_dec(x_2);
x_7 = l_String_toFormat(x_6);
return x_7;
}
}
}
uint8_t l_Lean_Elab_getBetterRef___lambda__1(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3;
x_3 = l_Lean_Syntax_getPos(x_2);
if (lean_obj_tag(x_3) == 0)
{
if (lean_obj_tag(x_1) == 0)
{
uint8_t x_4;
x_4 = 0;
return x_4;
}
else
{
uint8_t x_5;
x_5 = 1;
return x_5;
}
}
else
{
if (lean_obj_tag(x_1) == 0)
{
uint8_t x_6;
lean_dec(x_3);
x_6 = 1;
return x_6;
}
else
{
lean_object* x_7; lean_object* x_8; uint8_t x_9;
x_7 = lean_ctor_get(x_3, 0);
lean_inc(x_7);
lean_dec(x_3);
x_8 = lean_ctor_get(x_1, 0);
x_9 = lean_nat_dec_eq(x_7, x_8);
lean_dec(x_7);
if (x_9 == 0)
{
uint8_t x_10;
x_10 = 1;
return x_10;
}
else
{
uint8_t x_11;
x_11 = 0;
return x_11;
}
}
}
}
}
lean_object* l_Lean_Elab_getBetterRef(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3;
x_3 = l_Lean_Syntax_getPos(x_1);
if (lean_obj_tag(x_3) == 0)
{
lean_object* x_4; lean_object* x_5;
x_4 = lean_alloc_closure((void*)(l_Lean_Elab_getBetterRef___lambda__1___boxed), 2, 1);
lean_closure_set(x_4, 0, x_3);
x_5 = l_List_find_x3f___main___rarg(x_4, x_2);
if (lean_obj_tag(x_5) == 0)
{
lean_inc(x_1);
return x_1;
}
else
{
lean_object* x_6;
x_6 = lean_ctor_get(x_5, 0);
lean_inc(x_6);
lean_dec(x_5);
return x_6;
}
}
else
{
lean_dec(x_3);
lean_dec(x_2);
lean_inc(x_1);
return x_1;
}
}
}
lean_object* l_Lean_Elab_getBetterRef___lambda__1___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
uint8_t x_3; lean_object* x_4;
x_3 = l_Lean_Elab_getBetterRef___lambda__1(x_1, x_2);
lean_dec(x_2);
lean_dec(x_1);
x_4 = lean_box(x_3);
return x_4;
}
}
lean_object* l_Lean_Elab_getBetterRef___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3;
x_3 = l_Lean_Elab_getBetterRef(x_1, x_2);
lean_dec(x_1);
return x_3;
}
}
lean_object* _init_l_List_foldl___main___at_Lean_Elab_addMacroStack___spec__1___closed__1() {
_start:
{
lean_object* x_1;
x_1 = lean_mk_string("while expanding");
return x_1;
}
}
lean_object* _init_l_List_foldl___main___at_Lean_Elab_addMacroStack___spec__1___closed__2() {
_start:
{
lean_object* x_1; lean_object* x_2;
x_1 = l_List_foldl___main___at_Lean_Elab_addMacroStack___spec__1___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_List_foldl___main___at_Lean_Elab_addMacroStack___spec__1___closed__3() {
_start:
{
lean_object* x_1; lean_object* x_2;
x_1 = l_List_foldl___main___at_Lean_Elab_addMacroStack___spec__1___closed__2;
x_2 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_2, 0, x_1);
return x_2;
}
}
lean_object* l_List_foldl___main___at_Lean_Elab_addMacroStack___spec__1(lean_object* x_1, lean_object* x_2) {
_start:
{
if (lean_obj_tag(x_2) == 0)
{
return x_1;
}
else
{
lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14;
x_3 = lean_ctor_get(x_2, 0);
lean_inc(x_3);
x_4 = lean_ctor_get(x_2, 1);
lean_inc(x_4);
lean_dec(x_2);
x_5 = l_Lean_Syntax_prettyPrint(x_3);
x_6 = l_Lean_MessageData_ofList___closed__3;
x_7 = lean_alloc_ctor(8, 2, 0);
lean_ctor_set(x_7, 0, x_1);
lean_ctor_set(x_7, 1, x_6);
x_8 = l_List_foldl___main___at_Lean_Elab_addMacroStack___spec__1___closed__3;
x_9 = lean_alloc_ctor(8, 2, 0);
lean_ctor_set(x_9, 0, x_7);
lean_ctor_set(x_9, 1, x_8);
x_10 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_10, 0, x_5);
x_11 = lean_alloc_ctor(8, 2, 0);
lean_ctor_set(x_11, 0, x_6);
lean_ctor_set(x_11, 1, x_10);
x_12 = lean_unsigned_to_nat(2u);
x_13 = lean_alloc_ctor(6, 2, 0);
lean_ctor_set(x_13, 0, x_12);
lean_ctor_set(x_13, 1, x_11);
x_14 = lean_alloc_ctor(8, 2, 0);
lean_ctor_set(x_14, 0, x_9);
lean_ctor_set(x_14, 1, x_13);
x_1 = x_14;
x_2 = x_4;
goto _start;
}
}
}
lean_object* l_Lean_Elab_addMacroStack(lean_object* x_1, lean_object* x_2) {
_start:
{
uint8_t x_3;
x_3 = l_List_isEmpty___rarg(x_2);
if (x_3 == 0)
{
lean_object* x_4;
x_4 = l_List_foldl___main___at_Lean_Elab_addMacroStack___spec__1(x_1, x_2);
return x_4;
}
else
{
lean_dec(x_2);
return x_1;
}
}
}
lean_object* _init_l_Lean_Elab_checkSyntaxNodeKind___closed__1() {
_start:
{
@ -5725,6 +5964,12 @@ lean_dec_ref(res);
res = initialize_Init_Lean_Parser(lean_io_mk_world());
if (lean_io_result_is_error(res)) return res;
lean_dec_ref(res);
l_List_foldl___main___at_Lean_Elab_addMacroStack___spec__1___closed__1 = _init_l_List_foldl___main___at_Lean_Elab_addMacroStack___spec__1___closed__1();
lean_mark_persistent(l_List_foldl___main___at_Lean_Elab_addMacroStack___spec__1___closed__1);
l_List_foldl___main___at_Lean_Elab_addMacroStack___spec__1___closed__2 = _init_l_List_foldl___main___at_Lean_Elab_addMacroStack___spec__1___closed__2();
lean_mark_persistent(l_List_foldl___main___at_Lean_Elab_addMacroStack___spec__1___closed__2);
l_List_foldl___main___at_Lean_Elab_addMacroStack___spec__1___closed__3 = _init_l_List_foldl___main___at_Lean_Elab_addMacroStack___spec__1___closed__3();
lean_mark_persistent(l_List_foldl___main___at_Lean_Elab_addMacroStack___spec__1___closed__3);
l_Lean_Elab_checkSyntaxNodeKind___closed__1 = _init_l_Lean_Elab_checkSyntaxNodeKind___closed__1();
lean_mark_persistent(l_Lean_Elab_checkSyntaxNodeKind___closed__1);
l_Lean_Elab_checkSyntaxNodeKind___closed__2 = _init_l_Lean_Elab_checkSyntaxNodeKind___closed__2();

File diff suppressed because it is too large Load diff

View file

@ -29967,13 +29967,39 @@ x_590 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_590, 0, x_589);
return x_590;
}
default:
case 16:
{
lean_object* x_591;
lean_dec(x_1);
x_591 = l_Lean_Parser_compileParserDescr___main___closed__1;
return x_591;
}
default:
{
lean_object* x_592; lean_object* x_593; lean_object* x_594;
x_592 = lean_ctor_get(x_3, 0);
lean_inc(x_592);
x_593 = lean_ctor_get(x_3, 1);
lean_inc(x_593);
lean_dec(x_3);
x_594 = l_PersistentHashMap_find_x3f___at_Lean_Parser_addLeadingParser___spec__1(x_1, x_592);
if (lean_obj_tag(x_594) == 0)
{
lean_object* x_595;
lean_dec(x_593);
x_595 = l_Lean_Parser_throwUnknownParserCategory___rarg(x_592);
return x_595;
}
else
{
lean_object* x_596; lean_object* x_597;
lean_dec(x_594);
x_596 = l_Lean_Parser_categoryParser(x_2, x_592, x_593);
x_597 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_597, 0, x_596);
return x_597;
}
}
}
}
}

View file

@ -47,7 +47,7 @@ lean_object* lean_array_get(lean_object*, lean_object*, lean_object*);
size_t lean_name_hash(lean_object*);
lean_object* l_Lean_Syntax_getArgs___boxed(lean_object*);
size_t l_Lean_Name_hash(lean_object*);
lean_object* l_Lean_ParserDescr_parser(lean_object*, lean_object*);
lean_object* l_Lean_ParserDescr_parser(uint8_t, lean_object*, lean_object*);
lean_object* l_Lean_ParserDescr_lookahead___boxed(lean_object*, lean_object*);
lean_object* l_Lean_ParserDescr_sepBy(uint8_t, lean_object*, lean_object*);
lean_object* lean_name_mk_string(lean_object*, lean_object*);
@ -58,6 +58,7 @@ lean_object* l_Lean_ParserDescr_try___boxed(lean_object*, lean_object*);
lean_object* l_Lean_ParserDescr_ident___boxed(lean_object*);
lean_object* l_Lean_ParserDescr_str___boxed(lean_object*);
lean_object* l_Lean_ParserDescr_node___boxed(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_ParserDescr_parser___boxed(lean_object*, lean_object*, lean_object*);
size_t lean_usize_of_nat(lean_object*);
lean_object* l_Lean_addMacroScope(lean_object*, lean_object*);
lean_object* l_Lean_ParserDescr_nonReservedSymbol___boxed(lean_object*, lean_object*);
@ -575,14 +576,25 @@ x_1 = lean_box(16);
return x_1;
}
}
lean_object* l_Lean_ParserDescr_parser(lean_object* x_1, lean_object* x_2) {
lean_object* l_Lean_ParserDescr_parser(uint8_t x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
lean_object* x_3;
x_3 = lean_alloc_ctor(17, 2, 0);
lean_ctor_set(x_3, 0, x_1);
lean_ctor_set(x_3, 1, x_2);
return x_3;
lean_object* x_4;
x_4 = lean_alloc_ctor(17, 2, 1);
lean_ctor_set(x_4, 0, x_2);
lean_ctor_set(x_4, 1, x_3);
lean_ctor_set_uint8(x_4, sizeof(void*)*2, x_1);
return x_4;
}
}
lean_object* l_Lean_ParserDescr_parser___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
uint8_t x_4; lean_object* x_5;
x_4 = lean_unbox(x_1);
lean_dec(x_1);
x_5 = l_Lean_ParserDescr_parser(x_4, x_2, x_3);
return x_5;
}
}
lean_object* _init_l_Lean_Syntax_inhabited() {