From d1c3ab37974bd60c8068f52afaaeefac89bc18bb Mon Sep 17 00:00:00 2001 From: Leonardo de Moura Date: Thu, 17 Sep 2020 13:12:14 -0700 Subject: [PATCH] feat: `many1Unbox` and `nodeSepBy1Unbox` parser combinators @Kha I removed the dummy parenthesizer/formatter for `withResultOf`, and add proper ones for `many1Unbox` and `nodeSepBy1Unbox`. --- src/Lean/Parser/Basic.lean | 11 +- src/Lean/Parser/Command.lean | 2 +- src/Lean/Parser/Syntax.lean | 4 +- src/Lean/Parser/Tactic.lean | 5 +- src/Lean/Parser/Term.lean | 11 +- src/Lean/PrettyPrinter/Formatter.lean | 27 +- src/Lean/PrettyPrinter/Parenthesizer.lean | 17 +- stage0/src/Lean/Elab/Tactic/Basic.lean | 5 +- stage0/src/Lean/Elab/Tactic/Match.lean | 5 +- stage0/src/Lean/Elab/Tactic/Rewrite.lean | 9 +- stage0/src/Lean/Parser/Basic.lean | 11 +- stage0/src/Lean/Parser/Command.lean | 2 +- stage0/src/Lean/Parser/Syntax.lean | 4 +- stage0/src/Lean/Parser/Tactic.lean | 5 +- stage0/src/Lean/Parser/Term.lean | 11 +- stage0/src/Lean/PrettyPrinter/Formatter.lean | 27 +- .../src/Lean/PrettyPrinter/Parenthesizer.lean | 17 +- stage0/stdlib/Lean/Elab/Tactic/Basic.c | 1290 +++++++++-------- stage0/stdlib/Lean/Elab/Tactic/Match.c | 427 +++--- stage0/stdlib/Lean/Elab/Tactic/Rewrite.c | 258 ++-- stage0/stdlib/Lean/Parser/Basic.c | 145 +- stage0/stdlib/Lean/Parser/Command.c | 132 +- stage0/stdlib/Lean/Parser/Syntax.c | 16 +- stage0/stdlib/Lean/Parser/Tactic.c | 290 ++-- stage0/stdlib/Lean/Parser/Term.c | 338 ++--- stage0/stdlib/Lean/PrettyPrinter/Formatter.c | 77 +- stage0/stdlib/Lean/PrettyPrinter/Meta.c | 6 +- .../stdlib/Lean/PrettyPrinter/Parenthesizer.c | 61 +- 28 files changed, 1755 insertions(+), 1458 deletions(-) diff --git a/src/Lean/Parser/Basic.lean b/src/Lean/Parser/Basic.lean index 25e024f818..bc69d52b1e 100644 --- a/src/Lean/Parser/Basic.lean +++ b/src/Lean/Parser/Basic.lean @@ -589,8 +589,15 @@ fun c s => { info := withResultOfInfo p.info, fn := withResultOfFn p.fn f } -abbrev unboxSingleton (p : Parser) : Parser := -withResultOf p fun stx => if stx.getNumArgs == 1 then stx.getArg 0 else stx +@[inline] def many1Unbox (p : Parser) : Parser := +withResultOf (many1 p) fun stx => if stx.getNumArgs == 1 then stx.getArg 0 else stx + +@[inline] def nodeSepBy1Unbox (k : SyntaxNodeKind) (p sep : Parser) (allowTrailingSep := false) : Parser := +withResultOf (node k (sepBy1 p sep allowTrailingSep)) fun stx => + if (stx.getArg 0).getNumArgs < 2 then + (stx.getArg 0).getArg 0 + else + stx @[specialize] partial def satisfyFn (p : Char → Bool) (errorMsg : String := "unexpected character") : ParserFn | c, s => diff --git a/src/Lean/Parser/Command.lean b/src/Lean/Parser/Command.lean index 0903d47332..bec2f52a88 100644 --- a/src/Lean/Parser/Command.lean +++ b/src/Lean/Parser/Command.lean @@ -23,7 +23,7 @@ categoryParser `command rbp Multiple command will be put in a `null node, but a single command will not (so that you can directly match against a quotation in a command kind's elaborator). -/ -- TODO: use two separate quotation parsers with parser priorities instead -@[builtinTermParser] def Term.quot := parser! "`(" >> toggleInsideQuot (termParser <|> unboxSingleton (many1 commandParser)) >> ")" +@[builtinTermParser] def Term.quot := parser! "`(" >> toggleInsideQuot (termParser <|> many1Unbox commandParser) >> ")" namespace Command def commentBody : Parser := diff --git a/src/Lean/Parser/Syntax.lean b/src/Lean/Parser/Syntax.lean index fdd119e575..dc28d5e395 100644 --- a/src/Lean/Parser/Syntax.lean +++ b/src/Lean/Parser/Syntax.lean @@ -70,8 +70,8 @@ def notationItem := withAntiquot (mkAntiquot "notationItem" `Lean.Parser.Command def macroArgSimple := parser! ident >> checkNoWsBefore "no space before ':'" >> ":" >> syntaxParser maxPrec def macroArg := try strLit <|> try macroArgSimple def macroHead := macroArg <|> try ident -def macroTailTactic : Parser := try (" : " >> identEq "tactic") >> darrow >> ("`(" >> Tactic.unboxSeq >> ")" <|> termParser) -def macroTailCommand : Parser := try (" : " >> identEq "command") >> darrow >> ("`(" >> unboxSingleton (many1 commandParser) >> ")" <|> termParser) +def macroTailTactic : Parser := try (" : " >> identEq "tactic") >> darrow >> ("`(" >> Tactic.seq1Unbox >> ")" <|> termParser) +def macroTailCommand : Parser := try (" : " >> identEq "command") >> darrow >> ("`(" >> many1Unbox commandParser >> ")" <|> termParser) def macroTailDefault : Parser := try (" : " >> ident) >> darrow >> (("`(" >> categoryParserOfStack 2 >> ")") <|> termParser) def macroTail := macroTailTactic <|> macroTailCommand <|> macroTailDefault @[builtinCommandParser] def «macro» := parser! "macro " >> optPrecedence >> macroHead >> many macroArg >> macroTail diff --git a/src/Lean/Parser/Tactic.lean b/src/Lean/Parser/Tactic.lean index 0faed81185..eceffc21f8 100644 --- a/src/Lean/Parser/Tactic.lean +++ b/src/Lean/Parser/Tactic.lean @@ -9,7 +9,8 @@ namespace Lean namespace Parser namespace Tactic -def nonEmptySeq := node `Lean.Parser.Tactic.seq $ sepBy1 tacticParser "; " true +def seq := node `Lean.Parser.Tactic.seq $ sepBy tacticParser "; " true +def seq1 := node `Lean.Parser.Tactic.seq $ sepBy1 tacticParser "; " true def underscoreFn : ParserFn := fun c s => @@ -76,7 +77,7 @@ def matchAlts : Parser := group $ withPosition $ fun pos => (optional "| ") >> s @[builtinTacticParser] def «introMatch» := parser! nonReservedSymbol "intro " >> matchAlts @[builtinTacticParser] def «injection» := parser! nonReservedSymbol "injection " >> termParser >> withIds -@[builtinTacticParser] def paren := parser! "(" >> nonEmptySeq >> ")" +@[builtinTacticParser] def paren := parser! "(" >> seq1 >> ")" @[builtinTacticParser] def nestedTacticBlockCurly := parser! "{" >> seq >> "}" @[builtinTacticParser] def orelse := tparser!:2 " <|> " >> tacticParser 1 diff --git a/src/Lean/Parser/Term.lean b/src/Lean/Parser/Term.lean index af90f7cedf..2e941dea8f 100644 --- a/src/Lean/Parser/Term.lean +++ b/src/Lean/Parser/Term.lean @@ -254,16 +254,9 @@ stx.isAntiquot || stx.isIdent end Term -def Tactic.seq := node `Lean.Parser.Tactic.seq $ sepBy tacticParser "; " true --- Similar to `unboxSingleton`, but for `Tactic.seq -def Tactic.unboxSeq := -withResultOf Tactic.seq fun stx => - if (stx.getArg 0).getNumArgs < 2 then - (stx.getArg 0).getArg 0 - else - stx +def Tactic.seq1Unbox := nodeSepBy1Unbox `Lean.Parser.Tactic.seq tacticParser "; " true -@[builtinTermParser] def Tactic.quot : Parser := parser! "`(tactic|" >> toggleInsideQuot Tactic.unboxSeq >> ")" +@[builtinTermParser] def Tactic.quot : Parser := parser! "`(tactic|" >> toggleInsideQuot Tactic.seq1Unbox >> ")" @[builtinTermParser] def Level.quot : Parser := parser! "`(level|" >> toggleInsideQuot levelParser >> ")" end Parser diff --git a/src/Lean/PrettyPrinter/Formatter.lean b/src/Lean/PrettyPrinter/Formatter.lean index 9e8f127222..d4cb7e4d2e 100644 --- a/src/Lean/PrettyPrinter/Formatter.lean +++ b/src/Lean/PrettyPrinter/Formatter.lean @@ -311,21 +311,20 @@ def many.formatter (p : Formatter) : Formatter := do stx ← getCur; concatArgs $ stx.getArgs.size.forM fun _ => p -@[combinatorFormatter many1] def many1.formatter (p : Formatter) : Formatter := do -stx ← getCur; -if stx.getKind == nullKind then do - many.formatter p -else - -- can happen with `unboxSingleton = true` - p +@[combinatorFormatter many1] def many1.formatter (p : Formatter) : Formatter := +many.formatter p @[combinatorFormatter Parser.optional] def optional.formatter (p : Formatter) : Formatter := do concatArgs p -@[combinatorFormatter Parser.withResultOf] -def withResultOf.formatter (p : Formatter) (f : Syntax → Syntax) : Formatter := do -concatArgs p +@[combinatorFormatter Parser.many1Unbox] +def many1Unbox.formatter (p : Formatter) : Formatter := do +stx ← getCur; +if stx.getKind == nullKind then do + many.formatter p +else + p @[combinatorFormatter sepBy] def sepBy.formatter (p pSep : Formatter) : Formatter := do @@ -334,6 +333,14 @@ concatArgs $ (List.range stx.getArgs.size).reverse.forM $ fun i => if i % 2 == 0 @[combinatorFormatter sepBy1] def sepBy1.formatter := sepBy.formatter +@[combinatorFormatter Parser.nodeSepBy1Unbox] +def nodeSepBy1Unbox.formatter (k : SyntaxNodeKind) (p sep : Formatter) : Formatter := do +stx ← getCur; +if stx.getKind == k then do + node.formatter k $ sepBy.formatter p sep +else + p + @[combinatorFormatter Lean.Parser.withPosition] def withPosition.formatter (p : Position → Formatter) : Formatter := do -- call closure with dummy position p ⟨0, 0⟩ diff --git a/src/Lean/PrettyPrinter/Parenthesizer.lean b/src/Lean/PrettyPrinter/Parenthesizer.lean index 9b17b33e9d..14bb7e5fde 100644 --- a/src/Lean/PrettyPrinter/Parenthesizer.lean +++ b/src/Lean/PrettyPrinter/Parenthesizer.lean @@ -397,21 +397,20 @@ visitArgs $ stx.getArgs.size.forM fun _ => p @[combinatorParenthesizer Lean.Parser.many1] def many1.parenthesizer (p : Parenthesizer) : Parenthesizer := do +many.parenthesizer p + +@[combinatorParenthesizer Lean.Parser.many1Unbox] +def many1Unbox.parenthesizer (p : Parenthesizer) : Parenthesizer := do stx ← getCur; if stx.getKind == nullKind then many.parenthesizer p else - -- can happen with `unboxSingleton = true` p @[combinatorParenthesizer Lean.Parser.optional] def optional.parenthesizer (p : Parenthesizer) : Parenthesizer := do visitArgs p -@[combinatorParenthesizer Lean.Parser.withResultOf] -def withResultOf.parenthesizer (p : Parenthesizer) (f : Syntax → Syntax) : Parenthesizer := do -visitArgs p - @[combinatorParenthesizer Lean.Parser.sepBy] def sepBy.parenthesizer (p pSep : Parenthesizer) : Parenthesizer := do stx ← getCur; @@ -419,6 +418,14 @@ visitArgs $ (List.range stx.getArgs.size).reverse.forM $ fun i => if i % 2 == 0 @[combinatorParenthesizer Lean.Parser.sepBy1] def sepBy1.parenthesizer := sepBy.parenthesizer +@[combinatorParenthesizer Lean.Parser.nodeSepBy1Unbox] +def nodeSepBy1Unbox.parenthesizer (k : SyntaxNodeKind) (p pSep : Parenthesizer) : Parenthesizer := do +stx ← getCur; +if stx.getKind == k then + node.parenthesizer k $ sepBy.parenthesizer p pSep +else + p + @[combinatorParenthesizer Lean.Parser.withPosition] def withPosition.parenthesizer (p : Position → Parenthesizer) : Parenthesizer := do -- call closure with dummy position p ⟨0, 0⟩ diff --git a/stage0/src/Lean/Elab/Tactic/Basic.lean b/stage0/src/Lean/Elab/Tactic/Basic.lean index aeddcf1206..7bff2ae1ae 100644 --- a/stage0/src/Lean/Elab/Tactic/Basic.lean +++ b/stage0/src/Lean/Elab/Tactic/Basic.lean @@ -152,9 +152,8 @@ partial def evalTactic : Syntax → TacticM Unit | stx => withRef stx $ withIncRecDepth $ withFreshMacroScope $ match stx with | Syntax.node k args => if k == nullKind then - -- list of tactics separated by `;` => evaluate in order - -- Syntax quotations can return multiple ones - stx.forSepArgsM evalTactic + -- Macro writers create a sequence of tactics `t₁ ... tₙ` using `mkNullNode #[t₁, ..., tₙ]` + stx.getArgs.forM evalTactic else do trace `Elab.step fun _ => stx; env ← getEnv; diff --git a/stage0/src/Lean/Elab/Tactic/Match.lean b/stage0/src/Lean/Elab/Tactic/Match.lean index 766b24319c..6000c94197 100644 --- a/stage0/src/Lean/Elab/Tactic/Match.lean +++ b/stage0/src/Lean/Elab/Tactic/Match.lean @@ -44,15 +44,12 @@ private def mkAuxiliaryMatchTerm (parentTag : Name) (matchTac : Syntax) : MacroM (matchTerm, s) ← (mkAuxiliaryMatchTermAux parentTag matchTac).run {}; pure (matchTerm, s.cases) -def mkTacticSeq (ref : Syntax) (tacs : Array Syntax) : Syntax := -mkSepStx tacs (mkAtomFrom ref "; ") - @[builtinTactic Lean.Parser.Tactic.match] def evalMatch : Tactic := fun stx => do tag ← getMainTag; (matchTerm, cases) ← liftMacroM $ mkAuxiliaryMatchTerm tag stx; refineMatchTerm ← `(tactic| refine $matchTerm); - let stxNew := mkTacticSeq stx (#[refineMatchTerm] ++ cases); + let stxNew := mkNullNode (#[refineMatchTerm] ++ cases); withMacroExpansion stx stxNew $ evalTactic stxNew end Tactic diff --git a/stage0/src/Lean/Elab/Tactic/Rewrite.lean b/stage0/src/Lean/Elab/Tactic/Rewrite.lean index 8bd4a58e15..d4c45ae030 100644 --- a/stage0/src/Lean/Elab/Tactic/Rewrite.lean +++ b/stage0/src/Lean/Elab/Tactic/Rewrite.lean @@ -11,10 +11,15 @@ namespace Elab namespace Tactic @[builtinMacro Lean.Parser.Tactic.rewriteSeq] def expandRewriteTactic : Macro := -fun stx => throw $ Macro.Exception.error stx "WIP" +fun stx => + let seq := ((stx.getArg 1).getArg 1).getArgs.getSepElems; + let loc := stx.getArg 2; + pure $ mkNullNode $ seq.map fun rwRule => Syntax.node `Lean.Parser.Tactic.rewrite #[stx.getArg 0, rwRule, loc] @[builtinTactic «rewrite»] def evalRewrite : Tactic := -fun stx => throwError "WIP" +fun stx => do + logInfo $ "WIP " ++ stx; + pure () end Tactic end Elab diff --git a/stage0/src/Lean/Parser/Basic.lean b/stage0/src/Lean/Parser/Basic.lean index 25e024f818..bc69d52b1e 100644 --- a/stage0/src/Lean/Parser/Basic.lean +++ b/stage0/src/Lean/Parser/Basic.lean @@ -589,8 +589,15 @@ fun c s => { info := withResultOfInfo p.info, fn := withResultOfFn p.fn f } -abbrev unboxSingleton (p : Parser) : Parser := -withResultOf p fun stx => if stx.getNumArgs == 1 then stx.getArg 0 else stx +@[inline] def many1Unbox (p : Parser) : Parser := +withResultOf (many1 p) fun stx => if stx.getNumArgs == 1 then stx.getArg 0 else stx + +@[inline] def nodeSepBy1Unbox (k : SyntaxNodeKind) (p sep : Parser) (allowTrailingSep := false) : Parser := +withResultOf (node k (sepBy1 p sep allowTrailingSep)) fun stx => + if (stx.getArg 0).getNumArgs < 2 then + (stx.getArg 0).getArg 0 + else + stx @[specialize] partial def satisfyFn (p : Char → Bool) (errorMsg : String := "unexpected character") : ParserFn | c, s => diff --git a/stage0/src/Lean/Parser/Command.lean b/stage0/src/Lean/Parser/Command.lean index 0903d47332..bec2f52a88 100644 --- a/stage0/src/Lean/Parser/Command.lean +++ b/stage0/src/Lean/Parser/Command.lean @@ -23,7 +23,7 @@ categoryParser `command rbp Multiple command will be put in a `null node, but a single command will not (so that you can directly match against a quotation in a command kind's elaborator). -/ -- TODO: use two separate quotation parsers with parser priorities instead -@[builtinTermParser] def Term.quot := parser! "`(" >> toggleInsideQuot (termParser <|> unboxSingleton (many1 commandParser)) >> ")" +@[builtinTermParser] def Term.quot := parser! "`(" >> toggleInsideQuot (termParser <|> many1Unbox commandParser) >> ")" namespace Command def commentBody : Parser := diff --git a/stage0/src/Lean/Parser/Syntax.lean b/stage0/src/Lean/Parser/Syntax.lean index fdd119e575..dc28d5e395 100644 --- a/stage0/src/Lean/Parser/Syntax.lean +++ b/stage0/src/Lean/Parser/Syntax.lean @@ -70,8 +70,8 @@ def notationItem := withAntiquot (mkAntiquot "notationItem" `Lean.Parser.Command def macroArgSimple := parser! ident >> checkNoWsBefore "no space before ':'" >> ":" >> syntaxParser maxPrec def macroArg := try strLit <|> try macroArgSimple def macroHead := macroArg <|> try ident -def macroTailTactic : Parser := try (" : " >> identEq "tactic") >> darrow >> ("`(" >> Tactic.unboxSeq >> ")" <|> termParser) -def macroTailCommand : Parser := try (" : " >> identEq "command") >> darrow >> ("`(" >> unboxSingleton (many1 commandParser) >> ")" <|> termParser) +def macroTailTactic : Parser := try (" : " >> identEq "tactic") >> darrow >> ("`(" >> Tactic.seq1Unbox >> ")" <|> termParser) +def macroTailCommand : Parser := try (" : " >> identEq "command") >> darrow >> ("`(" >> many1Unbox commandParser >> ")" <|> termParser) def macroTailDefault : Parser := try (" : " >> ident) >> darrow >> (("`(" >> categoryParserOfStack 2 >> ")") <|> termParser) def macroTail := macroTailTactic <|> macroTailCommand <|> macroTailDefault @[builtinCommandParser] def «macro» := parser! "macro " >> optPrecedence >> macroHead >> many macroArg >> macroTail diff --git a/stage0/src/Lean/Parser/Tactic.lean b/stage0/src/Lean/Parser/Tactic.lean index 0faed81185..eceffc21f8 100644 --- a/stage0/src/Lean/Parser/Tactic.lean +++ b/stage0/src/Lean/Parser/Tactic.lean @@ -9,7 +9,8 @@ namespace Lean namespace Parser namespace Tactic -def nonEmptySeq := node `Lean.Parser.Tactic.seq $ sepBy1 tacticParser "; " true +def seq := node `Lean.Parser.Tactic.seq $ sepBy tacticParser "; " true +def seq1 := node `Lean.Parser.Tactic.seq $ sepBy1 tacticParser "; " true def underscoreFn : ParserFn := fun c s => @@ -76,7 +77,7 @@ def matchAlts : Parser := group $ withPosition $ fun pos => (optional "| ") >> s @[builtinTacticParser] def «introMatch» := parser! nonReservedSymbol "intro " >> matchAlts @[builtinTacticParser] def «injection» := parser! nonReservedSymbol "injection " >> termParser >> withIds -@[builtinTacticParser] def paren := parser! "(" >> nonEmptySeq >> ")" +@[builtinTacticParser] def paren := parser! "(" >> seq1 >> ")" @[builtinTacticParser] def nestedTacticBlockCurly := parser! "{" >> seq >> "}" @[builtinTacticParser] def orelse := tparser!:2 " <|> " >> tacticParser 1 diff --git a/stage0/src/Lean/Parser/Term.lean b/stage0/src/Lean/Parser/Term.lean index af90f7cedf..2e941dea8f 100644 --- a/stage0/src/Lean/Parser/Term.lean +++ b/stage0/src/Lean/Parser/Term.lean @@ -254,16 +254,9 @@ stx.isAntiquot || stx.isIdent end Term -def Tactic.seq := node `Lean.Parser.Tactic.seq $ sepBy tacticParser "; " true --- Similar to `unboxSingleton`, but for `Tactic.seq -def Tactic.unboxSeq := -withResultOf Tactic.seq fun stx => - if (stx.getArg 0).getNumArgs < 2 then - (stx.getArg 0).getArg 0 - else - stx +def Tactic.seq1Unbox := nodeSepBy1Unbox `Lean.Parser.Tactic.seq tacticParser "; " true -@[builtinTermParser] def Tactic.quot : Parser := parser! "`(tactic|" >> toggleInsideQuot Tactic.unboxSeq >> ")" +@[builtinTermParser] def Tactic.quot : Parser := parser! "`(tactic|" >> toggleInsideQuot Tactic.seq1Unbox >> ")" @[builtinTermParser] def Level.quot : Parser := parser! "`(level|" >> toggleInsideQuot levelParser >> ")" end Parser diff --git a/stage0/src/Lean/PrettyPrinter/Formatter.lean b/stage0/src/Lean/PrettyPrinter/Formatter.lean index 9e8f127222..d4cb7e4d2e 100644 --- a/stage0/src/Lean/PrettyPrinter/Formatter.lean +++ b/stage0/src/Lean/PrettyPrinter/Formatter.lean @@ -311,21 +311,20 @@ def many.formatter (p : Formatter) : Formatter := do stx ← getCur; concatArgs $ stx.getArgs.size.forM fun _ => p -@[combinatorFormatter many1] def many1.formatter (p : Formatter) : Formatter := do -stx ← getCur; -if stx.getKind == nullKind then do - many.formatter p -else - -- can happen with `unboxSingleton = true` - p +@[combinatorFormatter many1] def many1.formatter (p : Formatter) : Formatter := +many.formatter p @[combinatorFormatter Parser.optional] def optional.formatter (p : Formatter) : Formatter := do concatArgs p -@[combinatorFormatter Parser.withResultOf] -def withResultOf.formatter (p : Formatter) (f : Syntax → Syntax) : Formatter := do -concatArgs p +@[combinatorFormatter Parser.many1Unbox] +def many1Unbox.formatter (p : Formatter) : Formatter := do +stx ← getCur; +if stx.getKind == nullKind then do + many.formatter p +else + p @[combinatorFormatter sepBy] def sepBy.formatter (p pSep : Formatter) : Formatter := do @@ -334,6 +333,14 @@ concatArgs $ (List.range stx.getArgs.size).reverse.forM $ fun i => if i % 2 == 0 @[combinatorFormatter sepBy1] def sepBy1.formatter := sepBy.formatter +@[combinatorFormatter Parser.nodeSepBy1Unbox] +def nodeSepBy1Unbox.formatter (k : SyntaxNodeKind) (p sep : Formatter) : Formatter := do +stx ← getCur; +if stx.getKind == k then do + node.formatter k $ sepBy.formatter p sep +else + p + @[combinatorFormatter Lean.Parser.withPosition] def withPosition.formatter (p : Position → Formatter) : Formatter := do -- call closure with dummy position p ⟨0, 0⟩ diff --git a/stage0/src/Lean/PrettyPrinter/Parenthesizer.lean b/stage0/src/Lean/PrettyPrinter/Parenthesizer.lean index 9b17b33e9d..14bb7e5fde 100644 --- a/stage0/src/Lean/PrettyPrinter/Parenthesizer.lean +++ b/stage0/src/Lean/PrettyPrinter/Parenthesizer.lean @@ -397,21 +397,20 @@ visitArgs $ stx.getArgs.size.forM fun _ => p @[combinatorParenthesizer Lean.Parser.many1] def many1.parenthesizer (p : Parenthesizer) : Parenthesizer := do +many.parenthesizer p + +@[combinatorParenthesizer Lean.Parser.many1Unbox] +def many1Unbox.parenthesizer (p : Parenthesizer) : Parenthesizer := do stx ← getCur; if stx.getKind == nullKind then many.parenthesizer p else - -- can happen with `unboxSingleton = true` p @[combinatorParenthesizer Lean.Parser.optional] def optional.parenthesizer (p : Parenthesizer) : Parenthesizer := do visitArgs p -@[combinatorParenthesizer Lean.Parser.withResultOf] -def withResultOf.parenthesizer (p : Parenthesizer) (f : Syntax → Syntax) : Parenthesizer := do -visitArgs p - @[combinatorParenthesizer Lean.Parser.sepBy] def sepBy.parenthesizer (p pSep : Parenthesizer) : Parenthesizer := do stx ← getCur; @@ -419,6 +418,14 @@ visitArgs $ (List.range stx.getArgs.size).reverse.forM $ fun i => if i % 2 == 0 @[combinatorParenthesizer Lean.Parser.sepBy1] def sepBy1.parenthesizer := sepBy.parenthesizer +@[combinatorParenthesizer Lean.Parser.nodeSepBy1Unbox] +def nodeSepBy1Unbox.parenthesizer (k : SyntaxNodeKind) (p pSep : Parenthesizer) : Parenthesizer := do +stx ← getCur; +if stx.getKind == k then + node.parenthesizer k $ sepBy.parenthesizer p pSep +else + p + @[combinatorParenthesizer Lean.Parser.withPosition] def withPosition.parenthesizer (p : Position → Parenthesizer) : Parenthesizer := do -- call closure with dummy position p ⟨0, 0⟩ diff --git a/stage0/stdlib/Lean/Elab/Tactic/Basic.c b/stage0/stdlib/Lean/Elab/Tactic/Basic.c index d027087757..b4a65c62c4 100644 --- a/stage0/stdlib/Lean/Elab/Tactic/Basic.c +++ b/stage0/stdlib/Lean/Elab/Tactic/Basic.c @@ -32,6 +32,7 @@ lean_object* l_Lean_Elab_Tactic_withMainMVarContext___rarg(lean_object*, lean_ob lean_object* l_Lean_Elab_Tactic_mkTacticAttribute___closed__3; lean_object* lean_nat_div(lean_object*, lean_object*); lean_object* l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at___private_Lean_Elab_Tactic_Basic_5__sortFVarIds___spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Array_forMAux___main___at_Lean_Elab_Tactic_evalTactic___main___spec__13___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_withIncRecDepth___rarg___lambda__2___closed__2; lean_object* l_Lean_Elab_Tactic_evalIntros___closed__1; lean_object* l_Lean_Elab_Tactic_monadQuotation; @@ -72,6 +73,7 @@ lean_object* l_Lean_Elab_Tactic_focus___rarg___lambda__1(lean_object*, lean_obje lean_object* l_Lean_Elab_Tactic_monadExcept___closed__1; lean_object* l_Lean_Elab_Tactic_reportUnsolvedGoals(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Tactic_evalClear(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Array_forMAux___main___at_Lean_Elab_Tactic_evalTactic___main___spec__13(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_PersistentHashMap_find_x3f___at_Lean_Elab_Tactic_evalTactic___main___spec__3___boxed(lean_object*, lean_object*); lean_object* l_Lean_Elab_Tactic_appendGoals___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Tactic_pruneSolvedGoals___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -317,7 +319,6 @@ extern lean_object* l___private_Lean_Elab_Util_4__regTraceClasses___closed__1; lean_object* l_Lean_Elab_Term_reportUnsolvedGoals___closed__1; lean_object* l_List_findM_x3f___main___at___private_Lean_Elab_Tactic_Basic_6__findTag_x3f___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltin_Lean_Elab_Tactic_evalOrelse___closed__1; -lean_object* l_Array_foldlStepMAux___main___at_Lean_Elab_Tactic_evalTactic___main___spec__13(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_reportUnsolvedGoals___closed__4; lean_object* l___private_Lean_Elab_Tactic_Basic_6__findTag_x3f___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_iterateMAux___main___at_Array_append___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*); @@ -533,9 +534,9 @@ lean_object* l_Lean_Elab_Tactic_monadQuotation___closed__3; lean_object* l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at___private_Lean_Elab_Tactic_Basic_5__sortFVarIds___spec__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_throwError___at_Lean_Elab_Term_throwErrorIfErrors___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_setMVarTag(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Array_foldlStepMAux___main___at_Lean_Elab_Tactic_evalTactic___main___spec__13___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltin_Lean_Elab_Tactic_evalCase(lean_object*); lean_object* l_Lean_Meta_withMVarContext___at_Lean_Elab_Tactic_withMainMVarContext___spec__1(lean_object*); +lean_object* l_Array_foldlStepMAux___main___at_Lean_Elab_Tactic_evalSeq___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_isLocalIdent_x3f(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_reportUnsolvedGoals___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Tactic_getCurrMacroScope___boxed(lean_object*, lean_object*); @@ -552,6 +553,7 @@ lean_object* l_Lean_Elab_Tactic_expandTacticMacro(lean_object*, lean_object*, le lean_object* l_Lean_Elab_Tactic_liftMetaTacticAux___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltin_Lean_Elab_Tactic_evalParen(lean_object*); lean_object* l_Lean_Elab_Tactic_evalIntro___closed__6; +lean_object* l_Array_foldlStepMAux___main___at_Lean_Elab_Tactic_evalSeq___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_setEnv___at_Lean_Elab_Tactic_BacktrackableState_restore___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Tactic_getUnsolvedGoals___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_ReaderT_bind___at_Lean_Elab_Tactic_liftMetaTacticAux___spec__1(lean_object*, lean_object*); @@ -4446,88 +4448,86 @@ x_14 = l_Lean_Elab_log___at_Lean_Elab_Tactic_evalTactic___main___spec__11(x_12, return x_14; } } -lean_object* l_Array_foldlStepMAux___main___at_Lean_Elab_Tactic_evalTactic___main___spec__13(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13) { +lean_object* l_Array_forMAux___main___at_Lean_Elab_Tactic_evalTactic___main___spec__13(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) { _start: { -lean_object* x_14; uint8_t x_15; -x_14 = lean_array_get_size(x_2); -x_15 = lean_nat_dec_lt(x_3, x_14); -lean_dec(x_14); -if (x_15 == 0) -{ -lean_object* x_16; +lean_object* x_12; uint8_t x_13; +x_12 = lean_array_get_size(x_1); +x_13 = lean_nat_dec_lt(x_2, x_12); lean_dec(x_12); -lean_dec(x_11); +if (x_13 == 0) +{ +lean_object* x_14; lean_object* x_15; lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); +lean_dec(x_4); lean_dec(x_3); -x_16 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_16, 0, x_4); -lean_ctor_set(x_16, 1, x_13); -return x_16; +lean_dec(x_2); +x_14 = lean_box(0); +x_15 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_15, 0, x_14); +lean_ctor_set(x_15, 1, x_11); +return x_15; } else { -lean_object* x_17; lean_object* x_18; -lean_dec(x_4); -x_17 = lean_array_fget(x_2, x_3); -lean_inc(x_12); -lean_inc(x_11); +lean_object* x_16; lean_object* x_17; +x_16 = lean_array_fget(x_1, x_2); lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); -x_18 = l_Lean_Elab_Tactic_evalTactic___main(x_17, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12, x_13); -if (lean_obj_tag(x_18) == 0) +lean_inc(x_4); +lean_inc(x_3); +x_17 = l_Lean_Elab_Tactic_evalTactic___main(x_16, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11); +if (lean_obj_tag(x_17) == 0) { -lean_object* x_19; lean_object* x_20; lean_object* x_21; -x_19 = lean_ctor_get(x_18, 0); -lean_inc(x_19); -x_20 = lean_ctor_get(x_18, 1); -lean_inc(x_20); -lean_dec(x_18); -x_21 = lean_nat_add(x_3, x_1); -lean_dec(x_3); -x_3 = x_21; -x_4 = x_19; -x_13 = x_20; +lean_object* x_18; lean_object* x_19; lean_object* x_20; +x_18 = lean_ctor_get(x_17, 1); +lean_inc(x_18); +lean_dec(x_17); +x_19 = lean_unsigned_to_nat(1u); +x_20 = lean_nat_add(x_2, x_19); +lean_dec(x_2); +x_2 = x_20; +x_11 = x_18; goto _start; } else { -uint8_t x_23; -lean_dec(x_12); -lean_dec(x_11); +uint8_t x_22; lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); +lean_dec(x_4); lean_dec(x_3); -x_23 = !lean_is_exclusive(x_18); -if (x_23 == 0) +lean_dec(x_2); +x_22 = !lean_is_exclusive(x_17); +if (x_22 == 0) { -return x_18; +return x_17; } else { -lean_object* x_24; lean_object* x_25; lean_object* x_26; -x_24 = lean_ctor_get(x_18, 0); -x_25 = lean_ctor_get(x_18, 1); -lean_inc(x_25); +lean_object* x_23; lean_object* x_24; lean_object* x_25; +x_23 = lean_ctor_get(x_17, 0); +x_24 = lean_ctor_get(x_17, 1); lean_inc(x_24); -lean_dec(x_18); -x_26 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_26, 0, x_24); -lean_ctor_set(x_26, 1, x_25); -return x_26; +lean_inc(x_23); +lean_dec(x_17); +x_25 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_25, 0, x_23); +lean_ctor_set(x_25, 1, x_24); +return x_25; } } } @@ -4657,25 +4657,23 @@ goto block_62; } else { -lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; +lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_dec(x_12); x_71 = l_Lean_Syntax_getArgs(x_1); lean_dec(x_1); -x_72 = lean_unsigned_to_nat(2u); -x_73 = lean_unsigned_to_nat(0u); -x_74 = lean_box(0); -x_75 = l_Array_foldlStepMAux___main___at_Lean_Elab_Tactic_evalTactic___main___spec__13(x_72, x_71, x_73, x_74, x_2, x_3, x_4, x_5, x_6, x_7, x_22, x_9, x_30); +x_72 = lean_unsigned_to_nat(0u); +x_73 = l_Array_forMAux___main___at_Lean_Elab_Tactic_evalTactic___main___spec__13(x_71, x_72, x_2, x_3, x_4, x_5, x_6, x_7, x_22, x_9, x_30); lean_dec(x_71); -return x_75; +return x_73; } } else { -lean_object* x_76; lean_object* x_77; +lean_object* x_74; lean_object* x_75; lean_dec(x_12); lean_dec(x_1); -x_76 = l_Lean_Elab_Tactic_evalTactic___main___closed__3; -x_77 = l_Lean_throwError___at_Lean_Elab_Tactic_evalTactic___main___spec__1___rarg(x_76, x_2, x_3, x_4, x_5, x_6, x_7, x_22, x_9, x_30); +x_74 = l_Lean_Elab_Tactic_evalTactic___main___closed__3; +x_75 = l_Lean_throwError___at_Lean_Elab_Tactic_evalTactic___main___spec__1___rarg(x_74, x_2, x_3, x_4, x_5, x_6, x_7, x_22, x_9, x_30); lean_dec(x_9); lean_dec(x_22); lean_dec(x_7); @@ -4683,7 +4681,7 @@ lean_dec(x_6); lean_dec(x_5); lean_dec(x_3); lean_dec(x_2); -return x_77; +return x_75; } block_62: { @@ -4770,89 +4768,87 @@ return x_61; } else { -lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; uint8_t x_85; uint8_t x_86; lean_object* x_87; lean_object* x_88; -x_78 = lean_ctor_get(x_4, 0); -x_79 = lean_ctor_get(x_4, 1); -x_80 = lean_ctor_get(x_4, 2); -x_81 = lean_ctor_get(x_4, 3); -x_82 = lean_ctor_get(x_4, 4); -x_83 = lean_ctor_get(x_4, 5); -x_84 = lean_ctor_get(x_4, 6); -x_85 = lean_ctor_get_uint8(x_4, sizeof(void*)*8); -x_86 = lean_ctor_get_uint8(x_4, sizeof(void*)*8 + 1); -lean_inc(x_84); -lean_inc(x_83); +lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; uint8_t x_83; uint8_t x_84; lean_object* x_85; lean_object* x_86; +x_76 = lean_ctor_get(x_4, 0); +x_77 = lean_ctor_get(x_4, 1); +x_78 = lean_ctor_get(x_4, 2); +x_79 = lean_ctor_get(x_4, 3); +x_80 = lean_ctor_get(x_4, 4); +x_81 = lean_ctor_get(x_4, 5); +x_82 = lean_ctor_get(x_4, 6); +x_83 = lean_ctor_get_uint8(x_4, sizeof(void*)*8); +x_84 = lean_ctor_get_uint8(x_4, sizeof(void*)*8 + 1); lean_inc(x_82); lean_inc(x_81); lean_inc(x_80); lean_inc(x_79); lean_inc(x_78); +lean_inc(x_77); +lean_inc(x_76); lean_dec(x_4); -x_87 = lean_alloc_ctor(0, 8, 2); -lean_ctor_set(x_87, 0, x_78); -lean_ctor_set(x_87, 1, x_79); -lean_ctor_set(x_87, 2, x_80); -lean_ctor_set(x_87, 3, x_81); -lean_ctor_set(x_87, 4, x_82); -lean_ctor_set(x_87, 5, x_83); -lean_ctor_set(x_87, 6, x_84); -lean_ctor_set(x_87, 7, x_27); -lean_ctor_set_uint8(x_87, sizeof(void*)*8, x_85); -lean_ctor_set_uint8(x_87, sizeof(void*)*8 + 1, x_86); +x_85 = lean_alloc_ctor(0, 8, 2); +lean_ctor_set(x_85, 0, x_76); +lean_ctor_set(x_85, 1, x_77); +lean_ctor_set(x_85, 2, x_78); +lean_ctor_set(x_85, 3, x_79); +lean_ctor_set(x_85, 4, x_80); +lean_ctor_set(x_85, 5, x_81); +lean_ctor_set(x_85, 6, x_82); +lean_ctor_set(x_85, 7, x_27); +lean_ctor_set_uint8(x_85, sizeof(void*)*8, x_83); +lean_ctor_set_uint8(x_85, sizeof(void*)*8 + 1, x_84); if (lean_obj_tag(x_1) == 1) { -lean_object* x_118; lean_object* x_119; uint8_t x_120; -x_118 = lean_ctor_get(x_1, 0); -lean_inc(x_118); -x_119 = l_Lean_nullKind; -x_120 = lean_name_eq(x_118, x_119); -lean_dec(x_118); +lean_object* x_116; lean_object* x_117; uint8_t x_118; +x_116 = lean_ctor_get(x_1, 0); +lean_inc(x_116); +x_117 = l_Lean_nullKind; +x_118 = lean_name_eq(x_116, x_117); +lean_dec(x_116); +if (x_118 == 0) +{ +lean_object* x_119; uint8_t x_120; +x_119 = l___private_Lean_Elab_Util_4__regTraceClasses___closed__3; +x_120 = l_Lean_checkTraceOption(x_12, x_119); +lean_dec(x_12); if (x_120 == 0) { -lean_object* x_121; uint8_t x_122; -x_121 = l___private_Lean_Elab_Util_4__regTraceClasses___closed__3; -x_122 = l_Lean_checkTraceOption(x_12, x_121); -lean_dec(x_12); -if (x_122 == 0) -{ -x_88 = x_30; -goto block_117; +x_86 = x_30; +goto block_115; } else { -lean_object* x_123; lean_object* x_124; lean_object* x_125; +lean_object* x_121; lean_object* x_122; lean_object* x_123; lean_inc(x_1); -x_123 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_123, 0, x_1); -x_124 = l_Lean_Elab_logTrace___at_Lean_Elab_Tactic_evalTactic___main___spec__10(x_121, x_123, x_2, x_3, x_87, x_5, x_6, x_7, x_22, x_9, x_30); -x_125 = lean_ctor_get(x_124, 1); -lean_inc(x_125); +x_121 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_121, 0, x_1); +x_122 = l_Lean_Elab_logTrace___at_Lean_Elab_Tactic_evalTactic___main___spec__10(x_119, x_121, x_2, x_3, x_85, x_5, x_6, x_7, x_22, x_9, x_30); +x_123 = lean_ctor_get(x_122, 1); +lean_inc(x_123); +lean_dec(x_122); +x_86 = x_123; +goto block_115; +} +} +else +{ +lean_object* x_124; lean_object* x_125; lean_object* x_126; +lean_dec(x_12); +x_124 = l_Lean_Syntax_getArgs(x_1); +lean_dec(x_1); +x_125 = lean_unsigned_to_nat(0u); +x_126 = l_Array_forMAux___main___at_Lean_Elab_Tactic_evalTactic___main___spec__13(x_124, x_125, x_2, x_3, x_85, x_5, x_6, x_7, x_22, x_9, x_30); lean_dec(x_124); -x_88 = x_125; -goto block_117; +return x_126; } } else { -lean_object* x_126; lean_object* x_127; lean_object* x_128; lean_object* x_129; lean_object* x_130; -lean_dec(x_12); -x_126 = l_Lean_Syntax_getArgs(x_1); -lean_dec(x_1); -x_127 = lean_unsigned_to_nat(2u); -x_128 = lean_unsigned_to_nat(0u); -x_129 = lean_box(0); -x_130 = l_Array_foldlStepMAux___main___at_Lean_Elab_Tactic_evalTactic___main___spec__13(x_127, x_126, x_128, x_129, x_2, x_3, x_87, x_5, x_6, x_7, x_22, x_9, x_30); -lean_dec(x_126); -return x_130; -} -} -else -{ -lean_object* x_131; lean_object* x_132; +lean_object* x_127; lean_object* x_128; lean_dec(x_12); lean_dec(x_1); -x_131 = l_Lean_Elab_Tactic_evalTactic___main___closed__3; -x_132 = l_Lean_throwError___at_Lean_Elab_Tactic_evalTactic___main___spec__1___rarg(x_131, x_2, x_3, x_87, x_5, x_6, x_7, x_22, x_9, x_30); +x_127 = l_Lean_Elab_Tactic_evalTactic___main___closed__3; +x_128 = l_Lean_throwError___at_Lean_Elab_Tactic_evalTactic___main___spec__1___rarg(x_127, x_2, x_3, x_85, x_5, x_6, x_7, x_22, x_9, x_30); lean_dec(x_9); lean_dec(x_22); lean_dec(x_7); @@ -4860,133 +4856,133 @@ lean_dec(x_6); lean_dec(x_5); lean_dec(x_3); lean_dec(x_2); -return x_132; +return x_128; } -block_117: +block_115: { -lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; -x_89 = lean_st_ref_get(x_9, x_88); -x_90 = lean_ctor_get(x_89, 0); +lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; +x_87 = lean_st_ref_get(x_9, x_86); +x_88 = lean_ctor_get(x_87, 0); +lean_inc(x_88); +x_89 = lean_ctor_get(x_87, 1); +lean_inc(x_89); +lean_dec(x_87); +x_90 = lean_ctor_get(x_88, 0); lean_inc(x_90); -x_91 = lean_ctor_get(x_89, 1); -lean_inc(x_91); -lean_dec(x_89); -x_92 = lean_ctor_get(x_90, 0); +lean_dec(x_88); +x_91 = l_Lean_Elab_Tactic_saveAllState___rarg(x_3, x_85, x_5, x_6, x_7, x_22, x_9, x_89); +x_92 = lean_ctor_get(x_91, 0); lean_inc(x_92); -lean_dec(x_90); -x_93 = l_Lean_Elab_Tactic_saveAllState___rarg(x_3, x_87, x_5, x_6, x_7, x_22, x_9, x_91); -x_94 = lean_ctor_get(x_93, 0); -lean_inc(x_94); -x_95 = lean_ctor_get(x_93, 1); +x_93 = lean_ctor_get(x_91, 1); +lean_inc(x_93); +lean_dec(x_91); +x_94 = l_Lean_Elab_Tactic_tacticElabAttribute; +x_95 = lean_ctor_get(x_94, 2); lean_inc(x_95); -lean_dec(x_93); -x_96 = l_Lean_Elab_Tactic_tacticElabAttribute; -x_97 = lean_ctor_get(x_96, 2); +x_96 = l_Lean_PersistentEnvExtension_getState___rarg(x_95, x_90); +lean_dec(x_90); +lean_dec(x_95); +x_97 = lean_ctor_get(x_96, 1); lean_inc(x_97); -x_98 = l_Lean_PersistentEnvExtension_getState___rarg(x_97, x_92); -lean_dec(x_92); -lean_dec(x_97); -x_99 = lean_ctor_get(x_98, 1); -lean_inc(x_99); -lean_dec(x_98); +lean_dec(x_96); lean_inc(x_1); -x_100 = l_Lean_Syntax_getKind(x_1); -x_101 = l_Lean_SMap_find_x3f___at_Lean_Elab_Tactic_evalTactic___main___spec__2(x_99, x_100); -if (lean_obj_tag(x_101) == 0) +x_98 = l_Lean_Syntax_getKind(x_1); +x_99 = l_Lean_SMap_find_x3f___at_Lean_Elab_Tactic_evalTactic___main___spec__2(x_97, x_98); +if (lean_obj_tag(x_99) == 0) { -lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; -lean_dec(x_94); -x_102 = lean_st_ref_get(x_9, x_95); -x_103 = lean_ctor_get(x_102, 0); -lean_inc(x_103); -x_104 = lean_ctor_get(x_102, 1); -lean_inc(x_104); -lean_dec(x_102); -x_105 = lean_ctor_get(x_103, 0); -lean_inc(x_105); -lean_dec(x_103); -x_106 = l_Lean_Elab_macroAttribute; -x_107 = lean_ctor_get(x_106, 2); -lean_inc(x_107); -x_108 = l_Lean_PersistentEnvExtension_getState___rarg(x_107, x_105); -lean_dec(x_105); -lean_dec(x_107); -x_109 = lean_ctor_get(x_108, 1); -lean_inc(x_109); -lean_dec(x_108); -x_110 = l_Lean_SMap_find_x3f___at_Lean_Elab_getMacros___spec__1(x_109, x_100); +lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; +lean_dec(x_92); +x_100 = lean_st_ref_get(x_9, x_93); +x_101 = lean_ctor_get(x_100, 0); +lean_inc(x_101); +x_102 = lean_ctor_get(x_100, 1); +lean_inc(x_102); lean_dec(x_100); -if (lean_obj_tag(x_110) == 0) +x_103 = lean_ctor_get(x_101, 0); +lean_inc(x_103); +lean_dec(x_101); +x_104 = l_Lean_Elab_macroAttribute; +x_105 = lean_ctor_get(x_104, 2); +lean_inc(x_105); +x_106 = l_Lean_PersistentEnvExtension_getState___rarg(x_105, x_103); +lean_dec(x_103); +lean_dec(x_105); +x_107 = lean_ctor_get(x_106, 1); +lean_inc(x_107); +lean_dec(x_106); +x_108 = l_Lean_SMap_find_x3f___at_Lean_Elab_getMacros___spec__1(x_107, x_98); +lean_dec(x_98); +if (lean_obj_tag(x_108) == 0) +{ +lean_object* x_109; lean_object* x_110; +x_109 = lean_box(0); +x_110 = l___private_Lean_Elab_Tactic_Basic_2__expandTacticMacroFns___main___at_Lean_Elab_Tactic_evalTactic___main___spec__8(x_1, x_109, x_2, x_3, x_85, x_5, x_6, x_7, x_22, x_9, x_102); +return x_110; +} +else { lean_object* x_111; lean_object* x_112; -x_111 = lean_box(0); -x_112 = l___private_Lean_Elab_Tactic_Basic_2__expandTacticMacroFns___main___at_Lean_Elab_Tactic_evalTactic___main___spec__8(x_1, x_111, x_2, x_3, x_87, x_5, x_6, x_7, x_22, x_9, x_104); +x_111 = lean_ctor_get(x_108, 0); +lean_inc(x_111); +lean_dec(x_108); +x_112 = l___private_Lean_Elab_Tactic_Basic_2__expandTacticMacroFns___main___at_Lean_Elab_Tactic_evalTactic___main___spec__8(x_1, x_111, x_2, x_3, x_85, x_5, x_6, x_7, x_22, x_9, x_102); return x_112; } +} else { lean_object* x_113; lean_object* x_114; -x_113 = lean_ctor_get(x_110, 0); +lean_dec(x_98); +x_113 = lean_ctor_get(x_99, 0); lean_inc(x_113); -lean_dec(x_110); -x_114 = l___private_Lean_Elab_Tactic_Basic_2__expandTacticMacroFns___main___at_Lean_Elab_Tactic_evalTactic___main___spec__8(x_1, x_113, x_2, x_3, x_87, x_5, x_6, x_7, x_22, x_9, x_104); +lean_dec(x_99); +x_114 = l___private_Lean_Elab_Tactic_Basic_1__evalTacticUsing___main(x_92, x_1, x_113, x_2, x_3, x_85, x_5, x_6, x_7, x_22, x_9, x_93); return x_114; } } -else -{ -lean_object* x_115; lean_object* x_116; -lean_dec(x_100); -x_115 = lean_ctor_get(x_101, 0); -lean_inc(x_115); -lean_dec(x_101); -x_116 = l___private_Lean_Elab_Tactic_Basic_1__evalTacticUsing___main(x_94, x_1, x_115, x_2, x_3, x_87, x_5, x_6, x_7, x_22, x_9, x_95); -return x_116; -} -} } } else { -lean_object* x_133; lean_object* x_134; lean_object* x_135; lean_object* x_136; lean_object* x_137; lean_object* x_138; lean_object* x_139; lean_object* x_140; lean_object* x_141; lean_object* x_142; lean_object* x_143; lean_object* x_144; lean_object* x_145; lean_object* x_146; lean_object* x_147; lean_object* x_148; uint8_t x_149; uint8_t x_150; lean_object* x_151; lean_object* x_152; lean_object* x_153; -x_133 = lean_ctor_get(x_24, 0); -x_134 = lean_ctor_get(x_24, 1); -x_135 = lean_ctor_get(x_24, 2); -x_136 = lean_ctor_get(x_24, 3); -x_137 = lean_ctor_get(x_24, 4); -lean_inc(x_137); -lean_inc(x_136); -lean_inc(x_135); -lean_inc(x_134); +lean_object* x_129; lean_object* x_130; lean_object* x_131; lean_object* x_132; lean_object* x_133; lean_object* x_134; lean_object* x_135; lean_object* x_136; lean_object* x_137; lean_object* x_138; lean_object* x_139; lean_object* x_140; lean_object* x_141; lean_object* x_142; lean_object* x_143; lean_object* x_144; uint8_t x_145; uint8_t x_146; lean_object* x_147; lean_object* x_148; lean_object* x_149; +x_129 = lean_ctor_get(x_24, 0); +x_130 = lean_ctor_get(x_24, 1); +x_131 = lean_ctor_get(x_24, 2); +x_132 = lean_ctor_get(x_24, 3); +x_133 = lean_ctor_get(x_24, 4); lean_inc(x_133); +lean_inc(x_132); +lean_inc(x_131); +lean_inc(x_130); +lean_inc(x_129); lean_dec(x_24); -x_138 = lean_nat_add(x_136, x_20); -x_139 = lean_alloc_ctor(0, 5, 0); -lean_ctor_set(x_139, 0, x_133); -lean_ctor_set(x_139, 1, x_134); -lean_ctor_set(x_139, 2, x_135); -lean_ctor_set(x_139, 3, x_138); -lean_ctor_set(x_139, 4, x_137); -x_140 = lean_st_ref_set(x_5, x_139, x_25); -x_141 = lean_ctor_get(x_140, 1); +x_134 = lean_nat_add(x_132, x_20); +x_135 = lean_alloc_ctor(0, 5, 0); +lean_ctor_set(x_135, 0, x_129); +lean_ctor_set(x_135, 1, x_130); +lean_ctor_set(x_135, 2, x_131); +lean_ctor_set(x_135, 3, x_134); +lean_ctor_set(x_135, 4, x_133); +x_136 = lean_st_ref_set(x_5, x_135, x_25); +x_137 = lean_ctor_get(x_136, 1); +lean_inc(x_137); +lean_dec(x_136); +x_138 = lean_ctor_get(x_4, 0); +lean_inc(x_138); +x_139 = lean_ctor_get(x_4, 1); +lean_inc(x_139); +x_140 = lean_ctor_get(x_4, 2); +lean_inc(x_140); +x_141 = lean_ctor_get(x_4, 3); lean_inc(x_141); -lean_dec(x_140); -x_142 = lean_ctor_get(x_4, 0); +x_142 = lean_ctor_get(x_4, 4); lean_inc(x_142); -x_143 = lean_ctor_get(x_4, 1); +x_143 = lean_ctor_get(x_4, 5); lean_inc(x_143); -x_144 = lean_ctor_get(x_4, 2); +x_144 = lean_ctor_get(x_4, 6); lean_inc(x_144); -x_145 = lean_ctor_get(x_4, 3); -lean_inc(x_145); -x_146 = lean_ctor_get(x_4, 4); -lean_inc(x_146); -x_147 = lean_ctor_get(x_4, 5); -lean_inc(x_147); -x_148 = lean_ctor_get(x_4, 6); -lean_inc(x_148); -x_149 = lean_ctor_get_uint8(x_4, sizeof(void*)*8); -x_150 = lean_ctor_get_uint8(x_4, sizeof(void*)*8 + 1); +x_145 = lean_ctor_get_uint8(x_4, sizeof(void*)*8); +x_146 = lean_ctor_get_uint8(x_4, sizeof(void*)*8 + 1); if (lean_is_exclusive(x_4)) { lean_ctor_release(x_4, 0); lean_ctor_release(x_4, 1); @@ -4996,80 +4992,78 @@ if (lean_is_exclusive(x_4)) { lean_ctor_release(x_4, 5); lean_ctor_release(x_4, 6); lean_ctor_release(x_4, 7); - x_151 = x_4; + x_147 = x_4; } else { lean_dec_ref(x_4); - x_151 = lean_box(0); + x_147 = lean_box(0); } -if (lean_is_scalar(x_151)) { - x_152 = lean_alloc_ctor(0, 8, 2); +if (lean_is_scalar(x_147)) { + x_148 = lean_alloc_ctor(0, 8, 2); } else { - x_152 = x_151; + x_148 = x_147; } -lean_ctor_set(x_152, 0, x_142); -lean_ctor_set(x_152, 1, x_143); -lean_ctor_set(x_152, 2, x_144); -lean_ctor_set(x_152, 3, x_145); -lean_ctor_set(x_152, 4, x_146); -lean_ctor_set(x_152, 5, x_147); -lean_ctor_set(x_152, 6, x_148); -lean_ctor_set(x_152, 7, x_136); -lean_ctor_set_uint8(x_152, sizeof(void*)*8, x_149); -lean_ctor_set_uint8(x_152, sizeof(void*)*8 + 1, x_150); +lean_ctor_set(x_148, 0, x_138); +lean_ctor_set(x_148, 1, x_139); +lean_ctor_set(x_148, 2, x_140); +lean_ctor_set(x_148, 3, x_141); +lean_ctor_set(x_148, 4, x_142); +lean_ctor_set(x_148, 5, x_143); +lean_ctor_set(x_148, 6, x_144); +lean_ctor_set(x_148, 7, x_132); +lean_ctor_set_uint8(x_148, sizeof(void*)*8, x_145); +lean_ctor_set_uint8(x_148, sizeof(void*)*8 + 1, x_146); if (lean_obj_tag(x_1) == 1) { -lean_object* x_183; lean_object* x_184; uint8_t x_185; -x_183 = lean_ctor_get(x_1, 0); -lean_inc(x_183); -x_184 = l_Lean_nullKind; -x_185 = lean_name_eq(x_183, x_184); -lean_dec(x_183); -if (x_185 == 0) +lean_object* x_179; lean_object* x_180; uint8_t x_181; +x_179 = lean_ctor_get(x_1, 0); +lean_inc(x_179); +x_180 = l_Lean_nullKind; +x_181 = lean_name_eq(x_179, x_180); +lean_dec(x_179); +if (x_181 == 0) { -lean_object* x_186; uint8_t x_187; -x_186 = l___private_Lean_Elab_Util_4__regTraceClasses___closed__3; -x_187 = l_Lean_checkTraceOption(x_12, x_186); +lean_object* x_182; uint8_t x_183; +x_182 = l___private_Lean_Elab_Util_4__regTraceClasses___closed__3; +x_183 = l_Lean_checkTraceOption(x_12, x_182); lean_dec(x_12); -if (x_187 == 0) +if (x_183 == 0) { -x_153 = x_141; -goto block_182; +x_149 = x_137; +goto block_178; } else { -lean_object* x_188; lean_object* x_189; lean_object* x_190; +lean_object* x_184; lean_object* x_185; lean_object* x_186; lean_inc(x_1); -x_188 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_188, 0, x_1); -x_189 = l_Lean_Elab_logTrace___at_Lean_Elab_Tactic_evalTactic___main___spec__10(x_186, x_188, x_2, x_3, x_152, x_5, x_6, x_7, x_22, x_9, x_141); -x_190 = lean_ctor_get(x_189, 1); -lean_inc(x_190); -lean_dec(x_189); -x_153 = x_190; -goto block_182; +x_184 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_184, 0, x_1); +x_185 = l_Lean_Elab_logTrace___at_Lean_Elab_Tactic_evalTactic___main___spec__10(x_182, x_184, x_2, x_3, x_148, x_5, x_6, x_7, x_22, x_9, x_137); +x_186 = lean_ctor_get(x_185, 1); +lean_inc(x_186); +lean_dec(x_185); +x_149 = x_186; +goto block_178; } } else { -lean_object* x_191; lean_object* x_192; lean_object* x_193; lean_object* x_194; lean_object* x_195; +lean_object* x_187; lean_object* x_188; lean_object* x_189; lean_dec(x_12); -x_191 = l_Lean_Syntax_getArgs(x_1); +x_187 = l_Lean_Syntax_getArgs(x_1); lean_dec(x_1); -x_192 = lean_unsigned_to_nat(2u); -x_193 = lean_unsigned_to_nat(0u); -x_194 = lean_box(0); -x_195 = l_Array_foldlStepMAux___main___at_Lean_Elab_Tactic_evalTactic___main___spec__13(x_192, x_191, x_193, x_194, x_2, x_3, x_152, x_5, x_6, x_7, x_22, x_9, x_141); -lean_dec(x_191); -return x_195; +x_188 = lean_unsigned_to_nat(0u); +x_189 = l_Array_forMAux___main___at_Lean_Elab_Tactic_evalTactic___main___spec__13(x_187, x_188, x_2, x_3, x_148, x_5, x_6, x_7, x_22, x_9, x_137); +lean_dec(x_187); +return x_189; } } else { -lean_object* x_196; lean_object* x_197; +lean_object* x_190; lean_object* x_191; lean_dec(x_12); lean_dec(x_1); -x_196 = l_Lean_Elab_Tactic_evalTactic___main___closed__3; -x_197 = l_Lean_throwError___at_Lean_Elab_Tactic_evalTactic___main___spec__1___rarg(x_196, x_2, x_3, x_152, x_5, x_6, x_7, x_22, x_9, x_141); +x_190 = l_Lean_Elab_Tactic_evalTactic___main___closed__3; +x_191 = l_Lean_throwError___at_Lean_Elab_Tactic_evalTactic___main___spec__1___rarg(x_190, x_2, x_3, x_148, x_5, x_6, x_7, x_22, x_9, x_137); lean_dec(x_9); lean_dec(x_22); lean_dec(x_7); @@ -5077,102 +5071,102 @@ lean_dec(x_6); lean_dec(x_5); lean_dec(x_3); lean_dec(x_2); -return x_197; +return x_191; } -block_182: +block_178: { -lean_object* x_154; lean_object* x_155; lean_object* x_156; lean_object* x_157; lean_object* x_158; lean_object* x_159; lean_object* x_160; lean_object* x_161; lean_object* x_162; lean_object* x_163; lean_object* x_164; lean_object* x_165; lean_object* x_166; -x_154 = lean_st_ref_get(x_9, x_153); +lean_object* x_150; lean_object* x_151; lean_object* x_152; lean_object* x_153; lean_object* x_154; lean_object* x_155; lean_object* x_156; lean_object* x_157; lean_object* x_158; lean_object* x_159; lean_object* x_160; lean_object* x_161; lean_object* x_162; +x_150 = lean_st_ref_get(x_9, x_149); +x_151 = lean_ctor_get(x_150, 0); +lean_inc(x_151); +x_152 = lean_ctor_get(x_150, 1); +lean_inc(x_152); +lean_dec(x_150); +x_153 = lean_ctor_get(x_151, 0); +lean_inc(x_153); +lean_dec(x_151); +x_154 = l_Lean_Elab_Tactic_saveAllState___rarg(x_3, x_148, x_5, x_6, x_7, x_22, x_9, x_152); x_155 = lean_ctor_get(x_154, 0); lean_inc(x_155); x_156 = lean_ctor_get(x_154, 1); lean_inc(x_156); lean_dec(x_154); -x_157 = lean_ctor_get(x_155, 0); -lean_inc(x_157); -lean_dec(x_155); -x_158 = l_Lean_Elab_Tactic_saveAllState___rarg(x_3, x_152, x_5, x_6, x_7, x_22, x_9, x_156); -x_159 = lean_ctor_get(x_158, 0); -lean_inc(x_159); -x_160 = lean_ctor_get(x_158, 1); -lean_inc(x_160); +x_157 = l_Lean_Elab_Tactic_tacticElabAttribute; +x_158 = lean_ctor_get(x_157, 2); +lean_inc(x_158); +x_159 = l_Lean_PersistentEnvExtension_getState___rarg(x_158, x_153); +lean_dec(x_153); lean_dec(x_158); -x_161 = l_Lean_Elab_Tactic_tacticElabAttribute; -x_162 = lean_ctor_get(x_161, 2); -lean_inc(x_162); -x_163 = l_Lean_PersistentEnvExtension_getState___rarg(x_162, x_157); -lean_dec(x_157); -lean_dec(x_162); -x_164 = lean_ctor_get(x_163, 1); -lean_inc(x_164); -lean_dec(x_163); -lean_inc(x_1); -x_165 = l_Lean_Syntax_getKind(x_1); -x_166 = l_Lean_SMap_find_x3f___at_Lean_Elab_Tactic_evalTactic___main___spec__2(x_164, x_165); -if (lean_obj_tag(x_166) == 0) -{ -lean_object* x_167; lean_object* x_168; lean_object* x_169; lean_object* x_170; lean_object* x_171; lean_object* x_172; lean_object* x_173; lean_object* x_174; lean_object* x_175; +x_160 = lean_ctor_get(x_159, 1); +lean_inc(x_160); lean_dec(x_159); -x_167 = lean_st_ref_get(x_9, x_160); -x_168 = lean_ctor_get(x_167, 0); +lean_inc(x_1); +x_161 = l_Lean_Syntax_getKind(x_1); +x_162 = l_Lean_SMap_find_x3f___at_Lean_Elab_Tactic_evalTactic___main___spec__2(x_160, x_161); +if (lean_obj_tag(x_162) == 0) +{ +lean_object* x_163; lean_object* x_164; lean_object* x_165; lean_object* x_166; lean_object* x_167; lean_object* x_168; lean_object* x_169; lean_object* x_170; lean_object* x_171; +lean_dec(x_155); +x_163 = lean_st_ref_get(x_9, x_156); +x_164 = lean_ctor_get(x_163, 0); +lean_inc(x_164); +x_165 = lean_ctor_get(x_163, 1); +lean_inc(x_165); +lean_dec(x_163); +x_166 = lean_ctor_get(x_164, 0); +lean_inc(x_166); +lean_dec(x_164); +x_167 = l_Lean_Elab_macroAttribute; +x_168 = lean_ctor_get(x_167, 2); lean_inc(x_168); -x_169 = lean_ctor_get(x_167, 1); -lean_inc(x_169); -lean_dec(x_167); -x_170 = lean_ctor_get(x_168, 0); -lean_inc(x_170); +x_169 = l_Lean_PersistentEnvExtension_getState___rarg(x_168, x_166); +lean_dec(x_166); lean_dec(x_168); -x_171 = l_Lean_Elab_macroAttribute; -x_172 = lean_ctor_get(x_171, 2); -lean_inc(x_172); -x_173 = l_Lean_PersistentEnvExtension_getState___rarg(x_172, x_170); -lean_dec(x_170); -lean_dec(x_172); -x_174 = lean_ctor_get(x_173, 1); +x_170 = lean_ctor_get(x_169, 1); +lean_inc(x_170); +lean_dec(x_169); +x_171 = l_Lean_SMap_find_x3f___at_Lean_Elab_getMacros___spec__1(x_170, x_161); +lean_dec(x_161); +if (lean_obj_tag(x_171) == 0) +{ +lean_object* x_172; lean_object* x_173; +x_172 = lean_box(0); +x_173 = l___private_Lean_Elab_Tactic_Basic_2__expandTacticMacroFns___main___at_Lean_Elab_Tactic_evalTactic___main___spec__8(x_1, x_172, x_2, x_3, x_148, x_5, x_6, x_7, x_22, x_9, x_165); +return x_173; +} +else +{ +lean_object* x_174; lean_object* x_175; +x_174 = lean_ctor_get(x_171, 0); lean_inc(x_174); -lean_dec(x_173); -x_175 = l_Lean_SMap_find_x3f___at_Lean_Elab_getMacros___spec__1(x_174, x_165); -lean_dec(x_165); -if (lean_obj_tag(x_175) == 0) +lean_dec(x_171); +x_175 = l___private_Lean_Elab_Tactic_Basic_2__expandTacticMacroFns___main___at_Lean_Elab_Tactic_evalTactic___main___spec__8(x_1, x_174, x_2, x_3, x_148, x_5, x_6, x_7, x_22, x_9, x_165); +return x_175; +} +} +else { lean_object* x_176; lean_object* x_177; -x_176 = lean_box(0); -x_177 = l___private_Lean_Elab_Tactic_Basic_2__expandTacticMacroFns___main___at_Lean_Elab_Tactic_evalTactic___main___spec__8(x_1, x_176, x_2, x_3, x_152, x_5, x_6, x_7, x_22, x_9, x_169); +lean_dec(x_161); +x_176 = lean_ctor_get(x_162, 0); +lean_inc(x_176); +lean_dec(x_162); +x_177 = l___private_Lean_Elab_Tactic_Basic_1__evalTacticUsing___main(x_155, x_1, x_176, x_2, x_3, x_148, x_5, x_6, x_7, x_22, x_9, x_156); return x_177; } -else -{ -lean_object* x_178; lean_object* x_179; -x_178 = lean_ctor_get(x_175, 0); -lean_inc(x_178); -lean_dec(x_175); -x_179 = l___private_Lean_Elab_Tactic_Basic_2__expandTacticMacroFns___main___at_Lean_Elab_Tactic_evalTactic___main___spec__8(x_1, x_178, x_2, x_3, x_152, x_5, x_6, x_7, x_22, x_9, x_169); -return x_179; -} -} -else -{ -lean_object* x_180; lean_object* x_181; -lean_dec(x_165); -x_180 = lean_ctor_get(x_166, 0); -lean_inc(x_180); -lean_dec(x_166); -x_181 = l___private_Lean_Elab_Tactic_Basic_1__evalTacticUsing___main(x_159, x_1, x_180, x_2, x_3, x_152, x_5, x_6, x_7, x_22, x_9, x_160); -return x_181; -} } } } else { -lean_object* x_198; lean_object* x_199; uint8_t x_200; +lean_object* x_192; lean_object* x_193; uint8_t x_194; lean_dec(x_18); lean_dec(x_14); lean_dec(x_13); lean_dec(x_12); lean_dec(x_1); -x_198 = l_Lean_withIncRecDepth___rarg___lambda__2___closed__2; -x_199 = l_Lean_throwError___at_Lean_Elab_Tactic_evalTactic___main___spec__1___rarg(x_198, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); +x_192 = l_Lean_withIncRecDepth___rarg___lambda__2___closed__2; +x_193 = l_Lean_throwError___at_Lean_Elab_Tactic_evalTactic___main___spec__1___rarg(x_192, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); @@ -5180,125 +5174,125 @@ lean_dec(x_6); lean_dec(x_5); lean_dec(x_3); lean_dec(x_2); -x_200 = !lean_is_exclusive(x_199); -if (x_200 == 0) +x_194 = !lean_is_exclusive(x_193); +if (x_194 == 0) { -return x_199; +return x_193; } else { -lean_object* x_201; lean_object* x_202; lean_object* x_203; -x_201 = lean_ctor_get(x_199, 0); -x_202 = lean_ctor_get(x_199, 1); -lean_inc(x_202); +lean_object* x_195; lean_object* x_196; lean_object* x_197; +x_195 = lean_ctor_get(x_193, 0); +x_196 = lean_ctor_get(x_193, 1); +lean_inc(x_196); +lean_inc(x_195); +lean_dec(x_193); +x_197 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_197, 0, x_195); +lean_ctor_set(x_197, 1, x_196); +return x_197; +} +} +} +else +{ +lean_object* x_198; lean_object* x_199; lean_object* x_200; lean_object* x_201; lean_object* x_202; lean_object* x_203; lean_object* x_204; lean_object* x_205; uint8_t x_206; +x_198 = lean_ctor_get(x_8, 0); +x_199 = lean_ctor_get(x_8, 1); +x_200 = lean_ctor_get(x_8, 2); +x_201 = lean_ctor_get(x_8, 3); lean_inc(x_201); -lean_dec(x_199); -x_203 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_203, 0, x_201); -lean_ctor_set(x_203, 1, x_202); -return x_203; -} -} -} -else -{ -lean_object* x_204; lean_object* x_205; lean_object* x_206; lean_object* x_207; lean_object* x_208; lean_object* x_209; lean_object* x_210; lean_object* x_211; uint8_t x_212; -x_204 = lean_ctor_get(x_8, 0); -x_205 = lean_ctor_get(x_8, 1); -x_206 = lean_ctor_get(x_8, 2); -x_207 = lean_ctor_get(x_8, 3); -lean_inc(x_207); -lean_inc(x_206); -lean_inc(x_205); -lean_inc(x_204); +lean_inc(x_200); +lean_inc(x_199); +lean_inc(x_198); lean_dec(x_8); -x_208 = l_Lean_replaceRef(x_1, x_207); -x_209 = l_Lean_replaceRef(x_208, x_207); -lean_dec(x_208); -x_210 = l_Lean_replaceRef(x_209, x_207); -lean_dec(x_207); -lean_dec(x_209); -lean_inc(x_210); -lean_inc(x_206); -lean_inc(x_205); +x_202 = l_Lean_replaceRef(x_1, x_201); +x_203 = l_Lean_replaceRef(x_202, x_201); +lean_dec(x_202); +x_204 = l_Lean_replaceRef(x_203, x_201); +lean_dec(x_201); +lean_dec(x_203); lean_inc(x_204); -x_211 = lean_alloc_ctor(0, 4, 0); -lean_ctor_set(x_211, 0, x_204); -lean_ctor_set(x_211, 1, x_205); -lean_ctor_set(x_211, 2, x_206); -lean_ctor_set(x_211, 3, x_210); -x_212 = lean_nat_dec_eq(x_205, x_206); -if (x_212 == 0) +lean_inc(x_200); +lean_inc(x_199); +lean_inc(x_198); +x_205 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_205, 0, x_198); +lean_ctor_set(x_205, 1, x_199); +lean_ctor_set(x_205, 2, x_200); +lean_ctor_set(x_205, 3, x_204); +x_206 = lean_nat_dec_eq(x_199, x_200); +if (x_206 == 0) { -lean_object* x_213; lean_object* x_214; lean_object* x_215; lean_object* x_216; lean_object* x_217; lean_object* x_218; lean_object* x_219; lean_object* x_220; lean_object* x_221; lean_object* x_222; lean_object* x_223; lean_object* x_224; lean_object* x_225; lean_object* x_226; lean_object* x_227; lean_object* x_228; lean_object* x_229; lean_object* x_230; lean_object* x_231; lean_object* x_232; lean_object* x_233; lean_object* x_234; lean_object* x_235; uint8_t x_236; uint8_t x_237; lean_object* x_238; lean_object* x_239; lean_object* x_240; -lean_dec(x_211); -x_213 = lean_unsigned_to_nat(1u); -x_214 = lean_nat_add(x_205, x_213); +lean_object* x_207; lean_object* x_208; lean_object* x_209; lean_object* x_210; lean_object* x_211; lean_object* x_212; lean_object* x_213; lean_object* x_214; lean_object* x_215; lean_object* x_216; lean_object* x_217; lean_object* x_218; lean_object* x_219; lean_object* x_220; lean_object* x_221; lean_object* x_222; lean_object* x_223; lean_object* x_224; lean_object* x_225; lean_object* x_226; lean_object* x_227; lean_object* x_228; lean_object* x_229; uint8_t x_230; uint8_t x_231; lean_object* x_232; lean_object* x_233; lean_object* x_234; lean_dec(x_205); -lean_inc(x_204); -x_215 = lean_alloc_ctor(0, 4, 0); -lean_ctor_set(x_215, 0, x_204); -lean_ctor_set(x_215, 1, x_214); -lean_ctor_set(x_215, 2, x_206); -lean_ctor_set(x_215, 3, x_210); -x_216 = lean_st_ref_take(x_5, x_10); -x_217 = lean_ctor_get(x_216, 0); +x_207 = lean_unsigned_to_nat(1u); +x_208 = lean_nat_add(x_199, x_207); +lean_dec(x_199); +lean_inc(x_198); +x_209 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_209, 0, x_198); +lean_ctor_set(x_209, 1, x_208); +lean_ctor_set(x_209, 2, x_200); +lean_ctor_set(x_209, 3, x_204); +x_210 = lean_st_ref_take(x_5, x_10); +x_211 = lean_ctor_get(x_210, 0); +lean_inc(x_211); +x_212 = lean_ctor_get(x_210, 1); +lean_inc(x_212); +lean_dec(x_210); +x_213 = lean_ctor_get(x_211, 0); +lean_inc(x_213); +x_214 = lean_ctor_get(x_211, 1); +lean_inc(x_214); +x_215 = lean_ctor_get(x_211, 2); +lean_inc(x_215); +x_216 = lean_ctor_get(x_211, 3); +lean_inc(x_216); +x_217 = lean_ctor_get(x_211, 4); lean_inc(x_217); -x_218 = lean_ctor_get(x_216, 1); -lean_inc(x_218); -lean_dec(x_216); -x_219 = lean_ctor_get(x_217, 0); -lean_inc(x_219); -x_220 = lean_ctor_get(x_217, 1); -lean_inc(x_220); -x_221 = lean_ctor_get(x_217, 2); -lean_inc(x_221); -x_222 = lean_ctor_get(x_217, 3); +if (lean_is_exclusive(x_211)) { + lean_ctor_release(x_211, 0); + lean_ctor_release(x_211, 1); + lean_ctor_release(x_211, 2); + lean_ctor_release(x_211, 3); + lean_ctor_release(x_211, 4); + x_218 = x_211; +} else { + lean_dec_ref(x_211); + x_218 = lean_box(0); +} +x_219 = lean_nat_add(x_216, x_207); +if (lean_is_scalar(x_218)) { + x_220 = lean_alloc_ctor(0, 5, 0); +} else { + x_220 = x_218; +} +lean_ctor_set(x_220, 0, x_213); +lean_ctor_set(x_220, 1, x_214); +lean_ctor_set(x_220, 2, x_215); +lean_ctor_set(x_220, 3, x_219); +lean_ctor_set(x_220, 4, x_217); +x_221 = lean_st_ref_set(x_5, x_220, x_212); +x_222 = lean_ctor_get(x_221, 1); lean_inc(x_222); -x_223 = lean_ctor_get(x_217, 4); +lean_dec(x_221); +x_223 = lean_ctor_get(x_4, 0); lean_inc(x_223); -if (lean_is_exclusive(x_217)) { - lean_ctor_release(x_217, 0); - lean_ctor_release(x_217, 1); - lean_ctor_release(x_217, 2); - lean_ctor_release(x_217, 3); - lean_ctor_release(x_217, 4); - x_224 = x_217; -} else { - lean_dec_ref(x_217); - x_224 = lean_box(0); -} -x_225 = lean_nat_add(x_222, x_213); -if (lean_is_scalar(x_224)) { - x_226 = lean_alloc_ctor(0, 5, 0); -} else { - x_226 = x_224; -} -lean_ctor_set(x_226, 0, x_219); -lean_ctor_set(x_226, 1, x_220); -lean_ctor_set(x_226, 2, x_221); -lean_ctor_set(x_226, 3, x_225); -lean_ctor_set(x_226, 4, x_223); -x_227 = lean_st_ref_set(x_5, x_226, x_218); -x_228 = lean_ctor_get(x_227, 1); +x_224 = lean_ctor_get(x_4, 1); +lean_inc(x_224); +x_225 = lean_ctor_get(x_4, 2); +lean_inc(x_225); +x_226 = lean_ctor_get(x_4, 3); +lean_inc(x_226); +x_227 = lean_ctor_get(x_4, 4); +lean_inc(x_227); +x_228 = lean_ctor_get(x_4, 5); lean_inc(x_228); -lean_dec(x_227); -x_229 = lean_ctor_get(x_4, 0); +x_229 = lean_ctor_get(x_4, 6); lean_inc(x_229); -x_230 = lean_ctor_get(x_4, 1); -lean_inc(x_230); -x_231 = lean_ctor_get(x_4, 2); -lean_inc(x_231); -x_232 = lean_ctor_get(x_4, 3); -lean_inc(x_232); -x_233 = lean_ctor_get(x_4, 4); -lean_inc(x_233); -x_234 = lean_ctor_get(x_4, 5); -lean_inc(x_234); -x_235 = lean_ctor_get(x_4, 6); -lean_inc(x_235); -x_236 = lean_ctor_get_uint8(x_4, sizeof(void*)*8); -x_237 = lean_ctor_get_uint8(x_4, sizeof(void*)*8 + 1); +x_230 = lean_ctor_get_uint8(x_4, sizeof(void*)*8); +x_231 = lean_ctor_get_uint8(x_4, sizeof(void*)*8 + 1); if (lean_is_exclusive(x_4)) { lean_ctor_release(x_4, 0); lean_ctor_release(x_4, 1); @@ -5308,209 +5302,207 @@ if (lean_is_exclusive(x_4)) { lean_ctor_release(x_4, 5); lean_ctor_release(x_4, 6); lean_ctor_release(x_4, 7); - x_238 = x_4; + x_232 = x_4; } else { lean_dec_ref(x_4); - x_238 = lean_box(0); + x_232 = lean_box(0); } -if (lean_is_scalar(x_238)) { - x_239 = lean_alloc_ctor(0, 8, 2); +if (lean_is_scalar(x_232)) { + x_233 = lean_alloc_ctor(0, 8, 2); } else { - x_239 = x_238; + x_233 = x_232; } -lean_ctor_set(x_239, 0, x_229); -lean_ctor_set(x_239, 1, x_230); -lean_ctor_set(x_239, 2, x_231); -lean_ctor_set(x_239, 3, x_232); -lean_ctor_set(x_239, 4, x_233); -lean_ctor_set(x_239, 5, x_234); -lean_ctor_set(x_239, 6, x_235); -lean_ctor_set(x_239, 7, x_222); -lean_ctor_set_uint8(x_239, sizeof(void*)*8, x_236); -lean_ctor_set_uint8(x_239, sizeof(void*)*8 + 1, x_237); +lean_ctor_set(x_233, 0, x_223); +lean_ctor_set(x_233, 1, x_224); +lean_ctor_set(x_233, 2, x_225); +lean_ctor_set(x_233, 3, x_226); +lean_ctor_set(x_233, 4, x_227); +lean_ctor_set(x_233, 5, x_228); +lean_ctor_set(x_233, 6, x_229); +lean_ctor_set(x_233, 7, x_216); +lean_ctor_set_uint8(x_233, sizeof(void*)*8, x_230); +lean_ctor_set_uint8(x_233, sizeof(void*)*8 + 1, x_231); if (lean_obj_tag(x_1) == 1) { -lean_object* x_270; lean_object* x_271; uint8_t x_272; -x_270 = lean_ctor_get(x_1, 0); -lean_inc(x_270); -x_271 = l_Lean_nullKind; -x_272 = lean_name_eq(x_270, x_271); +lean_object* x_264; lean_object* x_265; uint8_t x_266; +x_264 = lean_ctor_get(x_1, 0); +lean_inc(x_264); +x_265 = l_Lean_nullKind; +x_266 = lean_name_eq(x_264, x_265); +lean_dec(x_264); +if (x_266 == 0) +{ +lean_object* x_267; uint8_t x_268; +x_267 = l___private_Lean_Elab_Util_4__regTraceClasses___closed__3; +x_268 = l_Lean_checkTraceOption(x_198, x_267); +lean_dec(x_198); +if (x_268 == 0) +{ +x_234 = x_222; +goto block_263; +} +else +{ +lean_object* x_269; lean_object* x_270; lean_object* x_271; +lean_inc(x_1); +x_269 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_269, 0, x_1); +x_270 = l_Lean_Elab_logTrace___at_Lean_Elab_Tactic_evalTactic___main___spec__10(x_267, x_269, x_2, x_3, x_233, x_5, x_6, x_7, x_209, x_9, x_222); +x_271 = lean_ctor_get(x_270, 1); +lean_inc(x_271); lean_dec(x_270); -if (x_272 == 0) -{ -lean_object* x_273; uint8_t x_274; -x_273 = l___private_Lean_Elab_Util_4__regTraceClasses___closed__3; -x_274 = l_Lean_checkTraceOption(x_204, x_273); -lean_dec(x_204); -if (x_274 == 0) -{ -x_240 = x_228; -goto block_269; -} -else -{ -lean_object* x_275; lean_object* x_276; lean_object* x_277; -lean_inc(x_1); -x_275 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_275, 0, x_1); -x_276 = l_Lean_Elab_logTrace___at_Lean_Elab_Tactic_evalTactic___main___spec__10(x_273, x_275, x_2, x_3, x_239, x_5, x_6, x_7, x_215, x_9, x_228); -x_277 = lean_ctor_get(x_276, 1); -lean_inc(x_277); -lean_dec(x_276); -x_240 = x_277; -goto block_269; +x_234 = x_271; +goto block_263; } } else { -lean_object* x_278; lean_object* x_279; lean_object* x_280; lean_object* x_281; lean_object* x_282; -lean_dec(x_204); -x_278 = l_Lean_Syntax_getArgs(x_1); +lean_object* x_272; lean_object* x_273; lean_object* x_274; +lean_dec(x_198); +x_272 = l_Lean_Syntax_getArgs(x_1); lean_dec(x_1); -x_279 = lean_unsigned_to_nat(2u); -x_280 = lean_unsigned_to_nat(0u); -x_281 = lean_box(0); -x_282 = l_Array_foldlStepMAux___main___at_Lean_Elab_Tactic_evalTactic___main___spec__13(x_279, x_278, x_280, x_281, x_2, x_3, x_239, x_5, x_6, x_7, x_215, x_9, x_228); -lean_dec(x_278); -return x_282; +x_273 = lean_unsigned_to_nat(0u); +x_274 = l_Array_forMAux___main___at_Lean_Elab_Tactic_evalTactic___main___spec__13(x_272, x_273, x_2, x_3, x_233, x_5, x_6, x_7, x_209, x_9, x_222); +lean_dec(x_272); +return x_274; } } else { -lean_object* x_283; lean_object* x_284; -lean_dec(x_204); +lean_object* x_275; lean_object* x_276; +lean_dec(x_198); lean_dec(x_1); -x_283 = l_Lean_Elab_Tactic_evalTactic___main___closed__3; -x_284 = l_Lean_throwError___at_Lean_Elab_Tactic_evalTactic___main___spec__1___rarg(x_283, x_2, x_3, x_239, x_5, x_6, x_7, x_215, x_9, x_228); +x_275 = l_Lean_Elab_Tactic_evalTactic___main___closed__3; +x_276 = l_Lean_throwError___at_Lean_Elab_Tactic_evalTactic___main___spec__1___rarg(x_275, x_2, x_3, x_233, x_5, x_6, x_7, x_209, x_9, x_222); lean_dec(x_9); -lean_dec(x_215); +lean_dec(x_209); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_3); lean_dec(x_2); -return x_284; +return x_276; } -block_269: +block_263: { -lean_object* x_241; lean_object* x_242; lean_object* x_243; lean_object* x_244; lean_object* x_245; lean_object* x_246; lean_object* x_247; lean_object* x_248; lean_object* x_249; lean_object* x_250; lean_object* x_251; lean_object* x_252; lean_object* x_253; -x_241 = lean_st_ref_get(x_9, x_240); -x_242 = lean_ctor_get(x_241, 0); -lean_inc(x_242); -x_243 = lean_ctor_get(x_241, 1); +lean_object* x_235; lean_object* x_236; lean_object* x_237; lean_object* x_238; lean_object* x_239; lean_object* x_240; lean_object* x_241; lean_object* x_242; lean_object* x_243; lean_object* x_244; lean_object* x_245; lean_object* x_246; lean_object* x_247; +x_235 = lean_st_ref_get(x_9, x_234); +x_236 = lean_ctor_get(x_235, 0); +lean_inc(x_236); +x_237 = lean_ctor_get(x_235, 1); +lean_inc(x_237); +lean_dec(x_235); +x_238 = lean_ctor_get(x_236, 0); +lean_inc(x_238); +lean_dec(x_236); +x_239 = l_Lean_Elab_Tactic_saveAllState___rarg(x_3, x_233, x_5, x_6, x_7, x_209, x_9, x_237); +x_240 = lean_ctor_get(x_239, 0); +lean_inc(x_240); +x_241 = lean_ctor_get(x_239, 1); +lean_inc(x_241); +lean_dec(x_239); +x_242 = l_Lean_Elab_Tactic_tacticElabAttribute; +x_243 = lean_ctor_get(x_242, 2); lean_inc(x_243); -lean_dec(x_241); -x_244 = lean_ctor_get(x_242, 0); -lean_inc(x_244); -lean_dec(x_242); -x_245 = l_Lean_Elab_Tactic_saveAllState___rarg(x_3, x_239, x_5, x_6, x_7, x_215, x_9, x_243); -x_246 = lean_ctor_get(x_245, 0); -lean_inc(x_246); -x_247 = lean_ctor_get(x_245, 1); -lean_inc(x_247); -lean_dec(x_245); -x_248 = l_Lean_Elab_Tactic_tacticElabAttribute; -x_249 = lean_ctor_get(x_248, 2); -lean_inc(x_249); -x_250 = l_Lean_PersistentEnvExtension_getState___rarg(x_249, x_244); +x_244 = l_Lean_PersistentEnvExtension_getState___rarg(x_243, x_238); +lean_dec(x_238); +lean_dec(x_243); +x_245 = lean_ctor_get(x_244, 1); +lean_inc(x_245); lean_dec(x_244); -lean_dec(x_249); -x_251 = lean_ctor_get(x_250, 1); -lean_inc(x_251); -lean_dec(x_250); lean_inc(x_1); -x_252 = l_Lean_Syntax_getKind(x_1); -x_253 = l_Lean_SMap_find_x3f___at_Lean_Elab_Tactic_evalTactic___main___spec__2(x_251, x_252); -if (lean_obj_tag(x_253) == 0) +x_246 = l_Lean_Syntax_getKind(x_1); +x_247 = l_Lean_SMap_find_x3f___at_Lean_Elab_Tactic_evalTactic___main___spec__2(x_245, x_246); +if (lean_obj_tag(x_247) == 0) { -lean_object* x_254; lean_object* x_255; lean_object* x_256; lean_object* x_257; lean_object* x_258; lean_object* x_259; lean_object* x_260; lean_object* x_261; lean_object* x_262; -lean_dec(x_246); -x_254 = lean_st_ref_get(x_9, x_247); -x_255 = lean_ctor_get(x_254, 0); -lean_inc(x_255); -x_256 = lean_ctor_get(x_254, 1); -lean_inc(x_256); -lean_dec(x_254); -x_257 = lean_ctor_get(x_255, 0); -lean_inc(x_257); -lean_dec(x_255); -x_258 = l_Lean_Elab_macroAttribute; -x_259 = lean_ctor_get(x_258, 2); -lean_inc(x_259); -x_260 = l_Lean_PersistentEnvExtension_getState___rarg(x_259, x_257); -lean_dec(x_257); -lean_dec(x_259); -x_261 = lean_ctor_get(x_260, 1); -lean_inc(x_261); -lean_dec(x_260); -x_262 = l_Lean_SMap_find_x3f___at_Lean_Elab_getMacros___spec__1(x_261, x_252); -lean_dec(x_252); -if (lean_obj_tag(x_262) == 0) -{ -lean_object* x_263; lean_object* x_264; -x_263 = lean_box(0); -x_264 = l___private_Lean_Elab_Tactic_Basic_2__expandTacticMacroFns___main___at_Lean_Elab_Tactic_evalTactic___main___spec__8(x_1, x_263, x_2, x_3, x_239, x_5, x_6, x_7, x_215, x_9, x_256); -return x_264; -} -else -{ -lean_object* x_265; lean_object* x_266; -x_265 = lean_ctor_get(x_262, 0); -lean_inc(x_265); -lean_dec(x_262); -x_266 = l___private_Lean_Elab_Tactic_Basic_2__expandTacticMacroFns___main___at_Lean_Elab_Tactic_evalTactic___main___spec__8(x_1, x_265, x_2, x_3, x_239, x_5, x_6, x_7, x_215, x_9, x_256); -return x_266; -} -} -else -{ -lean_object* x_267; lean_object* x_268; -lean_dec(x_252); -x_267 = lean_ctor_get(x_253, 0); -lean_inc(x_267); +lean_object* x_248; lean_object* x_249; lean_object* x_250; lean_object* x_251; lean_object* x_252; lean_object* x_253; lean_object* x_254; lean_object* x_255; lean_object* x_256; +lean_dec(x_240); +x_248 = lean_st_ref_get(x_9, x_241); +x_249 = lean_ctor_get(x_248, 0); +lean_inc(x_249); +x_250 = lean_ctor_get(x_248, 1); +lean_inc(x_250); +lean_dec(x_248); +x_251 = lean_ctor_get(x_249, 0); +lean_inc(x_251); +lean_dec(x_249); +x_252 = l_Lean_Elab_macroAttribute; +x_253 = lean_ctor_get(x_252, 2); +lean_inc(x_253); +x_254 = l_Lean_PersistentEnvExtension_getState___rarg(x_253, x_251); +lean_dec(x_251); lean_dec(x_253); -x_268 = l___private_Lean_Elab_Tactic_Basic_1__evalTacticUsing___main(x_246, x_1, x_267, x_2, x_3, x_239, x_5, x_6, x_7, x_215, x_9, x_247); -return x_268; +x_255 = lean_ctor_get(x_254, 1); +lean_inc(x_255); +lean_dec(x_254); +x_256 = l_Lean_SMap_find_x3f___at_Lean_Elab_getMacros___spec__1(x_255, x_246); +lean_dec(x_246); +if (lean_obj_tag(x_256) == 0) +{ +lean_object* x_257; lean_object* x_258; +x_257 = lean_box(0); +x_258 = l___private_Lean_Elab_Tactic_Basic_2__expandTacticMacroFns___main___at_Lean_Elab_Tactic_evalTactic___main___spec__8(x_1, x_257, x_2, x_3, x_233, x_5, x_6, x_7, x_209, x_9, x_250); +return x_258; +} +else +{ +lean_object* x_259; lean_object* x_260; +x_259 = lean_ctor_get(x_256, 0); +lean_inc(x_259); +lean_dec(x_256); +x_260 = l___private_Lean_Elab_Tactic_Basic_2__expandTacticMacroFns___main___at_Lean_Elab_Tactic_evalTactic___main___spec__8(x_1, x_259, x_2, x_3, x_233, x_5, x_6, x_7, x_209, x_9, x_250); +return x_260; +} +} +else +{ +lean_object* x_261; lean_object* x_262; +lean_dec(x_246); +x_261 = lean_ctor_get(x_247, 0); +lean_inc(x_261); +lean_dec(x_247); +x_262 = l___private_Lean_Elab_Tactic_Basic_1__evalTacticUsing___main(x_240, x_1, x_261, x_2, x_3, x_233, x_5, x_6, x_7, x_209, x_9, x_241); +return x_262; } } } else { -lean_object* x_285; lean_object* x_286; lean_object* x_287; lean_object* x_288; lean_object* x_289; lean_object* x_290; -lean_dec(x_210); -lean_dec(x_206); -lean_dec(x_205); +lean_object* x_277; lean_object* x_278; lean_object* x_279; lean_object* x_280; lean_object* x_281; lean_object* x_282; lean_dec(x_204); +lean_dec(x_200); +lean_dec(x_199); +lean_dec(x_198); lean_dec(x_1); -x_285 = l_Lean_withIncRecDepth___rarg___lambda__2___closed__2; -x_286 = l_Lean_throwError___at_Lean_Elab_Tactic_evalTactic___main___spec__1___rarg(x_285, x_2, x_3, x_4, x_5, x_6, x_7, x_211, x_9, x_10); +x_277 = l_Lean_withIncRecDepth___rarg___lambda__2___closed__2; +x_278 = l_Lean_throwError___at_Lean_Elab_Tactic_evalTactic___main___spec__1___rarg(x_277, x_2, x_3, x_4, x_5, x_6, x_7, x_205, x_9, x_10); lean_dec(x_9); -lean_dec(x_211); +lean_dec(x_205); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_3); lean_dec(x_2); -x_287 = lean_ctor_get(x_286, 0); -lean_inc(x_287); -x_288 = lean_ctor_get(x_286, 1); -lean_inc(x_288); -if (lean_is_exclusive(x_286)) { - lean_ctor_release(x_286, 0); - lean_ctor_release(x_286, 1); - x_289 = x_286; +x_279 = lean_ctor_get(x_278, 0); +lean_inc(x_279); +x_280 = lean_ctor_get(x_278, 1); +lean_inc(x_280); +if (lean_is_exclusive(x_278)) { + lean_ctor_release(x_278, 0); + lean_ctor_release(x_278, 1); + x_281 = x_278; } else { - lean_dec_ref(x_286); - x_289 = lean_box(0); + lean_dec_ref(x_278); + x_281 = lean_box(0); } -if (lean_is_scalar(x_289)) { - x_290 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_281)) { + x_282 = lean_alloc_ctor(1, 2, 0); } else { - x_290 = x_289; + x_282 = x_281; } -lean_ctor_set(x_290, 0, x_287); -lean_ctor_set(x_290, 1, x_288); -return x_290; +lean_ctor_set(x_282, 0, x_279); +lean_ctor_set(x_282, 1, x_280); +return x_282; } } } @@ -5659,14 +5651,13 @@ lean_dec(x_3); return x_12; } } -lean_object* l_Array_foldlStepMAux___main___at_Lean_Elab_Tactic_evalTactic___main___spec__13___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, 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* l_Array_forMAux___main___at_Lean_Elab_Tactic_evalTactic___main___spec__13___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, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) { _start: { -lean_object* x_14; -x_14 = l_Array_foldlStepMAux___main___at_Lean_Elab_Tactic_evalTactic___main___spec__13(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12, x_13); -lean_dec(x_2); +lean_object* x_12; +x_12 = l_Array_forMAux___main___at_Lean_Elab_Tactic_evalTactic___main___spec__13(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11); lean_dec(x_1); -return x_14; +return x_12; } } lean_object* l_Lean_Elab_Tactic_evalTactic(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { @@ -8538,6 +8529,93 @@ lean_dec(x_4); return x_13; } } +lean_object* l_Array_foldlStepMAux___main___at_Lean_Elab_Tactic_evalSeq___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13) { +_start: +{ +lean_object* x_14; uint8_t x_15; +x_14 = lean_array_get_size(x_2); +x_15 = lean_nat_dec_lt(x_3, x_14); +lean_dec(x_14); +if (x_15 == 0) +{ +lean_object* x_16; +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_3); +x_16 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_16, 0, x_4); +lean_ctor_set(x_16, 1, x_13); +return x_16; +} +else +{ +lean_object* x_17; lean_object* x_18; +lean_dec(x_4); +x_17 = lean_array_fget(x_2, x_3); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +x_18 = l_Lean_Elab_Tactic_evalTactic___main(x_17, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12, x_13); +if (lean_obj_tag(x_18) == 0) +{ +lean_object* x_19; lean_object* x_20; lean_object* x_21; +x_19 = lean_ctor_get(x_18, 0); +lean_inc(x_19); +x_20 = lean_ctor_get(x_18, 1); +lean_inc(x_20); +lean_dec(x_18); +x_21 = lean_nat_add(x_3, x_1); +lean_dec(x_3); +x_3 = x_21; +x_4 = x_19; +x_13 = x_20; +goto _start; +} +else +{ +uint8_t x_23; +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_3); +x_23 = !lean_is_exclusive(x_18); +if (x_23 == 0) +{ +return x_18; +} +else +{ +lean_object* x_24; lean_object* x_25; lean_object* x_26; +x_24 = lean_ctor_get(x_18, 0); +x_25 = lean_ctor_get(x_18, 1); +lean_inc(x_25); +lean_inc(x_24); +lean_dec(x_18); +x_26 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_26, 0, x_24); +lean_ctor_set(x_26, 1, x_25); +return x_26; +} +} +} +} +} lean_object* l_Lean_Elab_Tactic_evalSeq(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { _start: { @@ -8548,11 +8626,21 @@ x_13 = l_Lean_Syntax_getArgs(x_12); lean_dec(x_12); x_14 = lean_unsigned_to_nat(2u); x_15 = lean_box(0); -x_16 = l_Array_foldlStepMAux___main___at_Lean_Elab_Tactic_evalTactic___main___spec__13(x_14, x_13, x_11, x_15, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); +x_16 = l_Array_foldlStepMAux___main___at_Lean_Elab_Tactic_evalSeq___spec__1(x_14, x_13, x_11, x_15, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); lean_dec(x_13); return x_16; } } +lean_object* l_Array_foldlStepMAux___main___at_Lean_Elab_Tactic_evalSeq___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13) { +_start: +{ +lean_object* x_14; +x_14 = l_Array_foldlStepMAux___main___at_Lean_Elab_Tactic_evalSeq___spec__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12, x_13); +lean_dec(x_2); +lean_dec(x_1); +return x_14; +} +} lean_object* l_Lean_Elab_Tactic_evalSeq___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, lean_object* x_8, lean_object* x_9, lean_object* x_10) { _start: { diff --git a/stage0/stdlib/Lean/Elab/Tactic/Match.c b/stage0/stdlib/Lean/Elab/Tactic/Match.c index 4a4e9d4200..029a2358b4 100644 --- a/stage0/stdlib/Lean/Elab/Tactic/Match.c +++ b/stage0/stdlib/Lean/Elab/Tactic/Match.c @@ -18,7 +18,6 @@ lean_object* l___regBuiltin_Lean_Elab_Tactic_evalMatch(lean_object*); lean_object* l_Lean_Elab_Tactic_getMainTag(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l___private_Lean_Elab_Quotation_8__letBindRhss___main___closed__3; lean_object* l_Lean_Elab_Tactic_evalMatch___closed__2; -lean_object* l_Lean_Elab_Tactic_mkTacticSeq___boxed(lean_object*, lean_object*); extern lean_object* l_Lean_nullKind; lean_object* l___private_Lean_Elab_Tactic_Match_1__mkAuxiliaryMatchTermAux___lambda__1___closed__4; extern lean_object* l_Lean_Elab_throwUnsupportedSyntax___rarg___closed__1; @@ -34,7 +33,6 @@ extern lean_object* l_Lean_Elab_Tactic_evalCase___closed__5; lean_object* lean_array_push(lean_object*, lean_object*); lean_object* lean_array_get_size(lean_object*); lean_object* l_Array_mapSepElemsM___at___private_Lean_Elab_Tactic_Match_1__mkAuxiliaryMatchTermAux___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Tactic_mkTacticSeq(lean_object*, lean_object*); lean_object* l_Lean_Elab_Tactic_getCurrMacroScope___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_KeyedDeclsAttribute_addBuiltin___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_nat_add(lean_object*, lean_object*); @@ -53,14 +51,11 @@ lean_object* l_Lean_Elab_Term_getCurrMacroScope(lean_object*, lean_object*, lean extern lean_object* l_Lean_Elab_Tactic_evalRefine___closed__3; lean_object* l_Lean_Elab_Tactic_getMainModule___rarg(lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Tactic_Match_1__mkAuxiliaryMatchTermAux(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -extern lean_object* l_Lean_Parser_Error_toString___closed__2; lean_object* l___regBuiltin_Lean_Elab_Tactic_evalMatch___closed__1; lean_object* l_Array_iterateMAux___main___at_Array_append___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_FirstTokens_toStr___closed__3; extern lean_object* l_Lean_Elab_Tactic_tacticElabAttribute; lean_object* l_Lean_addMacroScope(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_mkSepStx(lean_object*, lean_object*); -lean_object* l_Lean_mkAtomFrom(lean_object*, lean_object*); extern lean_object* l_Lean_Elab_Tactic_evalRefine___closed__1; lean_object* l_Lean_Syntax_setArg(lean_object*, lean_object*, lean_object*); lean_object* lean_environment_main_module(lean_object*); @@ -683,26 +678,6 @@ return x_26; } } } -lean_object* l_Lean_Elab_Tactic_mkTacticSeq(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; lean_object* x_4; lean_object* x_5; -x_3 = l_Lean_Parser_Error_toString___closed__2; -x_4 = l_Lean_mkAtomFrom(x_1, x_3); -x_5 = l_Lean_mkSepStx(x_2, x_4); -return x_5; -} -} -lean_object* l_Lean_Elab_Tactic_mkTacticSeq___boxed(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = l_Lean_Elab_Tactic_mkTacticSeq(x_1, x_2); -lean_dec(x_2); -lean_dec(x_1); -return x_3; -} -} lean_object* l_Lean_Elab_throwUnsupportedSyntax___at_Lean_Elab_Tactic_evalMatch___spec__1___rarg(lean_object* x_1) { _start: { @@ -747,192 +722,192 @@ return x_3; lean_object* l_Lean_Elab_Tactic_evalMatch(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { _start: { -lean_object* x_11; lean_object* x_12; lean_object* x_48; +lean_object* x_11; lean_object* x_12; lean_object* x_49; lean_inc(x_4); -x_48 = l_Lean_Elab_Tactic_getMainTag(x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); -if (lean_obj_tag(x_48) == 0) +x_49 = l_Lean_Elab_Tactic_getMainTag(x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); +if (lean_obj_tag(x_49) == 0) { -lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; -x_49 = lean_ctor_get(x_48, 0); -lean_inc(x_49); -x_50 = lean_ctor_get(x_48, 1); +lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; +x_50 = lean_ctor_get(x_49, 0); lean_inc(x_50); -lean_dec(x_48); -x_51 = l_Lean_Elab_Term_getCurrMacroScope(x_4, x_5, x_6, x_7, x_8, x_9, x_50); -x_52 = lean_ctor_get(x_51, 0); -lean_inc(x_52); -x_53 = lean_ctor_get(x_51, 1); +x_51 = lean_ctor_get(x_49, 1); +lean_inc(x_51); +lean_dec(x_49); +x_52 = l_Lean_Elab_Term_getCurrMacroScope(x_4, x_5, x_6, x_7, x_8, x_9, x_51); +x_53 = lean_ctor_get(x_52, 0); lean_inc(x_53); -lean_dec(x_51); -x_54 = lean_st_ref_get(x_9, x_53); -x_55 = lean_ctor_get(x_54, 0); -lean_inc(x_55); -x_56 = lean_ctor_get(x_54, 1); +x_54 = lean_ctor_get(x_52, 1); +lean_inc(x_54); +lean_dec(x_52); +x_55 = lean_st_ref_get(x_9, x_54); +x_56 = lean_ctor_get(x_55, 0); lean_inc(x_56); -lean_dec(x_54); -x_57 = lean_ctor_get(x_55, 0); +x_57 = lean_ctor_get(x_55, 1); lean_inc(x_57); lean_dec(x_55); -x_58 = lean_st_ref_get(x_5, x_56); -x_59 = lean_ctor_get(x_58, 0); -lean_inc(x_59); -x_60 = lean_ctor_get(x_58, 1); +x_58 = lean_ctor_get(x_56, 0); +lean_inc(x_58); +lean_dec(x_56); +x_59 = lean_st_ref_get(x_5, x_57); +x_60 = lean_ctor_get(x_59, 0); lean_inc(x_60); -lean_dec(x_58); -x_61 = lean_ctor_get(x_59, 3); +x_61 = lean_ctor_get(x_59, 1); lean_inc(x_61); lean_dec(x_59); -x_62 = lean_ctor_get(x_8, 1); +x_62 = lean_ctor_get(x_60, 3); lean_inc(x_62); -x_63 = lean_ctor_get(x_8, 2); +lean_dec(x_60); +x_63 = lean_ctor_get(x_8, 1); lean_inc(x_63); -x_64 = lean_environment_main_module(x_57); -x_65 = lean_alloc_ctor(0, 4, 0); -lean_ctor_set(x_65, 0, x_64); -lean_ctor_set(x_65, 1, x_52); -lean_ctor_set(x_65, 2, x_62); -lean_ctor_set(x_65, 3, x_63); +x_64 = lean_ctor_get(x_8, 2); +lean_inc(x_64); +x_65 = lean_environment_main_module(x_58); +x_66 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_66, 0, x_65); +lean_ctor_set(x_66, 1, x_53); +lean_ctor_set(x_66, 2, x_63); +lean_ctor_set(x_66, 3, x_64); lean_inc(x_1); -x_66 = l___private_Lean_Elab_Tactic_Match_2__mkAuxiliaryMatchTerm(x_49, x_1, x_65, x_61); -if (lean_obj_tag(x_66) == 0) +x_67 = l___private_Lean_Elab_Tactic_Match_2__mkAuxiliaryMatchTerm(x_50, x_1, x_66, x_62); +if (lean_obj_tag(x_67) == 0) { -lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; uint8_t x_72; -x_67 = lean_ctor_get(x_66, 0); -lean_inc(x_67); -x_68 = lean_ctor_get(x_66, 1); +lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; uint8_t x_73; +x_68 = lean_ctor_get(x_67, 0); lean_inc(x_68); -lean_dec(x_66); -x_69 = lean_st_ref_take(x_5, x_60); -x_70 = lean_ctor_get(x_69, 0); -lean_inc(x_70); -x_71 = lean_ctor_get(x_69, 1); +x_69 = lean_ctor_get(x_67, 1); +lean_inc(x_69); +lean_dec(x_67); +x_70 = lean_st_ref_take(x_5, x_61); +x_71 = lean_ctor_get(x_70, 0); lean_inc(x_71); -lean_dec(x_69); -x_72 = !lean_is_exclusive(x_70); -if (x_72 == 0) +x_72 = lean_ctor_get(x_70, 1); +lean_inc(x_72); +lean_dec(x_70); +x_73 = !lean_is_exclusive(x_71); +if (x_73 == 0) { -lean_object* x_73; lean_object* x_74; lean_object* x_75; -x_73 = lean_ctor_get(x_70, 3); -lean_dec(x_73); -lean_ctor_set(x_70, 3, x_68); -x_74 = lean_st_ref_set(x_5, x_70, x_71); -x_75 = lean_ctor_get(x_74, 1); -lean_inc(x_75); +lean_object* x_74; lean_object* x_75; lean_object* x_76; +x_74 = lean_ctor_get(x_71, 3); lean_dec(x_74); -x_11 = x_67; -x_12 = x_75; -goto block_47; +lean_ctor_set(x_71, 3, x_69); +x_75 = lean_st_ref_set(x_5, x_71, x_72); +x_76 = lean_ctor_get(x_75, 1); +lean_inc(x_76); +lean_dec(x_75); +x_11 = x_68; +x_12 = x_76; +goto block_48; } else { -lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; -x_76 = lean_ctor_get(x_70, 0); -x_77 = lean_ctor_get(x_70, 1); -x_78 = lean_ctor_get(x_70, 2); -x_79 = lean_ctor_get(x_70, 4); +lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; +x_77 = lean_ctor_get(x_71, 0); +x_78 = lean_ctor_get(x_71, 1); +x_79 = lean_ctor_get(x_71, 2); +x_80 = lean_ctor_get(x_71, 4); +lean_inc(x_80); lean_inc(x_79); lean_inc(x_78); lean_inc(x_77); -lean_inc(x_76); -lean_dec(x_70); -x_80 = lean_alloc_ctor(0, 5, 0); -lean_ctor_set(x_80, 0, x_76); -lean_ctor_set(x_80, 1, x_77); -lean_ctor_set(x_80, 2, x_78); -lean_ctor_set(x_80, 3, x_68); -lean_ctor_set(x_80, 4, x_79); -x_81 = lean_st_ref_set(x_5, x_80, x_71); -x_82 = lean_ctor_get(x_81, 1); -lean_inc(x_82); -lean_dec(x_81); -x_11 = x_67; -x_12 = x_82; -goto block_47; -} -} -else -{ -lean_object* x_83; -lean_dec(x_1); -x_83 = lean_ctor_get(x_66, 0); +lean_dec(x_71); +x_81 = lean_alloc_ctor(0, 5, 0); +lean_ctor_set(x_81, 0, x_77); +lean_ctor_set(x_81, 1, x_78); +lean_ctor_set(x_81, 2, x_79); +lean_ctor_set(x_81, 3, x_69); +lean_ctor_set(x_81, 4, x_80); +x_82 = lean_st_ref_set(x_5, x_81, x_72); +x_83 = lean_ctor_get(x_82, 1); lean_inc(x_83); -lean_dec(x_66); -if (lean_obj_tag(x_83) == 0) +lean_dec(x_82); +x_11 = x_68; +x_12 = x_83; +goto block_48; +} +} +else { -lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; uint8_t x_89; -x_84 = lean_ctor_get(x_83, 0); +lean_object* x_84; +lean_dec(x_1); +x_84 = lean_ctor_get(x_67, 0); lean_inc(x_84); -x_85 = lean_ctor_get(x_83, 1); +lean_dec(x_67); +if (lean_obj_tag(x_84) == 0) +{ +lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; uint8_t x_90; +x_85 = lean_ctor_get(x_84, 0); lean_inc(x_85); -lean_dec(x_83); -x_86 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_86, 0, x_85); -x_87 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_87, 0, x_86); -x_88 = l_Lean_throwErrorAt___at___private_Lean_Elab_Tactic_Basic_1__evalTacticUsing___main___spec__1___rarg(x_84, x_87, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_60); -lean_dec(x_9); -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_3); -lean_dec(x_2); +x_86 = lean_ctor_get(x_84, 1); +lean_inc(x_86); lean_dec(x_84); -x_89 = !lean_is_exclusive(x_88); -if (x_89 == 0) -{ -return x_88; -} -else -{ -lean_object* x_90; lean_object* x_91; lean_object* x_92; -x_90 = lean_ctor_get(x_88, 0); -x_91 = lean_ctor_get(x_88, 1); -lean_inc(x_91); -lean_inc(x_90); -lean_dec(x_88); -x_92 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_92, 0, x_90); -lean_ctor_set(x_92, 1, x_91); -return x_92; -} -} -else -{ -lean_object* x_93; uint8_t x_94; +x_87 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_87, 0, x_86); +x_88 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_88, 0, x_87); +x_89 = l_Lean_throwErrorAt___at___private_Lean_Elab_Tactic_Basic_1__evalTacticUsing___main___spec__1___rarg(x_85, x_88, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_61); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); -lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); -x_93 = l_Lean_Elab_throwUnsupportedSyntax___at_Lean_Elab_Tactic_evalMatch___spec__1___rarg(x_60); -x_94 = !lean_is_exclusive(x_93); -if (x_94 == 0) +lean_dec(x_85); +x_90 = !lean_is_exclusive(x_89); +if (x_90 == 0) { +return x_89; +} +else +{ +lean_object* x_91; lean_object* x_92; lean_object* x_93; +x_91 = lean_ctor_get(x_89, 0); +x_92 = lean_ctor_get(x_89, 1); +lean_inc(x_92); +lean_inc(x_91); +lean_dec(x_89); +x_93 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_93, 0, x_91); +lean_ctor_set(x_93, 1, x_92); return x_93; } +} else { -lean_object* x_95; lean_object* x_96; lean_object* x_97; -x_95 = lean_ctor_get(x_93, 0); -x_96 = lean_ctor_get(x_93, 1); +lean_object* x_94; uint8_t x_95; +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_94 = l_Lean_Elab_throwUnsupportedSyntax___at_Lean_Elab_Tactic_evalMatch___spec__1___rarg(x_61); +x_95 = !lean_is_exclusive(x_94); +if (x_95 == 0) +{ +return x_94; +} +else +{ +lean_object* x_96; lean_object* x_97; lean_object* x_98; +x_96 = lean_ctor_get(x_94, 0); +x_97 = lean_ctor_get(x_94, 1); +lean_inc(x_97); lean_inc(x_96); -lean_inc(x_95); -lean_dec(x_93); -x_97 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_97, 0, x_95); -lean_ctor_set(x_97, 1, x_96); -return x_97; +lean_dec(x_94); +x_98 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_98, 0, x_96); +lean_ctor_set(x_98, 1, x_97); +return x_98; } } } } else { -uint8_t x_98; +uint8_t x_99; lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); @@ -942,28 +917,28 @@ lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); -x_98 = !lean_is_exclusive(x_48); -if (x_98 == 0) +x_99 = !lean_is_exclusive(x_49); +if (x_99 == 0) { -return x_48; +return x_49; } else { -lean_object* x_99; lean_object* x_100; lean_object* x_101; -x_99 = lean_ctor_get(x_48, 0); -x_100 = lean_ctor_get(x_48, 1); +lean_object* x_100; lean_object* x_101; lean_object* x_102; +x_100 = lean_ctor_get(x_49, 0); +x_101 = lean_ctor_get(x_49, 1); +lean_inc(x_101); lean_inc(x_100); -lean_inc(x_99); -lean_dec(x_48); -x_101 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_101, 0, x_99); -lean_ctor_set(x_101, 1, x_100); -return x_101; +lean_dec(x_49); +x_102 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_102, 0, x_100); +lean_ctor_set(x_102, 1, x_101); +return x_102; } } -block_47: +block_48: { -lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; uint8_t x_28; +lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; uint8_t x_29; x_13 = lean_ctor_get(x_11, 0); lean_inc(x_13); x_14 = lean_ctor_get(x_11, 1); @@ -988,37 +963,40 @@ x_24 = lean_array_push(x_23, x_22); x_25 = lean_unsigned_to_nat(0u); x_26 = l_Array_iterateMAux___main___at_Array_append___spec__1___rarg(x_14, x_14, x_25, x_24); lean_dec(x_14); -x_27 = l_Lean_Elab_Tactic_mkTacticSeq(x_1, x_26); -lean_dec(x_26); -x_28 = !lean_is_exclusive(x_4); -if (x_28 == 0) +x_27 = l_Lean_nullKind; +x_28 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_28, 0, x_27); +lean_ctor_set(x_28, 1, x_26); +x_29 = !lean_is_exclusive(x_4); +if (x_29 == 0) { -lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; -x_29 = lean_ctor_get(x_4, 6); -lean_inc(x_27); -x_30 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_30, 0, x_1); -lean_ctor_set(x_30, 1, x_27); -x_31 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_31, 0, x_30); -lean_ctor_set(x_31, 1, x_29); -lean_ctor_set(x_4, 6, x_31); -x_32 = l_Lean_Elab_Tactic_evalTactic___main(x_27, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_18); -return x_32; +lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; +x_30 = lean_ctor_get(x_4, 6); +lean_inc(x_28); +x_31 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_31, 0, x_1); +lean_ctor_set(x_31, 1, x_28); +x_32 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_32, 0, x_31); +lean_ctor_set(x_32, 1, x_30); +lean_ctor_set(x_4, 6, x_32); +x_33 = l_Lean_Elab_Tactic_evalTactic___main(x_28, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_18); +return x_33; } else { -lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; uint8_t x_41; uint8_t x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; -x_33 = lean_ctor_get(x_4, 0); -x_34 = lean_ctor_get(x_4, 1); -x_35 = lean_ctor_get(x_4, 2); -x_36 = lean_ctor_get(x_4, 3); -x_37 = lean_ctor_get(x_4, 4); -x_38 = lean_ctor_get(x_4, 5); -x_39 = lean_ctor_get(x_4, 6); -x_40 = lean_ctor_get(x_4, 7); -x_41 = lean_ctor_get_uint8(x_4, sizeof(void*)*8); -x_42 = lean_ctor_get_uint8(x_4, sizeof(void*)*8 + 1); +lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; uint8_t x_42; uint8_t x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; +x_34 = lean_ctor_get(x_4, 0); +x_35 = lean_ctor_get(x_4, 1); +x_36 = lean_ctor_get(x_4, 2); +x_37 = lean_ctor_get(x_4, 3); +x_38 = lean_ctor_get(x_4, 4); +x_39 = lean_ctor_get(x_4, 5); +x_40 = lean_ctor_get(x_4, 6); +x_41 = lean_ctor_get(x_4, 7); +x_42 = lean_ctor_get_uint8(x_4, sizeof(void*)*8); +x_43 = lean_ctor_get_uint8(x_4, sizeof(void*)*8 + 1); +lean_inc(x_41); lean_inc(x_40); lean_inc(x_39); lean_inc(x_38); @@ -1026,28 +1004,27 @@ lean_inc(x_37); lean_inc(x_36); lean_inc(x_35); lean_inc(x_34); -lean_inc(x_33); lean_dec(x_4); -lean_inc(x_27); -x_43 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_43, 0, x_1); -lean_ctor_set(x_43, 1, x_27); -x_44 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_44, 0, x_43); -lean_ctor_set(x_44, 1, x_39); -x_45 = lean_alloc_ctor(0, 8, 2); -lean_ctor_set(x_45, 0, x_33); -lean_ctor_set(x_45, 1, x_34); -lean_ctor_set(x_45, 2, x_35); -lean_ctor_set(x_45, 3, x_36); -lean_ctor_set(x_45, 4, x_37); -lean_ctor_set(x_45, 5, x_38); -lean_ctor_set(x_45, 6, x_44); -lean_ctor_set(x_45, 7, x_40); -lean_ctor_set_uint8(x_45, sizeof(void*)*8, x_41); -lean_ctor_set_uint8(x_45, sizeof(void*)*8 + 1, x_42); -x_46 = l_Lean_Elab_Tactic_evalTactic___main(x_27, x_2, x_3, x_45, x_5, x_6, x_7, x_8, x_9, x_18); -return x_46; +lean_inc(x_28); +x_44 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_44, 0, x_1); +lean_ctor_set(x_44, 1, x_28); +x_45 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_45, 0, x_44); +lean_ctor_set(x_45, 1, x_40); +x_46 = lean_alloc_ctor(0, 8, 2); +lean_ctor_set(x_46, 0, x_34); +lean_ctor_set(x_46, 1, x_35); +lean_ctor_set(x_46, 2, x_36); +lean_ctor_set(x_46, 3, x_37); +lean_ctor_set(x_46, 4, x_38); +lean_ctor_set(x_46, 5, x_39); +lean_ctor_set(x_46, 6, x_45); +lean_ctor_set(x_46, 7, x_41); +lean_ctor_set_uint8(x_46, sizeof(void*)*8, x_42); +lean_ctor_set_uint8(x_46, sizeof(void*)*8 + 1, x_43); +x_47 = l_Lean_Elab_Tactic_evalTactic___main(x_28, x_2, x_3, x_46, x_5, x_6, x_7, x_8, x_9, x_18); +return x_47; } } } diff --git a/stage0/stdlib/Lean/Elab/Tactic/Rewrite.c b/stage0/stdlib/Lean/Elab/Tactic/Rewrite.c index 41772ffa57..1d3804befe 100644 --- a/stage0/stdlib/Lean/Elab/Tactic/Rewrite.c +++ b/stage0/stdlib/Lean/Elab/Tactic/Rewrite.c @@ -15,47 +15,137 @@ extern "C" { #endif lean_object* l_Lean_Elab_Tactic_expandRewriteTactic___boxed(lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltin_Lean_Elab_Tactic_evalRewrite(lean_object*); -lean_object* l_Lean_Elab_Tactic_expandRewriteTactic___closed__1; -lean_object* l___regBuiltin_Lean_Elab_Tactic_evalRewrite___closed__3; +extern lean_object* l_Lean_nullKind; +extern lean_object* l_Array_empty___closed__1; extern lean_object* l___regBuiltin_Lean_Elab_Term_Quotation_elabTacticQuot___closed__1; lean_object* l___regBuiltin_Lean_Elab_Tactic_expandRewriteTactic(lean_object*); +extern lean_object* l_Lean_Parser_declareBuiltinParser___closed__3; +lean_object* l_Lean_Elab_Tactic_evalRewrite___closed__3; +lean_object* lean_array_push(lean_object*, lean_object*); +lean_object* lean_array_get_size(lean_object*); lean_object* l_Lean_KeyedDeclsAttribute_addBuiltin___rarg(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l___regBuiltin_Lean_Elab_Tactic_evalRewrite___closed__2; +lean_object* lean_nat_add(lean_object*, lean_object*); +lean_object* l_Array_umapMAux___main___at_Lean_Elab_Tactic_expandRewriteTactic___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Array_foldlStepMAux___main___at_Lean_Elab_Term_elabParen___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* lean_array_fget(lean_object*, lean_object*); +lean_object* lean_array_fset(lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltin_Lean_Elab_Tactic_evalRewrite___closed__1; lean_object* lean_name_mk_string(lean_object*, lean_object*); lean_object* l___regBuiltin_Lean_Elab_Tactic_expandRewriteTactic___closed__2; extern lean_object* l_Lean_Elab_Tactic_tacticElabAttribute; lean_object* l___regBuiltin_Lean_Elab_Tactic_expandRewriteTactic___closed__1; extern lean_object* l_Lean_Elab_macroAttribute; -lean_object* l_Lean_Elab_Tactic_evalRewrite___rarg___closed__2; -lean_object* l_Lean_Elab_Tactic_evalRewrite___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Tactic_evalRewrite___rarg___closed__1; +lean_object* l_Lean_Syntax_getArgs(lean_object*); lean_object* l___regBuiltin_Lean_Elab_Tactic_expandRewriteTactic___closed__3; -lean_object* l_Lean_Elab_Tactic_evalRewrite___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_throwError___at_Lean_Elab_Tactic_evalTactic___main___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Tactic_evalRewrite(lean_object*); -lean_object* l_Lean_Elab_Tactic_evalRewrite___boxed(lean_object*); +lean_object* l_Lean_Elab_log___at_Lean_Elab_Tactic_evalTactic___main___spec__11(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Array_umapMAux___main___at_Lean_Elab_Tactic_expandRewriteTactic___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Array_umapMAux___main___at_Lean_Elab_Tactic_expandRewriteTactic___spec__1___closed__1; +lean_object* l_Lean_Syntax_getArg(lean_object*, lean_object*); +lean_object* l_unsafeCast(lean_object*, lean_object*, lean_object*); +lean_object* l_Array_umapMAux___main___at_Lean_Elab_Tactic_expandRewriteTactic___spec__1___closed__2; +lean_object* l_Lean_Elab_Tactic_evalRewrite(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Tactic_evalRewrite___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Tactic_evalRewrite___closed__1; +lean_object* l_Lean_Elab_Tactic_evalRewrite___closed__2; lean_object* l_Lean_Elab_Tactic_expandRewriteTactic(lean_object*, lean_object*, lean_object*); -lean_object* _init_l_Lean_Elab_Tactic_expandRewriteTactic___closed__1() { +uint8_t lean_nat_dec_lt(lean_object*, lean_object*); +lean_object* _init_l_Array_umapMAux___main___at_Lean_Elab_Tactic_expandRewriteTactic___spec__1___closed__1() { _start: { lean_object* x_1; -x_1 = lean_mk_string("WIP"); +x_1 = lean_mk_string("rewrite"); return x_1; } } +lean_object* _init_l_Array_umapMAux___main___at_Lean_Elab_Tactic_expandRewriteTactic___spec__1___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l___regBuiltin_Lean_Elab_Term_Quotation_elabTacticQuot___closed__1; +x_2 = l_Array_umapMAux___main___at_Lean_Elab_Tactic_expandRewriteTactic___spec__1___closed__1; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +lean_object* l_Array_umapMAux___main___at_Lean_Elab_Tactic_expandRewriteTactic___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; uint8_t x_6; +x_5 = lean_array_get_size(x_4); +x_6 = lean_nat_dec_lt(x_3, x_5); +lean_dec(x_5); +if (x_6 == 0) +{ +lean_object* x_7; +lean_dec(x_3); +lean_dec(x_2); +x_7 = x_4; +return x_7; +} +else +{ +lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; +x_8 = lean_array_fget(x_4, x_3); +x_9 = lean_unsigned_to_nat(0u); +x_10 = lean_array_fset(x_4, x_3, x_9); +x_11 = x_8; +x_12 = l_Lean_Syntax_getArg(x_1, x_9); +x_13 = l_Lean_Parser_declareBuiltinParser___closed__3; +x_14 = lean_array_push(x_13, x_12); +x_15 = lean_array_push(x_14, x_11); +lean_inc(x_2); +x_16 = lean_array_push(x_15, x_2); +x_17 = l_Array_umapMAux___main___at_Lean_Elab_Tactic_expandRewriteTactic___spec__1___closed__2; +x_18 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_18, 0, x_17); +lean_ctor_set(x_18, 1, x_16); +x_19 = lean_unsigned_to_nat(1u); +x_20 = lean_nat_add(x_3, x_19); +x_21 = x_18; +x_22 = lean_array_fset(x_10, x_3, x_21); +lean_dec(x_3); +x_3 = x_20; +x_4 = x_22; +goto _start; +} +} +} lean_object* l_Lean_Elab_Tactic_expandRewriteTactic(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { -lean_object* x_4; lean_object* x_5; lean_object* x_6; -x_4 = l_Lean_Elab_Tactic_expandRewriteTactic___closed__1; -x_5 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_5, 0, x_1); -lean_ctor_set(x_5, 1, x_4); -x_6 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_6, 0, x_5); -lean_ctor_set(x_6, 1, x_3); -return x_6; +lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; +x_4 = lean_unsigned_to_nat(1u); +x_5 = l_Lean_Syntax_getArg(x_1, x_4); +x_6 = l_Lean_Syntax_getArg(x_5, x_4); +lean_dec(x_5); +x_7 = l_Lean_Syntax_getArgs(x_6); +lean_dec(x_6); +x_8 = lean_unsigned_to_nat(2u); +x_9 = lean_unsigned_to_nat(0u); +x_10 = l_Array_empty___closed__1; +x_11 = l_Array_foldlStepMAux___main___at_Lean_Elab_Term_elabParen___spec__1(x_8, x_7, x_9, x_10); +lean_dec(x_7); +x_12 = l_Lean_Syntax_getArg(x_1, x_8); +x_13 = x_11; +x_14 = l_Array_umapMAux___main___at_Lean_Elab_Tactic_expandRewriteTactic___spec__1(x_1, x_12, x_9, x_13); +x_15 = x_14; +x_16 = l_Lean_nullKind; +x_17 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_17, 0, x_16); +lean_ctor_set(x_17, 1, x_15); +x_18 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_18, 0, x_17); +lean_ctor_set(x_18, 1, x_3); +return x_18; +} +} +lean_object* l_Array_umapMAux___main___at_Lean_Elab_Tactic_expandRewriteTactic___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +x_5 = l_Array_umapMAux___main___at_Lean_Elab_Tactic_expandRewriteTactic___spec__1(x_1, x_2, x_3, x_4); +lean_dec(x_1); +return x_5; } } lean_object* l_Lean_Elab_Tactic_expandRewriteTactic___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { @@ -64,6 +154,7 @@ _start: lean_object* x_4; x_4 = l_Lean_Elab_Tactic_expandRewriteTactic(x_1, x_2, x_3); lean_dec(x_2); +lean_dec(x_1); return x_4; } } @@ -104,90 +195,91 @@ x_5 = l_Lean_KeyedDeclsAttribute_addBuiltin___rarg(x_2, x_3, x_4, x_1); return x_5; } } -lean_object* _init_l_Lean_Elab_Tactic_evalRewrite___rarg___closed__1() { +lean_object* _init_l_Lean_Elab_Tactic_evalRewrite___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("WIP "); +return x_1; +} +} +lean_object* _init_l_Lean_Elab_Tactic_evalRewrite___closed__2() { _start: { lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Elab_Tactic_expandRewriteTactic___closed__1; +x_1 = l_Lean_Elab_Tactic_evalRewrite___closed__1; x_2 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; } } -lean_object* _init_l_Lean_Elab_Tactic_evalRewrite___rarg___closed__2() { +lean_object* _init_l_Lean_Elab_Tactic_evalRewrite___closed__3() { _start: { lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Elab_Tactic_evalRewrite___rarg___closed__1; +x_1 = l_Lean_Elab_Tactic_evalRewrite___closed__2; x_2 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; } } -lean_object* l_Lean_Elab_Tactic_evalRewrite___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { +lean_object* l_Lean_Elab_Tactic_evalRewrite(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { _start: { -lean_object* x_10; lean_object* x_11; -x_10 = l_Lean_Elab_Tactic_evalRewrite___rarg___closed__2; -x_11 = l_Lean_throwError___at_Lean_Elab_Tactic_evalTactic___main___spec__1___rarg(x_10, x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9); -return x_11; +lean_object* x_11; lean_object* x_12; lean_object* x_13; uint8_t x_14; lean_object* x_15; uint8_t x_16; +x_11 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_11, 0, x_1); +x_12 = l_Lean_Elab_Tactic_evalRewrite___closed__3; +x_13 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_13, 0, x_12); +lean_ctor_set(x_13, 1, x_11); +x_14 = 0; +x_15 = l_Lean_Elab_log___at_Lean_Elab_Tactic_evalTactic___main___spec__11(x_13, x_14, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); +x_16 = !lean_is_exclusive(x_15); +if (x_16 == 0) +{ +lean_object* x_17; lean_object* x_18; +x_17 = lean_ctor_get(x_15, 0); +lean_dec(x_17); +x_18 = lean_box(0); +lean_ctor_set(x_15, 0, x_18); +return x_15; +} +else +{ +lean_object* x_19; lean_object* x_20; lean_object* x_21; +x_19 = lean_ctor_get(x_15, 1); +lean_inc(x_19); +lean_dec(x_15); +x_20 = lean_box(0); +x_21 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_21, 0, x_20); +lean_ctor_set(x_21, 1, x_19); +return x_21; } } -lean_object* l_Lean_Elab_Tactic_evalRewrite(lean_object* x_1) { +} +lean_object* l_Lean_Elab_Tactic_evalRewrite___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, lean_object* x_8, lean_object* x_9, lean_object* x_10) { _start: { -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_Elab_Tactic_evalRewrite___rarg___boxed), 9, 0); -return x_2; -} -} -lean_object* l_Lean_Elab_Tactic_evalRewrite___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, lean_object* x_7, lean_object* x_8, lean_object* x_9) { -_start: -{ -lean_object* x_10; -x_10 = l_Lean_Elab_Tactic_evalRewrite___rarg(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9); +lean_object* x_11; +x_11 = l_Lean_Elab_Tactic_evalRewrite(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); +lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); +lean_dec(x_3); lean_dec(x_2); -lean_dec(x_1); -return x_10; -} -} -lean_object* l_Lean_Elab_Tactic_evalRewrite___boxed(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = l_Lean_Elab_Tactic_evalRewrite(x_1); -lean_dec(x_1); -return x_2; +return x_11; } } lean_object* _init_l___regBuiltin_Lean_Elab_Tactic_evalRewrite___closed__1() { _start: { lean_object* x_1; -x_1 = lean_mk_string("rewrite"); -return x_1; -} -} -lean_object* _init_l___regBuiltin_Lean_Elab_Tactic_evalRewrite___closed__2() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l___regBuiltin_Lean_Elab_Term_Quotation_elabTacticQuot___closed__1; -x_2 = l___regBuiltin_Lean_Elab_Tactic_evalRewrite___closed__1; -x_3 = lean_name_mk_string(x_1, x_2); -return x_3; -} -} -lean_object* _init_l___regBuiltin_Lean_Elab_Tactic_evalRewrite___closed__3() { -_start: -{ -lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Lean_Elab_Tactic_evalRewrite___boxed), 1, 0); +x_1 = lean_alloc_closure((void*)(l_Lean_Elab_Tactic_evalRewrite___boxed), 10, 0); return x_1; } } @@ -196,8 +288,8 @@ _start: { lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; x_2 = l_Lean_Elab_Tactic_tacticElabAttribute; -x_3 = l___regBuiltin_Lean_Elab_Tactic_evalRewrite___closed__2; -x_4 = l___regBuiltin_Lean_Elab_Tactic_evalRewrite___closed__3; +x_3 = l_Array_umapMAux___main___at_Lean_Elab_Tactic_expandRewriteTactic___spec__1___closed__2; +x_4 = l___regBuiltin_Lean_Elab_Tactic_evalRewrite___closed__1; x_5 = l_Lean_KeyedDeclsAttribute_addBuiltin___rarg(x_2, x_3, x_4, x_1); return x_5; } @@ -219,8 +311,10 @@ lean_dec_ref(res); res = initialize_Lean_Elab_Tactic_ElabTerm(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); -l_Lean_Elab_Tactic_expandRewriteTactic___closed__1 = _init_l_Lean_Elab_Tactic_expandRewriteTactic___closed__1(); -lean_mark_persistent(l_Lean_Elab_Tactic_expandRewriteTactic___closed__1); +l_Array_umapMAux___main___at_Lean_Elab_Tactic_expandRewriteTactic___spec__1___closed__1 = _init_l_Array_umapMAux___main___at_Lean_Elab_Tactic_expandRewriteTactic___spec__1___closed__1(); +lean_mark_persistent(l_Array_umapMAux___main___at_Lean_Elab_Tactic_expandRewriteTactic___spec__1___closed__1); +l_Array_umapMAux___main___at_Lean_Elab_Tactic_expandRewriteTactic___spec__1___closed__2 = _init_l_Array_umapMAux___main___at_Lean_Elab_Tactic_expandRewriteTactic___spec__1___closed__2(); +lean_mark_persistent(l_Array_umapMAux___main___at_Lean_Elab_Tactic_expandRewriteTactic___spec__1___closed__2); l___regBuiltin_Lean_Elab_Tactic_expandRewriteTactic___closed__1 = _init_l___regBuiltin_Lean_Elab_Tactic_expandRewriteTactic___closed__1(); lean_mark_persistent(l___regBuiltin_Lean_Elab_Tactic_expandRewriteTactic___closed__1); l___regBuiltin_Lean_Elab_Tactic_expandRewriteTactic___closed__2 = _init_l___regBuiltin_Lean_Elab_Tactic_expandRewriteTactic___closed__2(); @@ -230,16 +324,14 @@ lean_mark_persistent(l___regBuiltin_Lean_Elab_Tactic_expandRewriteTactic___close res = l___regBuiltin_Lean_Elab_Tactic_expandRewriteTactic(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); -l_Lean_Elab_Tactic_evalRewrite___rarg___closed__1 = _init_l_Lean_Elab_Tactic_evalRewrite___rarg___closed__1(); -lean_mark_persistent(l_Lean_Elab_Tactic_evalRewrite___rarg___closed__1); -l_Lean_Elab_Tactic_evalRewrite___rarg___closed__2 = _init_l_Lean_Elab_Tactic_evalRewrite___rarg___closed__2(); -lean_mark_persistent(l_Lean_Elab_Tactic_evalRewrite___rarg___closed__2); +l_Lean_Elab_Tactic_evalRewrite___closed__1 = _init_l_Lean_Elab_Tactic_evalRewrite___closed__1(); +lean_mark_persistent(l_Lean_Elab_Tactic_evalRewrite___closed__1); +l_Lean_Elab_Tactic_evalRewrite___closed__2 = _init_l_Lean_Elab_Tactic_evalRewrite___closed__2(); +lean_mark_persistent(l_Lean_Elab_Tactic_evalRewrite___closed__2); +l_Lean_Elab_Tactic_evalRewrite___closed__3 = _init_l_Lean_Elab_Tactic_evalRewrite___closed__3(); +lean_mark_persistent(l_Lean_Elab_Tactic_evalRewrite___closed__3); l___regBuiltin_Lean_Elab_Tactic_evalRewrite___closed__1 = _init_l___regBuiltin_Lean_Elab_Tactic_evalRewrite___closed__1(); lean_mark_persistent(l___regBuiltin_Lean_Elab_Tactic_evalRewrite___closed__1); -l___regBuiltin_Lean_Elab_Tactic_evalRewrite___closed__2 = _init_l___regBuiltin_Lean_Elab_Tactic_evalRewrite___closed__2(); -lean_mark_persistent(l___regBuiltin_Lean_Elab_Tactic_evalRewrite___closed__2); -l___regBuiltin_Lean_Elab_Tactic_evalRewrite___closed__3 = _init_l___regBuiltin_Lean_Elab_Tactic_evalRewrite___closed__3(); -lean_mark_persistent(l___regBuiltin_Lean_Elab_Tactic_evalRewrite___closed__3); res = l___regBuiltin_Lean_Elab_Tactic_evalRewrite(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); diff --git a/stage0/stdlib/Lean/Parser/Basic.c b/stage0/stdlib/Lean/Parser/Basic.c index 49f7624f22..5320bff41a 100644 --- a/stage0/stdlib/Lean/Parser/Basic.c +++ b/stage0/stdlib/Lean/Parser/Basic.c @@ -123,8 +123,10 @@ lean_object* l_Lean_Parser_group(lean_object*); lean_object* l_Lean_Parser_nonReservedSymbolInfo___closed__2; lean_object* l_Lean_Parser_dollarSymbol___closed__1; lean_object* l_Lean_Parser_ident; +lean_object* l_Lean_Parser_nodeSepBy1Unbox___boxed(lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Parser_isLitKind(lean_object*); lean_object* l_Lean_Parser_takeUntilFn___main___at_Lean_Parser_whitespace___main___spec__1(lean_object*, lean_object*); +lean_object* l_Lean_Parser_nodeSepBy1Unbox___closed__1; lean_object* l_Lean_Parser_satisfyFn___at_Lean_Parser_binNumberFn___spec__1(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_fieldIdxKind___closed__1; lean_object* l_Lean_Parser_antiquotNestedExpr___elambda__1___closed__1; @@ -135,7 +137,6 @@ lean_object* lean_st_ref_get(lean_object*, lean_object*); lean_object* l_Lean_Parser_nonReservedSymbolFn(lean_object*, lean_object*, lean_object*); uint8_t l_Char_isDigit(uint32_t); lean_object* l_Lean_Parser_ParserState_mkNode(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Parser_unboxSingleton___lambda__1___boxed(lean_object*); lean_object* l_List_append___rarg(lean_object*, lean_object*); lean_object* l_Lean_Parser_categoryParserFnExtension___closed__2; lean_object* l_Lean_Parser_nameLitNoAntiquot___closed__1; @@ -309,6 +310,7 @@ lean_object* l_Lean_Parser_hasAndthen; lean_object* l_Lean_Parser_satisfyFn___at_Lean_Parser_rawCh___elambda__1___spec__1(uint32_t, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_ident___closed__2; uint8_t lean_nat_dec_eq(lean_object*, lean_object*); +lean_object* l_Lean_Parser_nodeSepBy1Unbox___lambda__1___boxed(lean_object*); lean_object* l_Lean_Parser_Error_HasBeq___closed__1; lean_object* l_Lean_Parser_nonReservedSymbolFnAux(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_RBNode_ins___main___at_Lean_Parser_TokenMap_insert___spec__4(lean_object*); @@ -372,7 +374,6 @@ uint8_t l_Lean_Parser_Error_beq(lean_object*, lean_object*); lean_object* l_Lean_Parser_ParserState_keepNewError(lean_object*, lean_object*); lean_object* l_Lean_Parser_antiquotExpr; lean_object* l_Std_RBNode_find___main___at_Lean_Parser_indexed___spec__2___rarg(lean_object*, lean_object*); -lean_object* l_Lean_Parser_unboxSingleton___lambda__1(lean_object*); lean_object* l_Lean_Parser_symbol(lean_object*); lean_object* l_Lean_Parser_takeWhileFn___at_Lean_Parser_octalNumberFn___spec__2(lean_object*, lean_object*); lean_object* l_Lean_Parser_symbolInfo___elambda__1___boxed(lean_object*); @@ -448,6 +449,7 @@ lean_object* l_Lean_Parser_strLitNoAntiquot___closed__1; lean_object* l_Lean_Parser_sepByFn(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_fieldIdx___closed__2; lean_object* l_Lean_Parser_satisfyFn___at_Lean_Parser_chFn___spec__1(uint32_t, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Parser_many1Unbox___lambda__1(lean_object*); lean_object* l_Lean_Parser_rawCh___boxed(lean_object*, lean_object*); lean_object* l_Lean_Parser_getNext___boxed(lean_object*, lean_object*); lean_object* l_IO_mkRef___at_Lean_Parser_mkCategoryParserFnRef___spec__1(lean_object*, lean_object*); @@ -465,6 +467,7 @@ lean_object* l_Array_foldlStepMAux___main___at_Array_foldSepByM___spec__1___rarg lean_object* l_Std_RBNode_find___main___at_Lean_Parser_TokenMap_insert___spec__1(lean_object*); lean_object* l_Lean_Parser_antiquotNestedExpr___elambda__1___closed__10; lean_object* l_Lean_Parser_FirstTokens_merge(lean_object*, lean_object*); +lean_object* l_Lean_Parser_many1Unbox___closed__1; extern size_t l_Std_PersistentHashMap_insertAux___main___rarg___closed__2; lean_object* l_Lean_Parser_strLit___elambda__1___closed__1; lean_object* l_Lean_Parser_pushNone___elambda__1___rarg(lean_object*); @@ -482,6 +485,7 @@ lean_object* l_Lean_Parser_checkNoImmediateColon___elambda__1(lean_object*, lean lean_object* l_Lean_Parser_takeUntilFn___main___at_Lean_Parser_quotedSymbolFn___spec__2___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_nonReservedSymbolInfo___elambda__1___boxed(lean_object*); lean_object* l_Lean_Parser_takeUntilFn___main___at_Lean_Parser_octalNumberFn___spec__3___boxed(lean_object*, lean_object*); +lean_object* l_Lean_Parser_nodeSepBy1Unbox(lean_object*, lean_object*, lean_object*, uint8_t); lean_object* l_Array_iterateMAux___main___at_Lean_Syntax_foldArgs___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_foldlStepMAux___main___at_Lean_Syntax_foldSepArgs___spec__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint32_t lean_string_utf8_get(lean_object*, lean_object*); @@ -563,6 +567,7 @@ lean_object* l_Array_foldlStepMAux___main___at_Array_foldSepByM___spec__1___rarg lean_object* l_Lean_Parser_checkInsideQuot___closed__1; extern lean_object* l___private_Lean_Environment_5__envExtensionsRef; lean_object* l_Lean_Parser_mkCategoryParserFnExtension___closed__1; +lean_object* l_Lean_Parser_many1Unbox___lambda__1___boxed(lean_object*); lean_object* l_Lean_Parser_sepBy1Info(lean_object*, lean_object*); lean_object* l_Lean_Parser_quotedCharFn___closed__1; lean_object* l_Lean_Parser_charLitFnAux___closed__1; @@ -650,7 +655,6 @@ lean_object* l___private_Lean_Parser_Basic_6__nameLitAux___closed__1; lean_object* l_Lean_Parser_antiquotNestedExpr___closed__6; lean_object* l_Lean_Parser_mkAntiquot___closed__22; lean_object* l_Lean_Syntax_getArgs(lean_object*); -lean_object* l_Lean_Parser_unboxSingleton___closed__1; lean_object* l_Lean_Parser_manyAux___main___at_Lean_Parser_many1Indent___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Syntax_getKind(lean_object*); lean_object* l_Lean_Parser_manyAux___main___at_Lean_Parser_many1Indent___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -742,6 +746,7 @@ lean_object* l_Lean_Syntax_forSepArgsM___rarg___boxed(lean_object*, lean_object* lean_object* l_Lean_Parser_rawFn(lean_object*, uint8_t, lean_object*, lean_object*); lean_object* l_Lean_Parser_charLitFn___closed__1; lean_object* l_Lean_Parser_dollarSymbol___elambda__1___closed__4; +lean_object* l_Lean_Parser_nodeSepBy1Unbox___lambda__1(lean_object*); lean_object* l_Lean_Parser_nodeFn(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_toList___rarg(lean_object*); lean_object* l_Lean_Parser_checkWsBeforeFn___boxed(lean_object*, lean_object*, lean_object*); @@ -756,8 +761,8 @@ uint8_t l_Lean_isIdFirst(uint32_t); uint8_t l_Lean_Syntax_isOfKind(lean_object*, lean_object*); lean_object* l_Lean_Parser_takeWhile1Fn(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_io_initializing(lean_object*); +lean_object* l_Lean_Parser_many1Unbox(lean_object*); lean_object* l_Lean_Parser_sepByInfo___elambda__2(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Parser_unboxSingleton(lean_object*); lean_object* l_Lean_Parser_symbolInfo___closed__1; lean_object* l_Lean_Syntax_forSepArgsM___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_EnvExtension_getStateUnsafe___rarg(lean_object*, lean_object*); @@ -5575,7 +5580,7 @@ lean_ctor_set(x_7, 1, x_6); return x_7; } } -lean_object* l_Lean_Parser_unboxSingleton___lambda__1(lean_object* x_1) { +lean_object* l_Lean_Parser_many1Unbox___lambda__1(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; uint8_t x_4; @@ -5597,43 +5602,133 @@ return x_6; } } } -lean_object* _init_l_Lean_Parser_unboxSingleton___closed__1() { +lean_object* _init_l_Lean_Parser_many1Unbox___closed__1() { _start: { lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Lean_Parser_unboxSingleton___lambda__1___boxed), 1, 0); +x_1 = lean_alloc_closure((void*)(l_Lean_Parser_many1Unbox___lambda__1___boxed), 1, 0); return x_1; } } -lean_object* l_Lean_Parser_unboxSingleton(lean_object* x_1) { +lean_object* l_Lean_Parser_many1Unbox(lean_object* x_1) { _start: { -lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; +lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; x_2 = lean_ctor_get(x_1, 0); lean_inc(x_2); -x_3 = l_Lean_Parser_withResultOfInfo(x_2); -x_4 = lean_ctor_get(x_1, 1); -lean_inc(x_4); +x_3 = lean_ctor_get(x_1, 1); +lean_inc(x_3); lean_dec(x_1); -x_5 = l_Lean_Parser_unboxSingleton___closed__1; -x_6 = lean_alloc_closure((void*)(l_Lean_Parser_withResultOfFn), 4, 2); -lean_closure_set(x_6, 0, x_4); -lean_closure_set(x_6, 1, x_5); -x_7 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_7, 0, x_3); -lean_ctor_set(x_7, 1, x_6); -return x_7; +x_4 = lean_alloc_closure((void*)(l_Lean_Parser_many1Fn), 3, 1); +lean_closure_set(x_4, 0, x_3); +x_5 = l_Lean_Parser_withResultOfInfo(x_2); +x_6 = l_Lean_Parser_many1Unbox___closed__1; +x_7 = lean_alloc_closure((void*)(l_Lean_Parser_withResultOfFn), 4, 2); +lean_closure_set(x_7, 0, x_4); +lean_closure_set(x_7, 1, x_6); +x_8 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_8, 0, x_5); +lean_ctor_set(x_8, 1, x_7); +return x_8; } } -lean_object* l_Lean_Parser_unboxSingleton___lambda__1___boxed(lean_object* x_1) { +lean_object* l_Lean_Parser_many1Unbox___lambda__1___boxed(lean_object* x_1) { _start: { lean_object* x_2; -x_2 = l_Lean_Parser_unboxSingleton___lambda__1(x_1); +x_2 = l_Lean_Parser_many1Unbox___lambda__1(x_1); lean_dec(x_1); return x_2; } } +lean_object* l_Lean_Parser_nodeSepBy1Unbox___lambda__1(lean_object* x_1) { +_start: +{ +lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; uint8_t x_6; +x_2 = lean_unsigned_to_nat(0u); +x_3 = l_Lean_Syntax_getArg(x_1, x_2); +x_4 = l_Lean_Syntax_getNumArgs(x_3); +x_5 = lean_unsigned_to_nat(2u); +x_6 = lean_nat_dec_lt(x_4, x_5); +lean_dec(x_4); +if (x_6 == 0) +{ +lean_dec(x_3); +lean_inc(x_1); +return x_1; +} +else +{ +lean_object* x_7; +x_7 = l_Lean_Syntax_getArg(x_3, x_2); +lean_dec(x_3); +return x_7; +} +} +} +lean_object* _init_l_Lean_Parser_nodeSepBy1Unbox___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_Lean_Parser_nodeSepBy1Unbox___lambda__1___boxed), 1, 0); +return x_1; +} +} +lean_object* l_Lean_Parser_nodeSepBy1Unbox(lean_object* x_1, lean_object* x_2, lean_object* x_3, uint8_t x_4) { +_start: +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; +x_5 = lean_ctor_get(x_2, 0); +lean_inc(x_5); +x_6 = lean_ctor_get(x_3, 0); +lean_inc(x_6); +x_7 = l_Lean_Parser_sepBy1Info(x_5, x_6); +x_8 = lean_ctor_get(x_2, 1); +lean_inc(x_8); +lean_dec(x_2); +x_9 = lean_ctor_get(x_3, 1); +lean_inc(x_9); +lean_dec(x_3); +x_10 = lean_box(x_4); +x_11 = lean_alloc_closure((void*)(l_Lean_Parser_sepBy1Fn___boxed), 5, 3); +lean_closure_set(x_11, 0, x_10); +lean_closure_set(x_11, 1, x_8); +lean_closure_set(x_11, 2, x_9); +lean_inc(x_1); +x_12 = l_Lean_Parser_nodeInfo(x_1, x_7); +x_13 = lean_alloc_closure((void*)(l_Lean_Parser_nodeFn), 4, 2); +lean_closure_set(x_13, 0, x_1); +lean_closure_set(x_13, 1, x_11); +x_14 = l_Lean_Parser_withResultOfInfo(x_12); +x_15 = l_Lean_Parser_nodeSepBy1Unbox___closed__1; +x_16 = lean_alloc_closure((void*)(l_Lean_Parser_withResultOfFn), 4, 2); +lean_closure_set(x_16, 0, x_13); +lean_closure_set(x_16, 1, x_15); +x_17 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_17, 0, x_14); +lean_ctor_set(x_17, 1, x_16); +return x_17; +} +} +lean_object* l_Lean_Parser_nodeSepBy1Unbox___lambda__1___boxed(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = l_Lean_Parser_nodeSepBy1Unbox___lambda__1(x_1); +lean_dec(x_1); +return x_2; +} +} +lean_object* l_Lean_Parser_nodeSepBy1Unbox___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +uint8_t x_5; lean_object* x_6; +x_5 = lean_unbox(x_4); +lean_dec(x_4); +x_6 = l_Lean_Parser_nodeSepBy1Unbox(x_1, x_2, x_3, x_5); +return x_6; +} +} lean_object* l_Lean_Parser_satisfyFn(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { @@ -28081,8 +28176,10 @@ l_Lean_Parser_notFollowedByFn___closed__1 = _init_l_Lean_Parser_notFollowedByFn_ lean_mark_persistent(l_Lean_Parser_notFollowedByFn___closed__1); l_Lean_Parser_manyAux___main___closed__1 = _init_l_Lean_Parser_manyAux___main___closed__1(); lean_mark_persistent(l_Lean_Parser_manyAux___main___closed__1); -l_Lean_Parser_unboxSingleton___closed__1 = _init_l_Lean_Parser_unboxSingleton___closed__1(); -lean_mark_persistent(l_Lean_Parser_unboxSingleton___closed__1); +l_Lean_Parser_many1Unbox___closed__1 = _init_l_Lean_Parser_many1Unbox___closed__1(); +lean_mark_persistent(l_Lean_Parser_many1Unbox___closed__1); +l_Lean_Parser_nodeSepBy1Unbox___closed__1 = _init_l_Lean_Parser_nodeSepBy1Unbox___closed__1(); +lean_mark_persistent(l_Lean_Parser_nodeSepBy1Unbox___closed__1); l_Lean_Parser_hexDigitFn___closed__1 = _init_l_Lean_Parser_hexDigitFn___closed__1(); lean_mark_persistent(l_Lean_Parser_hexDigitFn___closed__1); l_Lean_Parser_quotedCharFn___closed__1 = _init_l_Lean_Parser_quotedCharFn___closed__1(); diff --git a/stage0/stdlib/Lean/Parser/Command.c b/stage0/stdlib/Lean/Parser/Command.c index ec6bb4911f..d8a6c1ca61 100644 --- a/stage0/stdlib/Lean/Parser/Command.c +++ b/stage0/stdlib/Lean/Parser/Command.c @@ -67,7 +67,6 @@ lean_object* l_Lean_Parser_Command_structImplicitBinder___closed__9; lean_object* l_Lean_Parser_Command_declModifiers___elambda__1___closed__3; lean_object* l___regBuiltin_Lean_Parser_Command_set__option_parenthesizer___closed__1; lean_object* l_Lean_Parser_Command_resolve__name___elambda__1___closed__8; -lean_object* l_Lean_Parser_unboxSingleton_parenthesizer(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Command_extends___elambda__1___closed__3; lean_object* l_Lean_Parser_Command_ctor; lean_object* l_Lean_Parser_Command_structure___closed__3; @@ -128,7 +127,6 @@ lean_object* l_Lean_Parser_Command_end___elambda__1(lean_object*, lean_object*); lean_object* l_Lean_Parser_Command_openRenamingItem___elambda__1___closed__4; extern lean_object* l_Lean_Parser_Term_forall_parenthesizer___closed__2; lean_object* l_Lean_Parser_Command_extends___closed__1; -lean_object* l_Lean_Parser_Term_quot_parenthesizer___closed__9; lean_object* l_Lean_Parser_Command_synth_formatter___closed__4; lean_object* l___regBuiltinParser_Lean_Parser_Command_section(lean_object*); lean_object* l___regBuiltin_Lean_Parser_Command_print_formatter___closed__1; @@ -682,7 +680,6 @@ lean_object* l_Lean_Parser_Command_section_parenthesizer___closed__2; lean_object* l_Lean_Parser_Command_set__option___elambda__1___closed__8; lean_object* l_Lean_Parser_Command_declValSimple___elambda__1___closed__1; extern lean_object* l_Lean_Parser_Term_letrec_formatter___closed__6; -lean_object* l_Lean_PrettyPrinter_Formatter_concatArgs(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Command_axiom_parenthesizer___closed__2; lean_object* l_Lean_Parser_Command_mutual___elambda__1___closed__12; lean_object* l_Lean_Parser_Command_inferMod_parenthesizer___closed__2; @@ -841,7 +838,6 @@ lean_object* l_Lean_Parser_Command_export___elambda__1(lean_object*, lean_object lean_object* l_Lean_Parser_Command_declId_formatter___closed__7; lean_object* l_Lean_Parser_Command_classTk_formatter___closed__1; lean_object* l_Lean_Parser_Command_openHiding_formatter___closed__6; -lean_object* l_Lean_PrettyPrinter_Parenthesizer_visitArgs(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Command_openSimple_formatter___closed__2; lean_object* l_Lean_Parser_Command_mutual___closed__11; lean_object* l___regBuiltin_Lean_Parser_Term_quot_formatter(lean_object*); @@ -1079,9 +1075,11 @@ lean_object* l_Lean_Parser_Command_noncomputable___closed__6; lean_object* l_Lean_Parser_Command_namespace___elambda__1___closed__1; lean_object* l_Lean_Parser_Command_declaration___closed__11; extern lean_object* l_Lean_Parser_Term_haveAssign___elambda__1___closed__5; +lean_object* l_Lean_PrettyPrinter_Formatter_many1Unbox_formatter(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Command_structExplicitBinder_parenthesizer___closed__5; lean_object* l_Lean_Parser_Command_declVal___closed__2; lean_object* l_Lean_Parser_Command_declValSimple_parenthesizer___closed__2; +extern lean_object* l_Lean_Parser_many1Unbox___closed__1; lean_object* l_Lean_Parser_Command_partial_parenthesizer(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Command_structImplicitBinder___closed__3; lean_object* l_Lean_Parser_Command_axiom_formatter___closed__3; @@ -1187,6 +1185,7 @@ lean_object* l_Lean_Parser_Command_commentBody___elambda__1___boxed(lean_object* lean_object* l_Lean_Parser_Command_in___elambda__1___closed__3; lean_object* l_Lean_Parser_Command_private___closed__6; lean_object* l___regBuiltin_Lean_Parser_Command_init__quot_formatter___closed__1; +lean_object* l_Lean_PrettyPrinter_Parenthesizer_many1Unbox_parenthesizer(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Command_openRenamingItem_formatter___closed__3; lean_object* l_Lean_Parser_Command_declModifiers___elambda__1___closed__4; lean_object* l_Lean_Parser_Command_inductive___elambda__1___closed__5; @@ -1370,7 +1369,6 @@ lean_object* l_Lean_Parser_Term_quot___closed__7; lean_object* l_Lean_Parser_Command_example_formatter___closed__1; lean_object* l_Lean_Parser_Command_eval___elambda__1___closed__6; lean_object* l_Lean_Parser_Command_resolve__name___closed__1; -lean_object* l_Lean_Parser_unboxSingleton_formatter(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Command_axiom___elambda__1___closed__8; lean_object* l_Lean_Parser_Command_inductive___closed__4; lean_object* l_Lean_Parser_Command_export_formatter___closed__4; @@ -1578,7 +1576,6 @@ lean_object* l_Lean_Parser_Command_structImplicitBinder_parenthesizer(lean_objec lean_object* l_Lean_Parser_Command_openSimple___elambda__1(lean_object*, lean_object*); lean_object* l_Lean_Parser_Command_structureTk___elambda__1___closed__7; lean_object* l_Lean_Parser_Command_openOnly_parenthesizer___closed__3; -extern lean_object* l_Lean_Parser_unboxSingleton___closed__1; lean_object* l_Lean_Parser_Command_declVal_formatter(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Command_declSig___elambda__1___closed__2; lean_object* l_Lean_Parser_Command_declaration_formatter___closed__2; @@ -1712,7 +1709,6 @@ lean_object* l_Lean_Parser_Term_quot___closed__1; lean_object* l_Lean_Parser_Command_namespace_parenthesizer(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Command_axiom___closed__8; lean_object* l_Lean_Parser_Command_noncomputable_formatter___closed__3; -lean_object* l_Lean_Parser_Term_quot_formatter___closed__10; lean_object* l_Lean_Parser_Command_openOnly___closed__2; extern lean_object* l_Lean_Parser_unicodeSymbolFn___closed__1; lean_object* l_Lean_Parser_Command_partial_parenthesizer___closed__1; @@ -2397,7 +2393,7 @@ _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_Parser_Term_quot___elambda__1___closed__7; -x_2 = l_Lean_Parser_unboxSingleton___closed__1; +x_2 = l_Lean_Parser_many1Unbox___closed__1; x_3 = lean_alloc_closure((void*)(l_Lean_Parser_withResultOfFn), 4, 2); lean_closure_set(x_3, 0, x_1); lean_closure_set(x_3, 1, x_2); @@ -2960,14 +2956,6 @@ x_6 = l_Lean_Parser_addBuiltinParser(x_2, x_3, x_4, x_5, x_1); return x_6; } } -lean_object* l_Lean_Parser_unboxSingleton_formatter(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { -_start: -{ -lean_object* x_7; -x_7 = l_Lean_PrettyPrinter_Formatter_concatArgs(x_1, x_2, x_3, x_4, x_5, x_6); -return x_7; -} -} lean_object* l_Lean_Parser_commandParser_formatter___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { @@ -3032,7 +3020,7 @@ _start: { lean_object* x_1; lean_object* x_2; x_1 = l_Lean_Parser_Term_quot_formatter___closed__3; -x_2 = lean_alloc_closure((void*)(l_Lean_PrettyPrinter_Formatter_many1_formatter), 6, 1); +x_2 = lean_alloc_closure((void*)(l_Lean_PrettyPrinter_Formatter_many1Unbox_formatter), 6, 1); lean_closure_set(x_2, 0, x_1); return x_2; } @@ -3040,41 +3028,43 @@ return x_2; lean_object* _init_l_Lean_Parser_Term_quot_formatter___closed__5() { _start: { -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Parser_Term_quot_formatter___closed__4; -x_2 = lean_alloc_closure((void*)(l_Lean_Parser_unboxSingleton_formatter), 6, 1); -lean_closure_set(x_2, 0, x_1); -return x_2; -} -} -lean_object* _init_l_Lean_Parser_Term_quot_formatter___closed__6() { -_start: -{ lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_Parser_antiquotNestedExpr_formatter___closed__2; -x_2 = l_Lean_Parser_Term_quot_formatter___closed__5; +x_2 = l_Lean_Parser_Term_quot_formatter___closed__4; x_3 = lean_alloc_closure((void*)(l_Lean_PrettyPrinter_Formatter_orelse_formatter), 7, 2); lean_closure_set(x_3, 0, x_1); lean_closure_set(x_3, 1, x_2); return x_3; } } -lean_object* _init_l_Lean_Parser_Term_quot_formatter___closed__7() { +lean_object* _init_l_Lean_Parser_Term_quot_formatter___closed__6() { _start: { lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Parser_Term_quot_formatter___closed__6; +x_1 = l_Lean_Parser_Term_quot_formatter___closed__5; x_2 = lean_alloc_closure((void*)(l_Lean_PrettyPrinter_Formatter_toggleInsideQuot_formatter), 6, 1); lean_closure_set(x_2, 0, x_1); return x_2; } } +lean_object* _init_l_Lean_Parser_Term_quot_formatter___closed__7() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Parser_Term_quot_formatter___closed__6; +x_2 = l_Lean_Parser_antiquotNestedExpr_formatter___closed__4; +x_3 = lean_alloc_closure((void*)(l_Lean_PrettyPrinter_Formatter_andthen_formatter), 7, 2); +lean_closure_set(x_3, 0, x_1); +lean_closure_set(x_3, 1, x_2); +return x_3; +} +} lean_object* _init_l_Lean_Parser_Term_quot_formatter___closed__8() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Parser_Term_quot_formatter___closed__7; -x_2 = l_Lean_Parser_antiquotNestedExpr_formatter___closed__4; +x_1 = l_Lean_Parser_Term_quot_formatter___closed__2; +x_2 = l_Lean_Parser_Term_quot_formatter___closed__7; x_3 = lean_alloc_closure((void*)(l_Lean_PrettyPrinter_Formatter_andthen_formatter), 7, 2); lean_closure_set(x_3, 0, x_1); lean_closure_set(x_3, 1, x_2); @@ -3084,22 +3074,10 @@ return x_3; lean_object* _init_l_Lean_Parser_Term_quot_formatter___closed__9() { _start: { -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Parser_Term_quot_formatter___closed__2; -x_2 = l_Lean_Parser_Term_quot_formatter___closed__8; -x_3 = lean_alloc_closure((void*)(l_Lean_PrettyPrinter_Formatter_andthen_formatter), 7, 2); -lean_closure_set(x_3, 0, x_1); -lean_closure_set(x_3, 1, x_2); -return x_3; -} -} -lean_object* _init_l_Lean_Parser_Term_quot_formatter___closed__10() { -_start: -{ lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; x_1 = l_Lean_Parser_Term_quot___elambda__1___closed__1; x_2 = lean_unsigned_to_nat(1024u); -x_3 = l_Lean_Parser_Term_quot_formatter___closed__9; +x_3 = l_Lean_Parser_Term_quot_formatter___closed__8; x_4 = lean_alloc_closure((void*)(l_Lean_Parser_leadingNode_formatter___boxed), 8, 3); lean_closure_set(x_4, 0, x_1); lean_closure_set(x_4, 1, x_2); @@ -3112,7 +3090,7 @@ _start: { lean_object* x_6; lean_object* x_7; lean_object* x_8; x_6 = l_Lean_Parser_Term_quot_formatter___closed__1; -x_7 = l_Lean_Parser_Term_quot_formatter___closed__10; +x_7 = l_Lean_Parser_Term_quot_formatter___closed__9; x_8 = l_Lean_PrettyPrinter_Formatter_orelse_formatter(x_6, x_7, x_1, x_2, x_3, x_4, x_5); return x_8; } @@ -3136,14 +3114,6 @@ x_5 = l_Lean_KeyedDeclsAttribute_addBuiltin___rarg(x_2, x_3, x_4, x_1); return x_5; } } -lean_object* l_Lean_Parser_unboxSingleton_parenthesizer(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { -_start: -{ -lean_object* x_7; -x_7 = l_Lean_PrettyPrinter_Parenthesizer_visitArgs(x_1, x_2, x_3, x_4, x_5, x_6); -return x_7; -} -} lean_object* l_Lean_Parser_commandParser_parenthesizer(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: { @@ -3181,7 +3151,7 @@ _start: { lean_object* x_1; lean_object* x_2; x_1 = l_Lean_Parser_Term_quot_parenthesizer___closed__2; -x_2 = lean_alloc_closure((void*)(l_Lean_PrettyPrinter_Parenthesizer_many1_parenthesizer), 6, 1); +x_2 = lean_alloc_closure((void*)(l_Lean_PrettyPrinter_Parenthesizer_many1Unbox_parenthesizer), 6, 1); lean_closure_set(x_2, 0, x_1); return x_2; } @@ -3189,41 +3159,43 @@ return x_2; lean_object* _init_l_Lean_Parser_Term_quot_parenthesizer___closed__4() { _start: { -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Parser_Term_quot_parenthesizer___closed__3; -x_2 = lean_alloc_closure((void*)(l_Lean_Parser_unboxSingleton_parenthesizer), 6, 1); -lean_closure_set(x_2, 0, x_1); -return x_2; -} -} -lean_object* _init_l_Lean_Parser_Term_quot_parenthesizer___closed__5() { -_start: -{ lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_Parser_antiquotNestedExpr_parenthesizer___closed__1; -x_2 = l_Lean_Parser_Term_quot_parenthesizer___closed__4; +x_2 = l_Lean_Parser_Term_quot_parenthesizer___closed__3; x_3 = lean_alloc_closure((void*)(l_Lean_PrettyPrinter_Parenthesizer_orelse_parenthesizer), 7, 2); lean_closure_set(x_3, 0, x_1); lean_closure_set(x_3, 1, x_2); return x_3; } } -lean_object* _init_l_Lean_Parser_Term_quot_parenthesizer___closed__6() { +lean_object* _init_l_Lean_Parser_Term_quot_parenthesizer___closed__5() { _start: { lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Parser_Term_quot_parenthesizer___closed__5; +x_1 = l_Lean_Parser_Term_quot_parenthesizer___closed__4; x_2 = lean_alloc_closure((void*)(l_Lean_PrettyPrinter_Parenthesizer_toggleInsideQuot_parenthesizer), 6, 1); lean_closure_set(x_2, 0, x_1); return x_2; } } +lean_object* _init_l_Lean_Parser_Term_quot_parenthesizer___closed__6() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Parser_Term_quot_parenthesizer___closed__5; +x_2 = l_Lean_Parser_antiquotNestedExpr_parenthesizer___closed__3; +x_3 = lean_alloc_closure((void*)(l_Lean_PrettyPrinter_Parenthesizer_andthen_parenthesizer), 7, 2); +lean_closure_set(x_3, 0, x_1); +lean_closure_set(x_3, 1, x_2); +return x_3; +} +} lean_object* _init_l_Lean_Parser_Term_quot_parenthesizer___closed__7() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Parser_Term_quot_parenthesizer___closed__6; -x_2 = l_Lean_Parser_antiquotNestedExpr_parenthesizer___closed__3; +x_1 = l_Lean_Parser_antiquotNestedExpr_parenthesizer___closed__3; +x_2 = l_Lean_Parser_Term_quot_parenthesizer___closed__6; x_3 = lean_alloc_closure((void*)(l_Lean_PrettyPrinter_Parenthesizer_andthen_parenthesizer), 7, 2); lean_closure_set(x_3, 0, x_1); lean_closure_set(x_3, 1, x_2); @@ -3233,22 +3205,10 @@ return x_3; lean_object* _init_l_Lean_Parser_Term_quot_parenthesizer___closed__8() { _start: { -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Parser_antiquotNestedExpr_parenthesizer___closed__3; -x_2 = l_Lean_Parser_Term_quot_parenthesizer___closed__7; -x_3 = lean_alloc_closure((void*)(l_Lean_PrettyPrinter_Parenthesizer_andthen_parenthesizer), 7, 2); -lean_closure_set(x_3, 0, x_1); -lean_closure_set(x_3, 1, x_2); -return x_3; -} -} -lean_object* _init_l_Lean_Parser_Term_quot_parenthesizer___closed__9() { -_start: -{ lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; x_1 = l_Lean_Parser_Term_quot___elambda__1___closed__1; x_2 = lean_unsigned_to_nat(1024u); -x_3 = l_Lean_Parser_Term_quot_parenthesizer___closed__8; +x_3 = l_Lean_Parser_Term_quot_parenthesizer___closed__7; x_4 = lean_alloc_closure((void*)(l_Lean_PrettyPrinter_Parenthesizer_leadingNode_parenthesizer___boxed), 8, 3); lean_closure_set(x_4, 0, x_1); lean_closure_set(x_4, 1, x_2); @@ -3261,7 +3221,7 @@ _start: { lean_object* x_6; lean_object* x_7; lean_object* x_8; x_6 = l_Lean_Parser_Term_quot_parenthesizer___closed__1; -x_7 = l_Lean_Parser_Term_quot_parenthesizer___closed__9; +x_7 = l_Lean_Parser_Term_quot_parenthesizer___closed__8; x_8 = l_Lean_PrettyPrinter_Parenthesizer_orelse_parenthesizer(x_6, x_7, x_1, x_2, x_3, x_4, x_5); return x_8; } @@ -49282,8 +49242,6 @@ l_Lean_Parser_Term_quot_formatter___closed__8 = _init_l_Lean_Parser_Term_quot_fo lean_mark_persistent(l_Lean_Parser_Term_quot_formatter___closed__8); l_Lean_Parser_Term_quot_formatter___closed__9 = _init_l_Lean_Parser_Term_quot_formatter___closed__9(); lean_mark_persistent(l_Lean_Parser_Term_quot_formatter___closed__9); -l_Lean_Parser_Term_quot_formatter___closed__10 = _init_l_Lean_Parser_Term_quot_formatter___closed__10(); -lean_mark_persistent(l_Lean_Parser_Term_quot_formatter___closed__10); l___regBuiltin_Lean_Parser_Term_quot_formatter___closed__1 = _init_l___regBuiltin_Lean_Parser_Term_quot_formatter___closed__1(); lean_mark_persistent(l___regBuiltin_Lean_Parser_Term_quot_formatter___closed__1); res = l___regBuiltin_Lean_Parser_Term_quot_formatter(lean_io_mk_world()); @@ -49305,8 +49263,6 @@ l_Lean_Parser_Term_quot_parenthesizer___closed__7 = _init_l_Lean_Parser_Term_quo lean_mark_persistent(l_Lean_Parser_Term_quot_parenthesizer___closed__7); l_Lean_Parser_Term_quot_parenthesizer___closed__8 = _init_l_Lean_Parser_Term_quot_parenthesizer___closed__8(); lean_mark_persistent(l_Lean_Parser_Term_quot_parenthesizer___closed__8); -l_Lean_Parser_Term_quot_parenthesizer___closed__9 = _init_l_Lean_Parser_Term_quot_parenthesizer___closed__9(); -lean_mark_persistent(l_Lean_Parser_Term_quot_parenthesizer___closed__9); l___regBuiltin_Lean_Parser_Term_quot_parenthesizer___closed__1 = _init_l___regBuiltin_Lean_Parser_Term_quot_parenthesizer___closed__1(); lean_mark_persistent(l___regBuiltin_Lean_Parser_Term_quot_parenthesizer___closed__1); res = l___regBuiltin_Lean_Parser_Term_quot_parenthesizer(lean_io_mk_world()); diff --git a/stage0/stdlib/Lean/Parser/Syntax.c b/stage0/stdlib/Lean/Parser/Syntax.c index 40c4ab0748..083d40bb15 100644 --- a/stage0/stdlib/Lean/Parser/Syntax.c +++ b/stage0/stdlib/Lean/Parser/Syntax.c @@ -32,7 +32,6 @@ lean_object* l_Lean_Parser_Command_notationItem_parenthesizer___closed__1; lean_object* l_Lean_Parser_maxSymbol___elambda__1___closed__7; lean_object* l_Lean_Parser_Command_prefix___elambda__1___closed__8; lean_object* l_Lean_Parser_Command_macroArgSimple___elambda__1___closed__1; -extern lean_object* l_Lean_Parser_Term_quot_parenthesizer___closed__4; lean_object* l___regBuiltin_Lean_Parser_Command_elab__rules_formatter(lean_object*); lean_object* l_Lean_Parser_Syntax_str___elambda__1(lean_object*, lean_object*); lean_object* l_Lean_Parser_Command_notationItem___closed__4; @@ -175,12 +174,13 @@ lean_object* l_Lean_Parser_Syntax_str___elambda__1___closed__3; lean_object* l_Lean_Parser_Command_macro__rules___elambda__1___closed__4; lean_object* l_Lean_Parser_Command_identPrec___elambda__1(lean_object*, lean_object*); lean_object* l_Lean_Parser_optPrecedence___elambda__1(lean_object*, lean_object*); +extern lean_object* l_Lean_Parser_Tactic_seq1Unbox; lean_object* l___regBuiltin_Lean_Parser_Command_elab_parenthesizer(lean_object*); lean_object* l_Lean_Parser_Command_macroArg_parenthesizer(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Command_syntaxAbbrev___closed__4; +extern lean_object* l_Lean_Parser_Term_quot_formatter___closed__4; lean_object* l_Lean_Parser_Command_macroTailDefault_parenthesizer___closed__4; lean_object* l_Lean_Parser_Command_elab__rules_parenthesizer(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Parser_Tactic_unboxSeq___elambda__1(lean_object*, lean_object*); lean_object* l___regBuiltin_Lean_Parser_Command_macro__rules_formatter(lean_object*); lean_object* l_Lean_Parser_Command_mixfix_formatter___closed__3; extern lean_object* l_Lean_Level_LevelToFormat_Result_format___main___closed__1; @@ -253,7 +253,6 @@ lean_object* l_Lean_Parser_ParserState_mkTrailingNode(lean_object*, lean_object* lean_object* l_Lean_Parser_Command_mixfix___elambda__1(lean_object*, lean_object*); lean_object* l_Lean_Parser_Syntax_cat___closed__2; lean_object* l_Lean_Parser_Command_notation___closed__10; -extern lean_object* l_Lean_Parser_Tactic_unboxSeq; lean_object* l_Lean_Parser_Command_identPrec_parenthesizer___closed__2; lean_object* l_Lean_Parser_addBuiltinParser(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*); lean_object* l_Lean_Parser_regBuiltinSyntaxParserAttr___closed__1; @@ -699,7 +698,6 @@ lean_object* l___regBuiltin_Lean_Parser_Syntax_ident_parenthesizer(lean_object*) lean_object* l_Lean_Parser_Command_syntax___elambda__1___closed__5; lean_object* l_Lean_Parser_Command_infixr_parenthesizer(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Command_elab___elambda__1___closed__2; -extern lean_object* l_Lean_Parser_Term_quot_formatter___closed__5; lean_object* l_Lean_Parser_Syntax_orelse_parenthesizer___closed__1; lean_object* l_Lean_Parser_Syntax_char___elambda__1___closed__2; lean_object* l_Lean_Parser_Command_mixfixKind___closed__1; @@ -838,6 +836,7 @@ lean_object* l_Lean_Parser_Command_notationItem___closed__1; extern lean_object* l___regBuiltinParser_Lean_Parser_Term_str___closed__1; lean_object* l_Lean_Parser_Command_reserve___closed__4; lean_object* l___regBuiltinParser_Lean_Parser_Syntax_paren(lean_object*); +extern lean_object* l_Lean_Parser_Term_quot_parenthesizer___closed__3; lean_object* l_Lean_Parser_Syntax_atom_formatter___closed__1; lean_object* l_Lean_Parser_Command_macro__rules_parenthesizer___closed__4; lean_object* l_Lean_Parser_Command_notation___elambda__1___closed__2; @@ -1078,6 +1077,7 @@ lean_object* l_Lean_Parser_maxSymbol___elambda__1___closed__6; lean_object* l_Lean_Parser_Syntax_cat_formatter(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Term_quot___closed__1; lean_object* l_Lean_Parser_Command_infix_formatter(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Parser_Tactic_seq1Unbox___elambda__1(lean_object*, lean_object*); lean_object* l_Lean_Parser_Syntax_sepBy1___closed__3; lean_object* l_Lean_Parser_Command_macroTailDefault_formatter___closed__5; lean_object* l_Lean_Parser_Command_mixfixKind_formatter___closed__2; @@ -20047,7 +20047,7 @@ if (lean_obj_tag(x_22) == 0) { lean_object* x_23; lean_object* x_24; lean_inc(x_1); -x_23 = l_Lean_Parser_Tactic_unboxSeq___elambda__1(x_1, x_21); +x_23 = l_Lean_Parser_Tactic_seq1Unbox___elambda__1(x_1, x_21); x_24 = lean_ctor_get(x_23, 3); lean_inc(x_24); if (lean_obj_tag(x_24) == 0) @@ -20267,7 +20267,7 @@ lean_object* _init_l_Lean_Parser_Command_macroTailTactic___closed__2() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; -x_1 = l_Lean_Parser_Tactic_unboxSeq; +x_1 = l_Lean_Parser_Tactic_seq1Unbox; x_2 = lean_ctor_get(x_1, 0); lean_inc(x_2); x_3 = l_Lean_Parser_antiquotNestedExpr___closed__2; @@ -22565,7 +22565,7 @@ lean_object* _init_l_Lean_Parser_Command_macroTailCommand_formatter___closed__1( _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Parser_Term_quot_formatter___closed__5; +x_1 = l_Lean_Parser_Term_quot_formatter___closed__4; x_2 = l_Lean_Parser_antiquotNestedExpr_formatter___closed__4; x_3 = lean_alloc_closure((void*)(l_Lean_PrettyPrinter_Formatter_andthen_formatter), 7, 2); lean_closure_set(x_3, 0, x_1); @@ -23116,7 +23116,7 @@ lean_object* _init_l_Lean_Parser_Command_macroTailCommand_parenthesizer___closed _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Parser_Term_quot_parenthesizer___closed__4; +x_1 = l_Lean_Parser_Term_quot_parenthesizer___closed__3; x_2 = l_Lean_Parser_antiquotNestedExpr_parenthesizer___closed__3; x_3 = lean_alloc_closure((void*)(l_Lean_PrettyPrinter_Parenthesizer_andthen_parenthesizer), 7, 2); lean_closure_set(x_3, 0, x_1); diff --git a/stage0/stdlib/Lean/Parser/Tactic.c b/stage0/stdlib/Lean/Parser/Tactic.c index 7bcfd83ae8..ae104cc2da 100644 --- a/stage0/stdlib/Lean/Parser/Tactic.c +++ b/stage0/stdlib/Lean/Parser/Tactic.c @@ -102,6 +102,7 @@ lean_object* l_Lean_Parser_Tactic_matchAlts___closed__3; lean_object* l_Lean_Parser_Tactic_change_parenthesizer___closed__6; lean_object* l_Lean_Parser_Tactic_induction_formatter___closed__10; lean_object* l_Lean_Parser_Tactic_admit_formatter___closed__3; +lean_object* l_Lean_Parser_sepByInfo(lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Term_explicit___closed__2; lean_object* l_Lean_Parser_Tactic_traceState_parenthesizer___closed__1; lean_object* l___regBuiltinParser_Lean_Parser_Tactic_have(lean_object*); @@ -120,6 +121,7 @@ lean_object* l_Lean_Parser_Tactic_paren_parenthesizer___closed__5; lean_object* l_Lean_Parser_Tactic_locationWildcard_parenthesizer___closed__2; lean_object* l_Lean_Parser_Tactic_inductionAlts_parenthesizer___lambda__1___closed__1; extern lean_object* l_Lean_Parser_notFollowedByFn___closed__1; +lean_object* l_Lean_Parser_Tactic_seq1_parenthesizer___closed__1; lean_object* l_Lean_Parser_Tactic_traceState_parenthesizer(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Tactic_intros___elambda__1___closed__5; lean_object* l_Lean_Parser_Tactic_intro___closed__9; @@ -132,7 +134,6 @@ lean_object* l_Lean_Parser_Tactic_matchAlts_parenthesizer___closed__2; extern lean_object* l_Lean_Parser_Term_emptyC___elambda__1___closed__11; extern lean_object* l_Lean_Parser_Term_matchAlts_formatter___lambda__1___closed__6; lean_object* l_Lean_Parser_Tactic_orelse___closed__1; -lean_object* l_Lean_Parser_Tactic_nonEmptySeq___closed__2; lean_object* l_Lean_Parser_Tactic_failIfSuccess___closed__6; lean_object* l___regBuiltin_Lean_Parser_Tactic_orelse_parenthesizer___closed__1; lean_object* l_Lean_Parser_Tactic_underscore___closed__2; @@ -144,6 +145,7 @@ lean_object* l_Lean_Parser_sepBy1Fn___at_Lean_Parser_Tactic_matchAlts___spec__5( lean_object* l_Lean_Parser_Tactic_generalize___closed__6; lean_object* l_Lean_Parser_Tactic_location_formatter(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Tactic_changeWith___elambda__1___closed__2; +lean_object* l_Lean_PrettyPrinter_Parenthesizer_sepBy_parenthesizer(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Tactic_majorPremise___closed__1; lean_object* l___private_Lean_Parser_Basic_2__sepByFnAux___main___at_Lean_Parser_Tactic_inductionAlts___elambda__1___spec__12___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Tactic_have___closed__1; @@ -165,7 +167,7 @@ lean_object* l_Lean_Parser_Tactic_rwRule___elambda__1___closed__4; lean_object* l_Lean_Parser_Tactic_have_formatter___closed__2; lean_object* l_Lean_Parser_Tactic_changeWith; lean_object* l_Lean_Parser_Tactic_revert___elambda__1___closed__6; -extern lean_object* l_Lean_Parser_Tactic_seq; +lean_object* l_Lean_Parser_Tactic_seq; lean_object* l_Lean_Parser_Tactic_majorPremise_parenthesizer___closed__3; lean_object* l_Lean_Parser_Tactic_paren_parenthesizer___closed__3; lean_object* l_Lean_Parser_Tactic_rwRuleSeq___closed__8; @@ -178,6 +180,7 @@ lean_object* l___regBuiltinParser_Lean_Parser_Tactic_admit(lean_object*); lean_object* l_Lean_Parser_Tactic_rewriteSeq___elambda__1(lean_object*, lean_object*); lean_object* l_Lean_Parser_Tactic_intro_formatter___closed__5; lean_object* l_Lean_Parser_Tactic_admit; +extern lean_object* l_Lean_Parser_Tactic_seq1Unbox___closed__2; extern lean_object* l_Lean_Parser_Term_show___elambda__1___closed__1; lean_object* l_Lean_Parser_Tactic_case_formatter___closed__4; lean_object* l___regBuiltin_Lean_Parser_Tactic_rewriteSeq_formatter___closed__1; @@ -204,15 +207,16 @@ lean_object* l_Lean_Parser_Tactic_withAlts_parenthesizer___closed__2; lean_object* l_Lean_Parser_Tactic_location_parenthesizer___closed__7; lean_object* l_Lean_Parser_Tactic_match_formatter___closed__4; lean_object* l_Lean_Parser_Tactic_changeWith___elambda__1___closed__1; +lean_object* l_Lean_Parser_sepByFn___at_Lean_Parser_Tactic_seq___elambda__1___spec__1___boxed(lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltin_Lean_Parser_Tactic_have_parenthesizer(lean_object*); lean_object* l___regBuiltinParser_Lean_Parser_Tactic_introMatch(lean_object*); +lean_object* l_Lean_Parser_sepByFn___at_Lean_Parser_Tactic_seq___elambda__1___spec__1(uint8_t, lean_object*, lean_object*); lean_object* l_Lean_Parser_Tactic_clear_parenthesizer(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Parser_Basic_2__sepByFnAux___main___at_Lean_Parser_Tactic_inductionAlts___elambda__1___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Term_hole___elambda__1(lean_object*, lean_object*); lean_object* l___regBuiltin_Lean_Parser_Tactic_skip_parenthesizer___closed__1; lean_object* l_Lean_Parser_Tactic_intro_parenthesizer___closed__4; lean_object* l_Lean_Parser_Tactic_rwRuleSeq___closed__2; -extern lean_object* l_Lean_Parser_Tactic_unboxSeq_parenthesizer___closed__1; extern lean_object* l_Lean_Parser_Term_match___elambda__1___closed__1; lean_object* l_Lean_Parser_Tactic_refine_x21___closed__7; lean_object* l_Lean_Parser_Tactic_refine_x21_formatter(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -293,6 +297,7 @@ lean_object* l_Lean_Parser_Tactic_inductionAlt; lean_object* l_Lean_Parser_Tactic_assumption_formatter___closed__3; lean_object* l_Lean_Parser_Tactic_generalizingVars_parenthesizer___closed__1; lean_object* l_Lean_Parser_Tactic_skip_parenthesizer___closed__1; +lean_object* l_Lean_Parser_Tactic_seq1_formatter(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_sepBy1Fn___at_Lean_Parser_Tactic_rwRuleSeq___elambda__1___spec__1___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Tactic_matchAlts___closed__4; lean_object* l_Lean_Parser_Tactic_injection_formatter___closed__3; @@ -346,6 +351,7 @@ lean_object* lean_array_get_size(lean_object*); lean_object* l_Lean_Parser_Tactic_intro___elambda__1___closed__3; lean_object* l_Lean_Parser_Tactic_location___elambda__1(lean_object*, lean_object*); lean_object* l_Lean_Parser_Tactic_let___elambda__1___closed__1; +lean_object* l_Lean_Parser_Tactic_seq1; lean_object* l_Lean_Parser_Tactic_refine_parenthesizer(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltin_Lean_Parser_Tactic_revert_formatter(lean_object*); lean_object* lean_string_append(lean_object*, lean_object*); @@ -394,7 +400,6 @@ lean_object* l_Lean_Parser_Tactic_clear___closed__4; lean_object* l___regBuiltin_Lean_Parser_Tactic_assumption_parenthesizer(lean_object*); lean_object* l_Lean_Parser_Tactic_match_formatter___closed__2; lean_object* l_Lean_Parser_Tactic_refine_x21___elambda__1(lean_object*, lean_object*); -lean_object* l_Lean_Parser_Tactic_nonEmptySeq; lean_object* l_Lean_Parser_Tactic_revert___closed__1; lean_object* l_Lean_Parser_Tactic_location___elambda__1___closed__4; lean_object* l_Lean_Parser_Tactic_skip___closed__1; @@ -402,6 +407,7 @@ lean_object* l_Lean_Parser_Tactic_intro___elambda__1___closed__5; lean_object* l_Lean_Parser_Term_sufficesDecl___elambda__1(lean_object*, lean_object*); lean_object* l_Lean_Parser_Tactic_rwRule_formatter___closed__3; extern lean_object* l_Lean_Parser_antiquotNestedExpr_parenthesizer___closed__3; +lean_object* l_Lean_PrettyPrinter_Formatter_sepBy_formatter(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Tactic_have; lean_object* l_Lean_Parser_ParserState_mkErrorsAt(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_mkAntiquot_formatter___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -418,7 +424,6 @@ lean_object* l_Lean_Parser_Tactic_revert___closed__4; lean_object* l_Lean_Parser_Tactic_majorPremise_parenthesizer(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_KeyedDeclsAttribute_addBuiltin___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Tactic_location___elambda__1___closed__9; -lean_object* l_Lean_Parser_Tactic_nonEmptySeq___closed__4; lean_object* l_Lean_Parser_Tactic_ident_x27___elambda__1(lean_object*, lean_object*); lean_object* l_Lean_Parser_Tactic_rwRule___closed__6; lean_object* l___regBuiltin_Lean_Parser_Tactic_generalize_formatter(lean_object*); @@ -489,7 +494,6 @@ lean_object* l_Lean_Parser_Tactic_suffices_formatter___closed__3; lean_object* l_Lean_Parser_Tactic_rwRuleSeq_formatter___closed__5; lean_object* l_Lean_Parser_Tactic_subst___closed__1; lean_object* l_Lean_Parser_Tactic_withIds_formatter___closed__1; -lean_object* l_Lean_Parser_Tactic_nonEmptySeq_formatter___closed__1; lean_object* l_Lean_Parser_Tactic_rewrite___closed__5; lean_object* l_Lean_Parser_Tactic_skip_formatter___closed__1; lean_object* l_Lean_Parser_Tactic_refine___closed__7; @@ -518,6 +522,7 @@ lean_object* l_Lean_Parser_Tactic_inductionAlt_parenthesizer(lean_object*, lean_ lean_object* l_Lean_Parser_Tactic_orelse___elambda__1___closed__4; lean_object* l_Lean_Parser_Tactic_skip_formatter___closed__2; lean_object* l_Lean_Parser_Tactic_refine_parenthesizer___closed__2; +lean_object* l_Lean_Parser_Tactic_seq1_parenthesizer(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Tactic_intros_parenthesizer___closed__2; lean_object* l_Lean_PrettyPrinter_Formatter_trailingNode_formatter(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean___kind_term____x40_Lean_Util_Trace___hyg_3____closed__15; @@ -562,6 +567,7 @@ lean_object* l_Lean_Parser_Tactic_generalize_parenthesizer___closed__8; lean_object* l_Lean_Parser_Tactic_location_formatter___closed__6; lean_object* l_Lean_Parser_Tactic_inductionAlt___closed__10; lean_object* l_Lean_Parser_Tactic_inductionAlt_parenthesizer___closed__2; +lean_object* l_Lean_Parser_Tactic_seq1_formatter___closed__1; lean_object* l_Lean_Parser_Tactic_admit_parenthesizer___closed__1; lean_object* l_Lean_Parser_Tactic_location___closed__6; lean_object* l_Lean_Parser_sepBy1Fn___at_Lean_Parser_Tactic_inductionAlts___elambda__1___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -638,6 +644,7 @@ lean_object* l_Lean_Parser_Tactic_admit___elambda__1___closed__5; lean_object* l_Lean_Parser_Tactic_introMatch___closed__6; lean_object* l_Lean_Parser_Tactic_locationTarget___elambda__1___closed__7; lean_object* l_Lean_Parser_Tactic_inductionAlt_parenthesizer___closed__1; +lean_object* l_Lean_Parser_Tactic_seq___closed__3; lean_object* l_Lean_Parser_Tactic_let_formatter___closed__2; lean_object* l_Lean_Parser_Tactic_assumption___closed__1; lean_object* l_Lean_Parser_Tactic_generalize___closed__12; @@ -709,7 +716,6 @@ lean_object* l___regBuiltin_Lean_Parser_Tactic_clear_formatter___closed__1; lean_object* l___regBuiltin_Lean_Parser_Tactic_done_formatter___closed__1; lean_object* l___regBuiltin_Lean_Parser_Tactic_suffices_formatter(lean_object*); extern lean_object* l_Lean_Parser_Term_typeAscription___elambda__1___closed__3; -lean_object* l_Lean_Parser_sepBy1Fn___at_Lean_Parser_Tactic_nonEmptySeq___elambda__1___spec__1(uint8_t, lean_object*, lean_object*); lean_object* l___regBuiltin_Lean_Parser_Tactic_cases_formatter(lean_object*); lean_object* l_Lean_Parser_Tactic_intro___elambda__1___closed__6; lean_object* l_Lean_Parser_Tactic_case_formatter___closed__2; @@ -741,6 +747,7 @@ lean_object* l___regBuiltin_Lean_Parser_Tactic_suffices_parenthesizer(lean_objec lean_object* l___regBuiltinParser_Lean_Parser_Tactic_let_x21(lean_object*); lean_object* l_Lean_Parser_Tactic_changeWith_formatter(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Tactic_admit___elambda__1___closed__3; +lean_object* l_Lean_Parser_Tactic_seq1___elambda__1(lean_object*, lean_object*); lean_object* l_Lean_Parser_Tactic_assumption___closed__6; extern lean_object* l_Lean_Parser_Term_structInstArrayRef___closed__1; lean_object* l_Lean_Parser_Tactic_induction_formatter___closed__7; @@ -749,7 +756,6 @@ lean_object* l_Lean_Parser_Tactic_induction___closed__7; lean_object* l_Lean_Parser_sepBy1Fn___at_Lean_Parser_Tactic_inductionAlts___elambda__1___spec__9___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Tactic_revert___closed__5; extern lean_object* l_Lean_Parser_Term_have_parenthesizer___closed__2; -lean_object* l_Lean_Parser_Tactic_nonEmptySeq_parenthesizer(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_PrettyPrinter_Formatter_node_formatter(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Term_suffices___elambda__1___closed__9; extern lean_object* l_Lean_PrettyPrinter_Parenthesizer_tactic_parenthesizer___lambda__1___closed__5; @@ -817,6 +823,7 @@ lean_object* l_Lean_Parser_Tactic_ident_x27_formatter(lean_object*, lean_object* lean_object* l_Lean_Parser_Tactic_generalize___closed__11; lean_object* l_Lean_Parser_Tactic_injection___elambda__1___closed__3; lean_object* l___regBuiltin_Lean_Parser_Tactic_match_formatter___closed__1; +lean_object* l_Lean_Parser_Tactic_seq_formatter(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_sepBy1Fn___at_Lean_Parser_Term_tupleTail___elambda__1___spec__1(uint8_t, lean_object*, lean_object*); lean_object* l_Lean_Parser_Tactic_rewrite___elambda__1___closed__3; lean_object* l_Lean_Parser_orelseInfo(lean_object*, lean_object*); @@ -848,7 +855,6 @@ lean_object* l_Lean_Parser_Tactic_rwRuleSeq; lean_object* l_Lean_Parser_Tactic_rewrite___closed__1; extern lean_object* l_Lean_Parser_Term_match___closed__2; lean_object* l_Lean_Parser_Tactic_cases___closed__8; -lean_object* l___private_Lean_Parser_Basic_2__sepByFnAux___main___at_Lean_Parser_Tactic_seq___elambda__1___spec__2(uint8_t, lean_object*, uint8_t, lean_object*, lean_object*); lean_object* l_Lean_Parser_Tactic_usingRec___elambda__1___closed__5; lean_object* l___regBuiltin_Lean_Parser_Tactic_intros_parenthesizer(lean_object*); lean_object* l_Lean_Parser_Tactic_change_formatter___closed__4; @@ -885,6 +891,7 @@ lean_object* l_Lean_Parser_Tactic_skip___elambda__1___closed__5; lean_object* l_Lean_Parser_Tactic_locationWildcard___elambda__1___closed__2; lean_object* l_Lean_Parser_Tactic_refine_formatter___closed__3; lean_object* l_Lean_Parser_Tactic_traceState___closed__6; +lean_object* l_Lean_Parser_Tactic_seq_formatter___closed__1; lean_object* l___regBuiltin_Lean_Parser_Tactic_skip_parenthesizer(lean_object*); lean_object* l_Lean_Parser_Tactic_let___closed__4; lean_object* l_Lean_Parser_Tactic_let_formatter___closed__1; @@ -948,7 +955,6 @@ lean_object* l_Lean_Parser_Tactic_inductionAlt_parenthesizer___closed__3; lean_object* l_Lean_Parser_Tactic_show; lean_object* l___private_Lean_Parser_Basic_2__sepByFnAux___main___at_Lean_Parser_Tactic_inductionAlts___elambda__1___spec__10___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Tactic_admit___closed__1; -lean_object* l_Lean_Parser_sepBy1Fn___at_Lean_Parser_Tactic_nonEmptySeq___elambda__1___spec__1___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_tacticParser_parenthesizer(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Tactic_injection___closed__3; lean_object* l_Lean_Parser_Tactic_change___elambda__1___closed__6; @@ -1014,6 +1020,7 @@ lean_object* l_Lean_Parser_Tactic_apply; extern lean_object* l_Lean_Parser_antiquotNestedExpr_formatter___closed__1; lean_object* l___private_Lean_Parser_Basic_2__sepByFnAux___main___at_Lean_Parser_Tactic_matchAlts___elambda__1___spec__6(lean_object*, lean_object*, uint8_t, lean_object*, uint8_t, lean_object*, lean_object*); lean_object* l_Lean_Parser_Tactic_rwRuleSeq_formatter___closed__2; +lean_object* l_Lean_Parser_sepBy1Fn___at_Lean_Parser_Tactic_seq1Unbox___elambda__1___spec__1(uint8_t, lean_object*, lean_object*); lean_object* l_Lean_Parser_Tactic_assumption___closed__5; lean_object* l___regBuiltin_Lean_Parser_Tactic_orelse_formatter(lean_object*); lean_object* l_Lean_Parser_Tactic_changeWith_formatter___closed__2; @@ -1042,6 +1049,7 @@ lean_object* l_Lean_Parser_Tactic_subst_formatter___closed__2; lean_object* l_Lean_Parser_Tactic_paren___elambda__1___closed__2; lean_object* l_Lean_Parser_Tactic_refine_x21___closed__1; lean_object* l_Lean_Parser_Tactic_underscore_parenthesizer(lean_object*); +lean_object* l_Lean_Parser_Tactic_seq_parenthesizer(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Tactic_intros_formatter___closed__2; lean_object* l_Lean_Parser_Tactic_suffices___closed__2; lean_object* l_Lean_Parser_Tactic_case___elambda__1___closed__1; @@ -1244,7 +1252,6 @@ lean_object* l_Lean_Parser_Tactic_case___closed__1; lean_object* l_Lean_Parser_Tactic_injection___elambda__1___closed__6; lean_object* l_Lean_Parser_Tactic_intros_parenthesizer___closed__1; lean_object* l_Lean_Parser_Tactic_majorPremise___elambda__1___closed__1; -lean_object* l_Lean_Parser_Tactic_nonEmptySeq___closed__3; lean_object* l_Lean_Parser_Tactic_suffices_formatter___closed__2; lean_object* l_Lean_Parser_Tactic_injection_parenthesizer(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Tactic_revert_formatter___closed__5; @@ -1297,6 +1304,7 @@ extern lean_object* l___regBuiltin_Lean_Parser_Term_syntheticHole_formatter___cl extern lean_object* l_Lean_Parser_Term_structInst_formatter___closed__3; lean_object* l_Lean_Parser_Tactic_refine_x21___closed__2; lean_object* l___regBuiltin_Lean_Parser_Tactic_intros_formatter___closed__1; +lean_object* l___private_Lean_Parser_Basic_2__sepByFnAux___main___at_Lean_Parser_Tactic_seq1Unbox___elambda__1___spec__2(uint8_t, lean_object*, uint8_t, lean_object*, lean_object*); lean_object* l_Lean_Parser_Tactic_revert___elambda__1___closed__5; lean_object* l_Lean_Parser_Tactic_apply___elambda__1___closed__6; lean_object* l_Lean_Parser_Tactic_exact_parenthesizer___closed__2; @@ -1386,6 +1394,7 @@ lean_object* l_Lean_Parser_Tactic_show_formatter___closed__2; lean_object* l___regBuiltin_Lean_Parser_Tactic_revert_parenthesizer___closed__1; lean_object* l_Lean_Parser_Tactic_locationWildcard___elambda__1___closed__5; lean_object* l_Lean_Parser_Tactic_withAlts_formatter(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Parser_Tactic_seq1___closed__1; lean_object* l_Lean_Parser_Tactic_intros; lean_object* l_Lean_Parser_Tactic_rewriteSeq___closed__3; lean_object* l_Lean_Parser_Tactic_nestedTacticBlockCurly___elambda__1___closed__3; @@ -1410,6 +1419,7 @@ lean_object* l_Lean_Parser_Tactic_case___closed__7; extern lean_object* l_Lean_Parser_Term_hole; lean_object* l_Lean_Parser_Tactic_underscore_parenthesizer___boxed(lean_object*); lean_object* l_Lean_Parser_Tactic_case_formatter(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Parser_Tactic_nestedTacticBlockCurly_formatter___closed__5; extern lean_object* l___regBuiltin_Lean_Parser_Term_hole_formatter___closed__1; lean_object* l_Lean_Parser_Tactic_exact___closed__4; lean_object* l___regBuiltinParser_Lean_Parser_Tactic_paren(lean_object*); @@ -1420,9 +1430,9 @@ lean_object* l_Lean_Parser_Tactic_locationHyp___elambda__1___closed__4; lean_object* l_String_trim(lean_object*); lean_object* l_Lean_Parser_Tactic_allGoals_formatter___closed__2; lean_object* l___regBuiltin_Lean_Parser_Tactic_traceState_formatter___closed__1; -lean_object* l_Lean_Parser_Tactic_nonEmptySeq___elambda__1(lean_object*, lean_object*); lean_object* l_Lean_Parser_Tactic_withIds_parenthesizer(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Tactic_change_parenthesizer(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Parser_Tactic_nestedTacticBlockCurly_parenthesizer___closed__5; lean_object* l_Lean_Parser_Tactic_change___elambda__1___closed__4; lean_object* l_Lean_Parser_darrow___elambda__1(lean_object*, lean_object*); lean_object* l_Lean_Parser_Tactic_matchAlt_formatter(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -1451,7 +1461,9 @@ lean_object* l_Lean_Parser_Tactic_generalize_formatter___closed__4; lean_object* l_Lean_Parser_Tactic_let___elambda__1___closed__3; lean_object* l___regBuiltin_Lean_Parser_Tactic_intro_formatter(lean_object*); lean_object* l_Lean_Parser_Tactic_show___elambda__1___closed__1; +lean_object* l_Lean_Parser_Tactic_seq___closed__2; lean_object* l_Lean_Parser_Tactic_generalize_formatter(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Parser_Tactic_seq_parenthesizer___closed__1; lean_object* l___regBuiltin_Lean_Parser_Tactic_refine_parenthesizer___closed__1; lean_object* l_Lean_Parser_Tactic_injection_formatter___closed__4; lean_object* l_Lean_Parser_Tactic_generalize___closed__7; @@ -1486,6 +1498,7 @@ lean_object* l_Lean_Parser_Tactic_apply___elambda__1___closed__2; lean_object* l_Lean_Parser_Tactic_let_parenthesizer___closed__2; lean_object* l_Lean_Parser_Tactic_injection; lean_object* l_Lean_Parser_Tactic_induction_formatter___closed__9; +lean_object* l_Lean_Parser_Tactic_seq___closed__1; lean_object* l_Lean_Parser_Tactic_exact___closed__2; lean_object* l_Lean_Parser_Tactic_suffices___elambda__1___closed__3; lean_object* l_Lean_Parser_Tactic_rewrite_parenthesizer___closed__7; @@ -1506,7 +1519,6 @@ lean_object* l_Lean_Parser_Tactic_locationTarget___elambda__1___closed__12; lean_object* l_Lean_Parser_Tactic_induction_parenthesizer___closed__8; lean_object* l_Lean_PrettyPrinter_Parenthesizer_withPosition_parenthesizer(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Tactic_locationHyp___elambda__1___closed__1; -extern lean_object* l_Lean_Parser_Tactic_unboxSeq_formatter___closed__1; extern lean_object* l_Lean_Parser_Term_let_x21___elambda__1___closed__6; lean_object* l_Lean_Parser_Tactic_cases___elambda__1(lean_object*, lean_object*); lean_object* l___regBuiltinParser_Lean_Parser_Tactic_rewrite(lean_object*); @@ -1526,6 +1538,7 @@ lean_object* l_Lean_Parser_Tactic_ident_x27_formatter___closed__1; lean_object* l_Lean_Parser_Tactic_failIfSuccess___elambda__1___closed__8; lean_object* l_Lean_Parser_Tactic_refine_x21___elambda__1___closed__1; lean_object* l_Lean_Parser_Tactic_matchAlts___closed__2; +lean_object* l_Lean_Parser_Tactic_seq1___closed__2; lean_object* l_Lean_Parser_Tactic_exact_formatter___closed__1; lean_object* l_Lean_Parser_Tactic_rwRule___elambda__1___closed__7; lean_object* l_Lean_Parser_Tactic_refine_x21___closed__6; @@ -1636,7 +1649,6 @@ lean_object* l_Lean_Parser_Tactic_assumption___elambda__1(lean_object*, lean_obj lean_object* l_Lean_Parser_Tactic_orelse___elambda__1___closed__5; lean_object* l_Lean_Parser_Tactic_matchAlts; lean_object* l___regBuiltin_Lean_Parser_Tactic_refine_x21_formatter(lean_object*); -lean_object* l_Lean_Parser_Tactic_nonEmptySeq___closed__1; lean_object* l_Lean_Parser_Tactic_locationTarget___elambda__1___closed__9; lean_object* l_Lean_Parser_Tactic_admit_formatter(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Tactic_refine_x21_formatter___closed__3; @@ -1697,11 +1709,9 @@ extern lean_object* l_Lean_Parser_Parser_inhabited___closed__1; lean_object* l_Lean_Parser_Tactic_rewrite_parenthesizer___closed__5; lean_object* l_Lean_Parser_sepBy1Fn___at_Lean_Parser_Tactic_inductionAlts___elambda__1___spec__3(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*); lean_object* l_Lean_Parser_Tactic_refine; -lean_object* l_Lean_Parser_Tactic_nonEmptySeq_formatter(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Tactic_generalize___closed__14; lean_object* l_Lean_Parser_Tactic_introMatch; lean_object* l___regBuiltin_Lean_Parser_Tactic_change_formatter(lean_object*); -lean_object* l_Lean_Parser_Tactic_nonEmptySeq_parenthesizer___closed__1; lean_object* l_Lean_Parser_Tactic_done___closed__6; extern lean_object* l_Lean_Parser_Term_orelse___elambda__1___closed__1; lean_object* l_Lean_Parser_Tactic_generalize___closed__5; @@ -1749,6 +1759,7 @@ lean_object* l_Lean_Parser_Tactic_induction___elambda__1___closed__3; lean_object* l_Lean_Parser_Tactic_case___elambda__1___closed__6; lean_object* l_Lean_Parser_mkAntiquot_parenthesizer___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Tactic_generalize___elambda__1___closed__2; +lean_object* l_Lean_Parser_Tactic_seq___closed__4; lean_object* l_Lean_Parser_Tactic_admit_formatter___closed__2; lean_object* l_Lean_Parser_Tactic_rewrite___closed__10; lean_object* l_Lean_Parser_Tactic_introMatch___elambda__1___closed__4; @@ -1782,7 +1793,7 @@ lean_object* l_Lean_Parser_Tactic_rewrite_formatter___closed__8; lean_object* l_Lean_Parser_andthenFn(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltin_Lean_Parser_Tactic_paren_formatter(lean_object*); extern lean_object* l_Lean_Parser_Term_syntheticHole; -lean_object* l_Lean_Parser_sepBy1Fn___at_Lean_Parser_Tactic_nonEmptySeq___elambda__1___spec__1(uint8_t x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Lean_Parser_sepByFn___at_Lean_Parser_Tactic_seq___elambda__1___spec__1(uint8_t x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; lean_object* x_5; uint8_t x_6; lean_object* x_7; @@ -1790,12 +1801,12 @@ x_4 = lean_ctor_get(x_3, 0); lean_inc(x_4); x_5 = lean_array_get_size(x_4); lean_dec(x_4); -x_6 = 0; -x_7 = l___private_Lean_Parser_Basic_2__sepByFnAux___main___at_Lean_Parser_Tactic_seq___elambda__1___spec__2(x_1, x_5, x_6, x_2, x_3); +x_6 = 1; +x_7 = l___private_Lean_Parser_Basic_2__sepByFnAux___main___at_Lean_Parser_Tactic_seq1Unbox___elambda__1___spec__2(x_1, x_5, x_6, x_2, x_3); return x_7; } } -lean_object* l_Lean_Parser_Tactic_nonEmptySeq___elambda__1(lean_object* x_1, lean_object* x_2) { +lean_object* l_Lean_Parser_Tactic_seq___elambda__1(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; uint8_t x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; @@ -1804,13 +1815,13 @@ lean_inc(x_3); x_4 = lean_array_get_size(x_3); lean_dec(x_3); x_5 = 1; -x_6 = l_Lean_Parser_sepBy1Fn___at_Lean_Parser_Tactic_nonEmptySeq___elambda__1___spec__1(x_5, x_1, x_2); +x_6 = l_Lean_Parser_sepByFn___at_Lean_Parser_Tactic_seq___elambda__1___spec__1(x_5, x_1, x_2); x_7 = l_Lean_PrettyPrinter_Parenthesizer_tactic_parenthesizer___lambda__1___closed__5; x_8 = l_Lean_Parser_ParserState_mkNode(x_6, x_7, x_4); return x_8; } } -lean_object* _init_l_Lean_Parser_Tactic_nonEmptySeq___closed__1() { +lean_object* _init_l_Lean_Parser_Tactic_seq___closed__1() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; @@ -1818,58 +1829,101 @@ x_1 = l_Lean_Parser_Tactic_indentedNonEmptySeq___closed__1; x_2 = lean_ctor_get(x_1, 0); lean_inc(x_2); x_3 = l_Lean_Parser_Tactic_indentedNonEmptySeq___closed__2; -x_4 = l_Lean_Parser_sepBy1Info(x_2, x_3); +x_4 = l_Lean_Parser_sepByInfo(x_2, x_3); return x_4; } } -lean_object* _init_l_Lean_Parser_Tactic_nonEmptySeq___closed__2() { +lean_object* _init_l_Lean_Parser_Tactic_seq___closed__2() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_PrettyPrinter_Parenthesizer_tactic_parenthesizer___lambda__1___closed__5; -x_2 = l_Lean_Parser_Tactic_nonEmptySeq___closed__1; +x_2 = l_Lean_Parser_Tactic_seq___closed__1; x_3 = l_Lean_Parser_nodeInfo(x_1, x_2); return x_3; } } -lean_object* _init_l_Lean_Parser_Tactic_nonEmptySeq___closed__3() { +lean_object* _init_l_Lean_Parser_Tactic_seq___closed__3() { _start: { lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Lean_Parser_Tactic_nonEmptySeq___elambda__1), 2, 0); +x_1 = lean_alloc_closure((void*)(l_Lean_Parser_Tactic_seq___elambda__1), 2, 0); return x_1; } } -lean_object* _init_l_Lean_Parser_Tactic_nonEmptySeq___closed__4() { +lean_object* _init_l_Lean_Parser_Tactic_seq___closed__4() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Parser_Tactic_nonEmptySeq___closed__2; -x_2 = l_Lean_Parser_Tactic_nonEmptySeq___closed__3; +x_1 = l_Lean_Parser_Tactic_seq___closed__2; +x_2 = l_Lean_Parser_Tactic_seq___closed__3; x_3 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_3, 0, x_1); lean_ctor_set(x_3, 1, x_2); return x_3; } } -lean_object* _init_l_Lean_Parser_Tactic_nonEmptySeq() { +lean_object* _init_l_Lean_Parser_Tactic_seq() { _start: { lean_object* x_1; -x_1 = l_Lean_Parser_Tactic_nonEmptySeq___closed__4; +x_1 = l_Lean_Parser_Tactic_seq___closed__4; return x_1; } } -lean_object* l_Lean_Parser_sepBy1Fn___at_Lean_Parser_Tactic_nonEmptySeq___elambda__1___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Lean_Parser_sepByFn___at_Lean_Parser_Tactic_seq___elambda__1___spec__1___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_Parser_sepBy1Fn___at_Lean_Parser_Tactic_nonEmptySeq___elambda__1___spec__1(x_4, x_2, x_3); +x_5 = l_Lean_Parser_sepByFn___at_Lean_Parser_Tactic_seq___elambda__1___spec__1(x_4, x_2, x_3); return x_5; } } +lean_object* l_Lean_Parser_Tactic_seq1___elambda__1(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; lean_object* x_4; uint8_t x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; +x_3 = lean_ctor_get(x_2, 0); +lean_inc(x_3); +x_4 = lean_array_get_size(x_3); +lean_dec(x_3); +x_5 = 1; +x_6 = l_Lean_Parser_sepBy1Fn___at_Lean_Parser_Tactic_seq1Unbox___elambda__1___spec__1(x_5, x_1, x_2); +x_7 = l_Lean_PrettyPrinter_Parenthesizer_tactic_parenthesizer___lambda__1___closed__5; +x_8 = l_Lean_Parser_ParserState_mkNode(x_6, x_7, x_4); +return x_8; +} +} +lean_object* _init_l_Lean_Parser_Tactic_seq1___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_Lean_Parser_Tactic_seq1___elambda__1), 2, 0); +return x_1; +} +} +lean_object* _init_l_Lean_Parser_Tactic_seq1___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Parser_Tactic_seq1Unbox___closed__2; +x_2 = l_Lean_Parser_Tactic_seq1___closed__1; +x_3 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_3, 0, x_1); +lean_ctor_set(x_3, 1, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_Parser_Tactic_seq1() { +_start: +{ +lean_object* x_1; +x_1 = l_Lean_Parser_Tactic_seq1___closed__2; +return x_1; +} +} lean_object* _init_l_Lean_Parser_Tactic_underscoreFn___closed__1() { _start: { @@ -28318,7 +28372,7 @@ if (lean_obj_tag(x_12) == 0) { lean_object* x_13; lean_object* x_14; lean_inc(x_1); -x_13 = l_Lean_Parser_Tactic_nonEmptySeq___elambda__1(x_1, x_11); +x_13 = l_Lean_Parser_Tactic_seq1___elambda__1(x_1, x_11); x_14 = lean_ctor_get(x_13, 3); lean_inc(x_14); if (lean_obj_tag(x_14) == 0) @@ -28533,7 +28587,7 @@ if (lean_obj_tag(x_71) == 0) { lean_object* x_72; lean_object* x_73; lean_inc(x_1); -x_72 = l_Lean_Parser_Tactic_nonEmptySeq___elambda__1(x_1, x_70); +x_72 = l_Lean_Parser_Tactic_seq1___elambda__1(x_1, x_70); x_73 = lean_ctor_get(x_72, 3); lean_inc(x_73); if (lean_obj_tag(x_73) == 0) @@ -28651,7 +28705,7 @@ lean_object* _init_l_Lean_Parser_Tactic_paren___closed__1() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; -x_1 = l_Lean_Parser_Tactic_nonEmptySeq; +x_1 = l_Lean_Parser_Tactic_seq1; x_2 = lean_ctor_get(x_1, 0); lean_inc(x_2); x_3 = l_Lean_Parser_antiquotNestedExpr___closed__2; @@ -28741,7 +28795,7 @@ x_6 = l_Lean_Parser_addBuiltinParser(x_2, x_3, x_4, x_5, x_1); return x_6; } } -lean_object* _init_l_Lean_Parser_Tactic_nonEmptySeq_formatter___closed__1() { +lean_object* _init_l_Lean_Parser_Tactic_seq1_formatter___closed__1() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; @@ -28753,12 +28807,12 @@ lean_closure_set(x_3, 1, x_2); return x_3; } } -lean_object* l_Lean_Parser_Tactic_nonEmptySeq_formatter(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +lean_object* l_Lean_Parser_Tactic_seq1_formatter(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; lean_object* x_7; lean_object* x_8; x_6 = l_Lean_PrettyPrinter_Parenthesizer_tactic_parenthesizer___lambda__1___closed__5; -x_7 = l_Lean_Parser_Tactic_nonEmptySeq_formatter___closed__1; +x_7 = l_Lean_Parser_Tactic_seq1_formatter___closed__1; x_8 = l_Lean_PrettyPrinter_Formatter_node_formatter(x_6, x_7, x_1, x_2, x_3, x_4, x_5); return x_8; } @@ -28782,7 +28836,7 @@ lean_object* _init_l_Lean_Parser_Tactic_paren_formatter___closed__2() { _start: { lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Lean_Parser_Tactic_nonEmptySeq_formatter), 5, 0); +x_1 = lean_alloc_closure((void*)(l_Lean_Parser_Tactic_seq1_formatter), 5, 0); return x_1; } } @@ -28853,7 +28907,7 @@ x_5 = l_Lean_KeyedDeclsAttribute_addBuiltin___rarg(x_2, x_3, x_4, x_1); return x_5; } } -lean_object* _init_l_Lean_Parser_Tactic_nonEmptySeq_parenthesizer___closed__1() { +lean_object* _init_l_Lean_Parser_Tactic_seq1_parenthesizer___closed__1() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; @@ -28865,12 +28919,12 @@ lean_closure_set(x_3, 1, x_2); return x_3; } } -lean_object* l_Lean_Parser_Tactic_nonEmptySeq_parenthesizer(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +lean_object* l_Lean_Parser_Tactic_seq1_parenthesizer(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; lean_object* x_7; lean_object* x_8; x_6 = l_Lean_PrettyPrinter_Parenthesizer_tactic_parenthesizer___lambda__1___closed__5; -x_7 = l_Lean_Parser_Tactic_nonEmptySeq_parenthesizer___closed__1; +x_7 = l_Lean_Parser_Tactic_seq1_parenthesizer___closed__1; x_8 = l_Lean_PrettyPrinter_Parenthesizer_node_parenthesizer(x_6, x_7, x_1, x_2, x_3, x_4, x_5); return x_8; } @@ -28892,7 +28946,7 @@ lean_object* _init_l_Lean_Parser_Tactic_paren_parenthesizer___closed__2() { _start: { lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Lean_Parser_Tactic_nonEmptySeq_parenthesizer), 5, 0); +x_1 = lean_alloc_closure((void*)(l_Lean_Parser_Tactic_seq1_parenthesizer), 5, 0); return x_1; } } @@ -29515,6 +29569,28 @@ x_6 = l_Lean_Parser_addBuiltinParser(x_2, x_3, x_4, x_5, x_1); return x_6; } } +lean_object* _init_l_Lean_Parser_Tactic_seq_formatter___closed__1() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Parser_Tactic_indentedNonEmptySeq_formatter___lambda__1___closed__5; +x_2 = l_Lean_Parser_Tactic_indentedNonEmptySeq_formatter___lambda__1___closed__1; +x_3 = lean_alloc_closure((void*)(l_Lean_PrettyPrinter_Formatter_sepBy_formatter), 7, 2); +lean_closure_set(x_3, 0, x_1); +lean_closure_set(x_3, 1, x_2); +return x_3; +} +} +lean_object* l_Lean_Parser_Tactic_seq_formatter(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; lean_object* x_7; lean_object* x_8; +x_6 = l_Lean_PrettyPrinter_Parenthesizer_tactic_parenthesizer___lambda__1___closed__5; +x_7 = l_Lean_Parser_Tactic_seq_formatter___closed__1; +x_8 = l_Lean_PrettyPrinter_Formatter_node_formatter(x_6, x_7, x_1, x_2, x_3, x_4, x_5); +return x_8; +} +} lean_object* _init_l_Lean_Parser_Tactic_nestedTacticBlockCurly_formatter___closed__1() { _start: { @@ -29533,21 +29609,17 @@ return x_5; lean_object* _init_l_Lean_Parser_Tactic_nestedTacticBlockCurly_formatter___closed__2() { _start: { -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Parser_Tactic_unboxSeq_formatter___closed__1; -x_2 = l_Lean_Parser_Term_emptyC_formatter___closed__4; -x_3 = lean_alloc_closure((void*)(l_Lean_PrettyPrinter_Formatter_andthen_formatter), 7, 2); -lean_closure_set(x_3, 0, x_1); -lean_closure_set(x_3, 1, x_2); -return x_3; +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_Lean_Parser_Tactic_seq_formatter), 5, 0); +return x_1; } } lean_object* _init_l_Lean_Parser_Tactic_nestedTacticBlockCurly_formatter___closed__3() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Parser_Term_emptyC_formatter___closed__3; -x_2 = l_Lean_Parser_Tactic_nestedTacticBlockCurly_formatter___closed__2; +x_1 = l_Lean_Parser_Tactic_nestedTacticBlockCurly_formatter___closed__2; +x_2 = l_Lean_Parser_Term_emptyC_formatter___closed__4; x_3 = lean_alloc_closure((void*)(l_Lean_PrettyPrinter_Formatter_andthen_formatter), 7, 2); lean_closure_set(x_3, 0, x_1); lean_closure_set(x_3, 1, x_2); @@ -29557,10 +29629,22 @@ return x_3; lean_object* _init_l_Lean_Parser_Tactic_nestedTacticBlockCurly_formatter___closed__4() { _start: { +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Parser_Term_emptyC_formatter___closed__3; +x_2 = l_Lean_Parser_Tactic_nestedTacticBlockCurly_formatter___closed__3; +x_3 = lean_alloc_closure((void*)(l_Lean_PrettyPrinter_Formatter_andthen_formatter), 7, 2); +lean_closure_set(x_3, 0, x_1); +lean_closure_set(x_3, 1, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_Parser_Tactic_nestedTacticBlockCurly_formatter___closed__5() { +_start: +{ lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; x_1 = l_Lean_Parser_Tactic_nestedTacticBlockCurly___elambda__1___closed__2; x_2 = lean_unsigned_to_nat(1024u); -x_3 = l_Lean_Parser_Tactic_nestedTacticBlockCurly_formatter___closed__3; +x_3 = l_Lean_Parser_Tactic_nestedTacticBlockCurly_formatter___closed__4; x_4 = lean_alloc_closure((void*)(l_Lean_Parser_leadingNode_formatter___boxed), 8, 3); lean_closure_set(x_4, 0, x_1); lean_closure_set(x_4, 1, x_2); @@ -29573,7 +29657,7 @@ _start: { lean_object* x_6; lean_object* x_7; lean_object* x_8; x_6 = l_Lean_Parser_Tactic_nestedTacticBlockCurly_formatter___closed__1; -x_7 = l_Lean_Parser_Tactic_nestedTacticBlockCurly_formatter___closed__4; +x_7 = l_Lean_Parser_Tactic_nestedTacticBlockCurly_formatter___closed__5; x_8 = l_Lean_PrettyPrinter_Formatter_orelse_formatter(x_6, x_7, x_1, x_2, x_3, x_4, x_5); return x_8; } @@ -29597,6 +29681,28 @@ x_5 = l_Lean_KeyedDeclsAttribute_addBuiltin___rarg(x_2, x_3, x_4, x_1); return x_5; } } +lean_object* _init_l_Lean_Parser_Tactic_seq_parenthesizer___closed__1() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Parser_Tactic_indentedNonEmptySeq_parenthesizer___lambda__1___closed__1; +x_2 = l_Lean_Parser_antiquotNestedExpr_parenthesizer___closed__3; +x_3 = lean_alloc_closure((void*)(l_Lean_PrettyPrinter_Parenthesizer_sepBy_parenthesizer), 7, 2); +lean_closure_set(x_3, 0, x_1); +lean_closure_set(x_3, 1, x_2); +return x_3; +} +} +lean_object* l_Lean_Parser_Tactic_seq_parenthesizer(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; lean_object* x_7; lean_object* x_8; +x_6 = l_Lean_PrettyPrinter_Parenthesizer_tactic_parenthesizer___lambda__1___closed__5; +x_7 = l_Lean_Parser_Tactic_seq_parenthesizer___closed__1; +x_8 = l_Lean_PrettyPrinter_Parenthesizer_node_parenthesizer(x_6, x_7, x_1, x_2, x_3, x_4, x_5); +return x_8; +} +} lean_object* _init_l_Lean_Parser_Tactic_nestedTacticBlockCurly_parenthesizer___closed__1() { _start: { @@ -29613,21 +29719,17 @@ return x_4; lean_object* _init_l_Lean_Parser_Tactic_nestedTacticBlockCurly_parenthesizer___closed__2() { _start: { -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Parser_Tactic_unboxSeq_parenthesizer___closed__1; -x_2 = l_Lean_Parser_antiquotNestedExpr_parenthesizer___closed__3; -x_3 = lean_alloc_closure((void*)(l_Lean_PrettyPrinter_Parenthesizer_andthen_parenthesizer), 7, 2); -lean_closure_set(x_3, 0, x_1); -lean_closure_set(x_3, 1, x_2); -return x_3; +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_Lean_Parser_Tactic_seq_parenthesizer), 5, 0); +return x_1; } } lean_object* _init_l_Lean_Parser_Tactic_nestedTacticBlockCurly_parenthesizer___closed__3() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Parser_antiquotNestedExpr_parenthesizer___closed__3; -x_2 = l_Lean_Parser_Tactic_nestedTacticBlockCurly_parenthesizer___closed__2; +x_1 = l_Lean_Parser_Tactic_nestedTacticBlockCurly_parenthesizer___closed__2; +x_2 = l_Lean_Parser_antiquotNestedExpr_parenthesizer___closed__3; x_3 = lean_alloc_closure((void*)(l_Lean_PrettyPrinter_Parenthesizer_andthen_parenthesizer), 7, 2); lean_closure_set(x_3, 0, x_1); lean_closure_set(x_3, 1, x_2); @@ -29637,10 +29739,22 @@ return x_3; lean_object* _init_l_Lean_Parser_Tactic_nestedTacticBlockCurly_parenthesizer___closed__4() { _start: { +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Parser_antiquotNestedExpr_parenthesizer___closed__3; +x_2 = l_Lean_Parser_Tactic_nestedTacticBlockCurly_parenthesizer___closed__3; +x_3 = lean_alloc_closure((void*)(l_Lean_PrettyPrinter_Parenthesizer_andthen_parenthesizer), 7, 2); +lean_closure_set(x_3, 0, x_1); +lean_closure_set(x_3, 1, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_Parser_Tactic_nestedTacticBlockCurly_parenthesizer___closed__5() { +_start: +{ lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; x_1 = l_Lean_Parser_Tactic_nestedTacticBlockCurly___elambda__1___closed__2; x_2 = lean_unsigned_to_nat(1024u); -x_3 = l_Lean_Parser_Tactic_nestedTacticBlockCurly_parenthesizer___closed__3; +x_3 = l_Lean_Parser_Tactic_nestedTacticBlockCurly_parenthesizer___closed__4; x_4 = lean_alloc_closure((void*)(l_Lean_PrettyPrinter_Parenthesizer_leadingNode_parenthesizer___boxed), 8, 3); lean_closure_set(x_4, 0, x_1); lean_closure_set(x_4, 1, x_2); @@ -29653,7 +29767,7 @@ _start: { lean_object* x_6; lean_object* x_7; lean_object* x_8; x_6 = l_Lean_Parser_Tactic_nestedTacticBlockCurly_parenthesizer___closed__1; -x_7 = l_Lean_Parser_Tactic_nestedTacticBlockCurly_parenthesizer___closed__4; +x_7 = l_Lean_Parser_Tactic_nestedTacticBlockCurly_parenthesizer___closed__5; x_8 = l_Lean_PrettyPrinter_Parenthesizer_orelse_parenthesizer(x_6, x_7, x_1, x_2, x_3, x_4, x_5); return x_8; } @@ -32595,16 +32709,22 @@ lean_dec_ref(res); res = initialize_Lean_Parser_Term(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); -l_Lean_Parser_Tactic_nonEmptySeq___closed__1 = _init_l_Lean_Parser_Tactic_nonEmptySeq___closed__1(); -lean_mark_persistent(l_Lean_Parser_Tactic_nonEmptySeq___closed__1); -l_Lean_Parser_Tactic_nonEmptySeq___closed__2 = _init_l_Lean_Parser_Tactic_nonEmptySeq___closed__2(); -lean_mark_persistent(l_Lean_Parser_Tactic_nonEmptySeq___closed__2); -l_Lean_Parser_Tactic_nonEmptySeq___closed__3 = _init_l_Lean_Parser_Tactic_nonEmptySeq___closed__3(); -lean_mark_persistent(l_Lean_Parser_Tactic_nonEmptySeq___closed__3); -l_Lean_Parser_Tactic_nonEmptySeq___closed__4 = _init_l_Lean_Parser_Tactic_nonEmptySeq___closed__4(); -lean_mark_persistent(l_Lean_Parser_Tactic_nonEmptySeq___closed__4); -l_Lean_Parser_Tactic_nonEmptySeq = _init_l_Lean_Parser_Tactic_nonEmptySeq(); -lean_mark_persistent(l_Lean_Parser_Tactic_nonEmptySeq); +l_Lean_Parser_Tactic_seq___closed__1 = _init_l_Lean_Parser_Tactic_seq___closed__1(); +lean_mark_persistent(l_Lean_Parser_Tactic_seq___closed__1); +l_Lean_Parser_Tactic_seq___closed__2 = _init_l_Lean_Parser_Tactic_seq___closed__2(); +lean_mark_persistent(l_Lean_Parser_Tactic_seq___closed__2); +l_Lean_Parser_Tactic_seq___closed__3 = _init_l_Lean_Parser_Tactic_seq___closed__3(); +lean_mark_persistent(l_Lean_Parser_Tactic_seq___closed__3); +l_Lean_Parser_Tactic_seq___closed__4 = _init_l_Lean_Parser_Tactic_seq___closed__4(); +lean_mark_persistent(l_Lean_Parser_Tactic_seq___closed__4); +l_Lean_Parser_Tactic_seq = _init_l_Lean_Parser_Tactic_seq(); +lean_mark_persistent(l_Lean_Parser_Tactic_seq); +l_Lean_Parser_Tactic_seq1___closed__1 = _init_l_Lean_Parser_Tactic_seq1___closed__1(); +lean_mark_persistent(l_Lean_Parser_Tactic_seq1___closed__1); +l_Lean_Parser_Tactic_seq1___closed__2 = _init_l_Lean_Parser_Tactic_seq1___closed__2(); +lean_mark_persistent(l_Lean_Parser_Tactic_seq1___closed__2); +l_Lean_Parser_Tactic_seq1 = _init_l_Lean_Parser_Tactic_seq1(); +lean_mark_persistent(l_Lean_Parser_Tactic_seq1); l_Lean_Parser_Tactic_underscoreFn___closed__1 = _init_l_Lean_Parser_Tactic_underscoreFn___closed__1(); lean_mark_persistent(l_Lean_Parser_Tactic_underscoreFn___closed__1); l_Lean_Parser_Tactic_underscoreFn___closed__2 = _init_l_Lean_Parser_Tactic_underscoreFn___closed__2(); @@ -34931,8 +35051,8 @@ lean_mark_persistent(l_Lean_Parser_Tactic_paren); res = l___regBuiltinParser_Lean_Parser_Tactic_paren(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); -l_Lean_Parser_Tactic_nonEmptySeq_formatter___closed__1 = _init_l_Lean_Parser_Tactic_nonEmptySeq_formatter___closed__1(); -lean_mark_persistent(l_Lean_Parser_Tactic_nonEmptySeq_formatter___closed__1); +l_Lean_Parser_Tactic_seq1_formatter___closed__1 = _init_l_Lean_Parser_Tactic_seq1_formatter___closed__1(); +lean_mark_persistent(l_Lean_Parser_Tactic_seq1_formatter___closed__1); l_Lean_Parser_Tactic_paren_formatter___closed__1 = _init_l_Lean_Parser_Tactic_paren_formatter___closed__1(); lean_mark_persistent(l_Lean_Parser_Tactic_paren_formatter___closed__1); l_Lean_Parser_Tactic_paren_formatter___closed__2 = _init_l_Lean_Parser_Tactic_paren_formatter___closed__2(); @@ -34948,8 +35068,8 @@ lean_mark_persistent(l___regBuiltin_Lean_Parser_Tactic_paren_formatter___closed_ res = l___regBuiltin_Lean_Parser_Tactic_paren_formatter(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); -l_Lean_Parser_Tactic_nonEmptySeq_parenthesizer___closed__1 = _init_l_Lean_Parser_Tactic_nonEmptySeq_parenthesizer___closed__1(); -lean_mark_persistent(l_Lean_Parser_Tactic_nonEmptySeq_parenthesizer___closed__1); +l_Lean_Parser_Tactic_seq1_parenthesizer___closed__1 = _init_l_Lean_Parser_Tactic_seq1_parenthesizer___closed__1(); +lean_mark_persistent(l_Lean_Parser_Tactic_seq1_parenthesizer___closed__1); l_Lean_Parser_Tactic_paren_parenthesizer___closed__1 = _init_l_Lean_Parser_Tactic_paren_parenthesizer___closed__1(); lean_mark_persistent(l_Lean_Parser_Tactic_paren_parenthesizer___closed__1); l_Lean_Parser_Tactic_paren_parenthesizer___closed__2 = _init_l_Lean_Parser_Tactic_paren_parenthesizer___closed__2(); @@ -34992,6 +35112,8 @@ lean_mark_persistent(l_Lean_Parser_Tactic_nestedTacticBlockCurly); res = l___regBuiltinParser_Lean_Parser_Tactic_nestedTacticBlockCurly(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); +l_Lean_Parser_Tactic_seq_formatter___closed__1 = _init_l_Lean_Parser_Tactic_seq_formatter___closed__1(); +lean_mark_persistent(l_Lean_Parser_Tactic_seq_formatter___closed__1); l_Lean_Parser_Tactic_nestedTacticBlockCurly_formatter___closed__1 = _init_l_Lean_Parser_Tactic_nestedTacticBlockCurly_formatter___closed__1(); lean_mark_persistent(l_Lean_Parser_Tactic_nestedTacticBlockCurly_formatter___closed__1); l_Lean_Parser_Tactic_nestedTacticBlockCurly_formatter___closed__2 = _init_l_Lean_Parser_Tactic_nestedTacticBlockCurly_formatter___closed__2(); @@ -35000,11 +35122,15 @@ l_Lean_Parser_Tactic_nestedTacticBlockCurly_formatter___closed__3 = _init_l_Lean lean_mark_persistent(l_Lean_Parser_Tactic_nestedTacticBlockCurly_formatter___closed__3); l_Lean_Parser_Tactic_nestedTacticBlockCurly_formatter___closed__4 = _init_l_Lean_Parser_Tactic_nestedTacticBlockCurly_formatter___closed__4(); lean_mark_persistent(l_Lean_Parser_Tactic_nestedTacticBlockCurly_formatter___closed__4); +l_Lean_Parser_Tactic_nestedTacticBlockCurly_formatter___closed__5 = _init_l_Lean_Parser_Tactic_nestedTacticBlockCurly_formatter___closed__5(); +lean_mark_persistent(l_Lean_Parser_Tactic_nestedTacticBlockCurly_formatter___closed__5); l___regBuiltin_Lean_Parser_Tactic_nestedTacticBlockCurly_formatter___closed__1 = _init_l___regBuiltin_Lean_Parser_Tactic_nestedTacticBlockCurly_formatter___closed__1(); lean_mark_persistent(l___regBuiltin_Lean_Parser_Tactic_nestedTacticBlockCurly_formatter___closed__1); res = l___regBuiltin_Lean_Parser_Tactic_nestedTacticBlockCurly_formatter(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); +l_Lean_Parser_Tactic_seq_parenthesizer___closed__1 = _init_l_Lean_Parser_Tactic_seq_parenthesizer___closed__1(); +lean_mark_persistent(l_Lean_Parser_Tactic_seq_parenthesizer___closed__1); l_Lean_Parser_Tactic_nestedTacticBlockCurly_parenthesizer___closed__1 = _init_l_Lean_Parser_Tactic_nestedTacticBlockCurly_parenthesizer___closed__1(); lean_mark_persistent(l_Lean_Parser_Tactic_nestedTacticBlockCurly_parenthesizer___closed__1); l_Lean_Parser_Tactic_nestedTacticBlockCurly_parenthesizer___closed__2 = _init_l_Lean_Parser_Tactic_nestedTacticBlockCurly_parenthesizer___closed__2(); @@ -35013,6 +35139,8 @@ l_Lean_Parser_Tactic_nestedTacticBlockCurly_parenthesizer___closed__3 = _init_l_ lean_mark_persistent(l_Lean_Parser_Tactic_nestedTacticBlockCurly_parenthesizer___closed__3); l_Lean_Parser_Tactic_nestedTacticBlockCurly_parenthesizer___closed__4 = _init_l_Lean_Parser_Tactic_nestedTacticBlockCurly_parenthesizer___closed__4(); lean_mark_persistent(l_Lean_Parser_Tactic_nestedTacticBlockCurly_parenthesizer___closed__4); +l_Lean_Parser_Tactic_nestedTacticBlockCurly_parenthesizer___closed__5 = _init_l_Lean_Parser_Tactic_nestedTacticBlockCurly_parenthesizer___closed__5(); +lean_mark_persistent(l_Lean_Parser_Tactic_nestedTacticBlockCurly_parenthesizer___closed__5); l___regBuiltin_Lean_Parser_Tactic_nestedTacticBlockCurly_parenthesizer___closed__1 = _init_l___regBuiltin_Lean_Parser_Tactic_nestedTacticBlockCurly_parenthesizer___closed__1(); lean_mark_persistent(l___regBuiltin_Lean_Parser_Tactic_nestedTacticBlockCurly_parenthesizer___closed__1); res = l___regBuiltin_Lean_Parser_Tactic_nestedTacticBlockCurly_parenthesizer(lean_io_mk_world()); diff --git a/stage0/stdlib/Lean/Parser/Term.c b/stage0/stdlib/Lean/Parser/Term.c index 76e94b2476..f184de3e4e 100644 --- a/stage0/stdlib/Lean/Parser/Term.c +++ b/stage0/stdlib/Lean/Parser/Term.c @@ -177,7 +177,6 @@ lean_object* l_Lean_Parser_Term_sort___elambda__1___closed__8; lean_object* l___regBuiltinParser_Lean_Parser_Term_dollarProj(lean_object*); lean_object* l_Lean_Parser_Term_binderTactic___elambda__1___closed__6; lean_object* l_Lean_Parser_Term_emptyC_parenthesizer(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Parser_Tactic_unboxSeq___closed__3; lean_object* l_Lean_Parser_Term_band_parenthesizer(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_regBuiltinTacticParserAttr___closed__1; lean_object* l_Lean_Parser_Term_letrec_formatter___closed__7; @@ -319,6 +318,7 @@ lean_object* l_Lean_Parser_Term_attributes___elambda__1(lean_object*, lean_objec lean_object* l_Lean_Parser_Term_fun_formatter___closed__3; lean_object* l_Lean_Parser_Term_subtype___closed__6; lean_object* l___regBuiltin_Lean_Parser_Term_bnot_formatter(lean_object*); +lean_object* l_Lean_PrettyPrinter_Parenthesizer_nodeSepBy1Unbox_parenthesizer(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltinParser_Lean_Parser_Term_append(lean_object*); lean_object* l_Lean_Parser_Term_nomatch___elambda__1___closed__5; lean_object* l_Lean_Parser_Term_quotedName_formatter___closed__3; @@ -373,7 +373,6 @@ lean_object* l_Lean_Parser_Tactic_quot_formatter___closed__7; lean_object* l_Lean_Parser_Term_return_formatter(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Level_max_parenthesizer___closed__2; extern lean_object* l_Lean_Parser_mkAntiquot_formatter___closed__3; -lean_object* l_Lean_Parser_Tactic_seq; lean_object* l_Lean_Parser_Term_mod_parenthesizer(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Term_show___elambda__1___closed__8; lean_object* l_Lean_Parser_Term_decide___elambda__1___closed__6; @@ -423,6 +422,7 @@ lean_object* l_Lean_Parser_Term_match_formatter___closed__3; lean_object* l_Lean_Parser_Term_arrayLit___elambda__1___closed__6; lean_object* l_Lean_Parser_Term_subst_parenthesizer___closed__2; lean_object* l_Lean_Parser_Term_nomatch_formatter___closed__3; +lean_object* l_Lean_Parser_Tactic_seq1Unbox___closed__2; lean_object* l_Lean_Parser_Term_show___elambda__1___closed__1; lean_object* l_Lean_Parser_Term_match__syntax___closed__7; lean_object* l_Lean_Parser_Term_match__syntax_formatter(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -486,8 +486,6 @@ lean_object* l___regBuiltin_Lean_Parser_Term_nativeRefl_parenthesizer___closed__ lean_object* l_Lean_Parser_Term_structInstArrayRef___elambda__1___closed__2; lean_object* l_Lean_Parser_Term_seqLeft___elambda__1___closed__1; lean_object* l_Lean_Parser_Term_le_formatter(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Parser_sepByFn___at_Lean_Parser_Tactic_seq___elambda__1___spec__1___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Parser_sepByFn___at_Lean_Parser_Tactic_seq___elambda__1___spec__1(uint8_t, lean_object*, lean_object*); lean_object* l_Lean_Parser_Term_letrec___elambda__1___closed__2; lean_object* l___regBuiltin_Lean_Parser_Term_append_parenthesizer___closed__1; lean_object* l_Lean_Parser_Term_letDecl_formatter___closed__8; @@ -504,7 +502,6 @@ lean_object* l_Lean_Parser_group_formatter(lean_object*, lean_object*, lean_obje lean_object* l_Lean_Parser_Term_attrInstance___closed__1; lean_object* l_Lean_Parser_Term_show_parenthesizer___closed__4; lean_object* l_Lean_Parser_regTacticParserAttribute___closed__2; -lean_object* l_Lean_Parser_Tactic_unboxSeq_parenthesizer___closed__1; lean_object* l_Lean_Parser_Level_quot___closed__4; lean_object* l_Lean_Parser_Term_typeAscription___elambda__1___closed__1; lean_object* l_Lean_Parser_Term_nativeRefl___closed__4; @@ -535,6 +532,7 @@ lean_object* l_Lean_Parser_Term_dbgTrace_parenthesizer___closed__2; lean_object* l_Lean_Parser_Term_explicitUniv_formatter(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltin_Lean_Parser_Term_orelse_parenthesizer(lean_object*); lean_object* l_Lean_Parser_Term_explicitBinder___elambda__1___closed__3; +lean_object* l_Lean_Parser_Tactic_seq1Unbox; lean_object* l_Lean_Parser_Term_and___closed__3; lean_object* l_Lean_Parser_Term_binderTactic_parenthesizer___closed__2; lean_object* l_Lean_Parser_Term_dollar_formatter___closed__1; @@ -567,7 +565,6 @@ lean_object* l_Lean_Parser_Term_type_parenthesizer___closed__5; lean_object* l_Lean_Parser_Term_bor_parenthesizer___closed__1; lean_object* l_Lean_Parser_Term_andM___closed__2; lean_object* l_Lean_Parser_Term_implicitBinder_parenthesizer___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Parser_Tactic_unboxSeq___elambda__1(lean_object*, lean_object*); lean_object* l___regBuiltin_Lean_Parser_Term_emptyC_parenthesizer___closed__1; lean_object* l_Lean_Parser_Term_structInstLVal___closed__10; lean_object* l_Lean_Parser_Term_doId___closed__5; @@ -649,6 +646,7 @@ lean_object* l_Lean_Parser_Term_infixR_parenthesizer___rarg(lean_object*, lean_o lean_object* l_Lean_Parser_Term_simpleBinder_parenthesizer___closed__1; lean_object* l_Lean_Parser_Term_attrInstance___closed__7; lean_object* l_Lean_Parser_Term_bracketedBinder_formatter___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Parser_sepBy1Fn___at_Lean_Parser_Tactic_seq1Unbox___elambda__1___spec__1___boxed(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Parser_Basic_2__sepByFnAux___main___at_Lean_Parser_Term_matchAlts___spec__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Level_quot_formatter___closed__2; lean_object* l_Lean_Parser_Term_depArrow___elambda__1___closed__8; @@ -777,6 +775,7 @@ lean_object* l_Lean_Parser_Term_doPat___closed__4; lean_object* l_Lean_Parser_Term_doId___closed__2; lean_object* l_Lean_Parser_Term_nomatch___elambda__1___closed__4; lean_object* l_Lean_Parser_Term_attributes_formatter___closed__1; +lean_object* l_Lean_Parser_Tactic_seq1Unbox_formatter(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Term_optIdent_formatter___closed__1; lean_object* l_Lean_Parser_strLit_formatter___closed__1; lean_object* l_Lean_Parser_Term_let_formatter___closed__2; @@ -802,7 +801,6 @@ lean_object* l_Lean_Parser_Term_emptyC___elambda__1___closed__12; lean_object* l___regBuiltin_Lean_Parser_Term_dollarProj_formatter___closed__1; lean_object* l___regBuiltin_Lean_Parser_Term_prod_formatter___closed__1; lean_object* l___regBuiltinParser_Lean_Parser_Term_let_x21(lean_object*); -lean_object* l_Lean_Parser_Tactic_unboxSeq; lean_object* l_Lean_Parser_Term_let___elambda__1___closed__7; lean_object* l_Lean_Parser_Term_suffices_parenthesizer___closed__2; lean_object* l___private_Lean_Parser_Basic_2__sepByFnAux___main___at_Lean_Parser_Term_matchAlts___spec__2___closed__2; @@ -1096,7 +1094,6 @@ lean_object* l_Lean_Parser_Term_namedArgument___elambda__1___closed__4; lean_object* l_Lean_PrettyPrinter_Parenthesizer_checkPrec_parenthesizer___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Term_anonymousCtor___closed__2; lean_object* l___regBuiltin_Lean_Parser_Term_app_formatter(lean_object*); -lean_object* l___private_Lean_Parser_Basic_2__sepByFnAux___main___at_Lean_Parser_Tactic_seq___elambda__1___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Term_sort___elambda__1___closed__6; lean_object* l_Lean_Parser_Term_letrec___closed__11; lean_object* l_Lean_Parser_Term_funBinder_quot___elambda__1___closed__10; @@ -1219,6 +1216,7 @@ lean_object* l_Lean_Parser_Term_return_formatter___closed__1; lean_object* l_Lean_Parser_Term_listLit___elambda__1(lean_object*, lean_object*); lean_object* l_Lean_Parser_Term_assert___closed__2; lean_object* l_Lean_Parser_Term_app_parenthesizer___closed__3; +lean_object* l_Lean_Parser_Tactic_seq1Unbox___closed__3; lean_object* l_Lean_Parser_Term_matchAlts___elambda__1___closed__1; lean_object* l_Lean_Parser_Term_uminus_formatter___closed__2; lean_object* l_Lean_Parser_Term_ge___closed__1; @@ -1254,6 +1252,7 @@ lean_object* l_Lean_Parser_Term_typeSpec_formatter(lean_object*, lean_object*, l lean_object* l___regBuiltin_Lean_Parser_Tactic_quot_formatter___closed__1; lean_object* l_Lean_Parser_Term_structInst_parenthesizer___closed__8; extern lean_object* l_Lean_Parser_mkAntiquot___closed__5; +lean_object* l___private_Lean_Parser_Basic_2__sepByFnAux___main___at_Lean_Parser_Tactic_seq1Unbox___elambda__1___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Term_funBinder_quot___elambda__1___closed__7; lean_object* l_Lean_PrettyPrinter_Formatter_trailingNode_formatter(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean___kind_term____x40_Lean_Util_Trace___hyg_3____closed__15; @@ -1517,11 +1516,11 @@ lean_object* l_Lean_Parser_Term_suffices___elambda__1(lean_object*, lean_object* lean_object* l___private_Lean_Parser_Basic_2__sepByFnAux___main___at_Lean_Parser_Term_listLit___elambda__1___spec__2___closed__3; lean_object* l___regBuiltin_Lean_Parser_Term_dollarProj_parenthesizer(lean_object*); lean_object* l_Lean_Parser_Term_fromTerm___closed__2; +lean_object* l_Lean_Parser_Tactic_seq1Unbox___closed__5; lean_object* l_Lean_Parser_symbolFn___boxed(lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltin_Lean_Parser_Term_funBinder_quot_parenthesizer___closed__1; lean_object* l_Lean_Parser_Term_type___elambda__1___closed__5; lean_object* l_Lean_Parser_Term_subst_formatter___closed__2; -lean_object* l_Lean_Parser_Tactic_seq___closed__3; lean_object* l_Lean_Parser_Term_let___closed__4; lean_object* l_Lean_Parser_strLit_parenthesizer___closed__1; lean_object* l_Lean_Parser_Term_letrec_parenthesizer___closed__8; @@ -1982,7 +1981,6 @@ lean_object* l_Lean_Parser_Term_fromTerm___elambda__1___closed__8; lean_object* l_Lean_Parser_Term_forall___elambda__1___closed__9; lean_object* l_Lean_Parser_Term_dollarProj_parenthesizer___closed__1; lean_object* l_Lean_Parser_Term_nomatch_parenthesizer___closed__1; -lean_object* l_Lean_Parser_Tactic_seq_formatter(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Term_cdot___closed__5; lean_object* l_Lean_Parser_sepBy1Fn___at_Lean_Parser_Term_tupleTail___elambda__1___spec__1(uint8_t, lean_object*, lean_object*); lean_object* l_Lean_Parser_Term_emptyC_formatter___closed__2; @@ -2054,7 +2052,6 @@ lean_object* l_Lean_Parser_Term_letIdDecl_formatter___closed__4; lean_object* l_Lean_Parser_Term_match___closed__2; lean_object* l_Lean_Parser_Term_binderIdent___closed__2; lean_object* l_Lean_Parser_Term_dbgTrace___closed__4; -lean_object* l___private_Lean_Parser_Basic_2__sepByFnAux___main___at_Lean_Parser_Tactic_seq___elambda__1___spec__2(uint8_t, lean_object*, uint8_t, lean_object*, lean_object*); lean_object* l_Lean_Parser_darrow___elambda__1___closed__3; lean_object* l_Lean_Parser_Term_structInstArrayRef___closed__5; lean_object* l_Lean_Parser_Term_instBinder___elambda__1___closed__4; @@ -2132,7 +2129,6 @@ lean_object* l_Lean_Parser_darrow___elambda__1___closed__5; lean_object* l_Lean_Parser_Term_beq___closed__4; lean_object* l_Lean_Parser_Term_doSeq_formatter___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Term_orM___elambda__1___closed__2; -lean_object* l_Lean_Parser_Tactic_seq_formatter___closed__1; lean_object* l_Lean_Parser_Term_mod_formatter(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Term_nativeDecide___closed__2; lean_object* l___regBuiltinParser_Lean_Parser_Term_anonymousCtor(lean_object*); @@ -2452,6 +2448,7 @@ lean_object* l_Lean_Parser_Term_sort_formatter___closed__2; lean_object* l___regBuiltin_Lean_Parser_Term_and_formatter(lean_object*); lean_object* l_Lean_Parser_Term_instBinder_formatter___closed__4; lean_object* l_Lean_Parser_Term_not___elambda__1___closed__8; +lean_object* l_Lean_Parser_sepBy1Fn___at_Lean_Parser_Tactic_seq1Unbox___elambda__1___spec__1(uint8_t, lean_object*, lean_object*); lean_object* l_Lean_Parser_Term_match__syntax___closed__4; lean_object* l_Lean_Parser_Term_ellipsis___elambda__1___closed__1; lean_object* l_Lean_Parser_Term_show___closed__7; @@ -2501,7 +2498,6 @@ lean_object* l___regBuiltin_Lean_Parser_Term_explicitUniv_formatter(lean_object* lean_object* l_Lean_Parser_Term_typeAscription_formatter___closed__3; lean_object* l_Lean_Parser_Term_inaccessible___elambda__1___closed__9; lean_object* l___regBuiltinParser_Lean_Parser_Term_nomatch(lean_object*); -lean_object* l_Lean_Parser_Tactic_seq_parenthesizer(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Term_doSeq_parenthesizer___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Term_matchAlts_formatter___lambda__1(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Term_structInstField; @@ -2606,6 +2602,7 @@ lean_object* l_Lean_Parser_Term_binderType___closed__5; lean_object* l_Lean_Parser_Term_explicitUniv___elambda__1___closed__4; lean_object* l___regBuiltin_Lean_Parser_Term_beq_parenthesizer___closed__1; lean_object* l_Lean_Parser_Term_have___elambda__1___closed__8; +lean_object* l_Lean_Parser_Tactic_seq1Unbox_parenthesizer(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Term_fromTerm___elambda__1___closed__6; lean_object* l_Lean_Parser_Term_letIdLhs___closed__2; lean_object* l_Lean_Parser_sepBy1Fn___at_Lean_Parser_Term_matchAlts___spec__9(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*); @@ -2736,6 +2733,7 @@ lean_object* l_Lean_Parser_Term_byTactic___closed__5; lean_object* l_Lean_Parser_Term_proj___closed__7; lean_object* l_Lean_Parser_Term_app_formatter___closed__1; lean_object* l_Lean_Parser_Term_if___elambda__1___closed__4; +lean_object* l_Lean_Parser_Tactic_seq1Unbox___closed__4; lean_object* l_Lean_Parser_Term_structInst_parenthesizer___closed__12; lean_object* l_Lean_Parser_Term_decide___elambda__1(lean_object*, lean_object*); lean_object* l_Lean_Parser_Term_str_parenthesizer___closed__1; @@ -2840,7 +2838,6 @@ lean_object* l_Lean_Parser_Term_doExpr___elambda__1(lean_object*, lean_object*); lean_object* l_Lean_Parser_Term_let___closed__5; lean_object* l_Lean_Parser_Term_structInstArrayRef___closed__8; uint8_t l_Lean_Parser_Term_isIdent(lean_object*); -lean_object* l_Lean_Parser_Tactic_unboxSeq_formatter(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Term_sub___closed__2; lean_object* l_Lean_Parser_Term_byTactic___elambda__1___closed__5; lean_object* l___regBuiltinParser_Lean_Parser_Term_proj(lean_object*); @@ -3124,6 +3121,7 @@ lean_object* l_Lean_Parser_Level_quot___elambda__1___closed__9; lean_object* l_Lean_Parser_Term_binderTactic_formatter___closed__2; lean_object* l_Lean_Parser_Term_explicitBinder___closed__2; lean_object* l_Lean_Parser_Term_doId_formatter(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_PrettyPrinter_Formatter_nodeSepBy1Unbox_formatter(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Term_have___elambda__1___closed__9; lean_object* l_Lean_Parser_Term_lt___closed__4; lean_object* l___regBuiltin_Lean_Parser_Term_arrow_parenthesizer___closed__1; @@ -3185,6 +3183,7 @@ lean_object* l_Lean_Parser_Term_structInst_formatter___closed__3; lean_object* l_Lean_Parser_charLit_parenthesizer___closed__2; lean_object* l_Lean_Parser_Term_structInst___elambda__1___closed__19; lean_object* l_Lean_Parser_Term_mapRev___elambda__1___closed__2; +lean_object* l___private_Lean_Parser_Basic_2__sepByFnAux___main___at_Lean_Parser_Tactic_seq1Unbox___elambda__1___spec__2(uint8_t, lean_object*, uint8_t, lean_object*, lean_object*); lean_object* l_Lean_Parser_Term_namedArgument_parenthesizer___closed__2; lean_object* l_Lean_Parser_Term_add___closed__4; lean_object* l___regBuiltin_Lean_Parser_Term_nativeDecide_formatter___closed__1; @@ -3338,6 +3337,7 @@ lean_object* l_Lean_Parser_Term_or; lean_object* l_Lean_Parser_Term_orM___elambda__1(lean_object*, lean_object*); extern lean_object* l_Lean_Parser_unicodeSymbolFn___closed__1; lean_object* l_Lean_Parser_Term_pow___elambda__1___closed__2; +lean_object* l_Lean_Parser_Tactic_seq1Unbox___elambda__1(lean_object*, lean_object*); lean_object* l_Lean_Parser_Term_bor_formatter(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Term_letDecl___closed__12; lean_object* l_Lean_Parser_Term_binderDefault___elambda__1___closed__1; @@ -3393,7 +3393,6 @@ lean_object* l_Lean_Parser_Term_letIdLhs_formatter___closed__1; lean_object* l_Lean_Parser_Term_ellipsis_formatter___closed__1; lean_object* l___regBuiltin_Lean_Parser_Term_uminus_parenthesizer(lean_object*); lean_object* l_Lean_Parser_Term_syntheticHole___closed__3; -lean_object* l_Lean_Parser_Tactic_unboxSeq_parenthesizer(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Term_map___closed__1; lean_object* l_Lean_Parser_Term_doLet___elambda__1___closed__1; lean_object* l_Lean_Parser_Term_attributes_formatter___closed__5; @@ -3568,13 +3567,11 @@ lean_object* l_Lean_Parser_nameLit_formatter(lean_object*, lean_object*, lean_ob lean_object* l_Lean_Parser_Term_doLet___closed__4; lean_object* l_Lean_Parser_Term_tparser_x21___closed__1; lean_object* l_Lean_Parser_Term_proj_parenthesizer___closed__2; -lean_object* l_Lean_Parser_Tactic_seq___closed__2; lean_object* l_Lean_Parser_Term_match__syntax___elambda__1___closed__3; lean_object* l_Lean_Parser_Term_implicitBinder___closed__2; lean_object* l___private_Lean_Parser_Basic_2__sepByFnAux___main___at_Lean_Parser_Term_subst___elambda__1___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Term_if_formatter___closed__11; lean_object* l_Lean_Parser_Term_panic___elambda__1___closed__8; -lean_object* l_Lean_Parser_Tactic_seq_parenthesizer___closed__1; lean_object* l_Lean_Parser_Term_explicitBinder___closed__4; lean_object* l_Lean_Parser_Term_fun_parenthesizer___closed__1; lean_object* l_Lean_Parser_Term_andM___closed__3; @@ -3654,7 +3651,6 @@ lean_object* l_Lean_Parser_Term_decide___elambda__1___closed__7; lean_object* l_Lean_Parser_Term_inaccessible___elambda__1___closed__6; lean_object* l_Lean_Parser_Term_attributes___elambda__1___closed__1; lean_object* l_Lean_Parser_Term_doId_parenthesizer(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Parser_Tactic_seq___closed__1; lean_object* l_Lean_Parser_nameLit___elambda__1(lean_object*, lean_object*); lean_object* l_Lean_Parser_Term_cons_parenthesizer(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_mkAntiquot___closed__6; @@ -3712,7 +3708,6 @@ lean_object* l_Lean_Parser_Term_typeSpec_parenthesizer(lean_object*, lean_object lean_object* l_Lean_PrettyPrinter_Parenthesizer_withPosition_parenthesizer(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Term_dollarProj___elambda__1___closed__6; lean_object* l_Lean_Parser_Term_parenSpecial_parenthesizer___closed__2; -lean_object* l_Lean_Parser_Tactic_unboxSeq_formatter___closed__1; lean_object* l_Lean_Parser_Term_match_formatter___closed__10; lean_object* l_Lean_Parser_Term_gt___closed__4; lean_object* l_Lean_Parser_Term_seq_parenthesizer___closed__1; @@ -4033,6 +4028,7 @@ lean_object* l_Lean_Parser_Term_bne___elambda__1___closed__1; lean_object* l_Lean_Parser_Tactic_indentedNonEmptySeq_formatter___lambda__1___closed__3; extern lean_object* l_Lean_PrettyPrinter_Parenthesizer_tactic_parenthesizer___lambda__1___closed__4; lean_object* l_Lean_Parser_Term_dollar___closed__1; +lean_object* l_Lean_Parser_Tactic_seq1Unbox___closed__1; lean_object* l___regBuiltin_Lean_Parser_Term_match_formatter(lean_object*); lean_object* l_Lean_Parser_Term_doExpr___elambda__1___closed__3; lean_object* l_Lean_Parser_Term_ellipsis___elambda__1___closed__3; @@ -4140,7 +4136,6 @@ lean_object* l___regBuiltinParser_Lean_Parser_Term_if(lean_object*); lean_object* l_Lean_Parser_Term_arrow___closed__3; lean_object* l_Lean_Parser_Term_modN___closed__4; lean_object* l_Lean_Parser_Term_arrayLit___elambda__1___closed__2; -lean_object* l_Lean_Parser_Tactic_seq___elambda__1(lean_object*, lean_object*); lean_object* l_Lean_Parser_Term_anonymousCtor___elambda__1___closed__6; lean_object* l___regBuiltin_Lean_Parser_Term_not_parenthesizer___closed__1; lean_object* l_Lean_Parser_Term_fromTerm___elambda__1(lean_object*, lean_object*); @@ -4229,7 +4224,6 @@ lean_object* l_Lean_Parser_Term_letIdLhs_formatter___closed__2; lean_object* l___regBuiltin_Lean_Parser_Tactic_quot_parenthesizer___closed__1; lean_object* l_Lean_Parser_Term_bnot___elambda__1(lean_object*, lean_object*); lean_object* l_Lean_Parser_Term_doExpr___closed__5; -lean_object* l_Lean_Parser_Tactic_unboxSeq___closed__2; lean_object* l_Lean_Parser_Term_let; extern lean_object* l_Lean_Parser_mkAntiquot_parenthesizer___rarg___closed__8; lean_object* l_Lean_Parser_Term_bracketedBinder___boxed(lean_object*); @@ -4257,7 +4251,6 @@ lean_object* l_Lean_Parser_Term_mod___elambda__1___closed__2; lean_object* l_Lean_Parser_Term_listLit_formatter___closed__5; lean_object* l_Lean_Parser_Term_modN___closed__1; lean_object* l_Lean_Parser_mkAntiquot_parenthesizer___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Parser_Tactic_seq___closed__4; lean_object* l_Lean_Parser_Term_band___closed__1; lean_object* l_Lean_Parser_Term_parser_x21___closed__6; lean_object* l_Lean_Parser_Term_seq___closed__2; @@ -4337,7 +4330,6 @@ lean_object* l_Lean_Parser_Term_doLet_formatter___closed__1; lean_object* l___regBuiltin_Lean_Parser_Term_andthen_formatter(lean_object*); uint8_t l_Lean_Syntax_isIdent(lean_object*); lean_object* l_Lean_Parser_Term_proj___elambda__1___closed__3; -lean_object* l_Lean_Parser_Tactic_unboxSeq___closed__1; lean_object* l_Lean_PrettyPrinter_Formatter_categoryParser_formatter(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Term_letDecl_parenthesizer___closed__6; lean_object* l_Lean_Parser_Term_show_parenthesizer___closed__2; @@ -81903,7 +81895,7 @@ x_5 = l_Lean_KeyedDeclsAttribute_addBuiltin___rarg(x_2, x_3, x_4, x_1); return x_5; } } -lean_object* l___private_Lean_Parser_Basic_2__sepByFnAux___main___at_Lean_Parser_Tactic_seq___elambda__1___spec__2(uint8_t x_1, lean_object* x_2, uint8_t x_3, lean_object* x_4, lean_object* x_5) { +lean_object* l___private_Lean_Parser_Basic_2__sepByFnAux___main___at_Lean_Parser_Tactic_seq1Unbox___elambda__1___spec__2(uint8_t x_1, lean_object* x_2, uint8_t x_3, lean_object* x_4, lean_object* x_5) { _start: { 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; @@ -82058,7 +82050,7 @@ return x_11; } } } -lean_object* l_Lean_Parser_sepByFn___at_Lean_Parser_Tactic_seq___elambda__1___spec__1(uint8_t x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Lean_Parser_sepBy1Fn___at_Lean_Parser_Tactic_seq1Unbox___elambda__1___spec__1(uint8_t x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; lean_object* x_5; uint8_t x_6; lean_object* x_7; @@ -82066,27 +82058,64 @@ x_4 = lean_ctor_get(x_3, 0); lean_inc(x_4); x_5 = lean_array_get_size(x_4); lean_dec(x_4); -x_6 = 1; -x_7 = l___private_Lean_Parser_Basic_2__sepByFnAux___main___at_Lean_Parser_Tactic_seq___elambda__1___spec__2(x_1, x_5, x_6, x_2, x_3); +x_6 = 0; +x_7 = l___private_Lean_Parser_Basic_2__sepByFnAux___main___at_Lean_Parser_Tactic_seq1Unbox___elambda__1___spec__2(x_1, x_5, x_6, x_2, x_3); return x_7; } } -lean_object* l_Lean_Parser_Tactic_seq___elambda__1(lean_object* x_1, lean_object* x_2) { +lean_object* l_Lean_Parser_Tactic_seq1Unbox___elambda__1(lean_object* x_1, lean_object* x_2) { _start: { -lean_object* x_3; lean_object* x_4; uint8_t x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; +lean_object* x_3; lean_object* x_4; uint8_t x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; x_3 = lean_ctor_get(x_2, 0); lean_inc(x_3); x_4 = lean_array_get_size(x_3); lean_dec(x_3); x_5 = 1; -x_6 = l_Lean_Parser_sepByFn___at_Lean_Parser_Tactic_seq___elambda__1___spec__1(x_5, x_1, x_2); +x_6 = l_Lean_Parser_sepBy1Fn___at_Lean_Parser_Tactic_seq1Unbox___elambda__1___spec__1(x_5, x_1, x_2); x_7 = l_Lean_PrettyPrinter_Parenthesizer_tactic_parenthesizer___lambda__1___closed__5; x_8 = l_Lean_Parser_ParserState_mkNode(x_6, x_7, x_4); +x_9 = lean_ctor_get(x_8, 3); +lean_inc(x_9); +if (lean_obj_tag(x_9) == 0) +{ +lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; uint8_t x_17; +x_10 = lean_ctor_get(x_8, 0); +lean_inc(x_10); +x_11 = l_Array_back___at_Lean_Syntax_Traverser_up___spec__2(x_10); +lean_dec(x_10); +x_12 = l_Lean_Parser_ParserState_popSyntax(x_8); +x_13 = lean_unsigned_to_nat(0u); +x_14 = l_Lean_Syntax_getArg(x_11, x_13); +x_15 = l_Lean_Syntax_getNumArgs(x_14); +x_16 = lean_unsigned_to_nat(2u); +x_17 = lean_nat_dec_lt(x_15, x_16); +lean_dec(x_15); +if (x_17 == 0) +{ +lean_object* x_18; +lean_dec(x_14); +x_18 = l_Lean_Parser_ParserState_pushSyntax(x_12, x_11); +return x_18; +} +else +{ +lean_object* x_19; lean_object* x_20; +lean_dec(x_11); +x_19 = l_Lean_Syntax_getArg(x_14, x_13); +lean_dec(x_14); +x_20 = l_Lean_Parser_ParserState_pushSyntax(x_12, x_19); +return x_20; +} +} +else +{ +lean_dec(x_9); return x_8; } } -lean_object* _init_l_Lean_Parser_Tactic_seq___closed__1() { +} +lean_object* _init_l_Lean_Parser_Tactic_seq1Unbox___closed__1() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; @@ -82094,49 +82123,58 @@ x_1 = l_Lean_Parser_Tactic_indentedNonEmptySeq___closed__1; x_2 = lean_ctor_get(x_1, 0); lean_inc(x_2); x_3 = l_Lean_Parser_Tactic_indentedNonEmptySeq___closed__2; -x_4 = l_Lean_Parser_sepByInfo(x_2, x_3); +x_4 = l_Lean_Parser_sepBy1Info(x_2, x_3); return x_4; } } -lean_object* _init_l_Lean_Parser_Tactic_seq___closed__2() { +lean_object* _init_l_Lean_Parser_Tactic_seq1Unbox___closed__2() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_PrettyPrinter_Parenthesizer_tactic_parenthesizer___lambda__1___closed__5; -x_2 = l_Lean_Parser_Tactic_seq___closed__1; +x_2 = l_Lean_Parser_Tactic_seq1Unbox___closed__1; x_3 = l_Lean_Parser_nodeInfo(x_1, x_2); return x_3; } } -lean_object* _init_l_Lean_Parser_Tactic_seq___closed__3() { +lean_object* _init_l_Lean_Parser_Tactic_seq1Unbox___closed__3() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Parser_Tactic_seq1Unbox___closed__2; +x_2 = l_Lean_Parser_withResultOfInfo(x_1); +return x_2; +} +} +lean_object* _init_l_Lean_Parser_Tactic_seq1Unbox___closed__4() { _start: { lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Lean_Parser_Tactic_seq___elambda__1), 2, 0); +x_1 = lean_alloc_closure((void*)(l_Lean_Parser_Tactic_seq1Unbox___elambda__1), 2, 0); return x_1; } } -lean_object* _init_l_Lean_Parser_Tactic_seq___closed__4() { +lean_object* _init_l_Lean_Parser_Tactic_seq1Unbox___closed__5() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Parser_Tactic_seq___closed__2; -x_2 = l_Lean_Parser_Tactic_seq___closed__3; +x_1 = l_Lean_Parser_Tactic_seq1Unbox___closed__3; +x_2 = l_Lean_Parser_Tactic_seq1Unbox___closed__4; x_3 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_3, 0, x_1); lean_ctor_set(x_3, 1, x_2); return x_3; } } -lean_object* _init_l_Lean_Parser_Tactic_seq() { +lean_object* _init_l_Lean_Parser_Tactic_seq1Unbox() { _start: { lean_object* x_1; -x_1 = l_Lean_Parser_Tactic_seq___closed__4; +x_1 = l_Lean_Parser_Tactic_seq1Unbox___closed__5; return x_1; } } -lean_object* l___private_Lean_Parser_Basic_2__sepByFnAux___main___at_Lean_Parser_Tactic_seq___elambda__1___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +lean_object* l___private_Lean_Parser_Basic_2__sepByFnAux___main___at_Lean_Parser_Tactic_seq1Unbox___elambda__1___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { uint8_t x_6; uint8_t x_7; lean_object* x_8; @@ -82144,104 +82182,20 @@ x_6 = lean_unbox(x_1); lean_dec(x_1); x_7 = lean_unbox(x_3); lean_dec(x_3); -x_8 = l___private_Lean_Parser_Basic_2__sepByFnAux___main___at_Lean_Parser_Tactic_seq___elambda__1___spec__2(x_6, x_2, x_7, x_4, x_5); +x_8 = l___private_Lean_Parser_Basic_2__sepByFnAux___main___at_Lean_Parser_Tactic_seq1Unbox___elambda__1___spec__2(x_6, x_2, x_7, x_4, x_5); return x_8; } } -lean_object* l_Lean_Parser_sepByFn___at_Lean_Parser_Tactic_seq___elambda__1___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Lean_Parser_sepBy1Fn___at_Lean_Parser_Tactic_seq1Unbox___elambda__1___spec__1___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_Parser_sepByFn___at_Lean_Parser_Tactic_seq___elambda__1___spec__1(x_4, x_2, x_3); +x_5 = l_Lean_Parser_sepBy1Fn___at_Lean_Parser_Tactic_seq1Unbox___elambda__1___spec__1(x_4, x_2, x_3); return x_5; } } -lean_object* l_Lean_Parser_Tactic_unboxSeq___elambda__1(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; lean_object* x_4; -x_3 = l_Lean_Parser_Tactic_seq___elambda__1(x_1, x_2); -x_4 = lean_ctor_get(x_3, 3); -lean_inc(x_4); -if (lean_obj_tag(x_4) == 0) -{ -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; uint8_t x_12; -x_5 = lean_ctor_get(x_3, 0); -lean_inc(x_5); -x_6 = l_Array_back___at_Lean_Syntax_Traverser_up___spec__2(x_5); -lean_dec(x_5); -x_7 = l_Lean_Parser_ParserState_popSyntax(x_3); -x_8 = lean_unsigned_to_nat(0u); -x_9 = l_Lean_Syntax_getArg(x_6, x_8); -x_10 = l_Lean_Syntax_getNumArgs(x_9); -x_11 = lean_unsigned_to_nat(2u); -x_12 = lean_nat_dec_lt(x_10, x_11); -lean_dec(x_10); -if (x_12 == 0) -{ -lean_object* x_13; -lean_dec(x_9); -x_13 = l_Lean_Parser_ParserState_pushSyntax(x_7, x_6); -return x_13; -} -else -{ -lean_object* x_14; lean_object* x_15; -lean_dec(x_6); -x_14 = l_Lean_Syntax_getArg(x_9, x_8); -lean_dec(x_9); -x_15 = l_Lean_Parser_ParserState_pushSyntax(x_7, x_14); -return x_15; -} -} -else -{ -lean_dec(x_4); -return x_3; -} -} -} -lean_object* _init_l_Lean_Parser_Tactic_unboxSeq___closed__1() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Parser_Tactic_seq; -x_2 = lean_ctor_get(x_1, 0); -lean_inc(x_2); -x_3 = l_Lean_Parser_withResultOfInfo(x_2); -return x_3; -} -} -lean_object* _init_l_Lean_Parser_Tactic_unboxSeq___closed__2() { -_start: -{ -lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Lean_Parser_Tactic_unboxSeq___elambda__1), 2, 0); -return x_1; -} -} -lean_object* _init_l_Lean_Parser_Tactic_unboxSeq___closed__3() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Parser_Tactic_unboxSeq___closed__1; -x_2 = l_Lean_Parser_Tactic_unboxSeq___closed__2; -x_3 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_3, 0, x_1); -lean_ctor_set(x_3, 1, x_2); -return x_3; -} -} -lean_object* _init_l_Lean_Parser_Tactic_unboxSeq() { -_start: -{ -lean_object* x_1; -x_1 = l_Lean_Parser_Tactic_unboxSeq___closed__3; -return x_1; -} -} lean_object* _init_l_Lean_Parser_Tactic_quot___elambda__1___closed__1() { _start: { @@ -82411,7 +82365,7 @@ lean_inc(x_12); if (lean_obj_tag(x_12) == 0) { lean_object* x_13; lean_object* x_14; lean_object* x_15; -x_13 = l_Lean_Parser_Tactic_unboxSeq___closed__2; +x_13 = l_Lean_Parser_Tactic_seq1Unbox___closed__4; lean_inc(x_1); x_14 = l_Lean_Parser_toggleInsideQuotFn(x_13, x_1, x_11); x_15 = lean_ctor_get(x_14, 3); @@ -82627,7 +82581,7 @@ lean_inc(x_72); if (lean_obj_tag(x_72) == 0) { lean_object* x_73; lean_object* x_74; lean_object* x_75; -x_73 = l_Lean_Parser_Tactic_unboxSeq___closed__2; +x_73 = l_Lean_Parser_Tactic_seq1Unbox___closed__4; lean_inc(x_1); x_74 = l_Lean_Parser_toggleInsideQuotFn(x_73, x_1, x_71); x_75 = lean_ctor_get(x_74, 3); @@ -82834,43 +82788,15 @@ x_6 = l_Lean_Parser_addBuiltinParser(x_2, x_3, x_4, x_5, x_1); return x_6; } } -lean_object* _init_l_Lean_Parser_Tactic_seq_formatter___closed__1() { +lean_object* l_Lean_Parser_Tactic_seq1Unbox_formatter(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Parser_Tactic_indentedNonEmptySeq_formatter___lambda__1___closed__5; -x_2 = l_Lean_Parser_Tactic_indentedNonEmptySeq_formatter___lambda__1___closed__1; -x_3 = lean_alloc_closure((void*)(l_Lean_PrettyPrinter_Formatter_sepBy_formatter), 7, 2); -lean_closure_set(x_3, 0, x_1); -lean_closure_set(x_3, 1, x_2); -return x_3; -} -} -lean_object* l_Lean_Parser_Tactic_seq_formatter(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; lean_object* x_7; lean_object* x_8; +lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; x_6 = l_Lean_PrettyPrinter_Parenthesizer_tactic_parenthesizer___lambda__1___closed__5; -x_7 = l_Lean_Parser_Tactic_seq_formatter___closed__1; -x_8 = l_Lean_PrettyPrinter_Formatter_node_formatter(x_6, x_7, x_1, x_2, x_3, x_4, x_5); -return x_8; -} -} -lean_object* _init_l_Lean_Parser_Tactic_unboxSeq_formatter___closed__1() { -_start: -{ -lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Lean_Parser_Tactic_seq_formatter), 5, 0); -return x_1; -} -} -lean_object* l_Lean_Parser_Tactic_unboxSeq_formatter(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; lean_object* x_7; -x_6 = l_Lean_Parser_Tactic_unboxSeq_formatter___closed__1; -x_7 = l_Lean_PrettyPrinter_Formatter_concatArgs(x_6, x_1, x_2, x_3, x_4, x_5); -return x_7; +x_7 = l_Lean_Parser_Tactic_indentedNonEmptySeq_formatter___lambda__1___closed__5; +x_8 = l_Lean_Parser_Tactic_indentedNonEmptySeq_formatter___lambda__1___closed__1; +x_9 = l_Lean_PrettyPrinter_Formatter_nodeSepBy1Unbox_formatter(x_6, x_7, x_8, x_1, x_2, x_3, x_4, x_5); +return x_9; } } lean_object* _init_l_Lean_Parser_Tactic_quot_formatter___closed__1() { @@ -82902,7 +82828,7 @@ lean_object* _init_l_Lean_Parser_Tactic_quot_formatter___closed__3() { _start: { lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Lean_Parser_Tactic_unboxSeq_formatter), 5, 0); +x_1 = lean_alloc_closure((void*)(l_Lean_Parser_Tactic_seq1Unbox_formatter), 5, 0); return x_1; } } @@ -82983,43 +82909,15 @@ x_5 = l_Lean_KeyedDeclsAttribute_addBuiltin___rarg(x_2, x_3, x_4, x_1); return x_5; } } -lean_object* _init_l_Lean_Parser_Tactic_seq_parenthesizer___closed__1() { +lean_object* l_Lean_Parser_Tactic_seq1Unbox_parenthesizer(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Parser_Tactic_indentedNonEmptySeq_parenthesizer___lambda__1___closed__1; -x_2 = l_Lean_Parser_antiquotNestedExpr_parenthesizer___closed__3; -x_3 = lean_alloc_closure((void*)(l_Lean_PrettyPrinter_Parenthesizer_sepBy_parenthesizer), 7, 2); -lean_closure_set(x_3, 0, x_1); -lean_closure_set(x_3, 1, x_2); -return x_3; -} -} -lean_object* l_Lean_Parser_Tactic_seq_parenthesizer(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; lean_object* x_7; lean_object* x_8; +lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; x_6 = l_Lean_PrettyPrinter_Parenthesizer_tactic_parenthesizer___lambda__1___closed__5; -x_7 = l_Lean_Parser_Tactic_seq_parenthesizer___closed__1; -x_8 = l_Lean_PrettyPrinter_Parenthesizer_node_parenthesizer(x_6, x_7, x_1, x_2, x_3, x_4, x_5); -return x_8; -} -} -lean_object* _init_l_Lean_Parser_Tactic_unboxSeq_parenthesizer___closed__1() { -_start: -{ -lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Lean_Parser_Tactic_seq_parenthesizer), 5, 0); -return x_1; -} -} -lean_object* l_Lean_Parser_Tactic_unboxSeq_parenthesizer(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; lean_object* x_7; -x_6 = l_Lean_Parser_Tactic_unboxSeq_parenthesizer___closed__1; -x_7 = l_Lean_PrettyPrinter_Parenthesizer_visitArgs(x_6, x_1, x_2, x_3, x_4, x_5); -return x_7; +x_7 = l_Lean_Parser_Tactic_indentedNonEmptySeq_parenthesizer___lambda__1___closed__1; +x_8 = l_Lean_Parser_antiquotNestedExpr_parenthesizer___closed__3; +x_9 = l_Lean_PrettyPrinter_Parenthesizer_nodeSepBy1Unbox_parenthesizer(x_6, x_7, x_8, x_1, x_2, x_3, x_4, x_5); +return x_9; } } lean_object* _init_l_Lean_Parser_Tactic_quot_parenthesizer___closed__1() { @@ -83039,7 +82937,7 @@ lean_object* _init_l_Lean_Parser_Tactic_quot_parenthesizer___closed__2() { _start: { lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Lean_Parser_Tactic_unboxSeq_parenthesizer), 5, 0); +x_1 = lean_alloc_closure((void*)(l_Lean_Parser_Tactic_seq1Unbox_parenthesizer), 5, 0); return x_1; } } @@ -90949,24 +90847,18 @@ lean_mark_persistent(l___regBuiltin_Lean_Parser_Term_return_parenthesizer___clos res = l___regBuiltin_Lean_Parser_Term_return_parenthesizer(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); -l_Lean_Parser_Tactic_seq___closed__1 = _init_l_Lean_Parser_Tactic_seq___closed__1(); -lean_mark_persistent(l_Lean_Parser_Tactic_seq___closed__1); -l_Lean_Parser_Tactic_seq___closed__2 = _init_l_Lean_Parser_Tactic_seq___closed__2(); -lean_mark_persistent(l_Lean_Parser_Tactic_seq___closed__2); -l_Lean_Parser_Tactic_seq___closed__3 = _init_l_Lean_Parser_Tactic_seq___closed__3(); -lean_mark_persistent(l_Lean_Parser_Tactic_seq___closed__3); -l_Lean_Parser_Tactic_seq___closed__4 = _init_l_Lean_Parser_Tactic_seq___closed__4(); -lean_mark_persistent(l_Lean_Parser_Tactic_seq___closed__4); -l_Lean_Parser_Tactic_seq = _init_l_Lean_Parser_Tactic_seq(); -lean_mark_persistent(l_Lean_Parser_Tactic_seq); -l_Lean_Parser_Tactic_unboxSeq___closed__1 = _init_l_Lean_Parser_Tactic_unboxSeq___closed__1(); -lean_mark_persistent(l_Lean_Parser_Tactic_unboxSeq___closed__1); -l_Lean_Parser_Tactic_unboxSeq___closed__2 = _init_l_Lean_Parser_Tactic_unboxSeq___closed__2(); -lean_mark_persistent(l_Lean_Parser_Tactic_unboxSeq___closed__2); -l_Lean_Parser_Tactic_unboxSeq___closed__3 = _init_l_Lean_Parser_Tactic_unboxSeq___closed__3(); -lean_mark_persistent(l_Lean_Parser_Tactic_unboxSeq___closed__3); -l_Lean_Parser_Tactic_unboxSeq = _init_l_Lean_Parser_Tactic_unboxSeq(); -lean_mark_persistent(l_Lean_Parser_Tactic_unboxSeq); +l_Lean_Parser_Tactic_seq1Unbox___closed__1 = _init_l_Lean_Parser_Tactic_seq1Unbox___closed__1(); +lean_mark_persistent(l_Lean_Parser_Tactic_seq1Unbox___closed__1); +l_Lean_Parser_Tactic_seq1Unbox___closed__2 = _init_l_Lean_Parser_Tactic_seq1Unbox___closed__2(); +lean_mark_persistent(l_Lean_Parser_Tactic_seq1Unbox___closed__2); +l_Lean_Parser_Tactic_seq1Unbox___closed__3 = _init_l_Lean_Parser_Tactic_seq1Unbox___closed__3(); +lean_mark_persistent(l_Lean_Parser_Tactic_seq1Unbox___closed__3); +l_Lean_Parser_Tactic_seq1Unbox___closed__4 = _init_l_Lean_Parser_Tactic_seq1Unbox___closed__4(); +lean_mark_persistent(l_Lean_Parser_Tactic_seq1Unbox___closed__4); +l_Lean_Parser_Tactic_seq1Unbox___closed__5 = _init_l_Lean_Parser_Tactic_seq1Unbox___closed__5(); +lean_mark_persistent(l_Lean_Parser_Tactic_seq1Unbox___closed__5); +l_Lean_Parser_Tactic_seq1Unbox = _init_l_Lean_Parser_Tactic_seq1Unbox(); +lean_mark_persistent(l_Lean_Parser_Tactic_seq1Unbox); l_Lean_Parser_Tactic_quot___elambda__1___closed__1 = _init_l_Lean_Parser_Tactic_quot___elambda__1___closed__1(); lean_mark_persistent(l_Lean_Parser_Tactic_quot___elambda__1___closed__1); l_Lean_Parser_Tactic_quot___elambda__1___closed__2 = _init_l_Lean_Parser_Tactic_quot___elambda__1___closed__2(); @@ -91002,10 +90894,6 @@ lean_mark_persistent(l_Lean_Parser_Tactic_quot); res = l___regBuiltinParser_Lean_Parser_Tactic_quot(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); -l_Lean_Parser_Tactic_seq_formatter___closed__1 = _init_l_Lean_Parser_Tactic_seq_formatter___closed__1(); -lean_mark_persistent(l_Lean_Parser_Tactic_seq_formatter___closed__1); -l_Lean_Parser_Tactic_unboxSeq_formatter___closed__1 = _init_l_Lean_Parser_Tactic_unboxSeq_formatter___closed__1(); -lean_mark_persistent(l_Lean_Parser_Tactic_unboxSeq_formatter___closed__1); l_Lean_Parser_Tactic_quot_formatter___closed__1 = _init_l_Lean_Parser_Tactic_quot_formatter___closed__1(); lean_mark_persistent(l_Lean_Parser_Tactic_quot_formatter___closed__1); l_Lean_Parser_Tactic_quot_formatter___closed__2 = _init_l_Lean_Parser_Tactic_quot_formatter___closed__2(); @@ -91025,10 +90913,6 @@ lean_mark_persistent(l___regBuiltin_Lean_Parser_Tactic_quot_formatter___closed__ res = l___regBuiltin_Lean_Parser_Tactic_quot_formatter(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); -l_Lean_Parser_Tactic_seq_parenthesizer___closed__1 = _init_l_Lean_Parser_Tactic_seq_parenthesizer___closed__1(); -lean_mark_persistent(l_Lean_Parser_Tactic_seq_parenthesizer___closed__1); -l_Lean_Parser_Tactic_unboxSeq_parenthesizer___closed__1 = _init_l_Lean_Parser_Tactic_unboxSeq_parenthesizer___closed__1(); -lean_mark_persistent(l_Lean_Parser_Tactic_unboxSeq_parenthesizer___closed__1); l_Lean_Parser_Tactic_quot_parenthesizer___closed__1 = _init_l_Lean_Parser_Tactic_quot_parenthesizer___closed__1(); lean_mark_persistent(l_Lean_Parser_Tactic_quot_parenthesizer___closed__1); l_Lean_Parser_Tactic_quot_parenthesizer___closed__2 = _init_l_Lean_Parser_Tactic_quot_parenthesizer___closed__2(); diff --git a/stage0/stdlib/Lean/PrettyPrinter/Formatter.c b/stage0/stdlib/Lean/PrettyPrinter/Formatter.c index 673098f20b..c6cb63e8f3 100644 --- a/stage0/stdlib/Lean/PrettyPrinter/Formatter.c +++ b/stage0/stdlib/Lean/PrettyPrinter/Formatter.c @@ -36,7 +36,6 @@ lean_object* l_Lean_PrettyPrinter_Formatter_quotedSymbol_formatter___closed__3; lean_object* l_Lean_PrettyPrinter_Formatter_nonReservedSymbol_formatter(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_nullKind; lean_object* l_Lean_Syntax_MonadTraverser_goUp___at_Lean_PrettyPrinter_Formatter_visitArgs___spec__4(lean_object*); -lean_object* l_Lean_PrettyPrinter_Formatter_withResultOf_formatter___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_PrettyPrinter_Formatter_many_formatter(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_PrettyPrinter_mkFormatterAttribute___closed__8; lean_object* l_Lean_Format_pretty(lean_object*, lean_object*); @@ -102,7 +101,6 @@ lean_object* l_Lean_Syntax_MonadTraverser_goDown___at_Lean_PrettyPrinter_Formatt lean_object* l_Lean_PrettyPrinter_Formatter_FormatterM_monadTraverser___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_PrettyPrinter_Formatter_fieldIdx_formatter(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_PrettyPrinter_Formatter_sepBy_formatter(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_PrettyPrinter_Formatter_withResultOf_formatter(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_PrettyPrinter_Formatter_unicodeSymbol_formatter___closed__1; lean_object* l_Lean_addTrace___at_Lean_PrettyPrinter_Formatter_checkKind___spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_addMessageDataContextPartial___at_Lean_Core_Lean_AddMessageDataContext___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); @@ -187,6 +185,7 @@ lean_object* l_Lean_PrettyPrinter_Formatter_skip_formatter(lean_object*, lean_ob extern lean_object* l_Lean_charLitKind; lean_object* l_Lean_PrettyPrinter_Formatter_lookahead_formatter___rarg(lean_object*); lean_object* l_Lean_PrettyPrinter_combinatorFormatterAttribute; +lean_object* l_Lean_PrettyPrinter_Formatter_many1Unbox_formatter(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_ParserCompiler_registerCombinatorAttribute(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_PrettyPrinter_Formatter_symbol_formatter(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_PrettyPrinter_Formatter_FormatterM_monadTraverser___lambda__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -291,6 +290,7 @@ lean_object* lean_panic_fn(lean_object*, lean_object*); lean_object* l_Lean_PrettyPrinter_Formatter_getStackSize___boxed(lean_object*); lean_object* l_Lean_PrettyPrinter_format___closed__3; lean_object* l_Lean_PrettyPrinter_Formatter_quotedSymbol_formatter(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_PrettyPrinter_Formatter_nodeSepBy1Unbox_formatter(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_PrettyPrinter_Formatter_categoryParser_formatter___closed__3; lean_object* l_Lean_Syntax_MonadTraverser_getCur___at_Lean_PrettyPrinter_Formatter_visitArgs___spec__1(lean_object*); lean_object* l_StateRefT_x27_get___at_Lean_PrettyPrinter_Formatter_FormatterM_monadTraverser___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); @@ -5510,6 +5510,22 @@ return x_9; lean_object* l_Lean_PrettyPrinter_Formatter_many1_formatter(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { +lean_object* x_7; +x_7 = l_Lean_PrettyPrinter_Formatter_many_formatter(x_1, x_2, x_3, x_4, x_5, x_6); +return x_7; +} +} +lean_object* l_Lean_PrettyPrinter_Formatter_optional_formatter(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; +x_7 = l_Lean_PrettyPrinter_Formatter_concatArgs(x_1, x_2, x_3, x_4, x_5, x_6); +return x_7; +} +} +lean_object* l_Lean_PrettyPrinter_Formatter_many1Unbox_formatter(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; uint8_t x_12; x_7 = l_Lean_Syntax_MonadTraverser_getCur___at_Lean_PrettyPrinter_Formatter_visitArgs___spec__1___rarg(x_3, x_4, x_5, x_6); x_8 = lean_ctor_get(x_7, 0); @@ -5535,31 +5551,6 @@ return x_14; } } } -lean_object* l_Lean_PrettyPrinter_Formatter_optional_formatter(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { -_start: -{ -lean_object* x_7; -x_7 = l_Lean_PrettyPrinter_Formatter_concatArgs(x_1, x_2, x_3, x_4, x_5, x_6); -return x_7; -} -} -lean_object* l_Lean_PrettyPrinter_Formatter_withResultOf_formatter(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -lean_object* x_8; -x_8 = l_Lean_PrettyPrinter_Formatter_concatArgs(x_1, x_3, x_4, x_5, x_6, x_7); -return x_8; -} -} -lean_object* l_Lean_PrettyPrinter_Formatter_withResultOf_formatter___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -lean_object* x_8; -x_8 = l_Lean_PrettyPrinter_Formatter_withResultOf_formatter(x_1, x_2, x_3, x_4, x_5, x_6, x_7); -lean_dec(x_2); -return x_8; -} -} lean_object* l_List_forM___main___at_Lean_PrettyPrinter_Formatter_sepBy_formatter___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { _start: { @@ -5728,6 +5719,38 @@ x_8 = l_Lean_PrettyPrinter_Formatter_sepBy_formatter(x_1, x_2, x_3, x_4, x_5, x_ return x_8; } } +lean_object* l_Lean_PrettyPrinter_Formatter_nodeSepBy1Unbox_formatter(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { +_start: +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; uint8_t x_13; +x_9 = l_Lean_Syntax_MonadTraverser_getCur___at_Lean_PrettyPrinter_Formatter_visitArgs___spec__1___rarg(x_5, x_6, x_7, x_8); +x_10 = lean_ctor_get(x_9, 0); +lean_inc(x_10); +x_11 = lean_ctor_get(x_9, 1); +lean_inc(x_11); +lean_dec(x_9); +x_12 = l_Lean_Syntax_getKind(x_10); +x_13 = lean_name_eq(x_12, x_1); +lean_dec(x_12); +if (x_13 == 0) +{ +lean_object* x_14; +lean_dec(x_3); +lean_dec(x_1); +x_14 = lean_apply_5(x_2, x_4, x_5, x_6, x_7, x_11); +return x_14; +} +else +{ +lean_object* x_15; lean_object* x_16; +x_15 = lean_alloc_closure((void*)(l_Lean_PrettyPrinter_Formatter_sepBy_formatter), 7, 2); +lean_closure_set(x_15, 0, x_2); +lean_closure_set(x_15, 1, x_3); +x_16 = l_Lean_PrettyPrinter_Formatter_node_formatter(x_1, x_15, x_4, x_5, x_6, x_7, x_11); +return x_16; +} +} +} lean_object* _init_l_Lean_PrettyPrinter_Formatter_withPosition_formatter___closed__1() { _start: { diff --git a/stage0/stdlib/Lean/PrettyPrinter/Meta.c b/stage0/stdlib/Lean/PrettyPrinter/Meta.c index f5b7cce94f..1616e82bc0 100644 --- a/stage0/stdlib/Lean/PrettyPrinter/Meta.c +++ b/stage0/stdlib/Lean/PrettyPrinter/Meta.c @@ -108,7 +108,6 @@ lean_object* l_Lean_PrettyPrinter_Formatter_interpretParserDescr___main___elambd lean_object* l_Lean_PrettyPrinter_Formatter_interpretParserDescr___main___elambda__18___closed__1; lean_object* l_Lean_PrettyPrinter_Parenthesizer_interpretParserDescr___main___elambda__10(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_PrettyPrinter_Formatter_interpretParserDescr___main___elambda__11(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_PrettyPrinter_Formatter_many1_formatter(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_PrettyPrinter_Formatter_identNoAntiquot_formatter___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_PrettyPrinter_Parenthesizer_interpretParserDescr(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_PrettyPrinter_Parenthesizer_interpretParserDescr___main___elambda__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -145,7 +144,6 @@ lean_object* l_Lean_PrettyPrinter_Parenthesizer_interpretParserDescr___main___el lean_object* l_Lean_PrettyPrinter_Parenthesizer_trailingNode_parenthesizer(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_PrettyPrinter_Formatter_nameLitNoAntiquot_formatter___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_PrettyPrinter_Parenthesizer_ctx(lean_object*); -lean_object* l_Lean_PrettyPrinter_Parenthesizer_many1_parenthesizer(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_PrettyPrinter_Formatter_interpretParserDescr___main___elambda__14___closed__1; lean_object* l_Lean_PrettyPrinter_Parenthesizer_interpretParserDescr___main___closed__5; lean_object* l_Lean_PrettyPrinter_Formatter_regHook___closed__2; @@ -239,7 +237,7 @@ lean_object* l_Lean_PrettyPrinter_Parenthesizer_interpretParserDescr___main___el _start: { lean_object* x_7; -x_7 = l_Lean_PrettyPrinter_Parenthesizer_many1_parenthesizer(x_1, x_2, x_3, x_4, x_5, x_6); +x_7 = l_Lean_PrettyPrinter_Parenthesizer_many_parenthesizer(x_1, x_2, x_3, x_4, x_5, x_6); return x_7; } } @@ -1656,7 +1654,7 @@ lean_object* l_Lean_PrettyPrinter_Formatter_interpretParserDescr___main___elambd _start: { lean_object* x_7; -x_7 = l_Lean_PrettyPrinter_Formatter_many1_formatter(x_1, x_2, x_3, x_4, x_5, x_6); +x_7 = l_Lean_PrettyPrinter_Formatter_many_formatter(x_1, x_2, x_3, x_4, x_5, x_6); return x_7; } } diff --git a/stage0/stdlib/Lean/PrettyPrinter/Parenthesizer.c b/stage0/stdlib/Lean/PrettyPrinter/Parenthesizer.c index 5713bb70a1..bdde994a4f 100644 --- a/stage0/stdlib/Lean/PrettyPrinter/Parenthesizer.c +++ b/stage0/stdlib/Lean/PrettyPrinter/Parenthesizer.c @@ -44,6 +44,7 @@ extern lean_object* l_Lean_nullKind; lean_object* l_Lean_PrettyPrinter_Parenthesizer_sepBy_parenthesizer(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_MessageData_ofList___closed__3; lean_object* l_Lean_PrettyPrinter_Parenthesizer_throwError___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_PrettyPrinter_Parenthesizer_nodeSepBy1Unbox_parenthesizer(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Syntax_MonadTraverser_goUp___at_Lean_PrettyPrinter_Parenthesizer_visitArgs___spec__4___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Option_HasRepr___rarg___closed__1; lean_object* l_Lean_PrettyPrinter_Parenthesizer_lookahead_parenthesizer___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -190,7 +191,6 @@ lean_object* l_Lean_PrettyPrinter_Parenthesizer_maybeParenthesize___lambda__3___ lean_object* l_Lean_PrettyPrinter_Parenthesizer_throwBacktrack___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_PrettyPrinter_Parenthesizer_maybeParenthesize___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_choiceKind___closed__2; -lean_object* l_Lean_PrettyPrinter_Parenthesizer_withResultOf_parenthesizer___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_PrettyPrinter_Parenthesizer_maybeParenthesize___lambda__1___closed__1; lean_object* l_Lean_PrettyPrinter_Parenthesizer_maybeParenthesize___lambda__1___closed__3; lean_object* l_Lean_PrettyPrinter_Parenthesizer_numLitNoAntiquot_parenthesizer___rarg(lean_object*, lean_object*, lean_object*, lean_object*); @@ -267,6 +267,7 @@ lean_object* l_Lean_Syntax_MonadTraverser_getCur___at_Lean_PrettyPrinter_Parenth lean_object* l_Lean_PrettyPrinter_Parenthesizer_liftCoreM___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_PrettyPrinter_Parenthesizer_orelse___closed__1; lean_object* l_Lean_PrettyPrinter_mkParenthesizerAttribute___closed__13; +lean_object* l_Lean_PrettyPrinter_Parenthesizer_many1Unbox_parenthesizer(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_PrettyPrinter_Parenthesizer_symbol_parenthesizer___boxed(lean_object*); lean_object* l_Lean_PrettyPrinter_mkParenthesizerAttribute___lambda__1___closed__3; lean_object* l_Lean_Syntax_MonadTraverser_getCur___at_Lean_PrettyPrinter_Parenthesizer_visitArgs___spec__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); @@ -353,7 +354,6 @@ lean_object* l_Lean_PrettyPrinter_Parenthesizer_visitToken___boxed(lean_object*) lean_object* l_Lean_PrettyPrinter_Parenthesizer_addPrecCheck(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_panic_fn(lean_object*, lean_object*); extern lean_object* l_Lean_myMacro____x40_Lean_Util_Trace___hyg_11____closed__19; -lean_object* l_Lean_PrettyPrinter_Parenthesizer_withResultOf_parenthesizer(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Syntax_MonadTraverser_goLeft___at_Lean_PrettyPrinter_Parenthesizer_visitArgs___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_PrettyPrinter_Parenthesizer_maybeParenthesize___closed__2; lean_object* l_Lean_PrettyPrinter_Parenthesizer_nameLitNoAntiquot_parenthesizer___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); @@ -8352,6 +8352,14 @@ return x_9; lean_object* l_Lean_PrettyPrinter_Parenthesizer_many1_parenthesizer(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { +lean_object* x_7; +x_7 = l_Lean_PrettyPrinter_Parenthesizer_many_parenthesizer(x_1, x_2, x_3, x_4, x_5, x_6); +return x_7; +} +} +lean_object* l_Lean_PrettyPrinter_Parenthesizer_many1Unbox_parenthesizer(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; uint8_t x_12; x_7 = l_Lean_Syntax_MonadTraverser_getCur___at_Lean_PrettyPrinter_Parenthesizer_visitArgs___spec__1___rarg(x_3, x_4, x_5, x_6); x_8 = lean_ctor_get(x_7, 0); @@ -8385,23 +8393,6 @@ x_7 = l_Lean_PrettyPrinter_Parenthesizer_visitArgs(x_1, x_2, x_3, x_4, x_5, x_6) return x_7; } } -lean_object* l_Lean_PrettyPrinter_Parenthesizer_withResultOf_parenthesizer(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -lean_object* x_8; -x_8 = l_Lean_PrettyPrinter_Parenthesizer_visitArgs(x_1, x_3, x_4, x_5, x_6, x_7); -return x_8; -} -} -lean_object* l_Lean_PrettyPrinter_Parenthesizer_withResultOf_parenthesizer___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -lean_object* x_8; -x_8 = l_Lean_PrettyPrinter_Parenthesizer_withResultOf_parenthesizer(x_1, x_2, x_3, x_4, x_5, x_6, x_7); -lean_dec(x_2); -return x_8; -} -} lean_object* l_List_forM___main___at_Lean_PrettyPrinter_Parenthesizer_sepBy_parenthesizer___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { _start: { @@ -8570,6 +8561,38 @@ x_8 = l_Lean_PrettyPrinter_Parenthesizer_sepBy_parenthesizer(x_1, x_2, x_3, x_4, return x_8; } } +lean_object* l_Lean_PrettyPrinter_Parenthesizer_nodeSepBy1Unbox_parenthesizer(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { +_start: +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; uint8_t x_13; +x_9 = l_Lean_Syntax_MonadTraverser_getCur___at_Lean_PrettyPrinter_Parenthesizer_visitArgs___spec__1___rarg(x_5, x_6, x_7, x_8); +x_10 = lean_ctor_get(x_9, 0); +lean_inc(x_10); +x_11 = lean_ctor_get(x_9, 1); +lean_inc(x_11); +lean_dec(x_9); +x_12 = l_Lean_Syntax_getKind(x_10); +x_13 = lean_name_eq(x_12, x_1); +lean_dec(x_12); +if (x_13 == 0) +{ +lean_object* x_14; +lean_dec(x_3); +lean_dec(x_1); +x_14 = lean_apply_5(x_2, x_4, x_5, x_6, x_7, x_11); +return x_14; +} +else +{ +lean_object* x_15; lean_object* x_16; +x_15 = lean_alloc_closure((void*)(l_Lean_PrettyPrinter_Parenthesizer_sepBy_parenthesizer), 7, 2); +lean_closure_set(x_15, 0, x_2); +lean_closure_set(x_15, 1, x_3); +x_16 = l_Lean_PrettyPrinter_Parenthesizer_node_parenthesizer(x_1, x_15, x_4, x_5, x_6, x_7, x_11); +return x_16; +} +} +} lean_object* _init_l_Lean_PrettyPrinter_Parenthesizer_withPosition_parenthesizer___closed__1() { _start: {