diff --git a/stage0/src/Init/LeanInit.lean b/stage0/src/Init/LeanInit.lean index 1eb5836daa..76fdc08b97 100644 --- a/stage0/src/Init/LeanInit.lean +++ b/stage0/src/Init/LeanInit.lean @@ -155,7 +155,7 @@ inductive ParserDescr | charLit : ParserDescr | nameLit : ParserDescr | ident : ParserDescr -| parser : Name → Nat → ParserDescr +| cat : Name → Nat → ParserDescr instance ParserDescr.inhabited : Inhabited ParserDescr := ⟨ParserDescr.symbol ""⟩ abbrev TrailingParserDescr := ParserDescr diff --git a/stage0/src/Init/System/IO.lean b/stage0/src/Init/System/IO.lean index 497ca064d2..bfae9e2a10 100644 --- a/stage0/src/Init/System/IO.lean +++ b/stage0/src/Init/System/IO.lean @@ -5,6 +5,7 @@ Authors: Luke Nelson, Jared Roesch, Leonardo de Moura, Sebastian Ullrich -/ prelude import Init.Control.EState +import Init.Control.Reader import Init.Data.String.Basic import Init.Data.ByteArray import Init.System.IOError @@ -67,7 +68,15 @@ constant allocprof {α : Type} (msg : @& String) (fn : IO α) : IO α := arbitra @[extern "lean_io_initializing"] constant IO.initializing : IO Bool := arbitrary _ -abbrev MonadIO (m : Type → Type) := HasMonadLiftT IO m +class MonadIO (m : Type → Type) extends HasMonadLiftT IO m, MonadExcept IO.Error m + +instance : MonadIO IO := {} + +/- Omitted instances of MonadIO: OptionT, ExceptT and EStateT. The possibility for +errors introduces the risk that `withStdout` will not restore the previous handle when +an error is returned in the topmost monad. -/ +instance ReaderT.monadIO {ρ} (m : Type → Type) [Monad m] [MonadIO m] : MonadIO (ReaderT ρ m) := {} +instance StateT.monadIO {σ} (m : Type → Type) [Monad m] [MonadIO m] : MonadIO (StateT σ m) := {} namespace IO @@ -87,6 +96,17 @@ constant FS.Handle : Type := Unit namespace Prim open FS +@[extern "lean_get_stdin"] +constant stdin : IO FS.Handle := arbitrary _ +@[extern "lean_get_stdout"] +constant stdout : IO FS.Handle := arbitrary _ +@[extern "lean_get_stderr"] +constant stderr : IO FS.Handle := arbitrary _ + +/-- Run action with `stdin` closed and `stdout+stderr` captured into a `String`. -/ +@[extern "lean_with_isolated_streams"] +constant withIsolatedStreams {α : Type} : IO α → IO (String × Except IO.Error α) := arbitrary _ + @[specialize] partial def iterate {α β : Type} : α → (α → IO (Sum α β)) → IO β | a, f => do v ← f a; @@ -105,8 +125,6 @@ let mode := let bin := if b then "b" else "t"; mode ++ bin -@[extern "lean_io_prim_put_str"] -constant putStr (s: @& String) : IO Unit := arbitrary _ @[extern "lean_io_prim_handle_mk"] constant Handle.mk (s : @& String) (mode : @& String) : IO Handle := arbitrary _ @[extern "lean_io_prim_handle_is_eof"] @@ -119,11 +137,6 @@ constant Handle.read (h : @& Handle) (bytes : USize) : IO ByteArray := arbitrar @[extern "lean_io_prim_handle_write"] constant Handle.write (h : @& Handle) (buffer : @& ByteArray) : IO Unit := arbitrary _ -@[extern "lean_io_prim_handle_read_byte"] -constant Handle.getByte (h : @& Handle) : IO UInt8 := arbitrary _ -@[extern "lean_io_prim_handle_write_byte"] -constant Handle.putByte (h : @& Handle) (c : UInt8) : IO Unit := arbitrary _ - @[extern "lean_io_prim_handle_get_line"] constant Handle.getLine (h : @& Handle) : IO String := arbitrary _ @[extern "lean_io_prim_handle_put_str"] @@ -146,27 +159,6 @@ constant currentDir : IO String := arbitrary _ monadLift x end Prim -section -variables {m : Type → Type} [Monad m] [MonadIO m] - -private def putStr : String → m Unit := -Prim.liftIO ∘ Prim.putStr - -def print {α} [HasToString α] (s : α) : m Unit := putStr ∘ toString $ s -def println {α} [HasToString α] (s : α) : m Unit := print s *> putStr "\n" -def getEnv : String → m (Option String) := Prim.liftIO ∘ Prim.getEnv -def realPath : String → m String := Prim.liftIO ∘ Prim.realPath -def isDir : String → m Bool := Prim.liftIO ∘ Prim.isDir -def fileExists : String → m Bool := Prim.liftIO ∘ Prim.fileExists -def appPath : m String := Prim.liftIO Prim.appPath -def currentDir : m String := Prim.liftIO Prim.currentDir - -def appDir : m String := do -p ← appPath; -realPath (System.FilePath.dirName p) - -end - namespace FS variables {m : Type → Type} [Monad m] [MonadIO m] @@ -174,8 +166,8 @@ def Handle.mk (s : String) (Mode : Mode) (bin : Bool := false) : m Handle := Prim.liftIO (Prim.Handle.mk s (Prim.fopenFlags Mode bin)) @[inline] -def withFile {α} (fn : String) (m : Mode) (f : Handle → IO α) : IO α := -Handle.mk fn m >>= f +def withFile {α} (fn : String) (mode : Mode) (f : Handle → m α) : m α := +Handle.mk fn mode >>= f /-- returns whether the end of the file has been reached while reading a file. `h.isEof` returns true /after/ the first attempt at reading past the end of `h`. @@ -185,8 +177,6 @@ def Handle.isEof : Handle → m Bool := Prim.liftIO ∘ Prim.Handle.isEof def Handle.flush : Handle → m Unit := Prim.liftIO ∘ Prim.Handle.flush def Handle.read (h : Handle) (bytes : Nat) : m ByteArray := Prim.liftIO (Prim.Handle.read h (USize.ofNat bytes)) def Handle.write (h : Handle) (s : ByteArray) : m Unit := Prim.liftIO (Prim.Handle.write h s) -def Handle.getByte (h : Handle) : m UInt8 := Prim.liftIO (Prim.Handle.getByte h) -def Handle.putByte (h : Handle) (b : UInt8) : m Unit := Prim.liftIO (Prim.Handle.putByte h b) def Handle.getLine : Handle → m String := Prim.liftIO ∘ Prim.Handle.getLine @@ -230,9 +220,37 @@ linesAux h #[] end FS --- constant stdin : IO FS.Handle --- constant stderr : IO FS.Handle --- constant stdout : IO FS.Handle +section +variables {m : Type → Type} [Monad m] [MonadIO m] + +def stdin : m FS.Handle := +Prim.liftIO Prim.stdin + +def stdout : m FS.Handle := +Prim.liftIO Prim.stdout + +def stderr : m FS.Handle := +Prim.liftIO Prim.stderr + +private def putStr (s : String) : m Unit := do +out ← stdout; +out.putStr s + +def print {α} [HasToString α] (s : α) : m Unit := putStr ∘ toString $ s +def println {α} [HasToString α] (s : α) : m Unit := print s *> putStr "\n" +def getEnv : String → m (Option String) := Prim.liftIO ∘ Prim.getEnv +def realPath : String → m String := Prim.liftIO ∘ Prim.realPath +def isDir : String → m Bool := Prim.liftIO ∘ Prim.isDir +def fileExists : String → m Bool := Prim.liftIO ∘ Prim.fileExists +def appPath : m String := Prim.liftIO Prim.appPath + +def appDir : m String := do +p ← appPath; +realPath (System.FilePath.dirName p) + +def currentDir : m String := Prim.liftIO Prim.currentDir + +end /- namespace Proc diff --git a/stage0/src/Lean/Elab/Command.lean b/stage0/src/Lean/Elab/Command.lean index 392f6a7835..1c69094623 100644 --- a/stage0/src/Lean/Elab/Command.lean +++ b/stage0/src/Lean/Elab/Command.lean @@ -534,6 +534,58 @@ when succeeded $ @[builtinCommandElab «check_failure»] def elabCheckFailure : CommandElab := fun stx => failIfSucceeds stx $ elabCheck stx +def addDecl (ref : Syntax) (decl : Declaration) : CommandElabM Unit := liftTermElabM none $ Term.addDecl ref decl +def compileDecl (ref : Syntax) (decl : Declaration) : CommandElabM Unit := liftTermElabM none $ Term.compileDecl ref decl + +unsafe def elabEvalUnsafe : CommandElab := +fun stx => withoutModifyingEnv do + let ref := stx; + let term := stx.getArg 1; + let n := `_eval; + ctx ← read; + env ← getEnv; + let addAndCompile := fun value => do { + type ← Term.inferType ref value; + let decl := Declaration.defnDecl { name := n, lparams := [], type := type, + value := value, hints := ReducibilityHints.opaque, isUnsafe := true }; + Term.addDecl ref decl; + Term.compileDecl ref decl + }; + act ← runTermElabM (some n) fun _ => do { + e ← Term.elabTerm term none; + Term.synthesizeSyntheticMVars false; + if env.contains `Lean.MetaHasEval then do + -- modify `e` to `fun env opts => MetaHasEval.eval (hideUnit := false) env opts e` + e ← Term.withLocalDecl ref `env BinderInfo.default (mkConst `Lean.Environment) fun env => + Term.withLocalDecl ref `opts BinderInfo.default (mkConst `Lean.Options) fun opts => do { + e ← Term.mkAppM ref `Lean.MetaHasEval.eval #[env, opts, e, toExpr false]; + Term.mkLambda ref #[env, opts] e + }; + addAndCompile e; + env ← Term.getEnv; + opts ← Term.getOptions; + match env.evalConst (Environment → Options → IO Unit) n with + | Except.error e => Term.throwError ref e + | Except.ok act => pure $ act env opts + else do + -- fall back to non-meta eval if MetaHasEval hasn't been defined yet + -- modify e to `HasEval.eval (hideUnit := false) e` + e ← Term.mkAppM ref `Lean.HasEval.eval #[e, toExpr false]; + addAndCompile e; + env ← Term.getEnv; + match env.evalConst (IO Unit) n with + | Except.error e => Term.throwError ref e + | Except.ok act => pure act + }; + (out, res) ← liftIO ref $ IO.Prim.withIsolatedStreams act; + logInfo ref out; + match res with + | Except.error e => throw $ Exception.error $ ioErrorToMessage ctx ref e + | Except.ok _ => pure () + +@[builtinCommandElab «eval», implementedBy elabEvalUnsafe] +constant elabEval : CommandElab := arbitrary _ + @[builtinCommandElab «synth»] def elabSynth : CommandElab := fun stx => do let ref := stx; @@ -628,9 +680,6 @@ let remaining := usedParams.filter (fun levelParam => !explicitParams.elem level let remaining := remaining.qsort Name.lt; result ++ remaining.toList -def addDecl (ref : Syntax) (decl : Declaration) : CommandElabM Unit := liftTermElabM none $ Term.addDecl ref decl -def compileDecl (ref : Syntax) (decl : Declaration) : CommandElabM Unit := liftTermElabM none $ Term.compileDecl ref decl - end Command end Elab end Lean diff --git a/stage0/src/Lean/Elab/DeclModifiers.lean b/stage0/src/Lean/Elab/DeclModifiers.lean index aedbd65539..7ff13d7053 100644 --- a/stage0/src/Lean/Elab/DeclModifiers.lean +++ b/stage0/src/Lean/Elab/DeclModifiers.lean @@ -64,6 +64,8 @@ env ← getEnv; unless (isAttribute env attrName) $ throwError stx ("unknown attribute [" ++ attrName ++ "]"); let args := stx.getArg 1; +-- the old frontend passes Syntax.missing for empty args, for reasons +let args := if args.getNumArgs == 0 then Syntax.missing else args; pure { name := attrName, args := args } def elabAttrs (stx : Syntax) : CommandElabM (Array Attribute) := diff --git a/stage0/src/Lean/Elab/Syntax.lean b/stage0/src/Lean/Elab/Syntax.lean index 8d73800398..ecdae1cb1a 100644 --- a/stage0/src/Lean/Elab/Syntax.lean +++ b/stage0/src/Lean/Elab/Syntax.lean @@ -93,7 +93,7 @@ partial def toParserDescrAux : Syntax → ToParserDescrM Syntax env ← liftM getEnv; unless (Parser.isParserCategory env cat) $ liftM $ throwError (stx.getArg 3) ("unknown category '" ++ cat ++ "'"); let prec := prec?.getD 0; - `(ParserDescr.parser $(quote cat) $(quote prec)) + `(ParserDescr.cat $(quote cat) $(quote prec)) else if kind == `Lean.Parser.Syntax.atom then do match (stx.getArg 0).isStrLit? with | some atom => do @@ -154,13 +154,24 @@ end Term namespace Command +private def getCatSuffix (catName : Name) : String := +match catName with +| Name.str _ s _ => s +| _ => unreachable! + +private def declareSyntaxCatQuotParser (catName : Name) : CommandElabM Unit := do +let quotSymbol := "`(" ++ getCatSuffix catName ++ "|"; +cmd ← `(@[termParser] def catStxQuot : Lean.ParserDescr := Lean.ParserDescr.node `Lean.Parser.Term.stxQuot $(quote Lean.Parser.maxPrec) (Lean.ParserDescr.andthen (Lean.ParserDescr.symbol $(quote quotSymbol)) (Lean.ParserDescr.andthen (Lean.ParserDescr.cat $(quote catName) 0) (Lean.ParserDescr.symbol ")")))); +elabCommand cmd + @[builtinCommandElab syntaxCat] def elabDeclareSyntaxCat : CommandElab := fun stx => do let catName := stx.getIdAt 1; let attrName := catName.appendAfter "Parser"; env ← getEnv; env ← liftIO stx $ Parser.registerParserCategory env attrName catName; - setEnv env + setEnv env; + declareSyntaxCatQuotParser catName def mkKindName (catName : Name) : Name := `_kind ++ catName diff --git a/stage0/src/Lean/Eval.lean b/stage0/src/Lean/Eval.lean index 3ca1a8efa8..f192217736 100644 --- a/stage0/src/Lean/Eval.lean +++ b/stage0/src/Lean/Eval.lean @@ -32,7 +32,6 @@ ctx ← read; pure ctx.2 instance MetaIO.metaHasEval {α} [MetaHasEval α] : MetaHasEval (MetaIO α) := ⟨fun env opts x _ => x (env, opts) >>= MetaHasEval.eval env opts⟩ -instance MetaIO.monadIO : MonadIO MetaIO := -⟨fun _ x _ => x⟩ +instance MetaIO.monadIO : MonadIO MetaIO := {} end Lean diff --git a/stage0/src/Lean/Parser/Parser.lean b/stage0/src/Lean/Parser/Parser.lean index b26e4acba9..323d0090c0 100644 --- a/stage0/src/Lean/Parser/Parser.lean +++ b/stage0/src/Lean/Parser/Parser.lean @@ -1772,7 +1772,7 @@ def compileParserDescr (categories : ParserCategories) : ParserDescr → Except | ParserDescr.nameLit => pure $ nameLit | ParserDescr.ident => pure $ ident | ParserDescr.nonReservedSymbol tk includeIdent => pure $ nonReservedSymbol tk includeIdent -| ParserDescr.parser catName prec => +| ParserDescr.cat catName prec => match categories.find? catName with | some _ => pure $ categoryParser catName prec | none => throwUnknownParserCategory catName diff --git a/stage0/src/Lean/Parser/Syntax.lean b/stage0/src/Lean/Parser/Syntax.lean index 26ce7f9c1e..34b4e25726 100644 --- a/stage0/src/Lean/Parser/Syntax.lean +++ b/stage0/src/Lean/Parser/Syntax.lean @@ -70,8 +70,8 @@ def macroArgType := nonReservedSymbol "ident" <|> nonReservedSymbol "num" <|> def macroArgSimple := parser! ident >> checkNoWsBefore "no space before ':'" >> ":" >> macroArgType def macroArg := try strLit <|> try macroArgSimple def macroHead := macroArg <|> try ident -def macroTailTactic : Parser := try (" : " >> identEq "tactic") >> darrow >> "`(" >> sepBy1 tacticParser "; " true true >> ")" -def macroTailCommand : Parser := try (" : " >> identEq "command") >> darrow >> "`(" >> many1 commandParser true >> ")" +def macroTailTactic : Parser := try (" : " >> identEq "tactic") >> darrow >> ("`(" >> sepBy1 tacticParser "; " true true >> ")" <|> termParser) +def macroTailCommand : Parser := try (" : " >> identEq "command") >> darrow >> ("`(" >> many1 commandParser true >> ")" <|> 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/frontends/lean/builtin_cmds.cpp b/stage0/src/frontends/lean/builtin_cmds.cpp index 8549f0438a..371cd9b343 100644 --- a/stage0/src/frontends/lean/builtin_cmds.cpp +++ b/stage0/src/frontends/lean/builtin_cmds.cpp @@ -7,6 +7,7 @@ Author: Leonardo de Moura #include #include #include +#include #include #include #include "util/timeit.h" @@ -330,6 +331,8 @@ environment hide_cmd(parser & p) { return new_env; } +void with_isolated_streams(std::string & streams_out, std::function fn); + static environment eval_cmd(parser & p) { transient_cmd_scope cmd_scope(p); auto pos = p.pos(); @@ -382,26 +385,24 @@ static environment eval_cmd(parser & p) { auto out = p.mk_message(p.cmd_pos(), p.pos(), INFORMATION); out.set_caption("eval result"); - scope_traces_as_messages scope_traces(p.get_stream_name(), p.cmd_pos()); - std::streambuf * saved_cout = std::cout.rdbuf(out.get_text_stream().get_stream().rdbuf()); - std::streambuf * saved_cerr = std::cerr.rdbuf(out.get_text_stream().get_stream().rdbuf()); + std::string streams_out; object_ref r; - try { - time_task t("#eval execution", - message_builder(environment(), get_global_ios(), "foo", pos_info(), message_severity::INFORMATION)); - r = object_ref(ir::run_boxed(new_env, fn_name, args.size(), &args[0])); - } catch (exception & ex) { - std::cout.rdbuf(saved_cout); - std::cerr.rdbuf(saved_cerr); + with_isolated_streams(streams_out, [&]() { + scope_traces_as_messages scope_traces(p.get_stream_name(), p.cmd_pos()); + time_task t("#eval execution", + message_builder(environment(), get_global_ios(), "foo", pos_info(), message_severity::INFORMATION)); + r = object_ref(ir::run_boxed(new_env, fn_name, args.size(), &args[0])); + }); + } catch (exception &) { + out << streams_out; out.report(); - throw ex; + throw; } - - std::cout.rdbuf(saved_cout); - std::cerr.rdbuf(saved_cerr); + out << streams_out; out.report(); + if (io_result_is_error(r.raw())) { message_builder msg = p.mk_message(p.cmd_pos(), p.pos(), ERROR); object * err = io_result_get_error(r.raw()); diff --git a/stage0/src/runtime/io.cpp b/stage0/src/runtime/io.cpp index e53d0a6f4e..24589c9941 100644 --- a/stage0/src/runtime/io.cpp +++ b/stage0/src/runtime/io.cpp @@ -12,6 +12,8 @@ Author: Leonardo de Moura #else // Linux include files #include // NOLINT +#include +#include #endif #include #include @@ -109,11 +111,6 @@ extern "C" obj_res lean_io_initializing(obj_arg) { return set_io_result(box(g_initializing)); } -extern "C" obj_res lean_io_prim_put_str(b_obj_arg s, obj_arg) { - std::cout << string_to_std(s); // TODO(Leo): use out handle - return set_io_result(box(0)); -} - static lean_external_class * g_io_handle_external_class = nullptr; static void io_handle_finalizer(void * h) { @@ -127,10 +124,108 @@ static lean_object * io_wrap_handle(FILE *hfile) { return lean_alloc_external(g_io_handle_external_class, hfile); } +static object * g_handle_stdin = nullptr; +static object * g_handle_stdout = nullptr; +static object * g_handle_stderr = nullptr; + +/* stdin : IO FS.Handle */ +extern "C" obj_res lean_get_stdin(obj_arg /* w */) { + inc_ref(g_handle_stdin); + return set_io_result(g_handle_stdin); +} + +/* stdout : IO FS.Handle */ +extern "C" obj_res lean_get_stdout(obj_arg /* w */) { + inc_ref(g_handle_stdout); + return set_io_result(g_handle_stdout); +} + +/* stderr : IO FS.Handle */ +extern "C" obj_res lean_get_stderr(obj_arg /* w */) { + inc_ref(g_handle_stderr); + return set_io_result(g_handle_stderr); +} + static FILE * io_get_handle(lean_object * hfile) { return static_cast(lean_get_external_data(hfile)); } +void with_isolated_streams(std::string & streams_out, std::function fn) { + // When running `#eval`, we want to temporarily close stdin and capture stdout/stderr of the evaluated program + // so it doesn't interfere with the server I/O. We could do this on the Lean API level (i.e. `IO.getLine/putStr`), + // but that wouldn't affect direct access to `IO.stdin/...` nor FFI-called code. Instead, we directly work on file + // descriptors. + // Create a fresh file descriptor we can point stdout/stderr to +#if defined(__linux__) + // On Linux, we can simply open an anonymous file in memory + int buf_fd = memfd_create("lean-eval", 0); +#elif 0 + // On macOS, we can open exclusive shared memory object, guessing a hopefully unique name + // ...or at least we should be able to, but it doesn't work for some reason. + // NOTE: what doesn't work: `funopen` returns a `FILE *` stream without a file descriptor + std::string shm_name = (sstream() << "lean-eval-" << getpid()).str(); + int buf_fd = shm_open(shm_name.c_str(), O_RDWR | O_CREAT | O_EXCL, S_IRWXU); + lean_always_assert(shm_unlink(shm_name.c_str()) == 0); +#else + // On Windows we can open an actual file I guess + FILE * buf_f = tmpfile(); lean_always_assert(buf_f != nullptr); + int buf_fd = fileno(buf_f); +#endif + lean_always_assert(buf_fd >= 0); + // NOTE: what doesn't work: `pipe` creates file descriptors, but we would need a separate consumer thread so + // the evaluated program doesn't block on a full pipe + + // make sure to drain user-level buffers + fflush(stdout); fflush(stderr); + // copy stdout/stderr, then set them to `buf_fd` +#ifdef __linux__ + // On Linux, we also redirect stdin so it appears as empty. This doesn't seem to work on other platforms. + // NOTE: Since we can't flush stdin, this only really works if we are on a line ending (assuming stdin is line buffered). + // This should be the case for the server, which is line-based. + int old_stdin = dup(STDIN_FILENO); lean_always_assert(old_stdin >= 0); lean_always_assert(dup2(buf_fd, STDIN_FILENO) >= 0); +#endif + int old_stdout = dup(STDOUT_FILENO); lean_always_assert(old_stdout >= 0); lean_always_assert(dup2(buf_fd, STDOUT_FILENO) >= 0); + int old_stderr = dup(STDERR_FILENO); lean_always_assert(old_stderr >= 0); lean_always_assert(dup2(buf_fd, STDERR_FILENO) >= 0); + + std::function finally = [&]() { + fflush(stdout); fflush(stderr); + // restore old streams +#ifdef __linux__ + lean_always_assert(dup2(old_stdin, STDIN_FILENO) >= 0); lean_always_assert(close(old_stdin) == 0); +#endif + lean_always_assert(dup2(old_stdout, STDOUT_FILENO) >= 0); lean_always_assert(close(old_stdout) == 0); + lean_always_assert(dup2(old_stderr, STDERR_FILENO) >= 0); lean_always_assert(close(old_stderr) == 0); + // write `buf_fd` contents to `out` + off_t buf_sz = lseek(buf_fd, 0, SEEK_CUR); + lseek(buf_fd, 0, SEEK_SET); + std::string buf_s(buf_sz, '\0'); + lean_always_assert(read(buf_fd, static_cast(&buf_s[0]), buf_sz) == buf_sz); + lean_always_assert(close(buf_fd) == 0); + streams_out = buf_s; + }; + + try { + fn(); + } catch (exception &) { + finally(); + throw; + } + + finally(); +} + +/* withIsolatedStreams {α : Type} : IO α → IO (String × Except IO.Error α) */ +extern "C" obj_res lean_with_isolated_streams(obj_arg act, obj_arg w) { + std::string streams_out; + object_ref act_res; + with_isolated_streams(streams_out, [&]() { act_res = object_ref(apply_1(act, w)); }); + if (io_result_is_ok(act_res.raw())) { + return set_io_result(mk_cnstr(0, mk_string(streams_out), mk_except_ok(object_ref(io_result_get_value(act_res.raw()), true))).steal()); + } else { + return set_io_result(mk_cnstr(0, mk_string(streams_out), mk_except_error(object_ref(io_result_get_error(act_res.raw()), true))).steal()); + } +} + obj_res decode_io_error(int errnum, b_obj_arg fname) { object * details = mk_string(strerror(errnum)); switch (errnum) { @@ -258,27 +353,6 @@ extern "C" obj_res lean_io_prim_handle_flush(b_obj_arg h, obj_arg /* w */) { } } -/* Handle.readByte : (@& Handle) → IO UInt8 */ -extern "C" obj_res lean_io_prim_handle_read_byte(b_obj_arg h, obj_arg /* w */) { - FILE * fp = io_get_handle(h); - int c = std::fgetc(fp); - if (c != EOF) { - return set_io_result(box(c)); - } else { - return set_io_error(decode_io_error(errno, nullptr)); - } -} - -/* Handle.writeByte : (@& Handle) → UInt8 → IO unit */ -extern "C" obj_res lean_io_prim_handle_write_byte(b_obj_arg h, uint8 c, obj_arg /* w */) { - FILE * fp = io_get_handle(h); - if (std::fputc(c, fp) != EOF) { - return set_io_result(box(0)); - } else { - return set_io_error(decode_io_error(errno, nullptr)); - } -} - static object * g_io_error_eof = nullptr; /* Handle.read : (@& Handle) → USize → IO ByteArray */ @@ -606,6 +680,12 @@ void initialize_io() { g_io_error_eof = lean_mk_io_error_eof(lean_box(0)); mark_persistent(g_io_error_eof); g_io_handle_external_class = lean_register_external_class(io_handle_finalizer, io_handle_foreach); + g_handle_stdout = io_wrap_handle(stdout); + mark_persistent(g_handle_stdout); + g_handle_stderr = io_wrap_handle(stderr); + mark_persistent(g_handle_stderr); + g_handle_stdin = io_wrap_handle(stdin); + mark_persistent(g_handle_stdin); } void finalize_io() { diff --git a/stage0/stdlib/Init/System/IO.c b/stage0/stdlib/Init/System/IO.c index a57f4cfc7a..143a29bf74 100644 --- a/stage0/stdlib/Init/System/IO.c +++ b/stage0/stdlib/Init/System/IO.c @@ -1,6 +1,6 @@ // Lean compiler output // Module: Init.System.IO -// Imports: Init.Control.EState Init.Data.String.Basic Init.Data.ByteArray Init.System.IOError Init.System.FilePath +// Imports: Init.Control.EState Init.Control.Reader Init.Data.String.Basic Init.Data.ByteArray Init.System.IOError Init.System.FilePath #include #if defined(__clang__) #pragma clang diagnostic ignored "-Wunused-parameter" @@ -16,7 +16,7 @@ extern "C" { lean_object* l_IO_FS_linesAux___main___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_IO_FS_linesAux___main___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_IO_FS_Handle_putStrLn___rarg(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l___private_Init_System_IO_1__putStr(lean_object*, lean_object*); +lean_object* l___private_Init_System_IO_1__putStr(lean_object*); lean_object* l_allocprof___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_IO_mkRef___boxed(lean_object*, lean_object*); extern uint8_t l_System_Platform_isWindows; @@ -30,36 +30,44 @@ lean_object* l_IO_Prim_iterate___main(lean_object*, lean_object*); lean_object* l_IO_Ref_set___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_chmod(lean_object*, uint32_t, lean_object*); lean_object* l_IO_Prim_getEnv___boxed(lean_object*, lean_object*); -lean_object* lean_io_prim_put_str(lean_object*, lean_object*); +lean_object* l_ReaderT_MonadExcept___rarg(lean_object*); lean_object* l_IO_println(lean_object*); lean_object* l_Lean_Unit_hasEval(lean_object*); lean_object* l_IO_currentDir___rarg___closed__1; lean_object* l_IO_Prim_fopenFlags___closed__12; +lean_object* l_IO_Prim_stderr___boxed(lean_object*); lean_object* l_EIO_Monad___closed__1; lean_object* l_IO_FS_Handle_read___boxed(lean_object*, lean_object*); lean_object* l_Lean_Unit_hasEval___rarg___boxed(lean_object*, lean_object*); -lean_object* l_IO_FS_withFile___rarg(lean_object*, uint8_t, lean_object*, lean_object*); +lean_object* l_IO_FS_withFile___rarg(lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*); lean_object* lean_io_is_dir(lean_object*, lean_object*); lean_object* l_IO_print___at_Lean_HasRepr_hasEval___spec__2(lean_object*, lean_object*); +lean_object* l_IO_Prim_stdin___boxed(lean_object*); lean_object* l_IO_FS_Handle_putStr___rarg(lean_object*, lean_object*, lean_object*); lean_object* lean_io_prim_handle_put_str(lean_object*, lean_object*, lean_object*); +lean_object* l_IO_stdout___rarg(lean_object*); lean_object* l___private_Init_System_IO_1__putStr___at_Lean_HasRepr_hasEval___spec__3___boxed(lean_object*, lean_object*); lean_object* l_IO_getEnv___rarg(lean_object*, lean_object*); +lean_object* l___private_Init_System_IO_1__putStr___rarg___lambda__1(lean_object*, lean_object*, lean_object*); lean_object* l_IO_FS_Handle_getLine___rarg(lean_object*, lean_object*); lean_object* l_IO_FS_Handle_mk___boxed(lean_object*, lean_object*); extern lean_object* l_Array_empty___closed__1; lean_object* l_IO_Ref_ptrEq___boxed(lean_object*, lean_object*); lean_object* lean_io_mk_ref(lean_object*, lean_object*); +lean_object* l_StateT_monadIO___rarg(lean_object*, lean_object*); lean_object* l_unsafeIO___rarg(lean_object*); uint32_t l_UInt32_shiftLeft(uint32_t, uint32_t); lean_object* l_IO_FS_Handle_write(lean_object*, lean_object*); lean_object* lean_io_ref_get(lean_object*, lean_object*); -lean_object* l_IO_print(lean_object*, lean_object*); +lean_object* l_IO_print(lean_object*); +lean_object* l_IO_stdin(lean_object*, lean_object*); lean_object* l_IO_Prim_Ref_set___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_IO_FS_Handle_flush___rarg(lean_object*, lean_object*); extern lean_object* l_Unit_HasRepr___closed__1; +lean_object* l_IO_Prim_withIsolatedStreams___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_IO_Ref_get___boxed(lean_object*, lean_object*); lean_object* l_IO_Ref_modify___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_IO_stdout(lean_object*, lean_object*); lean_object* l_IO_Prim_Handle_mk___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_IO_FS_Handle_readToEnd(lean_object*); lean_object* lean_array_push(lean_object*, lean_object*); @@ -77,20 +85,21 @@ lean_object* l_EIO_Inhabited(lean_object*, lean_object*); lean_object* l_IO_FS_Handle_putStr___boxed(lean_object*, lean_object*); lean_object* l_EIO_adaptExcept___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_IO_Prim_fopenFlags___closed__11; -lean_object* l_IO_FS_Handle_getByte(lean_object*, lean_object*); lean_object* l_IO_FS_lines___rarg(lean_object*, lean_object*, lean_object*); lean_object* lean_io_getenv(lean_object*, lean_object*); uint32_t l_IO_AccessRight_flags___closed__13; lean_object* l_IO_setAccessRights(lean_object*, lean_object*, lean_object*); lean_object* l_IO_Ref_get___rarg(lean_object*, lean_object*, lean_object*); -lean_object* l_IO_FS_Handle_putByte___rarg___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_IO_FS_Handle_putStr___at_Lean_HasRepr_hasEval___spec__5___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_IO_Prim_Handle_isEof___boxed(lean_object*, lean_object*); +lean_object* l_hasMonadLiftTTrans___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_HasRepr_hasEval___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_IO_FS_Handle_getLine___boxed(lean_object*, lean_object*); +lean_object* lean_with_isolated_streams(lean_object*, lean_object*); lean_object* l_IO_FS_Handle_readToEndAux(lean_object*); uint32_t l_IO_AccessRight_flags___closed__8; lean_object* l_EIO_Inhabited___rarg(lean_object*); -lean_object* l_IO_FS_Handle_putByte___boxed(lean_object*, lean_object*); +lean_object* l_IO_FS_Handle_putStrLn___rarg___closed__1; lean_object* l_IO_Prim_fopenFlags___closed__7; lean_object* l_EStateM_Inhabited___rarg(lean_object*, lean_object*); lean_object* l_IO_FS_linesAux___main(lean_object*); @@ -98,6 +107,7 @@ lean_object* l_IO_lazyPure___rarg(lean_object*, lean_object*); lean_object* l_IO_Prim_liftIO(lean_object*, lean_object*); lean_object* l_IO_AccessRight_flags___boxed(lean_object*); lean_object* l_IO_Ref_get(lean_object*, lean_object*); +lean_object* l_IO_stdin___rarg(lean_object*); lean_object* l_IO_Prim_realPath___boxed(lean_object*, lean_object*); lean_object* l_IO_appDir(lean_object*); uint32_t l_IO_AccessRight_flags___closed__1; @@ -106,10 +116,13 @@ lean_object* l_IO_appPath___rarg(lean_object*); uint8_t lean_nat_dec_eq(lean_object*, lean_object*); uint32_t l_IO_AccessRight_flags___closed__2; lean_object* l_IO_Ref_set___boxed(lean_object*, lean_object*); -lean_object* l_IO_FS_Handle_putByte(lean_object*, lean_object*); +lean_object* l_IO_MonadIO; lean_object* l_IO_FS_Handle_read___rarg___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_StateT_MonadExcept___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_IO_Prim_liftIO___rarg(lean_object*, lean_object*); +lean_object* l_IO_stderr___rarg___closed__1; lean_object* l_IO_println___at_Lean_HasRepr_hasEval___spec__1(lean_object*, lean_object*); +lean_object* l_hasMonadLiftTRefl(lean_object*, lean_object*); uint32_t l_IO_AccessRight_flags___closed__4; lean_object* lean_io_current_dir(lean_object*); lean_object* l_EIO_MonadExcept(lean_object*); @@ -119,35 +132,43 @@ lean_object* l_IO_FS_Handle_write___rarg(lean_object*, lean_object*, lean_object lean_object* l_IO_realPath___boxed(lean_object*, lean_object*); lean_object* lean_io_realpath(lean_object*, lean_object*); lean_object* l_System_FilePath_dirName(lean_object*); +lean_object* l_IO_stdin___rarg___closed__1; lean_object* l_IO_Prim_Ref_reset___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_IO_FS_Handle_readToEndAux___main___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_IO_Prim_fopenFlags(uint8_t, uint8_t); +lean_object* l_ReaderT_monadIO___rarg(lean_object*, lean_object*); lean_object* l_IO_FS_linesAux___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_IO_Inhabited(lean_object*); +lean_object* l_IO_stderr___boxed(lean_object*, lean_object*); lean_object* l_IO_Ref_modify___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint32_t l_String_back(lean_object*); lean_object* l_IO_Prim_Handle_write___boxed(lean_object*, lean_object*, lean_object*); lean_object* lean_io_allocprof(lean_object*, lean_object*, lean_object*); lean_object* l_EIO_HasOrelse(lean_object*, lean_object*); +lean_object* l_ReaderT_monadIO(lean_object*, lean_object*); lean_object* l_IO_FS_Handle_getLine(lean_object*, lean_object*); lean_object* l_IO_FS_Handle_readToEndAux___main___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_IO_appPath___boxed(lean_object*, lean_object*); -lean_object* l_IO_FS_Handle_getByte___rarg(lean_object*, lean_object*); -lean_object* l_IO_println___rarg___closed__1; +lean_object* l_StateT_lift___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_IO_stdout___at_Lean_HasRepr_hasEval___spec__4(lean_object*); lean_object* l_IO_initializing___boxed(lean_object*); lean_object* l_IO_println___at_Lean_HasRepr_hasEval___spec__1___boxed(lean_object*, lean_object*); +lean_object* lean_get_stderr(lean_object*); lean_object* l_IO_Prim_iterate(lean_object*, lean_object*); lean_object* l_IO_Prim_iterate___rarg(lean_object*, lean_object*, lean_object*); -lean_object* lean_io_prim_handle_write_byte(lean_object*, uint8_t, lean_object*); lean_object* l_IO_FS_Handle_mk(lean_object*, lean_object*); lean_object* l_IO_FS_linesAux(lean_object*); lean_object* l_IO_Prim_Handle_getLine___boxed(lean_object*, lean_object*); lean_object* l_IO_FS_Handle_mk___rarg(lean_object*, lean_object*, uint8_t, uint8_t); lean_object* l_IO_println___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_IO_stdout___rarg___closed__1; lean_object* l_EIO_adaptExcept(lean_object*, lean_object*, lean_object*); +lean_object* l_IO_Prim_stdout___boxed(lean_object*); lean_object* l_IO_isDir___boxed(lean_object*, lean_object*); +lean_object* l_IO_MonadIO___closed__1; lean_object* l_IO_FS_Handle_readToEndAux___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_IO_fileExists___rarg(lean_object*, lean_object*); +lean_object* l_StateT_monadIO(lean_object*, lean_object*); lean_object* l_IO_FS_Handle_isEof(lean_object*, lean_object*); lean_object* l_IO_realPath___rarg(lean_object*, lean_object*); lean_object* l_IO_Prim_Ref_get___boxed(lean_object*, lean_object*, lean_object*); @@ -161,20 +182,22 @@ lean_object* l_String_dropRight(lean_object*, lean_object*); lean_object* l_EIO_catchExceptions(lean_object*, lean_object*); lean_object* l_IO_setAccessRights___boxed(lean_object*, lean_object*, lean_object*); size_t lean_usize_of_nat(lean_object*); -lean_object* l_IO_Prim_putStr___boxed(lean_object*, lean_object*); -lean_object* l_IO_FS_Handle_putByte___rarg(lean_object*, lean_object*, uint8_t); +lean_object* l_IO_MonadIO___closed__2; lean_object* l_IO_ofExcept___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_IO_Prim_fileExists___boxed(lean_object*, lean_object*); lean_object* l___private_Init_System_IO_1__putStr___at_Lean_HasRepr_hasEval___spec__3(lean_object*, lean_object*); lean_object* l_IO_FS_readFile___rarg___lambda__1(lean_object*, lean_object*, lean_object*); lean_object* l_IO_realPath(lean_object*, lean_object*); lean_object* lean_io_prim_handle_write(lean_object*, lean_object*, lean_object*); +lean_object* l_IO_stderr___rarg(lean_object*); lean_object* l_EIO_HasOrelse___closed__1; lean_object* l_IO_ofExcept(lean_object*, lean_object*); lean_object* lean_io_file_exists(lean_object*, lean_object*); lean_object* l_Lean_IO_HasEval(lean_object*); lean_object* l_EStateM_nonBacktrackable(lean_object*); uint8_t l_UInt32_decEq(uint32_t, uint32_t); +lean_object* l_IO_stdin___boxed(lean_object*, lean_object*); +lean_object* lean_get_stdin(lean_object*); lean_object* l_IO_currentDir(lean_object*, lean_object*); lean_object* l_IO_Prim_isDir___boxed(lean_object*, lean_object*); lean_object* l_IO_FS_Handle_putStr(lean_object*, lean_object*); @@ -182,7 +205,7 @@ lean_object* l_IO_Prim_setAccessRights___boxed(lean_object*, lean_object*, lean_ lean_object* l_IO_isDir___rarg(lean_object*, lean_object*); lean_object* l_IO_getEnv(lean_object*, lean_object*); lean_object* l_IO_FS_Handle_readToEndAux___main___rarg(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_IO_Prim_Handle_getByte___boxed(lean_object*, lean_object*); +lean_object* l_IO_MonadIO___closed__3; lean_object* l_IO_lazyPure(lean_object*); lean_object* l_EStateM_Monad(lean_object*, lean_object*); lean_object* l_IO_FS_Handle_mk___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); @@ -192,6 +215,7 @@ lean_object* l_IO_Prim_currentDir___boxed(lean_object*); lean_object* l_IO_FS_Handle_write___boxed(lean_object*, lean_object*); lean_object* l_IO_Prim_fopenFlags___closed__5; lean_object* l_IO_Prim_fopenFlags___closed__14; +lean_object* l_IO_FS_Handle_putStr___at_Lean_HasRepr_hasEval___spec__5(lean_object*, lean_object*, lean_object*); lean_object* l_IO_FS_Handle_readToEndAux___main(lean_object*); lean_object* l_IO_FS_readFile___rarg(lean_object*, lean_object*, lean_object*); uint32_t l_IO_AccessRight_flags(lean_object*); @@ -200,22 +224,19 @@ lean_object* lean_io_ref_reset(lean_object*, lean_object*); lean_object* l_IO_Prim_fopenFlags___closed__3; lean_object* lean_io_ref_swap(lean_object*, lean_object*, lean_object*); lean_object* l_IO_getEnv___boxed(lean_object*, lean_object*); -lean_object* l_IO_print___boxed(lean_object*, lean_object*); lean_object* l_IO_Ref_swap(lean_object*, lean_object*); lean_object* l_IO_Ref_ptrEq(lean_object*, lean_object*); lean_object* l_IO_FS_Handle_putStrLn(lean_object*); lean_object* l_IO_FS_lines___rarg___lambda__1(lean_object*, lean_object*, lean_object*); +lean_object* lean_get_stdout(lean_object*); lean_object* l_IO_Prim_Ref_swap___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_io_ref_set(lean_object*, lean_object*, lean_object*); -lean_object* lean_io_prim_handle_read_byte(lean_object*, lean_object*); lean_object* l_IO_appDir___rarg___lambda__1(lean_object*, lean_object*); lean_object* l_IO_FS_Handle_read___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_IO_Ref_reset___boxed(lean_object*, lean_object*); lean_object* l_EStateM_MonadExcept___rarg(lean_object*); -lean_object* l_IO_Prim_Handle_putByte___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_EIO_MonadExcept___closed__2; uint32_t l_IO_AccessRight_flags___closed__10; -lean_object* l_IO_FS_Handle_getByte___boxed(lean_object*, lean_object*); lean_object* l_Lean_Unit_hasEval___rarg(uint8_t, lean_object*); lean_object* lean_io_prim_handle_flush(lean_object*, lean_object*); uint32_t l_UInt32_lor(uint32_t, uint32_t); @@ -232,7 +253,6 @@ lean_object* l_MonadExcept_orelse___at_EIO_HasOrelse___spec__1(lean_object*, lea lean_object* l_IO_FS_Handle_isEof___boxed(lean_object*, lean_object*); lean_object* l_IO_Ref_ptrEq___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_EIO_Monad(lean_object*); -lean_object* l___private_Init_System_IO_1__putStr___boxed(lean_object*, lean_object*); lean_object* l_IO_Prim_fopenFlags___closed__8; lean_object* l_IO_Prim_Handle_putStr___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IO_HasEval___rarg(lean_object*, lean_object*, uint8_t, lean_object*); @@ -247,16 +267,17 @@ lean_object* l_IO_mkRef___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_HasRepr_hasEval___rarg(lean_object*, lean_object*, uint8_t, lean_object*); lean_object* l_IO_Prim_fopenFlags___closed__1; lean_object* l_IO_Prim_mkRef___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_IO_FS_withFile___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_IO_FS_withFile___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_io_prim_handle_read(lean_object*, size_t, lean_object*); lean_object* l_IO_FS_lines(lean_object*); -lean_object* l_IO_FS_Handle_mk___at_IO_FS_withFile___spec__1(lean_object*, uint8_t, uint8_t, lean_object*); +lean_object* l_IO_stderr(lean_object*, lean_object*); lean_object* l_IO_fileExists(lean_object*, lean_object*); lean_object* l_IO_FS_Handle_flush___boxed(lean_object*, lean_object*); -lean_object* l_IO_print___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_IO_print___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_ReaderT_lift___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_IO_Prim_fopenFlags___closed__2; lean_object* l_IO_RefPointed(lean_object*); -lean_object* l___private_Init_System_IO_1__putStr___rarg(lean_object*, lean_object*); +lean_object* l___private_Init_System_IO_1__putStr___rarg(lean_object*, lean_object*, lean_object*); uint32_t l_IO_AccessRight_flags___closed__5; lean_object* lean_io_prim_handle_mk(lean_object*, lean_object*, lean_object*); lean_object* l_IO_appDir___rarg(lean_object*, lean_object*); @@ -266,7 +287,7 @@ uint32_t l_IO_AccessRight_flags___closed__7; uint32_t l_IO_FileRight_flags(lean_object*); lean_object* l_EIO_catchExceptions___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_IO_Prim_Handle_read___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_IO_FS_Handle_mk___at_IO_FS_withFile___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_IO_stdout___boxed(lean_object*, lean_object*); lean_object* l_IO_Prim_fopenFlags___closed__13; uint32_t l_IO_AccessRight_flags___closed__3; lean_object* l_IO_FS_withFile(lean_object*); @@ -552,6 +573,104 @@ x_2 = lean_io_initializing(x_1); return x_2; } } +lean_object* _init_l_IO_MonadIO___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_hasMonadLiftTRefl), 2, 1); +lean_closure_set(x_1, 0, lean_box(0)); +return x_1; +} +} +lean_object* _init_l_IO_MonadIO___closed__2() { +_start: +{ +lean_object* x_1; +x_1 = l_EIO_MonadExcept(lean_box(0)); +return x_1; +} +} +lean_object* _init_l_IO_MonadIO___closed__3() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_IO_MonadIO___closed__1; +x_2 = l_IO_MonadIO___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_IO_MonadIO() { +_start: +{ +lean_object* x_1; +x_1 = l_IO_MonadIO___closed__3; +return x_1; +} +} +lean_object* l_ReaderT_monadIO___rarg(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; +x_3 = lean_ctor_get(x_2, 0); +lean_inc(x_3); +x_4 = lean_alloc_closure((void*)(l_ReaderT_lift___boxed), 4, 3); +lean_closure_set(x_4, 0, lean_box(0)); +lean_closure_set(x_4, 1, lean_box(0)); +lean_closure_set(x_4, 2, x_1); +x_5 = lean_alloc_closure((void*)(l_hasMonadLiftTTrans___rarg), 4, 2); +lean_closure_set(x_5, 0, x_3); +lean_closure_set(x_5, 1, x_4); +x_6 = lean_ctor_get(x_2, 1); +lean_inc(x_6); +lean_dec(x_2); +x_7 = l_ReaderT_MonadExcept___rarg(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_ReaderT_monadIO(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = lean_alloc_closure((void*)(l_ReaderT_monadIO___rarg), 2, 0); +return x_3; +} +} +lean_object* l_StateT_monadIO___rarg(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; +x_3 = lean_ctor_get(x_2, 0); +lean_inc(x_3); +lean_inc(x_1); +x_4 = lean_alloc_closure((void*)(l_StateT_lift___rarg), 4, 1); +lean_closure_set(x_4, 0, x_1); +x_5 = lean_alloc_closure((void*)(l_hasMonadLiftTTrans___rarg), 4, 2); +lean_closure_set(x_5, 0, x_3); +lean_closure_set(x_5, 1, x_4); +x_6 = lean_ctor_get(x_2, 1); +lean_inc(x_6); +lean_dec(x_2); +x_7 = l_StateT_MonadExcept___rarg(x_1, lean_box(0), 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_StateT_monadIO(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = lean_alloc_closure((void*)(l_StateT_monadIO___rarg), 2, 0); +return x_3; +} +} lean_object* l_IO_ofExcept___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { @@ -611,6 +730,38 @@ x_2 = lean_alloc_closure((void*)(l_IO_lazyPure___rarg), 2, 0); return x_2; } } +lean_object* l_IO_Prim_stdin___boxed(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_get_stdin(x_1); +return x_2; +} +} +lean_object* l_IO_Prim_stdout___boxed(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_get_stdout(x_1); +return x_2; +} +} +lean_object* l_IO_Prim_stderr___boxed(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_get_stderr(x_1); +return x_2; +} +} +lean_object* l_IO_Prim_withIsolatedStreams___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = lean_with_isolated_streams(x_2, x_3); +return x_4; +} +} lean_object* l_IO_Prim_iterate___main___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { @@ -923,15 +1074,6 @@ x_5 = l_IO_Prim_fopenFlags(x_3, x_4); return x_5; } } -lean_object* l_IO_Prim_putStr___boxed(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = lean_io_prim_put_str(x_1, x_2); -lean_dec(x_1); -return x_3; -} -} lean_object* l_IO_Prim_Handle_mk___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { @@ -981,26 +1123,6 @@ lean_dec(x_1); return x_4; } } -lean_object* l_IO_Prim_Handle_getByte___boxed(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = lean_io_prim_handle_read_byte(x_1, x_2); -lean_dec(x_1); -return x_3; -} -} -lean_object* l_IO_Prim_Handle_putByte___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_2); -lean_dec(x_2); -x_5 = lean_io_prim_handle_write_byte(x_1, x_4, x_3); -lean_dec(x_1); -return x_5; -} -} lean_object* l_IO_Prim_Handle_getLine___boxed(lean_object* x_1, lean_object* x_2) { _start: { @@ -1074,9 +1196,12 @@ return x_2; lean_object* l_IO_Prim_liftIO___rarg(lean_object* x_1, lean_object* x_2) { _start: { -lean_object* x_3; -x_3 = lean_apply_2(x_1, lean_box(0), x_2); -return x_3; +lean_object* x_3; lean_object* x_4; +x_3 = lean_ctor_get(x_1, 0); +lean_inc(x_3); +lean_dec(x_1); +x_4 = lean_apply_2(x_3, lean_box(0), x_2); +return x_4; } } lean_object* l_IO_Prim_liftIO(lean_object* x_1, lean_object* x_2) { @@ -1087,312 +1212,19 @@ x_3 = lean_alloc_closure((void*)(l_IO_Prim_liftIO___rarg), 2, 0); return x_3; } } -lean_object* l___private_Init_System_IO_1__putStr___rarg(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; lean_object* x_4; -x_3 = lean_alloc_closure((void*)(l_IO_Prim_putStr___boxed), 2, 1); -lean_closure_set(x_3, 0, x_2); -x_4 = lean_apply_2(x_1, lean_box(0), x_3); -return x_4; -} -} -lean_object* l___private_Init_System_IO_1__putStr(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = lean_alloc_closure((void*)(l___private_Init_System_IO_1__putStr___rarg), 2, 0); -return x_3; -} -} -lean_object* l___private_Init_System_IO_1__putStr___boxed(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = l___private_Init_System_IO_1__putStr(x_1, x_2); -lean_dec(x_2); -return x_3; -} -} -lean_object* l_IO_print___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -lean_object* x_5; lean_object* x_6; -x_5 = lean_apply_1(x_3, x_4); -x_6 = l___private_Init_System_IO_1__putStr___rarg(x_1, x_5); -return x_6; -} -} -lean_object* l_IO_print(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = lean_alloc_closure((void*)(l_IO_print___rarg), 4, 0); -return x_3; -} -} -lean_object* l_IO_print___boxed(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = l_IO_print(x_1, x_2); -lean_dec(x_2); -return x_3; -} -} -lean_object* _init_l_IO_println___rarg___closed__1() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string("\n"); -return x_1; -} -} -lean_object* l_IO_println___rarg(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_9; lean_object* x_10; lean_object* x_11; -x_6 = lean_ctor_get(x_1, 0); -lean_inc(x_6); -lean_dec(x_1); -x_7 = lean_ctor_get(x_6, 4); -lean_inc(x_7); -lean_dec(x_6); -lean_inc(x_2); -x_8 = l_IO_print___rarg(x_2, lean_box(0), x_4, x_5); -x_9 = l_IO_println___rarg___closed__1; -x_10 = l___private_Init_System_IO_1__putStr___rarg(x_2, x_9); -x_11 = lean_apply_3(x_7, lean_box(0), x_8, x_10); -return x_11; -} -} -lean_object* l_IO_println(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_IO_println___rarg), 5, 0); -return x_2; -} -} -lean_object* l_IO_getEnv___rarg(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; lean_object* x_4; -x_3 = lean_alloc_closure((void*)(l_IO_Prim_getEnv___boxed), 2, 1); -lean_closure_set(x_3, 0, x_2); -x_4 = lean_apply_2(x_1, lean_box(0), x_3); -return x_4; -} -} -lean_object* l_IO_getEnv(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = lean_alloc_closure((void*)(l_IO_getEnv___rarg), 2, 0); -return x_3; -} -} -lean_object* l_IO_getEnv___boxed(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = l_IO_getEnv(x_1, x_2); -lean_dec(x_2); -return x_3; -} -} -lean_object* l_IO_realPath___rarg(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; lean_object* x_4; -x_3 = lean_alloc_closure((void*)(l_IO_Prim_realPath___boxed), 2, 1); -lean_closure_set(x_3, 0, x_2); -x_4 = lean_apply_2(x_1, lean_box(0), x_3); -return x_4; -} -} -lean_object* l_IO_realPath(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = lean_alloc_closure((void*)(l_IO_realPath___rarg), 2, 0); -return x_3; -} -} -lean_object* l_IO_realPath___boxed(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = l_IO_realPath(x_1, x_2); -lean_dec(x_2); -return x_3; -} -} -lean_object* l_IO_isDir___rarg(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; lean_object* x_4; -x_3 = lean_alloc_closure((void*)(l_IO_Prim_isDir___boxed), 2, 1); -lean_closure_set(x_3, 0, x_2); -x_4 = lean_apply_2(x_1, lean_box(0), x_3); -return x_4; -} -} -lean_object* l_IO_isDir(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = lean_alloc_closure((void*)(l_IO_isDir___rarg), 2, 0); -return x_3; -} -} -lean_object* l_IO_isDir___boxed(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = l_IO_isDir(x_1, x_2); -lean_dec(x_2); -return x_3; -} -} -lean_object* l_IO_fileExists___rarg(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; lean_object* x_4; -x_3 = lean_alloc_closure((void*)(l_IO_Prim_fileExists___boxed), 2, 1); -lean_closure_set(x_3, 0, x_2); -x_4 = lean_apply_2(x_1, lean_box(0), x_3); -return x_4; -} -} -lean_object* l_IO_fileExists(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = lean_alloc_closure((void*)(l_IO_fileExists___rarg), 2, 0); -return x_3; -} -} -lean_object* l_IO_fileExists___boxed(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = l_IO_fileExists(x_1, x_2); -lean_dec(x_2); -return x_3; -} -} -lean_object* _init_l_IO_appPath___rarg___closed__1() { -_start: -{ -lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_IO_Prim_appPath___boxed), 1, 0); -return x_1; -} -} -lean_object* l_IO_appPath___rarg(lean_object* x_1) { -_start: -{ -lean_object* x_2; lean_object* x_3; -x_2 = l_IO_appPath___rarg___closed__1; -x_3 = lean_apply_2(x_1, lean_box(0), x_2); -return x_3; -} -} -lean_object* l_IO_appPath(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = lean_alloc_closure((void*)(l_IO_appPath___rarg), 1, 0); -return x_3; -} -} -lean_object* l_IO_appPath___boxed(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = l_IO_appPath(x_1, x_2); -lean_dec(x_2); -return x_3; -} -} -lean_object* _init_l_IO_currentDir___rarg___closed__1() { -_start: -{ -lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_IO_Prim_currentDir___boxed), 1, 0); -return x_1; -} -} -lean_object* l_IO_currentDir___rarg(lean_object* x_1) { -_start: -{ -lean_object* x_2; lean_object* x_3; -x_2 = l_IO_currentDir___rarg___closed__1; -x_3 = lean_apply_2(x_1, lean_box(0), x_2); -return x_3; -} -} -lean_object* l_IO_currentDir(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = lean_alloc_closure((void*)(l_IO_currentDir___rarg), 1, 0); -return x_3; -} -} -lean_object* l_IO_currentDir___boxed(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = l_IO_currentDir(x_1, x_2); -lean_dec(x_2); -return x_3; -} -} -lean_object* l_IO_appDir___rarg___lambda__1(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; lean_object* x_4; -x_3 = l_System_FilePath_dirName(x_2); -x_4 = l_IO_realPath___rarg(x_1, x_3); -return x_4; -} -} -lean_object* l_IO_appDir___rarg(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; -x_3 = lean_ctor_get(x_1, 1); -lean_inc(x_3); -lean_dec(x_1); -x_4 = l_IO_appPath___rarg___closed__1; -lean_inc(x_2); -x_5 = lean_apply_2(x_2, lean_box(0), x_4); -x_6 = lean_alloc_closure((void*)(l_IO_appDir___rarg___lambda__1), 2, 1); -lean_closure_set(x_6, 0, x_2); -x_7 = lean_apply_4(x_3, lean_box(0), lean_box(0), x_5, x_6); -return x_7; -} -} -lean_object* l_IO_appDir(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_IO_appDir___rarg), 2, 0); -return x_2; -} -} lean_object* l_IO_FS_Handle_mk___rarg(lean_object* x_1, lean_object* x_2, uint8_t x_3, uint8_t x_4) { _start: { -lean_object* x_5; lean_object* x_6; lean_object* x_7; +lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; x_5 = l_IO_Prim_fopenFlags(x_3, x_4); x_6 = lean_alloc_closure((void*)(l_IO_Prim_Handle_mk___boxed), 3, 2); lean_closure_set(x_6, 0, x_2); lean_closure_set(x_6, 1, x_5); -x_7 = lean_apply_2(x_1, lean_box(0), x_6); -return x_7; +x_7 = lean_ctor_get(x_1, 0); +lean_inc(x_7); +lean_dec(x_1); +x_8 = lean_apply_2(x_7, lean_box(0), x_6); +return x_8; } } lean_object* l_IO_FS_Handle_mk(lean_object* x_1, lean_object* x_2) { @@ -1424,98 +1256,48 @@ lean_dec(x_2); return x_3; } } -lean_object* l_IO_FS_Handle_mk___at_IO_FS_withFile___spec__1(lean_object* x_1, uint8_t x_2, uint8_t x_3, lean_object* x_4) { +lean_object* l_IO_FS_withFile___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, uint8_t x_5, lean_object* x_6) { _start: { -lean_object* x_5; lean_object* x_6; -x_5 = l_IO_Prim_fopenFlags(x_2, x_3); -x_6 = lean_io_prim_handle_mk(x_1, x_5, x_4); -lean_dec(x_5); -return x_6; -} -} -lean_object* l_IO_FS_withFile___rarg(lean_object* x_1, uint8_t x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -uint8_t x_5; lean_object* x_6; -x_5 = 0; -x_6 = l_IO_FS_Handle_mk___at_IO_FS_withFile___spec__1(x_1, x_2, x_5, x_4); -if (lean_obj_tag(x_6) == 0) -{ -lean_object* x_7; lean_object* x_8; lean_object* x_9; -x_7 = lean_ctor_get(x_6, 0); +lean_object* x_7; uint8_t x_8; lean_object* x_9; lean_object* x_10; +x_7 = lean_ctor_get(x_1, 1); lean_inc(x_7); -x_8 = lean_ctor_get(x_6, 1); -lean_inc(x_8); -lean_dec(x_6); -x_9 = lean_apply_2(x_3, x_7, x_8); -return x_9; -} -else -{ -uint8_t x_10; -lean_dec(x_3); -x_10 = !lean_is_exclusive(x_6); -if (x_10 == 0) -{ -return x_6; -} -else -{ -lean_object* x_11; lean_object* x_12; lean_object* x_13; -x_11 = lean_ctor_get(x_6, 0); -x_12 = lean_ctor_get(x_6, 1); -lean_inc(x_12); -lean_inc(x_11); -lean_dec(x_6); -x_13 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_13, 0, x_11); -lean_ctor_set(x_13, 1, x_12); -return x_13; -} -} +lean_dec(x_1); +x_8 = 0; +x_9 = l_IO_FS_Handle_mk___rarg(x_2, x_4, x_5, x_8); +x_10 = lean_apply_4(x_7, lean_box(0), lean_box(0), x_9, x_6); +return x_10; } } lean_object* l_IO_FS_withFile(lean_object* x_1) { _start: { lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_IO_FS_withFile___rarg___boxed), 4, 0); +x_2 = lean_alloc_closure((void*)(l_IO_FS_withFile___rarg___boxed), 6, 0); return x_2; } } -lean_object* l_IO_FS_Handle_mk___at_IO_FS_withFile___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +lean_object* l_IO_FS_withFile___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { -uint8_t x_5; uint8_t x_6; lean_object* x_7; -x_5 = lean_unbox(x_2); -lean_dec(x_2); -x_6 = lean_unbox(x_3); -lean_dec(x_3); -x_7 = l_IO_FS_Handle_mk___at_IO_FS_withFile___spec__1(x_1, x_5, x_6, x_4); -lean_dec(x_1); -return x_7; -} -} -lean_object* l_IO_FS_withFile___rarg___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_2); -lean_dec(x_2); -x_6 = l_IO_FS_withFile___rarg(x_1, x_5, x_3, x_4); -lean_dec(x_1); -return x_6; +uint8_t x_7; lean_object* x_8; +x_7 = lean_unbox(x_5); +lean_dec(x_5); +x_8 = l_IO_FS_withFile___rarg(x_1, x_2, x_3, x_4, x_7, x_6); +return x_8; } } lean_object* l_IO_FS_Handle_isEof___rarg(lean_object* x_1, lean_object* x_2) { _start: { -lean_object* x_3; lean_object* x_4; +lean_object* x_3; lean_object* x_4; lean_object* x_5; x_3 = lean_alloc_closure((void*)(l_IO_Prim_Handle_isEof___boxed), 2, 1); lean_closure_set(x_3, 0, x_2); -x_4 = lean_apply_2(x_1, lean_box(0), x_3); -return x_4; +x_4 = lean_ctor_get(x_1, 0); +lean_inc(x_4); +lean_dec(x_1); +x_5 = lean_apply_2(x_4, lean_box(0), x_3); +return x_5; } } lean_object* l_IO_FS_Handle_isEof(lean_object* x_1, lean_object* x_2) { @@ -1538,11 +1320,14 @@ return x_3; lean_object* l_IO_FS_Handle_flush___rarg(lean_object* x_1, lean_object* x_2) { _start: { -lean_object* x_3; lean_object* x_4; +lean_object* x_3; lean_object* x_4; lean_object* x_5; x_3 = lean_alloc_closure((void*)(l_IO_Prim_Handle_flush___boxed), 2, 1); lean_closure_set(x_3, 0, x_2); -x_4 = lean_apply_2(x_1, lean_box(0), x_3); -return x_4; +x_4 = lean_ctor_get(x_1, 0); +lean_inc(x_4); +lean_dec(x_1); +x_5 = lean_apply_2(x_4, lean_box(0), x_3); +return x_5; } } lean_object* l_IO_FS_Handle_flush(lean_object* x_1, lean_object* x_2) { @@ -1565,14 +1350,17 @@ return x_3; lean_object* l_IO_FS_Handle_read___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { -size_t x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; +size_t x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; x_4 = lean_usize_of_nat(x_3); x_5 = lean_box_usize(x_4); x_6 = lean_alloc_closure((void*)(l_IO_Prim_Handle_read___boxed), 3, 2); lean_closure_set(x_6, 0, x_2); lean_closure_set(x_6, 1, x_5); -x_7 = lean_apply_2(x_1, lean_box(0), x_6); -return x_7; +x_7 = lean_ctor_get(x_1, 0); +lean_inc(x_7); +lean_dec(x_1); +x_8 = lean_apply_2(x_7, lean_box(0), x_6); +return x_8; } } lean_object* l_IO_FS_Handle_read(lean_object* x_1, lean_object* x_2) { @@ -1604,12 +1392,15 @@ return x_3; lean_object* l_IO_FS_Handle_write___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { -lean_object* x_4; lean_object* x_5; +lean_object* x_4; lean_object* x_5; lean_object* x_6; x_4 = lean_alloc_closure((void*)(l_IO_Prim_Handle_write___boxed), 3, 2); lean_closure_set(x_4, 0, x_2); lean_closure_set(x_4, 1, x_3); -x_5 = lean_apply_2(x_1, lean_box(0), x_4); -return x_5; +x_5 = lean_ctor_get(x_1, 0); +lean_inc(x_5); +lean_dec(x_1); +x_6 = lean_apply_2(x_5, lean_box(0), x_4); +return x_6; } } lean_object* l_IO_FS_Handle_write(lean_object* x_1, lean_object* x_2) { @@ -1629,80 +1420,17 @@ lean_dec(x_2); return x_3; } } -lean_object* l_IO_FS_Handle_getByte___rarg(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; lean_object* x_4; -x_3 = lean_alloc_closure((void*)(l_IO_Prim_Handle_getByte___boxed), 2, 1); -lean_closure_set(x_3, 0, x_2); -x_4 = lean_apply_2(x_1, lean_box(0), x_3); -return x_4; -} -} -lean_object* l_IO_FS_Handle_getByte(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = lean_alloc_closure((void*)(l_IO_FS_Handle_getByte___rarg), 2, 0); -return x_3; -} -} -lean_object* l_IO_FS_Handle_getByte___boxed(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = l_IO_FS_Handle_getByte(x_1, x_2); -lean_dec(x_2); -return x_3; -} -} -lean_object* l_IO_FS_Handle_putByte___rarg(lean_object* x_1, lean_object* x_2, uint8_t x_3) { -_start: -{ -lean_object* x_4; lean_object* x_5; lean_object* x_6; -x_4 = lean_box(x_3); -x_5 = lean_alloc_closure((void*)(l_IO_Prim_Handle_putByte___boxed), 3, 2); -lean_closure_set(x_5, 0, x_2); -lean_closure_set(x_5, 1, x_4); -x_6 = lean_apply_2(x_1, lean_box(0), x_5); -return x_6; -} -} -lean_object* l_IO_FS_Handle_putByte(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = lean_alloc_closure((void*)(l_IO_FS_Handle_putByte___rarg___boxed), 3, 0); -return x_3; -} -} -lean_object* l_IO_FS_Handle_putByte___rarg___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_3); -lean_dec(x_3); -x_5 = l_IO_FS_Handle_putByte___rarg(x_1, x_2, x_4); -return x_5; -} -} -lean_object* l_IO_FS_Handle_putByte___boxed(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = l_IO_FS_Handle_putByte(x_1, x_2); -lean_dec(x_2); -return x_3; -} -} lean_object* l_IO_FS_Handle_getLine___rarg(lean_object* x_1, lean_object* x_2) { _start: { -lean_object* x_3; lean_object* x_4; +lean_object* x_3; lean_object* x_4; lean_object* x_5; x_3 = lean_alloc_closure((void*)(l_IO_Prim_Handle_getLine___boxed), 2, 1); lean_closure_set(x_3, 0, x_2); -x_4 = lean_apply_2(x_1, lean_box(0), x_3); -return x_4; +x_4 = lean_ctor_get(x_1, 0); +lean_inc(x_4); +lean_dec(x_1); +x_5 = lean_apply_2(x_4, lean_box(0), x_3); +return x_5; } } lean_object* l_IO_FS_Handle_getLine(lean_object* x_1, lean_object* x_2) { @@ -1725,12 +1453,15 @@ return x_3; lean_object* l_IO_FS_Handle_putStr___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { -lean_object* x_4; lean_object* x_5; +lean_object* x_4; lean_object* x_5; lean_object* x_6; x_4 = lean_alloc_closure((void*)(l_IO_Prim_Handle_putStr___boxed), 3, 2); lean_closure_set(x_4, 0, x_2); lean_closure_set(x_4, 1, x_3); -x_5 = lean_apply_2(x_1, lean_box(0), x_4); -return x_5; +x_5 = lean_ctor_get(x_1, 0); +lean_inc(x_5); +lean_dec(x_1); +x_6 = lean_apply_2(x_5, lean_box(0), x_4); +return x_6; } } lean_object* l_IO_FS_Handle_putStr(lean_object* x_1, lean_object* x_2) { @@ -1750,6 +1481,14 @@ lean_dec(x_2); return x_3; } } +lean_object* _init_l_IO_FS_Handle_putStrLn___rarg___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("\n"); +return x_1; +} +} lean_object* l_IO_FS_Handle_putStrLn___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { @@ -1763,7 +1502,7 @@ lean_dec(x_5); lean_inc(x_3); lean_inc(x_2); x_7 = l_IO_FS_Handle_putStr___rarg(x_2, x_3, x_4); -x_8 = l_IO_println___rarg___closed__1; +x_8 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_9 = l_IO_FS_Handle_putStr___rarg(x_2, x_3, x_8); x_10 = lean_apply_3(x_6, lean_box(0), x_7, x_9); return x_10; @@ -2088,6 +1827,418 @@ x_2 = lean_alloc_closure((void*)(l_IO_FS_lines___rarg), 3, 0); return x_2; } } +lean_object* _init_l_IO_stdin___rarg___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_IO_Prim_stdin___boxed), 1, 0); +return x_1; +} +} +lean_object* l_IO_stdin___rarg(lean_object* x_1) { +_start: +{ +lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_2 = lean_ctor_get(x_1, 0); +lean_inc(x_2); +lean_dec(x_1); +x_3 = l_IO_stdin___rarg___closed__1; +x_4 = lean_apply_2(x_2, lean_box(0), x_3); +return x_4; +} +} +lean_object* l_IO_stdin(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = lean_alloc_closure((void*)(l_IO_stdin___rarg), 1, 0); +return x_3; +} +} +lean_object* l_IO_stdin___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = l_IO_stdin(x_1, x_2); +lean_dec(x_2); +return x_3; +} +} +lean_object* _init_l_IO_stdout___rarg___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_IO_Prim_stdout___boxed), 1, 0); +return x_1; +} +} +lean_object* l_IO_stdout___rarg(lean_object* x_1) { +_start: +{ +lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_2 = lean_ctor_get(x_1, 0); +lean_inc(x_2); +lean_dec(x_1); +x_3 = l_IO_stdout___rarg___closed__1; +x_4 = lean_apply_2(x_2, lean_box(0), x_3); +return x_4; +} +} +lean_object* l_IO_stdout(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = lean_alloc_closure((void*)(l_IO_stdout___rarg), 1, 0); +return x_3; +} +} +lean_object* l_IO_stdout___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = l_IO_stdout(x_1, x_2); +lean_dec(x_2); +return x_3; +} +} +lean_object* _init_l_IO_stderr___rarg___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_IO_Prim_stderr___boxed), 1, 0); +return x_1; +} +} +lean_object* l_IO_stderr___rarg(lean_object* x_1) { +_start: +{ +lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_2 = lean_ctor_get(x_1, 0); +lean_inc(x_2); +lean_dec(x_1); +x_3 = l_IO_stderr___rarg___closed__1; +x_4 = lean_apply_2(x_2, lean_box(0), x_3); +return x_4; +} +} +lean_object* l_IO_stderr(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = lean_alloc_closure((void*)(l_IO_stderr___rarg), 1, 0); +return x_3; +} +} +lean_object* l_IO_stderr___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = l_IO_stderr(x_1, x_2); +lean_dec(x_2); +return x_3; +} +} +lean_object* l___private_Init_System_IO_1__putStr___rarg___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_IO_FS_Handle_putStr___rarg(x_1, x_3, x_2); +return x_4; +} +} +lean_object* l___private_Init_System_IO_1__putStr___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; +x_4 = lean_ctor_get(x_1, 1); +lean_inc(x_4); +lean_dec(x_1); +lean_inc(x_2); +x_5 = l_IO_stdout___rarg(x_2); +x_6 = lean_alloc_closure((void*)(l___private_Init_System_IO_1__putStr___rarg___lambda__1), 3, 2); +lean_closure_set(x_6, 0, x_2); +lean_closure_set(x_6, 1, x_3); +x_7 = lean_apply_4(x_4, lean_box(0), lean_box(0), x_5, x_6); +return x_7; +} +} +lean_object* l___private_Init_System_IO_1__putStr(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l___private_Init_System_IO_1__putStr___rarg), 3, 0); +return x_2; +} +} +lean_object* l_IO_print___rarg(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 = lean_apply_1(x_4, x_5); +x_7 = l___private_Init_System_IO_1__putStr___rarg(x_1, x_2, x_6); +return x_7; +} +} +lean_object* l_IO_print(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_IO_print___rarg), 5, 0); +return x_2; +} +} +lean_object* l_IO_println___rarg(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_9; lean_object* x_10; lean_object* x_11; +x_6 = lean_ctor_get(x_1, 0); +lean_inc(x_6); +x_7 = lean_ctor_get(x_6, 4); +lean_inc(x_7); +lean_dec(x_6); +lean_inc(x_2); +lean_inc(x_1); +x_8 = l_IO_print___rarg(x_1, x_2, lean_box(0), x_4, x_5); +x_9 = l_IO_FS_Handle_putStrLn___rarg___closed__1; +x_10 = l___private_Init_System_IO_1__putStr___rarg(x_1, x_2, x_9); +x_11 = lean_apply_3(x_7, lean_box(0), x_8, x_10); +return x_11; +} +} +lean_object* l_IO_println(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_IO_println___rarg), 5, 0); +return x_2; +} +} +lean_object* l_IO_getEnv___rarg(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; lean_object* x_4; lean_object* x_5; +x_3 = lean_alloc_closure((void*)(l_IO_Prim_getEnv___boxed), 2, 1); +lean_closure_set(x_3, 0, x_2); +x_4 = lean_ctor_get(x_1, 0); +lean_inc(x_4); +lean_dec(x_1); +x_5 = lean_apply_2(x_4, lean_box(0), x_3); +return x_5; +} +} +lean_object* l_IO_getEnv(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = lean_alloc_closure((void*)(l_IO_getEnv___rarg), 2, 0); +return x_3; +} +} +lean_object* l_IO_getEnv___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = l_IO_getEnv(x_1, x_2); +lean_dec(x_2); +return x_3; +} +} +lean_object* l_IO_realPath___rarg(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; lean_object* x_4; lean_object* x_5; +x_3 = lean_alloc_closure((void*)(l_IO_Prim_realPath___boxed), 2, 1); +lean_closure_set(x_3, 0, x_2); +x_4 = lean_ctor_get(x_1, 0); +lean_inc(x_4); +lean_dec(x_1); +x_5 = lean_apply_2(x_4, lean_box(0), x_3); +return x_5; +} +} +lean_object* l_IO_realPath(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = lean_alloc_closure((void*)(l_IO_realPath___rarg), 2, 0); +return x_3; +} +} +lean_object* l_IO_realPath___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = l_IO_realPath(x_1, x_2); +lean_dec(x_2); +return x_3; +} +} +lean_object* l_IO_isDir___rarg(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; lean_object* x_4; lean_object* x_5; +x_3 = lean_alloc_closure((void*)(l_IO_Prim_isDir___boxed), 2, 1); +lean_closure_set(x_3, 0, x_2); +x_4 = lean_ctor_get(x_1, 0); +lean_inc(x_4); +lean_dec(x_1); +x_5 = lean_apply_2(x_4, lean_box(0), x_3); +return x_5; +} +} +lean_object* l_IO_isDir(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = lean_alloc_closure((void*)(l_IO_isDir___rarg), 2, 0); +return x_3; +} +} +lean_object* l_IO_isDir___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = l_IO_isDir(x_1, x_2); +lean_dec(x_2); +return x_3; +} +} +lean_object* l_IO_fileExists___rarg(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; lean_object* x_4; lean_object* x_5; +x_3 = lean_alloc_closure((void*)(l_IO_Prim_fileExists___boxed), 2, 1); +lean_closure_set(x_3, 0, x_2); +x_4 = lean_ctor_get(x_1, 0); +lean_inc(x_4); +lean_dec(x_1); +x_5 = lean_apply_2(x_4, lean_box(0), x_3); +return x_5; +} +} +lean_object* l_IO_fileExists(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = lean_alloc_closure((void*)(l_IO_fileExists___rarg), 2, 0); +return x_3; +} +} +lean_object* l_IO_fileExists___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = l_IO_fileExists(x_1, x_2); +lean_dec(x_2); +return x_3; +} +} +lean_object* _init_l_IO_appPath___rarg___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_IO_Prim_appPath___boxed), 1, 0); +return x_1; +} +} +lean_object* l_IO_appPath___rarg(lean_object* x_1) { +_start: +{ +lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_2 = lean_ctor_get(x_1, 0); +lean_inc(x_2); +lean_dec(x_1); +x_3 = l_IO_appPath___rarg___closed__1; +x_4 = lean_apply_2(x_2, lean_box(0), x_3); +return x_4; +} +} +lean_object* l_IO_appPath(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = lean_alloc_closure((void*)(l_IO_appPath___rarg), 1, 0); +return x_3; +} +} +lean_object* l_IO_appPath___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = l_IO_appPath(x_1, x_2); +lean_dec(x_2); +return x_3; +} +} +lean_object* l_IO_appDir___rarg___lambda__1(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; lean_object* x_4; +x_3 = l_System_FilePath_dirName(x_2); +x_4 = l_IO_realPath___rarg(x_1, x_3); +return x_4; +} +} +lean_object* l_IO_appDir___rarg(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; +x_3 = lean_ctor_get(x_1, 1); +lean_inc(x_3); +lean_dec(x_1); +lean_inc(x_2); +x_4 = l_IO_appPath___rarg(x_2); +x_5 = lean_alloc_closure((void*)(l_IO_appDir___rarg___lambda__1), 2, 1); +lean_closure_set(x_5, 0, x_2); +x_6 = lean_apply_4(x_3, lean_box(0), lean_box(0), x_4, x_5); +return x_6; +} +} +lean_object* l_IO_appDir(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_IO_appDir___rarg), 2, 0); +return x_2; +} +} +lean_object* _init_l_IO_currentDir___rarg___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_IO_Prim_currentDir___boxed), 1, 0); +return x_1; +} +} +lean_object* l_IO_currentDir___rarg(lean_object* x_1) { +_start: +{ +lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_2 = lean_ctor_get(x_1, 0); +lean_inc(x_2); +lean_dec(x_1); +x_3 = l_IO_currentDir___rarg___closed__1; +x_4 = lean_apply_2(x_2, lean_box(0), x_3); +return x_4; +} +} +lean_object* l_IO_currentDir(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = lean_alloc_closure((void*)(l_IO_currentDir___rarg), 1, 0); +return x_3; +} +} +lean_object* l_IO_currentDir___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = l_IO_currentDir(x_1, x_2); +lean_dec(x_2); +return x_3; +} +} uint32_t _init_l_IO_AccessRight_flags___closed__1() { _start: { @@ -2444,12 +2595,15 @@ return x_5; lean_object* l_IO_mkRef___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { -lean_object* x_4; lean_object* x_5; +lean_object* x_4; lean_object* x_5; lean_object* x_6; x_4 = lean_alloc_closure((void*)(l_IO_Prim_mkRef___boxed), 3, 2); lean_closure_set(x_4, 0, lean_box(0)); lean_closure_set(x_4, 1, x_3); -x_5 = lean_apply_2(x_1, lean_box(0), x_4); -return x_5; +x_5 = lean_ctor_get(x_1, 0); +lean_inc(x_5); +lean_dec(x_1); +x_6 = lean_apply_2(x_5, lean_box(0), x_4); +return x_6; } } lean_object* l_IO_mkRef(lean_object* x_1, lean_object* x_2) { @@ -2472,12 +2626,15 @@ return x_3; lean_object* l_IO_Ref_get___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { -lean_object* x_4; lean_object* x_5; +lean_object* x_4; lean_object* x_5; lean_object* x_6; x_4 = lean_alloc_closure((void*)(l_IO_Prim_Ref_get___boxed), 3, 2); lean_closure_set(x_4, 0, lean_box(0)); lean_closure_set(x_4, 1, x_3); -x_5 = lean_apply_2(x_1, lean_box(0), x_4); -return x_5; +x_5 = lean_ctor_get(x_1, 0); +lean_inc(x_5); +lean_dec(x_1); +x_6 = lean_apply_2(x_5, lean_box(0), x_4); +return x_6; } } lean_object* l_IO_Ref_get(lean_object* x_1, lean_object* x_2) { @@ -2500,13 +2657,16 @@ return x_3; lean_object* l_IO_Ref_set___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { -lean_object* x_5; lean_object* x_6; +lean_object* x_5; lean_object* x_6; lean_object* x_7; x_5 = lean_alloc_closure((void*)(l_IO_Prim_Ref_set___boxed), 4, 3); lean_closure_set(x_5, 0, lean_box(0)); lean_closure_set(x_5, 1, x_3); lean_closure_set(x_5, 2, x_4); -x_6 = lean_apply_2(x_1, lean_box(0), x_5); -return x_6; +x_6 = lean_ctor_get(x_1, 0); +lean_inc(x_6); +lean_dec(x_1); +x_7 = lean_apply_2(x_6, lean_box(0), x_5); +return x_7; } } lean_object* l_IO_Ref_set(lean_object* x_1, lean_object* x_2) { @@ -2529,13 +2689,16 @@ return x_3; lean_object* l_IO_Ref_swap___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { -lean_object* x_5; lean_object* x_6; +lean_object* x_5; lean_object* x_6; lean_object* x_7; x_5 = lean_alloc_closure((void*)(l_IO_Prim_Ref_swap___boxed), 4, 3); lean_closure_set(x_5, 0, lean_box(0)); lean_closure_set(x_5, 1, x_3); lean_closure_set(x_5, 2, x_4); -x_6 = lean_apply_2(x_1, lean_box(0), x_5); -return x_6; +x_6 = lean_ctor_get(x_1, 0); +lean_inc(x_6); +lean_dec(x_1); +x_7 = lean_apply_2(x_6, lean_box(0), x_5); +return x_7; } } lean_object* l_IO_Ref_swap(lean_object* x_1, lean_object* x_2) { @@ -2558,12 +2721,15 @@ return x_3; lean_object* l_IO_Ref_reset___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { -lean_object* x_4; lean_object* x_5; +lean_object* x_4; lean_object* x_5; lean_object* x_6; x_4 = lean_alloc_closure((void*)(l_IO_Prim_Ref_reset___boxed), 3, 2); lean_closure_set(x_4, 0, lean_box(0)); lean_closure_set(x_4, 1, x_3); -x_5 = lean_apply_2(x_1, lean_box(0), x_4); -return x_5; +x_5 = lean_ctor_get(x_1, 0); +lean_inc(x_5); +lean_dec(x_1); +x_6 = lean_apply_2(x_5, lean_box(0), x_4); +return x_6; } } lean_object* l_IO_Ref_reset(lean_object* x_1, lean_object* x_2) { @@ -2586,13 +2752,16 @@ return x_3; lean_object* l_IO_Ref_ptrEq___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { -lean_object* x_5; lean_object* x_6; +lean_object* x_5; lean_object* x_6; lean_object* x_7; x_5 = lean_alloc_closure((void*)(l_IO_Prim_Ref_ptrEq___boxed), 4, 3); lean_closure_set(x_5, 0, lean_box(0)); lean_closure_set(x_5, 1, x_3); lean_closure_set(x_5, 2, x_4); -x_6 = lean_apply_2(x_1, lean_box(0), x_5); -return x_6; +x_6 = lean_ctor_get(x_1, 0); +lean_inc(x_6); +lean_dec(x_1); +x_7 = lean_apply_2(x_6, lean_box(0), x_5); +return x_7; } } lean_object* l_IO_Ref_ptrEq(lean_object* x_1, lean_object* x_2) { @@ -2641,22 +2810,25 @@ return x_13; lean_object* l_IO_Ref_modify___rarg(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_9; lean_object* x_10; +lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; x_6 = lean_ctor_get(x_1, 1); lean_inc(x_6); lean_inc(x_4); x_7 = lean_alloc_closure((void*)(l_IO_Prim_Ref_get___boxed), 3, 2); lean_closure_set(x_7, 0, lean_box(0)); lean_closure_set(x_7, 1, x_4); -lean_inc(x_2); -x_8 = lean_apply_2(x_2, lean_box(0), x_7); -x_9 = lean_alloc_closure((void*)(l_IO_Ref_modify___rarg___lambda__1), 5, 4); -lean_closure_set(x_9, 0, x_1); -lean_closure_set(x_9, 1, x_4); -lean_closure_set(x_9, 2, x_2); -lean_closure_set(x_9, 3, x_5); -x_10 = lean_apply_4(x_6, lean_box(0), lean_box(0), x_8, x_9); -return x_10; +x_8 = lean_ctor_get(x_2, 0); +lean_inc(x_8); +lean_dec(x_2); +lean_inc(x_8); +x_9 = lean_apply_2(x_8, lean_box(0), x_7); +x_10 = lean_alloc_closure((void*)(l_IO_Ref_modify___rarg___lambda__1), 5, 4); +lean_closure_set(x_10, 0, x_1); +lean_closure_set(x_10, 1, x_4); +lean_closure_set(x_10, 2, x_8); +lean_closure_set(x_10, 3, x_5); +x_11 = lean_apply_4(x_6, lean_box(0), lean_box(0), x_9, x_10); +return x_11; } } lean_object* l_IO_Ref_modify(lean_object* x_1) { @@ -2667,19 +2839,68 @@ x_2 = lean_alloc_closure((void*)(l_IO_Ref_modify___rarg), 5, 0); return x_2; } } +lean_object* l_IO_stdout___at_Lean_HasRepr_hasEval___spec__4(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_get_stdout(x_1); +return x_2; +} +} +lean_object* l_IO_FS_Handle_putStr___at_Lean_HasRepr_hasEval___spec__5(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = lean_io_prim_handle_put_str(x_1, x_2, x_3); +return x_4; +} +} lean_object* l___private_Init_System_IO_1__putStr___at_Lean_HasRepr_hasEval___spec__3(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; -x_3 = lean_io_prim_put_str(x_1, x_2); +x_3 = lean_get_stdout(x_2); +if (lean_obj_tag(x_3) == 0) +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; +x_4 = lean_ctor_get(x_3, 0); +lean_inc(x_4); +x_5 = lean_ctor_get(x_3, 1); +lean_inc(x_5); +lean_dec(x_3); +x_6 = lean_io_prim_handle_put_str(x_4, x_1, x_5); +lean_dec(x_4); +return x_6; +} +else +{ +uint8_t x_7; +x_7 = !lean_is_exclusive(x_3); +if (x_7 == 0) +{ return x_3; } +else +{ +lean_object* x_8; lean_object* x_9; lean_object* x_10; +x_8 = lean_ctor_get(x_3, 0); +x_9 = lean_ctor_get(x_3, 1); +lean_inc(x_9); +lean_inc(x_8); +lean_dec(x_3); +x_10 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_10, 0, x_8); +lean_ctor_set(x_10, 1, x_9); +return x_10; +} +} +} } lean_object* l_IO_print___at_Lean_HasRepr_hasEval___spec__2(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; -x_3 = lean_io_prim_put_str(x_1, x_2); +x_3 = l___private_Init_System_IO_1__putStr___at_Lean_HasRepr_hasEval___spec__3(x_1, x_2); return x_3; } } @@ -2687,15 +2908,15 @@ lean_object* l_IO_println___at_Lean_HasRepr_hasEval___spec__1(lean_object* x_1, _start: { lean_object* x_3; -x_3 = lean_io_prim_put_str(x_1, x_2); +x_3 = l___private_Init_System_IO_1__putStr___at_Lean_HasRepr_hasEval___spec__3(x_1, x_2); if (lean_obj_tag(x_3) == 0) { lean_object* x_4; lean_object* x_5; lean_object* x_6; x_4 = lean_ctor_get(x_3, 1); lean_inc(x_4); lean_dec(x_3); -x_5 = l_IO_println___rarg___closed__1; -x_6 = lean_io_prim_put_str(x_5, x_4); +x_5 = l_IO_FS_Handle_putStrLn___rarg___closed__1; +x_6 = l___private_Init_System_IO_1__putStr___at_Lean_HasRepr_hasEval___spec__3(x_5, x_4); return x_6; } else @@ -2740,6 +2961,16 @@ x_2 = lean_alloc_closure((void*)(l_Lean_HasRepr_hasEval___rarg___boxed), 4, 0); return x_2; } } +lean_object* l_IO_FS_Handle_putStr___at_Lean_HasRepr_hasEval___spec__5___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_IO_FS_Handle_putStr___at_Lean_HasRepr_hasEval___spec__5(x_1, x_2, x_3); +lean_dec(x_2); +lean_dec(x_1); +return x_4; +} +} lean_object* l___private_Init_System_IO_1__putStr___at_Lean_HasRepr_hasEval___spec__3___boxed(lean_object* x_1, lean_object* x_2) { _start: { @@ -2887,6 +3118,7 @@ return x_6; } } lean_object* initialize_Init_Control_EState(lean_object*); +lean_object* initialize_Init_Control_Reader(lean_object*); lean_object* initialize_Init_Data_String_Basic(lean_object*); lean_object* initialize_Init_Data_ByteArray(lean_object*); lean_object* initialize_Init_System_IOError(lean_object*); @@ -2899,6 +3131,9 @@ _G_initialized = true; res = initialize_Init_Control_EState(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); +res = initialize_Init_Control_Reader(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); res = initialize_Init_Data_String_Basic(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); @@ -2919,6 +3154,14 @@ l_EIO_MonadExcept___closed__2 = _init_l_EIO_MonadExcept___closed__2(); lean_mark_persistent(l_EIO_MonadExcept___closed__2); l_EIO_HasOrelse___closed__1 = _init_l_EIO_HasOrelse___closed__1(); lean_mark_persistent(l_EIO_HasOrelse___closed__1); +l_IO_MonadIO___closed__1 = _init_l_IO_MonadIO___closed__1(); +lean_mark_persistent(l_IO_MonadIO___closed__1); +l_IO_MonadIO___closed__2 = _init_l_IO_MonadIO___closed__2(); +lean_mark_persistent(l_IO_MonadIO___closed__2); +l_IO_MonadIO___closed__3 = _init_l_IO_MonadIO___closed__3(); +lean_mark_persistent(l_IO_MonadIO___closed__3); +l_IO_MonadIO = _init_l_IO_MonadIO(); +lean_mark_persistent(l_IO_MonadIO); l_IO_Prim_fopenFlags___closed__1 = _init_l_IO_Prim_fopenFlags___closed__1(); lean_mark_persistent(l_IO_Prim_fopenFlags___closed__1); l_IO_Prim_fopenFlags___closed__2 = _init_l_IO_Prim_fopenFlags___closed__2(); @@ -2947,8 +3190,14 @@ l_IO_Prim_fopenFlags___closed__13 = _init_l_IO_Prim_fopenFlags___closed__13(); lean_mark_persistent(l_IO_Prim_fopenFlags___closed__13); l_IO_Prim_fopenFlags___closed__14 = _init_l_IO_Prim_fopenFlags___closed__14(); lean_mark_persistent(l_IO_Prim_fopenFlags___closed__14); -l_IO_println___rarg___closed__1 = _init_l_IO_println___rarg___closed__1(); -lean_mark_persistent(l_IO_println___rarg___closed__1); +l_IO_FS_Handle_putStrLn___rarg___closed__1 = _init_l_IO_FS_Handle_putStrLn___rarg___closed__1(); +lean_mark_persistent(l_IO_FS_Handle_putStrLn___rarg___closed__1); +l_IO_stdin___rarg___closed__1 = _init_l_IO_stdin___rarg___closed__1(); +lean_mark_persistent(l_IO_stdin___rarg___closed__1); +l_IO_stdout___rarg___closed__1 = _init_l_IO_stdout___rarg___closed__1(); +lean_mark_persistent(l_IO_stdout___rarg___closed__1); +l_IO_stderr___rarg___closed__1 = _init_l_IO_stderr___rarg___closed__1(); +lean_mark_persistent(l_IO_stderr___rarg___closed__1); l_IO_appPath___rarg___closed__1 = _init_l_IO_appPath___rarg___closed__1(); lean_mark_persistent(l_IO_appPath___rarg___closed__1); l_IO_currentDir___rarg___closed__1 = _init_l_IO_currentDir___rarg___closed__1(); diff --git a/stage0/stdlib/Lean/Compiler/IR/EmitC.c b/stage0/stdlib/Lean/Compiler/IR/EmitC.c index 631131a049..4b53a96577 100644 --- a/stage0/stdlib/Lean/Compiler/IR/EmitC.c +++ b/stage0/stdlib/Lean/Compiler/IR/EmitC.c @@ -172,6 +172,7 @@ lean_object* l_Lean_IR_EmitC_main(lean_object*, lean_object*); extern lean_object* l_Char_quoteCore___closed__2; lean_object* l_Lean_IR_EmitC_emit___rarg(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_IR_Arg_Inhabited; +extern lean_object* l_IO_FS_Handle_putStrLn___rarg___closed__1; lean_object* l_Lean_IR_EmitC_emitMainFn___closed__4; lean_object* l_Lean_IR_EmitC_emitIf(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitReset(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -268,7 +269,6 @@ lean_object* l_Lean_IR_EmitC_emitSProj___closed__3; extern lean_object* l_List_reprAux___main___rarg___closed__1; extern lean_object* l_Lean_IR_formatFnBody___main___closed__1; lean_object* l_Lean_IR_EmitC_emitFileHeader___closed__21; -extern lean_object* l_IO_println___rarg___closed__1; lean_object* l_Lean_IR_EmitC_toCName(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitInitFn___closed__7; lean_object* l_Lean_IR_EmitC_emitFullApp___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -731,7 +731,7 @@ lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_obj x_5 = lean_apply_1(x_1, x_2); x_6 = lean_string_append(x_4, x_5); lean_dec(x_5); -x_7 = l_IO_println___rarg___closed__1; +x_7 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_8 = lean_string_append(x_6, x_7); x_9 = lean_box(0); x_10 = lean_alloc_ctor(0, 2, 0); @@ -782,7 +782,7 @@ lean_inc(x_1); x_9 = lean_apply_1(x_1, x_7); x_10 = lean_string_append(x_4, x_9); lean_dec(x_9); -x_11 = l_IO_println___rarg___closed__1; +x_11 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_12 = lean_string_append(x_10, x_11); x_2 = x_8; x_4 = x_12; @@ -1903,7 +1903,7 @@ x_33 = l_Option_HasRepr___rarg___closed__3; x_34 = lean_string_append(x_31, x_33); x_35 = l_Lean_IR_formatFnBody___main___closed__1; x_36 = lean_string_append(x_34, x_35); -x_37 = l_IO_println___rarg___closed__1; +x_37 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_38 = lean_string_append(x_36, x_37); x_39 = lean_box(0); lean_ctor_set(x_29, 1, x_38); @@ -1920,7 +1920,7 @@ x_41 = l_Option_HasRepr___rarg___closed__3; x_42 = lean_string_append(x_40, x_41); x_43 = l_Lean_IR_formatFnBody___main___closed__1; x_44 = lean_string_append(x_42, x_43); -x_45 = l_IO_println___rarg___closed__1; +x_45 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_46 = lean_string_append(x_44, x_45); x_47 = lean_box(0); x_48 = lean_alloc_ctor(0, 2, 0); @@ -1955,7 +1955,7 @@ x_56 = l_Option_HasRepr___rarg___closed__3; x_57 = lean_string_append(x_54, x_56); x_58 = l_Lean_IR_formatFnBody___main___closed__1; x_59 = lean_string_append(x_57, x_58); -x_60 = l_IO_println___rarg___closed__1; +x_60 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_61 = lean_string_append(x_59, x_60); x_62 = lean_box(0); lean_ctor_set(x_52, 1, x_61); @@ -1972,7 +1972,7 @@ x_64 = l_Option_HasRepr___rarg___closed__3; x_65 = lean_string_append(x_63, x_64); x_66 = l_Lean_IR_formatFnBody___main___closed__1; x_67 = lean_string_append(x_65, x_66); -x_68 = l_IO_println___rarg___closed__1; +x_68 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_69 = lean_string_append(x_67, x_68); x_70 = lean_box(0); x_71 = lean_alloc_ctor(0, 2, 0); @@ -1994,7 +1994,7 @@ x_76 = l_Option_HasRepr___rarg___closed__3; x_77 = lean_string_append(x_75, x_76); x_78 = l_Lean_IR_formatFnBody___main___closed__1; x_79 = lean_string_append(x_77, x_78); -x_80 = l_IO_println___rarg___closed__1; +x_80 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_81 = lean_string_append(x_79, x_80); x_82 = lean_box(0); if (lean_is_scalar(x_10)) { @@ -2016,7 +2016,7 @@ lean_dec(x_8); lean_dec(x_6); x_88 = l_Lean_IR_formatFnBody___main___closed__1; x_89 = lean_string_append(x_21, x_88); -x_90 = l_IO_println___rarg___closed__1; +x_90 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_91 = lean_string_append(x_89, x_90); x_92 = lean_box(0); if (lean_is_scalar(x_10)) { @@ -2464,7 +2464,7 @@ lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_obj x_6 = lean_ctor_get(x_1, 0); x_7 = lean_ctor_get(x_1, 1); x_8 = lean_string_append(x_3, x_6); -x_9 = l_IO_println___rarg___closed__1; +x_9 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_10 = lean_string_append(x_8, x_9); x_1 = x_7; x_3 = x_10; @@ -3073,7 +3073,7 @@ if (x_20 == 0) lean_object* x_85; lean_object* x_86; 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; x_85 = l_Lean_IR_EmitC_emitMainFn___closed__46; x_86 = lean_string_append(x_18, x_85); -x_87 = l_IO_println___rarg___closed__1; +x_87 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_88 = lean_string_append(x_86, x_87); x_89 = l_Lean_IR_EmitC_emitMainFn___closed__47; x_90 = lean_string_append(x_88, x_89); @@ -3089,7 +3089,7 @@ else 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; lean_object* x_102; lean_object* x_103; lean_object* x_104; x_95 = l_Lean_IR_EmitC_emitMainFn___closed__49; x_96 = lean_string_append(x_18, x_95); -x_97 = l_IO_println___rarg___closed__1; +x_97 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_98 = lean_string_append(x_96, x_97); x_99 = l_Lean_IR_EmitC_emitMainFn___closed__47; x_100 = lean_string_append(x_98, x_99); @@ -3118,7 +3118,7 @@ x_29 = l_Lean_IR_EmitC_emitMainFn___closed__3; x_30 = lean_string_append(x_28, x_29); x_31 = lean_string_append(x_24, x_30); lean_dec(x_30); -x_32 = l_IO_println___rarg___closed__1; +x_32 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_33 = lean_string_append(x_31, x_32); x_34 = l_Lean_IR_EmitC_emitMainFn___closed__11; x_35 = l_List_forM___main___at_Lean_IR_EmitC_emitMainFn___spec__2(x_34, x_1, x_33); @@ -3797,7 +3797,7 @@ x_13 = l_Lean_Environment_imports(x_4); lean_dec(x_4); x_14 = l_Lean_IR_EmitC_emitFileHeader___closed__23; x_15 = lean_string_append(x_8, x_14); -x_16 = l_IO_println___rarg___closed__1; +x_16 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_17 = lean_string_append(x_15, x_16); x_18 = lean_string_append(x_17, x_12); lean_dec(x_12); @@ -4461,7 +4461,7 @@ x_16 = lean_string_append(x_14, x_15); lean_dec(x_15); x_17 = l_Option_HasRepr___rarg___closed__3; x_18 = lean_string_append(x_16, x_17); -x_19 = l_IO_println___rarg___closed__1; +x_19 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_20 = lean_string_append(x_18, x_19); lean_inc(x_1); lean_inc(x_7); @@ -4566,7 +4566,7 @@ x_19 = lean_string_append(x_17, x_18); lean_dec(x_18); x_20 = l___private_Init_Util_1__mkPanicMessage___closed__2; x_21 = lean_string_append(x_19, x_20); -x_22 = l_IO_println___rarg___closed__1; +x_22 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_23 = lean_string_append(x_21, x_22); lean_inc(x_1); lean_inc(x_4); @@ -4615,7 +4615,7 @@ lean_inc(x_31); lean_dec(x_10); x_32 = l_Array_forMAux___main___at_Lean_IR_EmitC_emitCase___spec__1___closed__1; x_33 = lean_string_append(x_5, x_32); -x_34 = l_IO_println___rarg___closed__1; +x_34 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_35 = lean_string_append(x_33, x_34); lean_inc(x_1); lean_inc(x_4); @@ -4692,7 +4692,7 @@ lean_inc(x_12); lean_dec(x_11); x_13 = l_Lean_IR_EmitC_emitCase___closed__2; x_14 = lean_string_append(x_12, x_13); -x_15 = l_IO_println___rarg___closed__1; +x_15 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_16 = lean_string_append(x_14, x_15); x_17 = lean_unsigned_to_nat(0u); x_18 = l_Array_forMAux___main___at_Lean_IR_EmitC_emitCase___spec__1(x_1, x_8, x_17, x_5, x_16); @@ -4897,7 +4897,7 @@ x_19 = lean_string_append(x_17, x_18); lean_dec(x_18); x_20 = l_Lean_IR_EmitC_emitInc___closed__1; x_21 = lean_string_append(x_19, x_20); -x_22 = l_IO_println___rarg___closed__1; +x_22 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_23 = lean_string_append(x_21, x_22); x_24 = lean_box(0); x_25 = lean_alloc_ctor(0, 2, 0); @@ -4911,7 +4911,7 @@ lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean lean_dec(x_2); x_26 = l_Lean_IR_EmitC_emitInc___closed__1; x_27 = lean_string_append(x_15, x_26); -x_28 = l_IO_println___rarg___closed__1; +x_28 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_29 = lean_string_append(x_27, x_28); x_30 = lean_box(0); x_31 = lean_alloc_ctor(0, 2, 0); @@ -4978,7 +4978,7 @@ x_19 = lean_string_append(x_17, x_18); lean_dec(x_18); x_20 = l_Lean_IR_EmitC_emitInc___closed__1; x_21 = lean_string_append(x_19, x_20); -x_22 = l_IO_println___rarg___closed__1; +x_22 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_23 = lean_string_append(x_21, x_22); x_24 = lean_box(0); x_25 = lean_alloc_ctor(0, 2, 0); @@ -4992,7 +4992,7 @@ lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean lean_dec(x_2); x_26 = l_Lean_IR_EmitC_emitInc___closed__1; x_27 = lean_string_append(x_15, x_26); -x_28 = l_IO_println___rarg___closed__1; +x_28 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_29 = lean_string_append(x_27, x_28); x_30 = lean_box(0); x_31 = lean_alloc_ctor(0, 2, 0); @@ -5020,7 +5020,7 @@ x_40 = lean_string_append(x_38, x_39); lean_dec(x_39); x_41 = l_Lean_IR_EmitC_emitInc___closed__1; x_42 = lean_string_append(x_40, x_41); -x_43 = l_IO_println___rarg___closed__1; +x_43 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_44 = lean_string_append(x_42, x_43); x_45 = lean_box(0); x_46 = lean_alloc_ctor(0, 2, 0); @@ -5034,7 +5034,7 @@ lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean lean_dec(x_2); x_47 = l_Lean_IR_EmitC_emitInc___closed__1; x_48 = lean_string_append(x_36, x_47); -x_49 = l_IO_println___rarg___closed__1; +x_49 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_50 = lean_string_append(x_48, x_49); x_51 = lean_box(0); x_52 = lean_alloc_ctor(0, 2, 0); @@ -5078,7 +5078,7 @@ x_9 = lean_string_append(x_5, x_8); lean_dec(x_8); x_10 = l_Lean_IR_EmitC_emitInc___closed__1; x_11 = lean_string_append(x_9, x_10); -x_12 = l_IO_println___rarg___closed__1; +x_12 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_13 = lean_string_append(x_11, x_12); x_14 = lean_box(0); x_15 = lean_alloc_ctor(0, 2, 0); @@ -5123,7 +5123,7 @@ x_14 = lean_string_append(x_12, x_13); lean_dec(x_13); x_15 = l_Lean_IR_EmitC_emitInc___closed__1; x_16 = lean_string_append(x_14, x_15); -x_17 = l_IO_println___rarg___closed__1; +x_17 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_18 = lean_string_append(x_16, x_17); x_19 = lean_box(0); x_20 = lean_alloc_ctor(0, 2, 0); @@ -5177,7 +5177,7 @@ x_20 = lean_ctor_get(x_17, 0); lean_dec(x_20); x_21 = l_Lean_IR_EmitC_emitInc___closed__1; x_22 = lean_string_append(x_19, x_21); -x_23 = l_IO_println___rarg___closed__1; +x_23 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_24 = lean_string_append(x_22, x_23); x_25 = lean_box(0); lean_ctor_set(x_17, 1, x_24); @@ -5192,7 +5192,7 @@ lean_inc(x_26); lean_dec(x_17); x_27 = l_Lean_IR_EmitC_emitInc___closed__1; x_28 = lean_string_append(x_26, x_27); -x_29 = l_IO_println___rarg___closed__1; +x_29 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_30 = lean_string_append(x_28, x_29); x_31 = lean_box(0); x_32 = lean_alloc_ctor(0, 2, 0); @@ -5324,7 +5324,7 @@ x_19 = lean_string_append(x_16, x_18); lean_dec(x_18); x_20 = l_Lean_IR_EmitC_emitInc___closed__1; x_21 = lean_string_append(x_19, x_20); -x_22 = l_IO_println___rarg___closed__1; +x_22 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_23 = lean_string_append(x_21, x_22); x_24 = lean_box(0); x_25 = lean_alloc_ctor(0, 2, 0); @@ -5478,7 +5478,7 @@ x_24 = lean_string_append(x_21, x_23); lean_dec(x_23); x_25 = l_Lean_IR_EmitC_emitInc___closed__1; x_26 = lean_string_append(x_24, x_25); -x_27 = l_IO_println___rarg___closed__1; +x_27 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_28 = lean_string_append(x_26, x_27); x_29 = lean_box(0); lean_ctor_set(x_17, 1, x_28); @@ -5499,7 +5499,7 @@ x_34 = lean_string_append(x_31, x_33); lean_dec(x_33); x_35 = l_Lean_IR_EmitC_emitInc___closed__1; x_36 = lean_string_append(x_34, x_35); -x_37 = l_IO_println___rarg___closed__1; +x_37 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_38 = lean_string_append(x_36, x_37); x_39 = lean_box(0); x_40 = lean_alloc_ctor(0, 2, 0); @@ -5565,7 +5565,7 @@ lean_inc(x_25); lean_dec(x_24); x_26 = l_Lean_IR_formatFnBody___main___closed__1; x_27 = lean_string_append(x_25, x_26); -x_28 = l_IO_println___rarg___closed__1; +x_28 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_29 = lean_string_append(x_27, x_28); x_4 = x_10; x_6 = x_29; @@ -5653,7 +5653,7 @@ x_22 = lean_string_append(x_18, x_21); lean_dec(x_21); x_23 = l_Lean_IR_formatFnBody___main___closed__1; x_24 = lean_string_append(x_22, x_23); -x_25 = l_IO_println___rarg___closed__1; +x_25 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_26 = lean_string_append(x_24, x_25); x_27 = lean_box(0); lean_ctor_set(x_13, 1, x_26); @@ -5676,7 +5676,7 @@ x_34 = lean_string_append(x_30, x_33); lean_dec(x_33); x_35 = l_Lean_IR_formatFnBody___main___closed__1; x_36 = lean_string_append(x_34, x_35); -x_37 = l_IO_println___rarg___closed__1; +x_37 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_38 = lean_string_append(x_36, x_37); x_39 = lean_box(0); x_40 = lean_alloc_ctor(0, 2, 0); @@ -5737,7 +5737,7 @@ x_56 = lean_string_append(x_52, x_55); lean_dec(x_55); x_57 = l_Lean_IR_formatFnBody___main___closed__1; x_58 = lean_string_append(x_56, x_57); -x_59 = l_IO_println___rarg___closed__1; +x_59 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_60 = lean_string_append(x_58, x_59); x_61 = lean_box(0); if (lean_is_scalar(x_50)) { @@ -6033,7 +6033,7 @@ x_20 = lean_ctor_get(x_17, 0); lean_dec(x_20); x_21 = l_Lean_IR_EmitC_emitInc___closed__1; x_22 = lean_string_append(x_19, x_21); -x_23 = l_IO_println___rarg___closed__1; +x_23 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_24 = lean_string_append(x_22, x_23); x_25 = lean_box(0); lean_ctor_set(x_17, 1, x_24); @@ -6048,7 +6048,7 @@ lean_inc(x_26); lean_dec(x_17); x_27 = l_Lean_IR_EmitC_emitInc___closed__1; x_28 = lean_string_append(x_26, x_27); -x_29 = l_IO_println___rarg___closed__1; +x_29 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_30 = lean_string_append(x_28, x_29); x_31 = lean_box(0); x_32 = lean_alloc_ctor(0, 2, 0); @@ -6105,7 +6105,7 @@ lean_inc(x_27); lean_dec(x_26); x_28 = l_Lean_IR_EmitC_emitInc___closed__1; x_29 = lean_string_append(x_27, x_28); -x_30 = l_IO_println___rarg___closed__1; +x_30 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_31 = lean_string_append(x_29, x_30); x_4 = x_10; x_6 = x_31; @@ -6249,7 +6249,7 @@ x_33 = lean_string_append(x_31, x_32); lean_dec(x_32); x_34 = l_Lean_IR_EmitC_emitInc___closed__1; x_35 = lean_string_append(x_33, x_34); -x_36 = l_IO_println___rarg___closed__1; +x_36 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_37 = lean_string_append(x_35, x_36); x_38 = lean_box(0); lean_ctor_set(x_9, 1, x_37); @@ -6272,7 +6272,7 @@ x_44 = lean_string_append(x_42, x_43); lean_dec(x_43); x_45 = l_Lean_IR_EmitC_emitInc___closed__1; x_46 = lean_string_append(x_44, x_45); -x_47 = l_IO_println___rarg___closed__1; +x_47 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_48 = lean_string_append(x_46, x_47); x_49 = lean_box(0); x_50 = lean_alloc_ctor(0, 2, 0); @@ -6334,7 +6334,7 @@ x_21 = lean_string_append(x_19, x_20); lean_dec(x_20); x_22 = l_Lean_IR_EmitC_emitInc___closed__1; x_23 = lean_string_append(x_21, x_22); -x_24 = l_IO_println___rarg___closed__1; +x_24 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_25 = lean_string_append(x_23, x_24); x_3 = x_9; x_5 = x_25; @@ -6399,7 +6399,7 @@ lean_dec(x_8); x_11 = lean_string_append(x_7, x_10); x_12 = l_Lean_IR_EmitC_emitReset___closed__2; x_13 = lean_string_append(x_11, x_12); -x_14 = l_IO_println___rarg___closed__1; +x_14 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_15 = lean_string_append(x_13, x_14); lean_inc(x_2); x_16 = l_Nat_forMAux___main___at_Lean_IR_EmitC_emitReset___spec__1(x_3, x_2, x_2, x_4, x_15); @@ -6518,7 +6518,7 @@ x_54 = lean_string_append(x_50, x_53); lean_dec(x_53); x_55 = l_Lean_IR_EmitC_emitReset___closed__2; x_56 = lean_string_append(x_54, x_55); -x_57 = l_IO_println___rarg___closed__1; +x_57 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_58 = lean_string_append(x_56, x_57); x_59 = l_String_Iterator_HasRepr___closed__2; x_60 = lean_string_append(x_58, x_59); @@ -6556,7 +6556,7 @@ lean_inc(x_11); lean_dec(x_10); x_12 = l_Lean_IR_EmitC_emitMainFn___closed__19; x_13 = lean_string_append(x_11, x_12); -x_14 = l_IO_println___rarg___closed__1; +x_14 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_15 = lean_string_append(x_13, x_14); x_16 = l_String_Iterator_HasRepr___closed__2; x_17 = lean_string_append(x_15, x_16); @@ -6662,7 +6662,7 @@ x_19 = lean_string_append(x_17, x_18); lean_dec(x_18); x_20 = l_Lean_IR_EmitC_emitInc___closed__1; x_21 = lean_string_append(x_19, x_20); -x_22 = l_IO_println___rarg___closed__1; +x_22 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_23 = lean_string_append(x_21, x_22); x_24 = lean_box(0); lean_ctor_set(x_6, 1, x_23); @@ -6690,7 +6690,7 @@ x_35 = lean_string_append(x_33, x_34); lean_dec(x_34); x_36 = l_Lean_IR_EmitC_emitInc___closed__1; x_37 = lean_string_append(x_35, x_36); -x_38 = l_IO_println___rarg___closed__1; +x_38 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_39 = lean_string_append(x_37, x_38); x_40 = lean_box(0); x_41 = lean_alloc_ctor(0, 2, 0); @@ -6744,7 +6744,7 @@ x_19 = lean_string_append(x_17, x_18); lean_dec(x_18); x_20 = l_Lean_IR_EmitC_emitInc___closed__1; x_21 = lean_string_append(x_19, x_20); -x_22 = l_IO_println___rarg___closed__1; +x_22 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_23 = lean_string_append(x_21, x_22); x_24 = lean_box(0); lean_ctor_set(x_6, 1, x_23); @@ -6772,7 +6772,7 @@ x_35 = lean_string_append(x_33, x_34); lean_dec(x_34); x_36 = l_Lean_IR_EmitC_emitInc___closed__1; x_37 = lean_string_append(x_35, x_36); -x_38 = l_IO_println___rarg___closed__1; +x_38 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_39 = lean_string_append(x_37, x_38); x_40 = lean_box(0); x_41 = lean_alloc_ctor(0, 2, 0); @@ -6946,7 +6946,7 @@ x_20 = lean_ctor_get(x_17, 0); lean_dec(x_20); x_21 = l_Lean_IR_EmitC_emitInc___closed__1; x_22 = lean_string_append(x_19, x_21); -x_23 = l_IO_println___rarg___closed__1; +x_23 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_24 = lean_string_append(x_22, x_23); x_25 = lean_box(0); lean_ctor_set(x_17, 1, x_24); @@ -6961,7 +6961,7 @@ lean_inc(x_26); lean_dec(x_17); x_27 = l_Lean_IR_EmitC_emitInc___closed__1; x_28 = lean_string_append(x_26, x_27); -x_29 = l_IO_println___rarg___closed__1; +x_29 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_30 = lean_string_append(x_28, x_29); x_31 = lean_box(0); x_32 = lean_alloc_ctor(0, 2, 0); @@ -7139,7 +7139,7 @@ x_14 = lean_ctor_get(x_11, 0); lean_dec(x_14); x_15 = l_Lean_IR_EmitC_emitInc___closed__1; x_16 = lean_string_append(x_13, x_15); -x_17 = l_IO_println___rarg___closed__1; +x_17 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_18 = lean_string_append(x_16, x_17); x_19 = lean_box(0); lean_ctor_set(x_11, 1, x_18); @@ -7154,7 +7154,7 @@ lean_inc(x_20); lean_dec(x_11); x_21 = l_Lean_IR_EmitC_emitInc___closed__1; x_22 = lean_string_append(x_20, x_21); -x_23 = l_IO_println___rarg___closed__1; +x_23 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_24 = lean_string_append(x_22, x_23); x_25 = lean_box(0); x_26 = lean_alloc_ctor(0, 2, 0); @@ -7240,7 +7240,7 @@ x_24 = lean_string_append(x_6, x_23); lean_dec(x_23); x_25 = l_Lean_IR_formatFnBody___main___closed__1; x_26 = lean_string_append(x_24, x_25); -x_27 = l_IO_println___rarg___closed__1; +x_27 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_28 = lean_string_append(x_26, x_27); x_29 = lean_box(0); x_30 = lean_alloc_ctor(0, 2, 0); @@ -7332,7 +7332,7 @@ x_17 = lean_ctor_get(x_14, 0); lean_dec(x_17); x_18 = l_Lean_IR_formatFnBody___main___closed__1; x_19 = lean_string_append(x_16, x_18); -x_20 = l_IO_println___rarg___closed__1; +x_20 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_21 = lean_string_append(x_19, x_20); x_22 = lean_box(0); lean_ctor_set(x_14, 1, x_21); @@ -7347,7 +7347,7 @@ lean_inc(x_23); lean_dec(x_14); x_24 = l_Lean_IR_formatFnBody___main___closed__1; x_25 = lean_string_append(x_23, x_24); -x_26 = l_IO_println___rarg___closed__1; +x_26 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_27 = lean_string_append(x_25, x_26); x_28 = lean_box(0); x_29 = lean_alloc_ctor(0, 2, 0); @@ -7376,7 +7376,7 @@ x_37 = l_Option_HasRepr___rarg___closed__3; x_38 = lean_string_append(x_35, x_37); x_39 = l_Lean_IR_formatFnBody___main___closed__1; x_40 = lean_string_append(x_38, x_39); -x_41 = l_IO_println___rarg___closed__1; +x_41 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_42 = lean_string_append(x_40, x_41); x_43 = lean_box(0); lean_ctor_set(x_33, 1, x_42); @@ -7393,7 +7393,7 @@ x_45 = l_Option_HasRepr___rarg___closed__3; x_46 = lean_string_append(x_44, x_45); x_47 = l_Lean_IR_formatFnBody___main___closed__1; x_48 = lean_string_append(x_46, x_47); -x_49 = l_IO_println___rarg___closed__1; +x_49 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_50 = lean_string_append(x_48, x_49); x_51 = lean_box(0); x_52 = lean_alloc_ctor(0, 2, 0); @@ -7524,7 +7524,7 @@ lean_inc(x_27); lean_dec(x_26); x_28 = l_Lean_IR_EmitC_emitInc___closed__1; x_29 = lean_string_append(x_27, x_28); -x_30 = l_IO_println___rarg___closed__1; +x_30 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_31 = lean_string_append(x_29, x_30); x_4 = x_10; x_6 = x_31; @@ -7605,7 +7605,7 @@ x_25 = lean_string_append(x_23, x_24); lean_dec(x_24); x_26 = l_Lean_IR_EmitC_emitInc___closed__1; x_27 = lean_string_append(x_25, x_26); -x_28 = l_IO_println___rarg___closed__1; +x_28 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_29 = lean_string_append(x_27, x_28); lean_inc(x_11); x_30 = l_Nat_forMAux___main___at_Lean_IR_EmitC_emitPartialApp___spec__1(x_1, x_3, x_11, x_11, x_4, x_29); @@ -7764,7 +7764,7 @@ x_26 = lean_ctor_get(x_23, 0); lean_dec(x_26); x_27 = l_Lean_IR_EmitC_emitInc___closed__1; x_28 = lean_string_append(x_25, x_27); -x_29 = l_IO_println___rarg___closed__1; +x_29 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_30 = lean_string_append(x_28, x_29); x_31 = lean_box(0); lean_ctor_set(x_23, 1, x_30); @@ -7779,7 +7779,7 @@ lean_inc(x_32); lean_dec(x_23); x_33 = l_Lean_IR_EmitC_emitInc___closed__1; x_34 = lean_string_append(x_32, x_33); -x_35 = l_IO_println___rarg___closed__1; +x_35 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_36 = lean_string_append(x_34, x_35); x_37 = lean_box(0); x_38 = lean_alloc_ctor(0, 2, 0); @@ -7799,7 +7799,7 @@ lean_inc(x_42); lean_dec(x_41); x_43 = l_Lean_IR_EmitC_emitApp___closed__3; x_44 = lean_string_append(x_42, x_43); -x_45 = l_IO_println___rarg___closed__1; +x_45 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_46 = lean_string_append(x_44, x_45); x_47 = l_Lean_IR_EmitC_emitLhs(x_1, x_4, x_46); x_48 = !lean_is_exclusive(x_47); @@ -8009,7 +8009,7 @@ x_17 = lean_string_append(x_13, x_16); lean_dec(x_16); x_18 = l_Lean_IR_EmitC_emitInc___closed__1; x_19 = lean_string_append(x_17, x_18); -x_20 = l_IO_println___rarg___closed__1; +x_20 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_21 = lean_string_append(x_19, x_20); x_22 = lean_box(0); lean_ctor_set(x_8, 1, x_21); @@ -8032,7 +8032,7 @@ x_29 = lean_string_append(x_25, x_28); lean_dec(x_28); x_30 = l_Lean_IR_EmitC_emitInc___closed__1; x_31 = lean_string_append(x_29, x_30); -x_32 = l_IO_println___rarg___closed__1; +x_32 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_33 = lean_string_append(x_31, x_32); x_34 = lean_box(0); x_35 = lean_alloc_ctor(0, 2, 0); @@ -8167,7 +8167,7 @@ x_12 = lean_string_append(x_8, x_11); lean_dec(x_11); x_13 = l_Lean_IR_EmitC_emitInc___closed__1; x_14 = lean_string_append(x_12, x_13); -x_15 = l_IO_println___rarg___closed__1; +x_15 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_16 = lean_string_append(x_14, x_15); x_17 = lean_box(0); x_18 = lean_alloc_ctor(0, 2, 0); @@ -8217,7 +8217,7 @@ x_14 = lean_string_append(x_10, x_13); lean_dec(x_13); x_15 = l_Lean_IR_EmitC_emitInc___closed__1; x_16 = lean_string_append(x_14, x_15); -x_17 = l_IO_println___rarg___closed__1; +x_17 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_18 = lean_string_append(x_16, x_17); x_19 = lean_box(0); lean_ctor_set(x_5, 1, x_18); @@ -8240,7 +8240,7 @@ x_26 = lean_string_append(x_22, x_25); lean_dec(x_25); x_27 = l_Lean_IR_EmitC_emitInc___closed__1; x_28 = lean_string_append(x_26, x_27); -x_29 = l_IO_println___rarg___closed__1; +x_29 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_30 = lean_string_append(x_28, x_29); x_31 = lean_box(0); x_32 = lean_alloc_ctor(0, 2, 0); @@ -8289,7 +8289,7 @@ x_14 = lean_string_append(x_10, x_13); lean_dec(x_13); x_15 = l_Lean_IR_EmitC_emitInc___closed__1; x_16 = lean_string_append(x_14, x_15); -x_17 = l_IO_println___rarg___closed__1; +x_17 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_18 = lean_string_append(x_16, x_17); x_19 = lean_box(0); lean_ctor_set(x_5, 1, x_18); @@ -8312,7 +8312,7 @@ x_26 = lean_string_append(x_22, x_25); lean_dec(x_25); x_27 = l_Lean_IR_EmitC_emitInc___closed__1; x_28 = lean_string_append(x_26, x_27); -x_29 = l_IO_println___rarg___closed__1; +x_29 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_30 = lean_string_append(x_28, x_29); x_31 = lean_box(0); x_32 = lean_alloc_ctor(0, 2, 0); @@ -8631,7 +8631,7 @@ x_12 = lean_ctor_get(x_9, 0); lean_dec(x_12); x_13 = l_Lean_IR_formatFnBody___main___closed__1; x_14 = lean_string_append(x_11, x_13); -x_15 = l_IO_println___rarg___closed__1; +x_15 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_16 = lean_string_append(x_14, x_15); x_17 = lean_box(0); lean_ctor_set(x_9, 1, x_16); @@ -8646,7 +8646,7 @@ lean_inc(x_18); lean_dec(x_9); x_19 = l_Lean_IR_formatFnBody___main___closed__1; x_20 = lean_string_append(x_18, x_19); -x_21 = l_IO_println___rarg___closed__1; +x_21 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_22 = lean_string_append(x_20, x_21); x_23 = lean_box(0); x_24 = lean_alloc_ctor(0, 2, 0); @@ -8676,7 +8676,7 @@ x_32 = lean_string_append(x_31, x_29); lean_dec(x_29); x_33 = l_Lean_IR_EmitC_emitInc___closed__1; x_34 = lean_string_append(x_32, x_33); -x_35 = l_IO_println___rarg___closed__1; +x_35 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_36 = lean_string_append(x_34, x_35); x_37 = lean_box(0); lean_ctor_set(x_6, 1, x_36); @@ -8700,7 +8700,7 @@ x_43 = lean_string_append(x_42, x_40); lean_dec(x_40); x_44 = l_Lean_IR_EmitC_emitInc___closed__1; x_45 = lean_string_append(x_43, x_44); -x_46 = l_IO_println___rarg___closed__1; +x_46 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_47 = lean_string_append(x_45, x_46); x_48 = lean_box(0); x_49 = lean_alloc_ctor(0, 2, 0); @@ -9179,7 +9179,7 @@ lean_inc(x_26); lean_dec(x_25); x_27 = l_Lean_IR_formatFnBody___main___closed__1; x_28 = lean_string_append(x_26, x_27); -x_29 = l_IO_println___rarg___closed__1; +x_29 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_30 = lean_string_append(x_28, x_29); x_4 = x_10; x_6 = x_30; @@ -9256,7 +9256,7 @@ lean_inc(x_28); lean_dec(x_27); x_29 = l_Lean_IR_formatFnBody___main___closed__1; x_30 = lean_string_append(x_28, x_29); -x_31 = l_IO_println___rarg___closed__1; +x_31 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_32 = lean_string_append(x_30, x_31); x_4 = x_10; x_6 = x_32; @@ -9331,7 +9331,7 @@ x_26 = lean_string_append(x_24, x_25); lean_dec(x_25); x_27 = l_Lean_IR_formatFnBody___main___closed__1; x_28 = lean_string_append(x_26, x_27); -x_29 = l_IO_println___rarg___closed__1; +x_29 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_30 = lean_string_append(x_28, x_29); x_4 = x_10; x_6 = x_30; @@ -9455,7 +9455,7 @@ x_17 = lean_ctor_get(x_14, 0); lean_dec(x_17); x_18 = l_Lean_IR_EmitC_emitTailCall___closed__3; x_19 = lean_string_append(x_16, x_18); -x_20 = l_IO_println___rarg___closed__1; +x_20 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_21 = lean_string_append(x_19, x_20); x_22 = lean_box(0); lean_ctor_set(x_14, 1, x_21); @@ -9470,7 +9470,7 @@ lean_inc(x_23); lean_dec(x_14); x_24 = l_Lean_IR_EmitC_emitTailCall___closed__3; x_25 = lean_string_append(x_23, x_24); -x_26 = l_IO_println___rarg___closed__1; +x_26 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_27 = lean_string_append(x_25, x_26); x_28 = lean_box(0); x_29 = lean_alloc_ctor(0, 2, 0); @@ -9485,7 +9485,7 @@ lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean lean_dec(x_7); x_30 = l_addParenHeuristic___closed__1; x_31 = lean_string_append(x_3, x_30); -x_32 = l_IO_println___rarg___closed__1; +x_32 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_33 = lean_string_append(x_31, x_32); lean_inc(x_6); x_34 = l_Nat_forMAux___main___at_Lean_IR_EmitC_emitTailCall___spec__2(x_4, x_5, x_6, x_6, x_2, x_33); @@ -9929,7 +9929,7 @@ x_91 = lean_ctor_get(x_88, 0); lean_dec(x_91); x_92 = l_Lean_IR_formatFnBody___main___closed__1; x_93 = lean_string_append(x_90, x_92); -x_94 = l_IO_println___rarg___closed__1; +x_94 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_95 = lean_string_append(x_93, x_94); x_96 = lean_box(0); lean_ctor_set(x_88, 1, x_95); @@ -9944,7 +9944,7 @@ lean_inc(x_97); lean_dec(x_88); x_98 = l_Lean_IR_formatFnBody___main___closed__1; x_99 = lean_string_append(x_97, x_98); -x_100 = l_IO_println___rarg___closed__1; +x_100 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_101 = lean_string_append(x_99, x_100); x_102 = lean_box(0); x_103 = lean_alloc_ctor(0, 2, 0); @@ -9974,7 +9974,7 @@ lean_dec(x_3); lean_dec(x_1); x_107 = l_Lean_IR_EmitC_emitBlock___main___closed__2; x_108 = lean_string_append(x_4, x_107); -x_109 = l_IO_println___rarg___closed__1; +x_109 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_110 = lean_string_append(x_108, x_109); x_111 = lean_box(0); x_112 = lean_alloc_ctor(0, 2, 0); @@ -10015,7 +10015,7 @@ x_18 = lean_string_append(x_4, x_17); lean_dec(x_17); x_19 = l___private_Init_Util_1__mkPanicMessage___closed__2; x_20 = lean_string_append(x_18, x_19); -x_21 = l_IO_println___rarg___closed__1; +x_21 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_22 = lean_string_append(x_20, x_21); lean_inc(x_1); lean_inc(x_3); @@ -10113,7 +10113,7 @@ _start: lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; uint8_t x_8; lean_object* x_9; lean_object* x_10; uint8_t x_11; x_4 = l_addParenHeuristic___closed__1; x_5 = lean_string_append(x_3, x_4); -x_6 = l_IO_println___rarg___closed__1; +x_6 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_7 = lean_string_append(x_5, x_6); x_8 = 0; lean_inc(x_1); @@ -10392,7 +10392,7 @@ x_24 = lean_string_append(x_22, x_23); lean_dec(x_23); x_25 = l_Nat_forMAux___main___at_Lean_IR_EmitC_emitDeclAux___spec__1___closed__3; x_26 = lean_string_append(x_24, x_25); -x_27 = l_IO_println___rarg___closed__1; +x_27 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_28 = lean_string_append(x_26, x_27); x_3 = x_9; x_5 = x_28; @@ -10673,7 +10673,7 @@ block_86: lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; x_36 = l_Lean_IR_EmitC_emitDeclAux___closed__1; x_37 = lean_string_append(x_35, x_36); -x_38 = l_IO_println___rarg___closed__1; +x_38 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_39 = lean_string_append(x_37, x_38); if (x_34 == 0) { @@ -11023,7 +11023,7 @@ block_179: lean_object* x_141; lean_object* x_142; lean_object* x_143; lean_object* x_144; x_141 = l_Lean_IR_EmitC_emitDeclAux___closed__1; x_142 = lean_string_append(x_140, x_141); -x_143 = l_IO_println___rarg___closed__1; +x_143 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_144 = lean_string_append(x_142, x_143); if (x_139 == 0) { @@ -11488,7 +11488,7 @@ x_14 = lean_ctor_get(x_11, 0); lean_dec(x_14); x_15 = l_Lean_IR_EmitC_emitInc___closed__1; x_16 = lean_string_append(x_13, x_15); -x_17 = l_IO_println___rarg___closed__1; +x_17 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_18 = lean_string_append(x_16, x_17); x_19 = lean_box(0); lean_ctor_set(x_11, 1, x_18); @@ -11503,7 +11503,7 @@ lean_inc(x_20); lean_dec(x_11); x_21 = l_Lean_IR_EmitC_emitInc___closed__1; x_22 = lean_string_append(x_20, x_21); -x_23 = l_IO_println___rarg___closed__1; +x_23 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_24 = lean_string_append(x_22, x_23); x_25 = lean_box(0); x_26 = lean_alloc_ctor(0, 2, 0); @@ -11632,7 +11632,7 @@ lean_inc(x_21); lean_dec(x_20); x_22 = l_Lean_IR_EmitC_emitDeclInit___closed__1; x_23 = lean_string_append(x_21, x_22); -x_24 = l_IO_println___rarg___closed__1; +x_24 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_25 = lean_string_append(x_23, x_24); x_26 = l_Lean_IR_EmitC_emitMarkPersistent(x_1, x_8, x_2, x_25); return x_26; @@ -11702,7 +11702,7 @@ lean_inc(x_39); lean_dec(x_38); x_40 = l_Lean_IR_EmitC_emitMainFn___closed__3; x_41 = lean_string_append(x_39, x_40); -x_42 = l_IO_println___rarg___closed__1; +x_42 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_43 = lean_string_append(x_41, x_42); x_44 = l_Lean_IR_EmitC_emitDeclInit___closed__2; x_45 = lean_string_append(x_43, x_44); @@ -11846,7 +11846,7 @@ x_83 = lean_ctor_get(x_80, 0); lean_dec(x_83); x_84 = l_Lean_IR_EmitC_emitMainFn___closed__3; x_85 = lean_string_append(x_82, x_84); -x_86 = l_IO_println___rarg___closed__1; +x_86 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_87 = lean_string_append(x_85, x_86); x_88 = l_Lean_IR_EmitC_emitDeclInit___closed__2; x_89 = lean_string_append(x_87, x_88); @@ -11867,7 +11867,7 @@ lean_inc(x_95); lean_dec(x_80); x_96 = l_Lean_IR_EmitC_emitMainFn___closed__3; x_97 = lean_string_append(x_95, x_96); -x_98 = l_IO_println___rarg___closed__1; +x_98 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_99 = lean_string_append(x_97, x_98); x_100 = l_Lean_IR_EmitC_emitDeclInit___closed__2; x_101 = lean_string_append(x_99, x_100); @@ -11965,7 +11965,7 @@ lean_inc(x_128); lean_dec(x_127); x_129 = l_Lean_IR_EmitC_emitDeclInit___closed__1; x_130 = lean_string_append(x_128, x_129); -x_131 = l_IO_println___rarg___closed__1; +x_131 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_132 = lean_string_append(x_130, x_131); x_133 = l_Lean_IR_EmitC_emitMarkPersistent(x_1, x_114, x_2, x_132); return x_133; @@ -12039,7 +12039,7 @@ lean_inc(x_146); lean_dec(x_145); x_147 = l_Lean_IR_EmitC_emitMainFn___closed__3; x_148 = lean_string_append(x_146, x_147); -x_149 = l_IO_println___rarg___closed__1; +x_149 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_150 = lean_string_append(x_148, x_149); x_151 = l_Lean_IR_EmitC_emitDeclInit___closed__2; x_152 = lean_string_append(x_150, x_151); @@ -12183,7 +12183,7 @@ if (lean_is_exclusive(x_181)) { } x_184 = l_Lean_IR_EmitC_emitMainFn___closed__3; x_185 = lean_string_append(x_182, x_184); -x_186 = l_IO_println___rarg___closed__1; +x_186 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_187 = lean_string_append(x_185, x_186); x_188 = l_Lean_IR_EmitC_emitDeclInit___closed__2; x_189 = lean_string_append(x_187, x_188); @@ -12291,7 +12291,7 @@ x_17 = l_Array_forMAux___main___at_Lean_IR_EmitC_emitInitFn___spec__1___closed__ x_18 = lean_string_append(x_16, x_17); x_19 = lean_string_append(x_4, x_18); lean_dec(x_18); -x_20 = l_IO_println___rarg___closed__1; +x_20 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_21 = lean_string_append(x_19, x_20); x_2 = x_11; x_4 = x_21; diff --git a/stage0/stdlib/Lean/Data/Format.c b/stage0/stdlib/Lean/Data/Format.c index dd0dec8347..924d01e5f1 100644 --- a/stage0/stdlib/Lean/Data/Format.c +++ b/stage0/stdlib/Lean/Data/Format.c @@ -83,6 +83,7 @@ lean_object* l_Lean_Format_defWidth; lean_object* l_Lean_Format_joinSuffix(lean_object*); lean_object* l_Int_repr(lean_object*); lean_object* l_Lean_Format_repr___main___closed__13; +extern lean_object* l_IO_FS_Handle_putStrLn___rarg___closed__1; lean_object* l_Lean_Format_pretty___boxed(lean_object*, lean_object*); lean_object* l_Lean_Option_format(lean_object*); lean_object* l_Lean_Format_repr___main___closed__6; @@ -125,7 +126,6 @@ lean_object* lean_name_mk_string(lean_object*, lean_object*); extern lean_object* l_List_repr___rarg___closed__2; lean_object* l_Lean_kvMapHasFormat___closed__1; extern lean_object* l_List_reprAux___main___rarg___closed__1; -extern lean_object* l_IO_println___rarg___closed__1; lean_object* l_Lean_formatKVMap(lean_object*); lean_object* l_Function_comp___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_prodHasFormat(lean_object*, lean_object*); @@ -868,7 +868,7 @@ lean_dec(x_4); x_10 = lean_ctor_get(x_5, 0); lean_inc(x_10); lean_dec(x_5); -x_11 = l_IO_println___rarg___closed__1; +x_11 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_12 = lean_string_append(x_3, x_11); x_13 = 32; lean_inc(x_10); @@ -3498,7 +3498,7 @@ lean_object* l_String_toFormat(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; -x_2 = l_IO_println___rarg___closed__1; +x_2 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_3 = l_String_splitOn(x_1, x_2); x_4 = lean_box(1); x_5 = l_Lean_Format_joinSep___main___at_String_toFormat___spec__1(x_3, x_4); diff --git a/stage0/stdlib/Lean/Elab/Command.c b/stage0/stdlib/Lean/Elab/Command.c index 69db370e54..819a2e6be8 100644 --- a/stage0/stdlib/Lean/Elab/Command.c +++ b/stage0/stdlib/Lean/Elab/Command.c @@ -14,7 +14,9 @@ extern "C" { #endif lean_object* l_Lean_Elab_Command_CommandElabM_monadLog___lambda__1(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Term_mkAppM(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabVariable(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Term_getEnv___rarg(lean_object*); extern lean_object* l_Lean_Name_toString___closed__1; lean_object* l_Array_forMAux___main___at_Lean_Elab_Command_elabCommand___main___spec__7(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabSection(lean_object*, lean_object*, lean_object*); @@ -38,6 +40,7 @@ lean_object* l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_elabVariable lean_object* l_unreachable_x21___rarg(lean_object*); extern lean_object* l_Lean_nullKind; lean_object* l_Lean_Elab_Command_withNamespace(lean_object*); +lean_object* l_Lean_Elab_Command_elabEvalUnsafe___lambda__2___closed__2; lean_object* l_Lean_Elab_Command_CommandElabCoreM_monadState___closed__1; lean_object* l_Lean_Elab_Command_liftTermElabM___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Command_12__addScopes(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); @@ -57,6 +60,7 @@ uint8_t l_Lean_Name_lt___main(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_liftIOCore(lean_object*); lean_object* l_Lean_Format_pretty(lean_object*, lean_object*); lean_object* l___regBuiltin_Lean_Elab_Command_elabSetOption___closed__1; +lean_object* l_Lean_Elab_Command_elabEval___rarg(lean_object*); lean_object* l_Lean_Elab_Command_elabOpenSimple(lean_object*, lean_object*, lean_object*); uint8_t lean_name_eq(lean_object*, lean_object*); extern lean_object* l_Lean_registerTraceClass___closed__1; @@ -75,6 +79,7 @@ lean_object* l_Lean_Elab_Command_elabCheck___lambda__1___boxed(lean_object*, lea lean_object* l_Lean_Elab_Command_logUnknownDecl(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_withIncRecDepth___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_SynthInstance_SynthM_inhabited___lambda__1___boxed(lean_object*, lean_object*, lean_object*); +extern lean_object* l_PersistentHashMap_mkCollisionNode___rarg___closed__1; lean_object* l_Array_iterateMAux___main___at_Lean_Elab_Command_withDeclId___spec__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_throwUnsupportedSyntax___boxed(lean_object*, lean_object*); extern lean_object* l_Array_empty___closed__1; @@ -89,6 +94,7 @@ lean_object* l_Lean_Elab_Command_runTermElabM(lean_object*); extern lean_object* l_Lean_Parser_Command_section___elambda__1___closed__2; lean_object* lean_dbg_trace(lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Command_6__mkTermContext(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__1; lean_object* l_List_append___rarg(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabSetOption(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_logAt___at_Lean_Elab_Command_logTrace___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -101,7 +107,10 @@ lean_object* l_Lean_Elab_Command_liftTermElabM(lean_object*); lean_object* l___regBuiltin_Lean_Elab_Command_elabSection(lean_object*); lean_object* l_Lean_Elab_Command_getCurrMacroScope___boxed(lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_compileDecl(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Command_3__setState(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__2; +lean_object* l_Lean_Elab_Term_mkLambda(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_State_inhabited___closed__4; lean_object* l___private_Lean_Elab_Command_11__addScope(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_array_push(lean_object*, lean_object*); @@ -110,6 +119,7 @@ lean_object* l___regBuiltin_Lean_Elab_Command_elabExport___closed__1; lean_object* l_Lean_Elab_Command_elabCheck(lean_object*, lean_object*, lean_object*); lean_object* lean_array_get_size(lean_object*); lean_object* l_Lean_SMap_empty___at_Lean_Elab_Command_commandElabAttribute___spec__1___closed__1; +lean_object* l_Lean_Elab_Command_elabEvalUnsafe___lambda__2___closed__1; lean_object* l_Lean_Elab_Command_elabUniverse___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabSynth___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Command_init__quot___elambda__1___closed__2; @@ -170,9 +180,11 @@ lean_object* l_Array_iterateMAux___main___at_Lean_Elab_Command_elabOpenOnly___sp uint8_t l___private_Lean_Elab_Command_15__checkEndHeader(lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Command_12__addScopes___main___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_Lean_Elab_MonadMacroAdapter___closed__1; +lean_object* l_Lean_Elab_Term_getOptions(lean_object*, lean_object*); extern lean_object* l___private_Lean_Elab_Term_11__elabUsingElabFnsAux___main___closed__3; lean_object* l_Lean_Elab_Term_addDecl(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Array_forMAux___main___at_Lean_Meta_clear___spec__5___closed__8; +lean_object* lean_with_isolated_streams(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_State_inhabited___closed__1; lean_object* l_Array_foldlStepMAux___main___at_Lean_Elab_Term_elabParen___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_PersistentEnvExtension_inhabited___rarg___closed__1; @@ -196,6 +208,7 @@ lean_object* l_Lean_Elab_Command_addOpenDecl(lean_object*, lean_object*, lean_ob lean_object* l___private_Lean_Elab_Command_5__elabCommandUsing___main(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Elab_Term_withIncRecDepth___rarg___closed__2; lean_object* l_Lean_Elab_Command_CommandElabM_monadLog___closed__9; +lean_object* l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__10; lean_object* lean_array_fget(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabSynth___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_mkMessage___at_Lean_Elab_Command_throwError___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -211,6 +224,7 @@ extern lean_object* l_List_Monad; lean_object* l_Lean_Elab_Command_CommandElabM_monadLog___closed__1; lean_object* l_Lean_Elab_Command_CommandElabM_monadLog___closed__3; lean_object* l_Lean_Elab_Command_CommandElabM_monadLog___lambda__3___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabEvalUnsafe___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_withDeclId___closed__1; lean_object* l_PersistentHashMap_empty___at_Lean_Elab_Command_commandElabAttribute___spec__3; extern lean_object* l_Lean_EnvExtension_Inhabited___rarg___closed__1; @@ -219,18 +233,24 @@ lean_object* l_Lean_getOptionDecl(lean_object*, lean_object*); lean_object* l_Lean_Elab_mkMessage___at_Lean_Elab_Command_throwError___spec__1(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_CommandElabM_monadLog___closed__2; extern lean_object* l_Lean_numLitKind; +lean_object* l_Lean_Elab_Command_elabEvalUnsafe___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabExport___closed__3; lean_object* l_Lean_Elab_Command_dbgTrace(lean_object*); lean_object* lean_nat_sub(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_Lean_Elab_MonadMacroAdapter___closed__4; lean_object* l_Lean_Elab_Command_elabEnd___closed__8; +lean_object* l_Lean_Elab_Command_elabEvalUnsafe(lean_object*, lean_object*, lean_object*); lean_object* l_Array_iterateMAux___main___at_Lean_Elab_Command_elabUniverses___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_CommandElabM_monadLog___closed__8; extern lean_object* l_Lean_choiceKind___closed__2; +extern lean_object* l_Lean_Expr_isSyntheticSorry___closed__1; lean_object* l_Lean_Elab_Command_elabCheck___closed__2; lean_object* lean_array_swap(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabEvalUnsafe___lambda__1___closed__1; extern lean_object* l_Lean_Parser_Command_set__option___elambda__1___closed__2; lean_object* l_Lean_Syntax_isStrLit_x3f(lean_object*); +lean_object* l_Lean_Elab_Command_elabEvalUnsafe___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__7; lean_object* l_Lean_Name_append___main(lean_object*, lean_object*); extern lean_object* l_Lean_PersistentEnvExtension_inhabited___rarg___closed__2; lean_object* l_Array_shrink___main___rarg(lean_object*, lean_object*); @@ -238,6 +258,7 @@ lean_object* l_Lean_Elab_Command_withFreshMacroScope(lean_object*); lean_object* l_Lean_Elab_mkMessageCore(lean_object*, lean_object*, lean_object*, uint8_t, lean_object*); lean_object* l_Lean_Elab_Command_withoutModifyingEnv(lean_object*); lean_object* l_Lean_Elab_Command_elabVariables___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__3; lean_object* l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg___closed__5; lean_object* l_Lean_Elab_Command_expandDeclId(lean_object*); extern lean_object* l_Lean_Parser_Command_docComment___elambda__1___closed__1; @@ -248,14 +269,17 @@ lean_object* l_Lean_Elab_getPos___at_Lean_Elab_Command_throwError___spec__2(lean lean_object* l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel(lean_object*); lean_object* l_Lean_Elab_Command_CommandElabM_monadLog___closed__4; lean_object* l___private_Lean_Elab_Command_10__toCommandResult___rarg___closed__1; +extern lean_object* l_Lean_Parser_Command_eval___elambda__1___closed__2; lean_object* l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg___closed__3; lean_object* lean_array_get(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Command_10__toCommandResult___boxed(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabEval___boxed(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_expandDeclId___boxed(lean_object*); lean_object* l_Lean_Elab_Command_elabOpenRenaming(lean_object*, lean_object*, lean_object*); lean_object* l_List_lengthAux___main___rarg(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_resolveNamespace(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_mkState(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__6; lean_object* l_Lean_Elab_Command_dbgTrace___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_qsortAux___main___at_Lean_Elab_Command_sortDeclLevelParams___spec__3___boxed(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Command_namespace___elambda__1___closed__2; @@ -278,6 +302,7 @@ lean_object* l_Lean_Elab_Command_adaptExpander(lean_object*, lean_object*, lean_ lean_object* l_Lean_Elab_Command_Lean_Elab_MonadMacroAdapter___closed__5; lean_object* lean_name_mk_string(lean_object*, lean_object*); uint8_t l___private_Lean_Elab_Command_15__checkEndHeader___main(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Term_throwError___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_KVMap_insertCore___main(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_Lean_Elab_MonadMacroAdapter___closed__3; lean_object* l_Lean_Elab_Command_runTermElabM___rarg(lean_object*, lean_object*, lean_object*, lean_object*); @@ -286,14 +311,17 @@ lean_object* l___private_Lean_Elab_Command_12__addScopes___main___closed__1; extern lean_object* l_PersistentArray_empty___closed__3; extern lean_object* l_Lean_Parser_Command_namespace___elambda__1___closed__1; lean_object* l_Lean_Elab_Command_elabVariables___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* lean_eval_const(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_throwError___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltin_Lean_Elab_Command_elbChoice(lean_object*); uint8_t l_Lean_Environment_contains(lean_object*, lean_object*); lean_object* l___regBuiltin_Lean_Elab_Command_elabExport(lean_object*); lean_object* l_Lean_Elab_Command_getScopes(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Term_withLocalDecl___rarg(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elbChoice(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Command_docComment___elambda__1___closed__2; lean_object* l_Lean_Elab_Command_elabExport(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__5; lean_object* l_Lean_Elab_Command_elabCheck___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabOpenOnly(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_hasNoErrorMessages(lean_object*, lean_object*); @@ -301,11 +329,13 @@ extern lean_object* l_Lean_Options_empty; lean_object* l___regBuiltin_Lean_Elab_Command_elabEnd___closed__1; extern lean_object* l_Lean_Parser_Command_variable___elambda__1___closed__2; lean_object* l___regBuiltin_Lean_Elab_Command_elabUniverses___closed__1; +lean_object* l_Lean_Elab_Command_elabEvalUnsafe___closed__1; lean_object* l_Array_iterateMAux___main___at_Lean_Elab_Command_elabOpenSimple___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_ReaderT_read___at_Lean_Elab_Command_CommandElabM_monadLog___spec__1(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_addUnivLevel___boxed(lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltin_Lean_Elab_Command_elabInitQuot(lean_object*); size_t lean_usize_modn(size_t, lean_object*); +lean_object* l_Lean_Elab_Command_elabEvalUnsafe___closed__2; lean_object* l_Lean_Elab_Command_elabCommand___main(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_withLogging(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_FileMap_toPosition(lean_object*, lean_object*); @@ -338,7 +368,9 @@ lean_object* l_Array_iterateMAux___main___at_Array_append___spec__1___rarg(lean_ lean_object* l_Lean_Elab_Command_modifyScope___closed__1; lean_object* l_Array_filterAux___main___at_Lean_Elab_Command_sortDeclLevelParams___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_registerAttributeImplBuilder___closed__2; +lean_object* l_Lean_Elab_Command_elabEvalUnsafe___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg___closed__1; +lean_object* l___regBuiltin_Lean_Elab_Command_elabEval___closed__1; extern lean_object* l_Lean_PersistentEnvExtension_inhabited___rarg___closed__3; lean_object* l_Lean_Elab_Command_withMacroExpansion(lean_object*); lean_object* l_Lean_Elab_Command_withDeclId___closed__3; @@ -403,6 +435,7 @@ lean_object* l_Lean_Elab_Command_modifyScope(lean_object*, lean_object*, lean_ob lean_object* l_Lean_Elab_Command_CommandElabM_MonadQuotation___closed__2; lean_object* l___regBuiltin_Lean_Elab_Command_elabCheck(lean_object*); lean_object* l_Lean_Syntax_getArgs(lean_object*); +lean_object* l_Lean_Elab_Command_elabEval(lean_object*, lean_object*); extern lean_object* l_Bool_HasRepr___closed__2; lean_object* l_Lean_Elab_Command_State_inhabited___closed__2; lean_object* l_Lean_Elab_Command_withDeclId___boxed(lean_object*, lean_object*, lean_object*, lean_object*); @@ -432,13 +465,16 @@ lean_object* l_Lean_Elab_Command_compileDecl___boxed(lean_object*, lean_object*, lean_object* l_Lean_Elab_Command_failIfSucceeds___closed__4; lean_object* l___private_Lean_Elab_Command_8__updateState(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_mkCommandElabAttribute___closed__8; +extern lean_object* l_Lean_Parser_Command_eval___elambda__1___closed__1; lean_object* l_Lean_Elab_Command_logUnknownDecl___closed__1; +lean_object* l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__4; lean_object* l_Lean_Syntax_getPos(lean_object*); lean_object* l_Lean_Elab_Command_State_inhabited; uint8_t l___private_Lean_Elab_Command_14__checkAnonymousScope(lean_object*); lean_object* l_Lean_Elab_Command_elabOpenHiding___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_getOpenDecls(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg___closed__4; +extern lean_object* l_Lean_mkAppStx___closed__9; lean_object* l_Lean_Elab_Command_trace(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_PersistentHashMap_findAux___main___at_Lean_Elab_Command_elabCommand___main___spec__3(lean_object*, size_t, lean_object*); extern lean_object* l_Lean_Parser_Command_export___elambda__1___closed__2; @@ -473,6 +509,7 @@ uint8_t l_Lean_DataValue_sameCtor(lean_object*, lean_object*); lean_object* l_HashMapImp_find_x3f___at_Lean_Elab_Command_elabCommand___main___spec__5(lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_elabBinders___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_PersistentHashMap_findAtAux___main___at_Lean_Elab_Command_elabCommand___main___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__9; lean_object* l_Array_qsortAux___main___at_Lean_Elab_Command_sortDeclLevelParams___spec__3(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_setEnv(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Command_openSimple___elambda__1___closed__2; @@ -482,6 +519,7 @@ extern lean_object* l_Lean_Parser_Command_variables___elambda__1___closed__2; lean_object* l_Lean_Elab_Command_failIfSucceeds___closed__3; lean_object* l_Lean_Elab_Command_liftIOCore___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_logUnknownDecl___closed__2; +lean_object* l___regBuiltin_Lean_Elab_Command_elabEval(lean_object*); lean_object* l_Lean_Elab_Command_mkCommandElabAttribute(lean_object*); lean_object* l_Lean_Elab_Command_CommandElabM_monadLog___closed__10; lean_object* l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_withDeclId___spec__3(lean_object*, lean_object*, lean_object*); @@ -492,8 +530,10 @@ lean_object* l_ReaderT_bind___at_Lean_Elab_Command_CommandElabM_monadLog___spec_ extern lean_object* l_Lean_mkOptionalNode___closed__2; lean_object* l_Lean_Elab_Command_elabChoiceAux(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_CommandElabM_monadLog___lambda__4(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__8; lean_object* l_Lean_Elab_Command_elabVariable___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Unhygienic_run___rarg___closed__1; +lean_object* l_Lean_Elab_Command_elabEvalUnsafe___closed__3; lean_object* l___regBuiltin_Lean_Elab_Command_elabVariables(lean_object*); uint8_t l_PersistentArray_anyM___at_Lean_MessageLog_hasErrors___spec__1(lean_object*); lean_object* l_Lean_Syntax_asNode(lean_object*); @@ -515,6 +555,7 @@ extern lean_object* l_Lean_addClass___closed__1; lean_object* l_Lean_Elab_Command_commandElabAttribute___closed__1; lean_object* l___regBuiltin_Lean_Elab_Command_elabUniverse(lean_object*); lean_object* l_Lean_Elab_Command_elabOpenSimple___boxed(lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_mkAppStx___closed__2; lean_object* l_Lean_Elab_Command_CommandElabM_monadLog___closed__7; lean_object* l_Lean_Elab_Command_elabEnd___closed__7; lean_object* l_Lean_Elab_Command_elabOpenRenaming___boxed(lean_object*, lean_object*, lean_object*); @@ -525,9 +566,12 @@ lean_object* l___private_Lean_Elab_Term_2__fromMetaException(lean_object*, lean_ lean_object* l_Lean_Elab_Command_elabSynth___closed__3; lean_object* l_Lean_Elab_Command_elabChoiceAux___main(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_mkMessageAux(lean_object*, lean_object*, lean_object*, uint8_t); +lean_object* l_Lean_mkConst(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabEvalUnsafe___lambda__1___closed__2; lean_object* l___private_Lean_Elab_Command_12__addScopes___main(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_commandElabAttribute___closed__5; lean_object* l_Lean_Elab_Command_CommandElabM_MonadQuotation___closed__3; +lean_object* l_Lean_Elab_Command_elabEvalUnsafe___lambda__2___closed__3; lean_object* l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_elabVariables___spec__2___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_liftTermElabM___rarg___closed__1; extern lean_object* l_Lean_PersistentEnvExtension_inhabited___rarg___closed__4; @@ -536,6 +580,7 @@ extern lean_object* l_Lean_Parser_Command_openHiding___elambda__1___closed__2; extern lean_object* l_Lean_Parser_regBuiltinCommandParserAttr___closed__3; lean_object* l_Lean_Elab_Command_elabInitQuot___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_CommandElabM_MonadQuotation; +lean_object* l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__11; lean_object* l_Lean_Elab_Command_throwError___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_resolveNamespace(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_iterateMAux___main___at_Lean_Elab_Command_elabOpenOnly___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -20136,6 +20181,2441 @@ x_5 = l_Lean_KeyedDeclsAttribute_addBuiltin___rarg(x_2, x_3, x_4, x_1); return x_5; } } +lean_object* l_Lean_Elab_Command_addDecl(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; lean_object* x_6; +x_5 = lean_box(0); +lean_inc(x_3); +x_6 = l___private_Lean_Elab_Command_2__getState(x_3, x_4); +if (lean_obj_tag(x_6) == 0) +{ +lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; +x_7 = lean_ctor_get(x_6, 0); +lean_inc(x_7); +x_8 = lean_ctor_get(x_6, 1); +lean_inc(x_8); +lean_dec(x_6); +x_9 = l___private_Lean_Elab_Command_6__mkTermContext(x_3, x_7, x_5); +x_10 = l___private_Lean_Elab_Command_7__mkTermState(x_7); +lean_dec(x_7); +x_11 = l_Lean_Elab_Term_addDecl(x_1, x_2, x_9, x_10); +if (lean_obj_tag(x_11) == 0) +{ +lean_object* x_12; lean_object* x_13; lean_object* x_14; +x_12 = lean_ctor_get(x_11, 0); +lean_inc(x_12); +x_13 = lean_ctor_get(x_11, 1); +lean_inc(x_13); +lean_dec(x_11); +lean_inc(x_3); +x_14 = l___private_Lean_Elab_Command_2__getState(x_3, x_8); +if (lean_obj_tag(x_14) == 0) +{ +lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; uint8_t x_20; +x_15 = lean_ctor_get(x_13, 0); +lean_inc(x_15); +x_16 = lean_ctor_get(x_14, 0); +lean_inc(x_16); +x_17 = lean_ctor_get(x_14, 1); +lean_inc(x_17); +lean_dec(x_14); +x_18 = lean_ctor_get(x_15, 0); +lean_inc(x_18); +lean_dec(x_15); +x_19 = lean_ctor_get(x_13, 2); +lean_inc(x_19); +lean_dec(x_13); +x_20 = !lean_is_exclusive(x_16); +if (x_20 == 0) +{ +lean_object* x_21; lean_object* x_22; lean_object* x_23; +x_21 = lean_ctor_get(x_16, 1); +lean_dec(x_21); +x_22 = lean_ctor_get(x_16, 0); +lean_dec(x_22); +lean_ctor_set(x_16, 1, x_19); +lean_ctor_set(x_16, 0, x_18); +x_23 = l___private_Lean_Elab_Command_3__setState(x_16, x_3, x_17); +if (lean_obj_tag(x_23) == 0) +{ +uint8_t x_24; +x_24 = !lean_is_exclusive(x_23); +if (x_24 == 0) +{ +lean_object* x_25; +x_25 = lean_ctor_get(x_23, 0); +lean_dec(x_25); +lean_ctor_set(x_23, 0, x_12); +return x_23; +} +else +{ +lean_object* x_26; lean_object* x_27; +x_26 = lean_ctor_get(x_23, 1); +lean_inc(x_26); +lean_dec(x_23); +x_27 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_27, 0, x_12); +lean_ctor_set(x_27, 1, x_26); +return x_27; +} +} +else +{ +uint8_t x_28; +lean_dec(x_12); +x_28 = !lean_is_exclusive(x_23); +if (x_28 == 0) +{ +return x_23; +} +else +{ +lean_object* x_29; lean_object* x_30; lean_object* x_31; +x_29 = lean_ctor_get(x_23, 0); +x_30 = lean_ctor_get(x_23, 1); +lean_inc(x_30); +lean_inc(x_29); +lean_dec(x_23); +x_31 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_31, 0, x_29); +lean_ctor_set(x_31, 1, x_30); +return x_31; +} +} +} +else +{ +lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; +x_32 = lean_ctor_get(x_16, 2); +x_33 = lean_ctor_get(x_16, 3); +x_34 = lean_ctor_get(x_16, 4); +lean_inc(x_34); +lean_inc(x_33); +lean_inc(x_32); +lean_dec(x_16); +x_35 = lean_alloc_ctor(0, 5, 0); +lean_ctor_set(x_35, 0, x_18); +lean_ctor_set(x_35, 1, x_19); +lean_ctor_set(x_35, 2, x_32); +lean_ctor_set(x_35, 3, x_33); +lean_ctor_set(x_35, 4, x_34); +x_36 = l___private_Lean_Elab_Command_3__setState(x_35, x_3, x_17); +if (lean_obj_tag(x_36) == 0) +{ +lean_object* x_37; lean_object* x_38; lean_object* x_39; +x_37 = lean_ctor_get(x_36, 1); +lean_inc(x_37); +if (lean_is_exclusive(x_36)) { + lean_ctor_release(x_36, 0); + lean_ctor_release(x_36, 1); + x_38 = x_36; +} else { + lean_dec_ref(x_36); + x_38 = lean_box(0); +} +if (lean_is_scalar(x_38)) { + x_39 = lean_alloc_ctor(0, 2, 0); +} else { + x_39 = x_38; +} +lean_ctor_set(x_39, 0, x_12); +lean_ctor_set(x_39, 1, x_37); +return x_39; +} +else +{ +lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; +lean_dec(x_12); +x_40 = lean_ctor_get(x_36, 0); +lean_inc(x_40); +x_41 = lean_ctor_get(x_36, 1); +lean_inc(x_41); +if (lean_is_exclusive(x_36)) { + lean_ctor_release(x_36, 0); + lean_ctor_release(x_36, 1); + x_42 = x_36; +} else { + lean_dec_ref(x_36); + x_42 = lean_box(0); +} +if (lean_is_scalar(x_42)) { + x_43 = lean_alloc_ctor(1, 2, 0); +} else { + x_43 = x_42; +} +lean_ctor_set(x_43, 0, x_40); +lean_ctor_set(x_43, 1, x_41); +return x_43; +} +} +} +else +{ +uint8_t x_44; +lean_dec(x_13); +lean_dec(x_12); +lean_dec(x_3); +x_44 = !lean_is_exclusive(x_14); +if (x_44 == 0) +{ +return x_14; +} +else +{ +lean_object* x_45; lean_object* x_46; lean_object* x_47; +x_45 = lean_ctor_get(x_14, 0); +x_46 = lean_ctor_get(x_14, 1); +lean_inc(x_46); +lean_inc(x_45); +lean_dec(x_14); +x_47 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_47, 0, x_45); +lean_ctor_set(x_47, 1, x_46); +return x_47; +} +} +} +else +{ +lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; +x_48 = lean_ctor_get(x_11, 0); +lean_inc(x_48); +x_49 = lean_ctor_get(x_11, 1); +lean_inc(x_49); +lean_dec(x_11); +x_50 = lean_ctor_get(x_48, 0); +lean_inc(x_50); +lean_dec(x_48); +lean_inc(x_3); +x_51 = l___private_Lean_Elab_Command_2__getState(x_3, x_8); +if (lean_obj_tag(x_51) == 0) +{ +lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; uint8_t x_57; +x_52 = lean_ctor_get(x_49, 0); +lean_inc(x_52); +x_53 = lean_ctor_get(x_51, 0); +lean_inc(x_53); +x_54 = lean_ctor_get(x_51, 1); +lean_inc(x_54); +lean_dec(x_51); +x_55 = lean_ctor_get(x_52, 0); +lean_inc(x_55); +lean_dec(x_52); +x_56 = lean_ctor_get(x_49, 2); +lean_inc(x_56); +lean_dec(x_49); +x_57 = !lean_is_exclusive(x_53); +if (x_57 == 0) +{ +lean_object* x_58; lean_object* x_59; lean_object* x_60; +x_58 = lean_ctor_get(x_53, 1); +lean_dec(x_58); +x_59 = lean_ctor_get(x_53, 0); +lean_dec(x_59); +lean_ctor_set(x_53, 1, x_56); +lean_ctor_set(x_53, 0, x_55); +x_60 = l___private_Lean_Elab_Command_3__setState(x_53, x_3, x_54); +if (lean_obj_tag(x_60) == 0) +{ +uint8_t x_61; +x_61 = !lean_is_exclusive(x_60); +if (x_61 == 0) +{ +lean_object* x_62; +x_62 = lean_ctor_get(x_60, 0); +lean_dec(x_62); +lean_ctor_set_tag(x_60, 1); +lean_ctor_set(x_60, 0, x_50); +return x_60; +} +else +{ +lean_object* x_63; lean_object* x_64; +x_63 = lean_ctor_get(x_60, 1); +lean_inc(x_63); +lean_dec(x_60); +x_64 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_64, 0, x_50); +lean_ctor_set(x_64, 1, x_63); +return x_64; +} +} +else +{ +uint8_t x_65; +lean_dec(x_50); +x_65 = !lean_is_exclusive(x_60); +if (x_65 == 0) +{ +return x_60; +} +else +{ +lean_object* x_66; lean_object* x_67; lean_object* x_68; +x_66 = lean_ctor_get(x_60, 0); +x_67 = lean_ctor_get(x_60, 1); +lean_inc(x_67); +lean_inc(x_66); +lean_dec(x_60); +x_68 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_68, 0, x_66); +lean_ctor_set(x_68, 1, x_67); +return x_68; +} +} +} +else +{ +lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; +x_69 = lean_ctor_get(x_53, 2); +x_70 = lean_ctor_get(x_53, 3); +x_71 = lean_ctor_get(x_53, 4); +lean_inc(x_71); +lean_inc(x_70); +lean_inc(x_69); +lean_dec(x_53); +x_72 = lean_alloc_ctor(0, 5, 0); +lean_ctor_set(x_72, 0, x_55); +lean_ctor_set(x_72, 1, x_56); +lean_ctor_set(x_72, 2, x_69); +lean_ctor_set(x_72, 3, x_70); +lean_ctor_set(x_72, 4, x_71); +x_73 = l___private_Lean_Elab_Command_3__setState(x_72, x_3, x_54); +if (lean_obj_tag(x_73) == 0) +{ +lean_object* x_74; lean_object* x_75; lean_object* x_76; +x_74 = lean_ctor_get(x_73, 1); +lean_inc(x_74); +if (lean_is_exclusive(x_73)) { + lean_ctor_release(x_73, 0); + lean_ctor_release(x_73, 1); + x_75 = x_73; +} else { + lean_dec_ref(x_73); + x_75 = lean_box(0); +} +if (lean_is_scalar(x_75)) { + x_76 = lean_alloc_ctor(1, 2, 0); +} else { + x_76 = x_75; + lean_ctor_set_tag(x_76, 1); +} +lean_ctor_set(x_76, 0, x_50); +lean_ctor_set(x_76, 1, x_74); +return x_76; +} +else +{ +lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; +lean_dec(x_50); +x_77 = lean_ctor_get(x_73, 0); +lean_inc(x_77); +x_78 = lean_ctor_get(x_73, 1); +lean_inc(x_78); +if (lean_is_exclusive(x_73)) { + lean_ctor_release(x_73, 0); + lean_ctor_release(x_73, 1); + x_79 = x_73; +} else { + lean_dec_ref(x_73); + x_79 = lean_box(0); +} +if (lean_is_scalar(x_79)) { + x_80 = lean_alloc_ctor(1, 2, 0); +} else { + x_80 = x_79; +} +lean_ctor_set(x_80, 0, x_77); +lean_ctor_set(x_80, 1, x_78); +return x_80; +} +} +} +else +{ +uint8_t x_81; +lean_dec(x_50); +lean_dec(x_49); +lean_dec(x_3); +x_81 = !lean_is_exclusive(x_51); +if (x_81 == 0) +{ +return x_51; +} +else +{ +lean_object* x_82; lean_object* x_83; lean_object* x_84; +x_82 = lean_ctor_get(x_51, 0); +x_83 = lean_ctor_get(x_51, 1); +lean_inc(x_83); +lean_inc(x_82); +lean_dec(x_51); +x_84 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_84, 0, x_82); +lean_ctor_set(x_84, 1, x_83); +return x_84; +} +} +} +} +else +{ +uint8_t x_85; +lean_dec(x_3); +x_85 = !lean_is_exclusive(x_6); +if (x_85 == 0) +{ +return x_6; +} +else +{ +lean_object* x_86; lean_object* x_87; lean_object* x_88; +x_86 = lean_ctor_get(x_6, 0); +x_87 = lean_ctor_get(x_6, 1); +lean_inc(x_87); +lean_inc(x_86); +lean_dec(x_6); +x_88 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_88, 0, x_86); +lean_ctor_set(x_88, 1, x_87); +return x_88; +} +} +} +} +lean_object* l_Lean_Elab_Command_addDecl___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +x_5 = l_Lean_Elab_Command_addDecl(x_1, x_2, x_3, x_4); +lean_dec(x_2); +lean_dec(x_1); +return x_5; +} +} +lean_object* l_Lean_Elab_Command_compileDecl(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; lean_object* x_6; +x_5 = lean_box(0); +lean_inc(x_3); +x_6 = l___private_Lean_Elab_Command_2__getState(x_3, x_4); +if (lean_obj_tag(x_6) == 0) +{ +lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; +x_7 = lean_ctor_get(x_6, 0); +lean_inc(x_7); +x_8 = lean_ctor_get(x_6, 1); +lean_inc(x_8); +lean_dec(x_6); +x_9 = l___private_Lean_Elab_Command_6__mkTermContext(x_3, x_7, x_5); +x_10 = l___private_Lean_Elab_Command_7__mkTermState(x_7); +lean_dec(x_7); +x_11 = l_Lean_Elab_Term_compileDecl(x_1, x_2, x_9, x_10); +if (lean_obj_tag(x_11) == 0) +{ +lean_object* x_12; lean_object* x_13; lean_object* x_14; +x_12 = lean_ctor_get(x_11, 0); +lean_inc(x_12); +x_13 = lean_ctor_get(x_11, 1); +lean_inc(x_13); +lean_dec(x_11); +lean_inc(x_3); +x_14 = l___private_Lean_Elab_Command_2__getState(x_3, x_8); +if (lean_obj_tag(x_14) == 0) +{ +lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; uint8_t x_20; +x_15 = lean_ctor_get(x_13, 0); +lean_inc(x_15); +x_16 = lean_ctor_get(x_14, 0); +lean_inc(x_16); +x_17 = lean_ctor_get(x_14, 1); +lean_inc(x_17); +lean_dec(x_14); +x_18 = lean_ctor_get(x_15, 0); +lean_inc(x_18); +lean_dec(x_15); +x_19 = lean_ctor_get(x_13, 2); +lean_inc(x_19); +lean_dec(x_13); +x_20 = !lean_is_exclusive(x_16); +if (x_20 == 0) +{ +lean_object* x_21; lean_object* x_22; lean_object* x_23; +x_21 = lean_ctor_get(x_16, 1); +lean_dec(x_21); +x_22 = lean_ctor_get(x_16, 0); +lean_dec(x_22); +lean_ctor_set(x_16, 1, x_19); +lean_ctor_set(x_16, 0, x_18); +x_23 = l___private_Lean_Elab_Command_3__setState(x_16, x_3, x_17); +if (lean_obj_tag(x_23) == 0) +{ +uint8_t x_24; +x_24 = !lean_is_exclusive(x_23); +if (x_24 == 0) +{ +lean_object* x_25; +x_25 = lean_ctor_get(x_23, 0); +lean_dec(x_25); +lean_ctor_set(x_23, 0, x_12); +return x_23; +} +else +{ +lean_object* x_26; lean_object* x_27; +x_26 = lean_ctor_get(x_23, 1); +lean_inc(x_26); +lean_dec(x_23); +x_27 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_27, 0, x_12); +lean_ctor_set(x_27, 1, x_26); +return x_27; +} +} +else +{ +uint8_t x_28; +lean_dec(x_12); +x_28 = !lean_is_exclusive(x_23); +if (x_28 == 0) +{ +return x_23; +} +else +{ +lean_object* x_29; lean_object* x_30; lean_object* x_31; +x_29 = lean_ctor_get(x_23, 0); +x_30 = lean_ctor_get(x_23, 1); +lean_inc(x_30); +lean_inc(x_29); +lean_dec(x_23); +x_31 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_31, 0, x_29); +lean_ctor_set(x_31, 1, x_30); +return x_31; +} +} +} +else +{ +lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; +x_32 = lean_ctor_get(x_16, 2); +x_33 = lean_ctor_get(x_16, 3); +x_34 = lean_ctor_get(x_16, 4); +lean_inc(x_34); +lean_inc(x_33); +lean_inc(x_32); +lean_dec(x_16); +x_35 = lean_alloc_ctor(0, 5, 0); +lean_ctor_set(x_35, 0, x_18); +lean_ctor_set(x_35, 1, x_19); +lean_ctor_set(x_35, 2, x_32); +lean_ctor_set(x_35, 3, x_33); +lean_ctor_set(x_35, 4, x_34); +x_36 = l___private_Lean_Elab_Command_3__setState(x_35, x_3, x_17); +if (lean_obj_tag(x_36) == 0) +{ +lean_object* x_37; lean_object* x_38; lean_object* x_39; +x_37 = lean_ctor_get(x_36, 1); +lean_inc(x_37); +if (lean_is_exclusive(x_36)) { + lean_ctor_release(x_36, 0); + lean_ctor_release(x_36, 1); + x_38 = x_36; +} else { + lean_dec_ref(x_36); + x_38 = lean_box(0); +} +if (lean_is_scalar(x_38)) { + x_39 = lean_alloc_ctor(0, 2, 0); +} else { + x_39 = x_38; +} +lean_ctor_set(x_39, 0, x_12); +lean_ctor_set(x_39, 1, x_37); +return x_39; +} +else +{ +lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; +lean_dec(x_12); +x_40 = lean_ctor_get(x_36, 0); +lean_inc(x_40); +x_41 = lean_ctor_get(x_36, 1); +lean_inc(x_41); +if (lean_is_exclusive(x_36)) { + lean_ctor_release(x_36, 0); + lean_ctor_release(x_36, 1); + x_42 = x_36; +} else { + lean_dec_ref(x_36); + x_42 = lean_box(0); +} +if (lean_is_scalar(x_42)) { + x_43 = lean_alloc_ctor(1, 2, 0); +} else { + x_43 = x_42; +} +lean_ctor_set(x_43, 0, x_40); +lean_ctor_set(x_43, 1, x_41); +return x_43; +} +} +} +else +{ +uint8_t x_44; +lean_dec(x_13); +lean_dec(x_12); +lean_dec(x_3); +x_44 = !lean_is_exclusive(x_14); +if (x_44 == 0) +{ +return x_14; +} +else +{ +lean_object* x_45; lean_object* x_46; lean_object* x_47; +x_45 = lean_ctor_get(x_14, 0); +x_46 = lean_ctor_get(x_14, 1); +lean_inc(x_46); +lean_inc(x_45); +lean_dec(x_14); +x_47 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_47, 0, x_45); +lean_ctor_set(x_47, 1, x_46); +return x_47; +} +} +} +else +{ +lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; +x_48 = lean_ctor_get(x_11, 0); +lean_inc(x_48); +x_49 = lean_ctor_get(x_11, 1); +lean_inc(x_49); +lean_dec(x_11); +x_50 = lean_ctor_get(x_48, 0); +lean_inc(x_50); +lean_dec(x_48); +lean_inc(x_3); +x_51 = l___private_Lean_Elab_Command_2__getState(x_3, x_8); +if (lean_obj_tag(x_51) == 0) +{ +lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; uint8_t x_57; +x_52 = lean_ctor_get(x_49, 0); +lean_inc(x_52); +x_53 = lean_ctor_get(x_51, 0); +lean_inc(x_53); +x_54 = lean_ctor_get(x_51, 1); +lean_inc(x_54); +lean_dec(x_51); +x_55 = lean_ctor_get(x_52, 0); +lean_inc(x_55); +lean_dec(x_52); +x_56 = lean_ctor_get(x_49, 2); +lean_inc(x_56); +lean_dec(x_49); +x_57 = !lean_is_exclusive(x_53); +if (x_57 == 0) +{ +lean_object* x_58; lean_object* x_59; lean_object* x_60; +x_58 = lean_ctor_get(x_53, 1); +lean_dec(x_58); +x_59 = lean_ctor_get(x_53, 0); +lean_dec(x_59); +lean_ctor_set(x_53, 1, x_56); +lean_ctor_set(x_53, 0, x_55); +x_60 = l___private_Lean_Elab_Command_3__setState(x_53, x_3, x_54); +if (lean_obj_tag(x_60) == 0) +{ +uint8_t x_61; +x_61 = !lean_is_exclusive(x_60); +if (x_61 == 0) +{ +lean_object* x_62; +x_62 = lean_ctor_get(x_60, 0); +lean_dec(x_62); +lean_ctor_set_tag(x_60, 1); +lean_ctor_set(x_60, 0, x_50); +return x_60; +} +else +{ +lean_object* x_63; lean_object* x_64; +x_63 = lean_ctor_get(x_60, 1); +lean_inc(x_63); +lean_dec(x_60); +x_64 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_64, 0, x_50); +lean_ctor_set(x_64, 1, x_63); +return x_64; +} +} +else +{ +uint8_t x_65; +lean_dec(x_50); +x_65 = !lean_is_exclusive(x_60); +if (x_65 == 0) +{ +return x_60; +} +else +{ +lean_object* x_66; lean_object* x_67; lean_object* x_68; +x_66 = lean_ctor_get(x_60, 0); +x_67 = lean_ctor_get(x_60, 1); +lean_inc(x_67); +lean_inc(x_66); +lean_dec(x_60); +x_68 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_68, 0, x_66); +lean_ctor_set(x_68, 1, x_67); +return x_68; +} +} +} +else +{ +lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; +x_69 = lean_ctor_get(x_53, 2); +x_70 = lean_ctor_get(x_53, 3); +x_71 = lean_ctor_get(x_53, 4); +lean_inc(x_71); +lean_inc(x_70); +lean_inc(x_69); +lean_dec(x_53); +x_72 = lean_alloc_ctor(0, 5, 0); +lean_ctor_set(x_72, 0, x_55); +lean_ctor_set(x_72, 1, x_56); +lean_ctor_set(x_72, 2, x_69); +lean_ctor_set(x_72, 3, x_70); +lean_ctor_set(x_72, 4, x_71); +x_73 = l___private_Lean_Elab_Command_3__setState(x_72, x_3, x_54); +if (lean_obj_tag(x_73) == 0) +{ +lean_object* x_74; lean_object* x_75; lean_object* x_76; +x_74 = lean_ctor_get(x_73, 1); +lean_inc(x_74); +if (lean_is_exclusive(x_73)) { + lean_ctor_release(x_73, 0); + lean_ctor_release(x_73, 1); + x_75 = x_73; +} else { + lean_dec_ref(x_73); + x_75 = lean_box(0); +} +if (lean_is_scalar(x_75)) { + x_76 = lean_alloc_ctor(1, 2, 0); +} else { + x_76 = x_75; + lean_ctor_set_tag(x_76, 1); +} +lean_ctor_set(x_76, 0, x_50); +lean_ctor_set(x_76, 1, x_74); +return x_76; +} +else +{ +lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; +lean_dec(x_50); +x_77 = lean_ctor_get(x_73, 0); +lean_inc(x_77); +x_78 = lean_ctor_get(x_73, 1); +lean_inc(x_78); +if (lean_is_exclusive(x_73)) { + lean_ctor_release(x_73, 0); + lean_ctor_release(x_73, 1); + x_79 = x_73; +} else { + lean_dec_ref(x_73); + x_79 = lean_box(0); +} +if (lean_is_scalar(x_79)) { + x_80 = lean_alloc_ctor(1, 2, 0); +} else { + x_80 = x_79; +} +lean_ctor_set(x_80, 0, x_77); +lean_ctor_set(x_80, 1, x_78); +return x_80; +} +} +} +else +{ +uint8_t x_81; +lean_dec(x_50); +lean_dec(x_49); +lean_dec(x_3); +x_81 = !lean_is_exclusive(x_51); +if (x_81 == 0) +{ +return x_51; +} +else +{ +lean_object* x_82; lean_object* x_83; lean_object* x_84; +x_82 = lean_ctor_get(x_51, 0); +x_83 = lean_ctor_get(x_51, 1); +lean_inc(x_83); +lean_inc(x_82); +lean_dec(x_51); +x_84 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_84, 0, x_82); +lean_ctor_set(x_84, 1, x_83); +return x_84; +} +} +} +} +else +{ +uint8_t x_85; +lean_dec(x_3); +x_85 = !lean_is_exclusive(x_6); +if (x_85 == 0) +{ +return x_6; +} +else +{ +lean_object* x_86; lean_object* x_87; lean_object* x_88; +x_86 = lean_ctor_get(x_6, 0); +x_87 = lean_ctor_get(x_6, 1); +lean_inc(x_87); +lean_inc(x_86); +lean_dec(x_6); +x_88 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_88, 0, x_86); +lean_ctor_set(x_88, 1, x_87); +return x_88; +} +} +} +} +lean_object* l_Lean_Elab_Command_compileDecl___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +x_5 = l_Lean_Elab_Command_compileDecl(x_1, x_2, x_3, x_4); +lean_dec(x_2); +lean_dec(x_1); +return x_5; +} +} +lean_object* _init_l_Lean_Elab_Command_elabEvalUnsafe___lambda__1___closed__1() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_Expr_isSyntheticSorry___closed__1; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_Elab_Command_elabEvalUnsafe___lambda__1___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Elab_Command_elabEvalUnsafe___lambda__1___closed__1; +x_2 = l_Bool_HasRepr___closed__1; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +lean_object* l_Lean_Elab_Command_elabEvalUnsafe___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { +_start: +{ +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_9 = l_Lean_Parser_Command_eval___elambda__1___closed__1; +x_10 = lean_name_mk_string(x_1, x_9); +x_11 = l_Lean_Elab_Command_elabEvalUnsafe___lambda__1___closed__2; +x_12 = l_Lean_mkConst(x_11, x_2); +x_13 = l_PersistentHashMap_mkCollisionNode___rarg___closed__1; +lean_inc(x_3); +x_14 = lean_array_push(x_13, x_3); +lean_inc(x_6); +x_15 = lean_array_push(x_14, x_6); +x_16 = lean_array_push(x_15, x_4); +x_17 = lean_array_push(x_16, x_12); +lean_inc(x_7); +x_18 = l_Lean_Elab_Term_mkAppM(x_5, x_10, x_17, x_7, x_8); +lean_dec(x_17); +if (lean_obj_tag(x_18) == 0) +{ +lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; +x_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 = l_Lean_mkAppStx___closed__9; +x_22 = lean_array_push(x_21, x_3); +x_23 = lean_array_push(x_22, x_6); +x_24 = l_Lean_Elab_Term_mkLambda(x_5, x_23, x_19, x_7, x_20); +return x_24; +} +else +{ +uint8_t x_25; +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_3); +x_25 = !lean_is_exclusive(x_18); +if (x_25 == 0) +{ +return x_18; +} +else +{ +lean_object* x_26; lean_object* x_27; lean_object* x_28; +x_26 = lean_ctor_get(x_18, 0); +x_27 = lean_ctor_get(x_18, 1); +lean_inc(x_27); +lean_inc(x_26); +lean_dec(x_18); +x_28 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_28, 0, x_26); +lean_ctor_set(x_28, 1, x_27); +return x_28; +} +} +} +} +lean_object* _init_l_Lean_Elab_Command_elabEvalUnsafe___lambda__2___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("opts"); +return x_1; +} +} +lean_object* _init_l_Lean_Elab_Command_elabEvalUnsafe___lambda__2___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_Elab_Command_elabEvalUnsafe___lambda__2___closed__1; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_Elab_Command_elabEvalUnsafe___lambda__2___closed__3() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("Options"); +return x_1; +} +} +lean_object* l_Lean_Elab_Command_elabEvalUnsafe___lambda__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { +_start: +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; uint8_t x_14; lean_object* x_15; +x_9 = l_Lean_Elab_Command_elabEvalUnsafe___lambda__2___closed__3; +x_10 = lean_name_mk_string(x_1, x_9); +lean_inc(x_2); +x_11 = l_Lean_mkConst(x_10, x_2); +lean_inc(x_5); +x_12 = lean_alloc_closure((void*)(l_Lean_Elab_Command_elabEvalUnsafe___lambda__1___boxed), 8, 5); +lean_closure_set(x_12, 0, x_3); +lean_closure_set(x_12, 1, x_2); +lean_closure_set(x_12, 2, x_6); +lean_closure_set(x_12, 3, x_4); +lean_closure_set(x_12, 4, x_5); +x_13 = l_Lean_Elab_Command_elabEvalUnsafe___lambda__2___closed__2; +x_14 = 0; +x_15 = l_Lean_Elab_Term_withLocalDecl___rarg(x_5, x_13, x_14, x_11, x_12, x_7, x_8); +lean_dec(x_5); +return x_15; +} +} +lean_object* _init_l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("MetaHasEval"); +return x_1; +} +} +lean_object* _init_l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_mkAppStx___closed__2; +x_2 = l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__1; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__3() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("HasEval"); +return x_1; +} +} +lean_object* _init_l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__4() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_mkAppStx___closed__2; +x_2 = l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__3; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__5() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__4; +x_2 = l_Lean_Parser_Command_eval___elambda__1___closed__1; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__6() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_Elab_Command_elabEvalUnsafe___lambda__1___closed__2; +x_3 = l_Lean_mkConst(x_2, x_1); +return x_3; +} +} +lean_object* _init_l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__7() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("env"); +return x_1; +} +} +lean_object* _init_l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__8() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__7; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__9() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("Environment"); +return x_1; +} +} +lean_object* _init_l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__10() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_mkAppStx___closed__2; +x_2 = l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__9; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__11() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__10; +x_3 = l_Lean_mkConst(x_2, x_1); +return x_3; +} +} +lean_object* l_Lean_Elab_Command_elabEvalUnsafe___lambda__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { +_start: +{ +lean_object* x_8; uint8_t x_9; lean_object* x_10; +x_8 = lean_box(0); +x_9 = 1; +lean_inc(x_6); +x_10 = l_Lean_Elab_Term_elabTermAux___main(x_8, x_9, x_9, x_1, x_6, x_7); +if (lean_obj_tag(x_10) == 0) +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; uint8_t x_14; uint8_t x_15; lean_object* x_16; uint8_t x_133; lean_object* x_134; lean_object* x_135; +x_11 = lean_ctor_get(x_10, 0); +lean_inc(x_11); +x_12 = lean_ctor_get(x_10, 1); +lean_inc(x_12); +lean_dec(x_10); +x_13 = l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__2; +x_14 = l_Lean_Environment_contains(x_2, x_13); +x_133 = 0; +x_134 = lean_box(0); +lean_inc(x_6); +x_135 = l___private_Lean_Elab_SyntheticMVars_11__synthesizeSyntheticMVarsAux___main(x_133, x_134, x_6, x_12); +if (x_14 == 0) +{ +if (lean_obj_tag(x_135) == 0) +{ +lean_object* x_136; +x_136 = lean_ctor_get(x_135, 1); +lean_inc(x_136); +lean_dec(x_135); +x_15 = x_133; +x_16 = x_136; +goto block_132; +} +else +{ +uint8_t x_137; +lean_dec(x_11); +lean_dec(x_6); +lean_dec(x_4); +lean_dec(x_3); +x_137 = !lean_is_exclusive(x_135); +if (x_137 == 0) +{ +return x_135; +} +else +{ +lean_object* x_138; lean_object* x_139; lean_object* x_140; +x_138 = lean_ctor_get(x_135, 0); +x_139 = lean_ctor_get(x_135, 1); +lean_inc(x_139); +lean_inc(x_138); +lean_dec(x_135); +x_140 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_140, 0, x_138); +lean_ctor_set(x_140, 1, x_139); +return x_140; +} +} +} +else +{ +if (lean_obj_tag(x_135) == 0) +{ +lean_object* x_141; +x_141 = lean_ctor_get(x_135, 1); +lean_inc(x_141); +lean_dec(x_135); +x_15 = x_9; +x_16 = x_141; +goto block_132; +} +else +{ +uint8_t x_142; +lean_dec(x_11); +lean_dec(x_6); +lean_dec(x_4); +lean_dec(x_3); +x_142 = !lean_is_exclusive(x_135); +if (x_142 == 0) +{ +return x_135; +} +else +{ +lean_object* x_143; lean_object* x_144; lean_object* x_145; +x_143 = lean_ctor_get(x_135, 0); +x_144 = lean_ctor_get(x_135, 1); +lean_inc(x_144); +lean_inc(x_143); +lean_dec(x_135); +x_145 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_145, 0, x_143); +lean_ctor_set(x_145, 1, x_144); +return x_145; +} +} +} +block_132: +{ +if (x_15 == 0) +{ +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; +x_17 = lean_box(0); +x_18 = l_Lean_mkAppStx___closed__9; +x_19 = lean_array_push(x_18, x_11); +x_20 = l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__6; +x_21 = lean_array_push(x_19, x_20); +x_22 = l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__5; +lean_inc(x_6); +x_23 = l_Lean_Elab_Term_mkAppM(x_3, x_22, x_21, x_6, x_16); +lean_dec(x_21); +if (lean_obj_tag(x_23) == 0) +{ +lean_object* x_24; lean_object* x_25; lean_object* x_26; +x_24 = lean_ctor_get(x_23, 0); +lean_inc(x_24); +x_25 = lean_ctor_get(x_23, 1); +lean_inc(x_25); +lean_dec(x_23); +lean_inc(x_6); +lean_inc(x_24); +x_26 = l_Lean_Elab_Term_inferType(x_3, x_24, x_6, x_25); +if (lean_obj_tag(x_26) == 0) +{ +lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; +x_27 = lean_ctor_get(x_26, 0); +lean_inc(x_27); +x_28 = lean_ctor_get(x_26, 1); +lean_inc(x_28); +lean_dec(x_26); +lean_inc(x_4); +x_29 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_29, 0, x_4); +lean_ctor_set(x_29, 1, x_17); +lean_ctor_set(x_29, 2, x_27); +x_30 = lean_box(0); +x_31 = lean_alloc_ctor(0, 3, 1); +lean_ctor_set(x_31, 0, x_29); +lean_ctor_set(x_31, 1, x_24); +lean_ctor_set(x_31, 2, x_30); +lean_ctor_set_uint8(x_31, sizeof(void*)*3, x_9); +x_32 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_32, 0, x_31); +lean_inc(x_6); +x_33 = l_Lean_Elab_Term_addDecl(x_3, x_32, x_6, x_28); +if (lean_obj_tag(x_33) == 0) +{ +lean_object* x_34; lean_object* x_35; +x_34 = lean_ctor_get(x_33, 1); +lean_inc(x_34); +lean_dec(x_33); +lean_inc(x_6); +x_35 = l_Lean_Elab_Term_compileDecl(x_3, x_32, x_6, x_34); +lean_dec(x_32); +if (lean_obj_tag(x_35) == 0) +{ +lean_object* x_36; lean_object* x_37; uint8_t x_38; +x_36 = lean_ctor_get(x_35, 1); +lean_inc(x_36); +lean_dec(x_35); +x_37 = l_Lean_Elab_Term_getEnv___rarg(x_36); +x_38 = !lean_is_exclusive(x_37); +if (x_38 == 0) +{ +lean_object* x_39; lean_object* x_40; lean_object* x_41; +x_39 = lean_ctor_get(x_37, 0); +x_40 = lean_ctor_get(x_37, 1); +x_41 = lean_eval_const(x_39, x_4); +lean_dec(x_4); +lean_dec(x_39); +if (lean_obj_tag(x_41) == 0) +{ +lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; +lean_free_object(x_37); +x_42 = lean_ctor_get(x_41, 0); +lean_inc(x_42); +lean_dec(x_41); +x_43 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_43, 0, x_42); +x_44 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_44, 0, x_43); +x_45 = l_Lean_Elab_Term_throwError___rarg(x_3, x_44, x_6, x_40); +lean_dec(x_3); +return x_45; +} +else +{ +lean_object* x_46; +lean_dec(x_6); +lean_dec(x_3); +x_46 = lean_ctor_get(x_41, 0); +lean_inc(x_46); +lean_dec(x_41); +lean_ctor_set(x_37, 0, x_46); +return x_37; +} +} +else +{ +lean_object* x_47; lean_object* x_48; lean_object* x_49; +x_47 = lean_ctor_get(x_37, 0); +x_48 = lean_ctor_get(x_37, 1); +lean_inc(x_48); +lean_inc(x_47); +lean_dec(x_37); +x_49 = lean_eval_const(x_47, x_4); +lean_dec(x_4); +lean_dec(x_47); +if (lean_obj_tag(x_49) == 0) +{ +lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; +x_50 = lean_ctor_get(x_49, 0); +lean_inc(x_50); +lean_dec(x_49); +x_51 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_51, 0, x_50); +x_52 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_52, 0, x_51); +x_53 = l_Lean_Elab_Term_throwError___rarg(x_3, x_52, x_6, x_48); +lean_dec(x_3); +return x_53; +} +else +{ +lean_object* x_54; lean_object* x_55; +lean_dec(x_6); +lean_dec(x_3); +x_54 = lean_ctor_get(x_49, 0); +lean_inc(x_54); +lean_dec(x_49); +x_55 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_55, 0, x_54); +lean_ctor_set(x_55, 1, x_48); +return x_55; +} +} +} +else +{ +uint8_t x_56; +lean_dec(x_6); +lean_dec(x_4); +lean_dec(x_3); +x_56 = !lean_is_exclusive(x_35); +if (x_56 == 0) +{ +return x_35; +} +else +{ +lean_object* x_57; lean_object* x_58; lean_object* x_59; +x_57 = lean_ctor_get(x_35, 0); +x_58 = lean_ctor_get(x_35, 1); +lean_inc(x_58); +lean_inc(x_57); +lean_dec(x_35); +x_59 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_59, 0, x_57); +lean_ctor_set(x_59, 1, x_58); +return x_59; +} +} +} +else +{ +uint8_t x_60; +lean_dec(x_32); +lean_dec(x_6); +lean_dec(x_4); +lean_dec(x_3); +x_60 = !lean_is_exclusive(x_33); +if (x_60 == 0) +{ +return x_33; +} +else +{ +lean_object* x_61; lean_object* x_62; lean_object* x_63; +x_61 = lean_ctor_get(x_33, 0); +x_62 = lean_ctor_get(x_33, 1); +lean_inc(x_62); +lean_inc(x_61); +lean_dec(x_33); +x_63 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_63, 0, x_61); +lean_ctor_set(x_63, 1, x_62); +return x_63; +} +} +} +else +{ +uint8_t x_64; +lean_dec(x_24); +lean_dec(x_6); +lean_dec(x_4); +lean_dec(x_3); +x_64 = !lean_is_exclusive(x_26); +if (x_64 == 0) +{ +return x_26; +} +else +{ +lean_object* x_65; lean_object* x_66; lean_object* x_67; +x_65 = lean_ctor_get(x_26, 0); +x_66 = lean_ctor_get(x_26, 1); +lean_inc(x_66); +lean_inc(x_65); +lean_dec(x_26); +x_67 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_67, 0, x_65); +lean_ctor_set(x_67, 1, x_66); +return x_67; +} +} +} +else +{ +uint8_t x_68; +lean_dec(x_6); +lean_dec(x_4); +lean_dec(x_3); +x_68 = !lean_is_exclusive(x_23); +if (x_68 == 0) +{ +return x_23; +} +else +{ +lean_object* x_69; lean_object* x_70; lean_object* x_71; +x_69 = lean_ctor_get(x_23, 0); +x_70 = lean_ctor_get(x_23, 1); +lean_inc(x_70); +lean_inc(x_69); +lean_dec(x_23); +x_71 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_71, 0, x_69); +lean_ctor_set(x_71, 1, x_70); +return x_71; +} +} +} +else +{ +lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; uint8_t x_76; lean_object* x_77; lean_object* x_78; +x_72 = lean_box(0); +x_73 = l_Lean_mkAppStx___closed__2; +lean_inc(x_3); +x_74 = lean_alloc_closure((void*)(l_Lean_Elab_Command_elabEvalUnsafe___lambda__2), 8, 5); +lean_closure_set(x_74, 0, x_73); +lean_closure_set(x_74, 1, x_72); +lean_closure_set(x_74, 2, x_13); +lean_closure_set(x_74, 3, x_11); +lean_closure_set(x_74, 4, x_3); +x_75 = l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__8; +x_76 = 0; +x_77 = l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__11; +lean_inc(x_6); +x_78 = l_Lean_Elab_Term_withLocalDecl___rarg(x_3, x_75, x_76, x_77, x_74, x_6, x_16); +if (lean_obj_tag(x_78) == 0) +{ +lean_object* x_79; lean_object* x_80; lean_object* x_81; +x_79 = lean_ctor_get(x_78, 0); +lean_inc(x_79); +x_80 = lean_ctor_get(x_78, 1); +lean_inc(x_80); +lean_dec(x_78); +lean_inc(x_6); +lean_inc(x_79); +x_81 = l_Lean_Elab_Term_inferType(x_3, x_79, x_6, x_80); +if (lean_obj_tag(x_81) == 0) +{ +lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; +x_82 = lean_ctor_get(x_81, 0); +lean_inc(x_82); +x_83 = lean_ctor_get(x_81, 1); +lean_inc(x_83); +lean_dec(x_81); +lean_inc(x_4); +x_84 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_84, 0, x_4); +lean_ctor_set(x_84, 1, x_72); +lean_ctor_set(x_84, 2, x_82); +x_85 = lean_box(0); +x_86 = lean_alloc_ctor(0, 3, 1); +lean_ctor_set(x_86, 0, x_84); +lean_ctor_set(x_86, 1, x_79); +lean_ctor_set(x_86, 2, x_85); +lean_ctor_set_uint8(x_86, sizeof(void*)*3, x_9); +x_87 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_87, 0, x_86); +lean_inc(x_6); +x_88 = l_Lean_Elab_Term_addDecl(x_3, x_87, x_6, x_83); +if (lean_obj_tag(x_88) == 0) +{ +lean_object* x_89; lean_object* x_90; +x_89 = lean_ctor_get(x_88, 1); +lean_inc(x_89); +lean_dec(x_88); +lean_inc(x_6); +x_90 = l_Lean_Elab_Term_compileDecl(x_3, x_87, x_6, x_89); +lean_dec(x_87); +if (lean_obj_tag(x_90) == 0) +{ +lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; uint8_t x_96; +x_91 = lean_ctor_get(x_90, 1); +lean_inc(x_91); +lean_dec(x_90); +x_92 = l_Lean_Elab_Term_getEnv___rarg(x_91); +x_93 = lean_ctor_get(x_92, 0); +lean_inc(x_93); +x_94 = lean_ctor_get(x_92, 1); +lean_inc(x_94); +lean_dec(x_92); +x_95 = l_Lean_Elab_Term_getOptions(x_6, x_94); +x_96 = !lean_is_exclusive(x_95); +if (x_96 == 0) +{ +lean_object* x_97; lean_object* x_98; lean_object* x_99; +x_97 = lean_ctor_get(x_95, 0); +x_98 = lean_ctor_get(x_95, 1); +x_99 = lean_eval_const(x_93, x_4); +lean_dec(x_4); +if (lean_obj_tag(x_99) == 0) +{ +lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; +lean_free_object(x_95); +lean_dec(x_97); +lean_dec(x_93); +x_100 = lean_ctor_get(x_99, 0); +lean_inc(x_100); +lean_dec(x_99); +x_101 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_101, 0, x_100); +x_102 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_102, 0, x_101); +x_103 = l_Lean_Elab_Term_throwError___rarg(x_3, x_102, x_6, x_98); +lean_dec(x_3); +return x_103; +} +else +{ +lean_object* x_104; lean_object* x_105; +lean_dec(x_6); +lean_dec(x_3); +x_104 = lean_ctor_get(x_99, 0); +lean_inc(x_104); +lean_dec(x_99); +x_105 = lean_apply_2(x_104, x_93, x_97); +lean_ctor_set(x_95, 0, x_105); +return x_95; +} +} +else +{ +lean_object* x_106; lean_object* x_107; lean_object* x_108; +x_106 = lean_ctor_get(x_95, 0); +x_107 = lean_ctor_get(x_95, 1); +lean_inc(x_107); +lean_inc(x_106); +lean_dec(x_95); +x_108 = lean_eval_const(x_93, x_4); +lean_dec(x_4); +if (lean_obj_tag(x_108) == 0) +{ +lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; +lean_dec(x_106); +lean_dec(x_93); +x_109 = lean_ctor_get(x_108, 0); +lean_inc(x_109); +lean_dec(x_108); +x_110 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_110, 0, x_109); +x_111 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_111, 0, x_110); +x_112 = l_Lean_Elab_Term_throwError___rarg(x_3, x_111, x_6, x_107); +lean_dec(x_3); +return x_112; +} +else +{ +lean_object* x_113; lean_object* x_114; lean_object* x_115; +lean_dec(x_6); +lean_dec(x_3); +x_113 = lean_ctor_get(x_108, 0); +lean_inc(x_113); +lean_dec(x_108); +x_114 = lean_apply_2(x_113, x_93, x_106); +x_115 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_115, 0, x_114); +lean_ctor_set(x_115, 1, x_107); +return x_115; +} +} +} +else +{ +uint8_t x_116; +lean_dec(x_6); +lean_dec(x_4); +lean_dec(x_3); +x_116 = !lean_is_exclusive(x_90); +if (x_116 == 0) +{ +return x_90; +} +else +{ +lean_object* x_117; lean_object* x_118; lean_object* x_119; +x_117 = lean_ctor_get(x_90, 0); +x_118 = lean_ctor_get(x_90, 1); +lean_inc(x_118); +lean_inc(x_117); +lean_dec(x_90); +x_119 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_119, 0, x_117); +lean_ctor_set(x_119, 1, x_118); +return x_119; +} +} +} +else +{ +uint8_t x_120; +lean_dec(x_87); +lean_dec(x_6); +lean_dec(x_4); +lean_dec(x_3); +x_120 = !lean_is_exclusive(x_88); +if (x_120 == 0) +{ +return x_88; +} +else +{ +lean_object* x_121; lean_object* x_122; lean_object* x_123; +x_121 = lean_ctor_get(x_88, 0); +x_122 = lean_ctor_get(x_88, 1); +lean_inc(x_122); +lean_inc(x_121); +lean_dec(x_88); +x_123 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_123, 0, x_121); +lean_ctor_set(x_123, 1, x_122); +return x_123; +} +} +} +else +{ +uint8_t x_124; +lean_dec(x_79); +lean_dec(x_6); +lean_dec(x_4); +lean_dec(x_3); +x_124 = !lean_is_exclusive(x_81); +if (x_124 == 0) +{ +return x_81; +} +else +{ +lean_object* x_125; lean_object* x_126; lean_object* x_127; +x_125 = lean_ctor_get(x_81, 0); +x_126 = lean_ctor_get(x_81, 1); +lean_inc(x_126); +lean_inc(x_125); +lean_dec(x_81); +x_127 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_127, 0, x_125); +lean_ctor_set(x_127, 1, x_126); +return x_127; +} +} +} +else +{ +uint8_t x_128; +lean_dec(x_6); +lean_dec(x_4); +lean_dec(x_3); +x_128 = !lean_is_exclusive(x_78); +if (x_128 == 0) +{ +return x_78; +} +else +{ +lean_object* x_129; lean_object* x_130; lean_object* x_131; +x_129 = lean_ctor_get(x_78, 0); +x_130 = lean_ctor_get(x_78, 1); +lean_inc(x_130); +lean_inc(x_129); +lean_dec(x_78); +x_131 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_131, 0, x_129); +lean_ctor_set(x_131, 1, x_130); +return x_131; +} +} +} +} +} +else +{ +uint8_t x_146; +lean_dec(x_6); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_146 = !lean_is_exclusive(x_10); +if (x_146 == 0) +{ +return x_10; +} +else +{ +lean_object* x_147; lean_object* x_148; lean_object* x_149; +x_147 = lean_ctor_get(x_10, 0); +x_148 = lean_ctor_get(x_10, 1); +lean_inc(x_148); +lean_inc(x_147); +lean_dec(x_10); +x_149 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_149, 0, x_147); +lean_ctor_set(x_149, 1, x_148); +return x_149; +} +} +} +} +lean_object* _init_l_Lean_Elab_Command_elabEvalUnsafe___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("_eval"); +return x_1; +} +} +lean_object* _init_l_Lean_Elab_Command_elabEvalUnsafe___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_Elab_Command_elabEvalUnsafe___closed__1; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_Elab_Command_elabEvalUnsafe___closed__3() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Elab_Command_elabEvalUnsafe___closed__2; +x_2 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* l_Lean_Elab_Command_elabEvalUnsafe(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 = lean_unsigned_to_nat(1u); +x_5 = l_Lean_Syntax_getArg(x_1, x_4); +lean_inc(x_2); +x_6 = l_Lean_Elab_Command_getEnv(x_2, x_3); +if (lean_obj_tag(x_6) == 0) +{ +lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_21; lean_object* x_22; lean_object* x_62; +x_7 = lean_ctor_get(x_6, 0); +lean_inc(x_7); +x_8 = lean_ctor_get(x_6, 1); +lean_inc(x_8); +lean_dec(x_6); +lean_inc(x_2); +x_62 = l_Lean_Elab_Command_getEnv(x_2, x_8); +if (lean_obj_tag(x_62) == 0) +{ +lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; +x_63 = lean_ctor_get(x_62, 0); +lean_inc(x_63); +x_64 = lean_ctor_get(x_62, 1); +lean_inc(x_64); +lean_dec(x_62); +x_65 = l_Lean_Elab_Command_elabEvalUnsafe___closed__2; +lean_inc(x_1); +x_66 = lean_alloc_closure((void*)(l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___boxed), 7, 4); +lean_closure_set(x_66, 0, x_5); +lean_closure_set(x_66, 1, x_63); +lean_closure_set(x_66, 2, x_1); +lean_closure_set(x_66, 3, x_65); +lean_inc(x_2); +x_67 = l___private_Lean_Elab_Command_2__getState(x_2, x_64); +if (lean_obj_tag(x_67) == 0) +{ +lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; +x_68 = lean_ctor_get(x_67, 0); +lean_inc(x_68); +x_69 = lean_ctor_get(x_67, 1); +lean_inc(x_69); +lean_dec(x_67); +x_70 = l___private_Lean_Elab_Command_9__getVarDecls(x_68); +lean_dec(x_68); +lean_inc(x_2); +x_71 = l___private_Lean_Elab_Command_2__getState(x_2, x_69); +if (lean_obj_tag(x_71) == 0) +{ +lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; +x_72 = lean_ctor_get(x_71, 0); +lean_inc(x_72); +x_73 = lean_ctor_get(x_71, 1); +lean_inc(x_73); +lean_dec(x_71); +x_74 = l_Lean_Elab_Command_elabEvalUnsafe___closed__3; +x_75 = l___private_Lean_Elab_Command_6__mkTermContext(x_2, x_72, x_74); +x_76 = l___private_Lean_Elab_Command_7__mkTermState(x_72); +lean_dec(x_72); +x_77 = l_Lean_Elab_Term_elabBinders___rarg(x_70, x_66, x_75, x_76); +lean_dec(x_70); +if (lean_obj_tag(x_77) == 0) +{ +lean_object* x_78; lean_object* x_79; lean_object* x_80; +x_78 = lean_ctor_get(x_77, 0); +lean_inc(x_78); +x_79 = lean_ctor_get(x_77, 1); +lean_inc(x_79); +lean_dec(x_77); +lean_inc(x_2); +x_80 = l___private_Lean_Elab_Command_2__getState(x_2, x_73); +if (lean_obj_tag(x_80) == 0) +{ +lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; uint8_t x_86; +x_81 = lean_ctor_get(x_79, 0); +lean_inc(x_81); +x_82 = lean_ctor_get(x_80, 0); +lean_inc(x_82); +x_83 = lean_ctor_get(x_80, 1); +lean_inc(x_83); +lean_dec(x_80); +x_84 = lean_ctor_get(x_81, 0); +lean_inc(x_84); +lean_dec(x_81); +x_85 = lean_ctor_get(x_79, 2); +lean_inc(x_85); +lean_dec(x_79); +x_86 = !lean_is_exclusive(x_82); +if (x_86 == 0) +{ +lean_object* x_87; lean_object* x_88; lean_object* x_89; +x_87 = lean_ctor_get(x_82, 1); +lean_dec(x_87); +x_88 = lean_ctor_get(x_82, 0); +lean_dec(x_88); +lean_ctor_set(x_82, 1, x_85); +lean_ctor_set(x_82, 0, x_84); +lean_inc(x_2); +x_89 = l___private_Lean_Elab_Command_3__setState(x_82, x_2, x_83); +if (lean_obj_tag(x_89) == 0) +{ +lean_object* x_90; +x_90 = lean_ctor_get(x_89, 1); +lean_inc(x_90); +lean_dec(x_89); +x_21 = x_78; +x_22 = x_90; +goto block_61; +} +else +{ +lean_object* x_91; lean_object* x_92; +lean_dec(x_78); +lean_dec(x_1); +x_91 = lean_ctor_get(x_89, 0); +lean_inc(x_91); +x_92 = lean_ctor_get(x_89, 1); +lean_inc(x_92); +lean_dec(x_89); +x_9 = x_91; +x_10 = x_92; +goto block_20; +} +} +else +{ +lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; +x_93 = lean_ctor_get(x_82, 2); +x_94 = lean_ctor_get(x_82, 3); +x_95 = lean_ctor_get(x_82, 4); +lean_inc(x_95); +lean_inc(x_94); +lean_inc(x_93); +lean_dec(x_82); +x_96 = lean_alloc_ctor(0, 5, 0); +lean_ctor_set(x_96, 0, x_84); +lean_ctor_set(x_96, 1, x_85); +lean_ctor_set(x_96, 2, x_93); +lean_ctor_set(x_96, 3, x_94); +lean_ctor_set(x_96, 4, x_95); +lean_inc(x_2); +x_97 = l___private_Lean_Elab_Command_3__setState(x_96, x_2, x_83); +if (lean_obj_tag(x_97) == 0) +{ +lean_object* x_98; +x_98 = lean_ctor_get(x_97, 1); +lean_inc(x_98); +lean_dec(x_97); +x_21 = x_78; +x_22 = x_98; +goto block_61; +} +else +{ +lean_object* x_99; lean_object* x_100; +lean_dec(x_78); +lean_dec(x_1); +x_99 = lean_ctor_get(x_97, 0); +lean_inc(x_99); +x_100 = lean_ctor_get(x_97, 1); +lean_inc(x_100); +lean_dec(x_97); +x_9 = x_99; +x_10 = x_100; +goto block_20; +} +} +} +else +{ +lean_object* x_101; lean_object* x_102; +lean_dec(x_79); +lean_dec(x_78); +lean_dec(x_1); +x_101 = lean_ctor_get(x_80, 0); +lean_inc(x_101); +x_102 = lean_ctor_get(x_80, 1); +lean_inc(x_102); +lean_dec(x_80); +x_9 = x_101; +x_10 = x_102; +goto block_20; +} +} +else +{ +lean_object* x_103; +x_103 = lean_ctor_get(x_77, 0); +lean_inc(x_103); +if (lean_obj_tag(x_103) == 0) +{ +lean_object* x_104; lean_object* x_105; lean_object* x_106; +lean_dec(x_1); +x_104 = lean_ctor_get(x_77, 1); +lean_inc(x_104); +lean_dec(x_77); +x_105 = lean_ctor_get(x_103, 0); +lean_inc(x_105); +lean_dec(x_103); +lean_inc(x_2); +x_106 = l___private_Lean_Elab_Command_2__getState(x_2, x_73); +if (lean_obj_tag(x_106) == 0) +{ +lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; uint8_t x_112; +x_107 = lean_ctor_get(x_104, 0); +lean_inc(x_107); +x_108 = lean_ctor_get(x_106, 0); +lean_inc(x_108); +x_109 = lean_ctor_get(x_106, 1); +lean_inc(x_109); +lean_dec(x_106); +x_110 = lean_ctor_get(x_107, 0); +lean_inc(x_110); +lean_dec(x_107); +x_111 = lean_ctor_get(x_104, 2); +lean_inc(x_111); +lean_dec(x_104); +x_112 = !lean_is_exclusive(x_108); +if (x_112 == 0) +{ +lean_object* x_113; lean_object* x_114; lean_object* x_115; +x_113 = lean_ctor_get(x_108, 1); +lean_dec(x_113); +x_114 = lean_ctor_get(x_108, 0); +lean_dec(x_114); +lean_ctor_set(x_108, 1, x_111); +lean_ctor_set(x_108, 0, x_110); +lean_inc(x_2); +x_115 = l___private_Lean_Elab_Command_3__setState(x_108, x_2, x_109); +if (lean_obj_tag(x_115) == 0) +{ +lean_object* x_116; +x_116 = lean_ctor_get(x_115, 1); +lean_inc(x_116); +lean_dec(x_115); +x_9 = x_105; +x_10 = x_116; +goto block_20; +} +else +{ +lean_object* x_117; lean_object* x_118; +lean_dec(x_105); +x_117 = lean_ctor_get(x_115, 0); +lean_inc(x_117); +x_118 = lean_ctor_get(x_115, 1); +lean_inc(x_118); +lean_dec(x_115); +x_9 = x_117; +x_10 = x_118; +goto block_20; +} +} +else +{ +lean_object* x_119; lean_object* x_120; lean_object* x_121; lean_object* x_122; lean_object* x_123; +x_119 = lean_ctor_get(x_108, 2); +x_120 = lean_ctor_get(x_108, 3); +x_121 = lean_ctor_get(x_108, 4); +lean_inc(x_121); +lean_inc(x_120); +lean_inc(x_119); +lean_dec(x_108); +x_122 = lean_alloc_ctor(0, 5, 0); +lean_ctor_set(x_122, 0, x_110); +lean_ctor_set(x_122, 1, x_111); +lean_ctor_set(x_122, 2, x_119); +lean_ctor_set(x_122, 3, x_120); +lean_ctor_set(x_122, 4, x_121); +lean_inc(x_2); +x_123 = l___private_Lean_Elab_Command_3__setState(x_122, x_2, x_109); +if (lean_obj_tag(x_123) == 0) +{ +lean_object* x_124; +x_124 = lean_ctor_get(x_123, 1); +lean_inc(x_124); +lean_dec(x_123); +x_9 = x_105; +x_10 = x_124; +goto block_20; +} +else +{ +lean_object* x_125; lean_object* x_126; +lean_dec(x_105); +x_125 = lean_ctor_get(x_123, 0); +lean_inc(x_125); +x_126 = lean_ctor_get(x_123, 1); +lean_inc(x_126); +lean_dec(x_123); +x_9 = x_125; +x_10 = x_126; +goto block_20; +} +} +} +else +{ +lean_object* x_127; lean_object* x_128; +lean_dec(x_105); +lean_dec(x_104); +x_127 = lean_ctor_get(x_106, 0); +lean_inc(x_127); +x_128 = lean_ctor_get(x_106, 1); +lean_inc(x_128); +lean_dec(x_106); +x_9 = x_127; +x_10 = x_128; +goto block_20; +} +} +else +{ +lean_object* x_129; lean_object* x_130; lean_object* x_131; +lean_dec(x_77); +x_129 = l_Lean_Elab_Command_liftTermElabM___rarg___closed__1; +x_130 = l_unreachable_x21___rarg(x_129); +lean_inc(x_2); +x_131 = lean_apply_2(x_130, x_2, x_73); +if (lean_obj_tag(x_131) == 0) +{ +lean_object* x_132; lean_object* x_133; +x_132 = lean_ctor_get(x_131, 0); +lean_inc(x_132); +x_133 = lean_ctor_get(x_131, 1); +lean_inc(x_133); +lean_dec(x_131); +x_21 = x_132; +x_22 = x_133; +goto block_61; +} +else +{ +lean_object* x_134; lean_object* x_135; +lean_dec(x_1); +x_134 = lean_ctor_get(x_131, 0); +lean_inc(x_134); +x_135 = lean_ctor_get(x_131, 1); +lean_inc(x_135); +lean_dec(x_131); +x_9 = x_134; +x_10 = x_135; +goto block_20; +} +} +} +} +else +{ +lean_object* x_136; lean_object* x_137; +lean_dec(x_70); +lean_dec(x_66); +lean_dec(x_1); +x_136 = lean_ctor_get(x_71, 0); +lean_inc(x_136); +x_137 = lean_ctor_get(x_71, 1); +lean_inc(x_137); +lean_dec(x_71); +x_9 = x_136; +x_10 = x_137; +goto block_20; +} +} +else +{ +lean_object* x_138; lean_object* x_139; +lean_dec(x_66); +lean_dec(x_1); +x_138 = lean_ctor_get(x_67, 0); +lean_inc(x_138); +x_139 = lean_ctor_get(x_67, 1); +lean_inc(x_139); +lean_dec(x_67); +x_9 = x_138; +x_10 = x_139; +goto block_20; +} +} +else +{ +lean_object* x_140; lean_object* x_141; +lean_dec(x_5); +lean_dec(x_1); +x_140 = lean_ctor_get(x_62, 0); +lean_inc(x_140); +x_141 = lean_ctor_get(x_62, 1); +lean_inc(x_141); +lean_dec(x_62); +x_9 = x_140; +x_10 = x_141; +goto block_20; +} +block_20: +{ +lean_object* x_11; +x_11 = l_Lean_Elab_Command_setEnv(x_7, x_2, x_10); +if (lean_obj_tag(x_11) == 0) +{ +uint8_t x_12; +x_12 = !lean_is_exclusive(x_11); +if (x_12 == 0) +{ +lean_object* x_13; +x_13 = lean_ctor_get(x_11, 0); +lean_dec(x_13); +lean_ctor_set_tag(x_11, 1); +lean_ctor_set(x_11, 0, x_9); +return x_11; +} +else +{ +lean_object* x_14; lean_object* x_15; +x_14 = lean_ctor_get(x_11, 1); +lean_inc(x_14); +lean_dec(x_11); +x_15 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_15, 0, x_9); +lean_ctor_set(x_15, 1, x_14); +return x_15; +} +} +else +{ +uint8_t x_16; +lean_dec(x_9); +x_16 = !lean_is_exclusive(x_11); +if (x_16 == 0) +{ +return x_11; +} +else +{ +lean_object* x_17; lean_object* x_18; lean_object* x_19; +x_17 = lean_ctor_get(x_11, 0); +x_18 = lean_ctor_get(x_11, 1); +lean_inc(x_18); +lean_inc(x_17); +lean_dec(x_11); +x_19 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_19, 0, x_17); +lean_ctor_set(x_19, 1, x_18); +return x_19; +} +} +} +block_61: +{ +lean_object* x_23; +x_23 = lean_with_isolated_streams(x_21, x_22); +if (lean_obj_tag(x_23) == 0) +{ +lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; uint8_t x_30; lean_object* x_31; +x_24 = lean_ctor_get(x_23, 0); +lean_inc(x_24); +x_25 = lean_ctor_get(x_23, 1); +lean_inc(x_25); +lean_dec(x_23); +x_26 = lean_ctor_get(x_24, 0); +lean_inc(x_26); +x_27 = lean_ctor_get(x_24, 1); +lean_inc(x_27); +lean_dec(x_24); +x_28 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_28, 0, x_26); +x_29 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_29, 0, x_28); +x_30 = 0; +lean_inc(x_2); +x_31 = l_Lean_Elab_log___at_Lean_Elab_Command_logTrace___spec__1(x_1, x_30, x_29, x_2, x_25); +if (lean_obj_tag(x_31) == 0) +{ +if (lean_obj_tag(x_27) == 0) +{ +lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; +x_32 = lean_ctor_get(x_31, 1); +lean_inc(x_32); +lean_dec(x_31); +x_33 = lean_ctor_get(x_27, 0); +lean_inc(x_33); +lean_dec(x_27); +lean_inc(x_2); +x_34 = l___private_Lean_Elab_Command_1__ioErrorToMessage(x_2, x_1, x_33); +lean_dec(x_1); +x_35 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_35, 0, x_34); +x_9 = x_35; +x_10 = x_32; +goto block_20; +} +else +{ +lean_object* x_36; lean_object* x_37; +lean_dec(x_27); +lean_dec(x_1); +x_36 = lean_ctor_get(x_31, 1); +lean_inc(x_36); +lean_dec(x_31); +lean_inc(x_2); +lean_inc(x_7); +x_37 = l_Lean_Elab_Command_setEnv(x_7, x_2, x_36); +if (lean_obj_tag(x_37) == 0) +{ +uint8_t x_38; +lean_dec(x_7); +lean_dec(x_2); +x_38 = !lean_is_exclusive(x_37); +if (x_38 == 0) +{ +lean_object* x_39; lean_object* x_40; +x_39 = lean_ctor_get(x_37, 0); +lean_dec(x_39); +x_40 = lean_box(0); +lean_ctor_set(x_37, 0, x_40); +return x_37; +} +else +{ +lean_object* x_41; lean_object* x_42; lean_object* x_43; +x_41 = lean_ctor_get(x_37, 1); +lean_inc(x_41); +lean_dec(x_37); +x_42 = lean_box(0); +x_43 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_43, 0, x_42); +lean_ctor_set(x_43, 1, x_41); +return x_43; +} +} +else +{ +lean_object* x_44; lean_object* x_45; lean_object* x_46; +x_44 = lean_ctor_get(x_37, 0); +lean_inc(x_44); +x_45 = lean_ctor_get(x_37, 1); +lean_inc(x_45); +lean_dec(x_37); +x_46 = l_Lean_Elab_Command_setEnv(x_7, x_2, x_45); +if (lean_obj_tag(x_46) == 0) +{ +uint8_t x_47; +x_47 = !lean_is_exclusive(x_46); +if (x_47 == 0) +{ +lean_object* x_48; +x_48 = lean_ctor_get(x_46, 0); +lean_dec(x_48); +lean_ctor_set_tag(x_46, 1); +lean_ctor_set(x_46, 0, x_44); +return x_46; +} +else +{ +lean_object* x_49; lean_object* x_50; +x_49 = lean_ctor_get(x_46, 1); +lean_inc(x_49); +lean_dec(x_46); +x_50 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_50, 0, x_44); +lean_ctor_set(x_50, 1, x_49); +return x_50; +} +} +else +{ +uint8_t x_51; +lean_dec(x_44); +x_51 = !lean_is_exclusive(x_46); +if (x_51 == 0) +{ +return x_46; +} +else +{ +lean_object* x_52; lean_object* x_53; lean_object* x_54; +x_52 = lean_ctor_get(x_46, 0); +x_53 = lean_ctor_get(x_46, 1); +lean_inc(x_53); +lean_inc(x_52); +lean_dec(x_46); +x_54 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_54, 0, x_52); +lean_ctor_set(x_54, 1, x_53); +return x_54; +} +} +} +} +} +else +{ +lean_object* x_55; lean_object* x_56; +lean_dec(x_27); +lean_dec(x_1); +x_55 = lean_ctor_get(x_31, 0); +lean_inc(x_55); +x_56 = lean_ctor_get(x_31, 1); +lean_inc(x_56); +lean_dec(x_31); +x_9 = x_55; +x_10 = x_56; +goto block_20; +} +} +else +{ +lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; +x_57 = lean_ctor_get(x_23, 0); +lean_inc(x_57); +x_58 = lean_ctor_get(x_23, 1); +lean_inc(x_58); +lean_dec(x_23); +lean_inc(x_2); +x_59 = l___private_Lean_Elab_Command_1__ioErrorToMessage(x_2, x_1, x_57); +lean_dec(x_1); +x_60 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_60, 0, x_59); +x_9 = x_60; +x_10 = x_58; +goto block_20; +} +} +} +else +{ +uint8_t x_142; +lean_dec(x_5); +lean_dec(x_2); +lean_dec(x_1); +x_142 = !lean_is_exclusive(x_6); +if (x_142 == 0) +{ +return x_6; +} +else +{ +lean_object* x_143; lean_object* x_144; lean_object* x_145; +x_143 = lean_ctor_get(x_6, 0); +x_144 = lean_ctor_get(x_6, 1); +lean_inc(x_144); +lean_inc(x_143); +lean_dec(x_6); +x_145 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_145, 0, x_143); +lean_ctor_set(x_145, 1, x_144); +return x_145; +} +} +} +} +lean_object* l_Lean_Elab_Command_elabEvalUnsafe___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { +_start: +{ +lean_object* x_9; +x_9 = l_Lean_Elab_Command_elabEvalUnsafe___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); +lean_dec(x_5); +return x_9; +} +} +lean_object* l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___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_Elab_Command_elabEvalUnsafe___lambda__3(x_1, x_2, x_3, x_4, x_5, x_6, x_7); +lean_dec(x_5); +return x_8; +} +} +lean_object* l_Lean_Elab_Command_elabEval___rarg(lean_object* x_1) { +_start: +{ +lean_object* x_2; lean_object* x_3; +x_2 = l_Lean_Elab_Exception_inhabited___closed__1; +x_3 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_3, 0, x_2); +lean_ctor_set(x_3, 1, x_1); +return x_3; +} +} +lean_object* l_Lean_Elab_Command_elabEval(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = lean_alloc_closure((void*)(l_Lean_Elab_Command_elabEval___rarg), 1, 0); +return x_3; +} +} +lean_object* l_Lean_Elab_Command_elabEval___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = l_Lean_Elab_Command_elabEval(x_1, x_2); +lean_dec(x_2); +lean_dec(x_1); +return x_3; +} +} +lean_object* _init_l___regBuiltin_Lean_Elab_Command_elabEval___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_Lean_Elab_Command_elabEvalUnsafe), 3, 0); +return x_1; +} +} +lean_object* l___regBuiltin_Lean_Elab_Command_elabEval(lean_object* x_1) { +_start: +{ +lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; +x_2 = l_Lean_Elab_Command_commandElabAttribute; +x_3 = l_Lean_Parser_Command_eval___elambda__1___closed__2; +x_4 = l___regBuiltin_Lean_Elab_Command_elabEval___closed__1; +x_5 = l_Lean_KeyedDeclsAttribute_addBuiltin___rarg(x_2, x_3, x_4, x_1); +return x_5; +} +} lean_object* l_Lean_Elab_Command_elabSynth___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { @@ -25905,834 +28385,6 @@ lean_dec(x_3); return x_4; } } -lean_object* l_Lean_Elab_Command_addDecl(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -lean_object* x_5; lean_object* x_6; -x_5 = lean_box(0); -lean_inc(x_3); -x_6 = l___private_Lean_Elab_Command_2__getState(x_3, x_4); -if (lean_obj_tag(x_6) == 0) -{ -lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; -x_7 = lean_ctor_get(x_6, 0); -lean_inc(x_7); -x_8 = lean_ctor_get(x_6, 1); -lean_inc(x_8); -lean_dec(x_6); -x_9 = l___private_Lean_Elab_Command_6__mkTermContext(x_3, x_7, x_5); -x_10 = l___private_Lean_Elab_Command_7__mkTermState(x_7); -lean_dec(x_7); -x_11 = l_Lean_Elab_Term_addDecl(x_1, x_2, x_9, x_10); -if (lean_obj_tag(x_11) == 0) -{ -lean_object* x_12; lean_object* x_13; lean_object* x_14; -x_12 = lean_ctor_get(x_11, 0); -lean_inc(x_12); -x_13 = lean_ctor_get(x_11, 1); -lean_inc(x_13); -lean_dec(x_11); -lean_inc(x_3); -x_14 = l___private_Lean_Elab_Command_2__getState(x_3, x_8); -if (lean_obj_tag(x_14) == 0) -{ -lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; uint8_t x_20; -x_15 = lean_ctor_get(x_13, 0); -lean_inc(x_15); -x_16 = lean_ctor_get(x_14, 0); -lean_inc(x_16); -x_17 = lean_ctor_get(x_14, 1); -lean_inc(x_17); -lean_dec(x_14); -x_18 = lean_ctor_get(x_15, 0); -lean_inc(x_18); -lean_dec(x_15); -x_19 = lean_ctor_get(x_13, 2); -lean_inc(x_19); -lean_dec(x_13); -x_20 = !lean_is_exclusive(x_16); -if (x_20 == 0) -{ -lean_object* x_21; lean_object* x_22; lean_object* x_23; -x_21 = lean_ctor_get(x_16, 1); -lean_dec(x_21); -x_22 = lean_ctor_get(x_16, 0); -lean_dec(x_22); -lean_ctor_set(x_16, 1, x_19); -lean_ctor_set(x_16, 0, x_18); -x_23 = l___private_Lean_Elab_Command_3__setState(x_16, x_3, x_17); -if (lean_obj_tag(x_23) == 0) -{ -uint8_t x_24; -x_24 = !lean_is_exclusive(x_23); -if (x_24 == 0) -{ -lean_object* x_25; -x_25 = lean_ctor_get(x_23, 0); -lean_dec(x_25); -lean_ctor_set(x_23, 0, x_12); -return x_23; -} -else -{ -lean_object* x_26; lean_object* x_27; -x_26 = lean_ctor_get(x_23, 1); -lean_inc(x_26); -lean_dec(x_23); -x_27 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_27, 0, x_12); -lean_ctor_set(x_27, 1, x_26); -return x_27; -} -} -else -{ -uint8_t x_28; -lean_dec(x_12); -x_28 = !lean_is_exclusive(x_23); -if (x_28 == 0) -{ -return x_23; -} -else -{ -lean_object* x_29; lean_object* x_30; lean_object* x_31; -x_29 = lean_ctor_get(x_23, 0); -x_30 = lean_ctor_get(x_23, 1); -lean_inc(x_30); -lean_inc(x_29); -lean_dec(x_23); -x_31 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_31, 0, x_29); -lean_ctor_set(x_31, 1, x_30); -return x_31; -} -} -} -else -{ -lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; -x_32 = lean_ctor_get(x_16, 2); -x_33 = lean_ctor_get(x_16, 3); -x_34 = lean_ctor_get(x_16, 4); -lean_inc(x_34); -lean_inc(x_33); -lean_inc(x_32); -lean_dec(x_16); -x_35 = lean_alloc_ctor(0, 5, 0); -lean_ctor_set(x_35, 0, x_18); -lean_ctor_set(x_35, 1, x_19); -lean_ctor_set(x_35, 2, x_32); -lean_ctor_set(x_35, 3, x_33); -lean_ctor_set(x_35, 4, x_34); -x_36 = l___private_Lean_Elab_Command_3__setState(x_35, x_3, x_17); -if (lean_obj_tag(x_36) == 0) -{ -lean_object* x_37; lean_object* x_38; lean_object* x_39; -x_37 = lean_ctor_get(x_36, 1); -lean_inc(x_37); -if (lean_is_exclusive(x_36)) { - lean_ctor_release(x_36, 0); - lean_ctor_release(x_36, 1); - x_38 = x_36; -} else { - lean_dec_ref(x_36); - x_38 = lean_box(0); -} -if (lean_is_scalar(x_38)) { - x_39 = lean_alloc_ctor(0, 2, 0); -} else { - x_39 = x_38; -} -lean_ctor_set(x_39, 0, x_12); -lean_ctor_set(x_39, 1, x_37); -return x_39; -} -else -{ -lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; -lean_dec(x_12); -x_40 = lean_ctor_get(x_36, 0); -lean_inc(x_40); -x_41 = lean_ctor_get(x_36, 1); -lean_inc(x_41); -if (lean_is_exclusive(x_36)) { - lean_ctor_release(x_36, 0); - lean_ctor_release(x_36, 1); - x_42 = x_36; -} else { - lean_dec_ref(x_36); - x_42 = lean_box(0); -} -if (lean_is_scalar(x_42)) { - x_43 = lean_alloc_ctor(1, 2, 0); -} else { - x_43 = x_42; -} -lean_ctor_set(x_43, 0, x_40); -lean_ctor_set(x_43, 1, x_41); -return x_43; -} -} -} -else -{ -uint8_t x_44; -lean_dec(x_13); -lean_dec(x_12); -lean_dec(x_3); -x_44 = !lean_is_exclusive(x_14); -if (x_44 == 0) -{ -return x_14; -} -else -{ -lean_object* x_45; lean_object* x_46; lean_object* x_47; -x_45 = lean_ctor_get(x_14, 0); -x_46 = lean_ctor_get(x_14, 1); -lean_inc(x_46); -lean_inc(x_45); -lean_dec(x_14); -x_47 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_47, 0, x_45); -lean_ctor_set(x_47, 1, x_46); -return x_47; -} -} -} -else -{ -lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; -x_48 = lean_ctor_get(x_11, 0); -lean_inc(x_48); -x_49 = lean_ctor_get(x_11, 1); -lean_inc(x_49); -lean_dec(x_11); -x_50 = lean_ctor_get(x_48, 0); -lean_inc(x_50); -lean_dec(x_48); -lean_inc(x_3); -x_51 = l___private_Lean_Elab_Command_2__getState(x_3, x_8); -if (lean_obj_tag(x_51) == 0) -{ -lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; uint8_t x_57; -x_52 = lean_ctor_get(x_49, 0); -lean_inc(x_52); -x_53 = lean_ctor_get(x_51, 0); -lean_inc(x_53); -x_54 = lean_ctor_get(x_51, 1); -lean_inc(x_54); -lean_dec(x_51); -x_55 = lean_ctor_get(x_52, 0); -lean_inc(x_55); -lean_dec(x_52); -x_56 = lean_ctor_get(x_49, 2); -lean_inc(x_56); -lean_dec(x_49); -x_57 = !lean_is_exclusive(x_53); -if (x_57 == 0) -{ -lean_object* x_58; lean_object* x_59; lean_object* x_60; -x_58 = lean_ctor_get(x_53, 1); -lean_dec(x_58); -x_59 = lean_ctor_get(x_53, 0); -lean_dec(x_59); -lean_ctor_set(x_53, 1, x_56); -lean_ctor_set(x_53, 0, x_55); -x_60 = l___private_Lean_Elab_Command_3__setState(x_53, x_3, x_54); -if (lean_obj_tag(x_60) == 0) -{ -uint8_t x_61; -x_61 = !lean_is_exclusive(x_60); -if (x_61 == 0) -{ -lean_object* x_62; -x_62 = lean_ctor_get(x_60, 0); -lean_dec(x_62); -lean_ctor_set_tag(x_60, 1); -lean_ctor_set(x_60, 0, x_50); -return x_60; -} -else -{ -lean_object* x_63; lean_object* x_64; -x_63 = lean_ctor_get(x_60, 1); -lean_inc(x_63); -lean_dec(x_60); -x_64 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_64, 0, x_50); -lean_ctor_set(x_64, 1, x_63); -return x_64; -} -} -else -{ -uint8_t x_65; -lean_dec(x_50); -x_65 = !lean_is_exclusive(x_60); -if (x_65 == 0) -{ -return x_60; -} -else -{ -lean_object* x_66; lean_object* x_67; lean_object* x_68; -x_66 = lean_ctor_get(x_60, 0); -x_67 = lean_ctor_get(x_60, 1); -lean_inc(x_67); -lean_inc(x_66); -lean_dec(x_60); -x_68 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_68, 0, x_66); -lean_ctor_set(x_68, 1, x_67); -return x_68; -} -} -} -else -{ -lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; -x_69 = lean_ctor_get(x_53, 2); -x_70 = lean_ctor_get(x_53, 3); -x_71 = lean_ctor_get(x_53, 4); -lean_inc(x_71); -lean_inc(x_70); -lean_inc(x_69); -lean_dec(x_53); -x_72 = lean_alloc_ctor(0, 5, 0); -lean_ctor_set(x_72, 0, x_55); -lean_ctor_set(x_72, 1, x_56); -lean_ctor_set(x_72, 2, x_69); -lean_ctor_set(x_72, 3, x_70); -lean_ctor_set(x_72, 4, x_71); -x_73 = l___private_Lean_Elab_Command_3__setState(x_72, x_3, x_54); -if (lean_obj_tag(x_73) == 0) -{ -lean_object* x_74; lean_object* x_75; lean_object* x_76; -x_74 = lean_ctor_get(x_73, 1); -lean_inc(x_74); -if (lean_is_exclusive(x_73)) { - lean_ctor_release(x_73, 0); - lean_ctor_release(x_73, 1); - x_75 = x_73; -} else { - lean_dec_ref(x_73); - x_75 = lean_box(0); -} -if (lean_is_scalar(x_75)) { - x_76 = lean_alloc_ctor(1, 2, 0); -} else { - x_76 = x_75; - lean_ctor_set_tag(x_76, 1); -} -lean_ctor_set(x_76, 0, x_50); -lean_ctor_set(x_76, 1, x_74); -return x_76; -} -else -{ -lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; -lean_dec(x_50); -x_77 = lean_ctor_get(x_73, 0); -lean_inc(x_77); -x_78 = lean_ctor_get(x_73, 1); -lean_inc(x_78); -if (lean_is_exclusive(x_73)) { - lean_ctor_release(x_73, 0); - lean_ctor_release(x_73, 1); - x_79 = x_73; -} else { - lean_dec_ref(x_73); - x_79 = lean_box(0); -} -if (lean_is_scalar(x_79)) { - x_80 = lean_alloc_ctor(1, 2, 0); -} else { - x_80 = x_79; -} -lean_ctor_set(x_80, 0, x_77); -lean_ctor_set(x_80, 1, x_78); -return x_80; -} -} -} -else -{ -uint8_t x_81; -lean_dec(x_50); -lean_dec(x_49); -lean_dec(x_3); -x_81 = !lean_is_exclusive(x_51); -if (x_81 == 0) -{ -return x_51; -} -else -{ -lean_object* x_82; lean_object* x_83; lean_object* x_84; -x_82 = lean_ctor_get(x_51, 0); -x_83 = lean_ctor_get(x_51, 1); -lean_inc(x_83); -lean_inc(x_82); -lean_dec(x_51); -x_84 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_84, 0, x_82); -lean_ctor_set(x_84, 1, x_83); -return x_84; -} -} -} -} -else -{ -uint8_t x_85; -lean_dec(x_3); -x_85 = !lean_is_exclusive(x_6); -if (x_85 == 0) -{ -return x_6; -} -else -{ -lean_object* x_86; lean_object* x_87; lean_object* x_88; -x_86 = lean_ctor_get(x_6, 0); -x_87 = lean_ctor_get(x_6, 1); -lean_inc(x_87); -lean_inc(x_86); -lean_dec(x_6); -x_88 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_88, 0, x_86); -lean_ctor_set(x_88, 1, x_87); -return x_88; -} -} -} -} -lean_object* l_Lean_Elab_Command_addDecl___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -lean_object* x_5; -x_5 = l_Lean_Elab_Command_addDecl(x_1, x_2, x_3, x_4); -lean_dec(x_2); -lean_dec(x_1); -return x_5; -} -} -lean_object* l_Lean_Elab_Command_compileDecl(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -lean_object* x_5; lean_object* x_6; -x_5 = lean_box(0); -lean_inc(x_3); -x_6 = l___private_Lean_Elab_Command_2__getState(x_3, x_4); -if (lean_obj_tag(x_6) == 0) -{ -lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; -x_7 = lean_ctor_get(x_6, 0); -lean_inc(x_7); -x_8 = lean_ctor_get(x_6, 1); -lean_inc(x_8); -lean_dec(x_6); -x_9 = l___private_Lean_Elab_Command_6__mkTermContext(x_3, x_7, x_5); -x_10 = l___private_Lean_Elab_Command_7__mkTermState(x_7); -lean_dec(x_7); -x_11 = l_Lean_Elab_Term_compileDecl(x_1, x_2, x_9, x_10); -if (lean_obj_tag(x_11) == 0) -{ -lean_object* x_12; lean_object* x_13; lean_object* x_14; -x_12 = lean_ctor_get(x_11, 0); -lean_inc(x_12); -x_13 = lean_ctor_get(x_11, 1); -lean_inc(x_13); -lean_dec(x_11); -lean_inc(x_3); -x_14 = l___private_Lean_Elab_Command_2__getState(x_3, x_8); -if (lean_obj_tag(x_14) == 0) -{ -lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; uint8_t x_20; -x_15 = lean_ctor_get(x_13, 0); -lean_inc(x_15); -x_16 = lean_ctor_get(x_14, 0); -lean_inc(x_16); -x_17 = lean_ctor_get(x_14, 1); -lean_inc(x_17); -lean_dec(x_14); -x_18 = lean_ctor_get(x_15, 0); -lean_inc(x_18); -lean_dec(x_15); -x_19 = lean_ctor_get(x_13, 2); -lean_inc(x_19); -lean_dec(x_13); -x_20 = !lean_is_exclusive(x_16); -if (x_20 == 0) -{ -lean_object* x_21; lean_object* x_22; lean_object* x_23; -x_21 = lean_ctor_get(x_16, 1); -lean_dec(x_21); -x_22 = lean_ctor_get(x_16, 0); -lean_dec(x_22); -lean_ctor_set(x_16, 1, x_19); -lean_ctor_set(x_16, 0, x_18); -x_23 = l___private_Lean_Elab_Command_3__setState(x_16, x_3, x_17); -if (lean_obj_tag(x_23) == 0) -{ -uint8_t x_24; -x_24 = !lean_is_exclusive(x_23); -if (x_24 == 0) -{ -lean_object* x_25; -x_25 = lean_ctor_get(x_23, 0); -lean_dec(x_25); -lean_ctor_set(x_23, 0, x_12); -return x_23; -} -else -{ -lean_object* x_26; lean_object* x_27; -x_26 = lean_ctor_get(x_23, 1); -lean_inc(x_26); -lean_dec(x_23); -x_27 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_27, 0, x_12); -lean_ctor_set(x_27, 1, x_26); -return x_27; -} -} -else -{ -uint8_t x_28; -lean_dec(x_12); -x_28 = !lean_is_exclusive(x_23); -if (x_28 == 0) -{ -return x_23; -} -else -{ -lean_object* x_29; lean_object* x_30; lean_object* x_31; -x_29 = lean_ctor_get(x_23, 0); -x_30 = lean_ctor_get(x_23, 1); -lean_inc(x_30); -lean_inc(x_29); -lean_dec(x_23); -x_31 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_31, 0, x_29); -lean_ctor_set(x_31, 1, x_30); -return x_31; -} -} -} -else -{ -lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; -x_32 = lean_ctor_get(x_16, 2); -x_33 = lean_ctor_get(x_16, 3); -x_34 = lean_ctor_get(x_16, 4); -lean_inc(x_34); -lean_inc(x_33); -lean_inc(x_32); -lean_dec(x_16); -x_35 = lean_alloc_ctor(0, 5, 0); -lean_ctor_set(x_35, 0, x_18); -lean_ctor_set(x_35, 1, x_19); -lean_ctor_set(x_35, 2, x_32); -lean_ctor_set(x_35, 3, x_33); -lean_ctor_set(x_35, 4, x_34); -x_36 = l___private_Lean_Elab_Command_3__setState(x_35, x_3, x_17); -if (lean_obj_tag(x_36) == 0) -{ -lean_object* x_37; lean_object* x_38; lean_object* x_39; -x_37 = lean_ctor_get(x_36, 1); -lean_inc(x_37); -if (lean_is_exclusive(x_36)) { - lean_ctor_release(x_36, 0); - lean_ctor_release(x_36, 1); - x_38 = x_36; -} else { - lean_dec_ref(x_36); - x_38 = lean_box(0); -} -if (lean_is_scalar(x_38)) { - x_39 = lean_alloc_ctor(0, 2, 0); -} else { - x_39 = x_38; -} -lean_ctor_set(x_39, 0, x_12); -lean_ctor_set(x_39, 1, x_37); -return x_39; -} -else -{ -lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; -lean_dec(x_12); -x_40 = lean_ctor_get(x_36, 0); -lean_inc(x_40); -x_41 = lean_ctor_get(x_36, 1); -lean_inc(x_41); -if (lean_is_exclusive(x_36)) { - lean_ctor_release(x_36, 0); - lean_ctor_release(x_36, 1); - x_42 = x_36; -} else { - lean_dec_ref(x_36); - x_42 = lean_box(0); -} -if (lean_is_scalar(x_42)) { - x_43 = lean_alloc_ctor(1, 2, 0); -} else { - x_43 = x_42; -} -lean_ctor_set(x_43, 0, x_40); -lean_ctor_set(x_43, 1, x_41); -return x_43; -} -} -} -else -{ -uint8_t x_44; -lean_dec(x_13); -lean_dec(x_12); -lean_dec(x_3); -x_44 = !lean_is_exclusive(x_14); -if (x_44 == 0) -{ -return x_14; -} -else -{ -lean_object* x_45; lean_object* x_46; lean_object* x_47; -x_45 = lean_ctor_get(x_14, 0); -x_46 = lean_ctor_get(x_14, 1); -lean_inc(x_46); -lean_inc(x_45); -lean_dec(x_14); -x_47 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_47, 0, x_45); -lean_ctor_set(x_47, 1, x_46); -return x_47; -} -} -} -else -{ -lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; -x_48 = lean_ctor_get(x_11, 0); -lean_inc(x_48); -x_49 = lean_ctor_get(x_11, 1); -lean_inc(x_49); -lean_dec(x_11); -x_50 = lean_ctor_get(x_48, 0); -lean_inc(x_50); -lean_dec(x_48); -lean_inc(x_3); -x_51 = l___private_Lean_Elab_Command_2__getState(x_3, x_8); -if (lean_obj_tag(x_51) == 0) -{ -lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; uint8_t x_57; -x_52 = lean_ctor_get(x_49, 0); -lean_inc(x_52); -x_53 = lean_ctor_get(x_51, 0); -lean_inc(x_53); -x_54 = lean_ctor_get(x_51, 1); -lean_inc(x_54); -lean_dec(x_51); -x_55 = lean_ctor_get(x_52, 0); -lean_inc(x_55); -lean_dec(x_52); -x_56 = lean_ctor_get(x_49, 2); -lean_inc(x_56); -lean_dec(x_49); -x_57 = !lean_is_exclusive(x_53); -if (x_57 == 0) -{ -lean_object* x_58; lean_object* x_59; lean_object* x_60; -x_58 = lean_ctor_get(x_53, 1); -lean_dec(x_58); -x_59 = lean_ctor_get(x_53, 0); -lean_dec(x_59); -lean_ctor_set(x_53, 1, x_56); -lean_ctor_set(x_53, 0, x_55); -x_60 = l___private_Lean_Elab_Command_3__setState(x_53, x_3, x_54); -if (lean_obj_tag(x_60) == 0) -{ -uint8_t x_61; -x_61 = !lean_is_exclusive(x_60); -if (x_61 == 0) -{ -lean_object* x_62; -x_62 = lean_ctor_get(x_60, 0); -lean_dec(x_62); -lean_ctor_set_tag(x_60, 1); -lean_ctor_set(x_60, 0, x_50); -return x_60; -} -else -{ -lean_object* x_63; lean_object* x_64; -x_63 = lean_ctor_get(x_60, 1); -lean_inc(x_63); -lean_dec(x_60); -x_64 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_64, 0, x_50); -lean_ctor_set(x_64, 1, x_63); -return x_64; -} -} -else -{ -uint8_t x_65; -lean_dec(x_50); -x_65 = !lean_is_exclusive(x_60); -if (x_65 == 0) -{ -return x_60; -} -else -{ -lean_object* x_66; lean_object* x_67; lean_object* x_68; -x_66 = lean_ctor_get(x_60, 0); -x_67 = lean_ctor_get(x_60, 1); -lean_inc(x_67); -lean_inc(x_66); -lean_dec(x_60); -x_68 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_68, 0, x_66); -lean_ctor_set(x_68, 1, x_67); -return x_68; -} -} -} -else -{ -lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; -x_69 = lean_ctor_get(x_53, 2); -x_70 = lean_ctor_get(x_53, 3); -x_71 = lean_ctor_get(x_53, 4); -lean_inc(x_71); -lean_inc(x_70); -lean_inc(x_69); -lean_dec(x_53); -x_72 = lean_alloc_ctor(0, 5, 0); -lean_ctor_set(x_72, 0, x_55); -lean_ctor_set(x_72, 1, x_56); -lean_ctor_set(x_72, 2, x_69); -lean_ctor_set(x_72, 3, x_70); -lean_ctor_set(x_72, 4, x_71); -x_73 = l___private_Lean_Elab_Command_3__setState(x_72, x_3, x_54); -if (lean_obj_tag(x_73) == 0) -{ -lean_object* x_74; lean_object* x_75; lean_object* x_76; -x_74 = lean_ctor_get(x_73, 1); -lean_inc(x_74); -if (lean_is_exclusive(x_73)) { - lean_ctor_release(x_73, 0); - lean_ctor_release(x_73, 1); - x_75 = x_73; -} else { - lean_dec_ref(x_73); - x_75 = lean_box(0); -} -if (lean_is_scalar(x_75)) { - x_76 = lean_alloc_ctor(1, 2, 0); -} else { - x_76 = x_75; - lean_ctor_set_tag(x_76, 1); -} -lean_ctor_set(x_76, 0, x_50); -lean_ctor_set(x_76, 1, x_74); -return x_76; -} -else -{ -lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; -lean_dec(x_50); -x_77 = lean_ctor_get(x_73, 0); -lean_inc(x_77); -x_78 = lean_ctor_get(x_73, 1); -lean_inc(x_78); -if (lean_is_exclusive(x_73)) { - lean_ctor_release(x_73, 0); - lean_ctor_release(x_73, 1); - x_79 = x_73; -} else { - lean_dec_ref(x_73); - x_79 = lean_box(0); -} -if (lean_is_scalar(x_79)) { - x_80 = lean_alloc_ctor(1, 2, 0); -} else { - x_80 = x_79; -} -lean_ctor_set(x_80, 0, x_77); -lean_ctor_set(x_80, 1, x_78); -return x_80; -} -} -} -else -{ -uint8_t x_81; -lean_dec(x_50); -lean_dec(x_49); -lean_dec(x_3); -x_81 = !lean_is_exclusive(x_51); -if (x_81 == 0) -{ -return x_51; -} -else -{ -lean_object* x_82; lean_object* x_83; lean_object* x_84; -x_82 = lean_ctor_get(x_51, 0); -x_83 = lean_ctor_get(x_51, 1); -lean_inc(x_83); -lean_inc(x_82); -lean_dec(x_51); -x_84 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_84, 0, x_82); -lean_ctor_set(x_84, 1, x_83); -return x_84; -} -} -} -} -else -{ -uint8_t x_85; -lean_dec(x_3); -x_85 = !lean_is_exclusive(x_6); -if (x_85 == 0) -{ -return x_6; -} -else -{ -lean_object* x_86; lean_object* x_87; lean_object* x_88; -x_86 = lean_ctor_get(x_6, 0); -x_87 = lean_ctor_get(x_6, 1); -lean_inc(x_87); -lean_inc(x_86); -lean_dec(x_6); -x_88 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_88, 0, x_86); -lean_ctor_set(x_88, 1, x_87); -return x_88; -} -} -} -} -lean_object* l_Lean_Elab_Command_compileDecl___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -lean_object* x_5; -x_5 = l_Lean_Elab_Command_compileDecl(x_1, x_2, x_3, x_4); -lean_dec(x_2); -lean_dec(x_1); -return x_5; -} -} lean_object* initialize_Lean_Elab_Alias(lean_object*); lean_object* initialize_Lean_Elab_Log(lean_object*); lean_object* initialize_Lean_Elab_ResolveName(lean_object*); @@ -27016,6 +28668,49 @@ lean_mark_persistent(l___regBuiltin_Lean_Elab_Command_elabCheckFailure___closed_ res = l___regBuiltin_Lean_Elab_Command_elabCheckFailure(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); +l_Lean_Elab_Command_elabEvalUnsafe___lambda__1___closed__1 = _init_l_Lean_Elab_Command_elabEvalUnsafe___lambda__1___closed__1(); +lean_mark_persistent(l_Lean_Elab_Command_elabEvalUnsafe___lambda__1___closed__1); +l_Lean_Elab_Command_elabEvalUnsafe___lambda__1___closed__2 = _init_l_Lean_Elab_Command_elabEvalUnsafe___lambda__1___closed__2(); +lean_mark_persistent(l_Lean_Elab_Command_elabEvalUnsafe___lambda__1___closed__2); +l_Lean_Elab_Command_elabEvalUnsafe___lambda__2___closed__1 = _init_l_Lean_Elab_Command_elabEvalUnsafe___lambda__2___closed__1(); +lean_mark_persistent(l_Lean_Elab_Command_elabEvalUnsafe___lambda__2___closed__1); +l_Lean_Elab_Command_elabEvalUnsafe___lambda__2___closed__2 = _init_l_Lean_Elab_Command_elabEvalUnsafe___lambda__2___closed__2(); +lean_mark_persistent(l_Lean_Elab_Command_elabEvalUnsafe___lambda__2___closed__2); +l_Lean_Elab_Command_elabEvalUnsafe___lambda__2___closed__3 = _init_l_Lean_Elab_Command_elabEvalUnsafe___lambda__2___closed__3(); +lean_mark_persistent(l_Lean_Elab_Command_elabEvalUnsafe___lambda__2___closed__3); +l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__1 = _init_l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__1(); +lean_mark_persistent(l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__1); +l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__2 = _init_l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__2(); +lean_mark_persistent(l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__2); +l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__3 = _init_l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__3(); +lean_mark_persistent(l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__3); +l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__4 = _init_l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__4(); +lean_mark_persistent(l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__4); +l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__5 = _init_l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__5(); +lean_mark_persistent(l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__5); +l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__6 = _init_l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__6(); +lean_mark_persistent(l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__6); +l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__7 = _init_l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__7(); +lean_mark_persistent(l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__7); +l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__8 = _init_l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__8(); +lean_mark_persistent(l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__8); +l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__9 = _init_l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__9(); +lean_mark_persistent(l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__9); +l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__10 = _init_l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__10(); +lean_mark_persistent(l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__10); +l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__11 = _init_l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__11(); +lean_mark_persistent(l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__11); +l_Lean_Elab_Command_elabEvalUnsafe___closed__1 = _init_l_Lean_Elab_Command_elabEvalUnsafe___closed__1(); +lean_mark_persistent(l_Lean_Elab_Command_elabEvalUnsafe___closed__1); +l_Lean_Elab_Command_elabEvalUnsafe___closed__2 = _init_l_Lean_Elab_Command_elabEvalUnsafe___closed__2(); +lean_mark_persistent(l_Lean_Elab_Command_elabEvalUnsafe___closed__2); +l_Lean_Elab_Command_elabEvalUnsafe___closed__3 = _init_l_Lean_Elab_Command_elabEvalUnsafe___closed__3(); +lean_mark_persistent(l_Lean_Elab_Command_elabEvalUnsafe___closed__3); +l___regBuiltin_Lean_Elab_Command_elabEval___closed__1 = _init_l___regBuiltin_Lean_Elab_Command_elabEval___closed__1(); +lean_mark_persistent(l___regBuiltin_Lean_Elab_Command_elabEval___closed__1); +res = l___regBuiltin_Lean_Elab_Command_elabEval(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); l_Lean_Elab_Command_elabSynth___closed__1 = _init_l_Lean_Elab_Command_elabSynth___closed__1(); lean_mark_persistent(l_Lean_Elab_Command_elabSynth___closed__1); l_Lean_Elab_Command_elabSynth___closed__2 = _init_l_Lean_Elab_Command_elabSynth___closed__2(); diff --git a/stage0/stdlib/Lean/Elab/DeclModifiers.c b/stage0/stdlib/Lean/Elab/DeclModifiers.c index 27509fe9b8..f085b90a9b 100644 --- a/stage0/stdlib/Lean/Elab/DeclModifiers.c +++ b/stage0/stdlib/Lean/Elab/DeclModifiers.c @@ -54,6 +54,7 @@ lean_object* lean_array_fget(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_Visibility_hasToString(uint8_t); lean_object* l_Lean_Elab_Command_getCurrNamespace(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_Modifiers_hasToString; +uint8_t lean_nat_dec_eq(lean_object*, lean_object*); lean_object* l_Lean_Format_joinSep___main___at___private_Lean_Data_Trie_6__toStringAux___main___spec__1(lean_object*, lean_object*); lean_object* lean_nat_sub(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_Modifiers_hasToString___lambda__1___boxed(lean_object*); @@ -97,6 +98,7 @@ lean_object* l_Lean_Elab_Command_Visibility_hasToString___closed__1; extern lean_object* l_Lean_Parser_Command_noncomputable___elambda__1___closed__1; uint8_t l_Lean_isAttribute(lean_object*, lean_object*); extern lean_object* l_PersistentArray_Stats_toString___closed__4; +lean_object* l_Lean_Syntax_getNumArgs(lean_object*); lean_object* l_Array_foldlStepMAux___main___at_Lean_Elab_Command_elabAttrs___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabAttr___closed__3; lean_object* l_Lean_Elab_Command_elabAttr___closed__2; @@ -1082,7 +1084,7 @@ lean_object* _init_l_Lean_Elab_Command_elabAttr___closed__1() { _start: { lean_object* x_1; -x_1 = lean_mk_string("identifier expected"); +x_1 = lean_mk_string("unknown attribute ["); return x_1; } } @@ -1110,7 +1112,7 @@ lean_object* _init_l_Lean_Elab_Command_elabAttr___closed__4() { _start: { lean_object* x_1; -x_1 = lean_mk_string("unknown attribute ["); +x_1 = lean_mk_string("identifier expected"); return x_1; } } @@ -1137,192 +1139,234 @@ return x_2; lean_object* l_Lean_Elab_Command_elabAttr(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 = lean_unsigned_to_nat(0u); -x_5 = l_Lean_Syntax_getArg(x_1, x_4); -x_6 = l_Lean_Syntax_isIdOrAtom_x3f(x_5); +lean_object* x_4; lean_object* x_5; lean_object* x_57; lean_object* x_58; lean_object* x_59; +x_57 = lean_unsigned_to_nat(0u); +x_58 = l_Lean_Syntax_getArg(x_1, x_57); +x_59 = l_Lean_Syntax_isIdOrAtom_x3f(x_58); +if (lean_obj_tag(x_59) == 0) +{ +lean_object* x_60; lean_object* x_61; uint8_t x_62; +x_60 = l_Lean_Elab_Command_elabAttr___closed__6; +x_61 = l_Lean_Elab_Command_throwError___rarg(x_58, x_60, x_2, x_3); +lean_dec(x_58); +x_62 = !lean_is_exclusive(x_61); +if (x_62 == 0) +{ +return x_61; +} +else +{ +lean_object* x_63; lean_object* x_64; lean_object* x_65; +x_63 = lean_ctor_get(x_61, 0); +x_64 = lean_ctor_get(x_61, 1); +lean_inc(x_64); +lean_inc(x_63); +lean_dec(x_61); +x_65 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_65, 0, x_63); +lean_ctor_set(x_65, 1, x_64); +return x_65; +} +} +else +{ +lean_object* x_66; lean_object* x_67; lean_object* x_68; +lean_dec(x_58); +x_66 = lean_ctor_get(x_59, 0); +lean_inc(x_66); +lean_dec(x_59); +x_67 = lean_box(0); +x_68 = lean_name_mk_string(x_67, x_66); +x_4 = x_68; +x_5 = x_3; +goto block_56; +} +block_56: +{ +lean_object* x_6; +lean_inc(x_2); +x_6 = l_Lean_Elab_Command_getEnv(x_2, x_5); if (lean_obj_tag(x_6) == 0) { -lean_object* x_7; lean_object* x_8; uint8_t x_9; -x_7 = l_Lean_Elab_Command_elabAttr___closed__3; -x_8 = l_Lean_Elab_Command_throwError___rarg(x_5, x_7, x_2, x_3); -lean_dec(x_5); -x_9 = !lean_is_exclusive(x_8); -if (x_9 == 0) +uint8_t x_7; +x_7 = !lean_is_exclusive(x_6); +if (x_7 == 0) { -return x_8; -} -else -{ -lean_object* x_10; lean_object* x_11; lean_object* x_12; -x_10 = lean_ctor_get(x_8, 0); -x_11 = lean_ctor_get(x_8, 1); -lean_inc(x_11); -lean_inc(x_10); +lean_object* x_8; lean_object* x_9; uint8_t x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; uint8_t x_15; +x_8 = lean_ctor_get(x_6, 0); +x_9 = lean_ctor_get(x_6, 1); +x_10 = l_Lean_isAttribute(x_8, x_4); lean_dec(x_8); -x_12 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_12, 0, x_10); -lean_ctor_set(x_12, 1, x_11); -return x_12; +x_11 = lean_unsigned_to_nat(1u); +x_12 = l_Lean_Syntax_getArg(x_1, x_11); +x_13 = l_Lean_Syntax_getNumArgs(x_12); +x_14 = lean_unsigned_to_nat(0u); +x_15 = lean_nat_dec_eq(x_13, x_14); +lean_dec(x_13); +if (x_10 == 0) +{ +lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; uint8_t x_22; +lean_dec(x_12); +lean_free_object(x_6); +x_16 = lean_alloc_ctor(4, 1, 0); +lean_ctor_set(x_16, 0, x_4); +x_17 = l_Lean_Elab_Command_elabAttr___closed__3; +x_18 = lean_alloc_ctor(9, 2, 0); +lean_ctor_set(x_18, 0, x_17); +lean_ctor_set(x_18, 1, x_16); +x_19 = l_Lean_MessageData_arrayExpr_toMessageData___main___closed__1; +x_20 = lean_alloc_ctor(9, 2, 0); +lean_ctor_set(x_20, 0, x_18); +lean_ctor_set(x_20, 1, x_19); +x_21 = l_Lean_Elab_Command_throwError___rarg(x_1, x_20, x_2, x_9); +x_22 = !lean_is_exclusive(x_21); +if (x_22 == 0) +{ +return x_21; +} +else +{ +lean_object* x_23; lean_object* x_24; lean_object* x_25; +x_23 = lean_ctor_get(x_21, 0); +x_24 = lean_ctor_get(x_21, 1); +lean_inc(x_24); +lean_inc(x_23); +lean_dec(x_21); +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; } } else { -lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; -lean_dec(x_5); -x_13 = lean_ctor_get(x_6, 0); -lean_inc(x_13); -lean_dec(x_6); -x_14 = lean_box(0); -x_15 = lean_name_mk_string(x_14, x_13); -lean_inc(x_2); -x_16 = l_Lean_Elab_Command_getEnv(x_2, x_3); -if (lean_obj_tag(x_16) == 0) -{ -uint8_t x_17; -x_17 = !lean_is_exclusive(x_16); -if (x_17 == 0) -{ -lean_object* x_18; lean_object* x_19; uint8_t x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; -x_18 = lean_ctor_get(x_16, 0); -x_19 = lean_ctor_get(x_16, 1); -x_20 = l_Lean_isAttribute(x_18, x_15); -lean_dec(x_18); -x_21 = lean_unsigned_to_nat(1u); -x_22 = l_Lean_Syntax_getArg(x_1, x_21); -lean_inc(x_15); -x_23 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_23, 0, x_15); -lean_ctor_set(x_23, 1, x_22); -if (x_20 == 0) -{ -lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; uint8_t x_30; -lean_dec(x_23); -lean_free_object(x_16); -x_24 = lean_alloc_ctor(4, 1, 0); -lean_ctor_set(x_24, 0, x_15); -x_25 = l_Lean_Elab_Command_elabAttr___closed__6; -x_26 = lean_alloc_ctor(9, 2, 0); -lean_ctor_set(x_26, 0, x_25); -lean_ctor_set(x_26, 1, x_24); -x_27 = l_Lean_MessageData_arrayExpr_toMessageData___main___closed__1; -x_28 = lean_alloc_ctor(9, 2, 0); -lean_ctor_set(x_28, 0, x_26); -lean_ctor_set(x_28, 1, x_27); -x_29 = l_Lean_Elab_Command_throwError___rarg(x_1, x_28, x_2, x_19); -x_30 = !lean_is_exclusive(x_29); -if (x_30 == 0) -{ -return x_29; -} -else -{ -lean_object* x_31; lean_object* x_32; lean_object* x_33; -x_31 = lean_ctor_get(x_29, 0); -x_32 = lean_ctor_get(x_29, 1); -lean_inc(x_32); -lean_inc(x_31); -lean_dec(x_29); -x_33 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_33, 0, x_31); -lean_ctor_set(x_33, 1, x_32); -return x_33; -} -} -else -{ -lean_dec(x_15); lean_dec(x_2); -lean_ctor_set(x_16, 0, x_23); -return x_16; +if (x_15 == 0) +{ +lean_object* x_26; +x_26 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_26, 0, x_4); +lean_ctor_set(x_26, 1, x_12); +lean_ctor_set(x_6, 0, x_26); +return x_6; +} +else +{ +lean_object* x_27; lean_object* x_28; +lean_dec(x_12); +x_27 = lean_box(0); +x_28 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_28, 0, x_4); +lean_ctor_set(x_28, 1, x_27); +lean_ctor_set(x_6, 0, x_28); +return x_6; +} } } else { -lean_object* x_34; lean_object* x_35; uint8_t x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; -x_34 = lean_ctor_get(x_16, 0); -x_35 = lean_ctor_get(x_16, 1); -lean_inc(x_35); -lean_inc(x_34); -lean_dec(x_16); -x_36 = l_Lean_isAttribute(x_34, x_15); +lean_object* x_29; lean_object* x_30; uint8_t x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; uint8_t x_36; +x_29 = lean_ctor_get(x_6, 0); +x_30 = lean_ctor_get(x_6, 1); +lean_inc(x_30); +lean_inc(x_29); +lean_dec(x_6); +x_31 = l_Lean_isAttribute(x_29, x_4); +lean_dec(x_29); +x_32 = lean_unsigned_to_nat(1u); +x_33 = l_Lean_Syntax_getArg(x_1, x_32); +x_34 = l_Lean_Syntax_getNumArgs(x_33); +x_35 = lean_unsigned_to_nat(0u); +x_36 = lean_nat_dec_eq(x_34, x_35); lean_dec(x_34); -x_37 = lean_unsigned_to_nat(1u); -x_38 = l_Lean_Syntax_getArg(x_1, x_37); -lean_inc(x_15); -x_39 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_39, 0, x_15); -lean_ctor_set(x_39, 1, x_38); +if (x_31 == 0) +{ +lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; +lean_dec(x_33); +x_37 = lean_alloc_ctor(4, 1, 0); +lean_ctor_set(x_37, 0, x_4); +x_38 = l_Lean_Elab_Command_elabAttr___closed__3; +x_39 = lean_alloc_ctor(9, 2, 0); +lean_ctor_set(x_39, 0, x_38); +lean_ctor_set(x_39, 1, x_37); +x_40 = l_Lean_MessageData_arrayExpr_toMessageData___main___closed__1; +x_41 = lean_alloc_ctor(9, 2, 0); +lean_ctor_set(x_41, 0, x_39); +lean_ctor_set(x_41, 1, x_40); +x_42 = l_Lean_Elab_Command_throwError___rarg(x_1, x_41, x_2, x_30); +x_43 = lean_ctor_get(x_42, 0); +lean_inc(x_43); +x_44 = lean_ctor_get(x_42, 1); +lean_inc(x_44); +if (lean_is_exclusive(x_42)) { + lean_ctor_release(x_42, 0); + lean_ctor_release(x_42, 1); + x_45 = x_42; +} else { + lean_dec_ref(x_42); + x_45 = lean_box(0); +} +if (lean_is_scalar(x_45)) { + x_46 = lean_alloc_ctor(1, 2, 0); +} else { + x_46 = x_45; +} +lean_ctor_set(x_46, 0, x_43); +lean_ctor_set(x_46, 1, x_44); +return x_46; +} +else +{ +lean_dec(x_2); if (x_36 == 0) { -lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; -lean_dec(x_39); -x_40 = lean_alloc_ctor(4, 1, 0); -lean_ctor_set(x_40, 0, x_15); -x_41 = l_Lean_Elab_Command_elabAttr___closed__6; -x_42 = lean_alloc_ctor(9, 2, 0); -lean_ctor_set(x_42, 0, x_41); -lean_ctor_set(x_42, 1, x_40); -x_43 = l_Lean_MessageData_arrayExpr_toMessageData___main___closed__1; -x_44 = lean_alloc_ctor(9, 2, 0); -lean_ctor_set(x_44, 0, x_42); -lean_ctor_set(x_44, 1, x_43); -x_45 = l_Lean_Elab_Command_throwError___rarg(x_1, x_44, x_2, x_35); -x_46 = lean_ctor_get(x_45, 0); -lean_inc(x_46); -x_47 = lean_ctor_get(x_45, 1); -lean_inc(x_47); -if (lean_is_exclusive(x_45)) { - lean_ctor_release(x_45, 0); - lean_ctor_release(x_45, 1); - x_48 = x_45; -} else { - lean_dec_ref(x_45); - x_48 = lean_box(0); -} -if (lean_is_scalar(x_48)) { - x_49 = lean_alloc_ctor(1, 2, 0); -} else { - x_49 = x_48; -} -lean_ctor_set(x_49, 0, x_46); -lean_ctor_set(x_49, 1, x_47); -return x_49; +lean_object* x_47; lean_object* x_48; +x_47 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_47, 0, x_4); +lean_ctor_set(x_47, 1, x_33); +x_48 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_48, 0, x_47); +lean_ctor_set(x_48, 1, x_30); +return x_48; } else { -lean_object* x_50; -lean_dec(x_15); -lean_dec(x_2); +lean_object* x_49; lean_object* x_50; lean_object* x_51; +lean_dec(x_33); +x_49 = lean_box(0); x_50 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_50, 0, x_39); -lean_ctor_set(x_50, 1, x_35); -return x_50; +lean_ctor_set(x_50, 0, x_4); +lean_ctor_set(x_50, 1, x_49); +x_51 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_51, 0, x_50); +lean_ctor_set(x_51, 1, x_30); +return x_51; +} } } } else { -uint8_t x_51; -lean_dec(x_15); +uint8_t x_52; +lean_dec(x_4); lean_dec(x_2); -x_51 = !lean_is_exclusive(x_16); -if (x_51 == 0) +x_52 = !lean_is_exclusive(x_6); +if (x_52 == 0) { -return x_16; +return x_6; } else { -lean_object* x_52; lean_object* x_53; lean_object* x_54; -x_52 = lean_ctor_get(x_16, 0); -x_53 = lean_ctor_get(x_16, 1); +lean_object* x_53; lean_object* x_54; lean_object* x_55; +x_53 = lean_ctor_get(x_6, 0); +x_54 = lean_ctor_get(x_6, 1); +lean_inc(x_54); lean_inc(x_53); -lean_inc(x_52); -lean_dec(x_16); -x_54 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_54, 0, x_52); -lean_ctor_set(x_54, 1, x_53); -return x_54; +lean_dec(x_6); +x_55 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_55, 0, x_53); +lean_ctor_set(x_55, 1, x_54); +return x_55; } } } diff --git a/stage0/stdlib/Lean/Elab/Syntax.c b/stage0/stdlib/Lean/Elab/Syntax.c index 633bf60f5d..919f372a78 100644 --- a/stage0/stdlib/Lean/Elab/Syntax.c +++ b/stage0/stdlib/Lean/Elab/Syntax.c @@ -16,28 +16,31 @@ extern "C" { lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__45; lean_object* l_Lean_Elab_Command_elabSyntax___closed__11; lean_object* l_Lean_Elab_Command_elabMacroRulesAux___closed__34; -lean_object* l___private_Lean_Elab_Syntax_7__expandNotationAux___closed__3; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__95; extern lean_object* l_Lean_Parser_Syntax_many___elambda__1___closed__1; lean_object* l_Lean_Elab_Term_getEnv___rarg(lean_object*); extern lean_object* l_Lean_Name_toString___closed__1; lean_object* l_Lean_Elab_Command_elabMacroRulesAux___closed__6; lean_object* l_Lean_Elab_Command_elabNoKindMacroRulesAux(lean_object*, lean_object*, lean_object*); +lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__29; lean_object* l_Lean_Elab_Command_elabMacroRules___lambda__1(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__79; +lean_object* l___private_Lean_Elab_Syntax_7__elabKind(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Term_andthen___elambda__1___closed__1; -lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_6__antiquote___main___spec__2___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__116; lean_object* l_Lean_registerTraceClass(lean_object*, lean_object*); +lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__25; lean_object* l___private_Lean_Elab_Syntax_4__withoutLeftRec___rarg(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__12; lean_object* l_Lean_Name_eraseMacroScopes(lean_object*); lean_object* l_Lean_Syntax_isNatLitAux(lean_object*, lean_object*); +lean_object* l___private_Lean_Elab_Syntax_8__antiquote___main___closed__3; extern lean_object* l_Lean_Parser_Syntax_many___elambda__1___closed__2; lean_object* l_Lean_Elab_Command_getOptions(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabSyntax___closed__19; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__58; lean_object* l_Lean_Elab_Command_elabMacroRulesAux___closed__22; +lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__52; lean_object* l_Lean_Elab_Command_elabMacroRulesAux___closed__18; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__114; extern lean_object* l_Lean_Elab_mkMacroAttribute___closed__7; @@ -45,7 +48,6 @@ lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__75; lean_object* l_Lean_Elab_Command_elabMacroRulesAux___closed__15; extern lean_object* l_Lean_Parser_Syntax_try___elambda__1___closed__1; extern lean_object* l_Lean_Parser_Syntax_many1___elambda__1___closed__1; -lean_object* l_Lean_Elab_Command_elabSyntax___closed__36; lean_object* l_Lean_Elab_Command_expandMacroArgIntoSyntaxItem(lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltin_Lean_Elab_Command_elabReserve___closed__1; extern lean_object* l_Lean_Nat_HasQuote___closed__2; @@ -53,23 +55,26 @@ lean_object* l_unreachable_x21___rarg(lean_object*); lean_object* l_Lean_Elab_Command_elabMacroRulesAux___lambda__1___closed__4; extern lean_object* l_Lean_nullKind; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__26; +lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__35; +lean_object* l___private_Lean_Elab_Syntax_9__expandNotationAux___closed__3; lean_object* l___private_Lean_Syntax_7__quoteName___main(lean_object*); lean_object* l_Lean_Elab_Command_elabMacroRulesAux___lambda__1___closed__8; -lean_object* l___private_Lean_Elab_Syntax_7__expandNotationAux___closed__6; extern lean_object* l_Lean_identKind___closed__1; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__92; lean_object* l_Array_eraseIdx___rarg(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabMacroRulesAux___closed__14; lean_object* l_Lean_Elab_Command_elabMacroRulesAux___closed__28; lean_object* l___regBuiltin_Lean_Elab_Command_elabDeclareSyntaxCat___closed__1; +lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__36; lean_object* l_Array_filterSepElemsM___at_Lean_Elab_Command_elabNoKindMacroRulesAux___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__1; lean_object* l_Lean_Elab_Command_elabMacroRulesAux___closed__30; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__36; lean_object* l___private_Lean_Elab_Syntax_1__mkParserSeq(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabMacroRulesAux___closed__5; +lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_9__expandNotationAux___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*); uint8_t lean_name_eq(lean_object*, lean_object*); -lean_object* l___private_Lean_Elab_Syntax_6__antiquote___main___closed__3; +lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_8__antiquote___main___spec__2(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Syntax_many1___elambda__1___closed__2; lean_object* l_Lean_Elab_Command_Macro_mkFreshKind(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__104; @@ -79,28 +84,29 @@ extern lean_object* l_Lean_Elab_Command_commandElabAttribute; lean_object* l___private_Init_LeanInit_13__filterSepElemsMAux___main___at_Lean_Elab_Command_elabNoKindMacroRulesAux___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabMacroRulesAux___closed__33; lean_object* l___regBuiltin_Lean_Elab_Command_elabMacroRules(lean_object*); -lean_object* l___private_Lean_Elab_Syntax_5__elabKind(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Lean_Elab_Syntax_8__antiquote___boxed(lean_object*, lean_object*); lean_object* lean_array_fswap(lean_object*, lean_object*, lean_object*); -lean_object* l___private_Lean_Elab_Syntax_7__expandNotationAux___closed__5; extern lean_object* l_Lean_identKind___closed__2; lean_object* l_Lean_Elab_Command_elabMacroRulesAux___closed__13; +lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__21; +lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__38; lean_object* l_Lean_Elab_Command_elabMacroRulesAux___closed__23; lean_object* l_Lean_Elab_Command_elabSyntax___closed__7; lean_object* l_Lean_Elab_Command_expandMacroArgIntoPattern(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Syntax_orelse___elambda__1___closed__1; +lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__30; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__101; lean_object* l___regBuiltin_Lean_Elab_Command_expandMacro___closed__1; extern lean_object* l_Array_empty___closed__1; -lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_7__expandNotationAux___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_unquotedSymbolFn___closed__1; +lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__3; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__46; lean_object* l_Array_mapSepElemsM___at_Lean_Elab_Command_elabMacroRulesAux___spec__2(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_precedence___elambda__1___closed__2; uint8_t l_Lean_checkTraceOption(lean_object*, lean_object*); -lean_object* l_Lean_Elab_Command_elabSyntax___closed__24; +lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__15; lean_object* l___private_Lean_Elab_Command_6__mkTermContext(lean_object*, lean_object*, lean_object*); extern lean_object* l___private_Lean_Elab_Quotation_4__getHeadInfo___elambda__3___closed__4; -lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_6__antiquote___main___spec__3___boxed(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Command_declaration___elambda__1___closed__2; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__19; lean_object* l_Lean_mkIdentFrom(lean_object*, lean_object*); @@ -117,50 +123,61 @@ lean_object* l_Lean_Elab_Term_checkLeftRec___closed__8; lean_object* lean_array_get_size(lean_object*); lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__51; extern lean_object* l_Lean_charLitKind___closed__1; +lean_object* lean_string_append(lean_object*, lean_object*); +lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__44; lean_object* l_Lean_Elab_Command_elabSyntax___closed__20; +lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__1; lean_object* l_Lean_Elab_Command_elabMacroRulesAux___closed__9; lean_object* l_Lean_Elab_Term_toParserDescrAux(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__81; +lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__60; +lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__47; lean_object* l___private_Lean_Elab_Syntax_2__markAsTrailingParser___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabMacroRulesAux___lambda__1___closed__6; lean_object* l_Lean_Elab_Command_expandMacro___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabMacroRulesAux___closed__27; +lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__2; extern lean_object* l_Lean_Parser_Syntax_ident___elambda__1___closed__1; +lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__64; +lean_object* l___private_Lean_Elab_Syntax_8__antiquote___main___boxed(lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__73; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__98; lean_object* l_Lean_Elab_Command_elabMacroRulesAux___closed__25; lean_object* lean_string_utf8_byte_size(lean_object*); lean_object* l_Lean_mkAtom(lean_object*); lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__20; +lean_object* l___private_Lean_Elab_Syntax_8__antiquote___main___closed__1; lean_object* l_Lean_Elab_Command_strLitToPattern(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__10; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__32; lean_object* l_Lean_KeyedDeclsAttribute_addBuiltin___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabSyntax___closed__10; lean_object* l_Lean_Elab_Command_elabMacroRulesAux___closed__36; -lean_object* l_Lean_Elab_Command_elabSyntax___closed__32; extern lean_object* l_Lean_Parser_Command_mixfix___elambda__1___closed__2; lean_object* l_Lean_Elab_Term_getMainModule___rarg(lean_object*); lean_object* l_Lean_Elab_Command_elabMacroRulesAux___closed__29; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__43; -lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_7__expandNotationAux___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltin_Lean_Elab_Command_elabReserve(lean_object*); +lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__46; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__120; +lean_object* l___private_Lean_Elab_Syntax_9__expandNotationAux___closed__5; extern lean_object* l_Lean_mkAppStx___closed__8; lean_object* l_Lean_Elab_Command_elabMixfix___boxed(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabMacroRulesAux___closed__37; +lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__49; lean_object* lean_nat_add(lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__5; lean_object* l___private_Lean_Elab_Syntax_3__withNotFirst(lean_object*); lean_object* l_Lean_Elab_Command_elabDeclareSyntaxCat___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__103; lean_object* l_Array_filterSepElemsM___at_Lean_Elab_Command_elabNoKindMacroRulesAux___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_9__expandNotationAux___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__28; +lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__16; lean_object* l___private_Init_LeanInit_13__filterSepElemsMAux___main___at_Lean_Elab_Command_elabNoKindMacroRulesAux___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__30; lean_object* l_Lean_Elab_Term_checkLeftRec___closed__1; lean_object* l_Lean_Elab_Term_checkLeftRec___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_6__antiquote___main___spec__2(lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Parser_leadingIdentAsSymbol(lean_object*, lean_object*); extern lean_object* l_Lean_mkTermIdFromIdent___closed__2; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__16; @@ -169,6 +186,7 @@ extern lean_object* l_Lean_Parser_Command_macro__rules___elambda__1___closed__1; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__49; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__105; extern lean_object* l_Lean_Parser_Command_macro__rules___elambda__1___closed__2; +lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__48; lean_object* l_Lean_Elab_Term_expandOptPrecedence___boxed(lean_object*); lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__115; lean_object* l_Lean_Elab_Term_expandOptPrecedence___closed__1; @@ -176,11 +194,13 @@ lean_object* l___regBuiltin_Lean_Elab_Command_expandNotation(lean_object*); lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__85; lean_object* l_Array_iterateMAux___main___at___private_Lean_Elab_Syntax_1__mkParserSeq___spec__1___closed__7; extern lean_object* l_Lean_Elab_mkMacroAttribute___closed__9; +lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__34; lean_object* l_Lean_Elab_Command_expandMacro(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__100; lean_object* l_Lean_Elab_Term_checkLeftRec___closed__4; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__53; lean_object* l___private_Lean_Elab_Syntax_4__withoutLeftRec___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Lean_Elab_Syntax_5__getCatSuffix(lean_object*); lean_object* l_Lean_Elab_Command_expandMacroHeadIntoPattern(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabNoKindMacroRulesAux___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__42; @@ -188,47 +208,51 @@ lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__112; lean_object* lean_array_fget(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabMixfix___rarg(lean_object*); lean_object* l_Lean_Elab_Command_getCurrNamespace(lean_object*, lean_object*); +lean_object* l_Array_findIdxAux___main___at___private_Lean_Elab_Syntax_8__antiquote___main___spec__4(lean_object*, lean_object*, lean_object*); uint8_t lean_nat_dec_eq(lean_object*, lean_object*); -lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_7__expandNotationAux___spec__4(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__50; extern lean_object* l_Lean_Nat_HasQuote___closed__1; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__61; lean_object* l_Lean_Elab_Command_elabNoKindMacroRulesAux___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Elab_Term_elabArrayLit___closed__11; extern lean_object* l_Lean_numLitKind; extern lean_object* l_Lean_Parser_Syntax_num___elambda__1___closed__1; -lean_object* l_Array_findIdxAux___main___at___private_Lean_Elab_Syntax_6__antiquote___main___spec__4(lean_object*, lean_object*, lean_object*); +lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__6; lean_object* l_Array_umapMAux___main___at_Lean_Elab_Term_toParserDescrAux___main___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_dollarSymbol___elambda__1___closed__1; -lean_object* l___private_Lean_Elab_Syntax_8__regTraceClasses___closed__1; lean_object* l_Lean_Elab_Term_throwUnsupportedSyntax___rarg(lean_object*); -extern lean_object* l_Lean_Expr_isSyntheticSorry___closed__1; +lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__28; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__87; extern lean_object* l_Lean_strLitKind; +lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__18; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__68; lean_object* l___regBuiltin_Lean_Elab_Command_elabSyntax(lean_object*); +lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__5; lean_object* l_Lean_Elab_Command_elabMacroRulesAux___closed__3; lean_object* l_Lean_Syntax_isStrLit_x3f(lean_object*); lean_object* l_Lean_Elab_Command_elabSyntax___closed__6; lean_object* l_Lean_Elab_Command_expandMacroArgIntoPattern___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__14; lean_object* l_Lean_Name_append___main(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_expandNotationItemIntoPattern(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__14; lean_object* l_Array_shrink___main___rarg(lean_object*, lean_object*); +extern lean_object* l_Lean_Parser_Term_quotedName___elambda__1___closed__2; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__9; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__40; lean_object* l___private_Init_LeanInit_14__mapSepElemsMAux___main___at_Lean_Elab_Command_elabMacroRulesAux___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__67; +lean_object* l___private_Lean_Elab_Syntax_9__expandNotationAux(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__83; lean_object* l_Lean_Elab_Command_elabMacroRulesAux___lambda__1___closed__2; extern lean_object* l_Lean_Parser_Command_def___elambda__1___closed__2; extern lean_object* l___private_Lean_Elab_Binders_11__expandFunBindersAux___main___closed__3; lean_object* l_Lean_Macro_addMacroScope(lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_Parser_regTermParserAttribute___closed__1; extern lean_object* l_Lean_Parser_Command_declValSimple___elambda__1___closed__2; -lean_object* l___private_Lean_Elab_Syntax_7__expandNotationAux(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l___private_Lean_Elab_Syntax_8__regTraceClasses(lean_object*); +lean_object* l___private_Lean_Elab_Syntax_10__regTraceClasses(lean_object*); lean_object* lean_array_get(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_String_HasQuote___closed__1; -lean_object* l_Lean_Elab_Command_elabSyntax___closed__25; extern lean_object* l_Lean_numLitKind___closed__1; extern lean_object* l_Lean_Parser_Command_def___elambda__1___closed__1; extern lean_object* l_Lean_strLitKind___closed__1; @@ -237,13 +261,14 @@ lean_object* lean_array_fset(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabMacroRulesAux___closed__32; extern lean_object* l_Lean_Parser_Syntax_optional___elambda__1___closed__1; lean_object* l_Lean_Elab_Command_elabMacroRulesAux___closed__10; -lean_object* l___private_Lean_Elab_Syntax_6__antiquote___main(lean_object*, lean_object*); -lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_6__antiquote___main___spec__1(lean_object*, lean_object*, lean_object*); +lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_8__antiquote___main___spec__3(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabMacroRulesAux___lambda__1___closed__1; lean_object* l_Lean_Elab_Command_elabMacroRules___closed__1; lean_object* l_Lean_Elab_Command_strLitToPattern___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Command_elabSyntax___closed__29; +lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__62; +lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__54; lean_object* l_Array_umapMAux___main___at_Lean_Elab_Term_toParserDescrAux___main___spec__1(lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*); +extern lean_object* l_Lean_strLitKind___closed__2; lean_object* l_Lean_Elab_Command_elabMacroRulesAux___closed__20; lean_object* l_Array_iterateMAux___main___at___private_Lean_Elab_Syntax_1__mkParserSeq___spec__1___closed__5; extern lean_object* l_Lean_Parser_mkParserOfConstantUnsafe___closed__4; @@ -253,21 +278,19 @@ lean_object* l___private_Lean_Elab_Syntax_3__withNotFirst___rarg___boxed(lean_ob lean_object* l_Nat_repr(lean_object*); extern lean_object* l_Lean_Parser_Command_attrInstance___elambda__1___closed__2; lean_object* l___private_Lean_Elab_Command_1__ioErrorToMessage(lean_object*, lean_object*, lean_object*); +lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__33; extern lean_object* l_Lean_Elab_Term_expandCDot_x3f___closed__3; lean_object* l_Lean_Elab_Command_elabMacroRules(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__55; -lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_7__expandNotationAux___spec__3(lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__37; lean_object* l_Lean_Elab_Command_elabNoKindMacroRulesAux___closed__4; +lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__22; lean_object* l_Lean_Syntax_getId(lean_object*); lean_object* l_Lean_Elab_Command_elabMacroRulesAux___lambda__1___closed__7; lean_object* l_Lean_Elab_Command_adaptExpander(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Command_elabSyntax___closed__33; -extern lean_object* l_Lean_Parser_mkParserAttributeImpl___closed__1; extern lean_object* l_Lean_Parser_termParser___closed__2; lean_object* lean_name_mk_string(lean_object*, lean_object*); extern lean_object* l_Lean_choiceKind; -lean_object* l___private_Lean_Elab_Syntax_6__antiquote___boxed(lean_object*, lean_object*); lean_object* l_Array_iterateMAux___main___at___private_Lean_Elab_Syntax_1__mkParserSeq___spec__1___closed__4; lean_object* l_Lean_Elab_Command_elabNoKindMacroRulesAux___closed__1; lean_object* l_Lean_Elab_Term_throwError___rarg(lean_object*, lean_object*, lean_object*, lean_object*); @@ -278,27 +301,32 @@ extern lean_object* l___private_Lean_Elab_Term_5__expandCDot___main___closed__4; lean_object* l_Lean_Elab_Command_elabSyntax___closed__22; lean_object* l_Lean_Elab_Command_elabMacroRulesAux___closed__16; extern lean_object* l_Lean_Parser_Term_fun___elambda__1___closed__2; +extern lean_object* l_Lean_Parser_regTermParserAttribute___closed__2; lean_object* l___regBuiltin_Lean_Elab_Command_expandMacro(lean_object*); lean_object* l_Lean_Elab_Command_elabNoKindMacroRulesAux___closed__2; lean_object* l_Lean_Elab_Term_getCurrMacroScope(lean_object*, lean_object*); +lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__63; lean_object* l_Lean_Elab_Term_checkLeftRec___closed__2; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__91; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__78; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__22; lean_object* l_Lean_Elab_Command_throwError___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__24; lean_object* l_Lean_Elab_Command_elabNoKindMacroRulesAux___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l___private_Lean_Elab_Syntax_8__antiquote___main(lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__93; -lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__121; -lean_object* l_Lean_Elab_Command_elabSyntax___closed__28; +extern lean_object* l_Lean_numLitKind___closed__2; +lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__12; extern lean_object* l_Lean_Parser_Term_match__syntax___elambda__1___closed__1; lean_object* l_Lean_Elab_Command_mkKindName___closed__1; +lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__26; extern lean_object* l___private_Lean_Elab_Quotation_2__quoteSyntax___main___closed__44; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__89; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__47; lean_object* l_Lean_Elab_Term_toParserDescrAux___main(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabSyntax___closed__5; +lean_object* l___private_Lean_Elab_Syntax_7__elabKind___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabSyntax___closed__14; -lean_object* l_Lean_Elab_Command_elabSyntax___closed__30; lean_object* l_Nat_pred(lean_object*); extern lean_object* l_Lean_Parser_Syntax_char___elambda__1___closed__1; extern lean_object* l_Lean_Elab_Term_expandCDot_x3f___closed__2; @@ -306,6 +334,7 @@ extern lean_object* l_Lean_Parser_Command_attributes___elambda__1___closed__5; lean_object* l_Lean_Elab_Command_elabSyntax___closed__18; lean_object* l___regBuiltin_Lean_Elab_Command_elabMixfix(lean_object*); lean_object* l_Lean_Elab_Command_elabCommand___main(lean_object*, lean_object*, lean_object*); +lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__58; lean_object* l_Lean_Elab_Command_elabSyntax___closed__15; lean_object* l_Lean_Elab_Command_elabNoKindMacroRulesAux___closed__6; extern lean_object* l_Lean_Parser_Command_identPrec___elambda__1___closed__2; @@ -317,25 +346,29 @@ lean_object* l_Lean_Elab_Command_elabMacroRulesAux___lambda__1___closed__3; lean_object* l_Lean_Elab_Command_mkKindName___closed__2; extern lean_object* l_Lean_Elab_Term_elabArrow___lambda__1___closed__4; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__25; +lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabSyntax___closed__3; extern lean_object* l_Lean_Parser_Command_macroArgSimple___elambda__1___closed__2; extern lean_object* l_Lean_Parser_Term_tacticStxQuot___elambda__1___closed__2; extern lean_object* l_Lean_Parser_Syntax_sepBy___elambda__1___closed__1; +lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__42; extern lean_object* l___private_Lean_Elab_Util_4__regTraceClasses___closed__1; +extern lean_object* l___private_Lean_Parser_Parser_2__sepByFnAux___main___at_Lean_Parser_Term_matchAlts___elambda__1___spec__2___closed__1; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__52; lean_object* l_Array_iterateMAux___main___at_Array_append___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__37; lean_object* l_Array_iterateMAux___main___at___private_Lean_Elab_Syntax_1__mkParserSeq___spec__1___closed__6; extern lean_object* l_Lean_quotedSymbolKind; +lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__53; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__34; lean_object* l_Array_umapMAux___main___at_Lean_Elab_Command_expandMacro___spec__2(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_umapMAux___main___at_Lean_Elab_Command_expandMacro___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l___private_Lean_Elab_Syntax_6__antiquote___main___closed__2; lean_object* l_Lean_Elab_Command_elabMacroRulesAux___closed__11; extern lean_object* l_Lean_Parser_Command_declModifiers___elambda__1___closed__2; -lean_object* l_Lean_Elab_Command_elabSyntax___closed__35; lean_object* l_Lean_Elab_Command_expandMacroHeadIntoSyntaxItem___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Array_iterateMAux___main___at___private_Lean_Elab_Syntax_1__mkParserSeq___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__117; +lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__55; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__77; lean_object* l_Lean_addMacroScope(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_checkLeftRec___closed__5; @@ -345,6 +378,7 @@ lean_object* l___private_Lean_Elab_Command_2__getState(lean_object*, lean_object extern lean_object* l_Lean_String_HasQuote___closed__2; lean_object* l_Lean_Elab_Term_checkLeftRec___closed__6; extern lean_object* l_Lean_nullKind___closed__2; +lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__7; extern lean_object* l_Lean_Parser_Syntax_lookahead___elambda__1___closed__1; extern lean_object* l_Lean_Elab_Term_elabArrayLit___closed__10; extern lean_object* l_Lean_Parser_Syntax_sepBy1___elambda__1___closed__2; @@ -355,34 +389,37 @@ lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__7; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__71; extern lean_object* l_Lean_mkAppStx___closed__3; lean_object* l_Lean_Elab_Command_inferMacroRulesAltKind(lean_object*, lean_object*, lean_object*); +lean_object* l_Array_findIdxAux___main___at___private_Lean_Elab_Syntax_8__antiquote___main___spec__4___boxed(lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Name_hasMacroScopes___main(lean_object*); lean_object* l_Lean_Parser_registerParserCategory(lean_object*, lean_object*, lean_object*, uint8_t, lean_object*); lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__63; lean_object* l_Lean_Elab_Command_elabSyntax___closed__9; +lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__51; extern lean_object* l_Bool_HasRepr___closed__1; -lean_object* l___private_Lean_Elab_Syntax_7__expandNotationAux___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Syntax_inhabited; lean_object* l_Lean_Elab_Command_elabNoKindMacroRulesAux___closed__5; lean_object* l_Lean_Elab_Term_toParserDescrAux___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l___private_Lean_Elab_Quotation_8__letBindRhss___main___closed__17; extern lean_object* l___private_Lean_Elab_Quotation_8__letBindRhss___main___closed__11; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__102; +lean_object* l___private_Lean_Elab_Syntax_10__regTraceClasses___closed__1; lean_object* l_Lean_Elab_Command_elabSyntax___closed__4; lean_object* l_Lean_Elab_Command_elabReserve(lean_object*, lean_object*); lean_object* l_Lean_Name_appendAfter(lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__15; -lean_object* l_Lean_Elab_Command_elabSyntax___closed__27; +lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__19; extern lean_object* l_Lean_Parser_Syntax_lookahead___elambda__1___closed__2; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__90; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__76; -lean_object* l___private_Lean_Elab_Syntax_7__expandNotationAux___closed__1; extern lean_object* l_Lean_Elab_macroAttribute; lean_object* l_Lean_Elab_Command_elabSyntax___closed__17; lean_object* l_Lean_Syntax_setArg(lean_object*, lean_object*, lean_object*); lean_object* l_Array_iterateMAux___main___at___private_Lean_Elab_Syntax_1__mkParserSeq___spec__1___closed__8; +lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__39; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__18; lean_object* l_Lean_Elab_Command_elabNoKindMacroRulesAux___closed__3; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__3; +lean_object* l___private_Lean_Elab_Syntax_9__expandNotationAux___closed__4; extern lean_object* l_Lean_Parser_Syntax_sepBy1___elambda__1___closed__1; lean_object* l___private_Lean_Elab_Command_7__mkTermState(lean_object*); uint8_t l_Lean_Parser_isParserCategory(lean_object*, lean_object*); @@ -394,6 +431,7 @@ extern lean_object* l_Lean_Parser_Syntax_optional___elambda__1___closed__2; extern lean_object* l_Lean_Parser_Command_reserve___elambda__1___closed__2; lean_object* l_Lean_Elab_Command_elabSyntax___closed__8; lean_object* l_Lean_Elab_Command_elabNoKindMacroRulesAux___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__56; lean_object* l___regBuiltin_Lean_Elab_Command_expandNotation___closed__1; lean_object* l_Lean_Elab_Command_elabMacroRulesAux___closed__7; lean_object* l_Lean_Syntax_getArgs(lean_object*); @@ -401,18 +439,27 @@ lean_object* l_Lean_Elab_Term_checkLeftRec___closed__3; lean_object* l_Lean_Syntax_getKind(lean_object*); extern lean_object* l_Lean_Parser_Term_match__syntax___elambda__1___closed__2; lean_object* l_Lean_Elab_Command_elabMacroRulesAux___closed__24; +lean_object* l___private_Lean_Elab_Syntax_9__expandNotationAux___closed__1; lean_object* l_Array_findMAux___main___at_Lean_Elab_Command_elabMacroRulesAux___spec__1(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Syntax_atom___elambda__1___closed__2; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__48; +extern lean_object* l_Lean_Parser_Term_paren___elambda__1___closed__1; lean_object* l_Lean_Elab_Command_elabSyntax___closed__1; +lean_object* l___private_Lean_Elab_Syntax_9__expandNotationAux___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_checkLeftRec(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__111; +extern lean_object* l___private_Lean_Elab_Quotation_2__quoteSyntax___main___closed__28; +lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__32; +lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__10; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__97; +lean_object* l___private_Lean_Elab_Syntax_8__antiquote___main___closed__2; +lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__20; lean_object* l_Array_umapMAux___main___at_Lean_Elab_Command_expandMacro___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l___private_Lean_Elab_Syntax_7__expandNotationAux___closed__4; +lean_object* l___private_Lean_Elab_Syntax_9__expandNotationAux___closed__2; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__64; lean_object* l_Lean_Elab_Command_elabSyntax___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_toParserDescrAux___main___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__43; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__2; lean_object* l_Lean_Elab_Command_elabSyntax___closed__2; lean_object* l_Lean_Elab_Command_inferMacroRulesAltKind___boxed(lean_object*, lean_object*, lean_object*); @@ -427,59 +474,64 @@ lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__60; lean_object* l_Lean_mkStxStrLit(lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__110; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__80; +lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_9__expandNotationAux___spec__4(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_findMAux___main___at_Lean_Elab_Command_elabMacroRulesAux___spec__1___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_8__antiquote___main___spec__2___boxed(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Syntax_2__markAsTrailingParser(lean_object*, uint8_t, lean_object*); +lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__4; lean_object* l_Lean_Elab_Command_elabNoKindMacroRulesAux___closed__7; -lean_object* l___private_Lean_Elab_Syntax_5__elabKind___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_iterateMAux___main___at___private_Lean_Elab_Syntax_1__mkParserSeq___spec__1___closed__9; +lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_8__antiquote___main___spec__1___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabSyntax(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__69; lean_object* l_Lean_Elab_Command_elabSyntax___closed__21; +lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_8__antiquote___main___spec__3___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_expandNotationItemIntoPattern___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__57; extern lean_object* l_Lean_mkAppStx___closed__9; extern lean_object* l___private_Lean_Elab_Binders_11__expandFunBindersAux___main___closed__4; lean_object* l_Lean_Elab_Command_elabMacroRulesAux___closed__35; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__4; lean_object* l___private_Lean_Elab_Command_9__getVarDecls(lean_object*); +lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__17; lean_object* l_Array_mapSepElemsM___at_Lean_Elab_Command_elabMacroRulesAux___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_8__antiquote___main___spec__1(lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Syntax_isNone(lean_object*); lean_object* l_Lean_Elab_Command_elabNoKindMacroRulesAux___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_getEnv(lean_object*, lean_object*); +lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__8; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__27; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__17; -lean_object* l_Lean_Elab_Command_elabSyntax___closed__23; -lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_6__antiquote___main___spec__3(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabMacroRulesAux___closed__21; extern lean_object* l_Lean_mkOptionalNode___closed__1; extern lean_object* l_Lean_Parser_Term_matchAlt___closed__2; lean_object* l_Lean_Elab_Command_elabSyntax___closed__13; lean_object* l_Lean_Elab_Command_elabMacroRulesAux___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__57; -lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__122; -lean_object* l_Lean_Elab_Command_elabSyntax___closed__34; lean_object* l_Lean_Elab_Term_expandOptPrecedence(lean_object*); lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__94; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__8; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__65; -lean_object* l___private_Lean_Elab_Syntax_6__antiquote(lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__109; uint8_t l_Lean_Syntax_isOfKind(lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__62; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__54; +lean_object* l___private_Lean_Elab_Syntax_5__getCatSuffix___boxed(lean_object*); lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__119; +lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_9__expandNotationAux___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_iterateMAux___main___at___private_Lean_Elab_Syntax_1__mkParserSeq___spec__1___closed__1; extern lean_object* l_Lean_Parser_Command_macro___elambda__1___closed__1; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__29; -lean_object* l___private_Lean_Elab_Syntax_7__expandNotationAux___closed__2; lean_object* l_Lean_Elab_Term_elabBinders___rarg(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_7__expandNotationAux___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Array_filterAux___main___at___private_Lean_Elab_Syntax_9__expandNotationAux___spec__2(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Term_stxQuot___elambda__1___closed__3; lean_object* l_Array_iterateMAux___main___at___private_Lean_Elab_Syntax_1__mkParserSeq___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__84; lean_object* l_Lean_Elab_Command_setEnv(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Syntax_2__markAsTrailingParser___rarg___closed__1; -lean_object* l_Array_filterAux___main___at___private_Lean_Elab_Syntax_7__expandNotationAux___spec__2(lean_object*, lean_object*, lean_object*); +lean_object* l___private_Lean_Elab_Syntax_8__antiquote(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabReserve___boxed(lean_object*, lean_object*); +extern lean_object* l_Lean_nameLitKind___closed__2; lean_object* l_Lean_Elab_Term_checkLeftRec___closed__7; lean_object* l_Lean_Elab_Command_elabMacroRulesAux___boxed(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Command_syntaxCat___elambda__1___closed__2; @@ -487,11 +539,11 @@ lean_object* lean_mk_syntax_ident(lean_object*); lean_object* l_Lean_mkStxLit(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__50; lean_object* l_Lean_Syntax_getArg(lean_object*, lean_object*); +lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__11; lean_object* l___regBuiltin_Lean_Elab_Command_elabMixfix___closed__1; lean_object* l_Lean_Elab_Command_elabMacroRulesAux(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__6; extern lean_object* l_Lean_mkOptionalNode___closed__2; -lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_6__antiquote___main___spec__1___boxed(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Command_optDeclSig___elambda__1___closed__2; lean_object* l_Lean_Elab_Command_elabMacroRulesAux___closed__19; lean_object* lean_nat_mod(lean_object*, lean_object*); @@ -499,13 +551,13 @@ lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__99; extern lean_object* l_Lean_Parser_Term_typeSpec___elambda__1___closed__2; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__11; extern lean_object* l_Lean_Meta_DiscrTree_Trie_format___main___rarg___closed__1; +lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__23; lean_object* l___regBuiltin_Lean_Elab_Command_elabMacroRules___closed__1; lean_object* l_Lean_Elab_Command_mkFreshKind(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Syntax_2__markAsTrailingParser___rarg(lean_object*); lean_object* l_Lean_Elab_Command_elabMixfix(lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Syntax_4__withoutLeftRec(lean_object*); -lean_object* l_Array_findIdxAux___main___at___private_Lean_Elab_Syntax_6__antiquote___main___spec__4___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l___private_Lean_Elab_Syntax_6__antiquote___main___boxed(lean_object*, lean_object*); +lean_object* l___private_Lean_Elab_Syntax_9__expandNotationAux___closed__6; lean_object* l_Lean_Elab_Command_mkKindName(lean_object*); lean_object* l_unsafeCast(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_expandMacroHeadIntoSyntaxItem(lean_object*, lean_object*, lean_object*); @@ -519,22 +571,27 @@ lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__21; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__38; extern lean_object* l_Lean_Parser_Command_macro___elambda__1___closed__2; lean_object* l_Lean_Elab_Command_elabSyntax___closed__12; -lean_object* l___private_Lean_Elab_Syntax_6__antiquote___main___closed__1; +lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__61; extern lean_object* l_Lean_Elab_Term_elabArrow___lambda__1___closed__3; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__88; extern lean_object* l_Lean_Parser_Syntax_sepBy___elambda__1___closed__2; -lean_object* l_Lean_Elab_Command_elabSyntax___closed__26; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__107; lean_object* l_Lean_Elab_Command_expandMacroHeadIntoPattern___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__72; +lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__41; +lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__13; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__96; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__13; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__41; extern lean_object* l_Lean_mkAppStx___closed__2; +extern lean_object* l_String_Inhabited; +extern lean_object* l_Lean_Parser_Syntax_cat___elambda__1___closed__1; extern lean_object* l_Lean_Parser_mkParserOfConstantUnsafe___closed__3; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__23; +lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_9__expandNotationAux___spec__3(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabMacroRulesAux___closed__2; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__44; +extern lean_object* l_Lean_Elab_Command_elabEvalUnsafe___lambda__1___closed__2; lean_object* l___private_Lean_Elab_Syntax_1__mkParserSeq___boxed(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Command_syntax___elambda__1___closed__1; lean_object* l_Lean_Elab_Command_expandNotationItemIntoSyntaxItem(lean_object*, lean_object*, lean_object*); @@ -543,6 +600,8 @@ extern lean_object* l_Lean_Parser_mkAntiquot___closed__2; extern lean_object* l_Lean_Elab_Command_liftTermElabM___rarg___closed__1; extern lean_object* l_Lean_Parser_Term_orelse___elambda__1___closed__1; lean_object* l_Lean_Elab_Command_elabMacroRulesAux___closed__12; +lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__31; +lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__59; lean_object* l_Lean_Elab_Command_expandMacroArgIntoSyntaxItem___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabDeclareSyntaxCat(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Syntax_try___elambda__1___closed__2; @@ -551,20 +610,23 @@ lean_object* l___regBuiltin_Lean_Elab_Command_elabDeclareSyntaxCat(lean_object*) lean_object* l_Lean_Elab_Command_elabMacroRulesAux___closed__17; lean_object* l_Lean_Elab_Command_elabMacroRulesAux___closed__4; extern lean_object* l_Lean_Parser_Term_char___elambda__1___closed__1; +lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__27; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__113; lean_object* l_Lean_Elab_Command_expandNotation(lean_object*, lean_object*, lean_object*); lean_object* l_Array_umapMAux___main___at_Lean_Elab_Command_expandMacro___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Command_elabSyntax___closed__31; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__31; lean_object* l___regBuiltin_Lean_Elab_Command_elabSyntax___closed__1; uint8_t lean_string_dec_eq(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabMacroRulesAux___closed__8; +lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__40; uint8_t lean_nat_dec_lt(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_expandNotationItemIntoSyntaxItem___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__9; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__59; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__82; uint8_t l_Lean_Syntax_isIdent(lean_object*); extern lean_object* l_Lean_Parser_Command_declId___elambda__1___closed__2; +lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__45; lean_object* l_Lean_Elab_Command_logTrace(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* _init_l_Lean_Elab_Term_expandOptPrecedence___closed__1() { _start: @@ -2601,8 +2663,10 @@ _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); -x_2 = l_Lean_Expr_isSyntheticSorry___closed__1; -x_3 = lean_name_mk_string(x_1, x_2); +x_2 = l_Lean_Elab_Command_elabEvalUnsafe___lambda__1___closed__2; +x_3 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_3, 0, x_2); +lean_ctor_set(x_3, 1, x_1); return x_3; } } @@ -2610,60 +2674,38 @@ lean_object* _init_l_Lean_Elab_Term_toParserDescrAux___main___closed__107() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Elab_Term_toParserDescrAux___main___closed__106; -x_2 = l_Bool_HasRepr___closed__1; -x_3 = lean_name_mk_string(x_1, x_2); -return x_3; -} -} -lean_object* _init_l_Lean_Elab_Term_toParserDescrAux___main___closed__108() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); -x_2 = l_Lean_Elab_Term_toParserDescrAux___main___closed__107; -x_3 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_3, 0, x_2); -lean_ctor_set(x_3, 1, x_1); -return x_3; -} -} -lean_object* _init_l_Lean_Elab_Term_toParserDescrAux___main___closed__109() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = lean_box(0); -x_2 = l_Lean_Elab_Term_toParserDescrAux___main___closed__108; +x_2 = l_Lean_Elab_Term_toParserDescrAux___main___closed__106; x_3 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_3, 0, x_2); lean_ctor_set(x_3, 1, x_1); return x_3; } } -lean_object* _init_l_Lean_Elab_Term_toParserDescrAux___main___closed__110() { +lean_object* _init_l_Lean_Elab_Term_toParserDescrAux___main___closed__108() { _start: { lean_object* x_1; -x_1 = lean_mk_string("ParserDescr.parser"); +x_1 = lean_mk_string("ParserDescr.cat"); return x_1; } } -lean_object* _init_l_Lean_Elab_Term_toParserDescrAux___main___closed__111() { +lean_object* _init_l_Lean_Elab_Term_toParserDescrAux___main___closed__109() { _start: { lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Elab_Term_toParserDescrAux___main___closed__110; +x_1 = l_Lean_Elab_Term_toParserDescrAux___main___closed__108; x_2 = lean_string_utf8_byte_size(x_1); return x_2; } } -lean_object* _init_l_Lean_Elab_Term_toParserDescrAux___main___closed__112() { +lean_object* _init_l_Lean_Elab_Term_toParserDescrAux___main___closed__110() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; -x_1 = l_Lean_Elab_Term_toParserDescrAux___main___closed__110; +x_1 = l_Lean_Elab_Term_toParserDescrAux___main___closed__108; x_2 = lean_unsigned_to_nat(0u); -x_3 = l_Lean_Elab_Term_toParserDescrAux___main___closed__111; +x_3 = l_Lean_Elab_Term_toParserDescrAux___main___closed__109; x_4 = lean_alloc_ctor(0, 3, 0); lean_ctor_set(x_4, 0, x_1); lean_ctor_set(x_4, 1, x_2); @@ -2671,51 +2713,51 @@ lean_ctor_set(x_4, 2, x_3); return x_4; } } -lean_object* _init_l_Lean_Elab_Term_toParserDescrAux___main___closed__113() { +lean_object* _init_l_Lean_Elab_Term_toParserDescrAux___main___closed__111() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Array_iterateMAux___main___at___private_Lean_Elab_Syntax_1__mkParserSeq___spec__1___closed__4; -x_2 = l_Lean_Parser_mkParserAttributeImpl___closed__1; +x_2 = l_Lean_Parser_Syntax_cat___elambda__1___closed__1; x_3 = lean_name_mk_string(x_1, x_2); return x_3; } } +lean_object* _init_l_Lean_Elab_Term_toParserDescrAux___main___closed__112() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Array_iterateMAux___main___at___private_Lean_Elab_Syntax_1__mkParserSeq___spec__1___closed__6; +x_2 = l_Lean_Parser_Syntax_cat___elambda__1___closed__1; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_Elab_Term_toParserDescrAux___main___closed__113() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_Elab_Term_toParserDescrAux___main___closed__112; +x_3 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_3, 0, x_2); +lean_ctor_set(x_3, 1, x_1); +return x_3; +} +} lean_object* _init_l_Lean_Elab_Term_toParserDescrAux___main___closed__114() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Array_iterateMAux___main___at___private_Lean_Elab_Syntax_1__mkParserSeq___spec__1___closed__6; -x_2 = l_Lean_Parser_mkParserAttributeImpl___closed__1; -x_3 = lean_name_mk_string(x_1, x_2); -return x_3; -} -} -lean_object* _init_l_Lean_Elab_Term_toParserDescrAux___main___closed__115() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); -x_2 = l_Lean_Elab_Term_toParserDescrAux___main___closed__114; -x_3 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_3, 0, x_2); -lean_ctor_set(x_3, 1, x_1); -return x_3; -} -} -lean_object* _init_l_Lean_Elab_Term_toParserDescrAux___main___closed__116() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = lean_box(0); -x_2 = l_Lean_Elab_Term_toParserDescrAux___main___closed__115; +x_2 = l_Lean_Elab_Term_toParserDescrAux___main___closed__113; x_3 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_3, 0, x_2); lean_ctor_set(x_3, 1, x_1); return x_3; } } -lean_object* _init_l_Lean_Elab_Term_toParserDescrAux___main___closed__117() { +lean_object* _init_l_Lean_Elab_Term_toParserDescrAux___main___closed__115() { _start: { lean_object* x_1; @@ -2723,27 +2765,27 @@ x_1 = lean_mk_string("unknown category '"); return x_1; } } -lean_object* _init_l_Lean_Elab_Term_toParserDescrAux___main___closed__118() { +lean_object* _init_l_Lean_Elab_Term_toParserDescrAux___main___closed__116() { _start: { lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Elab_Term_toParserDescrAux___main___closed__117; +x_1 = l_Lean_Elab_Term_toParserDescrAux___main___closed__115; x_2 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; } } -lean_object* _init_l_Lean_Elab_Term_toParserDescrAux___main___closed__119() { +lean_object* _init_l_Lean_Elab_Term_toParserDescrAux___main___closed__117() { _start: { lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Elab_Term_toParserDescrAux___main___closed__118; +x_1 = l_Lean_Elab_Term_toParserDescrAux___main___closed__116; x_2 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; } } -lean_object* _init_l_Lean_Elab_Term_toParserDescrAux___main___closed__120() { +lean_object* _init_l_Lean_Elab_Term_toParserDescrAux___main___closed__118() { _start: { lean_object* x_1; @@ -2751,21 +2793,21 @@ x_1 = lean_mk_string("invalid atomic left recursive syntax"); return x_1; } } -lean_object* _init_l_Lean_Elab_Term_toParserDescrAux___main___closed__121() { +lean_object* _init_l_Lean_Elab_Term_toParserDescrAux___main___closed__119() { _start: { lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Elab_Term_toParserDescrAux___main___closed__120; +x_1 = l_Lean_Elab_Term_toParserDescrAux___main___closed__118; x_2 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; } } -lean_object* _init_l_Lean_Elab_Term_toParserDescrAux___main___closed__122() { +lean_object* _init_l_Lean_Elab_Term_toParserDescrAux___main___closed__120() { _start: { lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Elab_Term_toParserDescrAux___main___closed__121; +x_1 = l_Lean_Elab_Term_toParserDescrAux___main___closed__119; x_2 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; @@ -6451,7 +6493,7 @@ x_1441 = lean_array_push(x_1429, x_1440); x_1442 = l_Lean_Elab_Term_toParserDescrAux___main___closed__105; x_1443 = l_Lean_addMacroScope(x_1422, x_1442, x_1418); x_1444 = l_Lean_Elab_Term_toParserDescrAux___main___closed__104; -x_1445 = l_Lean_Elab_Term_toParserDescrAux___main___closed__109; +x_1445 = l_Lean_Elab_Term_toParserDescrAux___main___closed__107; x_1446 = lean_alloc_ctor(3, 4, 0); lean_ctor_set(x_1446, 0, x_1425); lean_ctor_set(x_1446, 1, x_1444); @@ -6519,7 +6561,7 @@ x_1478 = lean_array_push(x_1466, x_1477); x_1479 = l_Lean_Elab_Term_toParserDescrAux___main___closed__105; x_1480 = l_Lean_addMacroScope(x_1458, x_1479, x_1418); x_1481 = l_Lean_Elab_Term_toParserDescrAux___main___closed__104; -x_1482 = l_Lean_Elab_Term_toParserDescrAux___main___closed__109; +x_1482 = l_Lean_Elab_Term_toParserDescrAux___main___closed__107; x_1483 = lean_alloc_ctor(3, 4, 0); lean_ctor_set(x_1483, 0, x_1462); lean_ctor_set(x_1483, 1, x_1481); @@ -6589,7 +6631,7 @@ else { lean_object* x_1640; lean_object* x_1641; uint8_t x_1642; lean_dec(x_1498); -x_1640 = l_Lean_Elab_Term_toParserDescrAux___main___closed__122; +x_1640 = l_Lean_Elab_Term_toParserDescrAux___main___closed__120; x_1641 = l_Lean_Elab_Term_throwError___rarg(x_1, x_1640, x_4, x_5); lean_dec(x_1); x_1642 = !lean_is_exclusive(x_1641); @@ -6671,7 +6713,7 @@ x_1613 = l_Lean_Syntax_getArg(x_1, x_1612); lean_dec(x_1); x_1614 = lean_alloc_ctor(4, 1, 0); lean_ctor_set(x_1614, 0, x_1498); -x_1615 = l_Lean_Elab_Term_toParserDescrAux___main___closed__119; +x_1615 = l_Lean_Elab_Term_toParserDescrAux___main___closed__117; x_1616 = lean_alloc_ctor(9, 2, 0); lean_ctor_set(x_1616, 0, x_1615); lean_ctor_set(x_1616, 1, x_1614); @@ -6733,11 +6775,11 @@ if (x_1514 == 0) { lean_object* x_1515; lean_object* x_1516; lean_object* x_1517; lean_object* x_1518; lean_object* x_1519; lean_object* x_1520; lean_object* x_1521; lean_object* x_1522; lean_object* x_1523; lean_object* x_1524; lean_object* x_1525; lean_object* x_1526; lean_object* x_1527; lean_object* x_1528; lean_object* x_1529; lean_object* x_1530; lean_object* x_1531; lean_object* x_1532; lean_object* x_1533; lean_object* x_1534; lean_object* x_1535; lean_object* x_1536; lean_object* x_1537; lean_object* x_1538; lean_object* x_1539; lean_object* x_1540; lean_object* x_1541; lean_object* x_1542; lean_object* x_1543; x_1515 = lean_ctor_get(x_1513, 0); -x_1516 = l_Lean_Elab_Term_toParserDescrAux___main___closed__113; +x_1516 = l_Lean_Elab_Term_toParserDescrAux___main___closed__111; x_1517 = l_Lean_addMacroScope(x_1515, x_1516, x_1512); x_1518 = l_Lean_SourceInfo_inhabited___closed__1; -x_1519 = l_Lean_Elab_Term_toParserDescrAux___main___closed__112; -x_1520 = l_Lean_Elab_Term_toParserDescrAux___main___closed__116; +x_1519 = l_Lean_Elab_Term_toParserDescrAux___main___closed__110; +x_1520 = l_Lean_Elab_Term_toParserDescrAux___main___closed__114; x_1521 = lean_alloc_ctor(3, 4, 0); lean_ctor_set(x_1521, 0, x_1518); lean_ctor_set(x_1521, 1, x_1519); @@ -6785,11 +6827,11 @@ x_1545 = lean_ctor_get(x_1513, 1); lean_inc(x_1545); lean_inc(x_1544); lean_dec(x_1513); -x_1546 = l_Lean_Elab_Term_toParserDescrAux___main___closed__113; +x_1546 = l_Lean_Elab_Term_toParserDescrAux___main___closed__111; x_1547 = l_Lean_addMacroScope(x_1544, x_1546, x_1512); x_1548 = l_Lean_SourceInfo_inhabited___closed__1; -x_1549 = l_Lean_Elab_Term_toParserDescrAux___main___closed__112; -x_1550 = l_Lean_Elab_Term_toParserDescrAux___main___closed__116; +x_1549 = l_Lean_Elab_Term_toParserDescrAux___main___closed__110; +x_1550 = l_Lean_Elab_Term_toParserDescrAux___main___closed__114; x_1551 = lean_alloc_ctor(3, 4, 0); lean_ctor_set(x_1551, 0, x_1548); lean_ctor_set(x_1551, 1, x_1549); @@ -6853,11 +6895,11 @@ if (lean_is_exclusive(x_1577)) { lean_dec_ref(x_1577); x_1580 = lean_box(0); } -x_1581 = l_Lean_Elab_Term_toParserDescrAux___main___closed__113; +x_1581 = l_Lean_Elab_Term_toParserDescrAux___main___closed__111; x_1582 = l_Lean_addMacroScope(x_1578, x_1581, x_1575); x_1583 = l_Lean_SourceInfo_inhabited___closed__1; -x_1584 = l_Lean_Elab_Term_toParserDescrAux___main___closed__112; -x_1585 = l_Lean_Elab_Term_toParserDescrAux___main___closed__116; +x_1584 = l_Lean_Elab_Term_toParserDescrAux___main___closed__110; +x_1585 = l_Lean_Elab_Term_toParserDescrAux___main___closed__114; x_1586 = lean_alloc_ctor(3, 4, 0); lean_ctor_set(x_1586, 0, x_1583); lean_ctor_set(x_1586, 1, x_1584); @@ -7331,7 +7373,7 @@ lean_object* x_1738; lean_object* x_1739; uint8_t x_1740; lean_dec(x_1703); lean_dec(x_1697); lean_dec(x_2); -x_1738 = l_Lean_Elab_Term_toParserDescrAux___main___closed__122; +x_1738 = l_Lean_Elab_Term_toParserDescrAux___main___closed__120; x_1739 = l_Lean_Elab_Term_throwError___rarg(x_1, x_1738, x_4, x_1696); lean_dec(x_1); x_1740 = !lean_is_exclusive(x_1739); @@ -7447,6 +7489,1075 @@ x_12 = l_Lean_Elab_Term_toParserDescrAux___main(x_1, x_10, x_11, x_3, x_7); return x_12; } } +lean_object* l___private_Lean_Elab_Syntax_5__getCatSuffix(lean_object* x_1) { +_start: +{ +if (lean_obj_tag(x_1) == 1) +{ +lean_object* x_2; +x_2 = lean_ctor_get(x_1, 1); +lean_inc(x_2); +return x_2; +} +else +{ +lean_object* x_3; lean_object* x_4; +x_3 = l_String_Inhabited; +x_4 = l_unreachable_x21___rarg(x_3); +return x_4; +} +} +} +lean_object* l___private_Lean_Elab_Syntax_5__getCatSuffix___boxed(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = l___private_Lean_Elab_Syntax_5__getCatSuffix(x_1); +lean_dec(x_1); +return x_2; +} +} +lean_object* _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__1() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Array_empty___closed__1; +x_2 = l___private_Lean_Elab_Term_5__expandCDot___main___closed__4; +x_3 = lean_array_push(x_1, x_2); +return x_3; +} +} +lean_object* _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_SourceInfo_inhabited___closed__1; +x_2 = l_Lean_Parser_Command_attributes___elambda__1___closed__5; +x_3 = lean_alloc_ctor(2, 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___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__3() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Array_empty___closed__1; +x_2 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__2; +x_3 = lean_array_push(x_1, x_2); +return x_3; +} +} +lean_object* _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__4() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Parser_regTermParserAttribute___closed__1; +x_2 = lean_string_utf8_byte_size(x_1); +return x_2; +} +} +lean_object* _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__5() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_1 = l_Lean_Parser_regTermParserAttribute___closed__1; +x_2 = lean_unsigned_to_nat(0u); +x_3 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__4; +x_4 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_4, 0, x_1); +lean_ctor_set(x_4, 1, x_2); +lean_ctor_set(x_4, 2, x_3); +return x_4; +} +} +lean_object* _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__6() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_SourceInfo_inhabited___closed__1; +x_2 = l_Lean_Parser_Command_def___elambda__1___closed__1; +x_3 = lean_alloc_ctor(2, 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___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__7() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Array_empty___closed__1; +x_2 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__6; +x_3 = lean_array_push(x_1, x_2); +return x_3; +} +} +lean_object* _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__8() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("catStxQuot"); +return x_1; +} +} +lean_object* _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__9() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__8; +x_2 = lean_string_utf8_byte_size(x_1); +return x_2; +} +} +lean_object* _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__10() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_1 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__8; +x_2 = lean_unsigned_to_nat(0u); +x_3 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__9; +x_4 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_4, 0, x_1); +lean_ctor_set(x_4, 1, x_2); +lean_ctor_set(x_4, 2, x_3); +return x_4; +} +} +lean_object* _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__11() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__8; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +lean_object* _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__12() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("Lean.ParserDescr"); +return x_1; +} +} +lean_object* _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__13() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__12; +x_2 = lean_string_utf8_byte_size(x_1); +return x_2; +} +} +lean_object* _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__14() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_1 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__12; +x_2 = lean_unsigned_to_nat(0u); +x_3 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__13; +x_4 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_4, 0, x_1); +lean_ctor_set(x_4, 1, x_2); +lean_ctor_set(x_4, 2, x_3); +return x_4; +} +} +lean_object* _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__15() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Array_iterateMAux___main___at___private_Lean_Elab_Syntax_1__mkParserSeq___spec__1___closed__6; +x_3 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_3, 0, x_2); +lean_ctor_set(x_3, 1, x_1); +return x_3; +} +} +lean_object* _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__16() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__15; +x_3 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_3, 0, x_2); +lean_ctor_set(x_3, 1, x_1); +return x_3; +} +} +lean_object* _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__17() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Array_empty___closed__1; +x_2 = l___private_Lean_Elab_Quotation_4__getHeadInfo___elambda__3___closed__4; +x_3 = lean_array_push(x_1, x_2); +return x_3; +} +} +lean_object* _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__18() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("Lean.ParserDescr.node"); +return x_1; +} +} +lean_object* _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__19() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__18; +x_2 = lean_string_utf8_byte_size(x_1); +return x_2; +} +} +lean_object* _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__20() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_1 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__18; +x_2 = lean_unsigned_to_nat(0u); +x_3 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__19; +x_4 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_4, 0, x_1); +lean_ctor_set(x_4, 1, x_2); +lean_ctor_set(x_4, 2, x_3); +return x_4; +} +} +lean_object* _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__21() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Array_iterateMAux___main___at___private_Lean_Elab_Syntax_1__mkParserSeq___spec__1___closed__6; +x_2 = l_Lean_Meta_DiscrTree_Trie_format___main___rarg___closed__1; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +lean_object* _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__22() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__21; +x_3 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_3, 0, x_2); +lean_ctor_set(x_3, 1, x_1); +return x_3; +} +} +lean_object* _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__23() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__22; +x_3 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_3, 0, x_2); +lean_ctor_set(x_3, 1, x_1); +return x_3; +} +} +lean_object* _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__24() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("`Lean.Parser.Term.stxQuot"); +return x_1; +} +} +lean_object* _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__25() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_SourceInfo_inhabited___closed__1; +x_2 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__24; +x_3 = lean_alloc_ctor(2, 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___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__26() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Array_empty___closed__1; +x_2 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__25; +x_3 = lean_array_push(x_1, x_2); +return x_3; +} +} +lean_object* _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__27() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_nameLitKind___closed__2; +x_2 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__26; +x_3 = lean_alloc_ctor(1, 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___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__28() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Array_empty___closed__1; +x_2 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__27; +x_3 = lean_array_push(x_1, x_2); +return x_3; +} +} +lean_object* _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__29() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Parser_Term_quotedName___elambda__1___closed__2; +x_2 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__28; +x_3 = lean_alloc_ctor(1, 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___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__30() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Array_empty___closed__1; +x_2 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__29; +x_3 = lean_array_push(x_1, x_2); +return x_3; +} +} +lean_object* _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__31() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Parser_maxPrec; +x_2 = l_Nat_repr(x_1); +return x_2; +} +} +lean_object* _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__32() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_1 = l_Lean_numLitKind; +x_2 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__31; +x_3 = l_Lean_SourceInfo_inhabited___closed__1; +x_4 = l_Lean_mkStxLit(x_1, x_2, x_3); +return x_4; +} +} +lean_object* _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__33() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_mkOptionalNode___closed__2; +x_2 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__32; +x_3 = lean_array_push(x_1, x_2); +return x_3; +} +} +lean_object* _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__34() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Nat_HasQuote___closed__2; +x_2 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__33; +x_3 = lean_alloc_ctor(1, 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___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__35() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__30; +x_2 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__34; +x_3 = lean_array_push(x_1, x_2); +return x_3; +} +} +lean_object* _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__36() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("Lean.ParserDescr.andthen"); +return x_1; +} +} +lean_object* _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__37() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__36; +x_2 = lean_string_utf8_byte_size(x_1); +return x_2; +} +} +lean_object* _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__38() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_1 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__36; +x_2 = lean_unsigned_to_nat(0u); +x_3 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__37; +x_4 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_4, 0, x_1); +lean_ctor_set(x_4, 1, x_2); +lean_ctor_set(x_4, 2, x_3); +return x_4; +} +} +lean_object* _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__39() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Array_iterateMAux___main___at___private_Lean_Elab_Syntax_1__mkParserSeq___spec__1___closed__7; +x_3 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_3, 0, x_2); +lean_ctor_set(x_3, 1, x_1); +return x_3; +} +} +lean_object* _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__40() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__39; +x_3 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_3, 0, x_2); +lean_ctor_set(x_3, 1, x_1); +return x_3; +} +} +lean_object* _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__41() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("Lean.ParserDescr.symbol"); +return x_1; +} +} +lean_object* _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__42() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__41; +x_2 = lean_string_utf8_byte_size(x_1); +return x_2; +} +} +lean_object* _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__43() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_1 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__41; +x_2 = lean_unsigned_to_nat(0u); +x_3 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__42; +x_4 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_4, 0, x_1); +lean_ctor_set(x_4, 1, x_2); +lean_ctor_set(x_4, 2, x_3); +return x_4; +} +} +lean_object* _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__44() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_Elab_Term_toParserDescrAux___main___closed__92; +x_3 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_3, 0, x_2); +lean_ctor_set(x_3, 1, x_1); +return x_3; +} +} +lean_object* _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__45() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__44; +x_3 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_3, 0, x_2); +lean_ctor_set(x_3, 1, x_1); +return x_3; +} +} +lean_object* _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__46() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("Lean.ParserDescr.cat"); +return x_1; +} +} +lean_object* _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__47() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__46; +x_2 = lean_string_utf8_byte_size(x_1); +return x_2; +} +} +lean_object* _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__48() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_1 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__46; +x_2 = lean_unsigned_to_nat(0u); +x_3 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__47; +x_4 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_4, 0, x_1); +lean_ctor_set(x_4, 1, x_2); +lean_ctor_set(x_4, 2, x_3); +return x_4; +} +} +lean_object* _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__49() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_Elab_Term_toParserDescrAux___main___closed__112; +x_3 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_3, 0, x_2); +lean_ctor_set(x_3, 1, x_1); +return x_3; +} +} +lean_object* _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__50() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__49; +x_3 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_3, 0, x_2); +lean_ctor_set(x_3, 1, x_1); +return x_3; +} +} +lean_object* _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__51() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("0"); +return x_1; +} +} +lean_object* _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__52() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_SourceInfo_inhabited___closed__1; +x_2 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__51; +x_3 = lean_alloc_ctor(2, 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___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__53() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Array_empty___closed__1; +x_2 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__52; +x_3 = lean_array_push(x_1, x_2); +return x_3; +} +} +lean_object* _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__54() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_numLitKind___closed__2; +x_2 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__53; +x_3 = lean_alloc_ctor(1, 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___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__55() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Array_empty___closed__1; +x_2 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__54; +x_3 = lean_array_push(x_1, x_2); +return x_3; +} +} +lean_object* _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__56() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Nat_HasQuote___closed__2; +x_2 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__55; +x_3 = lean_alloc_ctor(1, 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___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__57() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("\")\""); +return x_1; +} +} +lean_object* _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__58() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_SourceInfo_inhabited___closed__1; +x_2 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__57; +x_3 = lean_alloc_ctor(2, 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___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__59() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Array_empty___closed__1; +x_2 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__58; +x_3 = lean_array_push(x_1, x_2); +return x_3; +} +} +lean_object* _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__60() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_strLitKind___closed__2; +x_2 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__59; +x_3 = lean_alloc_ctor(1, 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___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__61() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Array_empty___closed__1; +x_2 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__60; +x_3 = lean_array_push(x_1, x_2); +return x_3; +} +} +lean_object* _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__62() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_String_HasQuote___closed__2; +x_2 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__61; +x_3 = lean_alloc_ctor(1, 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___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__63() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Array_empty___closed__1; +x_2 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__62; +x_3 = lean_array_push(x_1, x_2); +return x_3; +} +} +lean_object* _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__64() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_nullKind___closed__2; +x_2 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__63; +x_3 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_3, 0, x_1); +lean_ctor_set(x_3, 1, x_2); +return x_3; +} +} +lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; +x_4 = l___private_Lean_Elab_Syntax_5__getCatSuffix(x_1); +x_5 = l_Lean_Parser_Term_stxQuot___elambda__1___closed__3; +x_6 = lean_string_append(x_5, x_4); +lean_dec(x_4); +x_7 = l___private_Lean_Parser_Parser_2__sepByFnAux___main___at_Lean_Parser_Term_matchAlts___elambda__1___spec__2___closed__1; +x_8 = lean_string_append(x_6, x_7); +x_9 = l_Lean_Elab_Command_getCurrMacroScope(x_2, x_3); +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); +lean_inc(x_2); +x_12 = l_Lean_Elab_Command_getMainModule(x_2, x_11); +if (lean_obj_tag(x_12) == 0) +{ +lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_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; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; 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; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; 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; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; 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; 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_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; lean_object* x_116; lean_object* x_117; lean_object* x_118; lean_object* x_119; lean_object* x_120; lean_object* x_121; lean_object* x_122; lean_object* x_123; lean_object* x_124; lean_object* x_125; lean_object* x_126; lean_object* x_127; lean_object* x_128; 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; lean_object* x_145; lean_object* x_146; lean_object* x_147; lean_object* x_148; lean_object* x_149; 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; 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_object* x_172; lean_object* x_173; lean_object* x_174; lean_object* x_175; lean_object* x_176; lean_object* x_177; lean_object* x_178; lean_object* x_179; lean_object* x_180; lean_object* x_181; lean_object* x_182; lean_object* x_183; lean_object* x_184; lean_object* x_185; lean_object* x_186; lean_object* x_187; lean_object* x_188; lean_object* x_189; lean_object* x_190; +x_13 = lean_ctor_get(x_12, 0); +lean_inc(x_13); +x_14 = lean_ctor_get(x_12, 1); +lean_inc(x_14); +lean_dec(x_12); +x_15 = l_Lean_Parser_regTermParserAttribute___closed__2; +lean_inc(x_10); +lean_inc(x_13); +x_16 = l_Lean_addMacroScope(x_13, x_15, x_10); +x_17 = lean_box(0); +x_18 = l_Lean_SourceInfo_inhabited___closed__1; +x_19 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__5; +x_20 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_20, 0, x_18); +lean_ctor_set(x_20, 1, x_19); +lean_ctor_set(x_20, 2, x_16); +lean_ctor_set(x_20, 3, x_17); +x_21 = l_Array_empty___closed__1; +x_22 = lean_array_push(x_21, x_20); +x_23 = l___private_Lean_Elab_Term_5__expandCDot___main___closed__4; +x_24 = lean_array_push(x_22, x_23); +x_25 = l_Lean_Parser_Command_attrInstance___elambda__1___closed__2; +x_26 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_26, 0, x_25); +lean_ctor_set(x_26, 1, x_24); +x_27 = lean_array_push(x_21, x_26); +x_28 = l_Lean_nullKind___closed__2; +x_29 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_29, 0, x_28); +lean_ctor_set(x_29, 1, x_27); +x_30 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__3; +x_31 = lean_array_push(x_30, x_29); +x_32 = l_Lean_Elab_Term_elabArrayLit___closed__11; +x_33 = lean_array_push(x_31, x_32); +x_34 = l_Lean_Parser_Command_attributes___elambda__1___closed__2; +x_35 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_35, 0, x_34); +lean_ctor_set(x_35, 1, x_33); +x_36 = lean_array_push(x_21, x_35); +x_37 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_37, 0, x_28); +lean_ctor_set(x_37, 1, x_36); +x_38 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__1; +x_39 = lean_array_push(x_38, x_37); +x_40 = lean_array_push(x_39, x_23); +x_41 = lean_array_push(x_40, x_23); +x_42 = lean_array_push(x_41, x_23); +x_43 = lean_array_push(x_42, x_23); +x_44 = l_Lean_Parser_Command_declModifiers___elambda__1___closed__2; +x_45 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_45, 0, x_44); +lean_ctor_set(x_45, 1, x_43); +x_46 = lean_array_push(x_21, x_45); +x_47 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__11; +lean_inc(x_10); +lean_inc(x_13); +x_48 = l_Lean_addMacroScope(x_13, x_47, x_10); +x_49 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__10; +x_50 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_50, 0, x_18); +lean_ctor_set(x_50, 1, x_49); +lean_ctor_set(x_50, 2, x_48); +lean_ctor_set(x_50, 3, x_17); +x_51 = lean_array_push(x_21, x_50); +x_52 = lean_array_push(x_51, x_23); +x_53 = l_Lean_Parser_Command_declId___elambda__1___closed__2; +x_54 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_54, 0, x_53); +lean_ctor_set(x_54, 1, x_52); +x_55 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__7; +x_56 = lean_array_push(x_55, x_54); +x_57 = l_Array_iterateMAux___main___at___private_Lean_Elab_Syntax_1__mkParserSeq___spec__1___closed__6; +lean_inc(x_10); +lean_inc(x_13); +x_58 = l_Lean_addMacroScope(x_13, x_57, x_10); +x_59 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__14; +x_60 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__16; +x_61 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_61, 0, x_18); +lean_ctor_set(x_61, 1, x_59); +lean_ctor_set(x_61, 2, x_58); +lean_ctor_set(x_61, 3, x_60); +x_62 = lean_array_push(x_21, x_61); +x_63 = lean_array_push(x_62, x_23); +x_64 = l_Lean_mkTermIdFromIdent___closed__2; +x_65 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_65, 0, x_64); +lean_ctor_set(x_65, 1, x_63); +x_66 = l_Lean_Elab_Term_elabArrow___lambda__1___closed__4; +x_67 = lean_array_push(x_66, x_65); +x_68 = l_Lean_Parser_Term_typeSpec___elambda__1___closed__2; +x_69 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_69, 0, x_68); +lean_ctor_set(x_69, 1, x_67); +x_70 = lean_array_push(x_21, x_69); +x_71 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_71, 0, x_28); +lean_ctor_set(x_71, 1, x_70); +x_72 = lean_array_push(x_38, x_71); +x_73 = l_Lean_Parser_Command_optDeclSig___elambda__1___closed__2; +x_74 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_74, 0, x_73); +lean_ctor_set(x_74, 1, x_72); +x_75 = lean_array_push(x_56, x_74); +x_76 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__21; +lean_inc(x_10); +lean_inc(x_13); +x_77 = l_Lean_addMacroScope(x_13, x_76, x_10); +x_78 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__20; +x_79 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__23; +x_80 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_80, 0, x_18); +lean_ctor_set(x_80, 1, x_78); +lean_ctor_set(x_80, 2, x_77); +lean_ctor_set(x_80, 3, x_79); +x_81 = lean_array_push(x_21, x_80); +x_82 = lean_array_push(x_81, x_23); +x_83 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_83, 0, x_64); +lean_ctor_set(x_83, 1, x_82); +x_84 = lean_array_push(x_21, x_83); +x_85 = l_Array_iterateMAux___main___at___private_Lean_Elab_Syntax_1__mkParserSeq___spec__1___closed__7; +lean_inc(x_10); +lean_inc(x_13); +x_86 = l_Lean_addMacroScope(x_13, x_85, x_10); +x_87 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__38; +x_88 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__40; +x_89 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_89, 0, x_18); +lean_ctor_set(x_89, 1, x_87); +lean_ctor_set(x_89, 2, x_86); +lean_ctor_set(x_89, 3, x_88); +x_90 = lean_array_push(x_21, x_89); +x_91 = lean_array_push(x_90, x_23); +x_92 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_92, 0, x_64); +lean_ctor_set(x_92, 1, x_91); +x_93 = lean_array_push(x_21, x_92); +x_94 = l_Lean_Elab_Term_toParserDescrAux___main___closed__92; +lean_inc(x_10); +lean_inc(x_13); +x_95 = l_Lean_addMacroScope(x_13, x_94, x_10); +x_96 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__43; +x_97 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__45; +x_98 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_98, 0, x_18); +lean_ctor_set(x_98, 1, x_96); +lean_ctor_set(x_98, 2, x_95); +lean_ctor_set(x_98, 3, x_97); +x_99 = lean_array_push(x_21, x_98); +x_100 = lean_array_push(x_99, x_23); +x_101 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_101, 0, x_64); +lean_ctor_set(x_101, 1, x_100); +x_102 = lean_array_push(x_21, x_101); +x_103 = l_Lean_mkStxStrLit(x_8, x_18); +x_104 = l_Lean_mkOptionalNode___closed__2; +x_105 = lean_array_push(x_104, x_103); +x_106 = l_Lean_String_HasQuote___closed__2; +x_107 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_107, 0, x_106); +lean_ctor_set(x_107, 1, x_105); +x_108 = lean_array_push(x_21, x_107); +x_109 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_109, 0, x_28); +lean_ctor_set(x_109, 1, x_108); +lean_inc(x_102); +x_110 = lean_array_push(x_102, x_109); +x_111 = l_Lean_mkAppStx___closed__8; +x_112 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_112, 0, x_111); +lean_ctor_set(x_112, 1, x_110); +x_113 = lean_array_push(x_21, x_112); +x_114 = lean_array_push(x_113, x_23); +x_115 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_115, 0, x_28); +lean_ctor_set(x_115, 1, x_114); +x_116 = l___private_Lean_Elab_Quotation_2__quoteSyntax___main___closed__28; +x_117 = lean_array_push(x_116, x_115); +x_118 = l___private_Lean_Elab_Quotation_2__quoteSyntax___main___closed__44; +x_119 = lean_array_push(x_117, x_118); +x_120 = l_Lean_Parser_Term_paren___elambda__1___closed__1; +x_121 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_121, 0, x_120); +lean_ctor_set(x_121, 1, x_119); +x_122 = lean_array_push(x_21, x_121); +x_123 = l_Lean_Elab_Term_toParserDescrAux___main___closed__112; +x_124 = l_Lean_addMacroScope(x_13, x_123, x_10); +x_125 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__48; +x_126 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__50; +x_127 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_127, 0, x_18); +lean_ctor_set(x_127, 1, x_125); +lean_ctor_set(x_127, 2, x_124); +lean_ctor_set(x_127, 3, x_126); +x_128 = lean_array_push(x_21, x_127); +x_129 = lean_array_push(x_128, x_23); +x_130 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_130, 0, x_64); +lean_ctor_set(x_130, 1, x_129); +x_131 = lean_array_push(x_21, x_130); +x_132 = l___private_Lean_Syntax_7__quoteName___main(x_1); +x_133 = lean_array_push(x_21, x_132); +x_134 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__56; +x_135 = lean_array_push(x_133, x_134); +x_136 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_136, 0, x_28); +lean_ctor_set(x_136, 1, x_135); +x_137 = lean_array_push(x_131, x_136); +x_138 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_138, 0, x_111); +lean_ctor_set(x_138, 1, x_137); +x_139 = lean_array_push(x_21, x_138); +x_140 = lean_array_push(x_139, x_23); +x_141 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_141, 0, x_28); +lean_ctor_set(x_141, 1, x_140); +x_142 = lean_array_push(x_116, x_141); +x_143 = lean_array_push(x_142, x_118); +x_144 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_144, 0, x_120); +lean_ctor_set(x_144, 1, x_143); +x_145 = lean_array_push(x_21, x_144); +x_146 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__64; +x_147 = lean_array_push(x_102, x_146); +x_148 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_148, 0, x_111); +lean_ctor_set(x_148, 1, x_147); +x_149 = lean_array_push(x_21, x_148); +x_150 = lean_array_push(x_149, x_23); +x_151 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_151, 0, x_28); +lean_ctor_set(x_151, 1, x_150); +x_152 = lean_array_push(x_116, x_151); +x_153 = lean_array_push(x_152, x_118); +x_154 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_154, 0, x_120); +lean_ctor_set(x_154, 1, x_153); +x_155 = lean_array_push(x_145, x_154); +x_156 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_156, 0, x_28); +lean_ctor_set(x_156, 1, x_155); +lean_inc(x_93); +x_157 = lean_array_push(x_93, x_156); +x_158 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_158, 0, x_111); +lean_ctor_set(x_158, 1, x_157); +x_159 = lean_array_push(x_21, x_158); +x_160 = lean_array_push(x_159, x_23); +x_161 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_161, 0, x_28); +lean_ctor_set(x_161, 1, x_160); +x_162 = lean_array_push(x_116, x_161); +x_163 = lean_array_push(x_162, x_118); +x_164 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_164, 0, x_120); +lean_ctor_set(x_164, 1, x_163); +x_165 = lean_array_push(x_122, x_164); +x_166 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_166, 0, x_28); +lean_ctor_set(x_166, 1, x_165); +x_167 = lean_array_push(x_93, x_166); +x_168 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_168, 0, x_111); +lean_ctor_set(x_168, 1, x_167); +x_169 = lean_array_push(x_21, x_168); +x_170 = lean_array_push(x_169, x_23); +x_171 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_171, 0, x_28); +lean_ctor_set(x_171, 1, x_170); +x_172 = lean_array_push(x_116, x_171); +x_173 = lean_array_push(x_172, x_118); +x_174 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_174, 0, x_120); +lean_ctor_set(x_174, 1, x_173); +x_175 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__35; +x_176 = lean_array_push(x_175, x_174); +x_177 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_177, 0, x_28); +lean_ctor_set(x_177, 1, x_176); +x_178 = lean_array_push(x_84, x_177); +x_179 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_179, 0, x_111); +lean_ctor_set(x_179, 1, x_178); +x_180 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__17; +x_181 = lean_array_push(x_180, x_179); +x_182 = l_Lean_Parser_Command_declValSimple___elambda__1___closed__2; +x_183 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_183, 0, x_182); +lean_ctor_set(x_183, 1, x_181); +x_184 = lean_array_push(x_75, x_183); +x_185 = l_Lean_Parser_Command_def___elambda__1___closed__2; +x_186 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_186, 0, x_185); +lean_ctor_set(x_186, 1, x_184); +x_187 = lean_array_push(x_46, x_186); +x_188 = l_Lean_Parser_Command_declaration___elambda__1___closed__2; +x_189 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_189, 0, x_188); +lean_ctor_set(x_189, 1, x_187); +x_190 = l_Lean_Elab_Command_elabCommand___main(x_189, x_2, x_14); +return x_190; +} +else +{ +uint8_t x_191; +lean_dec(x_10); +lean_dec(x_8); +lean_dec(x_2); +lean_dec(x_1); +x_191 = !lean_is_exclusive(x_12); +if (x_191 == 0) +{ +return x_12; +} +else +{ +lean_object* x_192; lean_object* x_193; lean_object* x_194; +x_192 = lean_ctor_get(x_12, 0); +x_193 = lean_ctor_get(x_12, 1); +lean_inc(x_193); +lean_inc(x_192); +lean_dec(x_12); +x_194 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_194, 0, x_192); +lean_ctor_set(x_194, 1, x_193); +return x_194; +} +} +} +} lean_object* l_Lean_Elab_Command_elabDeclareSyntaxCat(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { @@ -7467,6 +8578,7 @@ x_10 = lean_ctor_get(x_8, 1); lean_inc(x_10); lean_dec(x_8); x_11 = 0; +lean_inc(x_5); x_12 = l_Lean_Parser_registerParserCategory(x_9, x_7, x_5, x_11, x_10); if (lean_obj_tag(x_12) == 0) { @@ -7476,64 +8588,98 @@ lean_inc(x_13); x_14 = lean_ctor_get(x_12, 1); lean_inc(x_14); lean_dec(x_12); +lean_inc(x_2); x_15 = l_Lean_Elab_Command_setEnv(x_13, x_2, x_14); +if (lean_obj_tag(x_15) == 0) +{ +lean_object* x_16; lean_object* x_17; +x_16 = lean_ctor_get(x_15, 1); +lean_inc(x_16); +lean_dec(x_15); +x_17 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser(x_5, x_2, x_16); +return x_17; +} +else +{ +uint8_t x_18; +lean_dec(x_5); +lean_dec(x_2); +x_18 = !lean_is_exclusive(x_15); +if (x_18 == 0) +{ return x_15; } else { -uint8_t x_16; -x_16 = !lean_is_exclusive(x_12); -if (x_16 == 0) +lean_object* x_19; lean_object* x_20; lean_object* x_21; +x_19 = lean_ctor_get(x_15, 0); +x_20 = lean_ctor_get(x_15, 1); +lean_inc(x_20); +lean_inc(x_19); +lean_dec(x_15); +x_21 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_21, 0, x_19); +lean_ctor_set(x_21, 1, x_20); +return x_21; +} +} +} +else { -lean_object* x_17; lean_object* x_18; lean_object* x_19; -x_17 = lean_ctor_get(x_12, 0); -x_18 = l___private_Lean_Elab_Command_1__ioErrorToMessage(x_2, x_1, x_17); -x_19 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_19, 0, x_18); -lean_ctor_set(x_12, 0, x_19); +uint8_t x_22; +lean_dec(x_5); +x_22 = !lean_is_exclusive(x_12); +if (x_22 == 0) +{ +lean_object* x_23; lean_object* x_24; lean_object* x_25; +x_23 = lean_ctor_get(x_12, 0); +x_24 = l___private_Lean_Elab_Command_1__ioErrorToMessage(x_2, x_1, x_23); +x_25 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_25, 0, x_24); +lean_ctor_set(x_12, 0, x_25); return x_12; } else { -lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; -x_20 = lean_ctor_get(x_12, 0); -x_21 = lean_ctor_get(x_12, 1); -lean_inc(x_21); -lean_inc(x_20); +lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; +x_26 = lean_ctor_get(x_12, 0); +x_27 = lean_ctor_get(x_12, 1); +lean_inc(x_27); +lean_inc(x_26); lean_dec(x_12); -x_22 = l___private_Lean_Elab_Command_1__ioErrorToMessage(x_2, x_1, x_20); -x_23 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_23, 0, x_22); -x_24 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_24, 0, x_23); -lean_ctor_set(x_24, 1, x_21); -return x_24; +x_28 = l___private_Lean_Elab_Command_1__ioErrorToMessage(x_2, x_1, x_26); +x_29 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_29, 0, x_28); +x_30 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_30, 0, x_29); +lean_ctor_set(x_30, 1, x_27); +return x_30; } } } else { -uint8_t x_25; +uint8_t x_31; lean_dec(x_7); lean_dec(x_5); lean_dec(x_2); -x_25 = !lean_is_exclusive(x_8); -if (x_25 == 0) +x_31 = !lean_is_exclusive(x_8); +if (x_31 == 0) { return x_8; } else { -lean_object* x_26; lean_object* x_27; lean_object* x_28; -x_26 = lean_ctor_get(x_8, 0); -x_27 = lean_ctor_get(x_8, 1); -lean_inc(x_27); -lean_inc(x_26); +lean_object* x_32; lean_object* x_33; lean_object* x_34; +x_32 = lean_ctor_get(x_8, 0); +x_33 = lean_ctor_get(x_8, 1); +lean_inc(x_33); +lean_inc(x_32); lean_dec(x_8); -x_28 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_28, 0, x_26); -lean_ctor_set(x_28, 1, x_27); -return x_28; +x_34 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_34, 0, x_32); +lean_ctor_set(x_34, 1, x_33); +return x_34; } } } @@ -7668,7 +8814,7 @@ x_5 = l_Lean_Macro_addMacroScope(x_4, x_2, x_3); return x_5; } } -lean_object* l___private_Lean_Elab_Syntax_5__elabKind(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +lean_object* l___private_Lean_Elab_Syntax_7__elabKind(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { uint8_t x_5; @@ -7755,11 +8901,11 @@ return x_22; } } } -lean_object* l___private_Lean_Elab_Syntax_5__elabKind___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +lean_object* l___private_Lean_Elab_Syntax_7__elabKind___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; -x_5 = l___private_Lean_Elab_Syntax_5__elabKind(x_1, x_2, x_3, x_4); +x_5 = l___private_Lean_Elab_Syntax_7__elabKind(x_1, x_2, x_3, x_4); lean_dec(x_1); return x_5; } @@ -7777,122 +8923,109 @@ return x_8; lean_object* _init_l_Lean_Elab_Command_elabSyntax___closed__1() { _start: { -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Array_empty___closed__1; -x_2 = l___private_Lean_Elab_Term_5__expandCDot___main___closed__4; -x_3 = lean_array_push(x_1, x_2); -return x_3; +lean_object* x_1; +x_1 = lean_mk_string("myParser"); +return x_1; } } lean_object* _init_l_Lean_Elab_Command_elabSyntax___closed__2() { _start: { -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_SourceInfo_inhabited___closed__1; -x_2 = l_Lean_Parser_Command_attributes___elambda__1___closed__5; -x_3 = lean_alloc_ctor(2, 2, 0); -lean_ctor_set(x_3, 0, x_1); -lean_ctor_set(x_3, 1, x_2); -return x_3; +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Elab_Command_elabSyntax___closed__1; +x_2 = lean_string_utf8_byte_size(x_1); +return x_2; } } lean_object* _init_l_Lean_Elab_Command_elabSyntax___closed__3() { _start: { -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Array_empty___closed__1; -x_2 = l_Lean_Elab_Command_elabSyntax___closed__2; -x_3 = lean_array_push(x_1, x_2); -return x_3; +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_1 = l_Lean_Elab_Command_elabSyntax___closed__1; +x_2 = lean_unsigned_to_nat(0u); +x_3 = l_Lean_Elab_Command_elabSyntax___closed__2; +x_4 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_4, 0, x_1); +lean_ctor_set(x_4, 1, x_2); +lean_ctor_set(x_4, 2, x_3); +return x_4; } } lean_object* _init_l_Lean_Elab_Command_elabSyntax___closed__4() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_SourceInfo_inhabited___closed__1; -x_2 = l_Lean_Parser_Command_def___elambda__1___closed__1; -x_3 = lean_alloc_ctor(2, 2, 0); -lean_ctor_set(x_3, 0, x_1); -lean_ctor_set(x_3, 1, x_2); +x_1 = lean_box(0); +x_2 = l_Lean_Elab_Command_elabSyntax___closed__1; +x_3 = lean_name_mk_string(x_1, x_2); return x_3; } } lean_object* _init_l_Lean_Elab_Command_elabSyntax___closed__5() { _start: { -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Array_empty___closed__1; -x_2 = l_Lean_Elab_Command_elabSyntax___closed__4; -x_3 = lean_array_push(x_1, x_2); -return x_3; +lean_object* x_1; +x_1 = lean_mk_string("ParserDescr.node"); +return x_1; } } lean_object* _init_l_Lean_Elab_Command_elabSyntax___closed__6() { _start: { -lean_object* x_1; -x_1 = lean_mk_string("myParser"); -return x_1; +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Elab_Command_elabSyntax___closed__5; +x_2 = lean_string_utf8_byte_size(x_1); +return x_2; } } lean_object* _init_l_Lean_Elab_Command_elabSyntax___closed__7() { _start: { -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Elab_Command_elabSyntax___closed__6; -x_2 = lean_string_utf8_byte_size(x_1); -return x_2; +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_1 = l_Lean_Elab_Command_elabSyntax___closed__5; +x_2 = lean_unsigned_to_nat(0u); +x_3 = l_Lean_Elab_Command_elabSyntax___closed__6; +x_4 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_4, 0, x_1); +lean_ctor_set(x_4, 1, x_2); +lean_ctor_set(x_4, 2, x_3); +return x_4; } } lean_object* _init_l_Lean_Elab_Command_elabSyntax___closed__8() { _start: { -lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; -x_1 = l_Lean_Elab_Command_elabSyntax___closed__6; -x_2 = lean_unsigned_to_nat(0u); -x_3 = l_Lean_Elab_Command_elabSyntax___closed__7; -x_4 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_4, 0, x_1); -lean_ctor_set(x_4, 1, x_2); -lean_ctor_set(x_4, 2, x_3); -return x_4; +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Array_iterateMAux___main___at___private_Lean_Elab_Syntax_1__mkParserSeq___spec__1___closed__4; +x_2 = l_Lean_Meta_DiscrTree_Trie_format___main___rarg___closed__1; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; } } lean_object* _init_l_Lean_Elab_Command_elabSyntax___closed__9() { _start: { -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = lean_box(0); -x_2 = l_Lean_Elab_Command_elabSyntax___closed__6; -x_3 = lean_name_mk_string(x_1, x_2); -return x_3; +lean_object* x_1; +x_1 = lean_mk_string("Lean.TrailingParserDescr"); +return x_1; } } lean_object* _init_l_Lean_Elab_Command_elabSyntax___closed__10() { _start: { -lean_object* x_1; -x_1 = lean_mk_string("Lean.ParserDescr"); -return x_1; +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Elab_Command_elabSyntax___closed__9; +x_2 = lean_string_utf8_byte_size(x_1); +return x_2; } } lean_object* _init_l_Lean_Elab_Command_elabSyntax___closed__11() { _start: { -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Elab_Command_elabSyntax___closed__10; -x_2 = lean_string_utf8_byte_size(x_1); -return x_2; -} -} -lean_object* _init_l_Lean_Elab_Command_elabSyntax___closed__12() { -_start: -{ lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; -x_1 = l_Lean_Elab_Command_elabSyntax___closed__10; +x_1 = l_Lean_Elab_Command_elabSyntax___closed__9; x_2 = lean_unsigned_to_nat(0u); -x_3 = l_Lean_Elab_Command_elabSyntax___closed__11; +x_3 = l_Lean_Elab_Command_elabSyntax___closed__10; x_4 = lean_alloc_ctor(0, 3, 0); lean_ctor_set(x_4, 0, x_1); lean_ctor_set(x_4, 1, x_2); @@ -7900,12 +9033,22 @@ lean_ctor_set(x_4, 2, x_3); return x_4; } } +lean_object* _init_l_Lean_Elab_Command_elabSyntax___closed__12() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_mkAppStx___closed__2; +x_2 = l_Lean_Parser_mkParserOfConstantUnsafe___closed__4; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} lean_object* _init_l_Lean_Elab_Command_elabSyntax___closed__13() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); -x_2 = l_Array_iterateMAux___main___at___private_Lean_Elab_Syntax_1__mkParserSeq___spec__1___closed__6; +x_2 = l_Lean_Elab_Command_elabSyntax___closed__12; x_3 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_3, 0, x_2); lean_ctor_set(x_3, 1, x_1); @@ -7927,37 +9070,27 @@ return x_3; lean_object* _init_l_Lean_Elab_Command_elabSyntax___closed__15() { _start: { -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Array_empty___closed__1; -x_2 = l___private_Lean_Elab_Quotation_4__getHeadInfo___elambda__3___closed__4; -x_3 = lean_array_push(x_1, x_2); -return x_3; +lean_object* x_1; +x_1 = lean_mk_string("ParserDescr.trailingNode"); +return x_1; } } lean_object* _init_l_Lean_Elab_Command_elabSyntax___closed__16() { _start: { -lean_object* x_1; -x_1 = lean_mk_string("ParserDescr.node"); -return x_1; +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Elab_Command_elabSyntax___closed__15; +x_2 = lean_string_utf8_byte_size(x_1); +return x_2; } } lean_object* _init_l_Lean_Elab_Command_elabSyntax___closed__17() { _start: { -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Elab_Command_elabSyntax___closed__16; -x_2 = lean_string_utf8_byte_size(x_1); -return x_2; -} -} -lean_object* _init_l_Lean_Elab_Command_elabSyntax___closed__18() { -_start: -{ lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; -x_1 = l_Lean_Elab_Command_elabSyntax___closed__16; +x_1 = l_Lean_Elab_Command_elabSyntax___closed__15; x_2 = lean_unsigned_to_nat(0u); -x_3 = l_Lean_Elab_Command_elabSyntax___closed__17; +x_3 = l_Lean_Elab_Command_elabSyntax___closed__16; x_4 = lean_alloc_ctor(0, 3, 0); lean_ctor_set(x_4, 0, x_1); lean_ctor_set(x_4, 1, x_2); @@ -7965,12 +9098,20 @@ lean_ctor_set(x_4, 2, x_3); return x_4; } } +lean_object* _init_l_Lean_Elab_Command_elabSyntax___closed__18() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("trailingNode"); +return x_1; +} +} lean_object* _init_l_Lean_Elab_Command_elabSyntax___closed__19() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Array_iterateMAux___main___at___private_Lean_Elab_Syntax_1__mkParserSeq___spec__1___closed__4; -x_2 = l_Lean_Meta_DiscrTree_Trie_format___main___rarg___closed__1; +x_2 = l_Lean_Elab_Command_elabSyntax___closed__18; x_3 = lean_name_mk_string(x_1, x_2); return x_3; } @@ -7980,7 +9121,7 @@ _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Array_iterateMAux___main___at___private_Lean_Elab_Syntax_1__mkParserSeq___spec__1___closed__6; -x_2 = l_Lean_Meta_DiscrTree_Trie_format___main___rarg___closed__1; +x_2 = l_Lean_Elab_Command_elabSyntax___closed__18; x_3 = lean_name_mk_string(x_1, x_2); return x_3; } @@ -8009,154 +9150,6 @@ lean_ctor_set(x_3, 1, x_1); return x_3; } } -lean_object* _init_l_Lean_Elab_Command_elabSyntax___closed__23() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string("Lean.TrailingParserDescr"); -return x_1; -} -} -lean_object* _init_l_Lean_Elab_Command_elabSyntax___closed__24() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Elab_Command_elabSyntax___closed__23; -x_2 = lean_string_utf8_byte_size(x_1); -return x_2; -} -} -lean_object* _init_l_Lean_Elab_Command_elabSyntax___closed__25() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; -x_1 = l_Lean_Elab_Command_elabSyntax___closed__23; -x_2 = lean_unsigned_to_nat(0u); -x_3 = l_Lean_Elab_Command_elabSyntax___closed__24; -x_4 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_4, 0, x_1); -lean_ctor_set(x_4, 1, x_2); -lean_ctor_set(x_4, 2, x_3); -return x_4; -} -} -lean_object* _init_l_Lean_Elab_Command_elabSyntax___closed__26() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_mkAppStx___closed__2; -x_2 = l_Lean_Parser_mkParserOfConstantUnsafe___closed__4; -x_3 = lean_name_mk_string(x_1, x_2); -return x_3; -} -} -lean_object* _init_l_Lean_Elab_Command_elabSyntax___closed__27() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = lean_box(0); -x_2 = l_Lean_Elab_Command_elabSyntax___closed__26; -x_3 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_3, 0, x_2); -lean_ctor_set(x_3, 1, x_1); -return x_3; -} -} -lean_object* _init_l_Lean_Elab_Command_elabSyntax___closed__28() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = lean_box(0); -x_2 = l_Lean_Elab_Command_elabSyntax___closed__27; -x_3 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_3, 0, x_2); -lean_ctor_set(x_3, 1, x_1); -return x_3; -} -} -lean_object* _init_l_Lean_Elab_Command_elabSyntax___closed__29() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string("ParserDescr.trailingNode"); -return x_1; -} -} -lean_object* _init_l_Lean_Elab_Command_elabSyntax___closed__30() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Elab_Command_elabSyntax___closed__29; -x_2 = lean_string_utf8_byte_size(x_1); -return x_2; -} -} -lean_object* _init_l_Lean_Elab_Command_elabSyntax___closed__31() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; -x_1 = l_Lean_Elab_Command_elabSyntax___closed__29; -x_2 = lean_unsigned_to_nat(0u); -x_3 = l_Lean_Elab_Command_elabSyntax___closed__30; -x_4 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_4, 0, x_1); -lean_ctor_set(x_4, 1, x_2); -lean_ctor_set(x_4, 2, x_3); -return x_4; -} -} -lean_object* _init_l_Lean_Elab_Command_elabSyntax___closed__32() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string("trailingNode"); -return x_1; -} -} -lean_object* _init_l_Lean_Elab_Command_elabSyntax___closed__33() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Array_iterateMAux___main___at___private_Lean_Elab_Syntax_1__mkParserSeq___spec__1___closed__4; -x_2 = l_Lean_Elab_Command_elabSyntax___closed__32; -x_3 = lean_name_mk_string(x_1, x_2); -return x_3; -} -} -lean_object* _init_l_Lean_Elab_Command_elabSyntax___closed__34() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Array_iterateMAux___main___at___private_Lean_Elab_Syntax_1__mkParserSeq___spec__1___closed__6; -x_2 = l_Lean_Elab_Command_elabSyntax___closed__32; -x_3 = lean_name_mk_string(x_1, x_2); -return x_3; -} -} -lean_object* _init_l_Lean_Elab_Command_elabSyntax___closed__35() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = lean_box(0); -x_2 = l_Lean_Elab_Command_elabSyntax___closed__34; -x_3 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_3, 0, x_2); -lean_ctor_set(x_3, 1, x_1); -return x_3; -} -} -lean_object* _init_l_Lean_Elab_Command_elabSyntax___closed__36() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = lean_box(0); -x_2 = l_Lean_Elab_Command_elabSyntax___closed__35; -x_3 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_3, 0, x_2); -lean_ctor_set(x_3, 1, x_1); -return x_3; -} -} lean_object* l_Lean_Elab_Command_elabSyntax(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { @@ -8228,7 +9221,7 @@ x_404 = l_Lean_Syntax_getArg(x_1, x_7); lean_dec(x_1); x_405 = lean_alloc_ctor(4, 1, 0); lean_ctor_set(x_405, 0, x_9); -x_406 = l_Lean_Elab_Term_toParserDescrAux___main___closed__119; +x_406 = l_Lean_Elab_Term_toParserDescrAux___main___closed__117; x_407 = lean_alloc_ctor(9, 2, 0); lean_ctor_set(x_407, 0, x_406); lean_ctor_set(x_407, 1, x_405); @@ -8267,7 +9260,7 @@ block_403: lean_object* x_19; lean_inc(x_2); lean_inc(x_9); -x_19 = l___private_Lean_Elab_Syntax_5__elabKind(x_15, x_9, x_2, x_18); +x_19 = l___private_Lean_Elab_Syntax_7__elabKind(x_15, x_9, x_2, x_18); lean_dec(x_15); if (lean_obj_tag(x_19) == 0) { @@ -8819,7 +9812,7 @@ x_43 = l_Lean_nullKind___closed__2; x_44 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_44, 0, x_43); lean_ctor_set(x_44, 1, x_42); -x_45 = l_Lean_Elab_Command_elabSyntax___closed__3; +x_45 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__3; x_46 = lean_array_push(x_45, x_44); x_47 = l_Lean_Elab_Term_elabArrayLit___closed__11; x_48 = lean_array_push(x_46, x_47); @@ -8831,7 +9824,7 @@ x_51 = lean_array_push(x_36, x_50); x_52 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_52, 0, x_43); lean_ctor_set(x_52, 1, x_51); -x_53 = l_Lean_Elab_Command_elabSyntax___closed__1; +x_53 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__1; x_54 = lean_array_push(x_53, x_52); x_55 = lean_array_push(x_54, x_38); x_56 = lean_array_push(x_55, x_38); @@ -8842,13 +9835,13 @@ x_60 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_60, 0, x_59); lean_ctor_set(x_60, 1, x_58); x_61 = lean_array_push(x_36, x_60); -x_62 = l_Lean_Elab_Command_elabSyntax___closed__9; +x_62 = l_Lean_Elab_Command_elabSyntax___closed__4; lean_inc(x_31); lean_inc(x_34); x_63 = l_Lean_addMacroScope(x_34, x_62, x_31); x_64 = lean_box(0); x_65 = l_Lean_SourceInfo_inhabited___closed__1; -x_66 = l_Lean_Elab_Command_elabSyntax___closed__8; +x_66 = l_Lean_Elab_Command_elabSyntax___closed__3; x_67 = lean_alloc_ctor(3, 4, 0); lean_ctor_set(x_67, 0, x_65); lean_ctor_set(x_67, 1, x_66); @@ -8860,14 +9853,14 @@ x_70 = l_Lean_Parser_Command_declId___elambda__1___closed__2; x_71 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_71, 0, x_70); lean_ctor_set(x_71, 1, x_69); -x_72 = l_Lean_Elab_Command_elabSyntax___closed__5; +x_72 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__7; x_73 = lean_array_push(x_72, x_71); x_74 = l_Array_iterateMAux___main___at___private_Lean_Elab_Syntax_1__mkParserSeq___spec__1___closed__6; lean_inc(x_31); lean_inc(x_34); x_75 = l_Lean_addMacroScope(x_34, x_74, x_31); -x_76 = l_Lean_Elab_Command_elabSyntax___closed__12; -x_77 = l_Lean_Elab_Command_elabSyntax___closed__14; +x_76 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__14; +x_77 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__16; x_78 = lean_alloc_ctor(3, 4, 0); lean_ctor_set(x_78, 0, x_65); lean_ctor_set(x_78, 1, x_76); @@ -8895,10 +9888,10 @@ x_91 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_91, 0, x_90); lean_ctor_set(x_91, 1, x_89); x_92 = lean_array_push(x_73, x_91); -x_93 = l_Lean_Elab_Command_elabSyntax___closed__19; +x_93 = l_Lean_Elab_Command_elabSyntax___closed__8; x_94 = l_Lean_addMacroScope(x_34, x_93, x_31); -x_95 = l_Lean_Elab_Command_elabSyntax___closed__18; -x_96 = l_Lean_Elab_Command_elabSyntax___closed__22; +x_95 = l_Lean_Elab_Command_elabSyntax___closed__7; +x_96 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__23; x_97 = lean_alloc_ctor(3, 4, 0); lean_ctor_set(x_97, 0, x_65); lean_ctor_set(x_97, 1, x_95); @@ -8931,7 +9924,7 @@ x_115 = l_Lean_mkAppStx___closed__8; x_116 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_116, 0, x_115); lean_ctor_set(x_116, 1, x_114); -x_117 = l_Lean_Elab_Command_elabSyntax___closed__15; +x_117 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__17; x_118 = lean_array_push(x_117, x_116); x_119 = l_Lean_Parser_Command_declValSimple___elambda__1___closed__2; x_120 = lean_alloc_ctor(1, 2, 0); @@ -9156,7 +10149,7 @@ x_179 = l_Lean_nullKind___closed__2; x_180 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_180, 0, x_179); lean_ctor_set(x_180, 1, x_178); -x_181 = l_Lean_Elab_Command_elabSyntax___closed__3; +x_181 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__3; x_182 = lean_array_push(x_181, x_180); x_183 = l_Lean_Elab_Term_elabArrayLit___closed__11; x_184 = lean_array_push(x_182, x_183); @@ -9168,7 +10161,7 @@ x_187 = lean_array_push(x_172, x_186); x_188 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_188, 0, x_179); lean_ctor_set(x_188, 1, x_187); -x_189 = l_Lean_Elab_Command_elabSyntax___closed__1; +x_189 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__1; x_190 = lean_array_push(x_189, x_188); x_191 = lean_array_push(x_190, x_174); x_192 = lean_array_push(x_191, x_174); @@ -9179,13 +10172,13 @@ x_196 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_196, 0, x_195); lean_ctor_set(x_196, 1, x_194); x_197 = lean_array_push(x_172, x_196); -x_198 = l_Lean_Elab_Command_elabSyntax___closed__9; +x_198 = l_Lean_Elab_Command_elabSyntax___closed__4; lean_inc(x_167); lean_inc(x_170); x_199 = l_Lean_addMacroScope(x_170, x_198, x_167); x_200 = lean_box(0); x_201 = l_Lean_SourceInfo_inhabited___closed__1; -x_202 = l_Lean_Elab_Command_elabSyntax___closed__8; +x_202 = l_Lean_Elab_Command_elabSyntax___closed__3; x_203 = lean_alloc_ctor(3, 4, 0); lean_ctor_set(x_203, 0, x_201); lean_ctor_set(x_203, 1, x_202); @@ -9197,14 +10190,14 @@ x_206 = l_Lean_Parser_Command_declId___elambda__1___closed__2; x_207 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_207, 0, x_206); lean_ctor_set(x_207, 1, x_205); -x_208 = l_Lean_Elab_Command_elabSyntax___closed__5; +x_208 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__7; x_209 = lean_array_push(x_208, x_207); -x_210 = l_Lean_Elab_Command_elabSyntax___closed__26; +x_210 = l_Lean_Elab_Command_elabSyntax___closed__12; lean_inc(x_167); lean_inc(x_170); x_211 = l_Lean_addMacroScope(x_170, x_210, x_167); -x_212 = l_Lean_Elab_Command_elabSyntax___closed__25; -x_213 = l_Lean_Elab_Command_elabSyntax___closed__28; +x_212 = l_Lean_Elab_Command_elabSyntax___closed__11; +x_213 = l_Lean_Elab_Command_elabSyntax___closed__14; x_214 = lean_alloc_ctor(3, 4, 0); lean_ctor_set(x_214, 0, x_201); lean_ctor_set(x_214, 1, x_212); @@ -9232,10 +10225,10 @@ x_227 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_227, 0, x_226); lean_ctor_set(x_227, 1, x_225); x_228 = lean_array_push(x_209, x_227); -x_229 = l_Lean_Elab_Command_elabSyntax___closed__33; +x_229 = l_Lean_Elab_Command_elabSyntax___closed__19; x_230 = l_Lean_addMacroScope(x_170, x_229, x_167); -x_231 = l_Lean_Elab_Command_elabSyntax___closed__31; -x_232 = l_Lean_Elab_Command_elabSyntax___closed__36; +x_231 = l_Lean_Elab_Command_elabSyntax___closed__17; +x_232 = l_Lean_Elab_Command_elabSyntax___closed__22; x_233 = lean_alloc_ctor(3, 4, 0); lean_ctor_set(x_233, 0, x_201); lean_ctor_set(x_233, 1, x_231); @@ -9268,7 +10261,7 @@ x_251 = l_Lean_mkAppStx___closed__8; x_252 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_252, 0, x_251); lean_ctor_set(x_252, 1, x_250); -x_253 = l_Lean_Elab_Command_elabSyntax___closed__15; +x_253 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__17; x_254 = lean_array_push(x_253, x_252); x_255 = l_Lean_Parser_Command_declValSimple___elambda__1___closed__2; x_256 = lean_alloc_ctor(1, 2, 0); @@ -10422,7 +11415,7 @@ x_30 = lean_array_push(x_21, x_29); x_31 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_31, 0, x_25); lean_ctor_set(x_31, 1, x_30); -x_32 = l_Lean_Elab_Command_elabSyntax___closed__3; +x_32 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__3; x_33 = lean_array_push(x_32, x_31); x_34 = l_Lean_Elab_Term_elabArrayLit___closed__11; x_35 = lean_array_push(x_33, x_34); @@ -10434,7 +11427,7 @@ x_38 = lean_array_push(x_21, x_37); x_39 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_39, 0, x_25); lean_ctor_set(x_39, 1, x_38); -x_40 = l_Lean_Elab_Command_elabSyntax___closed__1; +x_40 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__1; x_41 = lean_array_push(x_40, x_39); x_42 = l___private_Lean_Elab_Term_5__expandCDot___main___closed__4; x_43 = lean_array_push(x_41, x_42); @@ -10462,7 +11455,7 @@ x_56 = l_Lean_Parser_Command_declId___elambda__1___closed__2; x_57 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_57, 0, x_56); lean_ctor_set(x_57, 1, x_55); -x_58 = l_Lean_Elab_Command_elabSyntax___closed__5; +x_58 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__7; x_59 = lean_array_push(x_58, x_57); x_60 = l_Lean_Elab_Command_elabMacroRulesAux___closed__9; lean_inc(x_10); @@ -10591,7 +11584,7 @@ x_133 = l_Lean_Parser_Term_fun___elambda__1___closed__2; x_134 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_134, 0, x_133); lean_ctor_set(x_134, 1, x_132); -x_135 = l_Lean_Elab_Command_elabSyntax___closed__15; +x_135 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__17; x_136 = lean_array_push(x_135, x_134); x_137 = l_Lean_Parser_Command_declValSimple___elambda__1___closed__2; x_138 = lean_alloc_ctor(1, 2, 0); @@ -10647,7 +11640,7 @@ x_162 = lean_array_push(x_153, x_161); x_163 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_163, 0, x_157); lean_ctor_set(x_163, 1, x_162); -x_164 = l_Lean_Elab_Command_elabSyntax___closed__3; +x_164 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__3; x_165 = lean_array_push(x_164, x_163); x_166 = l_Lean_Elab_Term_elabArrayLit___closed__11; x_167 = lean_array_push(x_165, x_166); @@ -10659,7 +11652,7 @@ x_170 = lean_array_push(x_153, x_169); x_171 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_171, 0, x_157); lean_ctor_set(x_171, 1, x_170); -x_172 = l_Lean_Elab_Command_elabSyntax___closed__1; +x_172 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__1; x_173 = lean_array_push(x_172, x_171); x_174 = l___private_Lean_Elab_Term_5__expandCDot___main___closed__4; x_175 = lean_array_push(x_173, x_174); @@ -10687,7 +11680,7 @@ x_188 = l_Lean_Parser_Command_declId___elambda__1___closed__2; x_189 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_189, 0, x_188); lean_ctor_set(x_189, 1, x_187); -x_190 = l_Lean_Elab_Command_elabSyntax___closed__5; +x_190 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__7; x_191 = lean_array_push(x_190, x_189); x_192 = l_Lean_Elab_Command_elabMacroRulesAux___closed__9; lean_inc(x_10); @@ -10816,7 +11809,7 @@ x_265 = l_Lean_Parser_Term_fun___elambda__1___closed__2; x_266 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_266, 0, x_265); lean_ctor_set(x_266, 1, x_264); -x_267 = l_Lean_Elab_Command_elabSyntax___closed__15; +x_267 = l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__17; x_268 = lean_array_push(x_267, x_266); x_269 = l_Lean_Parser_Command_declValSimple___elambda__1___closed__2; x_270 = lean_alloc_ctor(1, 2, 0); @@ -12206,7 +13199,7 @@ x_5 = l_Lean_KeyedDeclsAttribute_addBuiltin___rarg(x_2, x_3, x_4, x_1); return x_5; } } -lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_6__antiquote___main___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_8__antiquote___main___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; uint8_t x_5; @@ -12227,7 +13220,7 @@ x_7 = lean_array_fget(x_3, x_2); x_8 = lean_unsigned_to_nat(0u); x_9 = lean_array_fset(x_3, x_2, x_8); x_10 = x_7; -x_11 = l___private_Lean_Elab_Syntax_6__antiquote___main(x_1, x_10); +x_11 = l___private_Lean_Elab_Syntax_8__antiquote___main(x_1, x_10); x_12 = lean_unsigned_to_nat(1u); x_13 = lean_nat_add(x_2, x_12); x_14 = x_11; @@ -12239,7 +13232,7 @@ goto _start; } } } -lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_6__antiquote___main___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_8__antiquote___main___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; uint8_t x_5; @@ -12260,7 +13253,7 @@ x_7 = lean_array_fget(x_3, x_2); x_8 = lean_unsigned_to_nat(0u); x_9 = lean_array_fset(x_3, x_2, x_8); x_10 = x_7; -x_11 = l___private_Lean_Elab_Syntax_6__antiquote___main(x_1, x_10); +x_11 = l___private_Lean_Elab_Syntax_8__antiquote___main(x_1, x_10); x_12 = lean_unsigned_to_nat(1u); x_13 = lean_nat_add(x_2, x_12); x_14 = x_11; @@ -12272,7 +13265,7 @@ goto _start; } } } -lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_6__antiquote___main___spec__3(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_8__antiquote___main___spec__3(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; uint8_t x_5; @@ -12293,7 +13286,7 @@ x_7 = lean_array_fget(x_3, x_2); x_8 = lean_unsigned_to_nat(0u); x_9 = lean_array_fset(x_3, x_2, x_8); x_10 = x_7; -x_11 = l___private_Lean_Elab_Syntax_6__antiquote___main(x_1, x_10); +x_11 = l___private_Lean_Elab_Syntax_8__antiquote___main(x_1, x_10); x_12 = lean_unsigned_to_nat(1u); x_13 = lean_nat_add(x_2, x_12); x_14 = x_11; @@ -12305,7 +13298,7 @@ goto _start; } } } -lean_object* l_Array_findIdxAux___main___at___private_Lean_Elab_Syntax_6__antiquote___main___spec__4(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Array_findIdxAux___main___at___private_Lean_Elab_Syntax_8__antiquote___main___spec__4(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; uint8_t x_5; @@ -12348,7 +13341,7 @@ return x_14; } } } -lean_object* _init_l___private_Lean_Elab_Syntax_6__antiquote___main___closed__1() { +lean_object* _init_l___private_Lean_Elab_Syntax_8__antiquote___main___closed__1() { _start: { lean_object* x_1; lean_object* x_2; @@ -12357,27 +13350,27 @@ x_2 = l_Lean_mkAtom(x_1); return x_2; } } -lean_object* _init_l___private_Lean_Elab_Syntax_6__antiquote___main___closed__2() { +lean_object* _init_l___private_Lean_Elab_Syntax_8__antiquote___main___closed__2() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_Elab_Term_mkExplicitBinder___closed__5; -x_2 = l___private_Lean_Elab_Syntax_6__antiquote___main___closed__1; +x_2 = l___private_Lean_Elab_Syntax_8__antiquote___main___closed__1; x_3 = lean_array_push(x_1, x_2); return x_3; } } -lean_object* _init_l___private_Lean_Elab_Syntax_6__antiquote___main___closed__3() { +lean_object* _init_l___private_Lean_Elab_Syntax_8__antiquote___main___closed__3() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l___private_Lean_Elab_Syntax_6__antiquote___main___closed__2; +x_1 = l___private_Lean_Elab_Syntax_8__antiquote___main___closed__2; x_2 = l_Lean_mkOptionalNode___closed__1; x_3 = lean_array_push(x_1, x_2); return x_3; } } -lean_object* l___private_Lean_Elab_Syntax_6__antiquote___main(lean_object* x_1, lean_object* x_2) { +lean_object* l___private_Lean_Elab_Syntax_8__antiquote___main(lean_object* x_1, lean_object* x_2) { _start: { uint8_t x_3; lean_object* x_62; uint8_t x_63; @@ -12417,7 +13410,7 @@ lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_obj x_5 = lean_ctor_get(x_2, 1); x_6 = x_5; x_7 = lean_unsigned_to_nat(0u); -x_8 = l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_6__antiquote___main___spec__1(x_1, x_7, x_6); +x_8 = l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_8__antiquote___main___spec__1(x_1, x_7, x_6); x_9 = x_8; lean_ctor_set(x_2, 1, x_9); return x_2; @@ -12432,7 +13425,7 @@ lean_inc(x_10); lean_dec(x_2); x_12 = x_11; x_13 = lean_unsigned_to_nat(0u); -x_14 = l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_6__antiquote___main___spec__1(x_1, x_13, x_12); +x_14 = l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_8__antiquote___main___spec__1(x_1, x_13, x_12); x_15 = x_14; x_16 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_16, 0, x_10); @@ -12465,7 +13458,7 @@ if (x_21 == 0) lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; x_22 = lean_ctor_get(x_2, 1); x_23 = x_22; -x_24 = l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_6__antiquote___main___spec__2(x_1, x_17, x_23); +x_24 = l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_8__antiquote___main___spec__2(x_1, x_17, x_23); x_25 = x_24; lean_ctor_set(x_2, 1, x_25); return x_2; @@ -12479,7 +13472,7 @@ lean_inc(x_27); lean_inc(x_26); lean_dec(x_2); x_28 = x_27; -x_29 = l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_6__antiquote___main___spec__2(x_1, x_17, x_28); +x_29 = l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_8__antiquote___main___spec__2(x_1, x_17, x_28); x_30 = x_29; x_31 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_31, 0, x_26); @@ -12534,7 +13527,7 @@ if (x_35 == 0) lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; x_36 = lean_ctor_get(x_2, 1); x_37 = x_36; -x_38 = l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_6__antiquote___main___spec__3(x_1, x_17, x_37); +x_38 = l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_8__antiquote___main___spec__3(x_1, x_17, x_37); x_39 = x_38; lean_ctor_set(x_2, 1, x_39); return x_2; @@ -12548,7 +13541,7 @@ lean_inc(x_41); lean_inc(x_40); lean_dec(x_2); x_42 = x_41; -x_43 = l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_6__antiquote___main___spec__3(x_1, x_17, x_42); +x_43 = l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_8__antiquote___main___spec__3(x_1, x_17, x_42); x_44 = x_43; x_45 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_45, 0, x_40); @@ -12564,7 +13557,7 @@ return x_2; else { lean_object* x_46; -x_46 = l_Array_findIdxAux___main___at___private_Lean_Elab_Syntax_6__antiquote___main___spec__4(x_18, x_1, x_17); +x_46 = l_Array_findIdxAux___main___at___private_Lean_Elab_Syntax_8__antiquote___main___spec__4(x_18, x_1, x_17); if (lean_obj_tag(x_46) == 0) { lean_dec(x_18); @@ -12575,7 +13568,7 @@ else lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_dec(x_46); lean_dec(x_2); -x_47 = l___private_Lean_Elab_Syntax_6__antiquote___main___closed__3; +x_47 = l___private_Lean_Elab_Syntax_8__antiquote___main___closed__3; x_48 = lean_array_push(x_47, x_18); x_49 = l_Lean_mkOptionalNode___closed__1; x_50 = lean_array_push(x_48, x_49); @@ -12593,65 +13586,65 @@ return x_53; } } } -lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_6__antiquote___main___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_8__antiquote___main___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; -x_4 = l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_6__antiquote___main___spec__1(x_1, x_2, x_3); +x_4 = l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_8__antiquote___main___spec__1(x_1, x_2, x_3); lean_dec(x_1); return x_4; } } -lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_6__antiquote___main___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_8__antiquote___main___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; -x_4 = l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_6__antiquote___main___spec__2(x_1, x_2, x_3); +x_4 = l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_8__antiquote___main___spec__2(x_1, x_2, x_3); lean_dec(x_1); return x_4; } } -lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_6__antiquote___main___spec__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_8__antiquote___main___spec__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; -x_4 = l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_6__antiquote___main___spec__3(x_1, x_2, x_3); +x_4 = l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_8__antiquote___main___spec__3(x_1, x_2, x_3); lean_dec(x_1); return x_4; } } -lean_object* l_Array_findIdxAux___main___at___private_Lean_Elab_Syntax_6__antiquote___main___spec__4___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Array_findIdxAux___main___at___private_Lean_Elab_Syntax_8__antiquote___main___spec__4___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; -x_4 = l_Array_findIdxAux___main___at___private_Lean_Elab_Syntax_6__antiquote___main___spec__4(x_1, x_2, x_3); +x_4 = l_Array_findIdxAux___main___at___private_Lean_Elab_Syntax_8__antiquote___main___spec__4(x_1, x_2, x_3); lean_dec(x_2); lean_dec(x_1); return x_4; } } -lean_object* l___private_Lean_Elab_Syntax_6__antiquote___main___boxed(lean_object* x_1, lean_object* x_2) { +lean_object* l___private_Lean_Elab_Syntax_8__antiquote___main___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; -x_3 = l___private_Lean_Elab_Syntax_6__antiquote___main(x_1, x_2); +x_3 = l___private_Lean_Elab_Syntax_8__antiquote___main(x_1, x_2); lean_dec(x_1); return x_3; } } -lean_object* l___private_Lean_Elab_Syntax_6__antiquote(lean_object* x_1, lean_object* x_2) { +lean_object* l___private_Lean_Elab_Syntax_8__antiquote(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; -x_3 = l___private_Lean_Elab_Syntax_6__antiquote___main(x_1, x_2); +x_3 = l___private_Lean_Elab_Syntax_8__antiquote___main(x_1, x_2); return x_3; } } -lean_object* l___private_Lean_Elab_Syntax_6__antiquote___boxed(lean_object* x_1, lean_object* x_2) { +lean_object* l___private_Lean_Elab_Syntax_8__antiquote___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; -x_3 = l___private_Lean_Elab_Syntax_6__antiquote(x_1, x_2); +x_3 = l___private_Lean_Elab_Syntax_8__antiquote(x_1, x_2); lean_dec(x_1); return x_3; } @@ -12888,7 +13881,7 @@ lean_dec(x_4); x_17 = lean_unsigned_to_nat(0u); x_18 = l_Lean_Syntax_getArg(x_1, x_17); lean_dec(x_1); -x_19 = l___private_Lean_Elab_Syntax_6__antiquote___main___closed__3; +x_19 = l___private_Lean_Elab_Syntax_8__antiquote___main___closed__3; x_20 = lean_array_push(x_19, x_18); x_21 = l_Lean_mkOptionalNode___closed__1; x_22 = lean_array_push(x_20, x_21); @@ -12913,7 +13906,7 @@ lean_dec(x_2); return x_4; } } -lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_7__expandNotationAux___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_9__expandNotationAux___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; @@ -12983,7 +13976,7 @@ return x_24; } } } -lean_object* l_Array_filterAux___main___at___private_Lean_Elab_Syntax_7__expandNotationAux___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Array_filterAux___main___at___private_Lean_Elab_Syntax_9__expandNotationAux___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; uint8_t x_5; @@ -13049,7 +14042,7 @@ goto _start; } } } -lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_7__expandNotationAux___spec__3(lean_object* x_1, lean_object* x_2) { +lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_9__expandNotationAux___spec__3(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; uint8_t x_4; @@ -13083,7 +14076,7 @@ goto _start; } } } -lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_7__expandNotationAux___spec__4(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_9__expandNotationAux___spec__4(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; @@ -13153,7 +14146,7 @@ return x_24; } } } -lean_object* _init_l___private_Lean_Elab_Syntax_7__expandNotationAux___closed__1() { +lean_object* _init_l___private_Lean_Elab_Syntax_9__expandNotationAux___closed__1() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; @@ -13165,27 +14158,27 @@ lean_ctor_set(x_3, 1, x_2); return x_3; } } -lean_object* _init_l___private_Lean_Elab_Syntax_7__expandNotationAux___closed__2() { +lean_object* _init_l___private_Lean_Elab_Syntax_9__expandNotationAux___closed__2() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Array_empty___closed__1; -x_2 = l___private_Lean_Elab_Syntax_7__expandNotationAux___closed__1; +x_2 = l___private_Lean_Elab_Syntax_9__expandNotationAux___closed__1; x_3 = lean_array_push(x_1, x_2); return x_3; } } -lean_object* _init_l___private_Lean_Elab_Syntax_7__expandNotationAux___closed__3() { +lean_object* _init_l___private_Lean_Elab_Syntax_9__expandNotationAux___closed__3() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l___private_Lean_Elab_Syntax_7__expandNotationAux___closed__2; +x_1 = l___private_Lean_Elab_Syntax_9__expandNotationAux___closed__2; x_2 = l___private_Lean_Elab_Quotation_8__letBindRhss___main___closed__17; x_3 = lean_array_push(x_1, x_2); return x_3; } } -lean_object* _init_l___private_Lean_Elab_Syntax_7__expandNotationAux___closed__4() { +lean_object* _init_l___private_Lean_Elab_Syntax_9__expandNotationAux___closed__4() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; @@ -13195,17 +14188,17 @@ x_3 = lean_array_push(x_1, x_2); return x_3; } } -lean_object* _init_l___private_Lean_Elab_Syntax_7__expandNotationAux___closed__5() { +lean_object* _init_l___private_Lean_Elab_Syntax_9__expandNotationAux___closed__5() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l___private_Lean_Elab_Syntax_7__expandNotationAux___closed__4; +x_1 = l___private_Lean_Elab_Syntax_9__expandNotationAux___closed__4; x_2 = l___private_Lean_Elab_Binders_11__expandFunBindersAux___main___closed__6; x_3 = lean_array_push(x_1, x_2); return x_3; } } -lean_object* _init_l___private_Lean_Elab_Syntax_7__expandNotationAux___closed__6() { +lean_object* _init_l___private_Lean_Elab_Syntax_9__expandNotationAux___closed__6() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; @@ -13215,7 +14208,7 @@ x_3 = lean_array_push(x_1, x_2); return x_3; } } -lean_object* l___private_Lean_Elab_Syntax_7__expandNotationAux(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +lean_object* l___private_Lean_Elab_Syntax_9__expandNotationAux(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; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; @@ -13231,7 +14224,7 @@ lean_inc(x_3); x_11 = x_3; x_12 = lean_unsigned_to_nat(0u); lean_inc(x_11); -x_13 = lean_alloc_closure((void*)(l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_7__expandNotationAux___spec__1___boxed), 4, 2); +x_13 = lean_alloc_closure((void*)(l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_9__expandNotationAux___spec__1___boxed), 4, 2); lean_closure_set(x_13, 0, x_12); lean_closure_set(x_13, 1, x_11); x_14 = x_13; @@ -13246,13 +14239,13 @@ x_17 = lean_ctor_get(x_15, 1); lean_inc(x_17); lean_dec(x_15); x_18 = l_Lean_mkIdentFrom(x_1, x_7); -x_19 = l_Array_filterAux___main___at___private_Lean_Elab_Syntax_7__expandNotationAux___spec__2(x_3, x_12, x_12); +x_19 = l_Array_filterAux___main___at___private_Lean_Elab_Syntax_9__expandNotationAux___spec__2(x_3, x_12, x_12); x_20 = x_19; -x_21 = l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_7__expandNotationAux___spec__3(x_12, x_20); +x_21 = l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_9__expandNotationAux___spec__3(x_12, x_20); x_22 = x_21; -x_23 = l___private_Lean_Elab_Syntax_6__antiquote___main(x_22, x_4); +x_23 = l___private_Lean_Elab_Syntax_8__antiquote___main(x_22, x_4); lean_dec(x_22); -x_24 = lean_alloc_closure((void*)(l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_7__expandNotationAux___spec__4___boxed), 4, 2); +x_24 = lean_alloc_closure((void*)(l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_9__expandNotationAux___spec__4___boxed), 4, 2); lean_closure_set(x_24, 0, x_12); lean_closure_set(x_24, 1, x_11); x_25 = x_24; @@ -13281,7 +14274,7 @@ x_35 = l_Lean_nullKind___closed__2; x_36 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_36, 0, x_35); lean_ctor_set(x_36, 1, x_34); -x_37 = l___private_Lean_Elab_Syntax_7__expandNotationAux___closed__3; +x_37 = l___private_Lean_Elab_Syntax_9__expandNotationAux___closed__3; x_38 = lean_array_push(x_37, x_36); x_39 = l_Array_empty___closed__1; x_40 = l_Array_iterateMAux___main___at_Array_append___spec__1___rarg(x_16, x_16, x_12, x_39); @@ -13327,7 +14320,7 @@ x_66 = lean_array_push(x_39, x_65); x_67 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_67, 0, x_35); lean_ctor_set(x_67, 1, x_66); -x_68 = l___private_Lean_Elab_Syntax_7__expandNotationAux___closed__5; +x_68 = l___private_Lean_Elab_Syntax_9__expandNotationAux___closed__5; x_69 = lean_array_push(x_68, x_67); x_70 = l_Lean_Parser_Command_macro__rules___elambda__1___closed__2; x_71 = lean_alloc_ctor(1, 2, 0); @@ -13358,7 +14351,7 @@ x_81 = l_Lean_nullKind___closed__2; x_82 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_82, 0, x_81); lean_ctor_set(x_82, 1, x_80); -x_83 = l___private_Lean_Elab_Syntax_7__expandNotationAux___closed__2; +x_83 = l___private_Lean_Elab_Syntax_9__expandNotationAux___closed__2; x_84 = lean_array_push(x_83, x_82); x_85 = l_Lean_mkIdentFrom(x_1, x_9); x_86 = l_Lean_Elab_Term_elabArrayLit___closed__10; @@ -13412,7 +14405,7 @@ x_118 = lean_array_push(x_79, x_117); x_119 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_119, 0, x_81); lean_ctor_set(x_119, 1, x_118); -x_120 = l___private_Lean_Elab_Syntax_7__expandNotationAux___closed__6; +x_120 = l___private_Lean_Elab_Syntax_9__expandNotationAux___closed__6; x_121 = lean_array_push(x_120, x_119); x_122 = l_Lean_Parser_Command_macro__rules___elambda__1___closed__2; x_123 = lean_alloc_ctor(1, 2, 0); @@ -13450,7 +14443,7 @@ x_134 = l_Lean_nullKind___closed__2; x_135 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_135, 0, x_134); lean_ctor_set(x_135, 1, x_133); -x_136 = l___private_Lean_Elab_Syntax_7__expandNotationAux___closed__3; +x_136 = l___private_Lean_Elab_Syntax_9__expandNotationAux___closed__3; x_137 = lean_array_push(x_136, x_135); x_138 = l_Array_empty___closed__1; x_139 = l_Array_iterateMAux___main___at_Array_append___spec__1___rarg(x_16, x_16, x_12, x_138); @@ -13496,7 +14489,7 @@ x_165 = lean_array_push(x_138, x_164); x_166 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_166, 0, x_134); lean_ctor_set(x_166, 1, x_165); -x_167 = l___private_Lean_Elab_Syntax_7__expandNotationAux___closed__5; +x_167 = l___private_Lean_Elab_Syntax_9__expandNotationAux___closed__5; x_168 = lean_array_push(x_167, x_166); x_169 = l_Lean_Parser_Command_macro__rules___elambda__1___closed__2; x_170 = lean_alloc_ctor(1, 2, 0); @@ -13529,7 +14522,7 @@ x_181 = l_Lean_nullKind___closed__2; x_182 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_182, 0, x_181); lean_ctor_set(x_182, 1, x_180); -x_183 = l___private_Lean_Elab_Syntax_7__expandNotationAux___closed__2; +x_183 = l___private_Lean_Elab_Syntax_9__expandNotationAux___closed__2; x_184 = lean_array_push(x_183, x_182); x_185 = l_Lean_mkIdentFrom(x_1, x_9); x_186 = l_Lean_Elab_Term_elabArrayLit___closed__10; @@ -13583,7 +14576,7 @@ x_218 = lean_array_push(x_179, x_217); x_219 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_219, 0, x_181); lean_ctor_set(x_219, 1, x_218); -x_220 = l___private_Lean_Elab_Syntax_7__expandNotationAux___closed__6; +x_220 = l___private_Lean_Elab_Syntax_9__expandNotationAux___closed__6; x_221 = lean_array_push(x_220, x_219); x_222 = l_Lean_Parser_Command_macro__rules___elambda__1___closed__2; x_223 = lean_alloc_ctor(1, 2, 0); @@ -13658,29 +14651,29 @@ return x_234; } } } -lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_7__expandNotationAux___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_9__expandNotationAux___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___private_Lean_Elab_Syntax_7__expandNotationAux___spec__1(x_1, x_2, x_3, x_4); +x_5 = l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_9__expandNotationAux___spec__1(x_1, x_2, x_3, x_4); lean_dec(x_3); return x_5; } } -lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_7__expandNotationAux___spec__4___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_9__expandNotationAux___spec__4___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___private_Lean_Elab_Syntax_7__expandNotationAux___spec__4(x_1, x_2, x_3, x_4); +x_5 = l_Array_umapMAux___main___at___private_Lean_Elab_Syntax_9__expandNotationAux___spec__4(x_1, x_2, x_3, x_4); lean_dec(x_3); return x_5; } } -lean_object* l___private_Lean_Elab_Syntax_7__expandNotationAux___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +lean_object* l___private_Lean_Elab_Syntax_9__expandNotationAux___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { lean_object* x_7; -x_7 = l___private_Lean_Elab_Syntax_7__expandNotationAux(x_1, x_2, x_3, x_4, x_5, x_6); +x_7 = l___private_Lean_Elab_Syntax_9__expandNotationAux(x_1, x_2, x_3, x_4, x_5, x_6); lean_dec(x_1); return x_7; } @@ -13797,7 +14790,7 @@ x_23 = l_Lean_Syntax_getArg(x_1, x_22); x_24 = l_Lean_Syntax_getArgs(x_21); lean_dec(x_21); x_25 = lean_box(0); -x_26 = l___private_Lean_Elab_Syntax_7__expandNotationAux(x_1, x_25, x_24, x_23, x_2, x_3); +x_26 = l___private_Lean_Elab_Syntax_9__expandNotationAux(x_1, x_25, x_24, x_23, x_2, x_3); lean_dec(x_1); return x_26; } @@ -13857,7 +14850,7 @@ x_43 = l_Lean_Syntax_getArgs(x_40); lean_dec(x_40); x_44 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_44, 0, x_39); -x_45 = l___private_Lean_Elab_Syntax_7__expandNotationAux(x_1, x_44, x_43, x_42, x_2, x_3); +x_45 = l___private_Lean_Elab_Syntax_9__expandNotationAux(x_1, x_44, x_43, x_42, x_2, x_3); lean_dec(x_1); return x_45; } @@ -14268,7 +15261,7 @@ lean_dec(x_4); x_12 = lean_unsigned_to_nat(0u); x_13 = l_Lean_Syntax_getArg(x_1, x_12); lean_dec(x_1); -x_14 = l___private_Lean_Elab_Syntax_6__antiquote___main___closed__3; +x_14 = l___private_Lean_Elab_Syntax_8__antiquote___main___closed__3; x_15 = lean_array_push(x_14, x_13); x_16 = l_Lean_mkOptionalNode___closed__1; x_17 = lean_array_push(x_15, x_16); @@ -14571,7 +15564,7 @@ x_50 = l_Lean_nullKind___closed__2; x_51 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_51, 0, x_50); lean_ctor_set(x_51, 1, x_49); -x_52 = l___private_Lean_Elab_Syntax_7__expandNotationAux___closed__2; +x_52 = l___private_Lean_Elab_Syntax_9__expandNotationAux___closed__2; x_53 = lean_array_push(x_52, x_51); x_54 = l_Lean_mkIdentFrom(x_1, x_17); x_55 = l_Lean_Elab_Term_elabArrayLit___closed__10; @@ -14625,7 +15618,7 @@ x_87 = lean_array_push(x_48, x_86); x_88 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_88, 0, x_50); lean_ctor_set(x_88, 1, x_87); -x_89 = l___private_Lean_Elab_Syntax_7__expandNotationAux___closed__6; +x_89 = l___private_Lean_Elab_Syntax_9__expandNotationAux___closed__6; x_90 = lean_array_push(x_89, x_88); x_91 = l_Lean_Parser_Command_macro__rules___elambda__1___closed__2; x_92 = lean_alloc_ctor(1, 2, 0); @@ -14650,7 +15643,7 @@ x_99 = l_Lean_nullKind___closed__2; x_100 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_100, 0, x_99); lean_ctor_set(x_100, 1, x_98); -x_101 = l___private_Lean_Elab_Syntax_7__expandNotationAux___closed__2; +x_101 = l___private_Lean_Elab_Syntax_9__expandNotationAux___closed__2; x_102 = lean_array_push(x_101, x_100); x_103 = l_Lean_mkIdentFrom(x_1, x_17); x_104 = l_Lean_Elab_Term_elabArrayLit___closed__10; @@ -14699,7 +15692,7 @@ x_133 = lean_array_push(x_97, x_132); x_134 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_134, 0, x_99); lean_ctor_set(x_134, 1, x_133); -x_135 = l___private_Lean_Elab_Syntax_7__expandNotationAux___closed__6; +x_135 = l___private_Lean_Elab_Syntax_9__expandNotationAux___closed__6; x_136 = lean_array_push(x_135, x_134); x_137 = l_Lean_Parser_Command_macro__rules___elambda__1___closed__2; x_138 = lean_alloc_ctor(1, 2, 0); @@ -14745,7 +15738,7 @@ x_153 = l_Lean_nullKind___closed__2; x_154 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_154, 0, x_153); lean_ctor_set(x_154, 1, x_152); -x_155 = l___private_Lean_Elab_Syntax_7__expandNotationAux___closed__2; +x_155 = l___private_Lean_Elab_Syntax_9__expandNotationAux___closed__2; x_156 = lean_array_push(x_155, x_154); x_157 = l_Lean_mkIdentFrom(x_1, x_17); x_158 = l_Lean_Elab_Term_elabArrayLit___closed__10; @@ -14799,7 +15792,7 @@ x_190 = lean_array_push(x_151, x_189); x_191 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_191, 0, x_153); lean_ctor_set(x_191, 1, x_190); -x_192 = l___private_Lean_Elab_Syntax_7__expandNotationAux___closed__6; +x_192 = l___private_Lean_Elab_Syntax_9__expandNotationAux___closed__6; x_193 = lean_array_push(x_192, x_191); x_194 = l_Lean_Parser_Command_macro__rules___elambda__1___closed__2; x_195 = lean_alloc_ctor(1, 2, 0); @@ -14826,7 +15819,7 @@ x_203 = l_Lean_nullKind___closed__2; x_204 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_204, 0, x_203); lean_ctor_set(x_204, 1, x_202); -x_205 = l___private_Lean_Elab_Syntax_7__expandNotationAux___closed__2; +x_205 = l___private_Lean_Elab_Syntax_9__expandNotationAux___closed__2; x_206 = lean_array_push(x_205, x_204); x_207 = l_Lean_mkIdentFrom(x_1, x_17); x_208 = l_Lean_Elab_Term_elabArrayLit___closed__10; @@ -14875,7 +15868,7 @@ x_237 = lean_array_push(x_201, x_236); x_238 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_238, 0, x_203); lean_ctor_set(x_238, 1, x_237); -x_239 = l___private_Lean_Elab_Syntax_7__expandNotationAux___closed__6; +x_239 = l___private_Lean_Elab_Syntax_9__expandNotationAux___closed__6; x_240 = lean_array_push(x_239, x_238); x_241 = l_Lean_Parser_Command_macro__rules___elambda__1___closed__2; x_242 = lean_alloc_ctor(1, 2, 0); @@ -15055,7 +16048,7 @@ x_5 = l_Lean_KeyedDeclsAttribute_addBuiltin___rarg(x_2, x_3, x_4, x_1); return x_5; } } -lean_object* _init_l___private_Lean_Elab_Syntax_8__regTraceClasses___closed__1() { +lean_object* _init_l___private_Lean_Elab_Syntax_10__regTraceClasses___closed__1() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; @@ -15065,11 +16058,11 @@ x_3 = lean_name_mk_string(x_1, x_2); return x_3; } } -lean_object* l___private_Lean_Elab_Syntax_8__regTraceClasses(lean_object* x_1) { +lean_object* l___private_Lean_Elab_Syntax_10__regTraceClasses(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; -x_2 = l___private_Lean_Elab_Syntax_8__regTraceClasses___closed__1; +x_2 = l___private_Lean_Elab_Syntax_10__regTraceClasses___closed__1; x_3 = l_Lean_registerTraceClass(x_2, x_1); if (lean_obj_tag(x_3) == 0) { @@ -15414,10 +16407,134 @@ l_Lean_Elab_Term_toParserDescrAux___main___closed__119 = _init_l_Lean_Elab_Term_ lean_mark_persistent(l_Lean_Elab_Term_toParserDescrAux___main___closed__119); l_Lean_Elab_Term_toParserDescrAux___main___closed__120 = _init_l_Lean_Elab_Term_toParserDescrAux___main___closed__120(); lean_mark_persistent(l_Lean_Elab_Term_toParserDescrAux___main___closed__120); -l_Lean_Elab_Term_toParserDescrAux___main___closed__121 = _init_l_Lean_Elab_Term_toParserDescrAux___main___closed__121(); -lean_mark_persistent(l_Lean_Elab_Term_toParserDescrAux___main___closed__121); -l_Lean_Elab_Term_toParserDescrAux___main___closed__122 = _init_l_Lean_Elab_Term_toParserDescrAux___main___closed__122(); -lean_mark_persistent(l_Lean_Elab_Term_toParserDescrAux___main___closed__122); +l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__1 = _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__1(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__1); +l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__2 = _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__2(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__2); +l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__3 = _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__3(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__3); +l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__4 = _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__4(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__4); +l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__5 = _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__5(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__5); +l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__6 = _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__6(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__6); +l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__7 = _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__7(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__7); +l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__8 = _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__8(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__8); +l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__9 = _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__9(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__9); +l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__10 = _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__10(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__10); +l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__11 = _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__11(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__11); +l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__12 = _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__12(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__12); +l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__13 = _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__13(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__13); +l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__14 = _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__14(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__14); +l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__15 = _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__15(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__15); +l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__16 = _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__16(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__16); +l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__17 = _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__17(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__17); +l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__18 = _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__18(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__18); +l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__19 = _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__19(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__19); +l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__20 = _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__20(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__20); +l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__21 = _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__21(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__21); +l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__22 = _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__22(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__22); +l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__23 = _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__23(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__23); +l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__24 = _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__24(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__24); +l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__25 = _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__25(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__25); +l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__26 = _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__26(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__26); +l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__27 = _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__27(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__27); +l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__28 = _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__28(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__28); +l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__29 = _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__29(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__29); +l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__30 = _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__30(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__30); +l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__31 = _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__31(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__31); +l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__32 = _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__32(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__32); +l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__33 = _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__33(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__33); +l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__34 = _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__34(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__34); +l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__35 = _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__35(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__35); +l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__36 = _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__36(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__36); +l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__37 = _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__37(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__37); +l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__38 = _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__38(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__38); +l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__39 = _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__39(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__39); +l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__40 = _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__40(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__40); +l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__41 = _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__41(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__41); +l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__42 = _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__42(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__42); +l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__43 = _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__43(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__43); +l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__44 = _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__44(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__44); +l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__45 = _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__45(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__45); +l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__46 = _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__46(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__46); +l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__47 = _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__47(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__47); +l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__48 = _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__48(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__48); +l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__49 = _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__49(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__49); +l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__50 = _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__50(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__50); +l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__51 = _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__51(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__51); +l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__52 = _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__52(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__52); +l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__53 = _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__53(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__53); +l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__54 = _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__54(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__54); +l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__55 = _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__55(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__55); +l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__56 = _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__56(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__56); +l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__57 = _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__57(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__57); +l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__58 = _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__58(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__58); +l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__59 = _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__59(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__59); +l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__60 = _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__60(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__60); +l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__61 = _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__61(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__61); +l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__62 = _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__62(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__62); +l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__63 = _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__63(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__63); +l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__64 = _init_l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__64(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__64); l___regBuiltin_Lean_Elab_Command_elabDeclareSyntaxCat___closed__1 = _init_l___regBuiltin_Lean_Elab_Command_elabDeclareSyntaxCat___closed__1(); lean_mark_persistent(l___regBuiltin_Lean_Elab_Command_elabDeclareSyntaxCat___closed__1); res = l___regBuiltin_Lean_Elab_Command_elabDeclareSyntaxCat(lean_io_mk_world()); @@ -15471,34 +16588,6 @@ l_Lean_Elab_Command_elabSyntax___closed__21 = _init_l_Lean_Elab_Command_elabSynt lean_mark_persistent(l_Lean_Elab_Command_elabSyntax___closed__21); l_Lean_Elab_Command_elabSyntax___closed__22 = _init_l_Lean_Elab_Command_elabSyntax___closed__22(); lean_mark_persistent(l_Lean_Elab_Command_elabSyntax___closed__22); -l_Lean_Elab_Command_elabSyntax___closed__23 = _init_l_Lean_Elab_Command_elabSyntax___closed__23(); -lean_mark_persistent(l_Lean_Elab_Command_elabSyntax___closed__23); -l_Lean_Elab_Command_elabSyntax___closed__24 = _init_l_Lean_Elab_Command_elabSyntax___closed__24(); -lean_mark_persistent(l_Lean_Elab_Command_elabSyntax___closed__24); -l_Lean_Elab_Command_elabSyntax___closed__25 = _init_l_Lean_Elab_Command_elabSyntax___closed__25(); -lean_mark_persistent(l_Lean_Elab_Command_elabSyntax___closed__25); -l_Lean_Elab_Command_elabSyntax___closed__26 = _init_l_Lean_Elab_Command_elabSyntax___closed__26(); -lean_mark_persistent(l_Lean_Elab_Command_elabSyntax___closed__26); -l_Lean_Elab_Command_elabSyntax___closed__27 = _init_l_Lean_Elab_Command_elabSyntax___closed__27(); -lean_mark_persistent(l_Lean_Elab_Command_elabSyntax___closed__27); -l_Lean_Elab_Command_elabSyntax___closed__28 = _init_l_Lean_Elab_Command_elabSyntax___closed__28(); -lean_mark_persistent(l_Lean_Elab_Command_elabSyntax___closed__28); -l_Lean_Elab_Command_elabSyntax___closed__29 = _init_l_Lean_Elab_Command_elabSyntax___closed__29(); -lean_mark_persistent(l_Lean_Elab_Command_elabSyntax___closed__29); -l_Lean_Elab_Command_elabSyntax___closed__30 = _init_l_Lean_Elab_Command_elabSyntax___closed__30(); -lean_mark_persistent(l_Lean_Elab_Command_elabSyntax___closed__30); -l_Lean_Elab_Command_elabSyntax___closed__31 = _init_l_Lean_Elab_Command_elabSyntax___closed__31(); -lean_mark_persistent(l_Lean_Elab_Command_elabSyntax___closed__31); -l_Lean_Elab_Command_elabSyntax___closed__32 = _init_l_Lean_Elab_Command_elabSyntax___closed__32(); -lean_mark_persistent(l_Lean_Elab_Command_elabSyntax___closed__32); -l_Lean_Elab_Command_elabSyntax___closed__33 = _init_l_Lean_Elab_Command_elabSyntax___closed__33(); -lean_mark_persistent(l_Lean_Elab_Command_elabSyntax___closed__33); -l_Lean_Elab_Command_elabSyntax___closed__34 = _init_l_Lean_Elab_Command_elabSyntax___closed__34(); -lean_mark_persistent(l_Lean_Elab_Command_elabSyntax___closed__34); -l_Lean_Elab_Command_elabSyntax___closed__35 = _init_l_Lean_Elab_Command_elabSyntax___closed__35(); -lean_mark_persistent(l_Lean_Elab_Command_elabSyntax___closed__35); -l_Lean_Elab_Command_elabSyntax___closed__36 = _init_l_Lean_Elab_Command_elabSyntax___closed__36(); -lean_mark_persistent(l_Lean_Elab_Command_elabSyntax___closed__36); l___regBuiltin_Lean_Elab_Command_elabSyntax___closed__1 = _init_l___regBuiltin_Lean_Elab_Command_elabSyntax___closed__1(); lean_mark_persistent(l___regBuiltin_Lean_Elab_Command_elabSyntax___closed__1); res = l___regBuiltin_Lean_Elab_Command_elabSyntax(lean_io_mk_world()); @@ -15625,24 +16714,24 @@ lean_mark_persistent(l___regBuiltin_Lean_Elab_Command_elabReserve___closed__1); res = l___regBuiltin_Lean_Elab_Command_elabReserve(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); -l___private_Lean_Elab_Syntax_6__antiquote___main___closed__1 = _init_l___private_Lean_Elab_Syntax_6__antiquote___main___closed__1(); -lean_mark_persistent(l___private_Lean_Elab_Syntax_6__antiquote___main___closed__1); -l___private_Lean_Elab_Syntax_6__antiquote___main___closed__2 = _init_l___private_Lean_Elab_Syntax_6__antiquote___main___closed__2(); -lean_mark_persistent(l___private_Lean_Elab_Syntax_6__antiquote___main___closed__2); -l___private_Lean_Elab_Syntax_6__antiquote___main___closed__3 = _init_l___private_Lean_Elab_Syntax_6__antiquote___main___closed__3(); -lean_mark_persistent(l___private_Lean_Elab_Syntax_6__antiquote___main___closed__3); -l___private_Lean_Elab_Syntax_7__expandNotationAux___closed__1 = _init_l___private_Lean_Elab_Syntax_7__expandNotationAux___closed__1(); -lean_mark_persistent(l___private_Lean_Elab_Syntax_7__expandNotationAux___closed__1); -l___private_Lean_Elab_Syntax_7__expandNotationAux___closed__2 = _init_l___private_Lean_Elab_Syntax_7__expandNotationAux___closed__2(); -lean_mark_persistent(l___private_Lean_Elab_Syntax_7__expandNotationAux___closed__2); -l___private_Lean_Elab_Syntax_7__expandNotationAux___closed__3 = _init_l___private_Lean_Elab_Syntax_7__expandNotationAux___closed__3(); -lean_mark_persistent(l___private_Lean_Elab_Syntax_7__expandNotationAux___closed__3); -l___private_Lean_Elab_Syntax_7__expandNotationAux___closed__4 = _init_l___private_Lean_Elab_Syntax_7__expandNotationAux___closed__4(); -lean_mark_persistent(l___private_Lean_Elab_Syntax_7__expandNotationAux___closed__4); -l___private_Lean_Elab_Syntax_7__expandNotationAux___closed__5 = _init_l___private_Lean_Elab_Syntax_7__expandNotationAux___closed__5(); -lean_mark_persistent(l___private_Lean_Elab_Syntax_7__expandNotationAux___closed__5); -l___private_Lean_Elab_Syntax_7__expandNotationAux___closed__6 = _init_l___private_Lean_Elab_Syntax_7__expandNotationAux___closed__6(); -lean_mark_persistent(l___private_Lean_Elab_Syntax_7__expandNotationAux___closed__6); +l___private_Lean_Elab_Syntax_8__antiquote___main___closed__1 = _init_l___private_Lean_Elab_Syntax_8__antiquote___main___closed__1(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_8__antiquote___main___closed__1); +l___private_Lean_Elab_Syntax_8__antiquote___main___closed__2 = _init_l___private_Lean_Elab_Syntax_8__antiquote___main___closed__2(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_8__antiquote___main___closed__2); +l___private_Lean_Elab_Syntax_8__antiquote___main___closed__3 = _init_l___private_Lean_Elab_Syntax_8__antiquote___main___closed__3(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_8__antiquote___main___closed__3); +l___private_Lean_Elab_Syntax_9__expandNotationAux___closed__1 = _init_l___private_Lean_Elab_Syntax_9__expandNotationAux___closed__1(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_9__expandNotationAux___closed__1); +l___private_Lean_Elab_Syntax_9__expandNotationAux___closed__2 = _init_l___private_Lean_Elab_Syntax_9__expandNotationAux___closed__2(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_9__expandNotationAux___closed__2); +l___private_Lean_Elab_Syntax_9__expandNotationAux___closed__3 = _init_l___private_Lean_Elab_Syntax_9__expandNotationAux___closed__3(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_9__expandNotationAux___closed__3); +l___private_Lean_Elab_Syntax_9__expandNotationAux___closed__4 = _init_l___private_Lean_Elab_Syntax_9__expandNotationAux___closed__4(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_9__expandNotationAux___closed__4); +l___private_Lean_Elab_Syntax_9__expandNotationAux___closed__5 = _init_l___private_Lean_Elab_Syntax_9__expandNotationAux___closed__5(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_9__expandNotationAux___closed__5); +l___private_Lean_Elab_Syntax_9__expandNotationAux___closed__6 = _init_l___private_Lean_Elab_Syntax_9__expandNotationAux___closed__6(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_9__expandNotationAux___closed__6); l___regBuiltin_Lean_Elab_Command_expandNotation___closed__1 = _init_l___regBuiltin_Lean_Elab_Command_expandNotation___closed__1(); lean_mark_persistent(l___regBuiltin_Lean_Elab_Command_expandNotation___closed__1); res = l___regBuiltin_Lean_Elab_Command_expandNotation(lean_io_mk_world()); @@ -15653,9 +16742,9 @@ lean_mark_persistent(l___regBuiltin_Lean_Elab_Command_expandMacro___closed__1); res = l___regBuiltin_Lean_Elab_Command_expandMacro(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); -l___private_Lean_Elab_Syntax_8__regTraceClasses___closed__1 = _init_l___private_Lean_Elab_Syntax_8__regTraceClasses___closed__1(); -lean_mark_persistent(l___private_Lean_Elab_Syntax_8__regTraceClasses___closed__1); -res = l___private_Lean_Elab_Syntax_8__regTraceClasses(lean_io_mk_world()); +l___private_Lean_Elab_Syntax_10__regTraceClasses___closed__1 = _init_l___private_Lean_Elab_Syntax_10__regTraceClasses___closed__1(); +lean_mark_persistent(l___private_Lean_Elab_Syntax_10__regTraceClasses___closed__1); +res = l___private_Lean_Elab_Syntax_10__regTraceClasses(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); return lean_mk_io_result(lean_box(0)); diff --git a/stage0/stdlib/Lean/Eval.c b/stage0/stdlib/Lean/Eval.c index c529c66f79..c6954662a5 100644 --- a/stage0/stdlib/Lean/Eval.c +++ b/stage0/stdlib/Lean/Eval.c @@ -13,16 +13,19 @@ #ifdef __cplusplus extern "C" { #endif +extern lean_object* l_EIO_Monad___closed__1; lean_object* l_Lean_MetaIO_metaHasEval___rarg(lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*); lean_object* l_Lean_MetaIO_getOptions(lean_object*, lean_object*); lean_object* l_Lean_metaHasEvalOfHasEval(lean_object*); -lean_object* l_Lean_MetaIO_monadIO(lean_object*); -lean_object* l_Lean_MetaIO_monadIO___rarg(lean_object*, lean_object*, lean_object*); +extern lean_object* l_IO_MonadIO; +lean_object* l_ReaderT_monadIO___rarg(lean_object*, lean_object*); +lean_object* l_Lean_MetaIO_monadIO; lean_object* l_Lean_metaHasEvalOfHasEval___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_MetaIO_monadIO___rarg___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_MetaIO_metaHasEval___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_MetaIO_getEnv___boxed(lean_object*, lean_object*); lean_object* l_Lean_metaHasEvalOfHasEval___rarg(lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*); +lean_object* l_Lean_MetaIO_monadIO___closed__1; +lean_object* l_Lean_MetaIO_monadIO___closed__2; lean_object* l_Lean_MetaIO_metaHasEval(lean_object*); lean_object* l_Lean_MetaIO_getOptions___boxed(lean_object*, lean_object*); lean_object* l_Lean_MetaIO_getEnv(lean_object*, lean_object*); @@ -165,29 +168,47 @@ x_8 = l_Lean_MetaIO_metaHasEval___rarg(x_1, x_2, x_3, x_4, x_7, x_6); return x_8; } } -lean_object* l_Lean_MetaIO_monadIO___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* _init_l_Lean_MetaIO_monadIO___closed__1() { _start: { -lean_object* x_4; -x_4 = lean_apply_1(x_1, x_3); -return x_4; +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_EIO_Monad___closed__1; +x_2 = l_IO_MonadIO; +x_3 = l_ReaderT_monadIO___rarg(x_1, x_2); +return x_3; } } -lean_object* l_Lean_MetaIO_monadIO(lean_object* x_1) { +lean_object* _init_l_Lean_MetaIO_monadIO___closed__2() { _start: { -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_MetaIO_monadIO___rarg___boxed), 3, 0); -return x_2; +lean_object* x_1; uint8_t x_2; +x_1 = l_Lean_MetaIO_monadIO___closed__1; +x_2 = !lean_is_exclusive(x_1); +if (x_2 == 0) +{ +return x_1; +} +else +{ +lean_object* x_3; lean_object* x_4; lean_object* x_5; +x_3 = lean_ctor_get(x_1, 0); +x_4 = lean_ctor_get(x_1, 1); +lean_inc(x_4); +lean_inc(x_3); +lean_dec(x_1); +x_5 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_5, 0, x_3); +lean_ctor_set(x_5, 1, x_4); +return x_5; } } -lean_object* l_Lean_MetaIO_monadIO___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +} +lean_object* _init_l_Lean_MetaIO_monadIO() { _start: { -lean_object* x_4; -x_4 = l_Lean_MetaIO_monadIO___rarg(x_1, x_2, x_3); -lean_dec(x_2); -return x_4; +lean_object* x_1; +x_1 = l_Lean_MetaIO_monadIO___closed__2; +return x_1; } } lean_object* initialize_Init_Control_Reader(lean_object*); @@ -207,6 +228,12 @@ lean_dec_ref(res); res = initialize_Lean_Environment(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); +l_Lean_MetaIO_monadIO___closed__1 = _init_l_Lean_MetaIO_monadIO___closed__1(); +lean_mark_persistent(l_Lean_MetaIO_monadIO___closed__1); +l_Lean_MetaIO_monadIO___closed__2 = _init_l_Lean_MetaIO_monadIO___closed__2(); +lean_mark_persistent(l_Lean_MetaIO_monadIO___closed__2); +l_Lean_MetaIO_monadIO = _init_l_Lean_MetaIO_monadIO(); +lean_mark_persistent(l_Lean_MetaIO_monadIO); return lean_mk_io_result(lean_box(0)); } #ifdef __cplusplus diff --git a/stage0/stdlib/Lean/Meta/Basic.c b/stage0/stdlib/Lean/Meta/Basic.c index a158e68e6b..4b3d58dd50 100644 --- a/stage0/stdlib/Lean/Meta/Basic.c +++ b/stage0/stdlib/Lean/Meta/Basic.c @@ -45,7 +45,6 @@ lean_object* l_Lean_Meta_throwBug(lean_object*); lean_object* l_Lean_Meta_whnfForall(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_MetavarContext_instantiateMVars(lean_object*, lean_object*); lean_object* l_Lean_Meta_dbgTrace___rarg(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* lean_io_prim_put_str(lean_object*, lean_object*); lean_object* l_Lean_Meta_InfoCacheKey_Inhabited; lean_object* l_Lean_Meta_getEnv(lean_object*); lean_object* l_Lean_Meta_withNewLocalInstances___main___at_Lean_Meta_forallTelescope___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -138,6 +137,7 @@ lean_object* l_Lean_Meta_MetaM_inhabited___rarg(lean_object*); lean_object* l_Lean_Meta_TransparencyMode_Hashable___closed__1; lean_object* l_Lean_Meta_getEnv___rarg(lean_object*); lean_object* l_Lean_MetavarContext_hasAssignableMVar___main(lean_object*, lean_object*); +extern lean_object* l_IO_FS_Handle_putStrLn___rarg___closed__1; lean_object* l_Lean_Meta_getConfig___boxed(lean_object*, lean_object*); uint8_t lean_metavar_ctx_is_expr_assigned(lean_object*, lean_object*); extern lean_object* l_Lean_LocalContext_Inhabited___closed__2; @@ -225,7 +225,6 @@ lean_object* l_Lean_Meta_metaExt___closed__1; lean_object* l_Lean_Meta_run___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_ReaderT_pure___at_Lean_Meta_MetaExtState_inhabited___spec__1(lean_object*); lean_object* l_Lean_Meta_InfoCacheKey_HasBeq___boxed(lean_object*, lean_object*); -extern lean_object* l_IO_println___rarg___closed__1; lean_object* l_Lean_Meta_setMVarKind(lean_object*, uint8_t, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Basic_4__forallTelescopeReducingAuxAux___main___at_Lean_Meta_isClassExpensive___main___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_PersistentArray_empty___closed__3; @@ -294,6 +293,7 @@ lean_object* l_Lean_Meta_withNewLocalInstances___main___at_Lean_Meta_forallBound extern lean_object* l___private_Lean_Environment_5__envExtensionsRef; lean_object* l_Lean_Meta_forallMetaTelescopeReducing(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*); lean_object* l_Lean_Meta_isDelayedAssigned___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l___private_Init_System_IO_1__putStr___at_Lean_HasRepr_hasEval___spec__3(lean_object*, lean_object*); lean_object* l_Lean_Meta_approxDefEq(lean_object*); lean_object* l_Lean_Meta_shouldReduceReducibleOnly___boxed(lean_object*, lean_object*); lean_object* l_Lean_Meta_mkIsExprDefEqAuxRef(lean_object*); @@ -50205,7 +50205,7 @@ _start: lean_object* x_3; lean_object* x_4; lean_object* x_5; x_3 = l_Lean_Options_empty; x_4 = l_Lean_Format_pretty(x_1, x_3); -x_5 = lean_io_prim_put_str(x_4, x_2); +x_5 = l___private_Init_System_IO_1__putStr___at_Lean_HasRepr_hasEval___spec__3(x_4, x_2); lean_dec(x_4); return x_5; } @@ -50221,8 +50221,8 @@ lean_object* x_4; lean_object* x_5; lean_object* x_6; x_4 = lean_ctor_get(x_3, 1); lean_inc(x_4); lean_dec(x_3); -x_5 = l_IO_println___rarg___closed__1; -x_6 = lean_io_prim_put_str(x_5, x_4); +x_5 = l_IO_FS_Handle_putStrLn___rarg___closed__1; +x_6 = l___private_Init_System_IO_1__putStr___at_Lean_HasRepr_hasEval___spec__3(x_5, x_4); return x_6; } else diff --git a/stage0/stdlib/Lean/Meta/RecursorInfo.c b/stage0/stdlib/Lean/Meta/RecursorInfo.c index 9759c8e58b..dfb5ef70bc 100644 --- a/stage0/stdlib/Lean/Meta/RecursorInfo.c +++ b/stage0/stdlib/Lean/Meta/RecursorInfo.c @@ -97,6 +97,7 @@ lean_object* l___private_Lean_Meta_RecursorInfo_1__mkRecursorInfoForKernelRec___ lean_object* l___private_Lean_Meta_RecursorInfo_5__getMajorPosDepElim(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_RecursorInfo_HasToString___closed__4; lean_object* l___private_Lean_Meta_RecursorInfo_1__mkRecursorInfoForKernelRec___closed__2; +extern lean_object* l_IO_FS_Handle_putStrLn___rarg___closed__1; lean_object* l_Lean_Expr_getAppNumArgsAux___main(lean_object*, lean_object*); lean_object* l_List_replicate___rarg(lean_object*, lean_object*); lean_object* l_Lean_Meta_casesOnSuffix; @@ -170,7 +171,6 @@ lean_object* l_List_toString___at_Lean_Meta_RecursorInfo_HasToString___spec__7__ lean_object* l_Array_back___at___private_Lean_Meta_ExprDefEq_14__processAssignmentFOApproxAux___spec__1(lean_object*); extern lean_object* l_List_reprAux___main___rarg___closed__1; lean_object* l___private_Lean_Meta_RecursorInfo_5__getMajorPosDepElim___closed__3; -extern lean_object* l_IO_println___rarg___closed__1; lean_object* l_Lean_Meta_RecursorInfo_HasToString(lean_object*); lean_object* l_List_toStringAux___main___at_Lean_Meta_RecursorInfo_HasToString___spec__8___closed__1; lean_object* l___private_Lean_Meta_RecursorInfo_10__getProduceMotiveAndRecursive___closed__1; @@ -1158,7 +1158,7 @@ x_4 = l_Lean_Name_toStringWithSep___main(x_3, x_2); x_5 = l_Lean_Meta_RecursorInfo_HasToString___closed__3; x_6 = lean_string_append(x_5, x_4); lean_dec(x_4); -x_7 = l_IO_println___rarg___closed__1; +x_7 = l_IO_FS_Handle_putStrLn___rarg___closed__1; x_8 = lean_string_append(x_6, x_7); x_9 = l_Lean_Meta_RecursorInfo_HasToString___closed__4; x_10 = lean_string_append(x_8, x_9); diff --git a/stage0/stdlib/Lean/Parser/Module.c b/stage0/stdlib/Lean/Parser/Module.c index d7f842a1c0..23e221e381 100644 --- a/stage0/stdlib/Lean/Parser/Module.c +++ b/stage0/stdlib/Lean/Parser/Module.c @@ -24,7 +24,6 @@ lean_object* lean_io_timeit(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Module_import___closed__4; lean_object* l_unreachable_x21___rarg(lean_object*); extern lean_object* l_Lean_nullKind; -lean_object* lean_io_prim_put_str(lean_object*, lean_object*); lean_object* l_Lean_Parser_parseHeader(lean_object*, lean_object*); lean_object* l_Lean_Parser_ModuleParserState_inhabited___closed__1; lean_object* l_Lean_Parser_testModuleParser___closed__2; @@ -37,7 +36,6 @@ extern lean_object* l_Array_empty___closed__1; extern lean_object* l_Lean_Parser_ident; lean_object* l_Lean_Parser_ParserState_mkNode(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_mkParserState(lean_object*); -lean_object* l_IO_FS_Handle_getLine___at_Lean_Parser_parseFile___spec__3___boxed(lean_object*, lean_object*); lean_object* l_Lean_Parser_Module_prelude___elambda__1___closed__2; lean_object* l_Lean_Parser_Module_import; lean_object* l_Lean_Parser_Module_import___elambda__1___closed__2; @@ -50,7 +48,6 @@ lean_object* lean_array_push(lean_object*, lean_object*); lean_object* lean_array_get_size(lean_object*); lean_object* l_Lean_Parser_Module_prelude___elambda__1___closed__1; lean_object* lean_string_append(lean_object*, lean_object*); -lean_object* l_IO_FS_Handle_readToEndAux___main___at_Lean_Parser_parseFile___spec__2___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_tokenFn(lean_object*, lean_object*); lean_object* l_Lean_Parser_Module_updateTokens___closed__1; lean_object* l_Lean_Parser_Module_import___closed__9; @@ -63,6 +60,8 @@ extern lean_object* l_String_splitAux___main___closed__1; lean_object* l_Array_forMAux___main___at___private_Lean_Parser_Module_4__testModuleParserAux___main___spec__9___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Module_header___elambda__1___closed__3; lean_object* l_Lean_Parser_parseFile(lean_object*, lean_object*, lean_object*); +lean_object* l_IO_FS_Handle_mk___at_Lean_Parser_parseFile___spec__2(lean_object*, uint8_t, uint8_t, lean_object*); +lean_object* l_IO_FS_Handle_getLine___at_Lean_Parser_parseFile___spec__4___boxed(lean_object*, lean_object*); extern lean_object* l_Lean_mkAppStx___closed__4; lean_object* l_Lean_Parser_ParserState_mkErrorsAt(lean_object*, lean_object*, lean_object*); lean_object* l_IO_FS_readFile___at_Lean_Parser_parseFile___spec__1___boxed(lean_object*, lean_object*); @@ -73,12 +72,14 @@ lean_object* lean_nat_add(lean_object*, lean_object*); lean_object* l_Lean_Parser_Module_prelude___closed__4; lean_object* l___private_Lean_Parser_Module_2__mkEOI___closed__3; lean_object* l_Lean_Parser_Module_header___elambda__1___closed__1; +extern lean_object* l_IO_FS_Handle_putStrLn___rarg___closed__1; lean_object* l_Array_forMAux___main___at___private_Lean_Parser_Module_4__testModuleParserAux___main___spec__10___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_initCacheForInput(lean_object*); lean_object* l_Lean_Parser_Module_import___elambda__1___closed__4; lean_object* l_Lean_Parser_parseFileAux___main___closed__2; lean_object* l_Lean_Parser_Module_import___elambda__1___closed__11; extern lean_object* l_Lean_Parser_Command_exit___elambda__1___closed__2; +lean_object* l_IO_FS_Handle_readToEndAux___main___at_Lean_Parser_parseFile___spec__3(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Module_header___elambda__1___closed__2; lean_object* l_Array_forMAux___main___at___private_Lean_Parser_Module_4__testModuleParserAux___main___spec__8(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_array_fget(lean_object*, lean_object*); @@ -98,6 +99,7 @@ lean_object* l_Lean_Parser_Module_header___closed__8; lean_object* l_Lean_Parser_testModuleParser___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_parseCommand___main(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_IO_print___at___private_Lean_Parser_Module_4__testModuleParserAux___main___spec__2(lean_object*, lean_object*); +lean_object* l_IO_Prim_fopenFlags(uint8_t, uint8_t); lean_object* l_Array_forMAux___main___at___private_Lean_Parser_Module_4__testModuleParserAux___main___spec__10(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Char_HasRepr___closed__1; lean_object* l_Lean_Parser_Module_header___closed__6; @@ -106,12 +108,12 @@ lean_object* l_Lean_Parser_Module_prelude___elambda__1___closed__10; lean_object* l_Lean_Parser_testModuleParser___closed__1; lean_object* l_IO_println___at___private_Lean_Parser_Module_4__testModuleParserAux___main___spec__1(lean_object*, lean_object*); lean_object* lean_name_mk_string(lean_object*, lean_object*); -extern lean_object* l_IO_println___rarg___closed__1; extern lean_object* l_PersistentArray_empty___closed__3; lean_object* l_Lean_Parser_Module_prelude___elambda__1___closed__7; lean_object* l_Lean_Parser_addParserTokens(lean_object*, lean_object*); extern lean_object* l_Lean_Options_empty; lean_object* l___private_Lean_Parser_Module_4__testModuleParserAux___main___closed__1; +lean_object* l_IO_FS_Handle_readToEndAux___main___at_Lean_Parser_parseFile___spec__3___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Module_import___closed__1; uint8_t l_PersistentArray_isEmpty___rarg(lean_object*); lean_object* l___private_Lean_Parser_Module_4__testModuleParserAux___main___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -125,8 +127,10 @@ lean_object* l_Lean_Parser_ParserState_restore(lean_object*, lean_object*, lean_ lean_object* l_Lean_Parser_Module_header; lean_object* l_Lean_Parser_Module_import___closed__6; lean_object* l_Lean_Parser_Module_header___closed__5; +lean_object* l_IO_FS_Handle_getLine___at_Lean_Parser_parseFile___spec__4(lean_object*, lean_object*); lean_object* l_Lean_Parser_Module_prelude___closed__5; lean_object* l_Lean_Parser_Module_import___closed__2; +lean_object* l___private_Init_System_IO_1__putStr___at_Lean_HasRepr_hasEval___spec__3(lean_object*, lean_object*); lean_object* l_Lean_Parser_ModuleParserState_inhabited; lean_object* l_Lean_Parser_Module_prelude___elambda__1___closed__5; lean_object* l_Lean_Parser_ident___elambda__1(lean_object*, lean_object*); @@ -145,7 +149,6 @@ lean_object* l___private_Lean_Parser_Module_2__mkEOI___closed__1; lean_object* l_Lean_Parser_Module_header___closed__7; lean_object* l_Lean_Parser_Module_import___closed__7; lean_object* l_Lean_Parser_symbolInfo(lean_object*); -lean_object* l_IO_FS_Handle_getLine___at_Lean_Parser_parseFile___spec__3(lean_object*, lean_object*); extern lean_object* l_Lean_Parser_epsilonInfo; lean_object* l_Lean_Parser_Module_prelude___elambda__1___closed__6; lean_object* l_Lean_Parser_categoryParser___elambda__1(lean_object*, lean_object*, lean_object*, lean_object*); @@ -158,6 +161,7 @@ lean_object* l_Lean_Parser_Module_header___closed__3; lean_object* l_IO_print___at___private_Lean_Parser_Module_4__testModuleParserAux___main___spec__4(lean_object*, lean_object*); lean_object* l_String_trim(lean_object*); lean_object* l___private_Lean_Parser_Module_4__testModuleParserAux(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); +lean_object* l_IO_FS_Handle_mk___at_Lean_Parser_parseFile___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Syntax_isOfKind(lean_object*, lean_object*); lean_object* l_Lean_Parser_Module_import___closed__5; lean_object* l_Array_forMAux___main___at___private_Lean_Parser_Module_4__testModuleParserAux___main___spec__8___boxed(lean_object*, lean_object*, lean_object*, lean_object*); @@ -173,8 +177,6 @@ lean_object* l_Lean_Parser_Module_prelude___elambda__1___closed__3; lean_object* l_Lean_Syntax_formatStxAux___main(lean_object*, uint8_t, lean_object*, lean_object*); lean_object* l_Lean_Parser_Module_import___elambda__1___closed__9; lean_object* l_PersistentArray_forM___at___private_Lean_Parser_Module_4__testModuleParserAux___main___spec__6(lean_object*, lean_object*, lean_object*); -lean_object* l_IO_FS_Handle_readToEndAux___main___at_Lean_Parser_parseFile___spec__2(lean_object*, lean_object*, lean_object*); -lean_object* l_IO_FS_Handle_mk___at_IO_FS_withFile___spec__1(lean_object*, uint8_t, uint8_t, lean_object*); lean_object* l_Lean_Parser_ParserState_mkUnexpectedError(lean_object*, lean_object*); lean_object* l_EStateM_pure___rarg(lean_object*, lean_object*); lean_object* l_Lean_Message_toString(lean_object*); @@ -183,6 +185,7 @@ lean_object* l_Lean_Parser_parseFileAux___main(lean_object*, lean_object*, lean_ lean_object* l_Lean_Parser_Module_import___elambda__1___closed__3; uint8_t lean_string_utf8_at_end(lean_object*, lean_object*); lean_object* lean_test_module_parser(lean_object*, lean_object*, lean_object*, uint8_t, lean_object*); +lean_object* lean_io_prim_handle_mk(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Module_prelude___elambda__1___closed__4; lean_object* l_Lean_Parser_Module_import___elambda__1___closed__6; lean_object* l___private_Lean_Parser_Module_4__testModuleParserAux___main(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); @@ -2513,7 +2516,7 @@ x_5 = lean_unsigned_to_nat(0u); x_6 = l_Lean_Syntax_formatStxAux___main(x_3, x_4, x_5, x_1); x_7 = l_Lean_Options_empty; x_8 = l_Lean_Format_pretty(x_6, x_7); -x_9 = lean_io_prim_put_str(x_8, x_2); +x_9 = l___private_Init_System_IO_1__putStr___at_Lean_HasRepr_hasEval___spec__3(x_8, x_2); lean_dec(x_8); return x_9; } @@ -2529,8 +2532,8 @@ lean_object* x_4; lean_object* x_5; lean_object* x_6; x_4 = lean_ctor_get(x_3, 1); lean_inc(x_4); lean_dec(x_3); -x_5 = l_IO_println___rarg___closed__1; -x_6 = lean_io_prim_put_str(x_5, x_4); +x_5 = l_IO_FS_Handle_putStrLn___rarg___closed__1; +x_6 = l___private_Init_System_IO_1__putStr___at_Lean_HasRepr_hasEval___spec__3(x_5, x_4); return x_6; } else @@ -2562,7 +2565,7 @@ _start: { lean_object* x_3; lean_object* x_4; x_3 = l_Lean_Message_toString(x_1); -x_4 = lean_io_prim_put_str(x_3, x_2); +x_4 = l___private_Init_System_IO_1__putStr___at_Lean_HasRepr_hasEval___spec__3(x_3, x_2); lean_dec(x_3); return x_4; } @@ -2578,8 +2581,8 @@ lean_object* x_4; lean_object* x_5; lean_object* x_6; x_4 = lean_ctor_get(x_3, 1); lean_inc(x_4); lean_dec(x_3); -x_5 = l_IO_println___rarg___closed__1; -x_6 = lean_io_prim_put_str(x_5, x_4); +x_5 = l_IO_FS_Handle_putStrLn___rarg___closed__1; +x_6 = l___private_Init_System_IO_1__putStr___at_Lean_HasRepr_hasEval___spec__3(x_5, x_4); return x_6; } else @@ -3504,7 +3507,17 @@ x_7 = l_Lean_Parser_parseFileAux___main(x_1, x_2, x_3, x_4, x_5, x_6); return x_7; } } -lean_object* l_IO_FS_Handle_getLine___at_Lean_Parser_parseFile___spec__3(lean_object* x_1, lean_object* x_2) { +lean_object* l_IO_FS_Handle_mk___at_Lean_Parser_parseFile___spec__2(lean_object* x_1, uint8_t x_2, uint8_t x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; lean_object* x_6; +x_5 = l_IO_Prim_fopenFlags(x_2, x_3); +x_6 = lean_io_prim_handle_mk(x_1, x_5, x_4); +lean_dec(x_5); +return x_6; +} +} +lean_object* l_IO_FS_Handle_getLine___at_Lean_Parser_parseFile___spec__4(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; @@ -3512,7 +3525,7 @@ x_3 = lean_io_prim_handle_get_line(x_1, x_2); return x_3; } } -lean_object* l_IO_FS_Handle_readToEndAux___main___at_Lean_Parser_parseFile___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_IO_FS_Handle_readToEndAux___main___at_Lean_Parser_parseFile___spec__3(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; @@ -3610,7 +3623,7 @@ _start: uint8_t x_3; uint8_t x_4; lean_object* x_5; x_3 = 0; x_4 = 0; -x_5 = l_IO_FS_Handle_mk___at_IO_FS_withFile___spec__1(x_1, x_3, x_4, x_2); +x_5 = l_IO_FS_Handle_mk___at_Lean_Parser_parseFile___spec__2(x_1, x_3, x_4, x_2); if (lean_obj_tag(x_5) == 0) { lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; @@ -3620,7 +3633,7 @@ x_7 = lean_ctor_get(x_5, 1); lean_inc(x_7); lean_dec(x_5); x_8 = l_String_splitAux___main___closed__1; -x_9 = l_IO_FS_Handle_readToEndAux___main___at_Lean_Parser_parseFile___spec__2(x_6, x_8, x_7); +x_9 = l_IO_FS_Handle_readToEndAux___main___at_Lean_Parser_parseFile___spec__3(x_6, x_8, x_7); lean_dec(x_6); return x_9; } @@ -3739,20 +3752,33 @@ return x_26; } } } -lean_object* l_IO_FS_Handle_getLine___at_Lean_Parser_parseFile___spec__3___boxed(lean_object* x_1, lean_object* x_2) { +lean_object* l_IO_FS_Handle_mk___at_Lean_Parser_parseFile___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +uint8_t x_5; uint8_t x_6; lean_object* x_7; +x_5 = lean_unbox(x_2); +lean_dec(x_2); +x_6 = lean_unbox(x_3); +lean_dec(x_3); +x_7 = l_IO_FS_Handle_mk___at_Lean_Parser_parseFile___spec__2(x_1, x_5, x_6, x_4); +lean_dec(x_1); +return x_7; +} +} +lean_object* l_IO_FS_Handle_getLine___at_Lean_Parser_parseFile___spec__4___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; -x_3 = l_IO_FS_Handle_getLine___at_Lean_Parser_parseFile___spec__3(x_1, x_2); +x_3 = l_IO_FS_Handle_getLine___at_Lean_Parser_parseFile___spec__4(x_1, x_2); lean_dec(x_1); return x_3; } } -lean_object* l_IO_FS_Handle_readToEndAux___main___at_Lean_Parser_parseFile___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_IO_FS_Handle_readToEndAux___main___at_Lean_Parser_parseFile___spec__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; -x_4 = l_IO_FS_Handle_readToEndAux___main___at_Lean_Parser_parseFile___spec__2(x_1, x_2, x_3); +x_4 = l_IO_FS_Handle_readToEndAux___main___at_Lean_Parser_parseFile___spec__3(x_1, x_2, x_3); lean_dec(x_1); return x_4; } diff --git a/stage0/stdlib/Lean/Parser/Syntax.c b/stage0/stdlib/Lean/Parser/Syntax.c index 2719b2314b..d52038d7d8 100644 --- a/stage0/stdlib/Lean/Parser/Syntax.c +++ b/stage0/stdlib/Lean/Parser/Syntax.c @@ -45,6 +45,7 @@ lean_object* l_Lean_Parser_Syntax_many1; lean_object* l_Lean_Parser_Command_notation___elambda__1(lean_object*, lean_object*); lean_object* l_Lean_Parser_Syntax_many___elambda__1___closed__2; lean_object* l_Lean_Parser_andthenInfo(lean_object*, lean_object*); +lean_object* l_Lean_Parser_Command_macroTailCommand___closed__7; lean_object* l_Lean_Parser_Command_mixfix; lean_object* l_Lean_Parser_Command_mixfixSymbol___elambda__1(lean_object*, lean_object*); lean_object* l_Lean_Parser_Syntax_str___closed__6; @@ -672,6 +673,7 @@ lean_object* l_Lean_Parser_Command_syntax___closed__8; lean_object* l_Lean_Parser_precedence___closed__4; lean_object* l_Lean_Parser_Command_prefix___elambda__1___closed__4; lean_object* l_Lean_Parser_Syntax_num___elambda__1___closed__3; +lean_object* l_Lean_Parser_Command_macroTailTactic___closed__7; lean_object* l_Lean_Parser_Command_infixr___elambda__1___closed__2; lean_object* l_Lean_Parser_optPrecedence___closed__2; lean_object* l___regBuiltinParser_Lean_Parser_Syntax_many1(lean_object*); @@ -14088,142 +14090,284 @@ return x_1; lean_object* l_Lean_Parser_Command_macroTailTactic___elambda__1(lean_object* x_1, lean_object* x_2) { _start: { -lean_object* x_3; lean_object* x_23; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_70; lean_object* x_71; -x_42 = lean_ctor_get(x_2, 0); -lean_inc(x_42); -x_43 = lean_ctor_get(x_2, 1); -lean_inc(x_43); -x_44 = lean_array_get_size(x_42); -lean_dec(x_42); +lean_object* x_3; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_83; lean_object* x_84; +x_55 = lean_ctor_get(x_2, 0); +lean_inc(x_55); +x_56 = lean_ctor_get(x_2, 1); +lean_inc(x_56); +x_57 = lean_array_get_size(x_55); +lean_dec(x_55); lean_inc(x_1); -x_70 = l_Lean_Parser_tokenFn(x_1, x_2); -x_71 = lean_ctor_get(x_70, 3); -lean_inc(x_71); -if (lean_obj_tag(x_71) == 0) +x_83 = l_Lean_Parser_tokenFn(x_1, x_2); +x_84 = lean_ctor_get(x_83, 3); +lean_inc(x_84); +if (lean_obj_tag(x_84) == 0) { -lean_object* x_72; lean_object* x_73; -x_72 = lean_ctor_get(x_70, 0); -lean_inc(x_72); -x_73 = l_Array_back___at_Lean_Parser_checkStackTopFn___spec__1(x_72); -lean_dec(x_72); -if (lean_obj_tag(x_73) == 2) +lean_object* x_85; lean_object* x_86; +x_85 = lean_ctor_get(x_83, 0); +lean_inc(x_85); +x_86 = l_Array_back___at_Lean_Parser_checkStackTopFn___spec__1(x_85); +lean_dec(x_85); +if (lean_obj_tag(x_86) == 2) { -lean_object* x_74; lean_object* x_75; uint8_t x_76; -x_74 = lean_ctor_get(x_73, 1); -lean_inc(x_74); -lean_dec(x_73); -x_75 = l_Lean_Parser_Term_typeAscription___elambda__1___closed__5; -x_76 = lean_string_dec_eq(x_74, x_75); -lean_dec(x_74); -if (x_76 == 0) +lean_object* x_87; lean_object* x_88; uint8_t x_89; +x_87 = lean_ctor_get(x_86, 1); +lean_inc(x_87); +lean_dec(x_86); +x_88 = l_Lean_Parser_Term_typeAscription___elambda__1___closed__5; +x_89 = lean_string_dec_eq(x_87, x_88); +lean_dec(x_87); +if (x_89 == 0) { -lean_object* x_77; lean_object* x_78; -x_77 = l_Lean_Parser_Term_typeAscription___elambda__1___closed__8; -lean_inc(x_43); -x_78 = l_Lean_Parser_ParserState_mkErrorsAt(x_70, x_77, x_43); -x_45 = x_78; -goto block_69; +lean_object* x_90; lean_object* x_91; +x_90 = l_Lean_Parser_Term_typeAscription___elambda__1___closed__8; +lean_inc(x_56); +x_91 = l_Lean_Parser_ParserState_mkErrorsAt(x_83, x_90, x_56); +x_58 = x_91; +goto block_82; } else { -x_45 = x_70; -goto block_69; +x_58 = x_83; +goto block_82; } } else { -lean_object* x_79; lean_object* x_80; -lean_dec(x_73); -x_79 = l_Lean_Parser_Term_typeAscription___elambda__1___closed__8; -lean_inc(x_43); -x_80 = l_Lean_Parser_ParserState_mkErrorsAt(x_70, x_79, x_43); -x_45 = x_80; -goto block_69; +lean_object* x_92; lean_object* x_93; +lean_dec(x_86); +x_92 = l_Lean_Parser_Term_typeAscription___elambda__1___closed__8; +lean_inc(x_56); +x_93 = l_Lean_Parser_ParserState_mkErrorsAt(x_83, x_92, x_56); +x_58 = x_93; +goto block_82; } } else { -lean_object* x_81; lean_object* x_82; -lean_dec(x_71); -x_81 = l_Lean_Parser_Term_typeAscription___elambda__1___closed__8; -lean_inc(x_43); -x_82 = l_Lean_Parser_ParserState_mkErrorsAt(x_70, x_81, x_43); -x_45 = x_82; -goto block_69; +lean_object* x_94; lean_object* x_95; +lean_dec(x_84); +x_94 = l_Lean_Parser_Term_typeAscription___elambda__1___closed__8; +lean_inc(x_56); +x_95 = l_Lean_Parser_ParserState_mkErrorsAt(x_83, x_94, x_56); +x_58 = x_95; +goto block_82; } -block_22: +block_54: { lean_object* x_4; x_4 = lean_ctor_get(x_3, 3); lean_inc(x_4); if (lean_obj_tag(x_4) == 0) { -uint8_t x_5; lean_object* x_6; lean_object* x_7; -x_5 = 1; +lean_object* x_5; lean_object* x_6; lean_inc(x_1); -x_6 = l_Lean_Parser_sepBy1Fn___at_Lean_Parser_Tactic_nonEmptySeq___elambda__1___spec__1(x_5, x_5, x_1, x_3); -x_7 = lean_ctor_get(x_6, 3); +x_5 = l_Lean_Parser_darrow___elambda__1(x_1, x_3); +x_6 = lean_ctor_get(x_5, 3); +lean_inc(x_6); +if (lean_obj_tag(x_6) == 0) +{ +lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_21; lean_object* x_41; lean_object* x_42; +x_7 = lean_ctor_get(x_5, 0); lean_inc(x_7); -if (lean_obj_tag(x_7) == 0) +x_8 = lean_array_get_size(x_7); +lean_dec(x_7); +x_9 = lean_ctor_get(x_5, 1); +lean_inc(x_9); +lean_inc(x_1); +x_41 = l_Lean_Parser_tokenFn(x_1, x_5); +x_42 = lean_ctor_get(x_41, 3); +lean_inc(x_42); +if (lean_obj_tag(x_42) == 0) { -lean_object* x_8; lean_object* x_9; lean_object* x_10; -x_8 = lean_ctor_get(x_6, 1); -lean_inc(x_8); -x_9 = l_Lean_Parser_tokenFn(x_1, x_6); -x_10 = lean_ctor_get(x_9, 3); -lean_inc(x_10); -if (lean_obj_tag(x_10) == 0) +lean_object* x_43; lean_object* x_44; +x_43 = lean_ctor_get(x_41, 0); +lean_inc(x_43); +x_44 = l_Array_back___at_Lean_Parser_checkStackTopFn___spec__1(x_43); +lean_dec(x_43); +if (lean_obj_tag(x_44) == 2) { -lean_object* x_11; lean_object* x_12; -x_11 = lean_ctor_get(x_9, 0); +lean_object* x_45; lean_object* x_46; uint8_t x_47; +x_45 = lean_ctor_get(x_44, 1); +lean_inc(x_45); +lean_dec(x_44); +x_46 = l_Lean_Parser_Term_stxQuot___elambda__1___closed__4; +x_47 = lean_string_dec_eq(x_45, x_46); +lean_dec(x_45); +if (x_47 == 0) +{ +lean_object* x_48; lean_object* x_49; +x_48 = l_Lean_Parser_Term_stxQuot___elambda__1___closed__7; +lean_inc(x_9); +x_49 = l_Lean_Parser_ParserState_mkErrorsAt(x_41, x_48, x_9); +x_21 = x_49; +goto block_40; +} +else +{ +x_21 = x_41; +goto block_40; +} +} +else +{ +lean_object* x_50; lean_object* x_51; +lean_dec(x_44); +x_50 = l_Lean_Parser_Term_stxQuot___elambda__1___closed__7; +lean_inc(x_9); +x_51 = l_Lean_Parser_ParserState_mkErrorsAt(x_41, x_50, x_9); +x_21 = x_51; +goto block_40; +} +} +else +{ +lean_object* x_52; lean_object* x_53; +lean_dec(x_42); +x_52 = l_Lean_Parser_Term_stxQuot___elambda__1___closed__7; +lean_inc(x_9); +x_53 = l_Lean_Parser_ParserState_mkErrorsAt(x_41, x_52, x_9); +x_21 = x_53; +goto block_40; +} +block_20: +{ +lean_object* x_11; +x_11 = lean_ctor_get(x_10, 3); lean_inc(x_11); -x_12 = l_Array_back___at_Lean_Parser_checkStackTopFn___spec__1(x_11); -lean_dec(x_11); -if (lean_obj_tag(x_12) == 2) -{ -lean_object* x_13; lean_object* x_14; uint8_t x_15; -x_13 = lean_ctor_get(x_12, 1); -lean_inc(x_13); -lean_dec(x_12); -x_14 = l_Lean_Parser_antiquotNestedExpr___elambda__1___closed__4; -x_15 = lean_string_dec_eq(x_13, x_14); -lean_dec(x_13); -if (x_15 == 0) -{ -lean_object* x_16; lean_object* x_17; -x_16 = l_Lean_Parser_antiquotNestedExpr___elambda__1___closed__7; -x_17 = l_Lean_Parser_ParserState_mkErrorsAt(x_9, x_16, x_8); -return x_17; -} -else +if (lean_obj_tag(x_11) == 0) { +lean_dec(x_9); lean_dec(x_8); -return x_9; -} +lean_dec(x_1); +return x_10; } else { -lean_object* x_18; lean_object* x_19; +lean_object* x_12; lean_object* x_13; uint8_t x_14; +x_12 = lean_ctor_get(x_11, 0); +lean_inc(x_12); +lean_dec(x_11); +x_13 = lean_ctor_get(x_10, 1); +lean_inc(x_13); +x_14 = lean_nat_dec_eq(x_13, x_9); +lean_dec(x_13); +if (x_14 == 0) +{ lean_dec(x_12); -x_18 = l_Lean_Parser_antiquotNestedExpr___elambda__1___closed__7; -x_19 = l_Lean_Parser_ParserState_mkErrorsAt(x_9, x_18, x_8); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_1); +return x_10; +} +else +{ +lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; +lean_inc(x_9); +x_15 = l_Lean_Parser_ParserState_restore(x_10, x_8, x_9); +lean_dec(x_8); +x_16 = l_Lean_Parser_termParser___closed__2; +x_17 = lean_unsigned_to_nat(0u); +x_18 = l_Lean_Parser_categoryParser___elambda__1(x_16, x_17, x_1, x_15); +x_19 = l_Lean_Parser_mergeOrElseErrors(x_18, x_12, x_9); +lean_dec(x_9); return x_19; } } +} +block_40: +{ +lean_object* x_22; +x_22 = lean_ctor_get(x_21, 3); +lean_inc(x_22); +if (lean_obj_tag(x_22) == 0) +{ +uint8_t x_23; lean_object* x_24; lean_object* x_25; +x_23 = 1; +lean_inc(x_1); +x_24 = l_Lean_Parser_sepBy1Fn___at_Lean_Parser_Tactic_nonEmptySeq___elambda__1___spec__1(x_23, x_23, x_1, x_21); +x_25 = lean_ctor_get(x_24, 3); +lean_inc(x_25); +if (lean_obj_tag(x_25) == 0) +{ +lean_object* x_26; lean_object* x_27; lean_object* x_28; +x_26 = lean_ctor_get(x_24, 1); +lean_inc(x_26); +lean_inc(x_1); +x_27 = l_Lean_Parser_tokenFn(x_1, x_24); +x_28 = lean_ctor_get(x_27, 3); +lean_inc(x_28); +if (lean_obj_tag(x_28) == 0) +{ +lean_object* x_29; lean_object* x_30; +x_29 = lean_ctor_get(x_27, 0); +lean_inc(x_29); +x_30 = l_Array_back___at_Lean_Parser_checkStackTopFn___spec__1(x_29); +lean_dec(x_29); +if (lean_obj_tag(x_30) == 2) +{ +lean_object* x_31; lean_object* x_32; uint8_t x_33; +x_31 = lean_ctor_get(x_30, 1); +lean_inc(x_31); +lean_dec(x_30); +x_32 = l_Lean_Parser_antiquotNestedExpr___elambda__1___closed__4; +x_33 = lean_string_dec_eq(x_31, x_32); +lean_dec(x_31); +if (x_33 == 0) +{ +lean_object* x_34; lean_object* x_35; +x_34 = l_Lean_Parser_antiquotNestedExpr___elambda__1___closed__7; +x_35 = l_Lean_Parser_ParserState_mkErrorsAt(x_27, x_34, x_26); +x_10 = x_35; +goto block_20; +} else { -lean_object* x_20; lean_object* x_21; -lean_dec(x_10); -x_20 = l_Lean_Parser_antiquotNestedExpr___elambda__1___closed__7; -x_21 = l_Lean_Parser_ParserState_mkErrorsAt(x_9, x_20, x_8); -return x_21; +lean_dec(x_26); +x_10 = x_27; +goto block_20; } } else { -lean_dec(x_7); +lean_object* x_36; lean_object* x_37; +lean_dec(x_30); +x_36 = l_Lean_Parser_antiquotNestedExpr___elambda__1___closed__7; +x_37 = l_Lean_Parser_ParserState_mkErrorsAt(x_27, x_36, x_26); +x_10 = x_37; +goto block_20; +} +} +else +{ +lean_object* x_38; lean_object* x_39; +lean_dec(x_28); +x_38 = l_Lean_Parser_antiquotNestedExpr___elambda__1___closed__7; +x_39 = l_Lean_Parser_ParserState_mkErrorsAt(x_27, x_38, x_26); +x_10 = x_39; +goto block_20; +} +} +else +{ +lean_dec(x_25); +x_10 = x_24; +goto block_20; +} +} +else +{ +lean_dec(x_22); +x_10 = x_21; +goto block_20; +} +} +} +else +{ +lean_dec(x_6); lean_dec(x_1); -return x_6; +return x_5; } } else @@ -14233,200 +14377,114 @@ lean_dec(x_1); return x_3; } } -block_41: -{ -lean_object* x_24; -x_24 = lean_ctor_get(x_23, 3); -lean_inc(x_24); -if (lean_obj_tag(x_24) == 0) -{ -lean_object* x_25; lean_object* x_26; -lean_inc(x_1); -x_25 = l_Lean_Parser_darrow___elambda__1(x_1, x_23); -x_26 = lean_ctor_get(x_25, 3); -lean_inc(x_26); -if (lean_obj_tag(x_26) == 0) -{ -lean_object* x_27; lean_object* x_28; lean_object* x_29; -x_27 = lean_ctor_get(x_25, 1); -lean_inc(x_27); -lean_inc(x_1); -x_28 = l_Lean_Parser_tokenFn(x_1, x_25); -x_29 = lean_ctor_get(x_28, 3); -lean_inc(x_29); -if (lean_obj_tag(x_29) == 0) -{ -lean_object* x_30; lean_object* x_31; -x_30 = lean_ctor_get(x_28, 0); -lean_inc(x_30); -x_31 = l_Array_back___at_Lean_Parser_checkStackTopFn___spec__1(x_30); -lean_dec(x_30); -if (lean_obj_tag(x_31) == 2) -{ -lean_object* x_32; lean_object* x_33; uint8_t x_34; -x_32 = lean_ctor_get(x_31, 1); -lean_inc(x_32); -lean_dec(x_31); -x_33 = l_Lean_Parser_Term_stxQuot___elambda__1___closed__4; -x_34 = lean_string_dec_eq(x_32, x_33); -lean_dec(x_32); -if (x_34 == 0) -{ -lean_object* x_35; lean_object* x_36; -x_35 = l_Lean_Parser_Term_stxQuot___elambda__1___closed__7; -x_36 = l_Lean_Parser_ParserState_mkErrorsAt(x_28, x_35, x_27); -x_3 = x_36; -goto block_22; -} -else -{ -lean_dec(x_27); -x_3 = x_28; -goto block_22; -} -} -else -{ -lean_object* x_37; lean_object* x_38; -lean_dec(x_31); -x_37 = l_Lean_Parser_Term_stxQuot___elambda__1___closed__7; -x_38 = l_Lean_Parser_ParserState_mkErrorsAt(x_28, x_37, x_27); -x_3 = x_38; -goto block_22; -} -} -else -{ -lean_object* x_39; lean_object* x_40; -lean_dec(x_29); -x_39 = l_Lean_Parser_Term_stxQuot___elambda__1___closed__7; -x_40 = l_Lean_Parser_ParserState_mkErrorsAt(x_28, x_39, x_27); -x_3 = x_40; -goto block_22; -} -} -else -{ -lean_dec(x_26); -lean_dec(x_1); -return x_25; -} -} -else -{ -lean_dec(x_24); -lean_dec(x_1); -return x_23; -} -} -block_69: -{ -lean_object* x_46; -x_46 = lean_ctor_get(x_45, 3); -lean_inc(x_46); -if (lean_obj_tag(x_46) == 0) -{ -lean_object* x_47; lean_object* x_48; lean_object* x_49; -x_47 = l_Lean_Parser_regBuiltinTacticParserAttr___closed__4; -lean_inc(x_1); -x_48 = l_Lean_Parser_identEqFn(x_47, x_1, x_45); -x_49 = lean_ctor_get(x_48, 3); -lean_inc(x_49); -if (lean_obj_tag(x_49) == 0) -{ -lean_dec(x_44); -lean_dec(x_43); -x_23 = x_48; -goto block_41; -} -else -{ -uint8_t x_50; -x_50 = !lean_is_exclusive(x_48); -if (x_50 == 0) -{ -lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; -x_51 = lean_ctor_get(x_48, 0); -x_52 = lean_ctor_get(x_48, 3); -lean_dec(x_52); -x_53 = lean_ctor_get(x_48, 1); -lean_dec(x_53); -x_54 = l_Array_shrink___main___rarg(x_51, x_44); -lean_dec(x_44); -lean_ctor_set(x_48, 1, x_43); -lean_ctor_set(x_48, 0, x_54); -x_23 = x_48; -goto block_41; -} -else -{ -lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; -x_55 = lean_ctor_get(x_48, 0); -x_56 = lean_ctor_get(x_48, 2); -lean_inc(x_56); -lean_inc(x_55); -lean_dec(x_48); -x_57 = l_Array_shrink___main___rarg(x_55, x_44); -lean_dec(x_44); -x_58 = lean_alloc_ctor(0, 4, 0); -lean_ctor_set(x_58, 0, x_57); -lean_ctor_set(x_58, 1, x_43); -lean_ctor_set(x_58, 2, x_56); -lean_ctor_set(x_58, 3, x_49); -x_23 = x_58; -goto block_41; -} -} -} -else +block_82: { lean_object* x_59; -lean_dec(x_46); -x_59 = lean_ctor_get(x_45, 3); +x_59 = lean_ctor_get(x_58, 3); lean_inc(x_59); if (lean_obj_tag(x_59) == 0) { -lean_dec(x_44); -lean_dec(x_43); -x_23 = x_45; -goto block_41; +lean_object* x_60; lean_object* x_61; lean_object* x_62; +x_60 = l_Lean_Parser_regBuiltinTacticParserAttr___closed__4; +lean_inc(x_1); +x_61 = l_Lean_Parser_identEqFn(x_60, x_1, x_58); +x_62 = lean_ctor_get(x_61, 3); +lean_inc(x_62); +if (lean_obj_tag(x_62) == 0) +{ +lean_dec(x_57); +lean_dec(x_56); +x_3 = x_61; +goto block_54; } else { -uint8_t x_60; -x_60 = !lean_is_exclusive(x_45); -if (x_60 == 0) +uint8_t x_63; +x_63 = !lean_is_exclusive(x_61); +if (x_63 == 0) { -lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; -x_61 = lean_ctor_get(x_45, 0); -x_62 = lean_ctor_get(x_45, 3); -lean_dec(x_62); -x_63 = lean_ctor_get(x_45, 1); -lean_dec(x_63); -x_64 = l_Array_shrink___main___rarg(x_61, x_44); -lean_dec(x_44); -lean_ctor_set(x_45, 1, x_43); -lean_ctor_set(x_45, 0, x_64); -x_23 = x_45; -goto block_41; +lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; +x_64 = lean_ctor_get(x_61, 0); +x_65 = lean_ctor_get(x_61, 3); +lean_dec(x_65); +x_66 = lean_ctor_get(x_61, 1); +lean_dec(x_66); +x_67 = l_Array_shrink___main___rarg(x_64, x_57); +lean_dec(x_57); +lean_ctor_set(x_61, 1, x_56); +lean_ctor_set(x_61, 0, x_67); +x_3 = x_61; +goto block_54; } else { -lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; -x_65 = lean_ctor_get(x_45, 0); -x_66 = lean_ctor_get(x_45, 2); -lean_inc(x_66); -lean_inc(x_65); -lean_dec(x_45); -x_67 = l_Array_shrink___main___rarg(x_65, x_44); -lean_dec(x_44); -x_68 = lean_alloc_ctor(0, 4, 0); -lean_ctor_set(x_68, 0, x_67); -lean_ctor_set(x_68, 1, x_43); -lean_ctor_set(x_68, 2, x_66); -lean_ctor_set(x_68, 3, x_59); -x_23 = x_68; -goto block_41; +lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; +x_68 = lean_ctor_get(x_61, 0); +x_69 = lean_ctor_get(x_61, 2); +lean_inc(x_69); +lean_inc(x_68); +lean_dec(x_61); +x_70 = l_Array_shrink___main___rarg(x_68, x_57); +lean_dec(x_57); +x_71 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_71, 0, x_70); +lean_ctor_set(x_71, 1, x_56); +lean_ctor_set(x_71, 2, x_69); +lean_ctor_set(x_71, 3, x_62); +x_3 = x_71; +goto block_54; +} +} +} +else +{ +lean_object* x_72; +lean_dec(x_59); +x_72 = lean_ctor_get(x_58, 3); +lean_inc(x_72); +if (lean_obj_tag(x_72) == 0) +{ +lean_dec(x_57); +lean_dec(x_56); +x_3 = x_58; +goto block_54; +} +else +{ +uint8_t x_73; +x_73 = !lean_is_exclusive(x_58); +if (x_73 == 0) +{ +lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; +x_74 = lean_ctor_get(x_58, 0); +x_75 = lean_ctor_get(x_58, 3); +lean_dec(x_75); +x_76 = lean_ctor_get(x_58, 1); +lean_dec(x_76); +x_77 = l_Array_shrink___main___rarg(x_74, x_57); +lean_dec(x_57); +lean_ctor_set(x_58, 1, x_56); +lean_ctor_set(x_58, 0, x_77); +x_3 = x_58; +goto block_54; +} +else +{ +lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; +x_78 = lean_ctor_get(x_58, 0); +x_79 = lean_ctor_get(x_58, 2); +lean_inc(x_79); +lean_inc(x_78); +lean_dec(x_58); +x_80 = l_Array_shrink___main___rarg(x_78, x_57); +lean_dec(x_57); +x_81 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_81, 0, x_80); +lean_ctor_set(x_81, 1, x_56); +lean_ctor_set(x_81, 2, x_79); +lean_ctor_set(x_81, 3, x_72); +x_3 = x_81; +goto block_54; } } } @@ -14457,25 +14515,37 @@ lean_object* _init_l_Lean_Parser_Command_macroTailTactic___closed__3() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; -x_1 = l_Lean_Parser_darrow; +x_1 = l_Lean_Parser_antiquotNestedExpr___closed__2; x_2 = lean_ctor_get(x_1, 0); lean_inc(x_2); x_3 = l_Lean_Parser_Command_macroTailTactic___closed__2; -x_4 = l_Lean_Parser_andthenInfo(x_2, x_3); +x_4 = l_Lean_Parser_orelseInfo(x_3, x_2); return x_4; } } lean_object* _init_l_Lean_Parser_Command_macroTailTactic___closed__4() { _start: { +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_1 = l_Lean_Parser_darrow; +x_2 = lean_ctor_get(x_1, 0); +lean_inc(x_2); +x_3 = l_Lean_Parser_Command_macroTailTactic___closed__3; +x_4 = l_Lean_Parser_andthenInfo(x_2, x_3); +return x_4; +} +} +lean_object* _init_l_Lean_Parser_Command_macroTailTactic___closed__5() { +_start: +{ lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_Parser_Command_macroTailTactic___closed__1; -x_2 = l_Lean_Parser_Command_macroTailTactic___closed__3; +x_2 = l_Lean_Parser_Command_macroTailTactic___closed__4; x_3 = l_Lean_Parser_andthenInfo(x_1, x_2); return x_3; } } -lean_object* _init_l_Lean_Parser_Command_macroTailTactic___closed__5() { +lean_object* _init_l_Lean_Parser_Command_macroTailTactic___closed__6() { _start: { lean_object* x_1; @@ -14483,12 +14553,12 @@ x_1 = lean_alloc_closure((void*)(l_Lean_Parser_Command_macroTailTactic___elambda return x_1; } } -lean_object* _init_l_Lean_Parser_Command_macroTailTactic___closed__6() { +lean_object* _init_l_Lean_Parser_Command_macroTailTactic___closed__7() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Parser_Command_macroTailTactic___closed__4; -x_2 = l_Lean_Parser_Command_macroTailTactic___closed__5; +x_1 = l_Lean_Parser_Command_macroTailTactic___closed__5; +x_2 = l_Lean_Parser_Command_macroTailTactic___closed__6; x_3 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_3, 0, x_1); lean_ctor_set(x_3, 1, x_2); @@ -14499,134 +14569,359 @@ lean_object* _init_l_Lean_Parser_Command_macroTailTactic() { _start: { lean_object* x_1; -x_1 = l_Lean_Parser_Command_macroTailTactic___closed__6; +x_1 = l_Lean_Parser_Command_macroTailTactic___closed__7; return x_1; } } lean_object* l_Lean_Parser_Command_macroTailCommand___elambda__1(lean_object* x_1, lean_object* x_2) { _start: { -lean_object* x_3; lean_object* x_20; lean_object* x_44; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_91; lean_object* x_92; -x_63 = lean_ctor_get(x_2, 0); -lean_inc(x_63); -x_64 = lean_ctor_get(x_2, 1); -lean_inc(x_64); -x_65 = lean_array_get_size(x_63); -lean_dec(x_63); +lean_object* x_3; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_104; lean_object* x_105; +x_76 = lean_ctor_get(x_2, 0); +lean_inc(x_76); +x_77 = lean_ctor_get(x_2, 1); +lean_inc(x_77); +x_78 = lean_array_get_size(x_76); +lean_dec(x_76); lean_inc(x_1); -x_91 = l_Lean_Parser_tokenFn(x_1, x_2); -x_92 = lean_ctor_get(x_91, 3); -lean_inc(x_92); -if (lean_obj_tag(x_92) == 0) +x_104 = l_Lean_Parser_tokenFn(x_1, x_2); +x_105 = lean_ctor_get(x_104, 3); +lean_inc(x_105); +if (lean_obj_tag(x_105) == 0) { -lean_object* x_93; lean_object* x_94; -x_93 = lean_ctor_get(x_91, 0); -lean_inc(x_93); -x_94 = l_Array_back___at_Lean_Parser_checkStackTopFn___spec__1(x_93); -lean_dec(x_93); -if (lean_obj_tag(x_94) == 2) +lean_object* x_106; lean_object* x_107; +x_106 = lean_ctor_get(x_104, 0); +lean_inc(x_106); +x_107 = l_Array_back___at_Lean_Parser_checkStackTopFn___spec__1(x_106); +lean_dec(x_106); +if (lean_obj_tag(x_107) == 2) { -lean_object* x_95; lean_object* x_96; uint8_t x_97; -x_95 = lean_ctor_get(x_94, 1); -lean_inc(x_95); -lean_dec(x_94); -x_96 = l_Lean_Parser_Term_typeAscription___elambda__1___closed__5; -x_97 = lean_string_dec_eq(x_95, x_96); -lean_dec(x_95); -if (x_97 == 0) +lean_object* x_108; lean_object* x_109; uint8_t x_110; +x_108 = lean_ctor_get(x_107, 1); +lean_inc(x_108); +lean_dec(x_107); +x_109 = l_Lean_Parser_Term_typeAscription___elambda__1___closed__5; +x_110 = lean_string_dec_eq(x_108, x_109); +lean_dec(x_108); +if (x_110 == 0) { -lean_object* x_98; lean_object* x_99; -x_98 = l_Lean_Parser_Term_typeAscription___elambda__1___closed__8; -lean_inc(x_64); -x_99 = l_Lean_Parser_ParserState_mkErrorsAt(x_91, x_98, x_64); -x_66 = x_99; -goto block_90; +lean_object* x_111; lean_object* x_112; +x_111 = l_Lean_Parser_Term_typeAscription___elambda__1___closed__8; +lean_inc(x_77); +x_112 = l_Lean_Parser_ParserState_mkErrorsAt(x_104, x_111, x_77); +x_79 = x_112; +goto block_103; } else { -x_66 = x_91; -goto block_90; +x_79 = x_104; +goto block_103; } } else { -lean_object* x_100; lean_object* x_101; -lean_dec(x_94); -x_100 = l_Lean_Parser_Term_typeAscription___elambda__1___closed__8; -lean_inc(x_64); -x_101 = l_Lean_Parser_ParserState_mkErrorsAt(x_91, x_100, x_64); -x_66 = x_101; -goto block_90; +lean_object* x_113; lean_object* x_114; +lean_dec(x_107); +x_113 = l_Lean_Parser_Term_typeAscription___elambda__1___closed__8; +lean_inc(x_77); +x_114 = l_Lean_Parser_ParserState_mkErrorsAt(x_104, x_113, x_77); +x_79 = x_114; +goto block_103; } } else { -lean_object* x_102; lean_object* x_103; -lean_dec(x_92); -x_102 = l_Lean_Parser_Term_typeAscription___elambda__1___closed__8; -lean_inc(x_64); -x_103 = l_Lean_Parser_ParserState_mkErrorsAt(x_91, x_102, x_64); -x_66 = x_103; -goto block_90; +lean_object* x_115; lean_object* x_116; +lean_dec(x_105); +x_115 = l_Lean_Parser_Term_typeAscription___elambda__1___closed__8; +lean_inc(x_77); +x_116 = l_Lean_Parser_ParserState_mkErrorsAt(x_104, x_115, x_77); +x_79 = x_116; +goto block_103; } -block_19: +block_75: { lean_object* x_4; 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; -x_5 = lean_ctor_get(x_3, 1); -lean_inc(x_5); -x_6 = l_Lean_Parser_tokenFn(x_1, x_3); -x_7 = lean_ctor_get(x_6, 3); +lean_object* x_5; lean_object* x_6; +lean_inc(x_1); +x_5 = l_Lean_Parser_darrow___elambda__1(x_1, x_3); +x_6 = lean_ctor_get(x_5, 3); +lean_inc(x_6); +if (lean_obj_tag(x_6) == 0) +{ +lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_21; lean_object* x_38; lean_object* x_62; lean_object* x_63; +x_7 = lean_ctor_get(x_5, 0); lean_inc(x_7); -if (lean_obj_tag(x_7) == 0) -{ -lean_object* x_8; lean_object* x_9; -x_8 = lean_ctor_get(x_6, 0); -lean_inc(x_8); -x_9 = l_Array_back___at_Lean_Parser_checkStackTopFn___spec__1(x_8); -lean_dec(x_8); -if (lean_obj_tag(x_9) == 2) -{ -lean_object* x_10; lean_object* x_11; uint8_t x_12; -x_10 = lean_ctor_get(x_9, 1); -lean_inc(x_10); -lean_dec(x_9); -x_11 = l_Lean_Parser_antiquotNestedExpr___elambda__1___closed__4; -x_12 = lean_string_dec_eq(x_10, x_11); -lean_dec(x_10); -if (x_12 == 0) -{ -lean_object* x_13; lean_object* x_14; -x_13 = l_Lean_Parser_antiquotNestedExpr___elambda__1___closed__7; -x_14 = l_Lean_Parser_ParserState_mkErrorsAt(x_6, x_13, x_5); -return x_14; -} -else -{ -lean_dec(x_5); -return x_6; -} -} -else -{ -lean_object* x_15; lean_object* x_16; -lean_dec(x_9); -x_15 = l_Lean_Parser_antiquotNestedExpr___elambda__1___closed__7; -x_16 = l_Lean_Parser_ParserState_mkErrorsAt(x_6, x_15, x_5); -return x_16; -} -} -else -{ -lean_object* x_17; lean_object* x_18; +x_8 = lean_array_get_size(x_7); lean_dec(x_7); -x_17 = l_Lean_Parser_antiquotNestedExpr___elambda__1___closed__7; -x_18 = l_Lean_Parser_ParserState_mkErrorsAt(x_6, x_17, x_5); -return x_18; +x_9 = lean_ctor_get(x_5, 1); +lean_inc(x_9); +lean_inc(x_1); +x_62 = l_Lean_Parser_tokenFn(x_1, x_5); +x_63 = lean_ctor_get(x_62, 3); +lean_inc(x_63); +if (lean_obj_tag(x_63) == 0) +{ +lean_object* x_64; lean_object* x_65; +x_64 = lean_ctor_get(x_62, 0); +lean_inc(x_64); +x_65 = l_Array_back___at_Lean_Parser_checkStackTopFn___spec__1(x_64); +lean_dec(x_64); +if (lean_obj_tag(x_65) == 2) +{ +lean_object* x_66; lean_object* x_67; uint8_t x_68; +x_66 = lean_ctor_get(x_65, 1); +lean_inc(x_66); +lean_dec(x_65); +x_67 = l_Lean_Parser_Term_stxQuot___elambda__1___closed__4; +x_68 = lean_string_dec_eq(x_66, x_67); +lean_dec(x_66); +if (x_68 == 0) +{ +lean_object* x_69; lean_object* x_70; +x_69 = l_Lean_Parser_Term_stxQuot___elambda__1___closed__7; +lean_inc(x_9); +x_70 = l_Lean_Parser_ParserState_mkErrorsAt(x_62, x_69, x_9); +x_38 = x_70; +goto block_61; +} +else +{ +x_38 = x_62; +goto block_61; +} +} +else +{ +lean_object* x_71; lean_object* x_72; +lean_dec(x_65); +x_71 = l_Lean_Parser_Term_stxQuot___elambda__1___closed__7; +lean_inc(x_9); +x_72 = l_Lean_Parser_ParserState_mkErrorsAt(x_62, x_71, x_9); +x_38 = x_72; +goto block_61; +} +} +else +{ +lean_object* x_73; lean_object* x_74; +lean_dec(x_63); +x_73 = l_Lean_Parser_Term_stxQuot___elambda__1___closed__7; +lean_inc(x_9); +x_74 = l_Lean_Parser_ParserState_mkErrorsAt(x_62, x_73, x_9); +x_38 = x_74; +goto block_61; +} +block_20: +{ +lean_object* x_11; +x_11 = lean_ctor_get(x_10, 3); +lean_inc(x_11); +if (lean_obj_tag(x_11) == 0) +{ +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_1); +return x_10; +} +else +{ +lean_object* x_12; lean_object* x_13; uint8_t x_14; +x_12 = lean_ctor_get(x_11, 0); +lean_inc(x_12); +lean_dec(x_11); +x_13 = lean_ctor_get(x_10, 1); +lean_inc(x_13); +x_14 = lean_nat_dec_eq(x_13, x_9); +lean_dec(x_13); +if (x_14 == 0) +{ +lean_dec(x_12); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_1); +return x_10; +} +else +{ +lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; +lean_inc(x_9); +x_15 = l_Lean_Parser_ParserState_restore(x_10, x_8, x_9); +lean_dec(x_8); +x_16 = l_Lean_Parser_termParser___closed__2; +x_17 = lean_unsigned_to_nat(0u); +x_18 = l_Lean_Parser_categoryParser___elambda__1(x_16, x_17, x_1, x_15); +x_19 = l_Lean_Parser_mergeOrElseErrors(x_18, x_12, x_9); +lean_dec(x_9); +return x_19; +} +} +} +block_37: +{ +lean_object* x_22; +x_22 = lean_ctor_get(x_21, 3); +lean_inc(x_22); +if (lean_obj_tag(x_22) == 0) +{ +lean_object* x_23; lean_object* x_24; lean_object* x_25; +x_23 = lean_ctor_get(x_21, 1); +lean_inc(x_23); +lean_inc(x_1); +x_24 = l_Lean_Parser_tokenFn(x_1, x_21); +x_25 = lean_ctor_get(x_24, 3); +lean_inc(x_25); +if (lean_obj_tag(x_25) == 0) +{ +lean_object* x_26; lean_object* x_27; +x_26 = lean_ctor_get(x_24, 0); +lean_inc(x_26); +x_27 = l_Array_back___at_Lean_Parser_checkStackTopFn___spec__1(x_26); +lean_dec(x_26); +if (lean_obj_tag(x_27) == 2) +{ +lean_object* x_28; lean_object* x_29; uint8_t x_30; +x_28 = lean_ctor_get(x_27, 1); +lean_inc(x_28); +lean_dec(x_27); +x_29 = l_Lean_Parser_antiquotNestedExpr___elambda__1___closed__4; +x_30 = lean_string_dec_eq(x_28, x_29); +lean_dec(x_28); +if (x_30 == 0) +{ +lean_object* x_31; lean_object* x_32; +x_31 = l_Lean_Parser_antiquotNestedExpr___elambda__1___closed__7; +x_32 = l_Lean_Parser_ParserState_mkErrorsAt(x_24, x_31, x_23); +x_10 = x_32; +goto block_20; +} +else +{ +lean_dec(x_23); +x_10 = x_24; +goto block_20; +} +} +else +{ +lean_object* x_33; lean_object* x_34; +lean_dec(x_27); +x_33 = l_Lean_Parser_antiquotNestedExpr___elambda__1___closed__7; +x_34 = l_Lean_Parser_ParserState_mkErrorsAt(x_24, x_33, x_23); +x_10 = x_34; +goto block_20; +} +} +else +{ +lean_object* x_35; lean_object* x_36; +lean_dec(x_25); +x_35 = l_Lean_Parser_antiquotNestedExpr___elambda__1___closed__7; +x_36 = l_Lean_Parser_ParserState_mkErrorsAt(x_24, x_35, x_23); +x_10 = x_36; +goto block_20; +} +} +else +{ +lean_dec(x_22); +x_10 = x_21; +goto block_20; +} +} +block_61: +{ +lean_object* x_39; +x_39 = lean_ctor_get(x_38, 3); +lean_inc(x_39); +if (lean_obj_tag(x_39) == 0) +{ +lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; +x_40 = lean_ctor_get(x_38, 0); +lean_inc(x_40); +x_41 = lean_array_get_size(x_40); +lean_dec(x_40); +x_42 = l_Lean_Parser_regBuiltinCommandParserAttr___closed__4; +x_43 = lean_unsigned_to_nat(0u); +lean_inc(x_1); +x_44 = l_Lean_Parser_categoryParser___elambda__1(x_42, x_43, x_1, x_38); +x_45 = lean_ctor_get(x_44, 3); +lean_inc(x_45); +if (lean_obj_tag(x_45) == 0) +{ +lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; uint8_t x_51; +lean_inc(x_1); +x_46 = l_Lean_Parser_manyAux___main___at_Lean_Parser_Term_stxQuot___elambda__1___spec__1(x_1, x_44); +x_47 = lean_ctor_get(x_46, 0); +lean_inc(x_47); +x_48 = lean_array_get_size(x_47); +lean_dec(x_47); +x_49 = lean_nat_sub(x_48, x_41); +lean_dec(x_48); +x_50 = lean_unsigned_to_nat(1u); +x_51 = lean_nat_dec_eq(x_49, x_50); +lean_dec(x_49); +if (x_51 == 0) +{ +lean_object* x_52; lean_object* x_53; +x_52 = l_Lean_nullKind; +x_53 = l_Lean_Parser_ParserState_mkNode(x_46, x_52, x_41); +x_21 = x_53; +goto block_37; +} +else +{ +lean_dec(x_41); +x_21 = x_46; +goto block_37; +} +} +else +{ +lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; uint8_t x_58; +lean_dec(x_45); +x_54 = lean_ctor_get(x_44, 0); +lean_inc(x_54); +x_55 = lean_array_get_size(x_54); +lean_dec(x_54); +x_56 = lean_nat_sub(x_55, x_41); +lean_dec(x_55); +x_57 = lean_unsigned_to_nat(1u); +x_58 = lean_nat_dec_eq(x_56, x_57); +lean_dec(x_56); +if (x_58 == 0) +{ +lean_object* x_59; lean_object* x_60; +x_59 = l_Lean_nullKind; +x_60 = l_Lean_Parser_ParserState_mkNode(x_44, x_59, x_41); +x_21 = x_60; +goto block_37; +} +else +{ +lean_dec(x_41); +x_21 = x_44; +goto block_37; +} +} +} +else +{ +lean_dec(x_39); +x_10 = x_38; +goto block_20; +} +} +} +else +{ +lean_dec(x_6); +lean_dec(x_1); +return x_5; } } else @@ -14636,283 +14931,114 @@ lean_dec(x_1); return x_3; } } -block_43: -{ -lean_object* x_21; -x_21 = lean_ctor_get(x_20, 3); -lean_inc(x_21); -if (lean_obj_tag(x_21) == 0) -{ -lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; -x_22 = lean_ctor_get(x_20, 0); -lean_inc(x_22); -x_23 = lean_array_get_size(x_22); -lean_dec(x_22); -x_24 = l_Lean_Parser_regBuiltinCommandParserAttr___closed__4; -x_25 = lean_unsigned_to_nat(0u); -lean_inc(x_1); -x_26 = l_Lean_Parser_categoryParser___elambda__1(x_24, x_25, x_1, x_20); -x_27 = lean_ctor_get(x_26, 3); -lean_inc(x_27); -if (lean_obj_tag(x_27) == 0) -{ -lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; uint8_t x_33; -lean_inc(x_1); -x_28 = l_Lean_Parser_manyAux___main___at_Lean_Parser_Term_stxQuot___elambda__1___spec__1(x_1, x_26); -x_29 = lean_ctor_get(x_28, 0); -lean_inc(x_29); -x_30 = lean_array_get_size(x_29); -lean_dec(x_29); -x_31 = lean_nat_sub(x_30, x_23); -lean_dec(x_30); -x_32 = lean_unsigned_to_nat(1u); -x_33 = lean_nat_dec_eq(x_31, x_32); -lean_dec(x_31); -if (x_33 == 0) -{ -lean_object* x_34; lean_object* x_35; -x_34 = l_Lean_nullKind; -x_35 = l_Lean_Parser_ParserState_mkNode(x_28, x_34, x_23); -x_3 = x_35; -goto block_19; -} -else -{ -lean_dec(x_23); -x_3 = x_28; -goto block_19; -} -} -else -{ -lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; uint8_t x_40; -lean_dec(x_27); -x_36 = lean_ctor_get(x_26, 0); -lean_inc(x_36); -x_37 = lean_array_get_size(x_36); -lean_dec(x_36); -x_38 = lean_nat_sub(x_37, x_23); -lean_dec(x_37); -x_39 = lean_unsigned_to_nat(1u); -x_40 = lean_nat_dec_eq(x_38, x_39); -lean_dec(x_38); -if (x_40 == 0) -{ -lean_object* x_41; lean_object* x_42; -x_41 = l_Lean_nullKind; -x_42 = l_Lean_Parser_ParserState_mkNode(x_26, x_41, x_23); -x_3 = x_42; -goto block_19; -} -else -{ -lean_dec(x_23); -x_3 = x_26; -goto block_19; -} -} -} -else -{ -lean_dec(x_21); -lean_dec(x_1); -return x_20; -} -} -block_62: -{ -lean_object* x_45; -x_45 = lean_ctor_get(x_44, 3); -lean_inc(x_45); -if (lean_obj_tag(x_45) == 0) -{ -lean_object* x_46; lean_object* x_47; -lean_inc(x_1); -x_46 = l_Lean_Parser_darrow___elambda__1(x_1, x_44); -x_47 = lean_ctor_get(x_46, 3); -lean_inc(x_47); -if (lean_obj_tag(x_47) == 0) -{ -lean_object* x_48; lean_object* x_49; lean_object* x_50; -x_48 = lean_ctor_get(x_46, 1); -lean_inc(x_48); -lean_inc(x_1); -x_49 = l_Lean_Parser_tokenFn(x_1, x_46); -x_50 = lean_ctor_get(x_49, 3); -lean_inc(x_50); -if (lean_obj_tag(x_50) == 0) -{ -lean_object* x_51; lean_object* x_52; -x_51 = lean_ctor_get(x_49, 0); -lean_inc(x_51); -x_52 = l_Array_back___at_Lean_Parser_checkStackTopFn___spec__1(x_51); -lean_dec(x_51); -if (lean_obj_tag(x_52) == 2) -{ -lean_object* x_53; lean_object* x_54; uint8_t x_55; -x_53 = lean_ctor_get(x_52, 1); -lean_inc(x_53); -lean_dec(x_52); -x_54 = l_Lean_Parser_Term_stxQuot___elambda__1___closed__4; -x_55 = lean_string_dec_eq(x_53, x_54); -lean_dec(x_53); -if (x_55 == 0) -{ -lean_object* x_56; lean_object* x_57; -x_56 = l_Lean_Parser_Term_stxQuot___elambda__1___closed__7; -x_57 = l_Lean_Parser_ParserState_mkErrorsAt(x_49, x_56, x_48); -x_20 = x_57; -goto block_43; -} -else -{ -lean_dec(x_48); -x_20 = x_49; -goto block_43; -} -} -else -{ -lean_object* x_58; lean_object* x_59; -lean_dec(x_52); -x_58 = l_Lean_Parser_Term_stxQuot___elambda__1___closed__7; -x_59 = l_Lean_Parser_ParserState_mkErrorsAt(x_49, x_58, x_48); -x_20 = x_59; -goto block_43; -} -} -else -{ -lean_object* x_60; lean_object* x_61; -lean_dec(x_50); -x_60 = l_Lean_Parser_Term_stxQuot___elambda__1___closed__7; -x_61 = l_Lean_Parser_ParserState_mkErrorsAt(x_49, x_60, x_48); -x_20 = x_61; -goto block_43; -} -} -else -{ -lean_dec(x_47); -lean_dec(x_1); -return x_46; -} -} -else -{ -lean_dec(x_45); -lean_dec(x_1); -return x_44; -} -} -block_90: -{ -lean_object* x_67; -x_67 = lean_ctor_get(x_66, 3); -lean_inc(x_67); -if (lean_obj_tag(x_67) == 0) -{ -lean_object* x_68; lean_object* x_69; lean_object* x_70; -x_68 = l_Lean_Parser_regBuiltinCommandParserAttr___closed__4; -lean_inc(x_1); -x_69 = l_Lean_Parser_identEqFn(x_68, x_1, x_66); -x_70 = lean_ctor_get(x_69, 3); -lean_inc(x_70); -if (lean_obj_tag(x_70) == 0) -{ -lean_dec(x_65); -lean_dec(x_64); -x_44 = x_69; -goto block_62; -} -else -{ -uint8_t x_71; -x_71 = !lean_is_exclusive(x_69); -if (x_71 == 0) -{ -lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; -x_72 = lean_ctor_get(x_69, 0); -x_73 = lean_ctor_get(x_69, 3); -lean_dec(x_73); -x_74 = lean_ctor_get(x_69, 1); -lean_dec(x_74); -x_75 = l_Array_shrink___main___rarg(x_72, x_65); -lean_dec(x_65); -lean_ctor_set(x_69, 1, x_64); -lean_ctor_set(x_69, 0, x_75); -x_44 = x_69; -goto block_62; -} -else -{ -lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; -x_76 = lean_ctor_get(x_69, 0); -x_77 = lean_ctor_get(x_69, 2); -lean_inc(x_77); -lean_inc(x_76); -lean_dec(x_69); -x_78 = l_Array_shrink___main___rarg(x_76, x_65); -lean_dec(x_65); -x_79 = lean_alloc_ctor(0, 4, 0); -lean_ctor_set(x_79, 0, x_78); -lean_ctor_set(x_79, 1, x_64); -lean_ctor_set(x_79, 2, x_77); -lean_ctor_set(x_79, 3, x_70); -x_44 = x_79; -goto block_62; -} -} -} -else +block_103: { lean_object* x_80; -lean_dec(x_67); -x_80 = lean_ctor_get(x_66, 3); +x_80 = lean_ctor_get(x_79, 3); lean_inc(x_80); if (lean_obj_tag(x_80) == 0) { -lean_dec(x_65); -lean_dec(x_64); -x_44 = x_66; -goto block_62; +lean_object* x_81; lean_object* x_82; lean_object* x_83; +x_81 = l_Lean_Parser_regBuiltinCommandParserAttr___closed__4; +lean_inc(x_1); +x_82 = l_Lean_Parser_identEqFn(x_81, x_1, x_79); +x_83 = lean_ctor_get(x_82, 3); +lean_inc(x_83); +if (lean_obj_tag(x_83) == 0) +{ +lean_dec(x_78); +lean_dec(x_77); +x_3 = x_82; +goto block_75; } else { -uint8_t x_81; -x_81 = !lean_is_exclusive(x_66); -if (x_81 == 0) +uint8_t x_84; +x_84 = !lean_is_exclusive(x_82); +if (x_84 == 0) { -lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; -x_82 = lean_ctor_get(x_66, 0); -x_83 = lean_ctor_get(x_66, 3); -lean_dec(x_83); -x_84 = lean_ctor_get(x_66, 1); -lean_dec(x_84); -x_85 = l_Array_shrink___main___rarg(x_82, x_65); -lean_dec(x_65); -lean_ctor_set(x_66, 1, x_64); -lean_ctor_set(x_66, 0, x_85); -x_44 = x_66; -goto block_62; +lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; +x_85 = lean_ctor_get(x_82, 0); +x_86 = lean_ctor_get(x_82, 3); +lean_dec(x_86); +x_87 = lean_ctor_get(x_82, 1); +lean_dec(x_87); +x_88 = l_Array_shrink___main___rarg(x_85, x_78); +lean_dec(x_78); +lean_ctor_set(x_82, 1, x_77); +lean_ctor_set(x_82, 0, x_88); +x_3 = x_82; +goto block_75; } else { -lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; -x_86 = lean_ctor_get(x_66, 0); -x_87 = lean_ctor_get(x_66, 2); -lean_inc(x_87); -lean_inc(x_86); -lean_dec(x_66); -x_88 = l_Array_shrink___main___rarg(x_86, x_65); -lean_dec(x_65); -x_89 = lean_alloc_ctor(0, 4, 0); -lean_ctor_set(x_89, 0, x_88); -lean_ctor_set(x_89, 1, x_64); -lean_ctor_set(x_89, 2, x_87); -lean_ctor_set(x_89, 3, x_80); -x_44 = x_89; -goto block_62; +lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; +x_89 = lean_ctor_get(x_82, 0); +x_90 = lean_ctor_get(x_82, 2); +lean_inc(x_90); +lean_inc(x_89); +lean_dec(x_82); +x_91 = l_Array_shrink___main___rarg(x_89, x_78); +lean_dec(x_78); +x_92 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_92, 0, x_91); +lean_ctor_set(x_92, 1, x_77); +lean_ctor_set(x_92, 2, x_90); +lean_ctor_set(x_92, 3, x_83); +x_3 = x_92; +goto block_75; +} +} +} +else +{ +lean_object* x_93; +lean_dec(x_80); +x_93 = lean_ctor_get(x_79, 3); +lean_inc(x_93); +if (lean_obj_tag(x_93) == 0) +{ +lean_dec(x_78); +lean_dec(x_77); +x_3 = x_79; +goto block_75; +} +else +{ +uint8_t x_94; +x_94 = !lean_is_exclusive(x_79); +if (x_94 == 0) +{ +lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; +x_95 = lean_ctor_get(x_79, 0); +x_96 = lean_ctor_get(x_79, 3); +lean_dec(x_96); +x_97 = lean_ctor_get(x_79, 1); +lean_dec(x_97); +x_98 = l_Array_shrink___main___rarg(x_95, x_78); +lean_dec(x_78); +lean_ctor_set(x_79, 1, x_77); +lean_ctor_set(x_79, 0, x_98); +x_3 = x_79; +goto block_75; +} +else +{ +lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; +x_99 = lean_ctor_get(x_79, 0); +x_100 = lean_ctor_get(x_79, 2); +lean_inc(x_100); +lean_inc(x_99); +lean_dec(x_79); +x_101 = l_Array_shrink___main___rarg(x_99, x_78); +lean_dec(x_78); +x_102 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_102, 0, x_101); +lean_ctor_set(x_102, 1, x_77); +lean_ctor_set(x_102, 2, x_100); +lean_ctor_set(x_102, 3, x_93); +x_3 = x_102; +goto block_75; } } } @@ -14945,25 +15071,37 @@ lean_object* _init_l_Lean_Parser_Command_macroTailCommand___closed__3() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; -x_1 = l_Lean_Parser_darrow; +x_1 = l_Lean_Parser_antiquotNestedExpr___closed__2; x_2 = lean_ctor_get(x_1, 0); lean_inc(x_2); x_3 = l_Lean_Parser_Command_macroTailCommand___closed__2; -x_4 = l_Lean_Parser_andthenInfo(x_2, x_3); +x_4 = l_Lean_Parser_orelseInfo(x_3, x_2); return x_4; } } lean_object* _init_l_Lean_Parser_Command_macroTailCommand___closed__4() { _start: { +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_1 = l_Lean_Parser_darrow; +x_2 = lean_ctor_get(x_1, 0); +lean_inc(x_2); +x_3 = l_Lean_Parser_Command_macroTailCommand___closed__3; +x_4 = l_Lean_Parser_andthenInfo(x_2, x_3); +return x_4; +} +} +lean_object* _init_l_Lean_Parser_Command_macroTailCommand___closed__5() { +_start: +{ lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_Parser_Command_macroTailTactic___closed__1; -x_2 = l_Lean_Parser_Command_macroTailCommand___closed__3; +x_2 = l_Lean_Parser_Command_macroTailCommand___closed__4; x_3 = l_Lean_Parser_andthenInfo(x_1, x_2); return x_3; } } -lean_object* _init_l_Lean_Parser_Command_macroTailCommand___closed__5() { +lean_object* _init_l_Lean_Parser_Command_macroTailCommand___closed__6() { _start: { lean_object* x_1; @@ -14971,12 +15109,12 @@ x_1 = lean_alloc_closure((void*)(l_Lean_Parser_Command_macroTailCommand___elambd return x_1; } } -lean_object* _init_l_Lean_Parser_Command_macroTailCommand___closed__6() { +lean_object* _init_l_Lean_Parser_Command_macroTailCommand___closed__7() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Parser_Command_macroTailCommand___closed__4; -x_2 = l_Lean_Parser_Command_macroTailCommand___closed__5; +x_1 = l_Lean_Parser_Command_macroTailCommand___closed__5; +x_2 = l_Lean_Parser_Command_macroTailCommand___closed__6; x_3 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_3, 0, x_1); lean_ctor_set(x_3, 1, x_2); @@ -14987,7 +15125,7 @@ lean_object* _init_l_Lean_Parser_Command_macroTailCommand() { _start: { lean_object* x_1; -x_1 = l_Lean_Parser_Command_macroTailCommand___closed__6; +x_1 = l_Lean_Parser_Command_macroTailCommand___closed__7; return x_1; } } @@ -17346,6 +17484,8 @@ l_Lean_Parser_Command_macroTailTactic___closed__5 = _init_l_Lean_Parser_Command_ lean_mark_persistent(l_Lean_Parser_Command_macroTailTactic___closed__5); l_Lean_Parser_Command_macroTailTactic___closed__6 = _init_l_Lean_Parser_Command_macroTailTactic___closed__6(); lean_mark_persistent(l_Lean_Parser_Command_macroTailTactic___closed__6); +l_Lean_Parser_Command_macroTailTactic___closed__7 = _init_l_Lean_Parser_Command_macroTailTactic___closed__7(); +lean_mark_persistent(l_Lean_Parser_Command_macroTailTactic___closed__7); l_Lean_Parser_Command_macroTailTactic = _init_l_Lean_Parser_Command_macroTailTactic(); lean_mark_persistent(l_Lean_Parser_Command_macroTailTactic); l_Lean_Parser_Command_macroTailCommand___closed__1 = _init_l_Lean_Parser_Command_macroTailCommand___closed__1(); @@ -17360,6 +17500,8 @@ l_Lean_Parser_Command_macroTailCommand___closed__5 = _init_l_Lean_Parser_Command lean_mark_persistent(l_Lean_Parser_Command_macroTailCommand___closed__5); l_Lean_Parser_Command_macroTailCommand___closed__6 = _init_l_Lean_Parser_Command_macroTailCommand___closed__6(); lean_mark_persistent(l_Lean_Parser_Command_macroTailCommand___closed__6); +l_Lean_Parser_Command_macroTailCommand___closed__7 = _init_l_Lean_Parser_Command_macroTailCommand___closed__7(); +lean_mark_persistent(l_Lean_Parser_Command_macroTailCommand___closed__7); l_Lean_Parser_Command_macroTailCommand = _init_l_Lean_Parser_Command_macroTailCommand(); lean_mark_persistent(l_Lean_Parser_Command_macroTailCommand); l_Lean_Parser_Command_macroTailDefault___closed__1 = _init_l_Lean_Parser_Command_macroTailDefault___closed__1();