From da844e231adea0e522ec3687b08d0d69d88e4e12 Mon Sep 17 00:00:00 2001 From: Leonardo de Moura Date: Thu, 5 Dec 2019 06:19:18 -0800 Subject: [PATCH] chore: update stage0 --- stage0/src/Init/Lean.lean | 1 + stage0/src/Init/Lean/Data/KVMap.lean | 10 + stage0/src/Init/Lean/Data/Options.lean | 18 + stage0/src/Init/Lean/Eval.lean | 23 + stage0/src/Init/Lean/Meta/Basic.lean | 11 + stage0/src/Init/System/IO.lean | 4 + stage0/src/frontends/lean/builtin_cmds.cpp | 54 +- .../src/library/compiler/ir_interpreter.cpp | 63 +- stage0/src/library/compiler/ir_interpreter.h | 2 +- stage0/src/util/format.cpp | 3 - stage0/src/util/init_module.cpp | 3 - stage0/src/util/option_declarations.cpp | 86 +- stage0/src/util/option_declarations.h | 2 - stage0/src/util/options.cpp | 3 - stage0/stdlib/CMakeLists.txt | 2 +- stage0/stdlib/Init/Lean.c | 6 +- stage0/stdlib/Init/Lean/Data/Format.c | 8 +- stage0/stdlib/Init/Lean/Data/KVMap.c | 91 + stage0/stdlib/Init/Lean/Data/Options.c | 350 +- stage0/stdlib/Init/Lean/Elaborator/Basic.c | 4 +- stage0/stdlib/Init/Lean/Elaborator/Command.c | 8 +- stage0/stdlib/Init/Lean/Elaborator/PreTerm.c | 6 +- stage0/stdlib/Init/Lean/Environment.c | 26 +- stage0/stdlib/Init/Lean/Eval.c | 62 + stage0/stdlib/Init/Lean/Message.c | 1010 ---- stage0/stdlib/Init/Lean/Meta/Basic.c | 364 +- stage0/stdlib/Init/Lean/Meta/Instances.c | 4 +- stage0/stdlib/Init/Lean/MonadCache.c | 1100 ----- stage0/stdlib/Init/Lean/Path.c | 2714 ----------- stage0/stdlib/Init/Lean/Trace.c | 1550 ------ stage0/stdlib/Init/Lean/Util.c | 77 - stage0/stdlib/Init/Lean/WHNF.c | 4200 ----------------- stage0/stdlib/Init/System/IO.c | 56 +- 33 files changed, 1061 insertions(+), 10860 deletions(-) create mode 100644 stage0/src/Init/Lean/Eval.lean create mode 100644 stage0/stdlib/Init/Lean/Eval.c delete mode 100644 stage0/stdlib/Init/Lean/Message.c delete mode 100644 stage0/stdlib/Init/Lean/MonadCache.c delete mode 100644 stage0/stdlib/Init/Lean/Path.c delete mode 100644 stage0/stdlib/Init/Lean/Trace.c delete mode 100644 stage0/stdlib/Init/Lean/Util.c delete mode 100644 stage0/stdlib/Init/Lean/WHNF.c diff --git a/stage0/src/Init/Lean.lean b/stage0/src/Init/Lean.lean index 3b71435dc4..6b4f810206 100644 --- a/stage0/src/Init/Lean.lean +++ b/stage0/src/Init/Lean.lean @@ -20,3 +20,4 @@ import Init.Lean.MetavarContext import Init.Lean.AuxRecursor import Init.Lean.Linter import Init.Lean.Meta +import Init.Lean.Eval diff --git a/stage0/src/Init/Lean/Data/KVMap.lean b/stage0/src/Init/Lean/Data/KVMap.lean index 4914d80c3c..30e9779dc8 100644 --- a/stage0/src/Init/Lean/Data/KVMap.lean +++ b/stage0/src/Init/Lean/Data/KVMap.lean @@ -25,6 +25,16 @@ def DataValue.beq : DataValue → DataValue → Bool instance DataValue.HasBeq : HasBeq DataValue := ⟨DataValue.beq⟩ +@[export lean_data_value_to_string] +def DataValue.str : DataValue → String +| DataValue.ofString v => v +| DataValue.ofBool v => toString v +| DataValue.ofName v => toString v +| DataValue.ofNat v => toString v +| DataValue.ofInt v => toString v + +instance DataValue.hasToString : HasToString DataValue := ⟨DataValue.str⟩ + instance string2DataValue : HasCoe String DataValue := ⟨DataValue.ofString⟩ instance bool2DataValue : HasCoe Bool DataValue := ⟨DataValue.ofBool⟩ instance name2DataValue : HasCoe Name DataValue := ⟨DataValue.ofName⟩ diff --git a/stage0/src/Init/Lean/Data/Options.lean b/stage0/src/Init/Lean/Data/Options.lean index ca088a2ab6..78b3eae536 100644 --- a/stage0/src/Init/Lean/Data/Options.lean +++ b/stage0/src/Init/Lean/Data/Options.lean @@ -5,6 +5,7 @@ Authors: Sebastian Ullrich and Leonardo de Moura -/ prelude import Init.System.IO +import Init.Data.Array import Init.Data.ToString import Init.Lean.Data.KVMap @@ -30,6 +31,7 @@ IO.mkRef (mkNameMap OptionDecl) @[init initOptionDeclsRef] private constant optionDeclsRef : IO.Ref OptionDecls := arbitrary _ +@[export lean_register_option] def registerOption (name : Name) (decl : OptionDecl) : IO Unit := do decls ← optionDeclsRef.get; when (decls.contains name) $ @@ -38,6 +40,13 @@ do decls ← optionDeclsRef.get; def getOptionDecls : IO OptionDecls := optionDeclsRef.get +@[export lean_get_option_decls_array] +def getOptionDeclsArray : IO (Array (Name × OptionDecl)) := +do decls ← getOptionDecls; + pure $ decls.fold + (fun (r : Array (Name × OptionDecl)) k v => r.push (k, v)) + #[] + def getOptionDecl (name : Name) : IO OptionDecl := do decls ← getOptionDecls; (some decl) ← pure (decls.find name) | throw $ IO.userError ("unknown option '" ++ toString name ++ "'"); @@ -69,4 +78,13 @@ do let ps := (entry.splitOn "=").map String.trim; unless val.isInt $ throw (IO.userError ("invalid Int option value '" ++ val ++ "'")); pure $ opts.setInt key val.toInt +@[init] def verboseOption : IO Unit := +registerOption `verbose { defValue := true, group := "", descr := "disable/enable verbose messages" } + +@[init] def timeoutOption : IO Unit := +registerOption `timeout { defValue := DataValue.ofNat 0, group := "", descr := "the (deterministic) timeout is measured as the maximum of memory allocations (in thousands) per task, the default is unbounded" } + +@[init] def maxMemoryOption : IO Unit := +registerOption `maxMemory { defValue := DataValue.ofNat 2048, group := "", descr := "maximum amount of memory available for Lean in megabytes" } + end Lean diff --git a/stage0/src/Init/Lean/Eval.lean b/stage0/src/Init/Lean/Eval.lean new file mode 100644 index 0000000000..2b416a9331 --- /dev/null +++ b/stage0/src/Init/Lean/Eval.lean @@ -0,0 +1,23 @@ +/- +Copyright (c) 2019 Microsoft Corporation. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Leonardo de Moura, Sebastian Ullrich +-/ +prelude +import Init.System.IO +import Init.Lean.Environment + +namespace Lean + +universe u + +/-- `HasEval` extension that gives access to the current environment & options. + The basic `HasEval` class is in the prelude and should not depend on these + types. -/ +class MetaHasEval (α : Type u) := +(eval : Environment → Options → α → IO Unit) + +instance MetaHasEvalOfHasEval {α : Type u} [HasEval α] : MetaHasEval α := +⟨fun env opts a => HasEval.eval a⟩ + +end Lean diff --git a/stage0/src/Init/Lean/Meta/Basic.lean b/stage0/src/Init/Lean/Meta/Basic.lean index 0808250f37..3c4c13bd62 100644 --- a/stage0/src/Init/Lean/Meta/Basic.lean +++ b/stage0/src/Init/Lean/Meta/Basic.lean @@ -13,6 +13,7 @@ import Init.Lean.ReducibilityAttrs import Init.Lean.Util.Trace import Init.Lean.Meta.Exception import Init.Lean.Meta.DiscrTreeTypes +import Init.Lean.Eval /- This module provides four (mutually dependent) goodies that are needed for building the elaborator and tactic frameworks. @@ -745,6 +746,16 @@ do mctx' ← getMCtx; modify $ fun s => { mctx := mctx, .. s }; finally x (modify $ fun s => { mctx := mctx', .. s }) +instance MetaHasEval {α} [MetaHasEval α] : MetaHasEval (MetaM α) := +⟨fun env opts x => do + match x { config := { opts := opts } } { env := env } with + | EStateM.Result.ok a s => do + s.traceState.traces.forM $ fun m => IO.println $ format m; + MetaHasEval.eval s.env opts a + | EStateM.Result.error err s => do + s.traceState.traces.forM $ fun m => IO.println $ format m; + throw (IO.userError (toString err))⟩ + end Meta end Lean diff --git a/stage0/src/Init/System/IO.lean b/stage0/src/Init/System/IO.lean index a6b04631ae..f1d8ad8bcb 100644 --- a/stage0/src/Init/System/IO.lean +++ b/stage0/src/Init/System/IO.lean @@ -282,6 +282,8 @@ do child ← IO.Proc.spawn { stdout := IO.process.stdio.piped, ..args }, universe u +namespace Lean + /-- Typeclass used for presenting the output of an `#eval` command. -/ class HasEval (α : Type u) := (eval : α → IO Unit) @@ -295,3 +297,5 @@ instance IO.HasEval {α : Type} [HasEval α] : HasEval (IO α) := -- special case: do not print `()` instance IOUnit.HasEval : HasEval (IO Unit) := ⟨fun x => x⟩ + +end Lean diff --git a/stage0/src/frontends/lean/builtin_cmds.cpp b/stage0/src/frontends/lean/builtin_cmds.cpp index b655905d83..190ea11b51 100644 --- a/stage0/src/frontends/lean/builtin_cmds.cpp +++ b/stage0/src/frontends/lean/builtin_cmds.cpp @@ -6,6 +6,7 @@ Author: Leonardo de Moura */ #include #include +#include #include "runtime/sstream.h" #include "runtime/compact.h" #include "util/timeit.h" @@ -325,29 +326,46 @@ static environment eval_cmd(parser & p) { if (has_synthetic_sorry(e)) return p.env(); - type_context_old tc(p.env(), transparency_mode::All); + type_context_old tc(p.env(), p.get_options()); auto type = tc.infer(e); + std::vector args; - bool has_eval = false; - - /* Check if resultant type has an instance of has_eval */ + optional meta_eval_instance; try { - expr has_eval_type = mk_app(tc, "HasEval", type); - optional eval_instance = tc.mk_class_instance(has_eval_type); - if (eval_instance) { - /* Modify the 'program' to (has_eval.eval e) */ - e = mk_app(tc, {"HasEval", "eval"}, 3, type, *eval_instance, e); - type = tc.infer(e); - has_eval = true; - } + expr meta_has_eval_type = mk_app(tc, {"Lean", "MetaHasEval"}, type); + meta_eval_instance = tc.mk_class_instance(meta_has_eval_type); } catch (exception &) {} - if (!has_eval) { - // NOTE: HasRepr implies HasEval - throw exception("result type does not have an instance of type class 'HasRepr' or 'HasEval'"); + if (meta_eval_instance) { + /* Modify the 'program' to (fun env opts => MetaHasEval.eval env opts e) */ + expr env = tc.push_local("env", mk_const({"Lean", "Environment"})); + expr opts = tc.push_local("opts", mk_const({"Lean", "Options"})); + e = tc.mk_lambda(env, tc.mk_lambda(opts, + mk_app(tc, {"Lean", "MetaHasEval", "eval"}, 5, + {type, *meta_eval_instance, env, opts, e}))); + // run `Environment -> Options -> IO Unit` + args = { p.env().to_obj_arg(), p.get_options().to_obj_arg(), io_mk_world() }; + } else { + optional eval_instance; + try { + expr has_eval_type = mk_app(tc, {"Lean", "HasEval"}, type); + eval_instance = tc.mk_class_instance(has_eval_type); + } catch (exception &) {} + + if (eval_instance) { + /* Modify the 'program' to (HasEval.eval e) */ + e = mk_app(tc, {"Lean", "HasEval", "eval"}, 3, type, *eval_instance, e); + // run `IO Unit` + args = { io_mk_world() }; + } else { + // NOTE: HasRepr implies HasEval + // NOTE: could also mention MetaHasEval but probably shouldn't + throw exception("result type does not have an instance of type class 'HasRepr' or 'Lean.HasEval'"); + } } name fn_name = "_main"; + type = tc.infer(e); auto new_env = compile_expr(p.env(), p.get_options(), fn_name, ls, type, e, pos); auto out = p.mk_message(p.cmd_pos(), p.pos(), INFORMATION); @@ -355,16 +373,14 @@ static environment eval_cmd(parser & p) { 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()); - // run `IO Unit` - object * args[] = { io_mk_world() }; object_ref r; try { if (p.profiling()) { timeit timer(out.get_text_stream().get_stream(), "eval time"); - r = object_ref(ir::run_boxed(new_env, fn_name, &args[0])); + r = object_ref(ir::run_boxed(new_env, fn_name, args.size(), &args[0])); } else { - r = object_ref(ir::run_boxed(new_env, fn_name, &args[0])); + r = object_ref(ir::run_boxed(new_env, fn_name, args.size(), &args[0])); } } catch (exception & ex) { std::cout.rdbuf(saved_cout); diff --git a/stage0/src/library/compiler/ir_interpreter.cpp b/stage0/src/library/compiler/ir_interpreter.cpp index 244edaca43..50d728d08d 100644 --- a/stage0/src/library/compiler/ir_interpreter.cpp +++ b/stage0/src/library/compiler/ir_interpreter.cpp @@ -167,11 +167,12 @@ type decl_type(decl const & b) { return cnstr_get_type(b, 2); } fn_body const & decl_fun_body(decl const & b) { lean_assert(decl_tag(b) == decl_kind::Fun); return cnstr_get_ref_t(b, 3); } extern "C" object * lean_ir_find_env_decl(object * env, object * n); -option_ref find_env_decl(environment const & env, name const & n) { +option_ref find_ir_decl(environment const & env, name const & n) { return option_ref(lean_ir_find_env_decl(env.to_obj_arg(), n.to_obj_arg())); } static string_ref * g_mangle_prefix = nullptr; +static string_ref * g_boxed_suffix = nullptr; static string_ref * g_boxed_mangled_suffix = nullptr; // reuse the compiler's name mangling to compute native symbol names @@ -656,22 +657,13 @@ class interpreter { /** \brief Retrieve Lean declaration from environment. */ decl get_decl(name const & fn) { - option_ref d = find_env_decl(m_env, fn); + option_ref d = find_ir_decl(m_env, fn); if (!d) { throw exception(sstream() << "unknown declaration '" << fn << "'"); } return d.get().value(); } - /** \brief Retrieve Lean definition from environment. */ - decl get_fdecl(name const & fn) { - decl d = get_decl(fn); - if (decl_tag(d) == decl_kind::Extern) { - throw exception(sstream() << "unexpected external declaration '" << fn << "'"); - } - return d; - } - /** \brief Evaluate nullary function ("constant"). */ value load(name const & fn, type t) { constant_cache_entry const * cached = m_constant_cache.find(fn); @@ -825,34 +817,32 @@ public: g_interpreter = nullptr; } - object * call_boxed(name const & fn, object ** args) { + /** A variant of `call` designed for external uses. + * * takes (owned) `object *`s instead of `arg`s. + * * supports over-application (but no under-application ATM). */ + object * call_boxed(name const & fn, unsigned n, object ** args) { symbol_cache_entry e = lookup_symbol(fn); - unsigned n = decl_params(e.m_decl).size(); + unsigned arity = decl_params(e.m_decl).size(); object * r; if (e.m_addr) { push_frame(e.m_decl, 0); // directly call boxed function, nothing more to do r = curry(e.m_addr, n, args); } else { - // equivalent code to boxed stubs generated by the compiler: unbox args, box result, decrement borrowed args - - if (decl_tag(e.m_decl) == decl_kind::Extern) { - throw exception(sstream() << "unexpected external declaration '" << fn << "'"); + decl d = e.m_decl; + if (option_ref d_boxed = find_ir_decl(m_env, fn + *g_boxed_suffix)) { + d = *d_boxed.get(); } + // `d` now has a boxed signature // evaluate args in old stack frame - for (unsigned i = 0; i < n; i++) { - type t = param_type(decl_params(e.m_decl)[i]); - m_arg_stack.push_back(unbox_t(args[i], t)); - if (type_is_scalar(t)) { - dec(args[i]); - } + for (unsigned i = 0; i < arity; i++) { + m_arg_stack.push_back(args[i]); } push_frame(e.m_decl, 0); - r = box_t(eval_body(decl_fun_body(e.m_decl)), decl_type(e.m_decl)); - for (size_t i = 0; i < n; i++) { - if (param_borrow(decl_params(e.m_decl)[i])) { - dec(args[i]); - } + r = eval_body(decl_fun_body(e.m_decl)).m_obj; + if (n > arity) { + // `fn` returned a closure + r = apply_n(r, n - arity, &args[arity]); } } pop_frame(r, decl_type(e.m_decl)); @@ -860,8 +850,9 @@ public: } uint32 run_main(int argc, char * argv[]) { - decl d = get_fdecl("main"); + decl d = get_decl("main"); array_ref const & params = decl_params(d); + buffer args; if (params.size() == 2) { // List String -> IO UInt32 lean_object * in = lean_box(0); int i = argc; @@ -872,15 +863,13 @@ public: lean_ctor_set(n, 1, in); in = n; } - m_arg_stack.push_back(in); + args.push_back(in); } else { // IO UInt32 lean_assert(params.size() == 1); } object * w = io_mk_world(); - m_arg_stack.push_back(w); - push_frame(d, 0); - w = eval_body(decl_fun_body(d)).m_obj; - pop_frame(w, type::Object); + args.push_back(w); + w = call_boxed("main", args.size(), &args[0]); if (io_result_is_ok(w)) { // NOTE: in an awesome hack, `IO Unit` works just as well because `pure 0` and `pure ()` use the same // representation @@ -895,8 +884,8 @@ public: } }; -object * run_boxed(environment const & env, name const & fn, object ** args) { - return interpreter(env).call_boxed(fn, args); +object * run_boxed(environment const & env, name const & fn, unsigned n, object **args) { + return interpreter(env).call_boxed(fn, n, args); } uint32 run_main(environment const & env, int argv, char * argc[]) { return interpreter(env).run_main(argv, argc); @@ -905,6 +894,7 @@ uint32 run_main(environment const & env, int argv, char * argc[]) { void initialize_ir_interpreter() { ir::g_mangle_prefix = new string_ref("l_"); + ir::g_boxed_suffix = new string_ref("_boxed"); ir::g_boxed_mangled_suffix = new string_ref("___boxed"); DEBUG_CODE({ register_trace_class({"interpreter"}); @@ -915,6 +905,7 @@ void initialize_ir_interpreter() { void finalize_ir_interpreter() { delete ir::g_boxed_mangled_suffix; + delete ir::g_boxed_suffix; delete ir::g_mangle_prefix; } } diff --git a/stage0/src/library/compiler/ir_interpreter.h b/stage0/src/library/compiler/ir_interpreter.h index 331c5c797e..200605d2d1 100644 --- a/stage0/src/library/compiler/ir_interpreter.h +++ b/stage0/src/library/compiler/ir_interpreter.h @@ -11,7 +11,7 @@ Author: Sebastian Ullrich namespace lean { namespace ir { /** \brief Run `n` using the "boxed" ABI, i.e. with all-owned parameters. */ -object * run_boxed(environment const & env, name const & fn, object ** args); +object * run_boxed(environment const & env, name const & fn, unsigned n, object **args); uint32 run_main(environment const & env, int argv, char * argc[]); } void initialize_ir_interpreter(); diff --git a/stage0/src/util/format.cpp b/stage0/src/util/format.cpp index e6b8cb136a..7decc42ade 100644 --- a/stage0/src/util/format.cpp +++ b/stage0/src/util/format.cpp @@ -110,9 +110,6 @@ void initialize_format() { g_pp_indent = new name{"pp", "indent"}; g_pp_unicode = new name{"pp", "unicode"}; g_pp_width = new name{"pp", "width"}; - register_unsigned_option(*g_pp_indent, LEAN_DEFAULT_PP_INDENTATION, "(pretty printer) default indentation"); - register_bool_option(*g_pp_unicode, LEAN_DEFAULT_PP_UNICODE, "(pretty printer) use unicode characters"); - register_unsigned_option(*g_pp_width, LEAN_DEFAULT_PP_WIDTH, "(pretty printer) line width"); g_line = new format(box(static_cast(format::format_kind::LINE))); g_space = new format(" "); } diff --git a/stage0/src/util/init_module.cpp b/stage0/src/util/init_module.cpp index a65e02ded5..bd9ef7b203 100644 --- a/stage0/src/util/init_module.cpp +++ b/stage0/src/util/init_module.cpp @@ -10,7 +10,6 @@ Author: Leonardo de Moura #include "util/fresh_name.h" #include "util/name_generator.h" #include "util/options.h" -#include "util/option_declarations.h" #include "util/format.h" namespace lean { @@ -20,14 +19,12 @@ void initialize_util_module() { initialize_name(); initialize_name_generator(); initialize_fresh_name(); - initialize_option_declarations(); initialize_options(); initialize_format(); } void finalize_util_module() { finalize_format(); finalize_options(); - finalize_option_declarations(); finalize_fresh_name(); finalize_name_generator(); finalize_name(); diff --git a/stage0/src/util/option_declarations.cpp b/stage0/src/util/option_declarations.cpp index 4ab0c5c309..5f8e15f683 100644 --- a/stage0/src/util/option_declarations.cpp +++ b/stage0/src/util/option_declarations.cpp @@ -5,69 +5,51 @@ Released under Apache 2.0 license as described in the file LICENSE. Author: Leonardo de Moura */ #include "util/option_declarations.h" +#include "util/array_ref.h" +#include "util/pair_ref.h" +#include "util/io.h" namespace lean { -void option_declaration::display_value(std::ostream & out, options const & o) const { - bool contains = false; - if (o.contains(get_name())) { -/* - sexpr s = o.get_sexpr(get_name()); - switch (kind()) { - case BoolOption: - if (!is_nil(s) && is_bool(s)) { - out << (to_bool(s) ? "true" : "false"); - contains = true; - } - break; - case IntOption: - if (!is_nil(s) && is_int(s)) { - out << to_int(s); - contains = true; - } - break; - case UnsignedOption: - if (!is_nil(s) && is_int(s)) { - out << static_cast(to_int(s)); - contains = true; - } - break; - case StringOption: - if (!is_nil(s) && is_string(s)) { - out << to_string(s); - contains = true; - } - break; - } -*/ - } - if (!contains) - out << get_default_value(); -} +typedef object_ref option_decl; -static option_declarations * g_option_declarations = nullptr; -static mutex * g_option_declarations_guard = nullptr; +extern "C" object * lean_data_value_to_string (obj_arg d); -void initialize_option_declarations() { - g_option_declarations = new option_declarations(); - g_option_declarations_guard = new mutex(); -} - -void finalize_option_declarations() { - delete g_option_declarations; - delete g_option_declarations_guard; -} +extern "C" object * lean_get_option_decls_array(obj_arg w); option_declarations get_option_declarations() { + auto decl_array = get_io_result > > (lean_get_option_decls_array(io_mk_world())); option_declarations r; - { - unique_lock lock(*g_option_declarations_guard); - r = *g_option_declarations; + for (pair_ref const & p : decl_array) { + option_decl decl = p.snd(); + data_value def_val = cnstr_get_ref_t(decl, 0); + string_ref def_str(lean_data_value_to_string(def_val.to_obj_arg())); + string_ref descr = cnstr_get_ref_t(decl, 2); + data_value_kind kind = static_cast(lean_obj_tag(def_val.raw())); + option_declaration d(p.fst(), kind, def_str.data(), descr.data()); + r.insert(p.fst(), d); } return r; } +data_value mk_data_value(data_value_kind k, char const * val) { + switch (k) { + case data_value_kind::String: + return data_value(val); + case data_value_kind::Bool: + return strcmp(val, "true") == 0 ? data_value(true) : data_value(false); + case data_value_kind::Nat: + return data_value(atoi(val)); + case data_value_kind::Name: + return data_value(name(val)); + default: + lean_unreachable(); + } +} + +extern "C" object * lean_register_option(obj_arg name, obj_arg decl, obj_arg w); + void register_option(name const & n, data_value_kind k, char const * default_value, char const * description) { - unique_lock lock(*g_option_declarations_guard); - g_option_declarations->insert(n, option_declaration(n, k, default_value, description)); + object_ref decl = mk_cnstr(0, mk_data_value(k, default_value), string_ref(""), string_ref(description)); + consume_io_result(lean_register_option(n.to_obj_arg(), decl.to_obj_arg(), io_mk_world())); } } diff --git a/stage0/src/util/option_declarations.h b/stage0/src/util/option_declarations.h index 8f668be9e9..5487673fbc 100644 --- a/stage0/src/util/option_declarations.h +++ b/stage0/src/util/option_declarations.h @@ -35,8 +35,6 @@ public: }; typedef name_map option_declarations; -void initialize_option_declarations(); -void finalize_option_declarations(); option_declarations get_option_declarations(); void register_option(name const & n, data_value_kind k, char const * default_value, char const * description); #define register_bool_option(n, v, d) register_option(n, data_value_kind::Bool, LEAN_STR(v), d) diff --git a/stage0/src/util/options.cpp b/stage0/src/util/options.cpp index ff6fd7ee1f..cd2c466dba 100644 --- a/stage0/src/util/options.cpp +++ b/stage0/src/util/options.cpp @@ -23,9 +23,6 @@ void initialize_options() { g_verbose = new name("verbose"); g_max_memory = new name("max_memory"); g_timeout = new name("timeout"); - register_bool_option(*g_verbose, LEAN_DEFAULT_VERBOSE, "disable/enable verbose messages"); - register_unsigned_option(*g_max_memory, LEAN_DEFAULT_MAX_MEMORY, "maximum amount of memory available for Lean in megabytes"); - register_unsigned_option(*g_timeout, 0, "the (deterministic) timeout is measured as the maximum of memory allocations (in thousands) per task, the default is unbounded"); } void finalize_options() { diff --git a/stage0/stdlib/CMakeLists.txt b/stage0/stdlib/CMakeLists.txt index ea0f7bdce1..e8d826797d 100644 --- a/stage0/stdlib/CMakeLists.txt +++ b/stage0/stdlib/CMakeLists.txt @@ -1 +1 @@ -add_library (stage0 OBJECT Init/./Coe.c Init/./Control.c Init/./Control/Alternative.c Init/./Control/Applicative.c Init/./Control/Conditional.c Init/./Control/EState.c Init/./Control/Except.c Init/./Control/Functor.c Init/./Control/Id.c Init/./Control/Lift.c Init/./Control/Monad.c Init/./Control/MonadFail.c Init/./Control/Option.c Init/./Control/Reader.c Init/./Control/State.c Init/./Core.c Init/./Data.c Init/./Data/Array.c Init/./Data/Array/Basic.c Init/./Data/Array/BinSearch.c Init/./Data/Array/QSort.c Init/./Data/AssocList.c Init/./Data/Basic.c Init/./Data/BinomialHeap.c Init/./Data/BinomialHeap/Basic.c Init/./Data/ByteArray.c Init/./Data/ByteArray/Basic.c Init/./Data/Char.c Init/./Data/Char/Basic.c Init/./Data/DList.c Init/./Data/Fin.c Init/./Data/Fin/Basic.c Init/./Data/HashMap.c Init/./Data/HashMap/Basic.c Init/./Data/HashSet.c Init/./Data/Hashable.c Init/./Data/Int.c Init/./Data/Int/Basic.c Init/./Data/List.c Init/./Data/List/Basic.c Init/./Data/List/BasicAux.c Init/./Data/List/Control.c Init/./Data/List/Instances.c Init/./Data/Nat.c Init/./Data/Nat/Basic.c Init/./Data/Nat/Bitwise.c Init/./Data/Nat/Control.c Init/./Data/Nat/Div.c Init/./Data/Option.c Init/./Data/Option/Basic.c Init/./Data/Option/BasicAux.c Init/./Data/Option/Instances.c Init/./Data/PersistentArray.c Init/./Data/PersistentArray/Basic.c Init/./Data/PersistentHashMap.c Init/./Data/PersistentHashMap/Basic.c Init/./Data/PersistentHashSet.c Init/./Data/Queue.c Init/./Data/Queue/Basic.c Init/./Data/RBMap.c Init/./Data/RBMap/Basic.c Init/./Data/RBMap/BasicAux.c Init/./Data/RBTree.c Init/./Data/RBTree/Basic.c Init/./Data/Random.c Init/./Data/Repr.c Init/./Data/Stack.c Init/./Data/Stack/Basic.c Init/./Data/String.c Init/./Data/String/Basic.c Init/./Data/ToString.c Init/./Data/UInt.c Init/./Default.c Init/./Fix.c Init/./Lean.c Init/./Lean/Attributes.c Init/./Lean/AuxRecursor.c Init/./Lean/Class.c Init/./Lean/Compiler.c Init/./Lean/Compiler/ClosedTermCache.c Init/./Lean/Compiler/ConstFolding.c Init/./Lean/Compiler/ExportAttr.c Init/./Lean/Compiler/ExternAttr.c Init/./Lean/Compiler/IR.c Init/./Lean/Compiler/IR/Basic.c Init/./Lean/Compiler/IR/Borrow.c Init/./Lean/Compiler/IR/Boxing.c Init/./Lean/Compiler/IR/Checker.c Init/./Lean/Compiler/IR/CompilerM.c Init/./Lean/Compiler/IR/CtorLayout.c Init/./Lean/Compiler/IR/ElimDeadBranches.c Init/./Lean/Compiler/IR/ElimDeadVars.c Init/./Lean/Compiler/IR/EmitC.c Init/./Lean/Compiler/IR/EmitUtil.c Init/./Lean/Compiler/IR/ExpandResetReuse.c Init/./Lean/Compiler/IR/Format.c Init/./Lean/Compiler/IR/FreeVars.c Init/./Lean/Compiler/IR/LiveVars.c Init/./Lean/Compiler/IR/NormIds.c Init/./Lean/Compiler/IR/PushProj.c Init/./Lean/Compiler/IR/RC.c Init/./Lean/Compiler/IR/ResetReuse.c Init/./Lean/Compiler/IR/SimpCase.c Init/./Lean/Compiler/IR/UnboxResult.c Init/./Lean/Compiler/ImplementedByAttr.c Init/./Lean/Compiler/InitAttr.c Init/./Lean/Compiler/InlineAttrs.c Init/./Lean/Compiler/NameMangling.c Init/./Lean/Compiler/NeverExtractAttr.c Init/./Lean/Compiler/Specialize.c Init/./Lean/Compiler/Util.c Init/./Lean/Data/Format.c Init/./Lean/Data/KVMap.c Init/./Lean/Data/LBool.c Init/./Lean/Data/LOption.c Init/./Lean/Data/Name.c Init/./Lean/Data/NameGenerator.c Init/./Lean/Data/Options.c Init/./Lean/Data/Position.c Init/./Lean/Data/SMap.c Init/./Lean/Data/Trie.c Init/./Lean/Declaration.c Init/./Lean/Elaborator.c Init/./Lean/Elaborator/Alias.c Init/./Lean/Elaborator/Basic.c Init/./Lean/Elaborator/Command.c Init/./Lean/Elaborator/ElabStrategyAttrs.c Init/./Lean/Elaborator/PreTerm.c Init/./Lean/Elaborator/ResolveName.c Init/./Lean/Elaborator/Term.c Init/./Lean/Environment.c Init/./Lean/EqnCompiler.c Init/./Lean/EqnCompiler/MatchPattern.c Init/./Lean/Expr.c Init/./Lean/Level.c Init/./Lean/Linter.c Init/./Lean/LocalContext.c Init/./Lean/Meta.c Init/./Lean/Meta/AbstractMVars.c Init/./Lean/Meta/AppBuilder.c Init/./Lean/Meta/Basic.c Init/./Lean/Meta/Check.c Init/./Lean/Meta/DiscrTree.c Init/./Lean/Meta/DiscrTreeTypes.c Init/./Lean/Meta/Exception.c Init/./Lean/Meta/ExprDefEq.c Init/./Lean/Meta/FunInfo.c Init/./Lean/Meta/InferType.c Init/./Lean/Meta/Instances.c Init/./Lean/Meta/LevelDefEq.c Init/./Lean/Meta/Offset.c Init/./Lean/Meta/Reduce.c Init/./Lean/Meta/SynthInstance.c Init/./Lean/Meta/WHNF.c Init/./Lean/MetavarContext.c Init/./Lean/Modifiers.c Init/./Lean/Parser.c Init/./Lean/Parser/Command.c Init/./Lean/Parser/Identifier.c Init/./Lean/Parser/Level.c Init/./Lean/Parser/Module.c Init/./Lean/Parser/Parser.c Init/./Lean/Parser/Term.c Init/./Lean/Parser/Transform.c Init/./Lean/ProjFns.c Init/./Lean/ReducibilityAttrs.c Init/./Lean/Runtime.c Init/./Lean/Scopes.c Init/./Lean/Syntax.c Init/./Lean/ToExpr.c Init/./Lean/Util/Message.c Init/./Lean/Util/MonadCache.c Init/./Lean/Util/Path.c Init/./Lean/Util/Profile.c Init/./Lean/Util/Trace.c Init/./Lean/Util/WHNF.c Init/./System.c Init/./System/FilePath.c Init/./System/IO.c Init/./System/Platform.c Init/./Util.c Init/./WF.c) +add_library (stage0 OBJECT Init/./Coe.c Init/./Control.c Init/./Control/Alternative.c Init/./Control/Applicative.c Init/./Control/Conditional.c Init/./Control/EState.c Init/./Control/Except.c Init/./Control/Functor.c Init/./Control/Id.c Init/./Control/Lift.c Init/./Control/Monad.c Init/./Control/MonadFail.c Init/./Control/Option.c Init/./Control/Reader.c Init/./Control/State.c Init/./Core.c Init/./Data.c Init/./Data/Array.c Init/./Data/Array/Basic.c Init/./Data/Array/BinSearch.c Init/./Data/Array/QSort.c Init/./Data/AssocList.c Init/./Data/Basic.c Init/./Data/BinomialHeap.c Init/./Data/BinomialHeap/Basic.c Init/./Data/ByteArray.c Init/./Data/ByteArray/Basic.c Init/./Data/Char.c Init/./Data/Char/Basic.c Init/./Data/DList.c Init/./Data/Fin.c Init/./Data/Fin/Basic.c Init/./Data/HashMap.c Init/./Data/HashMap/Basic.c Init/./Data/HashSet.c Init/./Data/Hashable.c Init/./Data/Int.c Init/./Data/Int/Basic.c Init/./Data/List.c Init/./Data/List/Basic.c Init/./Data/List/BasicAux.c Init/./Data/List/Control.c Init/./Data/List/Instances.c Init/./Data/Nat.c Init/./Data/Nat/Basic.c Init/./Data/Nat/Bitwise.c Init/./Data/Nat/Control.c Init/./Data/Nat/Div.c Init/./Data/Option.c Init/./Data/Option/Basic.c Init/./Data/Option/BasicAux.c Init/./Data/Option/Instances.c Init/./Data/PersistentArray.c Init/./Data/PersistentArray/Basic.c Init/./Data/PersistentHashMap.c Init/./Data/PersistentHashMap/Basic.c Init/./Data/PersistentHashSet.c Init/./Data/Queue.c Init/./Data/Queue/Basic.c Init/./Data/RBMap.c Init/./Data/RBMap/Basic.c Init/./Data/RBMap/BasicAux.c Init/./Data/RBTree.c Init/./Data/RBTree/Basic.c Init/./Data/Random.c Init/./Data/Repr.c Init/./Data/Stack.c Init/./Data/Stack/Basic.c Init/./Data/String.c Init/./Data/String/Basic.c Init/./Data/ToString.c Init/./Data/UInt.c Init/./Default.c Init/./Fix.c Init/./Lean.c Init/./Lean/Attributes.c Init/./Lean/AuxRecursor.c Init/./Lean/Class.c Init/./Lean/Compiler.c Init/./Lean/Compiler/ClosedTermCache.c Init/./Lean/Compiler/ConstFolding.c Init/./Lean/Compiler/ExportAttr.c Init/./Lean/Compiler/ExternAttr.c Init/./Lean/Compiler/IR.c Init/./Lean/Compiler/IR/Basic.c Init/./Lean/Compiler/IR/Borrow.c Init/./Lean/Compiler/IR/Boxing.c Init/./Lean/Compiler/IR/Checker.c Init/./Lean/Compiler/IR/CompilerM.c Init/./Lean/Compiler/IR/CtorLayout.c Init/./Lean/Compiler/IR/ElimDeadBranches.c Init/./Lean/Compiler/IR/ElimDeadVars.c Init/./Lean/Compiler/IR/EmitC.c Init/./Lean/Compiler/IR/EmitUtil.c Init/./Lean/Compiler/IR/ExpandResetReuse.c Init/./Lean/Compiler/IR/Format.c Init/./Lean/Compiler/IR/FreeVars.c Init/./Lean/Compiler/IR/LiveVars.c Init/./Lean/Compiler/IR/NormIds.c Init/./Lean/Compiler/IR/PushProj.c Init/./Lean/Compiler/IR/RC.c Init/./Lean/Compiler/IR/ResetReuse.c Init/./Lean/Compiler/IR/SimpCase.c Init/./Lean/Compiler/IR/UnboxResult.c Init/./Lean/Compiler/ImplementedByAttr.c Init/./Lean/Compiler/InitAttr.c Init/./Lean/Compiler/InlineAttrs.c Init/./Lean/Compiler/NameMangling.c Init/./Lean/Compiler/NeverExtractAttr.c Init/./Lean/Compiler/Specialize.c Init/./Lean/Compiler/Util.c Init/./Lean/Data/Format.c Init/./Lean/Data/KVMap.c Init/./Lean/Data/LBool.c Init/./Lean/Data/LOption.c Init/./Lean/Data/Name.c Init/./Lean/Data/NameGenerator.c Init/./Lean/Data/Options.c Init/./Lean/Data/Position.c Init/./Lean/Data/SMap.c Init/./Lean/Data/Trie.c Init/./Lean/Declaration.c Init/./Lean/Elaborator.c Init/./Lean/Elaborator/Alias.c Init/./Lean/Elaborator/Basic.c Init/./Lean/Elaborator/Command.c Init/./Lean/Elaborator/ElabStrategyAttrs.c Init/./Lean/Elaborator/PreTerm.c Init/./Lean/Elaborator/ResolveName.c Init/./Lean/Elaborator/Term.c Init/./Lean/Environment.c Init/./Lean/EqnCompiler.c Init/./Lean/EqnCompiler/MatchPattern.c Init/./Lean/Eval.c Init/./Lean/Expr.c Init/./Lean/Level.c Init/./Lean/Linter.c Init/./Lean/LocalContext.c Init/./Lean/Meta.c Init/./Lean/Meta/AbstractMVars.c Init/./Lean/Meta/AppBuilder.c Init/./Lean/Meta/Basic.c Init/./Lean/Meta/Check.c Init/./Lean/Meta/DiscrTree.c Init/./Lean/Meta/DiscrTreeTypes.c Init/./Lean/Meta/Exception.c Init/./Lean/Meta/ExprDefEq.c Init/./Lean/Meta/FunInfo.c Init/./Lean/Meta/InferType.c Init/./Lean/Meta/Instances.c Init/./Lean/Meta/LevelDefEq.c Init/./Lean/Meta/Offset.c Init/./Lean/Meta/Reduce.c Init/./Lean/Meta/SynthInstance.c Init/./Lean/Meta/WHNF.c Init/./Lean/MetavarContext.c Init/./Lean/Modifiers.c Init/./Lean/Parser.c Init/./Lean/Parser/Command.c Init/./Lean/Parser/Identifier.c Init/./Lean/Parser/Level.c Init/./Lean/Parser/Module.c Init/./Lean/Parser/Parser.c Init/./Lean/Parser/Term.c Init/./Lean/Parser/Transform.c Init/./Lean/ProjFns.c Init/./Lean/ReducibilityAttrs.c Init/./Lean/Runtime.c Init/./Lean/Scopes.c Init/./Lean/Syntax.c Init/./Lean/ToExpr.c Init/./Lean/Util/Message.c Init/./Lean/Util/MonadCache.c Init/./Lean/Util/Path.c Init/./Lean/Util/Profile.c Init/./Lean/Util/Trace.c Init/./Lean/Util/WHNF.c Init/./System.c Init/./System/FilePath.c Init/./System/IO.c Init/./System/Platform.c Init/./Util.c Init/./WF.c) diff --git a/stage0/stdlib/Init/Lean.c b/stage0/stdlib/Init/Lean.c index ffeb9b3edc..95b938338a 100644 --- a/stage0/stdlib/Init/Lean.c +++ b/stage0/stdlib/Init/Lean.c @@ -1,6 +1,6 @@ // Lean compiler output // Module: Init.Lean -// Imports: Init.Lean.Compiler Init.Lean.Environment Init.Lean.Modifiers Init.Lean.ProjFns Init.Lean.Runtime Init.Lean.Attributes Init.Lean.Parser Init.Lean.ReducibilityAttrs Init.Lean.Elaborator Init.Lean.EqnCompiler Init.Lean.Class Init.Lean.LocalContext Init.Lean.MetavarContext Init.Lean.AuxRecursor Init.Lean.Linter Init.Lean.Meta +// Imports: Init.Lean.Compiler Init.Lean.Environment Init.Lean.Modifiers Init.Lean.ProjFns Init.Lean.Runtime Init.Lean.Attributes Init.Lean.Parser Init.Lean.ReducibilityAttrs Init.Lean.Elaborator Init.Lean.EqnCompiler Init.Lean.Class Init.Lean.LocalContext Init.Lean.MetavarContext Init.Lean.AuxRecursor Init.Lean.Linter Init.Lean.Meta Init.Lean.Eval #include "runtime/lean.h" #if defined(__clang__) #pragma clang diagnostic ignored "-Wunused-parameter" @@ -29,6 +29,7 @@ lean_object* initialize_Init_Lean_MetavarContext(lean_object*); lean_object* initialize_Init_Lean_AuxRecursor(lean_object*); lean_object* initialize_Init_Lean_Linter(lean_object*); lean_object* initialize_Init_Lean_Meta(lean_object*); +lean_object* initialize_Init_Lean_Eval(lean_object*); static bool _G_initialized = false; lean_object* initialize_Init_Lean(lean_object* w) { lean_object * res; @@ -82,6 +83,9 @@ lean_dec_ref(res); res = initialize_Init_Lean_Meta(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); +res = initialize_Init_Lean_Eval(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)); } #ifdef __cplusplus diff --git a/stage0/stdlib/Init/Lean/Data/Format.c b/stage0/stdlib/Init/Lean/Data/Format.c index 41ad56fa51..a3a0bf8c24 100644 --- a/stage0/stdlib/Init/Lean/Data/Format.c +++ b/stage0/stdlib/Init/Lean/Data/Format.c @@ -181,7 +181,7 @@ lean_object* l_Lean_optionHasFormat___rarg(lean_object*); lean_object* l_Lean_Format_paren___closed__2; lean_object* l_Lean_Format_spaceUptoLine_x27___boxed(lean_object*, lean_object*); lean_object* l_Lean_Format_getIndent(lean_object*); -lean_object* l_Lean_registerOption(lean_object*, lean_object*, lean_object*); +lean_object* lean_register_option(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_HasRepr; lean_object* l_Lean_natHasFormat(lean_object*); lean_object* lean_format_group(lean_object*); @@ -1572,7 +1572,7 @@ _start: lean_object* x_2; lean_object* x_3; lean_object* x_4; x_2 = l_Lean_Format_getIndent___closed__2; x_3 = l_Lean_Format_indentOption___closed__3; -x_4 = l_Lean_registerOption(x_2, x_3, x_1); +x_4 = lean_register_option(x_2, x_3, x_1); return x_4; } } @@ -1614,7 +1614,7 @@ _start: lean_object* x_2; lean_object* x_3; lean_object* x_4; x_2 = l_Lean_Format_getUnicode___closed__2; x_3 = l_Lean_Format_unicodeOption___closed__3; -x_4 = l_Lean_registerOption(x_2, x_3, x_1); +x_4 = lean_register_option(x_2, x_3, x_1); return x_4; } } @@ -1656,7 +1656,7 @@ _start: lean_object* x_2; lean_object* x_3; lean_object* x_4; x_2 = l_Lean_Format_getWidth___closed__4; x_3 = l_Lean_Format_widthOption___closed__3; -x_4 = l_Lean_registerOption(x_2, x_3, x_1); +x_4 = lean_register_option(x_2, x_3, x_1); return x_4; } } diff --git a/stage0/stdlib/Init/Lean/Data/KVMap.c b/stage0/stdlib/Init/Lean/Data/KVMap.c index 6a6f94d852..f6b3007d6b 100644 --- a/stage0/stdlib/Init/Lean/Data/KVMap.c +++ b/stage0/stdlib/Init/Lean/Data/KVMap.c @@ -13,10 +13,12 @@ #ifdef __cplusplus extern "C" { #endif +extern lean_object* l_Lean_Name_toString___closed__1; lean_object* l_Lean_KVMap_setBool(lean_object*, lean_object*, uint8_t); lean_object* l_Lean_KVMap_insert(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_KVMap_findCore___main___boxed(lean_object*, lean_object*); lean_object* l_Lean_KVMap_getInt___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_DataValue_hasToString; lean_object* l_Lean_KVMap_boolVal___closed__2; lean_object* l_Lean_KVMap_natVal___closed__1; lean_object* l_Lean_KVMap_stringVal___closed__1; @@ -42,6 +44,7 @@ lean_object* l_Lean_KVMap_stringVal___closed__3; lean_object* l_Lean_KVMap_find(lean_object*, lean_object*); extern lean_object* l_Int_zero; lean_object* l_Lean_KVMap_subsetAux___main___boxed(lean_object*, lean_object*); +lean_object* l_Int_repr(lean_object*); lean_object* l_Lean_nat2DataValue(lean_object*); uint8_t lean_nat_dec_eq(lean_object*, lean_object*); uint8_t l_Lean_DataValue_beq(lean_object*, lean_object*); @@ -55,6 +58,7 @@ lean_object* l_Lean_KVMap_stringVal___closed__2; lean_object* l_Lean_KVMap_intVal___closed__3; lean_object* l_Lean_KVMap_getName___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_KVMap_getString(lean_object*, lean_object*, lean_object*); +lean_object* l_Nat_repr(lean_object*); lean_object* l_Lean_KVMap_getName(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_KVMap_isEmpty___boxed(lean_object*); uint8_t l_Lean_KVMap_subset(lean_object*, lean_object*); @@ -70,6 +74,7 @@ lean_object* l_Lean_KVMap_HasBeq___closed__1; uint8_t l_Lean_KVMap_isEmpty(lean_object*); lean_object* l_Lean_KVMap_getNat(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_KVMap_setName(lean_object*, lean_object*, lean_object*); +extern lean_object* l_Bool_HasRepr___closed__1; lean_object* l_Lean_string2DataValue(lean_object*); lean_object* l_Lean_KVMap_setBool___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_KVMap_subset___boxed(lean_object*, lean_object*); @@ -77,6 +82,8 @@ lean_object* l_Lean_KVMap_HasBeq; lean_object* l_Lean_DataValue_HasBeq; lean_object* l_Lean_KVMap_get(lean_object*); lean_object* l_Lean_KVMap_empty; +extern lean_object* l_Bool_HasRepr___closed__2; +lean_object* lean_data_value_to_string(lean_object*); lean_object* l_Lean_KVMap_insertCore(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_KVMap_boolVal; lean_object* l_Lean_KVMap_findCore(lean_object*, lean_object*); @@ -88,9 +95,11 @@ lean_object* l_Lean_KVMap_natVal___closed__2; uint8_t l_Lean_KVMap_subsetAux(lean_object*, lean_object*); uint8_t l_Lean_KVMap_eqv(lean_object*, lean_object*); uint8_t l_List_isEmpty___rarg(lean_object*); +lean_object* l_Lean_Name_toStringWithSep___main(lean_object*, lean_object*); lean_object* l_Lean_int2DataValue(lean_object*); lean_object* l_Lean_KVMap_natVal; lean_object* l_Lean_KVMap_subsetAux___boxed(lean_object*, lean_object*); +lean_object* l_Lean_DataValue_hasToString___closed__1; uint8_t lean_string_dec_eq(lean_object*, lean_object*); lean_object* l_Lean_KVMap_getNat___boxed(lean_object*, lean_object*, lean_object*); uint8_t l_Lean_DataValue_beq(lean_object* x_1, lean_object* x_2) { @@ -214,6 +223,84 @@ x_1 = l_Lean_DataValue_HasBeq___closed__1; return x_1; } } +lean_object* lean_data_value_to_string(lean_object* x_1) { +_start: +{ +switch (lean_obj_tag(x_1)) { +case 0: +{ +lean_object* x_2; +x_2 = lean_ctor_get(x_1, 0); +lean_inc(x_2); +lean_dec(x_1); +return x_2; +} +case 1: +{ +uint8_t x_3; +x_3 = lean_ctor_get_uint8(x_1, 0); +lean_dec(x_1); +if (x_3 == 0) +{ +lean_object* x_4; +x_4 = l_Bool_HasRepr___closed__1; +return x_4; +} +else +{ +lean_object* x_5; +x_5 = l_Bool_HasRepr___closed__2; +return x_5; +} +} +case 2: +{ +lean_object* x_6; lean_object* x_7; lean_object* x_8; +x_6 = lean_ctor_get(x_1, 0); +lean_inc(x_6); +lean_dec(x_1); +x_7 = l_Lean_Name_toString___closed__1; +x_8 = l_Lean_Name_toStringWithSep___main(x_7, x_6); +return x_8; +} +case 3: +{ +lean_object* x_9; lean_object* x_10; +x_9 = lean_ctor_get(x_1, 0); +lean_inc(x_9); +lean_dec(x_1); +x_10 = l_Nat_repr(x_9); +return x_10; +} +default: +{ +lean_object* x_11; lean_object* x_12; +x_11 = lean_ctor_get(x_1, 0); +lean_inc(x_11); +lean_dec(x_1); +x_12 = l_Int_repr(x_11); +lean_dec(x_11); +return x_12; +} +} +} +} +lean_object* _init_l_Lean_DataValue_hasToString___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(lean_data_value_to_string), 1, 0); +return x_1; +} +} +lean_object* _init_l_Lean_DataValue_hasToString() { +_start: +{ +lean_object* x_1; +x_1 = l_Lean_DataValue_hasToString___closed__1; +return x_1; +} +} lean_object* l_Lean_string2DataValue(lean_object* x_1) { _start: { @@ -1213,6 +1300,10 @@ l_Lean_DataValue_HasBeq___closed__1 = _init_l_Lean_DataValue_HasBeq___closed__1( lean_mark_persistent(l_Lean_DataValue_HasBeq___closed__1); l_Lean_DataValue_HasBeq = _init_l_Lean_DataValue_HasBeq(); lean_mark_persistent(l_Lean_DataValue_HasBeq); +l_Lean_DataValue_hasToString___closed__1 = _init_l_Lean_DataValue_hasToString___closed__1(); +lean_mark_persistent(l_Lean_DataValue_hasToString___closed__1); +l_Lean_DataValue_hasToString = _init_l_Lean_DataValue_hasToString(); +lean_mark_persistent(l_Lean_DataValue_hasToString); l_Lean_KVMap_empty = _init_l_Lean_KVMap_empty(); lean_mark_persistent(l_Lean_KVMap_empty); l_Lean_KVMap_HasBeq___closed__1 = _init_l_Lean_KVMap_HasBeq___closed__1(); diff --git a/stage0/stdlib/Init/Lean/Data/Options.c b/stage0/stdlib/Init/Lean/Data/Options.c index 31a1d57c57..fc776206e7 100644 --- a/stage0/stdlib/Init/Lean/Data/Options.c +++ b/stage0/stdlib/Init/Lean/Data/Options.c @@ -1,6 +1,6 @@ // Lean compiler output // Module: Init.Lean.Data.Options -// Imports: Init.System.IO Init.Data.ToString Init.Lean.Data.KVMap +// Imports: Init.System.IO Init.Data.Array Init.Data.ToString Init.Lean.Data.KVMap #include "runtime/lean.h" #if defined(__clang__) #pragma clang diagnostic ignored "-Wunused-parameter" @@ -19,16 +19,22 @@ lean_object* l_Lean_KVMap_setBool(lean_object*, lean_object*, uint8_t); lean_object* l_RBNode_find___main___at_Lean_getOptionDecl___spec__1(lean_object*, lean_object*); uint8_t l_Lean_Name_quickLt(lean_object*, lean_object*); lean_object* l_Lean_KVMap_setNat(lean_object*, lean_object*, lean_object*); +extern lean_object* l_Array_empty___closed__1; +lean_object* l_Lean_verboseOption___closed__3; lean_object* l_String_toNat(lean_object*); lean_object* lean_io_mk_ref(lean_object*, lean_object*); lean_object* l_Lean_KVMap_setString(lean_object*, lean_object*, lean_object*); lean_object* lean_io_ref_get(lean_object*, lean_object*); +lean_object* l_Lean_maxMemoryOption(lean_object*); lean_object* l_Lean_getOptionDefaulValue(lean_object*, lean_object*); lean_object* l_Lean_getOptionDecls(lean_object*); +lean_object* lean_array_push(lean_object*, lean_object*); lean_object* lean_string_append(lean_object*, lean_object*); +extern lean_object* l_String_splitAux___main___closed__1; lean_object* l_String_splitOn(lean_object*, lean_object*); lean_object* l_Lean_getOptionDecl___closed__1; uint8_t l_Lean_NameMap_contains___rarg(lean_object*, lean_object*); +lean_object* l_Lean_timeoutOption___closed__4; lean_object* l_Lean_registerOption___closed__1; lean_object* l_Lean_registerOption___closed__2; lean_object* l_RBNode_insert___at_Lean_NameMap_insert___spec__1___rarg(lean_object*, lean_object*, lean_object*); @@ -37,29 +43,47 @@ lean_object* l_Lean_setOptionFromString___closed__4; lean_object* l_Lean_getOptionDecl(lean_object*, lean_object*); lean_object* l_RBNode_find___main___at_Lean_getOptionDecl___spec__1___boxed(lean_object*, lean_object*); extern lean_object* l_Char_HasRepr___closed__1; +lean_object* lean_get_option_decls_array(lean_object*); lean_object* lean_name_mk_string(lean_object*, lean_object*); lean_object* l_Lean_KVMap_setInt(lean_object*, lean_object*, lean_object*); uint8_t l_String_isNat(lean_object*); +lean_object* l_Lean_verboseOption___closed__4; lean_object* l_Lean_Options_empty; lean_object* l_Lean_setOptionFromString___closed__5; +lean_object* l_Lean_maxMemoryOption___closed__5; +lean_object* l_Lean_maxMemoryOption___closed__3; lean_object* l_Lean_KVMap_setName(lean_object*, lean_object*, lean_object*); extern lean_object* l_Bool_HasRepr___closed__1; +lean_object* l_Lean_timeoutOption___closed__2; lean_object* l_Lean_setOptionFromString(lean_object*, lean_object*, lean_object*); extern lean_object* l_Bool_HasRepr___closed__2; lean_object* l___private_Init_Lean_Data_Options_1__initOptionDeclsRef(lean_object*); +lean_object* l_Lean_verboseOption___closed__2; lean_object* l_Lean_setOptionFromString___closed__1; -lean_object* l_Lean_registerOption(lean_object*, lean_object*, lean_object*); +lean_object* lean_register_option(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_verboseOption___closed__1; +lean_object* l_Lean_timeoutOption___closed__1; +lean_object* l_Lean_maxMemoryOption___closed__1; lean_object* lean_io_ref_set(lean_object*, lean_object*, lean_object*); +lean_object* l_RBNode_fold___main___at_Lean_getOptionDeclsArray___spec__1___boxed(lean_object*, lean_object*); lean_object* l_String_trim(lean_object*); +lean_object* l_Lean_maxMemoryOption___closed__2; lean_object* l_String_toInt(lean_object*); lean_object* l_Lean_setOptionFromString___closed__2; +lean_object* l_Lean_timeoutOption___closed__3; lean_object* l_Lean_Options_HasEmptyc; +lean_object* l_RBNode_fold___main___at_Lean_getOptionDeclsArray___spec__1(lean_object*, lean_object*); lean_object* l_Lean_Name_toStringWithSep___main(lean_object*, lean_object*); +lean_object* l_Lean_verboseOption___closed__5; lean_object* l_Lean_getOptionDescr(lean_object*, lean_object*); +lean_object* l_Lean_timeoutOption(lean_object*); lean_object* l_Lean_setOptionFromString___closed__3; +lean_object* l_Lean_maxMemoryOption___closed__4; lean_object* l___private_Init_Lean_Data_Options_2__optionDeclsRef; lean_object* l_List_map___main___at_Lean_setOptionFromString___spec__1(lean_object*); uint8_t lean_string_dec_eq(lean_object*, lean_object*); +lean_object* l_Lean_verboseOption(lean_object*); +lean_object* l_Lean_timeoutOption___closed__5; lean_object* _init_l_Lean_Options_empty() { _start: { @@ -101,7 +125,7 @@ x_1 = lean_mk_string("', option already exists"); return x_1; } } -lean_object* l_Lean_registerOption(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* lean_register_option(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; lean_object* x_5; @@ -212,6 +236,103 @@ x_3 = lean_io_ref_get(x_2, x_1); return x_3; } } +lean_object* l_RBNode_fold___main___at_Lean_getOptionDeclsArray___spec__1(lean_object* x_1, lean_object* x_2) { +_start: +{ +if (lean_obj_tag(x_2) == 0) +{ +return x_1; +} +else +{ +lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; +x_3 = lean_ctor_get(x_2, 0); +x_4 = lean_ctor_get(x_2, 1); +x_5 = lean_ctor_get(x_2, 2); +x_6 = lean_ctor_get(x_2, 3); +x_7 = l_RBNode_fold___main___at_Lean_getOptionDeclsArray___spec__1(x_1, x_3); +lean_inc(x_5); +lean_inc(x_4); +x_8 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_8, 0, x_4); +lean_ctor_set(x_8, 1, x_5); +x_9 = lean_array_push(x_7, x_8); +x_1 = x_9; +x_2 = x_6; +goto _start; +} +} +} +lean_object* lean_get_option_decls_array(lean_object* x_1) { +_start: +{ +lean_object* x_2; lean_object* x_3; +x_2 = l___private_Init_Lean_Data_Options_2__optionDeclsRef; +x_3 = lean_io_ref_get(x_2, x_1); +if (lean_obj_tag(x_3) == 0) +{ +uint8_t x_4; +x_4 = !lean_is_exclusive(x_3); +if (x_4 == 0) +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; +x_5 = lean_ctor_get(x_3, 0); +x_6 = l_Array_empty___closed__1; +x_7 = l_RBNode_fold___main___at_Lean_getOptionDeclsArray___spec__1(x_6, x_5); +lean_dec(x_5); +lean_ctor_set(x_3, 0, x_7); +return x_3; +} +else +{ +lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; +x_8 = lean_ctor_get(x_3, 0); +x_9 = lean_ctor_get(x_3, 1); +lean_inc(x_9); +lean_inc(x_8); +lean_dec(x_3); +x_10 = l_Array_empty___closed__1; +x_11 = l_RBNode_fold___main___at_Lean_getOptionDeclsArray___spec__1(x_10, x_8); +lean_dec(x_8); +x_12 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_12, 0, x_11); +lean_ctor_set(x_12, 1, x_9); +return x_12; +} +} +else +{ +uint8_t x_13; +x_13 = !lean_is_exclusive(x_3); +if (x_13 == 0) +{ +return x_3; +} +else +{ +lean_object* x_14; lean_object* x_15; lean_object* x_16; +x_14 = lean_ctor_get(x_3, 0); +x_15 = lean_ctor_get(x_3, 1); +lean_inc(x_15); +lean_inc(x_14); +lean_dec(x_3); +x_16 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_16, 0, x_14); +lean_ctor_set(x_16, 1, x_15); +return x_16; +} +} +} +} +lean_object* l_RBNode_fold___main___at_Lean_getOptionDeclsArray___spec__1___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = l_RBNode_fold___main___at_Lean_getOptionDeclsArray___spec__1(x_1, x_2); +lean_dec(x_2); +return x_3; +} +} lean_object* l_RBNode_find___main___at_Lean_getOptionDecl___spec__1(lean_object* x_1, lean_object* x_2) { _start: { @@ -1007,7 +1128,188 @@ return x_129; } } } +lean_object* _init_l_Lean_verboseOption___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("verbose"); +return x_1; +} +} +lean_object* _init_l_Lean_verboseOption___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_verboseOption___closed__1; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_verboseOption___closed__3() { +_start: +{ +uint8_t x_1; lean_object* x_2; +x_1 = 1; +x_2 = lean_alloc_ctor(1, 0, 1); +lean_ctor_set_uint8(x_2, 0, x_1); +return x_2; +} +} +lean_object* _init_l_Lean_verboseOption___closed__4() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("disable/enable verbose messages"); +return x_1; +} +} +lean_object* _init_l_Lean_verboseOption___closed__5() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_1 = l_Lean_verboseOption___closed__3; +x_2 = l_String_splitAux___main___closed__1; +x_3 = l_Lean_verboseOption___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* l_Lean_verboseOption(lean_object* x_1) { +_start: +{ +lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_2 = l_Lean_verboseOption___closed__2; +x_3 = l_Lean_verboseOption___closed__5; +x_4 = lean_register_option(x_2, x_3, x_1); +return x_4; +} +} +lean_object* _init_l_Lean_timeoutOption___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("timeout"); +return x_1; +} +} +lean_object* _init_l_Lean_timeoutOption___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_timeoutOption___closed__1; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_timeoutOption___closed__3() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = lean_unsigned_to_nat(0u); +x_2 = lean_alloc_ctor(3, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* _init_l_Lean_timeoutOption___closed__4() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("the (deterministic) timeout is measured as the maximum of memory allocations (in thousands) per task, the default is unbounded"); +return x_1; +} +} +lean_object* _init_l_Lean_timeoutOption___closed__5() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_1 = l_Lean_timeoutOption___closed__3; +x_2 = l_String_splitAux___main___closed__1; +x_3 = l_Lean_timeoutOption___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* l_Lean_timeoutOption(lean_object* x_1) { +_start: +{ +lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_2 = l_Lean_timeoutOption___closed__2; +x_3 = l_Lean_timeoutOption___closed__5; +x_4 = lean_register_option(x_2, x_3, x_1); +return x_4; +} +} +lean_object* _init_l_Lean_maxMemoryOption___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("maxMemory"); +return x_1; +} +} +lean_object* _init_l_Lean_maxMemoryOption___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_maxMemoryOption___closed__1; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_maxMemoryOption___closed__3() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = lean_unsigned_to_nat(2048u); +x_2 = lean_alloc_ctor(3, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* _init_l_Lean_maxMemoryOption___closed__4() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("maximum amount of memory available for Lean in megabytes"); +return x_1; +} +} +lean_object* _init_l_Lean_maxMemoryOption___closed__5() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_1 = l_Lean_maxMemoryOption___closed__3; +x_2 = l_String_splitAux___main___closed__1; +x_3 = l_Lean_maxMemoryOption___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* l_Lean_maxMemoryOption(lean_object* x_1) { +_start: +{ +lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_2 = l_Lean_maxMemoryOption___closed__2; +x_3 = l_Lean_maxMemoryOption___closed__5; +x_4 = lean_register_option(x_2, x_3, x_1); +return x_4; +} +} lean_object* initialize_Init_System_IO(lean_object*); +lean_object* initialize_Init_Data_Array(lean_object*); lean_object* initialize_Init_Data_ToString(lean_object*); lean_object* initialize_Init_Lean_Data_KVMap(lean_object*); static bool _G_initialized = false; @@ -1018,6 +1320,9 @@ _G_initialized = true; res = initialize_Init_System_IO(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); +res = initialize_Init_Data_Array(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); res = initialize_Init_Data_ToString(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); @@ -1049,6 +1354,45 @@ l_Lean_setOptionFromString___closed__4 = _init_l_Lean_setOptionFromString___clos lean_mark_persistent(l_Lean_setOptionFromString___closed__4); l_Lean_setOptionFromString___closed__5 = _init_l_Lean_setOptionFromString___closed__5(); lean_mark_persistent(l_Lean_setOptionFromString___closed__5); +l_Lean_verboseOption___closed__1 = _init_l_Lean_verboseOption___closed__1(); +lean_mark_persistent(l_Lean_verboseOption___closed__1); +l_Lean_verboseOption___closed__2 = _init_l_Lean_verboseOption___closed__2(); +lean_mark_persistent(l_Lean_verboseOption___closed__2); +l_Lean_verboseOption___closed__3 = _init_l_Lean_verboseOption___closed__3(); +lean_mark_persistent(l_Lean_verboseOption___closed__3); +l_Lean_verboseOption___closed__4 = _init_l_Lean_verboseOption___closed__4(); +lean_mark_persistent(l_Lean_verboseOption___closed__4); +l_Lean_verboseOption___closed__5 = _init_l_Lean_verboseOption___closed__5(); +lean_mark_persistent(l_Lean_verboseOption___closed__5); +res = l_Lean_verboseOption(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +l_Lean_timeoutOption___closed__1 = _init_l_Lean_timeoutOption___closed__1(); +lean_mark_persistent(l_Lean_timeoutOption___closed__1); +l_Lean_timeoutOption___closed__2 = _init_l_Lean_timeoutOption___closed__2(); +lean_mark_persistent(l_Lean_timeoutOption___closed__2); +l_Lean_timeoutOption___closed__3 = _init_l_Lean_timeoutOption___closed__3(); +lean_mark_persistent(l_Lean_timeoutOption___closed__3); +l_Lean_timeoutOption___closed__4 = _init_l_Lean_timeoutOption___closed__4(); +lean_mark_persistent(l_Lean_timeoutOption___closed__4); +l_Lean_timeoutOption___closed__5 = _init_l_Lean_timeoutOption___closed__5(); +lean_mark_persistent(l_Lean_timeoutOption___closed__5); +res = l_Lean_timeoutOption(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +l_Lean_maxMemoryOption___closed__1 = _init_l_Lean_maxMemoryOption___closed__1(); +lean_mark_persistent(l_Lean_maxMemoryOption___closed__1); +l_Lean_maxMemoryOption___closed__2 = _init_l_Lean_maxMemoryOption___closed__2(); +lean_mark_persistent(l_Lean_maxMemoryOption___closed__2); +l_Lean_maxMemoryOption___closed__3 = _init_l_Lean_maxMemoryOption___closed__3(); +lean_mark_persistent(l_Lean_maxMemoryOption___closed__3); +l_Lean_maxMemoryOption___closed__4 = _init_l_Lean_maxMemoryOption___closed__4(); +lean_mark_persistent(l_Lean_maxMemoryOption___closed__4); +l_Lean_maxMemoryOption___closed__5 = _init_l_Lean_maxMemoryOption___closed__5(); +lean_mark_persistent(l_Lean_maxMemoryOption___closed__5); +res = l_Lean_maxMemoryOption(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)); } #ifdef __cplusplus diff --git a/stage0/stdlib/Init/Lean/Elaborator/Basic.c b/stage0/stdlib/Init/Lean/Elaborator/Basic.c index 79c4d4e6d7..f13a23f39d 100644 --- a/stage0/stdlib/Init/Lean/Elaborator/Basic.c +++ b/stage0/stdlib/Init/Lean/Elaborator/Basic.c @@ -121,7 +121,6 @@ lean_object* l_Lean_Elab_inPattern___rarg(lean_object*); lean_object* l_Lean_SMap_empty___at_Lean_mkBuiltinTermElabTable___spec__1___closed__1; lean_object* l_Lean_Elab_mkAnonymousInstName___boxed(lean_object*, lean_object*); lean_object* l_Lean_Elab_runElab___at_Lean_Elab_processCommand___spec__1___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_IO_println___at_HasRepr_HasEval___spec__1(lean_object*, lean_object*); lean_object* l_Lean_checkSyntaxNodeKindAtNamespaces___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_commandElabAttribute___closed__1; lean_object* l_AssocList_find___main___at_Lean_Elab_elabCommand___spec__6(lean_object*, lean_object*); @@ -203,6 +202,7 @@ lean_object* l_Lean_Elab_runElab___rarg(lean_object*, lean_object*, lean_object* lean_object* l_PersistentHashMap_findAux___main___at_Lean_Elab_elabCommand___spec__3___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_ElabScope_Inhabited; lean_object* lean_array_get(lean_object*, lean_object*, lean_object*); +lean_object* l_IO_println___at_Lean_HasRepr_HasEval___spec__1(lean_object*, lean_object*); lean_object* l_Lean_mkElabAttribute___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_AssocList_contains___main___at_Lean_addBuiltinTermElab___spec__3___boxed(lean_object*, lean_object*); lean_object* lean_array_fset(lean_object*, lean_object*, lean_object*); @@ -10068,7 +10068,7 @@ lean_inc(x_9); x_10 = lean_ctor_get(x_8, 1); lean_inc(x_10); lean_dec(x_8); -x_11 = l_IO_println___at_HasRepr_HasEval___spec__1(x_9, x_10); +x_11 = l_IO_println___at_Lean_HasRepr_HasEval___spec__1(x_9, x_10); lean_dec(x_9); if (lean_obj_tag(x_11) == 0) { diff --git a/stage0/stdlib/Init/Lean/Elaborator/Command.c b/stage0/stdlib/Init/Lean/Elaborator/Command.c index 6d24543c62..dc725260b4 100644 --- a/stage0/stdlib/Init/Lean/Elaborator/Command.c +++ b/stage0/stdlib/Init/Lean/Elaborator/Command.c @@ -165,7 +165,6 @@ lean_object* l___regBuiltinTermElab_Lean_Elab_elabMixfix___closed__2; lean_object* l_Lean_Elab_elabNotation___rarg(lean_object*); extern lean_object* l_Option_HasRepr___rarg___closed__3; lean_object* l_IO_println___at___private_Init_Lean_Parser_Module_4__testModuleParserAux___main___spec__1(lean_object*, lean_object*); -lean_object* l_IO_println___at_HasRepr_HasEval___spec__1___boxed(lean_object*, lean_object*); lean_object* l_Lean_Elab_elabElab___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_List_drop___main___rarg(lean_object*, lean_object*); lean_object* l_Lean_Elab_elabOpen___boxed(lean_object*, lean_object*, lean_object*); @@ -180,6 +179,7 @@ lean_object* l_Lean_Elab_elabExport(lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltinTermElab_Lean_Elab_elabUniverse___closed__3; lean_object* l___regBuiltinTermElab_Lean_Elab_elabExport___closed__2; extern lean_object* l_Lean_Parser_Command_reserve___elambda__1___closed__2; +lean_object* l_IO_println___at_Lean_HasRepr_HasEval___spec__1___boxed(lean_object*, lean_object*); lean_object* l___regBuiltinTermElab_Lean_Elab_elabVariable___closed__1; lean_object* l___private_Init_Lean_Elaborator_Command_3__checkAnonymousScope___boxed(lean_object*); lean_object* l___private_Init_Lean_Elaborator_Command_1__addScopes(lean_object*, uint8_t, lean_object*, lean_object*); @@ -3797,7 +3797,7 @@ x_28 = l_String_Iterator_HasRepr___closed__2; x_29 = lean_string_append(x_27, x_28); x_30 = lean_string_append(x_29, x_16); lean_dec(x_16); -x_31 = lean_alloc_closure((void*)(l_IO_println___at_HasRepr_HasEval___spec__1___boxed), 2, 1); +x_31 = lean_alloc_closure((void*)(l_IO_println___at_Lean_HasRepr_HasEval___spec__1___boxed), 2, 1); lean_closure_set(x_31, 0, x_30); x_32 = l_Lean_Elab_runIOUnsafe___rarg(x_31, x_2, x_15); if (lean_obj_tag(x_32) == 0) @@ -3938,7 +3938,7 @@ lean_inc(x_14); lean_dec(x_12); x_15 = lean_expr_dbg_to_string(x_13); lean_dec(x_13); -x_16 = lean_alloc_closure((void*)(l_IO_println___at_HasRepr_HasEval___spec__1___boxed), 2, 1); +x_16 = lean_alloc_closure((void*)(l_IO_println___at_Lean_HasRepr_HasEval___spec__1___boxed), 2, 1); lean_closure_set(x_16, 0, x_15); x_17 = l_Lean_Elab_runIOUnsafe___rarg(x_16, x_2, x_14); lean_dec(x_2); @@ -4185,7 +4185,7 @@ lean_inc(x_28); lean_dec(x_12); x_29 = lean_expr_dbg_to_string(x_28); lean_dec(x_28); -x_30 = lean_alloc_closure((void*)(l_IO_println___at_HasRepr_HasEval___spec__1___boxed), 2, 1); +x_30 = lean_alloc_closure((void*)(l_IO_println___at_Lean_HasRepr_HasEval___spec__1___boxed), 2, 1); lean_closure_set(x_30, 0, x_29); x_31 = l_Lean_Elab_runIOUnsafe___rarg(x_30, x_2, x_13); lean_dec(x_2); diff --git a/stage0/stdlib/Init/Lean/Elaborator/PreTerm.c b/stage0/stdlib/Init/Lean/Elaborator/PreTerm.c index 0e49ce7573..62424b1b3e 100644 --- a/stage0/stdlib/Init/Lean/Elaborator/PreTerm.c +++ b/stage0/stdlib/Init/Lean/Elaborator/PreTerm.c @@ -186,7 +186,6 @@ lean_object* l_Lean_Syntax_getNumArgs___rarg(lean_object*); lean_object* l___regBuiltinTermElab_Lean_Elab_convertType___closed__5; lean_object* l_Lean_Elab_toLevel___main___closed__1; lean_object* l_Lean_Elab_toLevel___main___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_IO_println___at_HasRepr_HasEval___spec__1___boxed(lean_object*, lean_object*); lean_object* l___private_Init_Lean_Elaborator_PreTerm_4__processBinder___closed__3; extern lean_object* l_Lean_Syntax_formatStx___main___rarg___closed__5; lean_object* lean_local_ctx_find_from_user_name(lean_object*, lean_object*); @@ -205,6 +204,7 @@ extern lean_object* l_Lean_Parser_Level_paren___elambda__1___rarg___closed__3; uint8_t lean_nat_dec_le(lean_object*, lean_object*); lean_object* l_Lean_mkApp(lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Term_explicitBinder___elambda__1___closed__1; +lean_object* l_IO_println___at_Lean_HasRepr_HasEval___spec__1___boxed(lean_object*, lean_object*); lean_object* l_Lean_Elab_mkForall(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_registerTagAttribute___lambda__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_panic(lean_object*, lean_object*, lean_object*); @@ -3661,7 +3661,7 @@ x_37 = l_Lean_Format_pretty(x_35, x_36); x_38 = l___private_Init_Lean_Elaborator_PreTerm_4__processBinder___closed__3; x_39 = lean_string_append(x_38, x_37); lean_dec(x_37); -x_40 = lean_alloc_closure((void*)(l_IO_println___at_HasRepr_HasEval___spec__1___boxed), 2, 1); +x_40 = lean_alloc_closure((void*)(l_IO_println___at_Lean_HasRepr_HasEval___spec__1___boxed), 2, 1); lean_closure_set(x_40, 0, x_39); x_41 = l_Lean_Elab_runIOUnsafe___rarg(x_40, x_2, x_3); lean_dec(x_2); @@ -3725,7 +3725,7 @@ x_54 = l_Lean_Format_pretty(x_52, x_53); x_55 = l___private_Init_Lean_Elaborator_PreTerm_4__processBinder___closed__4; x_56 = lean_string_append(x_55, x_54); lean_dec(x_54); -x_57 = lean_alloc_closure((void*)(l_IO_println___at_HasRepr_HasEval___spec__1___boxed), 2, 1); +x_57 = lean_alloc_closure((void*)(l_IO_println___at_Lean_HasRepr_HasEval___spec__1___boxed), 2, 1); lean_closure_set(x_57, 0, x_56); x_58 = l_Lean_Elab_runIOUnsafe___rarg(x_57, x_2, x_3); lean_dec(x_2); diff --git a/stage0/stdlib/Init/Lean/Environment.c b/stage0/stdlib/Init/Lean/Environment.c index e2fa246718..664dca4c5a 100644 --- a/stage0/stdlib/Init/Lean/Environment.c +++ b/stage0/stdlib/Init/Lean/Environment.c @@ -118,7 +118,6 @@ lean_object* l_AssocList_contains___main___at_Lean_Environment_addAux___spec__7_ uint8_t l_HashMapImp_contains___at_Lean_Environment_contains___spec__2(lean_object*, lean_object*); lean_object* l_Lean_namespacesExt___closed__2; lean_object* l_Lean_namespacesExt___elambda__3___boxed(lean_object*, lean_object*); -lean_object* l_IO_println___at_HasRepr_HasEval___spec__1(lean_object*, lean_object*); lean_object* l_Lean_registerSimplePersistentEnvExtension___rarg___lambda__4(lean_object*); lean_object* l_Lean_PersistentEnvExtension_inhabited(lean_object*, lean_object*); extern lean_object* l_Lean_LocalContext_Inhabited___closed__1; @@ -184,6 +183,7 @@ lean_object* l_Lean_ModuleData_inhabited___closed__1; lean_object* lean_set_extension(lean_object*, lean_object*, lean_object*); lean_object* l_Nat_foldAux___main___at_Lean_mkModuleData___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_array_get(lean_object*, lean_object*, lean_object*); +lean_object* l_IO_println___at_Lean_HasRepr_HasEval___spec__1(lean_object*, lean_object*); lean_object* l_Lean_SimplePersistentEnvExtension_modifyState___rarg___lambda__1(lean_object*, lean_object*); lean_object* l_Lean_SMap_size___at_Lean_Environment_displayStats___spec__3___boxed(lean_object*); lean_object* lean_array_fset(lean_object*, lean_object*, lean_object*); @@ -11292,7 +11292,7 @@ x_16 = lean_string_append(x_15, x_14); lean_dec(x_14); x_17 = l_Char_HasRepr___closed__1; x_18 = lean_string_append(x_16, x_17); -x_19 = l_IO_println___at_HasRepr_HasEval___spec__1(x_18, x_4); +x_19 = l_IO_println___at_Lean_HasRepr_HasEval___spec__1(x_18, x_4); lean_dec(x_18); if (lean_obj_tag(x_19) == 0) { @@ -11321,7 +11321,7 @@ x_30 = l_Lean_Format_pretty(x_28, x_29); x_31 = l_Array_forMAux___main___at_Lean_Environment_displayStats___spec__9___closed__2; x_32 = lean_string_append(x_31, x_30); lean_dec(x_30); -x_33 = l_IO_println___at_HasRepr_HasEval___spec__1(x_32, x_20); +x_33 = l_IO_println___at_Lean_HasRepr_HasEval___spec__1(x_32, x_20); lean_dec(x_32); if (lean_obj_tag(x_33) == 0) { @@ -11340,7 +11340,7 @@ x_38 = l_Nat_repr(x_37); x_39 = l_Array_forMAux___main___at_Lean_Environment_displayStats___spec__9___closed__3; x_40 = lean_string_append(x_39, x_38); lean_dec(x_38); -x_41 = l_IO_println___at_HasRepr_HasEval___spec__1(x_40, x_34); +x_41 = l_IO_println___at_Lean_HasRepr_HasEval___spec__1(x_40, x_34); lean_dec(x_40); if (lean_obj_tag(x_41) == 0) { @@ -11417,7 +11417,7 @@ x_55 = l_Nat_repr(x_54); x_56 = l_Array_forMAux___main___at_Lean_Environment_displayStats___spec__9___closed__3; x_57 = lean_string_append(x_56, x_55); lean_dec(x_55); -x_58 = l_IO_println___at_HasRepr_HasEval___spec__1(x_57, x_20); +x_58 = l_IO_println___at_Lean_HasRepr_HasEval___spec__1(x_57, x_20); lean_dec(x_57); if (lean_obj_tag(x_58) == 0) { @@ -11584,7 +11584,7 @@ lean_dec(x_17); x_20 = l_Lean_Environment_displayStats___closed__1; x_21 = lean_string_append(x_20, x_19); lean_dec(x_19); -x_22 = l_IO_println___at_HasRepr_HasEval___spec__1(x_21, x_6); +x_22 = l_IO_println___at_Lean_HasRepr_HasEval___spec__1(x_21, x_6); lean_dec(x_21); if (lean_obj_tag(x_22) == 0) { @@ -11596,7 +11596,7 @@ x_24 = l_Nat_repr(x_13); x_25 = l_Lean_Environment_displayStats___closed__2; x_26 = lean_string_append(x_25, x_24); lean_dec(x_24); -x_27 = l_IO_println___at_HasRepr_HasEval___spec__1(x_26, x_23); +x_27 = l_IO_println___at_Lean_HasRepr_HasEval___spec__1(x_26, x_23); lean_dec(x_26); if (lean_obj_tag(x_27) == 0) { @@ -11611,7 +11611,7 @@ x_31 = l_Nat_repr(x_30); x_32 = l_Lean_Environment_displayStats___closed__3; x_33 = lean_string_append(x_32, x_31); lean_dec(x_31); -x_34 = l_IO_println___at_HasRepr_HasEval___spec__1(x_33, x_28); +x_34 = l_IO_println___at_Lean_HasRepr_HasEval___spec__1(x_33, x_28); lean_dec(x_33); if (lean_obj_tag(x_34) == 0) { @@ -11626,7 +11626,7 @@ x_38 = l_Nat_repr(x_37); x_39 = l_Lean_Environment_displayStats___closed__4; x_40 = lean_string_append(x_39, x_38); lean_dec(x_38); -x_41 = l_IO_println___at_HasRepr_HasEval___spec__1(x_40, x_35); +x_41 = l_IO_println___at_Lean_HasRepr_HasEval___spec__1(x_40, x_35); lean_dec(x_40); if (lean_obj_tag(x_41) == 0) { @@ -11641,7 +11641,7 @@ x_44 = l_Nat_repr(x_43); x_45 = l_Lean_Environment_displayStats___closed__5; x_46 = lean_string_append(x_45, x_44); lean_dec(x_44); -x_47 = l_IO_println___at_HasRepr_HasEval___spec__1(x_46, x_42); +x_47 = l_IO_println___at_Lean_HasRepr_HasEval___spec__1(x_46, x_42); lean_dec(x_46); if (lean_obj_tag(x_47) == 0) { @@ -11655,7 +11655,7 @@ x_50 = l_Nat_repr(x_49); x_51 = l_Lean_Environment_displayStats___closed__6; x_52 = lean_string_append(x_51, x_50); lean_dec(x_50); -x_53 = l_IO_println___at_HasRepr_HasEval___spec__1(x_52, x_48); +x_53 = l_IO_println___at_Lean_HasRepr_HasEval___spec__1(x_52, x_48); lean_dec(x_52); if (lean_obj_tag(x_53) == 0) { @@ -11670,7 +11670,7 @@ x_57 = l_Nat_repr(x_56); x_58 = l_Lean_Environment_displayStats___closed__7; x_59 = lean_string_append(x_58, x_57); lean_dec(x_57); -x_60 = l_IO_println___at_HasRepr_HasEval___spec__1(x_59, x_54); +x_60 = l_IO_println___at_Lean_HasRepr_HasEval___spec__1(x_59, x_54); lean_dec(x_59); if (lean_obj_tag(x_60) == 0) { @@ -11686,7 +11686,7 @@ x_64 = l_Nat_repr(x_63); x_65 = l_Lean_Environment_displayStats___closed__8; x_66 = lean_string_append(x_65, x_64); lean_dec(x_64); -x_67 = l_IO_println___at_HasRepr_HasEval___spec__1(x_66, x_61); +x_67 = l_IO_println___at_Lean_HasRepr_HasEval___spec__1(x_66, x_61); lean_dec(x_66); if (lean_obj_tag(x_67) == 0) { diff --git a/stage0/stdlib/Init/Lean/Eval.c b/stage0/stdlib/Init/Lean/Eval.c new file mode 100644 index 0000000000..e23d7b0e87 --- /dev/null +++ b/stage0/stdlib/Init/Lean/Eval.c @@ -0,0 +1,62 @@ +// Lean compiler output +// Module: Init.Lean.Eval +// Imports: Init.System.IO Init.Lean.Environment +#include "runtime/lean.h" +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* l_Lean_MetaHasEvalOfHasEval(lean_object*); +lean_object* l_Lean_MetaHasEvalOfHasEval___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_MetaHasEvalOfHasEval___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_MetaHasEvalOfHasEval___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; +x_6 = lean_apply_2(x_1, x_4, x_5); +return x_6; +} +} +lean_object* l_Lean_MetaHasEvalOfHasEval(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_MetaHasEvalOfHasEval___rarg___boxed), 5, 0); +return x_2; +} +} +lean_object* l_Lean_MetaHasEvalOfHasEval___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +_start: +{ +lean_object* x_6; +x_6 = l_Lean_MetaHasEvalOfHasEval___rarg(x_1, x_2, x_3, x_4, x_5); +lean_dec(x_3); +lean_dec(x_2); +return x_6; +} +} +lean_object* initialize_Init_System_IO(lean_object*); +lean_object* initialize_Init_Lean_Environment(lean_object*); +static bool _G_initialized = false; +lean_object* initialize_Init_Lean_Eval(lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_mk_io_result(lean_box(0)); +_G_initialized = true; +res = initialize_Init_System_IO(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_Init_Lean_Environment(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)); +} +#ifdef __cplusplus +} +#endif diff --git a/stage0/stdlib/Init/Lean/Message.c b/stage0/stdlib/Init/Lean/Message.c deleted file mode 100644 index 8ad1ecfaeb..0000000000 --- a/stage0/stdlib/Init/Lean/Message.c +++ /dev/null @@ -1,1010 +0,0 @@ -// Lean compiler output -// Module: Init.Lean.Message -// Imports: Init.Data.ToString Init.Lean.Data.Position Init.Lean.Syntax Init.Lean.MetavarContext Init.Lean.Environment -#include "runtime/lean.h" -#if defined(__clang__) -#pragma clang diagnostic ignored "-Wunused-parameter" -#pragma clang diagnostic ignored "-Wunused-label" -#elif defined(__GNUC__) && !defined(__CLANG__) -#pragma GCC diagnostic ignored "-Wunused-parameter" -#pragma GCC diagnostic ignored "-Wunused-label" -#pragma GCC diagnostic ignored "-Wunused-but-set-variable" -#endif -#ifdef __cplusplus -extern "C" { -#endif -lean_object* l_List_reverse___rarg(lean_object*); -extern lean_object* l_Lean_Name_toString___closed__1; -extern lean_object* l_addParenHeuristic___closed__2; -lean_object* l_Lean_Message_toString___closed__3; -lean_object* l_Lean_MessageLog_Inhabited; -lean_object* l_Lean_Format_pretty(lean_object*, lean_object*); -lean_object* l_Lean_MessageLog_hasErrors___boxed(lean_object*); -extern lean_object* l_Lean_Format_flatten___main___closed__1; -lean_object* l_Lean_MessageData_coeOfLevel(lean_object*); -lean_object* l_List_append___rarg(lean_object*, lean_object*); -lean_object* l_Lean_MessageData_arrayExpr_toMessageData___main(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_MessageData_arrayExpr_toMessageData___main___closed__1; -lean_object* l_Lean_MessageData_Lean_HasFormat(lean_object*); -lean_object* l_Lean_MessageData_coeOfFormat(lean_object*); -lean_object* l_Lean_MessageData_arrayExpr_toMessageData___main___boxed(lean_object*, lean_object*, lean_object*); -lean_object* lean_array_get_size(lean_object*); -lean_object* lean_string_append(lean_object*, lean_object*); -lean_object* l_Lean_MessageData_formatAux___main(lean_object*, lean_object*); -extern lean_object* l_Lean_formatKVMap___closed__1; -extern lean_object* l_String_splitAux___main___closed__1; -uint8_t l_List_foldr___main___at_Lean_MessageLog_hasErrors___spec__1(uint8_t, lean_object*); -lean_object* l_Lean_fmt___at_Lean_Level_LevelToFormat_toResult___main___spec__1(lean_object*); -lean_object* lean_nat_add(lean_object*, lean_object*); -extern lean_object* l_Lean_Format_sbracket___closed__2; -extern lean_object* l_EStateM_Result_toString___rarg___closed__2; -lean_object* l_Lean_MessageLog_toList(lean_object*); -lean_object* lean_array_fget(lean_object*, lean_object*); -lean_object* l_Lean_MessageLog_append(lean_object*, lean_object*); -uint8_t lean_nat_dec_eq(lean_object*, lean_object*); -lean_object* l_Lean_MessageData_coeOfName(lean_object*); -lean_object* l_Array_iterateMAux___main___at_Lean_MessageData_formatAux___main___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_MessageData_Inhabited; -lean_object* l_Lean_fmt___at_Lean_MessageData_formatAux___main___spec__1(lean_object*); -lean_object* l_Lean_Message_Inhabited; -lean_object* l_Lean_Message_HasToString; -lean_object* l_Lean_MessageLog_HasAppend; -lean_object* l_Nat_repr(lean_object*); -lean_object* l_Lean_MessageData_coeOfArrayExpr___closed__2; -lean_object* l_Lean_Message_toString___closed__4; -lean_object* l_Lean_Message_toString___closed__1; -lean_object* l_Lean_Message_toString___closed__2; -extern lean_object* l_Lean_Options_empty; -lean_object* lean_expr_dbg_to_string(lean_object*); -lean_object* l_Lean_MessageData_coeOfArrayExpr(lean_object*); -extern lean_object* l_String_Iterator_HasRepr___closed__2; -lean_object* l_Lean_Message_HasToString___closed__1; -lean_object* l_Lean_MessageData_arrayExpr_toMessageData(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_MessageLog_HasAppend___closed__1; -extern lean_object* l_Lean_Format_sbracket___closed__3; -lean_object* l_Lean_fmt___at_Lean_Message_toString___spec__1(lean_object*); -lean_object* l_Lean_MessageLog_empty; -lean_object* l_Lean_mkErrorStringWithPos___boxed(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_MessageData_coeOfArrayExpr___closed__1; -extern lean_object* l_Lean_Format_sbracket___closed__1; -lean_object* l_Lean_MessageData_HasAppend(lean_object*, lean_object*); -extern lean_object* l___private_Init_Util_1__mkPanicMessage___closed__2; -lean_object* lean_format_group(lean_object*); -lean_object* l_List_foldr___main___at_Lean_MessageLog_hasErrors___spec__1___boxed(lean_object*, lean_object*); -lean_object* l_Lean_MessageData_arrayExpr_toMessageData___main___closed__2; -uint8_t l_Lean_MessageLog_hasErrors(lean_object*); -lean_object* l_Lean_Message_Inhabited___closed__1; -lean_object* l_Lean_Message_Inhabited___closed__2; -uint8_t l_List_isEmpty___rarg(lean_object*); -lean_object* l_Array_iterateMAux___main___at_Lean_MessageData_formatAux___main___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Name_toStringWithSep___main(lean_object*, lean_object*); -lean_object* l_Lean_Message_toString___closed__5; -lean_object* l_Lean_Syntax_formatStx___main___rarg(lean_object*); -uint8_t l_Lean_MessageLog_isEmpty(lean_object*); -lean_object* l_Lean_MessageData_coeOfExpr(lean_object*); -lean_object* l_Lean_Message_toString(lean_object*); -lean_object* l_Lean_MessageData_formatAux(lean_object*, lean_object*); -lean_object* l_Lean_Level_format(lean_object*); -lean_object* l_Lean_MessageData_Inhabited___closed__1; -lean_object* l_Lean_MessageLog_add(lean_object*, lean_object*); -lean_object* l_Lean_mkErrorStringWithPos(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_MessageLog_isEmpty___boxed(lean_object*); -lean_object* l_Lean_MessageData_arrayExpr_toMessageData___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_MessageData_coeOfArrayExpr___boxed(lean_object*); -uint8_t lean_string_dec_eq(lean_object*, lean_object*); -uint8_t lean_nat_dec_lt(lean_object*, lean_object*); -lean_object* l_Lean_mkErrorStringWithPos(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; -x_5 = l___private_Init_Util_1__mkPanicMessage___closed__2; -x_6 = lean_string_append(x_1, x_5); -x_7 = l_Nat_repr(x_2); -x_8 = lean_string_append(x_6, x_7); -lean_dec(x_7); -x_9 = lean_string_append(x_8, x_5); -x_10 = l_Nat_repr(x_3); -x_11 = lean_string_append(x_9, x_10); -lean_dec(x_10); -x_12 = l_String_Iterator_HasRepr___closed__2; -x_13 = lean_string_append(x_11, x_12); -x_14 = lean_string_append(x_13, x_4); -return x_14; -} -} -lean_object* l_Lean_mkErrorStringWithPos___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_mkErrorStringWithPos(x_1, x_2, x_3, x_4); -lean_dec(x_4); -return x_5; -} -} -lean_object* _init_l_Lean_MessageData_Inhabited___closed__1() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = lean_box(0); -x_2 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_2, 0, x_1); -return x_2; -} -} -lean_object* _init_l_Lean_MessageData_Inhabited() { -_start: -{ -lean_object* x_1; -x_1 = l_Lean_MessageData_Inhabited___closed__1; -return x_1; -} -} -lean_object* l_Lean_fmt___at_Lean_MessageData_formatAux___main___spec__1(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = l_Lean_Level_format(x_1); -return x_2; -} -} -lean_object* l_Array_iterateMAux___main___at_Lean_MessageData_formatAux___main___spec__2(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; uint8_t x_7; -x_6 = lean_array_get_size(x_3); -x_7 = lean_nat_dec_lt(x_4, x_6); -lean_dec(x_6); -if (x_7 == 0) -{ -lean_dec(x_4); -lean_dec(x_1); -return x_5; -} -else -{ -lean_object* x_8; uint8_t 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; -x_8 = lean_array_fget(x_3, x_4); -x_9 = 0; -x_10 = lean_box(1); -x_11 = lean_alloc_ctor(4, 2, 1); -lean_ctor_set(x_11, 0, x_5); -lean_ctor_set(x_11, 1, x_10); -lean_ctor_set_uint8(x_11, sizeof(void*)*2, x_9); -lean_inc(x_1); -x_12 = l_Lean_MessageData_formatAux___main(x_1, x_8); -x_13 = lean_alloc_ctor(4, 2, 1); -lean_ctor_set(x_13, 0, x_11); -lean_ctor_set(x_13, 1, x_12); -lean_ctor_set_uint8(x_13, sizeof(void*)*2, x_9); -x_14 = lean_unsigned_to_nat(1u); -x_15 = lean_nat_add(x_4, x_14); -lean_dec(x_4); -x_4 = x_15; -x_5 = x_13; -goto _start; -} -} -} -lean_object* l_Lean_MessageData_formatAux___main(lean_object* x_1, lean_object* x_2) { -_start: -{ -switch (lean_obj_tag(x_2)) { -case 0: -{ -lean_object* x_3; -lean_dec(x_1); -x_3 = lean_ctor_get(x_2, 0); -lean_inc(x_3); -lean_dec(x_2); -return x_3; -} -case 1: -{ -lean_object* x_4; lean_object* x_5; -lean_dec(x_1); -x_4 = lean_ctor_get(x_2, 0); -lean_inc(x_4); -lean_dec(x_2); -x_5 = l_Lean_Syntax_formatStx___main___rarg(x_4); -return x_5; -} -case 2: -{ -lean_object* x_6; lean_object* x_7; lean_object* x_8; -lean_dec(x_1); -x_6 = lean_ctor_get(x_2, 0); -lean_inc(x_6); -lean_dec(x_2); -x_7 = lean_expr_dbg_to_string(x_6); -lean_dec(x_6); -x_8 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_8, 0, x_7); -return x_8; -} -case 3: -{ -lean_object* x_9; lean_object* x_10; -lean_dec(x_1); -x_9 = lean_ctor_get(x_2, 0); -lean_inc(x_9); -lean_dec(x_2); -x_10 = l_Lean_Level_format(x_9); -return x_10; -} -case 4: -{ -lean_object* x_11; lean_object* x_12; -lean_dec(x_1); -x_11 = lean_ctor_get(x_2, 0); -lean_inc(x_11); -lean_dec(x_2); -x_12 = l_Lean_fmt___at_Lean_Level_LevelToFormat_toResult___main___spec__1(x_11); -return x_12; -} -case 5: -{ -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_dec(x_1); -x_13 = lean_ctor_get(x_2, 0); -lean_inc(x_13); -x_14 = lean_ctor_get(x_2, 1); -lean_inc(x_14); -x_15 = lean_ctor_get(x_2, 2); -lean_inc(x_15); -x_16 = lean_ctor_get(x_2, 3); -lean_inc(x_16); -lean_dec(x_2); -x_17 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_17, 0, x_14); -lean_ctor_set(x_17, 1, x_15); -x_18 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_18, 0, x_13); -lean_ctor_set(x_18, 1, x_17); -x_19 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_19, 0, x_18); -x_1 = x_19; -x_2 = x_16; -goto _start; -} -case 6: -{ -lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; -x_21 = lean_ctor_get(x_2, 0); -lean_inc(x_21); -x_22 = lean_ctor_get(x_2, 1); -lean_inc(x_22); -lean_dec(x_2); -x_23 = l_Lean_MessageData_formatAux___main(x_1, x_22); -x_24 = lean_alloc_ctor(3, 2, 0); -lean_ctor_set(x_24, 0, x_21); -lean_ctor_set(x_24, 1, x_23); -return x_24; -} -case 7: -{ -lean_object* x_25; lean_object* x_26; lean_object* x_27; -x_25 = lean_ctor_get(x_2, 0); -lean_inc(x_25); -lean_dec(x_2); -x_26 = l_Lean_MessageData_formatAux___main(x_1, x_25); -x_27 = lean_format_group(x_26); -return x_27; -} -case 8: -{ -lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; uint8_t x_32; lean_object* x_33; -x_28 = lean_ctor_get(x_2, 0); -lean_inc(x_28); -x_29 = lean_ctor_get(x_2, 1); -lean_inc(x_29); -lean_dec(x_2); -lean_inc(x_1); -x_30 = l_Lean_MessageData_formatAux___main(x_1, x_28); -x_31 = l_Lean_MessageData_formatAux___main(x_1, x_29); -x_32 = 0; -x_33 = lean_alloc_ctor(4, 2, 1); -lean_ctor_set(x_33, 0, x_30); -lean_ctor_set(x_33, 1, x_31); -lean_ctor_set_uint8(x_33, sizeof(void*)*2, x_32); -return x_33; -} -case 9: -{ -lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; uint8_t x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; -x_34 = lean_ctor_get(x_2, 0); -lean_inc(x_34); -x_35 = lean_ctor_get(x_2, 1); -lean_inc(x_35); -lean_dec(x_2); -x_36 = l_Lean_Name_toString___closed__1; -x_37 = l_Lean_Name_toStringWithSep___main(x_36, x_34); -x_38 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_38, 0, x_37); -x_39 = 0; -x_40 = l_Lean_Format_sbracket___closed__2; -x_41 = lean_alloc_ctor(4, 2, 1); -lean_ctor_set(x_41, 0, x_40); -lean_ctor_set(x_41, 1, x_38); -lean_ctor_set_uint8(x_41, sizeof(void*)*2, x_39); -x_42 = l_Lean_Format_sbracket___closed__3; -x_43 = lean_alloc_ctor(4, 2, 1); -lean_ctor_set(x_43, 0, x_41); -lean_ctor_set(x_43, 1, x_42); -lean_ctor_set_uint8(x_43, sizeof(void*)*2, x_39); -x_44 = l_Lean_Format_sbracket___closed__1; -x_45 = lean_alloc_ctor(3, 2, 0); -lean_ctor_set(x_45, 0, x_44); -lean_ctor_set(x_45, 1, x_43); -x_46 = lean_format_group(x_45); -x_47 = l_Lean_Format_flatten___main___closed__1; -x_48 = lean_alloc_ctor(4, 2, 1); -lean_ctor_set(x_48, 0, x_46); -lean_ctor_set(x_48, 1, x_47); -lean_ctor_set_uint8(x_48, sizeof(void*)*2, x_39); -x_49 = l_Lean_MessageData_formatAux___main(x_1, x_35); -x_50 = lean_alloc_ctor(4, 2, 1); -lean_ctor_set(x_50, 0, x_48); -lean_ctor_set(x_50, 1, x_49); -lean_ctor_set_uint8(x_50, sizeof(void*)*2, x_39); -return x_50; -} -default: -{ -lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; -x_51 = lean_ctor_get(x_2, 0); -lean_inc(x_51); -lean_dec(x_2); -x_52 = lean_unsigned_to_nat(0u); -x_53 = lean_box(0); -x_54 = l_Array_iterateMAux___main___at_Lean_MessageData_formatAux___main___spec__2(x_1, x_51, x_51, x_52, x_53); -lean_dec(x_51); -x_55 = lean_unsigned_to_nat(2u); -x_56 = lean_alloc_ctor(3, 2, 0); -lean_ctor_set(x_56, 0, x_55); -lean_ctor_set(x_56, 1, x_54); -return x_56; -} -} -} -} -lean_object* l_Array_iterateMAux___main___at_Lean_MessageData_formatAux___main___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { -_start: -{ -lean_object* x_6; -x_6 = l_Array_iterateMAux___main___at_Lean_MessageData_formatAux___main___spec__2(x_1, x_2, x_3, x_4, x_5); -lean_dec(x_3); -lean_dec(x_2); -return x_6; -} -} -lean_object* l_Lean_MessageData_formatAux(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = l_Lean_MessageData_formatAux___main(x_1, x_2); -return x_3; -} -} -lean_object* l_Lean_MessageData_HasAppend(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = lean_alloc_ctor(8, 2, 0); -lean_ctor_set(x_3, 0, x_1); -lean_ctor_set(x_3, 1, x_2); -return x_3; -} -} -lean_object* l_Lean_MessageData_Lean_HasFormat(lean_object* x_1) { -_start: -{ -lean_object* x_2; lean_object* x_3; -x_2 = lean_box(0); -x_3 = l_Lean_MessageData_formatAux___main(x_2, x_1); -return x_3; -} -} -lean_object* l_Lean_MessageData_coeOfFormat(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_2, 0, x_1); -return x_2; -} -} -lean_object* l_Lean_MessageData_coeOfLevel(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_ctor(3, 1, 0); -lean_ctor_set(x_2, 0, x_1); -return x_2; -} -} -lean_object* l_Lean_MessageData_coeOfExpr(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_2, 0, x_1); -return x_2; -} -} -lean_object* l_Lean_MessageData_coeOfName(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_ctor(4, 1, 0); -lean_ctor_set(x_2, 0, x_1); -return x_2; -} -} -lean_object* _init_l_Lean_MessageData_arrayExpr_toMessageData___main___closed__1() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Format_sbracket___closed__3; -x_2 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_2, 0, x_1); -return x_2; -} -} -lean_object* _init_l_Lean_MessageData_arrayExpr_toMessageData___main___closed__2() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_formatKVMap___closed__1; -x_2 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_2, 0, x_1); -return x_2; -} -} -lean_object* l_Lean_MessageData_arrayExpr_toMessageData___main(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; uint8_t x_5; -x_4 = lean_array_get_size(x_1); -x_5 = lean_nat_dec_lt(x_2, x_4); -lean_dec(x_4); -if (x_5 == 0) -{ -lean_object* x_6; lean_object* x_7; -lean_dec(x_2); -x_6 = l_Lean_MessageData_arrayExpr_toMessageData___main___closed__1; -x_7 = lean_alloc_ctor(8, 2, 0); -lean_ctor_set(x_7, 0, x_3); -lean_ctor_set(x_7, 1, x_6); -return x_7; -} -else -{ -lean_object* x_8; lean_object* x_9; uint8_t x_10; lean_object* x_11; lean_object* x_12; -x_8 = lean_array_fget(x_1, x_2); -x_9 = lean_unsigned_to_nat(0u); -x_10 = lean_nat_dec_eq(x_2, x_9); -x_11 = lean_unsigned_to_nat(1u); -x_12 = lean_nat_add(x_2, x_11); -lean_dec(x_2); -if (x_10 == 0) -{ -lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; -x_13 = l_Lean_MessageData_arrayExpr_toMessageData___main___closed__2; -x_14 = lean_alloc_ctor(8, 2, 0); -lean_ctor_set(x_14, 0, x_3); -lean_ctor_set(x_14, 1, x_13); -x_15 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_15, 0, x_8); -x_16 = lean_alloc_ctor(8, 2, 0); -lean_ctor_set(x_16, 0, x_14); -lean_ctor_set(x_16, 1, x_15); -x_2 = x_12; -x_3 = x_16; -goto _start; -} -else -{ -lean_object* x_18; lean_object* x_19; -x_18 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_18, 0, x_8); -x_19 = lean_alloc_ctor(8, 2, 0); -lean_ctor_set(x_19, 0, x_3); -lean_ctor_set(x_19, 1, x_18); -x_2 = x_12; -x_3 = x_19; -goto _start; -} -} -} -} -lean_object* l_Lean_MessageData_arrayExpr_toMessageData___main___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; -x_4 = l_Lean_MessageData_arrayExpr_toMessageData___main(x_1, x_2, x_3); -lean_dec(x_1); -return x_4; -} -} -lean_object* l_Lean_MessageData_arrayExpr_toMessageData(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; -x_4 = l_Lean_MessageData_arrayExpr_toMessageData___main(x_1, x_2, x_3); -return x_4; -} -} -lean_object* l_Lean_MessageData_arrayExpr_toMessageData___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; -x_4 = l_Lean_MessageData_arrayExpr_toMessageData(x_1, x_2, x_3); -lean_dec(x_1); -return x_4; -} -} -lean_object* _init_l_Lean_MessageData_coeOfArrayExpr___closed__1() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_addParenHeuristic___closed__2; -x_2 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_2, 0, x_1); -return x_2; -} -} -lean_object* _init_l_Lean_MessageData_coeOfArrayExpr___closed__2() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_MessageData_coeOfArrayExpr___closed__1; -x_2 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_2, 0, x_1); -return x_2; -} -} -lean_object* l_Lean_MessageData_coeOfArrayExpr(lean_object* x_1) { -_start: -{ -lean_object* x_2; lean_object* x_3; lean_object* x_4; -x_2 = lean_unsigned_to_nat(0u); -x_3 = l_Lean_MessageData_coeOfArrayExpr___closed__2; -x_4 = l_Lean_MessageData_arrayExpr_toMessageData___main(x_1, x_2, x_3); -return x_4; -} -} -lean_object* l_Lean_MessageData_coeOfArrayExpr___boxed(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = l_Lean_MessageData_coeOfArrayExpr(x_1); -lean_dec(x_1); -return x_2; -} -} -lean_object* l_Lean_fmt___at_Lean_Message_toString___spec__1(lean_object* x_1) { -_start: -{ -lean_object* x_2; lean_object* x_3; -x_2 = lean_box(0); -x_3 = l_Lean_MessageData_formatAux___main(x_2, x_1); -return x_3; -} -} -lean_object* _init_l_Lean_Message_toString___closed__1() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string(":\n"); -return x_1; -} -} -lean_object* _init_l_Lean_Message_toString___closed__2() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_String_splitAux___main___closed__1; -x_2 = lean_string_append(x_1, x_1); -return x_2; -} -} -lean_object* _init_l_Lean_Message_toString___closed__3() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string("warning: "); -return x_1; -} -} -lean_object* _init_l_Lean_Message_toString___closed__4() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Message_toString___closed__3; -x_2 = l_String_splitAux___main___closed__1; -x_3 = lean_string_append(x_1, x_2); -return x_3; -} -} -lean_object* _init_l_Lean_Message_toString___closed__5() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_EStateM_Result_toString___rarg___closed__2; -x_2 = l_String_splitAux___main___closed__1; -x_3 = lean_string_append(x_1, x_2); -return x_3; -} -} -lean_object* l_Lean_Message_toString(lean_object* x_1) { -_start: -{ -lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; uint8_t x_6; lean_object* x_7; lean_object* x_8; uint8_t x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; -x_2 = lean_ctor_get(x_1, 0); -lean_inc(x_2); -x_3 = lean_ctor_get(x_1, 1); -lean_inc(x_3); -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_ctor_get_uint8(x_1, sizeof(void*)*5); -x_7 = lean_ctor_get(x_1, 3); -lean_inc(x_7); -x_8 = l_String_splitAux___main___closed__1; -x_9 = lean_string_dec_eq(x_7, x_8); -x_10 = lean_ctor_get(x_1, 4); -lean_inc(x_10); -lean_dec(x_1); -x_11 = l_Lean_fmt___at_Lean_Message_toString___spec__1(x_10); -x_12 = l_Lean_Options_empty; -x_13 = l_Lean_Format_pretty(x_11, x_12); -switch (x_6) { -case 0: -{ -if (x_9 == 0) -{ -lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; -x_14 = l_Lean_Message_toString___closed__1; -x_15 = lean_string_append(x_7, x_14); -x_16 = lean_string_append(x_8, x_15); -lean_dec(x_15); -x_17 = lean_string_append(x_16, x_13); -lean_dec(x_13); -x_18 = l_Lean_mkErrorStringWithPos(x_2, x_4, x_5, x_17); -lean_dec(x_17); -return x_18; -} -else -{ -lean_object* x_19; lean_object* x_20; lean_object* x_21; -lean_dec(x_7); -x_19 = l_Lean_Message_toString___closed__2; -x_20 = lean_string_append(x_19, x_13); -lean_dec(x_13); -x_21 = l_Lean_mkErrorStringWithPos(x_2, x_4, x_5, x_20); -lean_dec(x_20); -return x_21; -} -} -case 1: -{ -if (x_9 == 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 = l_Lean_Message_toString___closed__1; -x_23 = lean_string_append(x_7, x_22); -x_24 = l_Lean_Message_toString___closed__3; -x_25 = lean_string_append(x_24, x_23); -lean_dec(x_23); -x_26 = lean_string_append(x_25, x_13); -lean_dec(x_13); -x_27 = l_Lean_mkErrorStringWithPos(x_2, x_4, x_5, x_26); -lean_dec(x_26); -return x_27; -} -else -{ -lean_object* x_28; lean_object* x_29; lean_object* x_30; -lean_dec(x_7); -x_28 = l_Lean_Message_toString___closed__4; -x_29 = lean_string_append(x_28, x_13); -lean_dec(x_13); -x_30 = l_Lean_mkErrorStringWithPos(x_2, x_4, x_5, x_29); -lean_dec(x_29); -return x_30; -} -} -default: -{ -if (x_9 == 0) -{ -lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; -x_31 = l_Lean_Message_toString___closed__1; -x_32 = lean_string_append(x_7, x_31); -x_33 = l_EStateM_Result_toString___rarg___closed__2; -x_34 = lean_string_append(x_33, x_32); -lean_dec(x_32); -x_35 = lean_string_append(x_34, x_13); -lean_dec(x_13); -x_36 = l_Lean_mkErrorStringWithPos(x_2, x_4, x_5, x_35); -lean_dec(x_35); -return x_36; -} -else -{ -lean_object* x_37; lean_object* x_38; lean_object* x_39; -lean_dec(x_7); -x_37 = l_Lean_Message_toString___closed__5; -x_38 = lean_string_append(x_37, x_13); -lean_dec(x_13); -x_39 = l_Lean_mkErrorStringWithPos(x_2, x_4, x_5, x_38); -lean_dec(x_38); -return x_39; -} -} -} -} -} -lean_object* _init_l_Lean_Message_Inhabited___closed__1() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = lean_unsigned_to_nat(0u); -x_2 = lean_unsigned_to_nat(1u); -x_3 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_3, 0, x_1); -lean_ctor_set(x_3, 1, x_2); -return x_3; -} -} -lean_object* _init_l_Lean_Message_Inhabited___closed__2() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; uint8_t x_4; lean_object* x_5; lean_object* x_6; -x_1 = lean_box(0); -x_2 = l_String_splitAux___main___closed__1; -x_3 = l_Lean_Message_Inhabited___closed__1; -x_4 = 2; -x_5 = l_Lean_MessageData_Inhabited___closed__1; -x_6 = lean_alloc_ctor(0, 5, 1); -lean_ctor_set(x_6, 0, x_2); -lean_ctor_set(x_6, 1, x_3); -lean_ctor_set(x_6, 2, x_1); -lean_ctor_set(x_6, 3, x_2); -lean_ctor_set(x_6, 4, x_5); -lean_ctor_set_uint8(x_6, sizeof(void*)*5, x_4); -return x_6; -} -} -lean_object* _init_l_Lean_Message_Inhabited() { -_start: -{ -lean_object* x_1; -x_1 = l_Lean_Message_Inhabited___closed__2; -return x_1; -} -} -lean_object* _init_l_Lean_Message_HasToString___closed__1() { -_start: -{ -lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Lean_Message_toString), 1, 0); -return x_1; -} -} -lean_object* _init_l_Lean_Message_HasToString() { -_start: -{ -lean_object* x_1; -x_1 = l_Lean_Message_HasToString___closed__1; -return x_1; -} -} -lean_object* _init_l_Lean_MessageLog_empty() { -_start: -{ -lean_object* x_1; -x_1 = lean_box(0); -return x_1; -} -} -uint8_t l_Lean_MessageLog_isEmpty(lean_object* x_1) { -_start: -{ -uint8_t x_2; -x_2 = l_List_isEmpty___rarg(x_1); -return x_2; -} -} -lean_object* l_Lean_MessageLog_isEmpty___boxed(lean_object* x_1) { -_start: -{ -uint8_t x_2; lean_object* x_3; -x_2 = l_Lean_MessageLog_isEmpty(x_1); -lean_dec(x_1); -x_3 = lean_box(x_2); -return x_3; -} -} -lean_object* _init_l_Lean_MessageLog_Inhabited() { -_start: -{ -lean_object* x_1; -x_1 = lean_box(0); -return x_1; -} -} -lean_object* l_Lean_MessageLog_add(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -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_Lean_MessageLog_append(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = l_List_append___rarg(x_2, x_1); -return x_3; -} -} -lean_object* _init_l_Lean_MessageLog_HasAppend___closed__1() { -_start: -{ -lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Lean_MessageLog_append), 2, 0); -return x_1; -} -} -lean_object* _init_l_Lean_MessageLog_HasAppend() { -_start: -{ -lean_object* x_1; -x_1 = l_Lean_MessageLog_HasAppend___closed__1; -return x_1; -} -} -uint8_t l_List_foldr___main___at_Lean_MessageLog_hasErrors___spec__1(uint8_t x_1, lean_object* x_2) { -_start: -{ -if (lean_obj_tag(x_2) == 0) -{ -return x_1; -} -else -{ -lean_object* x_3; lean_object* x_4; uint8_t x_5; uint8_t x_6; lean_object* x_7; -x_3 = lean_ctor_get(x_2, 0); -x_4 = lean_ctor_get(x_2, 1); -x_5 = l_List_foldr___main___at_Lean_MessageLog_hasErrors___spec__1(x_1, x_4); -x_6 = lean_ctor_get_uint8(x_3, sizeof(void*)*5); -x_7 = lean_box(x_6); -if (lean_obj_tag(x_7) == 2) -{ -uint8_t x_8; -x_8 = 1; -return x_8; -} -else -{ -lean_dec(x_7); -return x_5; -} -} -} -} -uint8_t l_Lean_MessageLog_hasErrors(lean_object* x_1) { -_start: -{ -uint8_t x_2; uint8_t x_3; -x_2 = 0; -x_3 = l_List_foldr___main___at_Lean_MessageLog_hasErrors___spec__1(x_2, x_1); -return x_3; -} -} -lean_object* l_List_foldr___main___at_Lean_MessageLog_hasErrors___spec__1___boxed(lean_object* x_1, lean_object* x_2) { -_start: -{ -uint8_t x_3; uint8_t x_4; lean_object* x_5; -x_3 = lean_unbox(x_1); -lean_dec(x_1); -x_4 = l_List_foldr___main___at_Lean_MessageLog_hasErrors___spec__1(x_3, x_2); -lean_dec(x_2); -x_5 = lean_box(x_4); -return x_5; -} -} -lean_object* l_Lean_MessageLog_hasErrors___boxed(lean_object* x_1) { -_start: -{ -uint8_t x_2; lean_object* x_3; -x_2 = l_Lean_MessageLog_hasErrors(x_1); -lean_dec(x_1); -x_3 = lean_box(x_2); -return x_3; -} -} -lean_object* l_Lean_MessageLog_toList(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = l_List_reverse___rarg(x_1); -return x_2; -} -} -lean_object* initialize_Init_Data_ToString(lean_object*); -lean_object* initialize_Init_Lean_Data_Position(lean_object*); -lean_object* initialize_Init_Lean_Syntax(lean_object*); -lean_object* initialize_Init_Lean_MetavarContext(lean_object*); -lean_object* initialize_Init_Lean_Environment(lean_object*); -static bool _G_initialized = false; -lean_object* initialize_Init_Lean_Message(lean_object* w) { -lean_object * res; -if (_G_initialized) return lean_mk_io_result(lean_box(0)); -_G_initialized = true; -res = initialize_Init_Data_ToString(lean_io_mk_world()); -if (lean_io_result_is_error(res)) return res; -lean_dec_ref(res); -res = initialize_Init_Lean_Data_Position(lean_io_mk_world()); -if (lean_io_result_is_error(res)) return res; -lean_dec_ref(res); -res = initialize_Init_Lean_Syntax(lean_io_mk_world()); -if (lean_io_result_is_error(res)) return res; -lean_dec_ref(res); -res = initialize_Init_Lean_MetavarContext(lean_io_mk_world()); -if (lean_io_result_is_error(res)) return res; -lean_dec_ref(res); -res = initialize_Init_Lean_Environment(lean_io_mk_world()); -if (lean_io_result_is_error(res)) return res; -lean_dec_ref(res); -l_Lean_MessageData_Inhabited___closed__1 = _init_l_Lean_MessageData_Inhabited___closed__1(); -lean_mark_persistent(l_Lean_MessageData_Inhabited___closed__1); -l_Lean_MessageData_Inhabited = _init_l_Lean_MessageData_Inhabited(); -lean_mark_persistent(l_Lean_MessageData_Inhabited); -l_Lean_MessageData_arrayExpr_toMessageData___main___closed__1 = _init_l_Lean_MessageData_arrayExpr_toMessageData___main___closed__1(); -lean_mark_persistent(l_Lean_MessageData_arrayExpr_toMessageData___main___closed__1); -l_Lean_MessageData_arrayExpr_toMessageData___main___closed__2 = _init_l_Lean_MessageData_arrayExpr_toMessageData___main___closed__2(); -lean_mark_persistent(l_Lean_MessageData_arrayExpr_toMessageData___main___closed__2); -l_Lean_MessageData_coeOfArrayExpr___closed__1 = _init_l_Lean_MessageData_coeOfArrayExpr___closed__1(); -lean_mark_persistent(l_Lean_MessageData_coeOfArrayExpr___closed__1); -l_Lean_MessageData_coeOfArrayExpr___closed__2 = _init_l_Lean_MessageData_coeOfArrayExpr___closed__2(); -lean_mark_persistent(l_Lean_MessageData_coeOfArrayExpr___closed__2); -l_Lean_Message_toString___closed__1 = _init_l_Lean_Message_toString___closed__1(); -lean_mark_persistent(l_Lean_Message_toString___closed__1); -l_Lean_Message_toString___closed__2 = _init_l_Lean_Message_toString___closed__2(); -lean_mark_persistent(l_Lean_Message_toString___closed__2); -l_Lean_Message_toString___closed__3 = _init_l_Lean_Message_toString___closed__3(); -lean_mark_persistent(l_Lean_Message_toString___closed__3); -l_Lean_Message_toString___closed__4 = _init_l_Lean_Message_toString___closed__4(); -lean_mark_persistent(l_Lean_Message_toString___closed__4); -l_Lean_Message_toString___closed__5 = _init_l_Lean_Message_toString___closed__5(); -lean_mark_persistent(l_Lean_Message_toString___closed__5); -l_Lean_Message_Inhabited___closed__1 = _init_l_Lean_Message_Inhabited___closed__1(); -lean_mark_persistent(l_Lean_Message_Inhabited___closed__1); -l_Lean_Message_Inhabited___closed__2 = _init_l_Lean_Message_Inhabited___closed__2(); -lean_mark_persistent(l_Lean_Message_Inhabited___closed__2); -l_Lean_Message_Inhabited = _init_l_Lean_Message_Inhabited(); -lean_mark_persistent(l_Lean_Message_Inhabited); -l_Lean_Message_HasToString___closed__1 = _init_l_Lean_Message_HasToString___closed__1(); -lean_mark_persistent(l_Lean_Message_HasToString___closed__1); -l_Lean_Message_HasToString = _init_l_Lean_Message_HasToString(); -lean_mark_persistent(l_Lean_Message_HasToString); -l_Lean_MessageLog_empty = _init_l_Lean_MessageLog_empty(); -lean_mark_persistent(l_Lean_MessageLog_empty); -l_Lean_MessageLog_Inhabited = _init_l_Lean_MessageLog_Inhabited(); -lean_mark_persistent(l_Lean_MessageLog_Inhabited); -l_Lean_MessageLog_HasAppend___closed__1 = _init_l_Lean_MessageLog_HasAppend___closed__1(); -lean_mark_persistent(l_Lean_MessageLog_HasAppend___closed__1); -l_Lean_MessageLog_HasAppend = _init_l_Lean_MessageLog_HasAppend(); -lean_mark_persistent(l_Lean_MessageLog_HasAppend); -return lean_mk_io_result(lean_box(0)); -} -#ifdef __cplusplus -} -#endif diff --git a/stage0/stdlib/Init/Lean/Meta/Basic.c b/stage0/stdlib/Init/Lean/Meta/Basic.c index 2ec3a40777..d192227d5b 100644 --- a/stage0/stdlib/Init/Lean/Meta/Basic.c +++ b/stage0/stdlib/Init/Lean/Meta/Basic.c @@ -1,6 +1,6 @@ // Lean compiler output // Module: Init.Lean.Meta.Basic -// Imports: Init.Control.Reader Init.Lean.Data.LOption Init.Lean.Data.NameGenerator Init.Lean.Environment Init.Lean.Class Init.Lean.ReducibilityAttrs Init.Lean.Util.Trace Init.Lean.Meta.Exception Init.Lean.Meta.DiscrTreeTypes +// Imports: Init.Control.Reader Init.Lean.Data.LOption Init.Lean.Data.NameGenerator Init.Lean.Environment Init.Lean.Class Init.Lean.ReducibilityAttrs Init.Lean.Util.Trace Init.Lean.Meta.Exception Init.Lean.Meta.DiscrTreeTypes Init.Lean.Eval #include "runtime/lean.h" #if defined(__clang__) #pragma clang diagnostic ignored "-Wunused-parameter" @@ -22,6 +22,7 @@ lean_object* l_Lean_Meta_withLocalDecl(lean_object*); lean_object* l_Lean_Meta_withNewLocalInstances___main___at_Lean_Meta_isClassExpensive___main___spec__5___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_mkFreshLevelMVar(lean_object*); lean_object* l_Lean_Meta_mkFreshId___boxed(lean_object*); +lean_object* l_PersistentHashMap_empty___at_Lean_Meta_MetaHasEval___spec__1; lean_object* l_Lean_Meta_withLetDecl(lean_object*); lean_object* l_Lean_Meta_MetaExtState_inhabited___closed__2; size_t l_Lean_Meta_TransparencyMode_hash(uint8_t); @@ -37,6 +38,7 @@ lean_object* l_Lean_Meta_isClassExpensive___main(lean_object*, lean_object*, lea lean_object* l_Lean_Meta_throwBug(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*); @@ -44,6 +46,7 @@ lean_object* l_Lean_Meta_isReadOnlyExprMVar___boxed(lean_object*, lean_object*, lean_object* l_Lean_MetavarContext_addLevelMVarDecl(lean_object*, lean_object*); lean_object* l___private_Init_Lean_Meta_Basic_8__forallMetaTelescopeReducingAux___main(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Lean_Meta_Basic_6__forallTelescopeReducingAux(lean_object*); +lean_object* l_Lean_Format_pretty(lean_object*, lean_object*); extern lean_object* l_EIO_Monad___closed__1; lean_object* l_Lean_Meta_savingCache(lean_object*); lean_object* l_Lean_Meta_mkFreshExprMVarAt___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -73,15 +76,20 @@ lean_object* l___private_Init_Lean_Meta_Basic_9__lambdaMetaTelescopeAux(lean_obj lean_object* l_Lean_Meta_lambdaMetaTelescope___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_withLetDecl___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_instantiateLevelMVars(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_MetaHasEval(lean_object*); lean_object* l_Lean_Meta_forallBoundedTelescope(lean_object*); lean_object* lean_array_push(lean_object*, lean_object*); lean_object* lean_array_get_size(lean_object*); +lean_object* l_IO_println___at_Lean_Meta_MetaHasEval___spec__2(lean_object*, lean_object*); lean_object* l_Lean_Meta_getEnv___boxed(lean_object*); lean_object* l_Lean_Meta_hasAssignableMVar___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_MetaHasEval___rarg___closed__2; lean_object* l_Lean_Meta_isReducible___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_MessageData_formatAux___main(lean_object*, lean_object*); lean_object* l_Lean_Meta_MetaExtState_inhabited___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_instantiateLevelMVars___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_forallTelescope___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Array_forMAux___main___at_Lean_Meta_MetaHasEval___spec__4(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_withNewLocalInstances___main___at_Lean_Meta_isClassExpensive___main___spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_getAppFn___main(lean_object*); lean_object* l_Lean_Meta_MetaExtState_inhabited___lambda__2(lean_object*, lean_object*, lean_object*); @@ -98,6 +106,7 @@ lean_object* l_Lean_Meta_mkInferTypeRef___lambda__1(lean_object*, lean_object*, lean_object* l_Lean_Meta_isReadOnlyLevelMVar___boxed(lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Lean_Meta_Basic_7__lambdaTelescopeAux(lean_object*); uint8_t l_Lean_isReducible(lean_object*, lean_object*); +lean_object* l_Lean_Meta_MetaHasEval___rarg___closed__4; lean_object* l_Lean_Meta_InfoCacheKey_Hashable___boxed(lean_object*); lean_object* l_Lean_Meta_getConstNoEx(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_withMVarContext(lean_object*); @@ -165,6 +174,7 @@ lean_object* l_Lean_Meta_isClassQuickConst___boxed(lean_object*, lean_object*, l lean_object* l_Lean_Name_append___main(lean_object*, lean_object*); lean_object* l_Lean_Meta_getConstNoEx___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_withNewMCtxDepth___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_MetaHasEval___rarg___closed__3; lean_object* l_Lean_Meta_mkMetaExtension___closed__2; lean_object* l_Lean_Meta_mkMetaExtension___closed__1; lean_object* l_Lean_Meta_mkInferTypeRef___lambda__1___boxed(lean_object*, lean_object*, lean_object*); @@ -175,6 +185,7 @@ lean_object* l_Lean_Meta_dbgTrace___rarg___lambda__1___boxed(lean_object*, lean_ lean_object* l_Lean_Expr_fvarId_x21(lean_object*); lean_object* l___private_Init_Lean_Meta_Basic_5__forallTelescopeReducingAuxAux___main___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_mkSynthPendingRef___lambda__1(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_MetaHasEval___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_withNewLocalInstances___main___at_Lean_Meta_forallTelescopeReducing___spec__4(lean_object*); lean_object* l___private_Init_Lean_Meta_Basic_3__getTraceState___rarg(lean_object*); lean_object* l_Lean_Meta_ParamInfo_inhabited___closed__1; @@ -196,9 +207,9 @@ lean_object* l_Lean_Meta_isReadOnlyExprMVar(lean_object*, lean_object*, lean_obj lean_object* l_Lean_Meta_metaExt___closed__1; 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___private_Init_Lean_Meta_Basic_5__forallTelescopeReducingAuxAux___main___at_Lean_Meta_forallBoundedTelescope___spec__2___rarg(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_PersistentArray_empty___closed__3; -lean_object* l_IO_runMeta___rarg___closed__3; lean_object* l_Lean_Meta_lambdaMetaTelescope(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_mkSynthPendingRef___closed__1; lean_object* lean_metavar_ctx_assign_expr(lean_object*, lean_object*, lean_object*); @@ -207,6 +218,7 @@ lean_object* l___private_Init_Lean_Meta_Basic_6__forallTelescopeReducingAux___at lean_object* l_Lean_Meta_TransparencyMode_HasBeq___closed__1; lean_object* l_Lean_Meta_withNewLocalInstances(lean_object*); lean_object* l_Lean_Meta_withNewLocalInstances___main(lean_object*); +extern lean_object* l_Lean_Options_empty; lean_object* l_Lean_Meta_approxDefEq___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_MetaExtState_inhabited___lambda__2___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_withNewLocalInstances___main___at_Lean_Meta_forallTelescopeReducing___spec__4___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -241,7 +253,6 @@ uint8_t l_Lean_Expr_Data_binderInfo(uint64_t); lean_object* l_Lean_Meta_liftStateMCtx___rarg(lean_object*, lean_object*, lean_object*); size_t lean_usize_of_nat(lean_object*); lean_object* l_Lean_Meta_mkMetaExtension___lambda__1(lean_object*, lean_object*); -lean_object* l_IO_runMeta___rarg___closed__4; lean_object* l_Lean_Meta_usingTransparency(lean_object*); lean_object* l_Lean_Meta_withLocalDecl___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_usingAtLeastTransparency___rarg(uint8_t, lean_object*, lean_object*, lean_object*); @@ -263,8 +274,7 @@ lean_object* l_Lean_LocalDecl_type(lean_object*); lean_object* lean_local_ctx_mk_local_decl(lean_object*, lean_object*, lean_object*, lean_object*, uint8_t); lean_object* l_Lean_Meta_mkIsExprDefEqAuxRef___lambda__1___closed__1; lean_object* l_Lean_Meta_withNewLocalInstances___main___at_Lean_Meta_forallTelescope___spec__2___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_PersistentHashMap_empty___at_IO_runMeta___spec__1; -lean_object* l_IO_runMeta___rarg___closed__1; +lean_object* l_Array_forMAux___main___at_Lean_Meta_MetaHasEval___spec__4___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_assignExprMVar(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Lean_Meta_Basic_5__forallTelescopeReducingAuxAux___rarg(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_mkIsExprDefEqAuxRef___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); @@ -272,12 +282,14 @@ lean_object* l_Lean_Meta_withNewLocalInstances___main___at_Lean_Meta_forallTeles lean_object* l_Lean_Meta_withLocalDecl___rarg(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_withNewLocalInstances___main___at_Lean_Meta_forallBoundedTelescope___spec__4___rarg___lambda__1(lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_mkIsExprDefEqAuxRef___closed__1; +lean_object* l_IO_print___at_Lean_Meta_MetaHasEval___spec__3(lean_object*, lean_object*); lean_object* l_Lean_Meta_hasAssignableMVar(lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Lean_Meta_Basic_5__forallTelescopeReducingAuxAux(lean_object*); lean_object* l_Lean_Meta_mkIsExprDefEqAuxRef___lambda__1___closed__2; lean_object* l_Lean_Meta_withNewLocalInstances___main___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Lean_Meta_Basic_5__forallTelescopeReducingAuxAux___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_ParamInfo_inhabited; +lean_object* l_Lean_Meta_MetaHasEval___rarg___closed__1; lean_object* l_Lean_Meta_metaExt; lean_object* l_Lean_Meta_getLocalDecl(lean_object*, lean_object*, lean_object*); uint8_t lean_expr_eqv(lean_object*, lean_object*); @@ -296,7 +308,6 @@ lean_object* l_Lean_Meta_synthPendingRef; lean_object* l_Lean_Meta_getConstAux(lean_object*, uint8_t, lean_object*, lean_object*); lean_object* lean_metavar_ctx_assign_level(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_throwEx___rarg___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_IO_runMeta___rarg___closed__2; lean_object* l_Lean_Meta_withMVarContext___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Lean_Meta_Basic_1__whenDebugging___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_MetavarContext_incDepth(lean_object*); @@ -324,7 +335,6 @@ lean_object* l_Lean_Meta_dbgTrace(lean_object*); lean_object* l___private_Init_Lean_Util_Trace_4__checkTraceOption___at_Lean_Meta_trace___spec__1___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_mkFreshId(lean_object*); lean_object* l_Lean_Meta_usingTransparency___rarg(uint8_t, lean_object*, lean_object*, lean_object*); -lean_object* l_PersistentHashMap_empty___at_IO_runMeta___spec__1___closed__1; lean_object* l_Lean_Meta_withNewLocalInstances___main___at_Lean_Meta_forallTelescope___spec__3___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Lean_Meta_Basic_5__forallTelescopeReducingAuxAux___main___at_Lean_Meta_forallBoundedTelescope___spec__2___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_TransparencyMode_beq___boxed(lean_object*, lean_object*); @@ -368,6 +378,7 @@ lean_object* l___private_Init_Lean_Meta_Basic_5__forallTelescopeReducingAuxAux__ lean_object* l_Lean_Meta_mkWHNFRef___closed__1; lean_object* l_Lean_Meta_mkFreshLevelMVar___rarg(lean_object*); extern lean_object* l_Lean_MetavarContext_Inhabited___closed__1; +lean_object* l_PersistentHashMap_empty___at_Lean_Meta_MetaHasEval___spec__1___closed__1; lean_object* l_Lean_Meta_withNewLocalInstances___main___at_Lean_Meta_forallTelescope___spec__3(lean_object*); lean_object* l_Lean_Meta_mkMetaExtension___closed__3; lean_object* l_Lean_Meta_isClassQuick___main___closed__1; @@ -45778,7 +45789,7 @@ x_2 = lean_alloc_closure((void*)(l_Lean_Meta_withMCtx___rarg), 4, 0); return x_2; } } -lean_object* _init_l_PersistentHashMap_empty___at_IO_runMeta___spec__1___closed__1() { +lean_object* _init_l_PersistentHashMap_empty___at_Lean_Meta_MetaHasEval___spec__1___closed__1() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; @@ -45790,15 +45801,128 @@ lean_ctor_set(x_3, 1, x_2); return x_3; } } -lean_object* _init_l_PersistentHashMap_empty___at_IO_runMeta___spec__1() { +lean_object* _init_l_PersistentHashMap_empty___at_Lean_Meta_MetaHasEval___spec__1() { _start: { lean_object* x_1; -x_1 = l_PersistentHashMap_empty___at_IO_runMeta___spec__1___closed__1; +x_1 = l_PersistentHashMap_empty___at_Lean_Meta_MetaHasEval___spec__1___closed__1; return x_1; } } -lean_object* _init_l_IO_runMeta___rarg___closed__1() { +lean_object* l_IO_print___at_Lean_Meta_MetaHasEval___spec__3(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; lean_object* x_4; lean_object* x_5; +x_3 = l_Lean_Options_empty; +x_4 = l_Lean_Format_pretty(x_1, x_3); +x_5 = lean_io_prim_put_str(x_4, x_2); +lean_dec(x_4); +return x_5; +} +} +lean_object* l_IO_println___at_Lean_Meta_MetaHasEval___spec__2(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = l_IO_print___at_Lean_Meta_MetaHasEval___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); +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_Array_forMAux___main___at_Lean_Meta_MetaHasEval___spec__4(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; uint8_t x_5; +x_4 = lean_array_get_size(x_1); +x_5 = lean_nat_dec_lt(x_2, x_4); +lean_dec(x_4); +if (x_5 == 0) +{ +lean_object* x_6; lean_object* x_7; +lean_dec(x_2); +x_6 = lean_box(0); +x_7 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_7, 0, x_6); +lean_ctor_set(x_7, 1, x_3); +return x_7; +} +else +{ +lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; +x_8 = lean_array_fget(x_1, x_2); +x_9 = lean_unsigned_to_nat(1u); +x_10 = lean_nat_add(x_2, x_9); +lean_dec(x_2); +x_11 = lean_box(0); +x_12 = l_Lean_MessageData_formatAux___main(x_11, x_8); +x_13 = l_IO_println___at_Lean_Meta_MetaHasEval___spec__2(x_12, x_3); +if (lean_obj_tag(x_13) == 0) +{ +lean_object* x_14; +x_14 = lean_ctor_get(x_13, 1); +lean_inc(x_14); +lean_dec(x_13); +x_2 = x_10; +x_3 = x_14; +goto _start; +} +else +{ +uint8_t x_16; +lean_dec(x_10); +x_16 = !lean_is_exclusive(x_13); +if (x_16 == 0) +{ +return x_13; +} +else +{ +lean_object* x_17; lean_object* x_18; lean_object* x_19; +x_17 = lean_ctor_get(x_13, 0); +x_18 = lean_ctor_get(x_13, 1); +lean_inc(x_18); +lean_inc(x_17); +lean_dec(x_13); +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; +} +} +} +} +} +lean_object* _init_l_Lean_Meta_MetaHasEval___rarg___closed__1() { _start: { lean_object* x_1; @@ -45806,7 +45930,7 @@ x_1 = lean_alloc_closure((void*)(l_Lean_Meta_InfoCacheKey_Hashable___boxed), 1, return x_1; } } -lean_object* _init_l_IO_runMeta___rarg___closed__2() { +lean_object* _init_l_Lean_Meta_MetaHasEval___rarg___closed__2() { _start: { lean_object* x_1; @@ -45814,7 +45938,7 @@ x_1 = lean_alloc_closure((void*)(l_Lean_Meta_InfoCacheKey_HasBeq___boxed), 2, 0) return x_1; } } -lean_object* _init_l_IO_runMeta___rarg___closed__3() { +lean_object* _init_l_Lean_Meta_MetaHasEval___rarg___closed__3() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; @@ -45826,12 +45950,12 @@ lean_ctor_set(x_3, 1, x_2); return x_3; } } -lean_object* _init_l_IO_runMeta___rarg___closed__4() { +lean_object* _init_l_Lean_Meta_MetaHasEval___rarg___closed__4() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; -x_1 = l_PersistentHashMap_empty___at_IO_runMeta___spec__1; -x_2 = l_IO_runMeta___rarg___closed__3; +x_1 = l_PersistentHashMap_empty___at_Lean_Meta_MetaHasEval___spec__1; +x_2 = l_Lean_Meta_MetaHasEval___rarg___closed__3; x_3 = l_Lean_Meta_resettingSynthInstanceCache___rarg___closed__1; x_4 = lean_alloc_ctor(0, 3, 0); lean_ctor_set(x_4, 0, x_1); @@ -45840,6 +45964,184 @@ lean_ctor_set(x_4, 2, x_3); return x_4; } } +lean_object* l_Lean_Meta_MetaHasEval___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +_start: +{ +uint8_t x_6; uint8_t x_7; lean_object* x_8; 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_6 = 0; +x_7 = 1; +lean_inc(x_3); +x_8 = lean_alloc_ctor(0, 1, 6); +lean_ctor_set(x_8, 0, x_3); +lean_ctor_set_uint8(x_8, sizeof(void*)*1, x_6); +lean_ctor_set_uint8(x_8, sizeof(void*)*1 + 1, x_6); +lean_ctor_set_uint8(x_8, sizeof(void*)*1 + 2, x_6); +lean_ctor_set_uint8(x_8, sizeof(void*)*1 + 3, x_6); +lean_ctor_set_uint8(x_8, sizeof(void*)*1 + 4, x_6); +lean_ctor_set_uint8(x_8, sizeof(void*)*1 + 5, x_7); +x_9 = l_Lean_LocalContext_Inhabited___closed__2; +x_10 = l_Array_empty___closed__1; +x_11 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_11, 0, x_8); +lean_ctor_set(x_11, 1, x_9); +lean_ctor_set(x_11, 2, x_10); +x_12 = l_Lean_MetavarContext_Inhabited___closed__1; +x_13 = l_Lean_Meta_MetaHasEval___rarg___closed__4; +x_14 = l_Lean_NameGenerator_Inhabited___closed__3; +x_15 = l_Lean_TraceState_Inhabited___closed__1; +x_16 = l_PersistentArray_empty___closed__3; +x_17 = lean_alloc_ctor(0, 6, 0); +lean_ctor_set(x_17, 0, x_2); +lean_ctor_set(x_17, 1, x_12); +lean_ctor_set(x_17, 2, x_13); +lean_ctor_set(x_17, 3, x_14); +lean_ctor_set(x_17, 4, x_15); +lean_ctor_set(x_17, 5, x_16); +x_18 = lean_apply_2(x_4, x_11, 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 = lean_ctor_get(x_20, 4); +lean_inc(x_21); +x_22 = lean_ctor_get(x_21, 0); +lean_inc(x_22); +lean_dec(x_21); +x_23 = lean_unsigned_to_nat(0u); +x_24 = l_Array_forMAux___main___at_Lean_Meta_MetaHasEval___spec__4(x_22, x_23, x_5); +lean_dec(x_22); +if (lean_obj_tag(x_24) == 0) +{ +lean_object* x_25; lean_object* x_26; lean_object* x_27; +x_25 = lean_ctor_get(x_24, 1); +lean_inc(x_25); +lean_dec(x_24); +x_26 = lean_ctor_get(x_20, 0); +lean_inc(x_26); +lean_dec(x_20); +x_27 = lean_apply_4(x_1, x_26, x_3, x_19, x_25); +return x_27; +} +else +{ +uint8_t x_28; +lean_dec(x_20); +lean_dec(x_19); +lean_dec(x_3); +lean_dec(x_1); +x_28 = !lean_is_exclusive(x_24); +if (x_28 == 0) +{ +return x_24; +} +else +{ +lean_object* x_29; lean_object* x_30; lean_object* x_31; +x_29 = lean_ctor_get(x_24, 0); +x_30 = lean_ctor_get(x_24, 1); +lean_inc(x_30); +lean_inc(x_29); +lean_dec(x_24); +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; lean_object* x_37; +lean_dec(x_3); +lean_dec(x_1); +x_32 = lean_ctor_get(x_18, 0); +lean_inc(x_32); +x_33 = lean_ctor_get(x_18, 1); +lean_inc(x_33); +lean_dec(x_18); +x_34 = lean_ctor_get(x_33, 4); +lean_inc(x_34); +lean_dec(x_33); +x_35 = lean_ctor_get(x_34, 0); +lean_inc(x_35); +lean_dec(x_34); +x_36 = lean_unsigned_to_nat(0u); +x_37 = l_Array_forMAux___main___at_Lean_Meta_MetaHasEval___spec__4(x_35, x_36, x_5); +lean_dec(x_35); +if (lean_obj_tag(x_37) == 0) +{ +uint8_t x_38; +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 = l_Lean_Meta_Exception_toStr(x_32); +lean_ctor_set_tag(x_37, 1); +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 = l_Lean_Meta_Exception_toStr(x_32); +x_43 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_43, 0, x_42); +lean_ctor_set(x_43, 1, x_41); +return x_43; +} +} +else +{ +uint8_t x_44; +lean_dec(x_32); +x_44 = !lean_is_exclusive(x_37); +if (x_44 == 0) +{ +return x_37; +} +else +{ +lean_object* x_45; lean_object* x_46; lean_object* x_47; +x_45 = lean_ctor_get(x_37, 0); +x_46 = lean_ctor_get(x_37, 1); +lean_inc(x_46); +lean_inc(x_45); +lean_dec(x_37); +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; +} +} +} +} +} +lean_object* l_Lean_Meta_MetaHasEval(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Meta_MetaHasEval___rarg), 5, 0); +return x_2; +} +} +lean_object* l_Array_forMAux___main___at_Lean_Meta_MetaHasEval___spec__4___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_Array_forMAux___main___at_Lean_Meta_MetaHasEval___spec__4(x_1, x_2, x_3); +lean_dec(x_1); +return x_4; +} +} lean_object* l_IO_runMeta___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { @@ -45851,7 +46153,7 @@ lean_ctor_set(x_7, 0, x_3); lean_ctor_set(x_7, 1, x_5); lean_ctor_set(x_7, 2, x_6); x_8 = l_Lean_MetavarContext_Inhabited___closed__1; -x_9 = l_IO_runMeta___rarg___closed__4; +x_9 = l_Lean_Meta_MetaHasEval___rarg___closed__4; x_10 = l_Lean_NameGenerator_Inhabited___closed__3; x_11 = l_Lean_TraceState_Inhabited___closed__1; x_12 = l_PersistentArray_empty___closed__3; @@ -45949,6 +46251,7 @@ lean_object* initialize_Init_Lean_ReducibilityAttrs(lean_object*); lean_object* initialize_Init_Lean_Util_Trace(lean_object*); lean_object* initialize_Init_Lean_Meta_Exception(lean_object*); lean_object* initialize_Init_Lean_Meta_DiscrTreeTypes(lean_object*); +lean_object* initialize_Init_Lean_Eval(lean_object*); static bool _G_initialized = false; lean_object* initialize_Init_Lean_Meta_Basic(lean_object* w) { lean_object * res; @@ -45981,6 +46284,9 @@ lean_dec_ref(res); res = initialize_Init_Lean_Meta_DiscrTreeTypes(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); +res = initialize_Init_Lean_Eval(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); l_Lean_Meta_TransparencyMode_Inhabited = _init_l_Lean_Meta_TransparencyMode_Inhabited(); l_Lean_Meta_TransparencyMode_HasBeq___closed__1 = _init_l_Lean_Meta_TransparencyMode_HasBeq___closed__1(); lean_mark_persistent(l_Lean_Meta_TransparencyMode_HasBeq___closed__1); @@ -46083,18 +46389,18 @@ l_Lean_Meta_isClassQuick___main___closed__1 = _init_l_Lean_Meta_isClassQuick___m lean_mark_persistent(l_Lean_Meta_isClassQuick___main___closed__1); l_Lean_Meta_resettingSynthInstanceCache___rarg___closed__1 = _init_l_Lean_Meta_resettingSynthInstanceCache___rarg___closed__1(); lean_mark_persistent(l_Lean_Meta_resettingSynthInstanceCache___rarg___closed__1); -l_PersistentHashMap_empty___at_IO_runMeta___spec__1___closed__1 = _init_l_PersistentHashMap_empty___at_IO_runMeta___spec__1___closed__1(); -lean_mark_persistent(l_PersistentHashMap_empty___at_IO_runMeta___spec__1___closed__1); -l_PersistentHashMap_empty___at_IO_runMeta___spec__1 = _init_l_PersistentHashMap_empty___at_IO_runMeta___spec__1(); -lean_mark_persistent(l_PersistentHashMap_empty___at_IO_runMeta___spec__1); -l_IO_runMeta___rarg___closed__1 = _init_l_IO_runMeta___rarg___closed__1(); -lean_mark_persistent(l_IO_runMeta___rarg___closed__1); -l_IO_runMeta___rarg___closed__2 = _init_l_IO_runMeta___rarg___closed__2(); -lean_mark_persistent(l_IO_runMeta___rarg___closed__2); -l_IO_runMeta___rarg___closed__3 = _init_l_IO_runMeta___rarg___closed__3(); -lean_mark_persistent(l_IO_runMeta___rarg___closed__3); -l_IO_runMeta___rarg___closed__4 = _init_l_IO_runMeta___rarg___closed__4(); -lean_mark_persistent(l_IO_runMeta___rarg___closed__4); +l_PersistentHashMap_empty___at_Lean_Meta_MetaHasEval___spec__1___closed__1 = _init_l_PersistentHashMap_empty___at_Lean_Meta_MetaHasEval___spec__1___closed__1(); +lean_mark_persistent(l_PersistentHashMap_empty___at_Lean_Meta_MetaHasEval___spec__1___closed__1); +l_PersistentHashMap_empty___at_Lean_Meta_MetaHasEval___spec__1 = _init_l_PersistentHashMap_empty___at_Lean_Meta_MetaHasEval___spec__1(); +lean_mark_persistent(l_PersistentHashMap_empty___at_Lean_Meta_MetaHasEval___spec__1); +l_Lean_Meta_MetaHasEval___rarg___closed__1 = _init_l_Lean_Meta_MetaHasEval___rarg___closed__1(); +lean_mark_persistent(l_Lean_Meta_MetaHasEval___rarg___closed__1); +l_Lean_Meta_MetaHasEval___rarg___closed__2 = _init_l_Lean_Meta_MetaHasEval___rarg___closed__2(); +lean_mark_persistent(l_Lean_Meta_MetaHasEval___rarg___closed__2); +l_Lean_Meta_MetaHasEval___rarg___closed__3 = _init_l_Lean_Meta_MetaHasEval___rarg___closed__3(); +lean_mark_persistent(l_Lean_Meta_MetaHasEval___rarg___closed__3); +l_Lean_Meta_MetaHasEval___rarg___closed__4 = _init_l_Lean_Meta_MetaHasEval___rarg___closed__4(); +lean_mark_persistent(l_Lean_Meta_MetaHasEval___rarg___closed__4); return lean_mk_io_result(lean_box(0)); } #ifdef __cplusplus diff --git a/stage0/stdlib/Init/Lean/Meta/Instances.c b/stage0/stdlib/Init/Lean/Meta/Instances.c index 1d87b67238..d069ec3512 100644 --- a/stage0/stdlib/Init/Lean/Meta/Instances.c +++ b/stage0/stdlib/Init/Lean/Meta/Instances.c @@ -55,6 +55,7 @@ size_t l_USize_shiftRight(size_t, size_t); lean_object* l_Array_iterateMAux___main___at_Lean_Meta_mkInstanceExtension___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_PersistentHashMap_findAux___main___at_Lean_Meta_addInstanceEntry___spec__3___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_instanceExtension___elambda__3___boxed(lean_object*, lean_object*); +extern lean_object* l_Lean_Meta_MetaHasEval___rarg___closed__4; uint8_t l_Lean_Meta_DiscrTree_Key_beq(lean_object*, lean_object*); lean_object* lean_nat_add(lean_object*, lean_object*); lean_object* l_IO_ofExcept___at_Lean_registerClassAttr___spec__1(lean_object*, lean_object*); @@ -105,7 +106,6 @@ size_t l_USize_mul(size_t, size_t); lean_object* l_Lean_Meta_instanceExtension___closed__1; lean_object* l_Lean_Meta_registerInstanceAttr___closed__6; lean_object* l_Lean_Meta_instanceExtension___closed__2; -extern lean_object* l_IO_runMeta___rarg___closed__4; lean_object* l_Lean_Meta_registerInstanceAttr___lambda__1___closed__2; lean_object* lean_add_instance(lean_object*, lean_object*); lean_object* l_Lean_PersistentEnvExtension_addEntry___rarg(lean_object*, lean_object*, lean_object*); @@ -3236,7 +3236,7 @@ lean_dec(x_7); x_9 = l_List_map___main___at_Lean_Meta_addGlobalInstance___spec__1(x_8); x_10 = l_Lean_mkConst(x_2, x_9); x_11 = l_Lean_MetavarContext_Inhabited___closed__1; -x_12 = l_IO_runMeta___rarg___closed__4; +x_12 = l_Lean_Meta_MetaHasEval___rarg___closed__4; x_13 = l_Lean_NameGenerator_Inhabited___closed__3; x_14 = l_Lean_TraceState_Inhabited___closed__1; x_15 = l_PersistentArray_empty___closed__3; diff --git a/stage0/stdlib/Init/Lean/MonadCache.c b/stage0/stdlib/Init/Lean/MonadCache.c deleted file mode 100644 index d37bf0d8ca..0000000000 --- a/stage0/stdlib/Init/Lean/MonadCache.c +++ /dev/null @@ -1,1100 +0,0 @@ -// Lean compiler output -// Module: Init.Lean.MonadCache -// Imports: Init.Control.Reader Init.Control.EState Init.Data.HashMap -#include "runtime/lean.h" -#if defined(__clang__) -#pragma clang diagnostic ignored "-Wunused-parameter" -#pragma clang diagnostic ignored "-Wunused-label" -#elif defined(__GNUC__) && !defined(__CLANG__) -#pragma GCC diagnostic ignored "-Wunused-parameter" -#pragma GCC diagnostic ignored "-Wunused-label" -#pragma GCC diagnostic ignored "-Wunused-but-set-variable" -#endif -#ifdef __cplusplus -extern "C" { -#endif -lean_object* l_Lean_MonadHashMapCacheAdapter_findCached(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_checkCache___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WithHashMapCache_fromState___rarg(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_MonadHashMapCacheAdapter_findCached___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WithHashMapCache_getCache(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WithHashMapCache_fromState(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_readerLift___rarg___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WithHashMapCache_modifyCache(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_checkCache___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WithHashMapCache_getCache___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_MonadHashMapCacheAdapter_Lean_MonadCache___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_readerLift___rarg(lean_object*); -lean_object* l_HashMapImp_insert___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_checkCache(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_MonadHashMapCacheAdapter_findCached___boxed(lean_object*, lean_object*, lean_object*); -extern lean_object* l_ExceptT_lift___rarg___closed__1; -lean_object* l_Lean_readerLift___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WithHashMapCache_getCacheE(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_readerLift___rarg___lambda__1(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WithHashMapCache_getCache___rarg(lean_object*); -lean_object* l_Lean_MonadHashMapCacheAdapter_Lean_MonadCache(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_MonadHashMapCacheAdapter_cache___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WithHashMapCache_modifyCache___rarg(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_readerLift___boxed(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_readerLift___rarg___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_checkCache___rarg___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_MonadHashMapCacheAdapter_cache___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_finally___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WithHashMapCache_toEState(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_exceptLift___boxed(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WithHashMapCache_getCacheE___rarg(lean_object*); -lean_object* l_Lean_WithHashMapCache_estateAdapter___rarg___closed__1; -lean_object* l_Lean_checkCache___rarg(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WithHashMapCache_stateAdapter___rarg___closed__1; -lean_object* l_Lean_exceptLift(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WithHashMapCache_stateAdapter(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WithHashMapCache_stateAdapter___rarg(lean_object*, lean_object*); -lean_object* l_Lean_WithHashMapCache_modifyCacheE___rarg(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WithHashMapCache_fromState___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WithHashMapCache_toState(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WithHashMapCache_fromEState(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WithHashMapCache_toEState___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WithHashMapCache_modifyCache___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WithHashMapCache_estateAdapter___rarg(lean_object*, lean_object*); -lean_object* l_Lean_readerLift(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WithHashMapCache_modifyCacheE___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WithHashMapCache_getCacheE___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WithHashMapCache_fromEState___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_exceptLift___rarg___lambda__1(lean_object*, lean_object*, lean_object*); -lean_object* l_HashMapImp_find___rarg(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_MonadHashMapCacheAdapter_cache___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WithHashMapCache_toEState___rarg(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WithHashMapCache_toState___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_MonadHashMapCacheAdapter_cache(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WithHashMapCache_toState___rarg(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_MonadHashMapCacheAdapter_Lean_MonadCache___rarg(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_MonadHashMapCacheAdapter_findCached___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_MonadHashMapCacheAdapter_findCached___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WithHashMapCache_modifyCacheE(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WithHashMapCache_estateAdapter(lean_object*, lean_object*, lean_object*, lean_object*); -extern lean_object* l_HashMap_Inhabited___closed__1; -lean_object* l_Lean_exceptLift___rarg___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WithHashMapCache_fromEState___rarg(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_exceptLift___rarg(lean_object*, lean_object*); -lean_object* l_Lean_checkCache___rarg___lambda__1(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; -x_6 = lean_ctor_get(x_1, 1); -lean_inc(x_6); -lean_dec(x_1); -lean_inc(x_5); -x_7 = lean_apply_2(x_6, x_2, x_5); -x_8 = lean_alloc_closure((void*)(l_finally___rarg___lambda__1___boxed), 3, 2); -lean_closure_set(x_8, 0, x_3); -lean_closure_set(x_8, 1, x_5); -x_9 = lean_apply_4(x_4, lean_box(0), lean_box(0), x_7, x_8); -return x_9; -} -} -lean_object* l_Lean_checkCache___rarg___lambda__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { -_start: -{ -if (lean_obj_tag(x_6) == 0) -{ -lean_object* x_7; lean_object* x_8; lean_object* x_9; -lean_inc(x_2); -x_7 = lean_apply_1(x_1, x_2); -lean_inc(x_5); -x_8 = lean_alloc_closure((void*)(l_Lean_checkCache___rarg___lambda__1), 5, 4); -lean_closure_set(x_8, 0, x_3); -lean_closure_set(x_8, 1, x_2); -lean_closure_set(x_8, 2, x_4); -lean_closure_set(x_8, 3, x_5); -x_9 = lean_apply_4(x_5, lean_box(0), lean_box(0), x_7, x_8); -return x_9; -} -else -{ -lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; -lean_dec(x_5); -lean_dec(x_3); -lean_dec(x_2); -lean_dec(x_1); -x_10 = lean_ctor_get(x_6, 0); -lean_inc(x_10); -lean_dec(x_6); -x_11 = lean_ctor_get(x_4, 0); -lean_inc(x_11); -lean_dec(x_4); -x_12 = lean_ctor_get(x_11, 1); -lean_inc(x_12); -lean_dec(x_11); -x_13 = lean_apply_2(x_12, lean_box(0), x_10); -return x_13; -} -} -} -lean_object* l_Lean_checkCache___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_7; lean_object* x_8; lean_object* x_9; -x_5 = lean_ctor_get(x_2, 1); -lean_inc(x_5); -x_6 = lean_ctor_get(x_1, 0); -lean_inc(x_6); -lean_inc(x_3); -x_7 = lean_apply_1(x_6, x_3); -lean_inc(x_5); -x_8 = lean_alloc_closure((void*)(l_Lean_checkCache___rarg___lambda__2), 6, 5); -lean_closure_set(x_8, 0, x_4); -lean_closure_set(x_8, 1, x_3); -lean_closure_set(x_8, 2, x_1); -lean_closure_set(x_8, 3, x_2); -lean_closure_set(x_8, 4, x_5); -x_9 = lean_apply_4(x_5, lean_box(0), lean_box(0), x_7, x_8); -return x_9; -} -} -lean_object* l_Lean_checkCache(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; -x_4 = lean_alloc_closure((void*)(l_Lean_checkCache___rarg), 4, 0); -return x_4; -} -} -lean_object* l_Lean_checkCache___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; -x_4 = l_Lean_checkCache(x_1, x_2, x_3); -lean_dec(x_3); -return x_4; -} -} -lean_object* l_Lean_readerLift___rarg___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; lean_object* x_5; -x_4 = lean_ctor_get(x_1, 0); -lean_inc(x_4); -lean_dec(x_1); -x_5 = lean_apply_1(x_4, x_2); -return x_5; -} -} -lean_object* l_Lean_readerLift___rarg___lambda__2(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_ctor_get(x_1, 1); -lean_inc(x_5); -lean_dec(x_1); -x_6 = lean_apply_2(x_5, x_2, x_3); -return x_6; -} -} -lean_object* l_Lean_readerLift___rarg(lean_object* x_1) { -_start: -{ -lean_object* x_2; lean_object* x_3; lean_object* x_4; -lean_inc(x_1); -x_2 = lean_alloc_closure((void*)(l_Lean_readerLift___rarg___lambda__1___boxed), 3, 1); -lean_closure_set(x_2, 0, x_1); -x_3 = lean_alloc_closure((void*)(l_Lean_readerLift___rarg___lambda__2___boxed), 4, 1); -lean_closure_set(x_3, 0, x_1); -x_4 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_4, 0, x_2); -lean_ctor_set(x_4, 1, x_3); -return x_4; -} -} -lean_object* l_Lean_readerLift(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -lean_object* x_5; -x_5 = lean_alloc_closure((void*)(l_Lean_readerLift___rarg), 1, 0); -return x_5; -} -} -lean_object* l_Lean_readerLift___rarg___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; -x_4 = l_Lean_readerLift___rarg___lambda__1(x_1, x_2, x_3); -lean_dec(x_3); -return x_4; -} -} -lean_object* l_Lean_readerLift___rarg___lambda__2___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_readerLift___rarg___lambda__2(x_1, x_2, x_3, x_4); -lean_dec(x_4); -return x_5; -} -} -lean_object* l_Lean_readerLift___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_readerLift(x_1, x_2, x_3, x_4); -lean_dec(x_4); -return x_5; -} -} -lean_object* l_Lean_exceptLift___rarg___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; -x_4 = lean_ctor_get(x_1, 0); -lean_inc(x_4); -lean_dec(x_1); -x_5 = lean_apply_1(x_4, x_3); -x_6 = lean_ctor_get(x_2, 0); -lean_inc(x_6); -lean_dec(x_2); -x_7 = lean_ctor_get(x_6, 0); -lean_inc(x_7); -lean_dec(x_6); -x_8 = lean_ctor_get(x_7, 0); -lean_inc(x_8); -lean_dec(x_7); -x_9 = l_ExceptT_lift___rarg___closed__1; -x_10 = lean_apply_4(x_8, lean_box(0), lean_box(0), x_9, x_5); -return x_10; -} -} -lean_object* l_Lean_exceptLift___rarg___lambda__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; -x_5 = lean_ctor_get(x_1, 1); -lean_inc(x_5); -lean_dec(x_1); -x_6 = lean_apply_2(x_5, x_3, x_4); -x_7 = lean_ctor_get(x_2, 0); -lean_inc(x_7); -lean_dec(x_2); -x_8 = lean_ctor_get(x_7, 0); -lean_inc(x_8); -lean_dec(x_7); -x_9 = lean_ctor_get(x_8, 0); -lean_inc(x_9); -lean_dec(x_8); -x_10 = l_ExceptT_lift___rarg___closed__1; -x_11 = lean_apply_4(x_9, lean_box(0), lean_box(0), x_10, x_6); -return x_11; -} -} -lean_object* l_Lean_exceptLift___rarg(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; lean_object* x_4; lean_object* x_5; -lean_inc(x_2); -lean_inc(x_1); -x_3 = lean_alloc_closure((void*)(l_Lean_exceptLift___rarg___lambda__1), 3, 2); -lean_closure_set(x_3, 0, x_1); -lean_closure_set(x_3, 1, x_2); -x_4 = lean_alloc_closure((void*)(l_Lean_exceptLift___rarg___lambda__2), 4, 2); -lean_closure_set(x_4, 0, x_1); -lean_closure_set(x_4, 1, x_2); -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_exceptLift(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -lean_object* x_5; -x_5 = lean_alloc_closure((void*)(l_Lean_exceptLift___rarg), 2, 0); -return x_5; -} -} -lean_object* l_Lean_exceptLift___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_exceptLift(x_1, x_2, x_3, x_4); -lean_dec(x_4); -return x_5; -} -} -lean_object* l_Lean_MonadHashMapCacheAdapter_findCached___rarg___lambda__1(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; -x_6 = lean_ctor_get(x_1, 0); -lean_inc(x_6); -lean_dec(x_1); -x_7 = lean_ctor_get(x_6, 1); -lean_inc(x_7); -lean_dec(x_6); -x_8 = l_HashMapImp_find___rarg(x_2, x_3, x_5, x_4); -x_9 = lean_apply_2(x_7, lean_box(0), x_8); -return x_9; -} -} -lean_object* l_Lean_MonadHashMapCacheAdapter_findCached___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; -x_6 = lean_ctor_get(x_3, 1); -lean_inc(x_6); -x_7 = lean_ctor_get(x_4, 0); -lean_inc(x_7); -lean_dec(x_4); -x_8 = lean_alloc_closure((void*)(l_Lean_MonadHashMapCacheAdapter_findCached___rarg___lambda__1___boxed), 5, 4); -lean_closure_set(x_8, 0, x_3); -lean_closure_set(x_8, 1, x_1); -lean_closure_set(x_8, 2, x_2); -lean_closure_set(x_8, 3, x_5); -x_9 = lean_apply_4(x_6, lean_box(0), lean_box(0), x_7, x_8); -return x_9; -} -} -lean_object* l_Lean_MonadHashMapCacheAdapter_findCached(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; -x_4 = lean_alloc_closure((void*)(l_Lean_MonadHashMapCacheAdapter_findCached___rarg), 5, 0); -return x_4; -} -} -lean_object* l_Lean_MonadHashMapCacheAdapter_findCached___rarg___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { -_start: -{ -lean_object* x_6; -x_6 = l_Lean_MonadHashMapCacheAdapter_findCached___rarg___lambda__1(x_1, x_2, x_3, x_4, x_5); -lean_dec(x_5); -return x_6; -} -} -lean_object* l_Lean_MonadHashMapCacheAdapter_findCached___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; -x_4 = l_Lean_MonadHashMapCacheAdapter_findCached(x_1, x_2, x_3); -lean_dec(x_3); -return x_4; -} -} -lean_object* l_Lean_MonadHashMapCacheAdapter_cache___rarg___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { -_start: -{ -lean_object* x_6; -x_6 = l_HashMapImp_insert___rarg(x_1, x_2, x_5, x_3, x_4); -return x_6; -} -} -lean_object* l_Lean_MonadHashMapCacheAdapter_cache___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; -x_6 = lean_ctor_get(x_3, 1); -lean_inc(x_6); -lean_dec(x_3); -x_7 = lean_alloc_closure((void*)(l_Lean_MonadHashMapCacheAdapter_cache___rarg___lambda__1), 5, 4); -lean_closure_set(x_7, 0, x_1); -lean_closure_set(x_7, 1, x_2); -lean_closure_set(x_7, 2, x_4); -lean_closure_set(x_7, 3, x_5); -x_8 = lean_apply_1(x_6, x_7); -return x_8; -} -} -lean_object* l_Lean_MonadHashMapCacheAdapter_cache(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; -x_4 = lean_alloc_closure((void*)(l_Lean_MonadHashMapCacheAdapter_cache___rarg), 5, 0); -return x_4; -} -} -lean_object* l_Lean_MonadHashMapCacheAdapter_cache___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; -x_4 = l_Lean_MonadHashMapCacheAdapter_cache(x_1, x_2, x_3); -lean_dec(x_3); -return x_4; -} -} -lean_object* l_Lean_MonadHashMapCacheAdapter_Lean_MonadCache___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_7; -lean_inc(x_4); -lean_inc(x_2); -lean_inc(x_1); -x_5 = lean_alloc_closure((void*)(l_Lean_MonadHashMapCacheAdapter_findCached___rarg), 5, 4); -lean_closure_set(x_5, 0, x_1); -lean_closure_set(x_5, 1, x_2); -lean_closure_set(x_5, 2, x_3); -lean_closure_set(x_5, 3, x_4); -x_6 = lean_alloc_closure((void*)(l_Lean_MonadHashMapCacheAdapter_cache___rarg), 5, 3); -lean_closure_set(x_6, 0, x_1); -lean_closure_set(x_6, 1, x_2); -lean_closure_set(x_6, 2, x_4); -x_7 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_7, 0, x_5); -lean_ctor_set(x_7, 1, x_6); -return x_7; -} -} -lean_object* l_Lean_MonadHashMapCacheAdapter_Lean_MonadCache(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; -x_4 = lean_alloc_closure((void*)(l_Lean_MonadHashMapCacheAdapter_Lean_MonadCache___rarg), 4, 0); -return x_4; -} -} -lean_object* l_Lean_MonadHashMapCacheAdapter_Lean_MonadCache___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; -x_4 = l_Lean_MonadHashMapCacheAdapter_Lean_MonadCache(x_1, x_2, x_3); -lean_dec(x_3); -return x_4; -} -} -lean_object* l_Lean_WithHashMapCache_getCache___rarg(lean_object* x_1) { -_start: -{ -lean_object* x_2; lean_object* x_3; -x_2 = lean_ctor_get(x_1, 1); -lean_inc(x_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; -} -} -lean_object* l_Lean_WithHashMapCache_getCache(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { -_start: -{ -lean_object* x_6; -x_6 = lean_alloc_closure((void*)(l_Lean_WithHashMapCache_getCache___rarg), 1, 0); -return x_6; -} -} -lean_object* l_Lean_WithHashMapCache_getCache___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { -_start: -{ -lean_object* x_6; -x_6 = l_Lean_WithHashMapCache_getCache(x_1, x_2, x_3, x_4, x_5); -lean_dec(x_5); -lean_dec(x_4); -return x_6; -} -} -lean_object* l_Lean_WithHashMapCache_modifyCache___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -uint8_t x_5; -x_5 = !lean_is_exclusive(x_4); -if (x_5 == 0) -{ -lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; -x_6 = lean_ctor_get(x_4, 1); -x_7 = lean_apply_1(x_3, x_6); -lean_ctor_set(x_4, 1, x_7); -x_8 = lean_box(0); -x_9 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_9, 0, x_8); -lean_ctor_set(x_9, 1, x_4); -return x_9; -} -else -{ -lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; -x_10 = lean_ctor_get(x_4, 0); -x_11 = lean_ctor_get(x_4, 1); -lean_inc(x_11); -lean_inc(x_10); -lean_dec(x_4); -x_12 = lean_apply_1(x_3, x_11); -x_13 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_13, 0, x_10); -lean_ctor_set(x_13, 1, x_12); -x_14 = lean_box(0); -x_15 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_15, 0, x_14); -lean_ctor_set(x_15, 1, x_13); -return x_15; -} -} -} -lean_object* l_Lean_WithHashMapCache_modifyCache(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; -x_4 = lean_alloc_closure((void*)(l_Lean_WithHashMapCache_modifyCache___rarg___boxed), 4, 0); -return x_4; -} -} -lean_object* l_Lean_WithHashMapCache_modifyCache___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -lean_object* x_5; -x_5 = l_Lean_WithHashMapCache_modifyCache___rarg(x_1, x_2, x_3, x_4); -lean_dec(x_2); -lean_dec(x_1); -return x_5; -} -} -lean_object* _init_l_Lean_WithHashMapCache_stateAdapter___rarg___closed__1() { -_start: -{ -lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Lean_WithHashMapCache_getCache___rarg), 1, 0); -return x_1; -} -} -lean_object* l_Lean_WithHashMapCache_stateAdapter___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_Lean_WithHashMapCache_modifyCache___rarg___boxed), 4, 2); -lean_closure_set(x_3, 0, x_1); -lean_closure_set(x_3, 1, x_2); -x_4 = l_Lean_WithHashMapCache_stateAdapter___rarg___closed__1; -x_5 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_5, 0, x_4); -lean_ctor_set(x_5, 1, x_3); -return x_5; -} -} -lean_object* l_Lean_WithHashMapCache_stateAdapter(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; -x_4 = lean_alloc_closure((void*)(l_Lean_WithHashMapCache_stateAdapter___rarg), 2, 0); -return x_4; -} -} -lean_object* l_Lean_WithHashMapCache_getCacheE___rarg(lean_object* x_1) { -_start: -{ -lean_object* x_2; lean_object* x_3; -x_2 = lean_ctor_get(x_1, 1); -lean_inc(x_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; -} -} -lean_object* l_Lean_WithHashMapCache_getCacheE(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 = lean_alloc_closure((void*)(l_Lean_WithHashMapCache_getCacheE___rarg), 1, 0); -return x_7; -} -} -lean_object* l_Lean_WithHashMapCache_getCacheE___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { -_start: -{ -lean_object* x_7; -x_7 = l_Lean_WithHashMapCache_getCacheE(x_1, x_2, x_3, x_4, x_5, x_6); -lean_dec(x_6); -lean_dec(x_5); -return x_7; -} -} -lean_object* l_Lean_WithHashMapCache_modifyCacheE___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -uint8_t x_5; -x_5 = !lean_is_exclusive(x_4); -if (x_5 == 0) -{ -lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; -x_6 = lean_ctor_get(x_4, 1); -x_7 = lean_apply_1(x_3, x_6); -lean_ctor_set(x_4, 1, x_7); -x_8 = lean_box(0); -x_9 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_9, 0, x_8); -lean_ctor_set(x_9, 1, x_4); -return x_9; -} -else -{ -lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; -x_10 = lean_ctor_get(x_4, 0); -x_11 = lean_ctor_get(x_4, 1); -lean_inc(x_11); -lean_inc(x_10); -lean_dec(x_4); -x_12 = lean_apply_1(x_3, x_11); -x_13 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_13, 0, x_10); -lean_ctor_set(x_13, 1, x_12); -x_14 = lean_box(0); -x_15 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_15, 0, x_14); -lean_ctor_set(x_15, 1, x_13); -return x_15; -} -} -} -lean_object* l_Lean_WithHashMapCache_modifyCacheE(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -lean_object* x_5; -x_5 = lean_alloc_closure((void*)(l_Lean_WithHashMapCache_modifyCacheE___rarg___boxed), 4, 0); -return x_5; -} -} -lean_object* l_Lean_WithHashMapCache_modifyCacheE___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -lean_object* x_5; -x_5 = l_Lean_WithHashMapCache_modifyCacheE___rarg(x_1, x_2, x_3, x_4); -lean_dec(x_2); -lean_dec(x_1); -return x_5; -} -} -lean_object* _init_l_Lean_WithHashMapCache_estateAdapter___rarg___closed__1() { -_start: -{ -lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Lean_WithHashMapCache_getCacheE___rarg), 1, 0); -return x_1; -} -} -lean_object* l_Lean_WithHashMapCache_estateAdapter___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_Lean_WithHashMapCache_modifyCacheE___rarg___boxed), 4, 2); -lean_closure_set(x_3, 0, x_1); -lean_closure_set(x_3, 1, x_2); -x_4 = l_Lean_WithHashMapCache_estateAdapter___rarg___closed__1; -x_5 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_5, 0, x_4); -lean_ctor_set(x_5, 1, x_3); -return x_5; -} -} -lean_object* l_Lean_WithHashMapCache_estateAdapter(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -lean_object* x_5; -x_5 = lean_alloc_closure((void*)(l_Lean_WithHashMapCache_estateAdapter___rarg), 2, 0); -return x_5; -} -} -lean_object* l_Lean_WithHashMapCache_fromState___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -uint8_t x_5; -x_5 = !lean_is_exclusive(x_4); -if (x_5 == 0) -{ -lean_object* x_6; lean_object* x_7; uint8_t x_8; -x_6 = lean_ctor_get(x_4, 0); -x_7 = lean_apply_1(x_3, x_6); -x_8 = !lean_is_exclusive(x_7); -if (x_8 == 0) -{ -lean_object* x_9; -x_9 = lean_ctor_get(x_7, 1); -lean_ctor_set(x_4, 0, x_9); -lean_ctor_set(x_7, 1, x_4); -return x_7; -} -else -{ -lean_object* x_10; lean_object* x_11; lean_object* x_12; -x_10 = lean_ctor_get(x_7, 0); -x_11 = lean_ctor_get(x_7, 1); -lean_inc(x_11); -lean_inc(x_10); -lean_dec(x_7); -lean_ctor_set(x_4, 0, x_11); -x_12 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_12, 0, x_10); -lean_ctor_set(x_12, 1, x_4); -return x_12; -} -} -else -{ -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; -x_13 = lean_ctor_get(x_4, 0); -x_14 = lean_ctor_get(x_4, 1); -lean_inc(x_14); -lean_inc(x_13); -lean_dec(x_4); -x_15 = lean_apply_1(x_3, x_13); -x_16 = lean_ctor_get(x_15, 0); -lean_inc(x_16); -x_17 = lean_ctor_get(x_15, 1); -lean_inc(x_17); -if (lean_is_exclusive(x_15)) { - lean_ctor_release(x_15, 0); - lean_ctor_release(x_15, 1); - x_18 = x_15; -} else { - lean_dec_ref(x_15); - x_18 = lean_box(0); -} -x_19 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_19, 0, x_17); -lean_ctor_set(x_19, 1, x_14); -if (lean_is_scalar(x_18)) { - x_20 = lean_alloc_ctor(0, 2, 0); -} else { - x_20 = x_18; -} -lean_ctor_set(x_20, 0, x_16); -lean_ctor_set(x_20, 1, x_19); -return x_20; -} -} -} -lean_object* l_Lean_WithHashMapCache_fromState(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -lean_object* x_5; -x_5 = lean_alloc_closure((void*)(l_Lean_WithHashMapCache_fromState___rarg___boxed), 4, 0); -return x_5; -} -} -lean_object* l_Lean_WithHashMapCache_fromState___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -lean_object* x_5; -x_5 = l_Lean_WithHashMapCache_fromState___rarg(x_1, x_2, x_3, x_4); -lean_dec(x_2); -lean_dec(x_1); -return x_5; -} -} -lean_object* l_Lean_WithHashMapCache_toState___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_7; uint8_t x_8; -x_5 = l_HashMap_Inhabited___closed__1; -x_6 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_6, 0, x_4); -lean_ctor_set(x_6, 1, x_5); -x_7 = lean_apply_1(x_3, x_6); -x_8 = !lean_is_exclusive(x_7); -if (x_8 == 0) -{ -lean_object* x_9; lean_object* x_10; -x_9 = lean_ctor_get(x_7, 1); -x_10 = lean_ctor_get(x_9, 0); -lean_inc(x_10); -lean_dec(x_9); -lean_ctor_set(x_7, 1, x_10); -return x_7; -} -else -{ -lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; -x_11 = lean_ctor_get(x_7, 0); -x_12 = lean_ctor_get(x_7, 1); -lean_inc(x_12); -lean_inc(x_11); -lean_dec(x_7); -x_13 = lean_ctor_get(x_12, 0); -lean_inc(x_13); -lean_dec(x_12); -x_14 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_14, 0, x_11); -lean_ctor_set(x_14, 1, x_13); -return x_14; -} -} -} -lean_object* l_Lean_WithHashMapCache_toState(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -lean_object* x_5; -x_5 = lean_alloc_closure((void*)(l_Lean_WithHashMapCache_toState___rarg___boxed), 4, 0); -return x_5; -} -} -lean_object* l_Lean_WithHashMapCache_toState___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -lean_object* x_5; -x_5 = l_Lean_WithHashMapCache_toState___rarg(x_1, x_2, x_3, x_4); -lean_dec(x_2); -lean_dec(x_1); -return x_5; -} -} -lean_object* l_Lean_WithHashMapCache_fromEState___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -uint8_t x_5; -x_5 = !lean_is_exclusive(x_4); -if (x_5 == 0) -{ -lean_object* x_6; lean_object* x_7; -x_6 = lean_ctor_get(x_4, 0); -x_7 = lean_apply_1(x_3, x_6); -if (lean_obj_tag(x_7) == 0) -{ -uint8_t x_8; -x_8 = !lean_is_exclusive(x_7); -if (x_8 == 0) -{ -lean_object* x_9; -x_9 = lean_ctor_get(x_7, 1); -lean_ctor_set(x_4, 0, x_9); -lean_ctor_set(x_7, 1, x_4); -return x_7; -} -else -{ -lean_object* x_10; lean_object* x_11; lean_object* x_12; -x_10 = lean_ctor_get(x_7, 0); -x_11 = lean_ctor_get(x_7, 1); -lean_inc(x_11); -lean_inc(x_10); -lean_dec(x_7); -lean_ctor_set(x_4, 0, x_11); -x_12 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_12, 0, x_10); -lean_ctor_set(x_12, 1, x_4); -return x_12; -} -} -else -{ -uint8_t x_13; -x_13 = !lean_is_exclusive(x_7); -if (x_13 == 0) -{ -lean_object* x_14; -x_14 = lean_ctor_get(x_7, 1); -lean_ctor_set(x_4, 0, x_14); -lean_ctor_set(x_7, 1, x_4); -return x_7; -} -else -{ -lean_object* x_15; lean_object* x_16; lean_object* x_17; -x_15 = lean_ctor_get(x_7, 0); -x_16 = lean_ctor_get(x_7, 1); -lean_inc(x_16); -lean_inc(x_15); -lean_dec(x_7); -lean_ctor_set(x_4, 0, x_16); -x_17 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_17, 0, x_15); -lean_ctor_set(x_17, 1, x_4); -return x_17; -} -} -} -else -{ -lean_object* x_18; lean_object* x_19; lean_object* x_20; -x_18 = lean_ctor_get(x_4, 0); -x_19 = lean_ctor_get(x_4, 1); -lean_inc(x_19); -lean_inc(x_18); -lean_dec(x_4); -x_20 = lean_apply_1(x_3, x_18); -if (lean_obj_tag(x_20) == 0) -{ -lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; -x_21 = lean_ctor_get(x_20, 0); -lean_inc(x_21); -x_22 = lean_ctor_get(x_20, 1); -lean_inc(x_22); -if (lean_is_exclusive(x_20)) { - lean_ctor_release(x_20, 0); - lean_ctor_release(x_20, 1); - x_23 = x_20; -} else { - lean_dec_ref(x_20); - x_23 = lean_box(0); -} -x_24 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_24, 0, x_22); -lean_ctor_set(x_24, 1, x_19); -if (lean_is_scalar(x_23)) { - x_25 = lean_alloc_ctor(0, 2, 0); -} else { - x_25 = x_23; -} -lean_ctor_set(x_25, 0, x_21); -lean_ctor_set(x_25, 1, x_24); -return x_25; -} -else -{ -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_20, 0); -lean_inc(x_26); -x_27 = lean_ctor_get(x_20, 1); -lean_inc(x_27); -if (lean_is_exclusive(x_20)) { - lean_ctor_release(x_20, 0); - lean_ctor_release(x_20, 1); - x_28 = x_20; -} else { - lean_dec_ref(x_20); - x_28 = lean_box(0); -} -x_29 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_29, 0, x_27); -lean_ctor_set(x_29, 1, x_19); -if (lean_is_scalar(x_28)) { - x_30 = lean_alloc_ctor(1, 2, 0); -} else { - x_30 = x_28; -} -lean_ctor_set(x_30, 0, x_26); -lean_ctor_set(x_30, 1, x_29); -return x_30; -} -} -} -} -lean_object* l_Lean_WithHashMapCache_fromEState(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { -_start: -{ -lean_object* x_6; -x_6 = lean_alloc_closure((void*)(l_Lean_WithHashMapCache_fromEState___rarg___boxed), 4, 0); -return x_6; -} -} -lean_object* l_Lean_WithHashMapCache_fromEState___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -lean_object* x_5; -x_5 = l_Lean_WithHashMapCache_fromEState___rarg(x_1, x_2, x_3, x_4); -lean_dec(x_2); -lean_dec(x_1); -return x_5; -} -} -lean_object* l_Lean_WithHashMapCache_toEState___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_7; -x_5 = l_HashMap_Inhabited___closed__1; -x_6 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_6, 0, x_4); -lean_ctor_set(x_6, 1, x_5); -x_7 = lean_apply_1(x_3, x_6); -if (lean_obj_tag(x_7) == 0) -{ -uint8_t x_8; -x_8 = !lean_is_exclusive(x_7); -if (x_8 == 0) -{ -lean_object* x_9; lean_object* x_10; -x_9 = lean_ctor_get(x_7, 1); -x_10 = lean_ctor_get(x_9, 0); -lean_inc(x_10); -lean_dec(x_9); -lean_ctor_set(x_7, 1, x_10); -return x_7; -} -else -{ -lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; -x_11 = lean_ctor_get(x_7, 0); -x_12 = lean_ctor_get(x_7, 1); -lean_inc(x_12); -lean_inc(x_11); -lean_dec(x_7); -x_13 = lean_ctor_get(x_12, 0); -lean_inc(x_13); -lean_dec(x_12); -x_14 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_14, 0, x_11); -lean_ctor_set(x_14, 1, x_13); -return x_14; -} -} -else -{ -uint8_t x_15; -x_15 = !lean_is_exclusive(x_7); -if (x_15 == 0) -{ -lean_object* x_16; lean_object* x_17; -x_16 = lean_ctor_get(x_7, 1); -x_17 = lean_ctor_get(x_16, 0); -lean_inc(x_17); -lean_dec(x_16); -lean_ctor_set(x_7, 1, x_17); -return x_7; -} -else -{ -lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; -x_18 = lean_ctor_get(x_7, 0); -x_19 = lean_ctor_get(x_7, 1); -lean_inc(x_19); -lean_inc(x_18); -lean_dec(x_7); -x_20 = lean_ctor_get(x_19, 0); -lean_inc(x_20); -lean_dec(x_19); -x_21 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_21, 0, x_18); -lean_ctor_set(x_21, 1, x_20); -return x_21; -} -} -} -} -lean_object* l_Lean_WithHashMapCache_toEState(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { -_start: -{ -lean_object* x_6; -x_6 = lean_alloc_closure((void*)(l_Lean_WithHashMapCache_toEState___rarg___boxed), 4, 0); -return x_6; -} -} -lean_object* l_Lean_WithHashMapCache_toEState___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -lean_object* x_5; -x_5 = l_Lean_WithHashMapCache_toEState___rarg(x_1, x_2, x_3, x_4); -lean_dec(x_2); -lean_dec(x_1); -return x_5; -} -} -lean_object* initialize_Init_Control_Reader(lean_object*); -lean_object* initialize_Init_Control_EState(lean_object*); -lean_object* initialize_Init_Data_HashMap(lean_object*); -static bool _G_initialized = false; -lean_object* initialize_Init_Lean_MonadCache(lean_object* w) { -lean_object * res; -if (_G_initialized) return lean_mk_io_result(lean_box(0)); -_G_initialized = true; -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_Control_EState(lean_io_mk_world()); -if (lean_io_result_is_error(res)) return res; -lean_dec_ref(res); -res = initialize_Init_Data_HashMap(lean_io_mk_world()); -if (lean_io_result_is_error(res)) return res; -lean_dec_ref(res); -l_Lean_WithHashMapCache_stateAdapter___rarg___closed__1 = _init_l_Lean_WithHashMapCache_stateAdapter___rarg___closed__1(); -lean_mark_persistent(l_Lean_WithHashMapCache_stateAdapter___rarg___closed__1); -l_Lean_WithHashMapCache_estateAdapter___rarg___closed__1 = _init_l_Lean_WithHashMapCache_estateAdapter___rarg___closed__1(); -lean_mark_persistent(l_Lean_WithHashMapCache_estateAdapter___rarg___closed__1); -return lean_mk_io_result(lean_box(0)); -} -#ifdef __cplusplus -} -#endif diff --git a/stage0/stdlib/Init/Lean/Path.c b/stage0/stdlib/Init/Lean/Path.c deleted file mode 100644 index 39ff316075..0000000000 --- a/stage0/stdlib/Init/Lean/Path.c +++ /dev/null @@ -1,2714 +0,0 @@ -// Lean compiler output -// Module: Init.Lean.Path -// Imports: Init.System.IO Init.System.FilePath Init.Data.Array Init.Data.List.Control Init.Data.HashMap Init.Data.Nat.Control Init.Lean.Data.Name -#include "runtime/lean.h" -#if defined(__clang__) -#pragma clang diagnostic ignored "-Wunused-parameter" -#pragma clang diagnostic ignored "-Wunused-label" -#elif defined(__GNUC__) && !defined(__CLANG__) -#pragma GCC diagnostic ignored "-Wunused-parameter" -#pragma GCC diagnostic ignored "-Wunused-label" -#pragma GCC diagnostic ignored "-Wunused-but-set-variable" -#endif -#ifdef __cplusplus -extern "C" { -#endif -lean_object* lean_string_push(lean_object*, uint32_t); -lean_object* l_Lean_getBuiltinSearchPath___closed__6; -lean_object* lean_array_uget(lean_object*, size_t); -lean_object* l_HashMapImp_moveEntries___main___at_Lean_parseSearchPath___spec__4(lean_object*, lean_object*, lean_object*); -lean_object* lean_io_is_dir(lean_object*, lean_object*); -lean_object* l_HashMapImp_expand___at_Lean_parseSearchPath___spec__3(lean_object*, lean_object*); -lean_object* l_String_revPosOf(lean_object*, uint32_t); -lean_object* lean_array_uset(lean_object*, size_t, lean_object*); -lean_object* l_Lean_searchPathRef; -lean_object* l___private_Init_Util_1__mkPanicMessage(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* lean_io_mk_ref(lean_object*, lean_object*); -lean_object* lean_io_ref_get(lean_object*, lean_object*); -lean_object* l_Lean_getBuiltinSearchPath(lean_object*); -lean_object* l_Lean_mkSearchPathRef(lean_object*); -lean_object* l_Lean_parseSearchPath___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_AssocList_find___main___at_Lean_findOLean___spec__2(lean_object*, lean_object*); -lean_object* lean_array_get_size(lean_object*); -lean_object* lean_string_append(lean_object*, lean_object*); -lean_object* lean_string_utf8_extract(lean_object*, lean_object*, lean_object*); -extern lean_object* l_Lean_Name_inhabited; -extern lean_object* l_String_splitAux___main___closed__1; -lean_object* l_IO_getEnv___at_Lean_addSearchPathFromEnv___spec__1___boxed(lean_object*, lean_object*); -lean_object* l_String_splitOn(lean_object*, lean_object*); -lean_object* l_Lean_modPathToFilePath___main___closed__3; -lean_object* l_AssocList_foldlM___main___at_Lean_findAtSearchPath___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* lean_io_getenv(lean_object*, lean_object*); -lean_object* l___private_Init_Lean_Path_1__pathSep; -lean_object* l_Lean_modPathToFilePath___main___closed__2; -lean_object* l_Lean_findOLean(lean_object*, lean_object*); -lean_object* lean_nat_add(lean_object*, lean_object*); -lean_object* l_AssocList_foldlM___main___at_Lean_parseSearchPath___spec__5(lean_object*, lean_object*); -lean_object* l_Lean_modPathToFilePath___main___closed__1; -lean_object* l_List_foldlM___main___at_Lean_parseSearchPath___spec__7(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_modPathToFilePath___main(lean_object*); -lean_object* lean_array_fget(lean_object*, lean_object*); -lean_object* l_HashMapImp_find___at_Lean_findOLean___spec__1(lean_object*, lean_object*); -lean_object* l_Lean_findAtSearchPath(lean_object*, lean_object*); -lean_object* l_Array_iterateMAux___main___at_Lean_findAtSearchPath___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Name_append___main(lean_object*, lean_object*); -lean_object* l_Lean_getBuiltinSearchPath___closed__1; -lean_object* l_Lean_addSearchPathFromEnv___closed__1; -lean_object* lean_array_fset(lean_object*, lean_object*, lean_object*); -lean_object* lean_io_realpath(lean_object*, lean_object*); -lean_object* l_Lean_moduleNameOfFileName___closed__2; -lean_object* l_System_FilePath_dirName(lean_object*); -lean_object* l_Lean_moduleNameOfFileName___closed__1; -extern lean_object* l_Char_HasRepr___closed__1; -lean_object* l_System_FilePath_normalizePath(lean_object*); -lean_object* l_Lean_getBuiltinSearchPath___closed__5; -lean_object* lean_name_mk_string(lean_object*, lean_object*); -extern lean_object* l_List_reprAux___main___rarg___closed__1; -lean_object* l_Lean_findOLean___closed__2; -lean_object* l_Lean_modPathToFilePath___boxed(lean_object*); -lean_object* l_Lean_modPathToFilePath___main___boxed(lean_object*); -lean_object* l_Lean_normalizeModuleName___closed__2; -extern uint32_t l_System_FilePath_pathSeparator; -lean_object* l_IO_isDir___at_Lean_getBuiltinSearchPath___spec__3___boxed(lean_object*, lean_object*); -uint32_t lean_string_utf8_get(lean_object*, lean_object*); -lean_object* lean_module_name_of_file(lean_object*, lean_object*); -lean_object* l_IO_appDir___at_Lean_getBuiltinSearchPath___spec__1(lean_object*); -lean_object* l_String_split___at_System_FilePath_splitSearchPath___spec__2(lean_object*); -size_t lean_usize_modn(size_t, lean_object*); -lean_object* l_Lean_findAtSearchPath___closed__1; -lean_object* l_Lean_realPathNormalized(lean_object*, lean_object*); -lean_object* l_mkHashMapImp___rarg(lean_object*); -lean_object* l_Lean_findAtSearchPath___closed__2; -lean_object* l_AssocList_contains___main___at_Lean_parseSearchPath___spec__2___boxed(lean_object*, lean_object*); -lean_object* l_IO_getEnv___at_Lean_addSearchPathFromEnv___spec__1(lean_object*, lean_object*); -lean_object* l_HashMapImp_insert___at_Lean_parseSearchPath___spec__1(lean_object*, lean_object*, lean_object*); -lean_object* lean_init_search_path(lean_object*, lean_object*); -lean_object* l_HashMapImp_find___at_Lean_findOLean___spec__1___boxed(lean_object*, lean_object*); -lean_object* l_Lean_splitAtRoot(lean_object*); -lean_object* l_Lean_findOLean___closed__1; -uint8_t l_UInt32_decEq(uint32_t, uint32_t); -lean_object* l_List_foldl___main___at_Lean_moduleNameOfFileName___spec__1(lean_object*, lean_object*); -lean_object* l_String_intercalate(lean_object*, lean_object*); -lean_object* l_List_foldlM___main___at_Lean_parseSearchPath___spec__7___closed__2; -lean_object* l___private_Init_Lean_Path_1__pathSep___closed__1; -lean_object* l_AssocList_replace___main___at_Lean_parseSearchPath___spec__6(lean_object*, lean_object*, lean_object*); -lean_object* l_List_map___main___at_Lean_findAtSearchPath___spec__3(lean_object*); -lean_object* l_Lean_normalizeModuleName___closed__1; -uint8_t l_String_isPrefixOf(lean_object*, lean_object*); -uint8_t lean_nat_dec_le(lean_object*, lean_object*); -lean_object* l_panic(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_addSearchPathFromEnv(lean_object*, lean_object*); -lean_object* l_Lean_getBuiltinSearchPath___closed__2; -lean_object* l_Lean_getBuiltinSearchPath___closed__4; -lean_object* lean_nat_mul(lean_object*, lean_object*); -lean_object* l_Lean_mkSearchPathRef___closed__1; -lean_object* l_mkHashMap___at_Lean_mkSearchPathRef___spec__1(lean_object*); -lean_object* l_AssocList_find___main___at_Lean_findOLean___spec__2___boxed(lean_object*, lean_object*); -lean_object* lean_io_ref_set(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_parseSearchPath(lean_object*, lean_object*, lean_object*); -lean_object* l_List_foldlM___main___at_Lean_parseSearchPath___spec__7___closed__1; -lean_object* l_IO_appPath___at_Lean_getBuiltinSearchPath___spec__2(lean_object*); -lean_object* l_IO_isDir___at_Lean_getBuiltinSearchPath___spec__3(lean_object*, lean_object*); -lean_object* lean_mk_array(lean_object*, lean_object*); -lean_object* l_List_foldlM___main___at_Lean_parseSearchPath___spec__7___closed__3; -lean_object* lean_string_length(lean_object*); -lean_object* l_AssocList_foldlM___main___at_Lean_findAtSearchPath___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_modPathToFilePath(lean_object*); -lean_object* lean_io_app_dir(lean_object*); -lean_object* l_Lean_splitAtRoot___main___closed__1; -lean_object* l_String_drop(lean_object*, lean_object*); -lean_object* l_Lean_splitAtRoot___main(lean_object*); -extern lean_object* l_HashMap_Inhabited___closed__1; -lean_object* l_Lean_getBuiltinSearchPath___closed__3; -extern lean_object* l_String_Inhabited; -lean_object* l_Lean_splitAtRoot___main___closed__2; -lean_object* lean_normalize_module_name(lean_object*); -size_t lean_string_hash(lean_object*); -lean_object* l_IO_realPath___at_Lean_realPathNormalized___spec__1(lean_object*, lean_object*); -lean_object* l_Array_iterateMAux___main___at_Lean_findAtSearchPath___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -uint8_t lean_string_dec_eq(lean_object*, lean_object*); -uint8_t lean_nat_dec_lt(lean_object*, lean_object*); -uint8_t l_AssocList_contains___main___at_Lean_parseSearchPath___spec__2(lean_object*, lean_object*); -lean_object* _init_l___private_Init_Lean_Path_1__pathSep___closed__1() { -_start: -{ -lean_object* x_1; uint32_t x_2; lean_object* x_3; -x_1 = l_String_splitAux___main___closed__1; -x_2 = l_System_FilePath_pathSeparator; -x_3 = lean_string_push(x_1, x_2); -return x_3; -} -} -lean_object* _init_l___private_Init_Lean_Path_1__pathSep() { -_start: -{ -lean_object* x_1; -x_1 = l___private_Init_Lean_Path_1__pathSep___closed__1; -return x_1; -} -} -lean_object* l_IO_realPath___at_Lean_realPathNormalized___spec__1(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = lean_io_realpath(x_1, x_2); -return x_3; -} -} -lean_object* l_Lean_realPathNormalized(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = lean_io_realpath(x_1, x_2); -if (lean_obj_tag(x_3) == 0) -{ -uint8_t x_4; -x_4 = !lean_is_exclusive(x_3); -if (x_4 == 0) -{ -lean_object* x_5; lean_object* x_6; -x_5 = lean_ctor_get(x_3, 0); -x_6 = l_System_FilePath_normalizePath(x_5); -lean_ctor_set(x_3, 0, x_6); -return x_3; -} -else -{ -lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; -x_7 = lean_ctor_get(x_3, 0); -x_8 = lean_ctor_get(x_3, 1); -lean_inc(x_8); -lean_inc(x_7); -lean_dec(x_3); -x_9 = l_System_FilePath_normalizePath(x_7); -x_10 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_10, 0, x_9); -lean_ctor_set(x_10, 1, x_8); -return x_10; -} -} -else -{ -uint8_t x_11; -x_11 = !lean_is_exclusive(x_3); -if (x_11 == 0) -{ -return x_3; -} -else -{ -lean_object* x_12; lean_object* x_13; lean_object* x_14; -x_12 = lean_ctor_get(x_3, 0); -x_13 = lean_ctor_get(x_3, 1); -lean_inc(x_13); -lean_inc(x_12); -lean_dec(x_3); -x_14 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_14, 0, x_12); -lean_ctor_set(x_14, 1, x_13); -return x_14; -} -} -} -} -lean_object* l_mkHashMap___at_Lean_mkSearchPathRef___spec__1(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = l_mkHashMapImp___rarg(x_1); -return x_2; -} -} -lean_object* _init_l_Lean_mkSearchPathRef___closed__1() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = lean_unsigned_to_nat(8u); -x_2 = l_mkHashMapImp___rarg(x_1); -return x_2; -} -} -lean_object* l_Lean_mkSearchPathRef(lean_object* x_1) { -_start: -{ -lean_object* x_2; lean_object* x_3; -x_2 = l_Lean_mkSearchPathRef___closed__1; -x_3 = lean_io_mk_ref(x_2, x_1); -return x_3; -} -} -uint8_t l_AssocList_contains___main___at_Lean_parseSearchPath___spec__2(lean_object* x_1, lean_object* x_2) { -_start: -{ -if (lean_obj_tag(x_2) == 0) -{ -uint8_t x_3; -x_3 = 0; -return x_3; -} -else -{ -lean_object* x_4; lean_object* x_5; uint8_t x_6; -x_4 = lean_ctor_get(x_2, 0); -x_5 = lean_ctor_get(x_2, 2); -x_6 = lean_string_dec_eq(x_4, x_1); -if (x_6 == 0) -{ -x_2 = x_5; -goto _start; -} -else -{ -uint8_t x_8; -x_8 = 1; -return x_8; -} -} -} -} -lean_object* l_AssocList_foldlM___main___at_Lean_parseSearchPath___spec__5(lean_object* x_1, lean_object* x_2) { -_start: -{ -if (lean_obj_tag(x_2) == 0) -{ -return x_1; -} -else -{ -uint8_t x_3; -x_3 = !lean_is_exclusive(x_2); -if (x_3 == 0) -{ -lean_object* x_4; lean_object* x_5; lean_object* x_6; size_t x_7; size_t x_8; lean_object* x_9; lean_object* x_10; -x_4 = lean_ctor_get(x_2, 0); -x_5 = lean_ctor_get(x_2, 2); -x_6 = lean_array_get_size(x_1); -lean_inc(x_4); -x_7 = lean_string_hash(x_4); -x_8 = lean_usize_modn(x_7, x_6); -lean_dec(x_6); -x_9 = lean_array_uget(x_1, x_8); -lean_ctor_set(x_2, 2, x_9); -x_10 = lean_array_uset(x_1, x_8, x_2); -x_1 = x_10; -x_2 = x_5; -goto _start; -} -else -{ -lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; size_t x_16; size_t x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; -x_12 = lean_ctor_get(x_2, 0); -x_13 = lean_ctor_get(x_2, 1); -x_14 = lean_ctor_get(x_2, 2); -lean_inc(x_14); -lean_inc(x_13); -lean_inc(x_12); -lean_dec(x_2); -x_15 = lean_array_get_size(x_1); -lean_inc(x_12); -x_16 = lean_string_hash(x_12); -x_17 = lean_usize_modn(x_16, x_15); -lean_dec(x_15); -x_18 = lean_array_uget(x_1, x_17); -x_19 = lean_alloc_ctor(1, 3, 0); -lean_ctor_set(x_19, 0, x_12); -lean_ctor_set(x_19, 1, x_13); -lean_ctor_set(x_19, 2, x_18); -x_20 = lean_array_uset(x_1, x_17, x_19); -x_1 = x_20; -x_2 = x_14; -goto _start; -} -} -} -} -lean_object* l_HashMapImp_moveEntries___main___at_Lean_parseSearchPath___spec__4(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; uint8_t x_5; -x_4 = lean_array_get_size(x_2); -x_5 = lean_nat_dec_lt(x_1, x_4); -lean_dec(x_4); -if (x_5 == 0) -{ -lean_dec(x_2); -lean_dec(x_1); -return x_3; -} -else -{ -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_array_fget(x_2, x_1); -x_7 = lean_box(0); -x_8 = lean_array_fset(x_2, x_1, x_7); -x_9 = l_AssocList_foldlM___main___at_Lean_parseSearchPath___spec__5(x_3, x_6); -x_10 = lean_unsigned_to_nat(1u); -x_11 = lean_nat_add(x_1, x_10); -lean_dec(x_1); -x_1 = x_11; -x_2 = x_8; -x_3 = x_9; -goto _start; -} -} -} -lean_object* l_HashMapImp_expand___at_Lean_parseSearchPath___spec__3(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; lean_object* x_9; lean_object* x_10; -x_3 = lean_array_get_size(x_2); -x_4 = lean_unsigned_to_nat(2u); -x_5 = lean_nat_mul(x_3, x_4); -lean_dec(x_3); -x_6 = lean_box(0); -x_7 = lean_mk_array(x_5, x_6); -x_8 = lean_unsigned_to_nat(0u); -x_9 = l_HashMapImp_moveEntries___main___at_Lean_parseSearchPath___spec__4(x_8, x_2, x_7); -x_10 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_10, 0, x_1); -lean_ctor_set(x_10, 1, x_9); -return x_10; -} -} -lean_object* l_AssocList_replace___main___at_Lean_parseSearchPath___spec__6(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -if (lean_obj_tag(x_3) == 0) -{ -lean_dec(x_2); -lean_dec(x_1); -return x_3; -} -else -{ -uint8_t x_4; -x_4 = !lean_is_exclusive(x_3); -if (x_4 == 0) -{ -lean_object* x_5; lean_object* x_6; lean_object* x_7; uint8_t x_8; -x_5 = lean_ctor_get(x_3, 0); -x_6 = lean_ctor_get(x_3, 1); -x_7 = lean_ctor_get(x_3, 2); -x_8 = lean_string_dec_eq(x_5, x_1); -if (x_8 == 0) -{ -lean_object* x_9; -x_9 = l_AssocList_replace___main___at_Lean_parseSearchPath___spec__6(x_1, x_2, x_7); -lean_ctor_set(x_3, 2, x_9); -return x_3; -} -else -{ -lean_dec(x_6); -lean_dec(x_5); -lean_ctor_set(x_3, 1, x_2); -lean_ctor_set(x_3, 0, x_1); -return x_3; -} -} -else -{ -lean_object* x_10; lean_object* x_11; lean_object* x_12; uint8_t x_13; -x_10 = lean_ctor_get(x_3, 0); -x_11 = lean_ctor_get(x_3, 1); -x_12 = lean_ctor_get(x_3, 2); -lean_inc(x_12); -lean_inc(x_11); -lean_inc(x_10); -lean_dec(x_3); -x_13 = lean_string_dec_eq(x_10, x_1); -if (x_13 == 0) -{ -lean_object* x_14; lean_object* x_15; -x_14 = l_AssocList_replace___main___at_Lean_parseSearchPath___spec__6(x_1, x_2, x_12); -x_15 = lean_alloc_ctor(1, 3, 0); -lean_ctor_set(x_15, 0, x_10); -lean_ctor_set(x_15, 1, x_11); -lean_ctor_set(x_15, 2, x_14); -return x_15; -} -else -{ -lean_object* x_16; -lean_dec(x_11); -lean_dec(x_10); -x_16 = lean_alloc_ctor(1, 3, 0); -lean_ctor_set(x_16, 0, x_1); -lean_ctor_set(x_16, 1, x_2); -lean_ctor_set(x_16, 2, x_12); -return x_16; -} -} -} -} -} -lean_object* l_HashMapImp_insert___at_Lean_parseSearchPath___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -uint8_t x_4; -x_4 = !lean_is_exclusive(x_1); -if (x_4 == 0) -{ -lean_object* x_5; lean_object* x_6; lean_object* x_7; size_t x_8; size_t x_9; lean_object* x_10; uint8_t x_11; -x_5 = lean_ctor_get(x_1, 0); -x_6 = lean_ctor_get(x_1, 1); -x_7 = lean_array_get_size(x_6); -lean_inc(x_2); -x_8 = lean_string_hash(x_2); -x_9 = lean_usize_modn(x_8, x_7); -x_10 = lean_array_uget(x_6, x_9); -x_11 = l_AssocList_contains___main___at_Lean_parseSearchPath___spec__2(x_2, x_10); -if (x_11 == 0) -{ -lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; uint8_t x_16; -x_12 = lean_unsigned_to_nat(1u); -x_13 = lean_nat_add(x_5, x_12); -lean_dec(x_5); -x_14 = lean_alloc_ctor(1, 3, 0); -lean_ctor_set(x_14, 0, x_2); -lean_ctor_set(x_14, 1, x_3); -lean_ctor_set(x_14, 2, x_10); -x_15 = lean_array_uset(x_6, x_9, x_14); -x_16 = lean_nat_dec_le(x_13, x_7); -lean_dec(x_7); -if (x_16 == 0) -{ -lean_object* x_17; -lean_free_object(x_1); -x_17 = l_HashMapImp_expand___at_Lean_parseSearchPath___spec__3(x_13, x_15); -return x_17; -} -else -{ -lean_ctor_set(x_1, 1, x_15); -lean_ctor_set(x_1, 0, x_13); -return x_1; -} -} -else -{ -lean_object* x_18; lean_object* x_19; -lean_dec(x_7); -x_18 = l_AssocList_replace___main___at_Lean_parseSearchPath___spec__6(x_2, x_3, x_10); -x_19 = lean_array_uset(x_6, x_9, x_18); -lean_ctor_set(x_1, 1, x_19); -return x_1; -} -} -else -{ -lean_object* x_20; lean_object* x_21; lean_object* x_22; size_t x_23; size_t x_24; lean_object* x_25; uint8_t x_26; -x_20 = lean_ctor_get(x_1, 0); -x_21 = lean_ctor_get(x_1, 1); -lean_inc(x_21); -lean_inc(x_20); -lean_dec(x_1); -x_22 = lean_array_get_size(x_21); -lean_inc(x_2); -x_23 = lean_string_hash(x_2); -x_24 = lean_usize_modn(x_23, x_22); -x_25 = lean_array_uget(x_21, x_24); -x_26 = l_AssocList_contains___main___at_Lean_parseSearchPath___spec__2(x_2, x_25); -if (x_26 == 0) -{ -lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; uint8_t x_31; -x_27 = lean_unsigned_to_nat(1u); -x_28 = lean_nat_add(x_20, x_27); -lean_dec(x_20); -x_29 = lean_alloc_ctor(1, 3, 0); -lean_ctor_set(x_29, 0, x_2); -lean_ctor_set(x_29, 1, x_3); -lean_ctor_set(x_29, 2, x_25); -x_30 = lean_array_uset(x_21, x_24, x_29); -x_31 = lean_nat_dec_le(x_28, x_22); -lean_dec(x_22); -if (x_31 == 0) -{ -lean_object* x_32; -x_32 = l_HashMapImp_expand___at_Lean_parseSearchPath___spec__3(x_28, x_30); -return x_32; -} -else -{ -lean_object* x_33; -x_33 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_33, 0, x_28); -lean_ctor_set(x_33, 1, x_30); -return x_33; -} -} -else -{ -lean_object* x_34; lean_object* x_35; lean_object* x_36; -lean_dec(x_22); -x_34 = l_AssocList_replace___main___at_Lean_parseSearchPath___spec__6(x_2, x_3, x_25); -x_35 = lean_array_uset(x_21, x_24, x_34); -x_36 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_36, 0, x_20); -lean_ctor_set(x_36, 1, x_35); -return x_36; -} -} -} -} -lean_object* _init_l_List_foldlM___main___at_Lean_parseSearchPath___spec__7___closed__1() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string("ill-formed search path entry '"); -return x_1; -} -} -lean_object* _init_l_List_foldlM___main___at_Lean_parseSearchPath___spec__7___closed__2() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string("', should be of form 'pkg=path'"); -return x_1; -} -} -lean_object* _init_l_List_foldlM___main___at_Lean_parseSearchPath___spec__7___closed__3() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string("="); -return x_1; -} -} -lean_object* l_List_foldlM___main___at_Lean_parseSearchPath___spec__7(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -if (lean_obj_tag(x_2) == 0) -{ -lean_object* x_4; -x_4 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_4, 0, x_1); -lean_ctor_set(x_4, 1, x_3); -return x_4; -} -else -{ -lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_14; lean_object* x_15; -x_5 = lean_ctor_get(x_2, 0); -lean_inc(x_5); -x_6 = lean_ctor_get(x_2, 1); -lean_inc(x_6); -lean_dec(x_2); -x_14 = l_List_foldlM___main___at_Lean_parseSearchPath___spec__7___closed__3; -lean_inc(x_5); -x_15 = l_String_splitOn(x_5, x_14); -if (lean_obj_tag(x_15) == 0) -{ -lean_object* x_16; -lean_dec(x_6); -lean_dec(x_1); -x_16 = lean_box(0); -x_7 = x_16; -goto block_13; -} -else -{ -lean_object* x_17; -x_17 = lean_ctor_get(x_15, 1); -lean_inc(x_17); -if (lean_obj_tag(x_17) == 0) -{ -lean_object* x_18; -lean_dec(x_15); -lean_dec(x_6); -lean_dec(x_1); -x_18 = lean_box(0); -x_7 = x_18; -goto block_13; -} -else -{ -lean_object* x_19; -x_19 = lean_ctor_get(x_17, 1); -lean_inc(x_19); -if (lean_obj_tag(x_19) == 0) -{ -lean_object* x_20; lean_object* x_21; lean_object* x_22; -lean_dec(x_5); -x_20 = lean_ctor_get(x_15, 0); -lean_inc(x_20); -lean_dec(x_15); -x_21 = lean_ctor_get(x_17, 0); -lean_inc(x_21); -lean_dec(x_17); -x_22 = l_HashMapImp_insert___at_Lean_parseSearchPath___spec__1(x_1, x_20, x_21); -x_1 = x_22; -x_2 = x_6; -goto _start; -} -else -{ -lean_object* x_24; -lean_dec(x_19); -lean_dec(x_17); -lean_dec(x_15); -lean_dec(x_6); -lean_dec(x_1); -x_24 = lean_box(0); -x_7 = x_24; -goto block_13; -} -} -} -block_13: -{ -lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; -lean_dec(x_7); -x_8 = l_List_foldlM___main___at_Lean_parseSearchPath___spec__7___closed__1; -x_9 = lean_string_append(x_8, x_5); -lean_dec(x_5); -x_10 = l_List_foldlM___main___at_Lean_parseSearchPath___spec__7___closed__2; -x_11 = lean_string_append(x_9, x_10); -x_12 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_12, 0, x_11); -lean_ctor_set(x_12, 1, x_3); -return x_12; -} -} -} -} -lean_object* l_Lean_parseSearchPath(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; lean_object* x_5; -x_4 = l_String_split___at_System_FilePath_splitSearchPath___spec__2(x_1); -x_5 = l_List_foldlM___main___at_Lean_parseSearchPath___spec__7(x_2, x_4, x_3); -if (lean_obj_tag(x_5) == 0) -{ -uint8_t x_6; -x_6 = !lean_is_exclusive(x_5); -if (x_6 == 0) -{ -return x_5; -} -else -{ -lean_object* x_7; lean_object* x_8; lean_object* x_9; -x_7 = lean_ctor_get(x_5, 0); -x_8 = lean_ctor_get(x_5, 1); -lean_inc(x_8); -lean_inc(x_7); -lean_dec(x_5); -x_9 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_9, 0, x_7); -lean_ctor_set(x_9, 1, x_8); -return x_9; -} -} -else -{ -uint8_t x_10; -x_10 = !lean_is_exclusive(x_5); -if (x_10 == 0) -{ -return x_5; -} -else -{ -lean_object* x_11; lean_object* x_12; lean_object* x_13; -x_11 = lean_ctor_get(x_5, 0); -x_12 = lean_ctor_get(x_5, 1); -lean_inc(x_12); -lean_inc(x_11); -lean_dec(x_5); -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_object* l_AssocList_contains___main___at_Lean_parseSearchPath___spec__2___boxed(lean_object* x_1, lean_object* x_2) { -_start: -{ -uint8_t x_3; lean_object* x_4; -x_3 = l_AssocList_contains___main___at_Lean_parseSearchPath___spec__2(x_1, x_2); -lean_dec(x_2); -lean_dec(x_1); -x_4 = lean_box(x_3); -return x_4; -} -} -lean_object* l_Lean_parseSearchPath___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; -x_4 = l_Lean_parseSearchPath(x_1, x_2, x_3); -lean_dec(x_1); -return x_4; -} -} -lean_object* l_IO_appPath___at_Lean_getBuiltinSearchPath___spec__2(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_io_app_dir(x_1); -return x_2; -} -} -lean_object* l_IO_appDir___at_Lean_getBuiltinSearchPath___spec__1(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_io_app_dir(x_1); -if (lean_obj_tag(x_2) == 0) -{ -lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; -x_3 = lean_ctor_get(x_2, 0); -lean_inc(x_3); -x_4 = lean_ctor_get(x_2, 1); -lean_inc(x_4); -lean_dec(x_2); -x_5 = l_System_FilePath_dirName(x_3); -x_6 = lean_io_realpath(x_5, x_4); -return x_6; -} -else -{ -uint8_t x_7; -x_7 = !lean_is_exclusive(x_2); -if (x_7 == 0) -{ -return x_2; -} -else -{ -lean_object* x_8; lean_object* x_9; lean_object* x_10; -x_8 = lean_ctor_get(x_2, 0); -x_9 = lean_ctor_get(x_2, 1); -lean_inc(x_9); -lean_inc(x_8); -lean_dec(x_2); -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_isDir___at_Lean_getBuiltinSearchPath___spec__3(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = lean_io_is_dir(x_1, x_2); -return x_3; -} -} -lean_object* _init_l_Lean_getBuiltinSearchPath___closed__1() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string(".."); -return x_1; -} -} -lean_object* _init_l_Lean_getBuiltinSearchPath___closed__2() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string("src"); -return x_1; -} -} -lean_object* _init_l_Lean_getBuiltinSearchPath___closed__3() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string("Init"); -return x_1; -} -} -lean_object* _init_l_Lean_getBuiltinSearchPath___closed__4() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string("lib"); -return x_1; -} -} -lean_object* _init_l_Lean_getBuiltinSearchPath___closed__5() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string("lean"); -return x_1; -} -} -lean_object* _init_l_Lean_getBuiltinSearchPath___closed__6() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string("library"); -return x_1; -} -} -lean_object* l_Lean_getBuiltinSearchPath(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = l_IO_appDir___at_Lean_getBuiltinSearchPath___spec__1(x_1); -if (lean_obj_tag(x_2) == 0) -{ -lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; -x_3 = lean_ctor_get(x_2, 0); -lean_inc(x_3); -x_4 = lean_ctor_get(x_2, 1); -lean_inc(x_4); -lean_dec(x_2); -x_5 = l___private_Init_Lean_Path_1__pathSep; -x_6 = lean_string_append(x_3, x_5); -x_7 = l_Lean_getBuiltinSearchPath___closed__1; -x_8 = lean_string_append(x_6, x_7); -x_9 = lean_string_append(x_8, x_5); -x_10 = l_Lean_getBuiltinSearchPath___closed__2; -lean_inc(x_9); -x_11 = lean_string_append(x_9, x_10); -x_12 = lean_string_append(x_11, x_5); -x_13 = l_Lean_getBuiltinSearchPath___closed__3; -x_14 = lean_string_append(x_12, x_13); -x_15 = lean_io_is_dir(x_14, x_4); -if (lean_obj_tag(x_15) == 0) -{ -lean_object* x_16; uint8_t x_17; -x_16 = lean_ctor_get(x_15, 0); -lean_inc(x_16); -x_17 = lean_unbox(x_16); -lean_dec(x_16); -if (x_17 == 0) -{ -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_dec(x_14); -x_18 = lean_ctor_get(x_15, 1); -lean_inc(x_18); -lean_dec(x_15); -x_19 = l_Lean_getBuiltinSearchPath___closed__4; -x_20 = lean_string_append(x_9, x_19); -x_21 = lean_string_append(x_20, x_5); -x_22 = l_Lean_getBuiltinSearchPath___closed__5; -x_23 = lean_string_append(x_21, x_22); -x_24 = lean_string_append(x_23, x_5); -x_25 = l_Lean_getBuiltinSearchPath___closed__6; -x_26 = lean_string_append(x_24, x_25); -x_27 = lean_string_append(x_26, x_5); -x_28 = lean_string_append(x_27, x_13); -x_29 = lean_io_is_dir(x_28, x_18); -if (lean_obj_tag(x_29) == 0) -{ -lean_object* x_30; uint8_t x_31; -x_30 = lean_ctor_get(x_29, 0); -lean_inc(x_30); -x_31 = lean_unbox(x_30); -lean_dec(x_30); -if (x_31 == 0) -{ -uint8_t x_32; -lean_dec(x_28); -x_32 = !lean_is_exclusive(x_29); -if (x_32 == 0) -{ -lean_object* x_33; lean_object* x_34; -x_33 = lean_ctor_get(x_29, 0); -lean_dec(x_33); -x_34 = l_HashMap_Inhabited___closed__1; -lean_ctor_set(x_29, 0, x_34); -return x_29; -} -else -{ -lean_object* x_35; lean_object* x_36; lean_object* x_37; -x_35 = lean_ctor_get(x_29, 1); -lean_inc(x_35); -lean_dec(x_29); -x_36 = l_HashMap_Inhabited___closed__1; -x_37 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_37, 0, x_36); -lean_ctor_set(x_37, 1, x_35); -return x_37; -} -} -else -{ -lean_object* x_38; lean_object* x_39; -x_38 = lean_ctor_get(x_29, 1); -lean_inc(x_38); -lean_dec(x_29); -x_39 = l_Lean_realPathNormalized(x_28, x_38); -if (lean_obj_tag(x_39) == 0) -{ -uint8_t x_40; -x_40 = !lean_is_exclusive(x_39); -if (x_40 == 0) -{ -lean_object* x_41; lean_object* x_42; lean_object* x_43; -x_41 = lean_ctor_get(x_39, 0); -x_42 = l_HashMap_Inhabited___closed__1; -x_43 = l_HashMapImp_insert___at_Lean_parseSearchPath___spec__1(x_42, x_13, x_41); -lean_ctor_set(x_39, 0, x_43); -return x_39; -} -else -{ -lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; -x_44 = lean_ctor_get(x_39, 0); -x_45 = lean_ctor_get(x_39, 1); -lean_inc(x_45); -lean_inc(x_44); -lean_dec(x_39); -x_46 = l_HashMap_Inhabited___closed__1; -x_47 = l_HashMapImp_insert___at_Lean_parseSearchPath___spec__1(x_46, x_13, x_44); -x_48 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_48, 0, x_47); -lean_ctor_set(x_48, 1, x_45); -return x_48; -} -} -else -{ -uint8_t x_49; -x_49 = !lean_is_exclusive(x_39); -if (x_49 == 0) -{ -return x_39; -} -else -{ -lean_object* x_50; lean_object* x_51; lean_object* x_52; -x_50 = lean_ctor_get(x_39, 0); -x_51 = lean_ctor_get(x_39, 1); -lean_inc(x_51); -lean_inc(x_50); -lean_dec(x_39); -x_52 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_52, 0, x_50); -lean_ctor_set(x_52, 1, x_51); -return x_52; -} -} -} -} -else -{ -uint8_t x_53; -lean_dec(x_28); -x_53 = !lean_is_exclusive(x_29); -if (x_53 == 0) -{ -return x_29; -} -else -{ -lean_object* x_54; lean_object* x_55; lean_object* x_56; -x_54 = lean_ctor_get(x_29, 0); -x_55 = lean_ctor_get(x_29, 1); -lean_inc(x_55); -lean_inc(x_54); -lean_dec(x_29); -x_56 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_56, 0, x_54); -lean_ctor_set(x_56, 1, x_55); -return x_56; -} -} -} -else -{ -lean_object* x_57; lean_object* x_58; -lean_dec(x_9); -x_57 = lean_ctor_get(x_15, 1); -lean_inc(x_57); -lean_dec(x_15); -x_58 = l_Lean_realPathNormalized(x_14, x_57); -if (lean_obj_tag(x_58) == 0) -{ -uint8_t x_59; -x_59 = !lean_is_exclusive(x_58); -if (x_59 == 0) -{ -lean_object* x_60; lean_object* x_61; lean_object* x_62; -x_60 = lean_ctor_get(x_58, 0); -x_61 = l_HashMap_Inhabited___closed__1; -x_62 = l_HashMapImp_insert___at_Lean_parseSearchPath___spec__1(x_61, x_13, x_60); -lean_ctor_set(x_58, 0, x_62); -return x_58; -} -else -{ -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_58, 0); -x_64 = lean_ctor_get(x_58, 1); -lean_inc(x_64); -lean_inc(x_63); -lean_dec(x_58); -x_65 = l_HashMap_Inhabited___closed__1; -x_66 = l_HashMapImp_insert___at_Lean_parseSearchPath___spec__1(x_65, x_13, x_63); -x_67 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_67, 0, x_66); -lean_ctor_set(x_67, 1, x_64); -return x_67; -} -} -else -{ -uint8_t x_68; -x_68 = !lean_is_exclusive(x_58); -if (x_68 == 0) -{ -return x_58; -} -else -{ -lean_object* x_69; lean_object* x_70; lean_object* x_71; -x_69 = lean_ctor_get(x_58, 0); -x_70 = lean_ctor_get(x_58, 1); -lean_inc(x_70); -lean_inc(x_69); -lean_dec(x_58); -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 -{ -uint8_t x_72; -lean_dec(x_14); -lean_dec(x_9); -x_72 = !lean_is_exclusive(x_15); -if (x_72 == 0) -{ -return x_15; -} -else -{ -lean_object* x_73; lean_object* x_74; lean_object* x_75; -x_73 = lean_ctor_get(x_15, 0); -x_74 = lean_ctor_get(x_15, 1); -lean_inc(x_74); -lean_inc(x_73); -lean_dec(x_15); -x_75 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_75, 0, x_73); -lean_ctor_set(x_75, 1, x_74); -return x_75; -} -} -} -else -{ -uint8_t x_76; -x_76 = !lean_is_exclusive(x_2); -if (x_76 == 0) -{ -return x_2; -} -else -{ -lean_object* x_77; lean_object* x_78; lean_object* x_79; -x_77 = lean_ctor_get(x_2, 0); -x_78 = lean_ctor_get(x_2, 1); -lean_inc(x_78); -lean_inc(x_77); -lean_dec(x_2); -x_79 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_79, 0, x_77); -lean_ctor_set(x_79, 1, x_78); -return x_79; -} -} -} -} -lean_object* l_IO_isDir___at_Lean_getBuiltinSearchPath___spec__3___boxed(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = l_IO_isDir___at_Lean_getBuiltinSearchPath___spec__3(x_1, x_2); -lean_dec(x_1); -return x_3; -} -} -lean_object* l_IO_getEnv___at_Lean_addSearchPathFromEnv___spec__1(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = lean_io_getenv(x_1, x_2); -return x_3; -} -} -lean_object* _init_l_Lean_addSearchPathFromEnv___closed__1() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string("LEAN_PATH"); -return x_1; -} -} -lean_object* l_Lean_addSearchPathFromEnv(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; lean_object* x_4; -x_3 = l_Lean_addSearchPathFromEnv___closed__1; -x_4 = lean_io_getenv(x_3, x_2); -if (lean_obj_tag(x_4) == 0) -{ -lean_object* x_5; -x_5 = lean_ctor_get(x_4, 0); -lean_inc(x_5); -if (lean_obj_tag(x_5) == 0) -{ -uint8_t x_6; -x_6 = !lean_is_exclusive(x_4); -if (x_6 == 0) -{ -lean_object* x_7; -x_7 = lean_ctor_get(x_4, 0); -lean_dec(x_7); -lean_ctor_set(x_4, 0, x_1); -return x_4; -} -else -{ -lean_object* x_8; lean_object* x_9; -x_8 = lean_ctor_get(x_4, 1); -lean_inc(x_8); -lean_dec(x_4); -x_9 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_9, 0, x_1); -lean_ctor_set(x_9, 1, x_8); -return x_9; -} -} -else -{ -lean_object* x_10; lean_object* x_11; lean_object* x_12; -x_10 = lean_ctor_get(x_4, 1); -lean_inc(x_10); -lean_dec(x_4); -x_11 = lean_ctor_get(x_5, 0); -lean_inc(x_11); -lean_dec(x_5); -x_12 = l_Lean_parseSearchPath(x_11, x_1, x_10); -lean_dec(x_11); -return x_12; -} -} -else -{ -uint8_t x_13; -lean_dec(x_1); -x_13 = !lean_is_exclusive(x_4); -if (x_13 == 0) -{ -return x_4; -} -else -{ -lean_object* x_14; lean_object* x_15; lean_object* x_16; -x_14 = lean_ctor_get(x_4, 0); -x_15 = lean_ctor_get(x_4, 1); -lean_inc(x_15); -lean_inc(x_14); -lean_dec(x_4); -x_16 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_16, 0, x_14); -lean_ctor_set(x_16, 1, x_15); -return x_16; -} -} -} -} -lean_object* l_IO_getEnv___at_Lean_addSearchPathFromEnv___spec__1___boxed(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = l_IO_getEnv___at_Lean_addSearchPathFromEnv___spec__1(x_1, x_2); -lean_dec(x_1); -return x_3; -} -} -lean_object* lean_init_search_path(lean_object* x_1, lean_object* x_2) { -_start: -{ -if (lean_obj_tag(x_1) == 0) -{ -lean_object* x_3; -x_3 = l_Lean_getBuiltinSearchPath(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 = l_Lean_addSearchPathFromEnv(x_4, x_5); -if (lean_obj_tag(x_6) == 0) -{ -lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; -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_Lean_searchPathRef; -x_10 = lean_io_ref_set(x_9, x_7, x_8); -return x_10; -} -else -{ -uint8_t x_11; -x_11 = !lean_is_exclusive(x_6); -if (x_11 == 0) -{ -return x_6; -} -else -{ -lean_object* x_12; lean_object* x_13; lean_object* x_14; -x_12 = lean_ctor_get(x_6, 0); -x_13 = lean_ctor_get(x_6, 1); -lean_inc(x_13); -lean_inc(x_12); -lean_dec(x_6); -x_14 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_14, 0, x_12); -lean_ctor_set(x_14, 1, x_13); -return x_14; -} -} -} -else -{ -uint8_t x_15; -x_15 = !lean_is_exclusive(x_3); -if (x_15 == 0) -{ -return x_3; -} -else -{ -lean_object* x_16; lean_object* x_17; lean_object* x_18; -x_16 = lean_ctor_get(x_3, 0); -x_17 = lean_ctor_get(x_3, 1); -lean_inc(x_17); -lean_inc(x_16); -lean_dec(x_3); -x_18 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_18, 0, x_16); -lean_ctor_set(x_18, 1, x_17); -return x_18; -} -} -} -else -{ -lean_object* x_19; lean_object* x_20; lean_object* x_21; -x_19 = lean_ctor_get(x_1, 0); -lean_inc(x_19); -lean_dec(x_1); -x_20 = l_HashMap_Inhabited___closed__1; -x_21 = l_Lean_parseSearchPath(x_19, x_20, x_2); -lean_dec(x_19); -if (lean_obj_tag(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_21, 0); -lean_inc(x_22); -x_23 = lean_ctor_get(x_21, 1); -lean_inc(x_23); -lean_dec(x_21); -x_24 = l_Lean_searchPathRef; -x_25 = lean_io_ref_set(x_24, x_22, x_23); -return x_25; -} -else -{ -uint8_t x_26; -x_26 = !lean_is_exclusive(x_21); -if (x_26 == 0) -{ -return x_21; -} -else -{ -lean_object* x_27; lean_object* x_28; lean_object* x_29; -x_27 = lean_ctor_get(x_21, 0); -x_28 = lean_ctor_get(x_21, 1); -lean_inc(x_28); -lean_inc(x_27); -lean_dec(x_21); -x_29 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_29, 0, x_27); -lean_ctor_set(x_29, 1, x_28); -return x_29; -} -} -} -} -} -lean_object* _init_l_Lean_modPathToFilePath___main___closed__1() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string("Init.Lean.Path"); -return x_1; -} -} -lean_object* _init_l_Lean_modPathToFilePath___main___closed__2() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string("ill-formed import"); -return x_1; -} -} -lean_object* _init_l_Lean_modPathToFilePath___main___closed__3() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; -x_1 = l_Lean_modPathToFilePath___main___closed__1; -x_2 = lean_unsigned_to_nat(81u); -x_3 = lean_unsigned_to_nat(33u); -x_4 = l_Lean_modPathToFilePath___main___closed__2; -x_5 = l___private_Init_Util_1__mkPanicMessage(x_1, x_2, x_3, x_4); -return x_5; -} -} -lean_object* l_Lean_modPathToFilePath___main(lean_object* x_1) { -_start: -{ -switch (lean_obj_tag(x_1)) { -case 0: -{ -lean_object* x_2; -x_2 = l_String_splitAux___main___closed__1; -return x_2; -} -case 1: -{ -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); -if (lean_obj_tag(x_3) == 0) -{ -lean_inc(x_4); -return x_4; -} -else -{ -lean_object* x_11; -x_11 = lean_box(0); -x_5 = x_11; -goto block_10; -} -block_10: -{ -lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; -lean_dec(x_5); -x_6 = l_Lean_modPathToFilePath___main(x_3); -x_7 = l___private_Init_Lean_Path_1__pathSep; -x_8 = lean_string_append(x_6, x_7); -x_9 = lean_string_append(x_8, x_4); -return x_9; -} -} -default: -{ -lean_object* x_12; lean_object* x_13; lean_object* x_14; -x_12 = l_String_Inhabited; -x_13 = l_Lean_modPathToFilePath___main___closed__3; -x_14 = lean_panic_fn(x_13); -return x_14; -} -} -} -} -lean_object* l_Lean_modPathToFilePath___main___boxed(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = l_Lean_modPathToFilePath___main(x_1); -lean_dec(x_1); -return x_2; -} -} -lean_object* l_Lean_modPathToFilePath(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = l_Lean_modPathToFilePath___main(x_1); -return x_2; -} -} -lean_object* l_Lean_modPathToFilePath___boxed(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = l_Lean_modPathToFilePath(x_1); -lean_dec(x_1); -return x_2; -} -} -lean_object* _init_l_Lean_splitAtRoot___main___closed__1() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_String_Inhabited; -x_2 = l_Lean_Name_inhabited; -x_3 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_3, 0, x_1); -lean_ctor_set(x_3, 1, x_2); -return x_3; -} -} -lean_object* _init_l_Lean_splitAtRoot___main___closed__2() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; -x_1 = l_Lean_modPathToFilePath___main___closed__1; -x_2 = lean_unsigned_to_nat(89u); -x_3 = lean_unsigned_to_nat(20u); -x_4 = l_Lean_modPathToFilePath___main___closed__2; -x_5 = l___private_Init_Util_1__mkPanicMessage(x_1, x_2, x_3, x_4); -return x_5; -} -} -lean_object* l_Lean_splitAtRoot___main(lean_object* x_1) { -_start: -{ -if (lean_obj_tag(x_1) == 1) -{ -lean_object* x_2; lean_object* x_3; lean_object* x_4; -x_2 = lean_ctor_get(x_1, 0); -lean_inc(x_2); -x_3 = lean_ctor_get(x_1, 1); -lean_inc(x_3); -lean_dec(x_1); -if (lean_obj_tag(x_2) == 0) -{ -lean_object* x_14; -x_14 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_14, 0, x_3); -lean_ctor_set(x_14, 1, x_2); -return x_14; -} -else -{ -lean_object* x_15; -x_15 = lean_box(0); -x_4 = x_15; -goto block_13; -} -block_13: -{ -lean_object* x_5; uint8_t x_6; -lean_dec(x_4); -x_5 = l_Lean_splitAtRoot___main(x_2); -x_6 = !lean_is_exclusive(x_5); -if (x_6 == 0) -{ -lean_object* x_7; lean_object* x_8; -x_7 = lean_ctor_get(x_5, 1); -x_8 = lean_name_mk_string(x_7, x_3); -lean_ctor_set(x_5, 1, x_8); -return x_5; -} -else -{ -lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; -x_9 = lean_ctor_get(x_5, 0); -x_10 = lean_ctor_get(x_5, 1); -lean_inc(x_10); -lean_inc(x_9); -lean_dec(x_5); -x_11 = lean_name_mk_string(x_10, x_3); -x_12 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_12, 0, x_9); -lean_ctor_set(x_12, 1, x_11); -return x_12; -} -} -} -else -{ -lean_object* x_16; lean_object* x_17; lean_object* x_18; -lean_dec(x_1); -x_16 = l_Lean_splitAtRoot___main___closed__1; -x_17 = l_Lean_splitAtRoot___main___closed__2; -x_18 = lean_panic_fn(x_17); -return x_18; -} -} -} -lean_object* l_Lean_splitAtRoot(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = l_Lean_splitAtRoot___main(x_1); -return x_2; -} -} -lean_object* l_AssocList_find___main___at_Lean_findOLean___spec__2(lean_object* x_1, lean_object* x_2) { -_start: -{ -if (lean_obj_tag(x_2) == 0) -{ -lean_object* x_3; -x_3 = lean_box(0); -return x_3; -} -else -{ -lean_object* x_4; lean_object* x_5; lean_object* x_6; uint8_t x_7; -x_4 = lean_ctor_get(x_2, 0); -x_5 = lean_ctor_get(x_2, 1); -x_6 = lean_ctor_get(x_2, 2); -x_7 = lean_string_dec_eq(x_4, x_1); -if (x_7 == 0) -{ -x_2 = x_6; -goto _start; -} -else -{ -lean_object* x_9; -lean_inc(x_5); -x_9 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_9, 0, x_5); -return x_9; -} -} -} -} -lean_object* l_HashMapImp_find___at_Lean_findOLean___spec__1(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; lean_object* x_4; size_t x_5; size_t x_6; lean_object* x_7; lean_object* x_8; -x_3 = lean_ctor_get(x_1, 1); -x_4 = lean_array_get_size(x_3); -lean_inc(x_2); -x_5 = lean_string_hash(x_2); -x_6 = lean_usize_modn(x_5, x_4); -lean_dec(x_4); -x_7 = lean_array_uget(x_3, x_6); -x_8 = l_AssocList_find___main___at_Lean_findOLean___spec__2(x_2, x_7); -lean_dec(x_7); -lean_dec(x_2); -return x_8; -} -} -lean_object* _init_l_Lean_findOLean___closed__1() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string("unknown package '"); -return x_1; -} -} -lean_object* _init_l_Lean_findOLean___closed__2() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string(".olean"); -return x_1; -} -} -lean_object* l_Lean_findOLean(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; lean_object* x_4; -x_3 = l_Lean_searchPathRef; -x_4 = lean_io_ref_get(x_3, x_2); -if (lean_obj_tag(x_4) == 0) -{ -uint8_t x_5; -x_5 = !lean_is_exclusive(x_4); -if (x_5 == 0) -{ -lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; -x_6 = lean_ctor_get(x_4, 0); -x_7 = l_Lean_splitAtRoot___main(x_1); -x_8 = lean_ctor_get(x_7, 0); -lean_inc(x_8); -x_9 = lean_ctor_get(x_7, 1); -lean_inc(x_9); -lean_dec(x_7); -lean_inc(x_8); -x_10 = l_HashMapImp_find___at_Lean_findOLean___spec__1(x_6, x_8); -lean_dec(x_6); -if (lean_obj_tag(x_10) == 0) -{ -lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; -lean_dec(x_9); -x_11 = l_Lean_findOLean___closed__1; -x_12 = lean_string_append(x_11, x_8); -lean_dec(x_8); -x_13 = l_Char_HasRepr___closed__1; -x_14 = lean_string_append(x_12, x_13); -lean_ctor_set_tag(x_4, 1); -lean_ctor_set(x_4, 0, x_14); -return x_4; -} -else -{ -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_dec(x_8); -x_15 = lean_ctor_get(x_10, 0); -lean_inc(x_15); -lean_dec(x_10); -x_16 = l___private_Init_Lean_Path_1__pathSep; -x_17 = lean_string_append(x_15, x_16); -x_18 = l_Lean_modPathToFilePath___main(x_9); -lean_dec(x_9); -x_19 = lean_string_append(x_17, x_18); -lean_dec(x_18); -x_20 = l_Lean_findOLean___closed__2; -x_21 = lean_string_append(x_19, x_20); -lean_ctor_set(x_4, 0, x_21); -return x_4; -} -} -else -{ -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_4, 0); -x_23 = lean_ctor_get(x_4, 1); -lean_inc(x_23); -lean_inc(x_22); -lean_dec(x_4); -x_24 = l_Lean_splitAtRoot___main(x_1); -x_25 = lean_ctor_get(x_24, 0); -lean_inc(x_25); -x_26 = lean_ctor_get(x_24, 1); -lean_inc(x_26); -lean_dec(x_24); -lean_inc(x_25); -x_27 = l_HashMapImp_find___at_Lean_findOLean___spec__1(x_22, x_25); -lean_dec(x_22); -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; -lean_dec(x_26); -x_28 = l_Lean_findOLean___closed__1; -x_29 = lean_string_append(x_28, x_25); -lean_dec(x_25); -x_30 = l_Char_HasRepr___closed__1; -x_31 = lean_string_append(x_29, x_30); -x_32 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_32, 0, x_31); -lean_ctor_set(x_32, 1, x_23); -return x_32; -} -else -{ -lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; -lean_dec(x_25); -x_33 = lean_ctor_get(x_27, 0); -lean_inc(x_33); -lean_dec(x_27); -x_34 = l___private_Init_Lean_Path_1__pathSep; -x_35 = lean_string_append(x_33, x_34); -x_36 = l_Lean_modPathToFilePath___main(x_26); -lean_dec(x_26); -x_37 = lean_string_append(x_35, x_36); -lean_dec(x_36); -x_38 = l_Lean_findOLean___closed__2; -x_39 = lean_string_append(x_37, x_38); -x_40 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_40, 0, x_39); -lean_ctor_set(x_40, 1, x_23); -return x_40; -} -} -} -else -{ -uint8_t x_41; -lean_dec(x_1); -x_41 = !lean_is_exclusive(x_4); -if (x_41 == 0) -{ -return x_4; -} -else -{ -lean_object* x_42; lean_object* x_43; lean_object* x_44; -x_42 = lean_ctor_get(x_4, 0); -x_43 = lean_ctor_get(x_4, 1); -lean_inc(x_43); -lean_inc(x_42); -lean_dec(x_4); -x_44 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_44, 0, x_42); -lean_ctor_set(x_44, 1, x_43); -return x_44; -} -} -} -} -lean_object* l_AssocList_find___main___at_Lean_findOLean___spec__2___boxed(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = l_AssocList_find___main___at_Lean_findOLean___spec__2(x_1, x_2); -lean_dec(x_2); -lean_dec(x_1); -return x_3; -} -} -lean_object* l_HashMapImp_find___at_Lean_findOLean___spec__1___boxed(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = l_HashMapImp_find___at_Lean_findOLean___spec__1(x_1, x_2); -lean_dec(x_1); -return x_3; -} -} -lean_object* l_AssocList_foldlM___main___at_Lean_findAtSearchPath___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -if (lean_obj_tag(x_3) == 0) -{ -lean_object* x_5; -x_5 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_5, 0, x_2); -lean_ctor_set(x_5, 1, x_4); -return x_5; -} -else -{ -lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; -x_6 = lean_ctor_get(x_3, 0); -lean_inc(x_6); -x_7 = lean_ctor_get(x_3, 1); -lean_inc(x_7); -x_8 = lean_ctor_get(x_3, 2); -lean_inc(x_8); -lean_dec(x_3); -x_9 = l_Lean_realPathNormalized(x_7, x_4); -if (lean_obj_tag(x_9) == 0) -{ -lean_object* x_10; lean_object* x_11; uint8_t x_12; -x_10 = lean_ctor_get(x_9, 0); -lean_inc(x_10); -x_11 = lean_ctor_get(x_9, 1); -lean_inc(x_11); -lean_dec(x_9); -x_12 = l_String_isPrefixOf(x_10, x_1); -if (x_12 == 0) -{ -lean_dec(x_10); -lean_dec(x_6); -x_3 = x_8; -x_4 = x_11; -goto _start; -} -else -{ -lean_object* x_14; lean_object* x_15; -x_14 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_14, 0, x_6); -lean_ctor_set(x_14, 1, x_10); -x_15 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_15, 0, x_14); -lean_ctor_set(x_15, 1, x_2); -x_2 = x_15; -x_3 = x_8; -x_4 = x_11; -goto _start; -} -} -else -{ -uint8_t x_17; -lean_dec(x_8); -lean_dec(x_6); -lean_dec(x_2); -x_17 = !lean_is_exclusive(x_9); -if (x_17 == 0) -{ -return x_9; -} -else -{ -lean_object* x_18; lean_object* x_19; lean_object* x_20; -x_18 = lean_ctor_get(x_9, 0); -x_19 = lean_ctor_get(x_9, 1); -lean_inc(x_19); -lean_inc(x_18); -lean_dec(x_9); -x_20 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_20, 0, x_18); -lean_ctor_set(x_20, 1, x_19); -return x_20; -} -} -} -} -} -lean_object* l_Array_iterateMAux___main___at_Lean_findAtSearchPath___spec__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) { -_start: -{ -lean_object* x_7; uint8_t x_8; -x_7 = lean_array_get_size(x_3); -x_8 = lean_nat_dec_lt(x_4, x_7); -lean_dec(x_7); -if (x_8 == 0) -{ -lean_object* x_9; -lean_dec(x_4); -x_9 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_9, 0, x_5); -lean_ctor_set(x_9, 1, x_6); -return x_9; -} -else -{ -lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; -x_10 = lean_array_fget(x_3, x_4); -x_11 = lean_unsigned_to_nat(1u); -x_12 = lean_nat_add(x_4, x_11); -lean_dec(x_4); -x_13 = l_AssocList_foldlM___main___at_Lean_findAtSearchPath___spec__1(x_1, x_5, x_10, x_6); -if (lean_obj_tag(x_13) == 0) -{ -lean_object* x_14; lean_object* x_15; -x_14 = lean_ctor_get(x_13, 0); -lean_inc(x_14); -x_15 = lean_ctor_get(x_13, 1); -lean_inc(x_15); -lean_dec(x_13); -x_4 = x_12; -x_5 = x_14; -x_6 = x_15; -goto _start; -} -else -{ -uint8_t x_17; -lean_dec(x_12); -x_17 = !lean_is_exclusive(x_13); -if (x_17 == 0) -{ -return x_13; -} -else -{ -lean_object* x_18; lean_object* x_19; lean_object* x_20; -x_18 = lean_ctor_get(x_13, 0); -x_19 = lean_ctor_get(x_13, 1); -lean_inc(x_19); -lean_inc(x_18); -lean_dec(x_13); -x_20 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_20, 0, x_18); -lean_ctor_set(x_20, 1, x_19); -return x_20; -} -} -} -} -} -lean_object* l_List_map___main___at_Lean_findAtSearchPath___spec__3(lean_object* x_1) { -_start: -{ -if (lean_obj_tag(x_1) == 0) -{ -lean_object* x_2; -x_2 = lean_box(0); -return x_2; -} -else -{ -uint8_t x_3; -x_3 = !lean_is_exclusive(x_1); -if (x_3 == 0) -{ -lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; -x_4 = lean_ctor_get(x_1, 0); -x_5 = lean_ctor_get(x_1, 1); -x_6 = lean_ctor_get(x_4, 0); -lean_inc(x_6); -lean_dec(x_4); -x_7 = l_List_map___main___at_Lean_findAtSearchPath___spec__3(x_5); -lean_ctor_set(x_1, 1, x_7); -lean_ctor_set(x_1, 0, x_6); -return x_1; -} -else -{ -lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; -x_8 = lean_ctor_get(x_1, 0); -x_9 = lean_ctor_get(x_1, 1); -lean_inc(x_9); -lean_inc(x_8); -lean_dec(x_1); -x_10 = lean_ctor_get(x_8, 0); -lean_inc(x_10); -lean_dec(x_8); -x_11 = l_List_map___main___at_Lean_findAtSearchPath___spec__3(x_9); -x_12 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_12, 0, x_10); -lean_ctor_set(x_12, 1, x_11); -return x_12; -} -} -} -} -lean_object* _init_l_Lean_findAtSearchPath___closed__1() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string("file '"); -return x_1; -} -} -lean_object* _init_l_Lean_findAtSearchPath___closed__2() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string("' is contained in multiple packages: "); -return x_1; -} -} -lean_object* l_Lean_findAtSearchPath(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = l_Lean_realPathNormalized(x_1, x_2); -if (lean_obj_tag(x_3) == 0) -{ -lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; -x_4 = lean_ctor_get(x_3, 0); -lean_inc(x_4); -x_5 = lean_ctor_get(x_3, 1); -lean_inc(x_5); -lean_dec(x_3); -x_6 = l_Lean_searchPathRef; -x_7 = lean_io_ref_get(x_6, x_5); -if (lean_obj_tag(x_7) == 0) -{ -lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; -x_8 = lean_ctor_get(x_7, 0); -lean_inc(x_8); -x_9 = lean_ctor_get(x_7, 1); -lean_inc(x_9); -lean_dec(x_7); -x_10 = lean_box(0); -x_11 = lean_ctor_get(x_8, 1); -lean_inc(x_11); -x_12 = lean_unsigned_to_nat(0u); -x_13 = l_Array_iterateMAux___main___at_Lean_findAtSearchPath___spec__2(x_4, x_8, x_11, x_12, x_10, x_9); -lean_dec(x_11); -lean_dec(x_8); -if (lean_obj_tag(x_13) == 0) -{ -lean_object* x_14; -x_14 = lean_ctor_get(x_13, 0); -lean_inc(x_14); -if (lean_obj_tag(x_14) == 0) -{ -uint8_t x_15; -lean_dec(x_4); -x_15 = !lean_is_exclusive(x_13); -if (x_15 == 0) -{ -lean_object* x_16; lean_object* x_17; -x_16 = lean_ctor_get(x_13, 0); -lean_dec(x_16); -x_17 = lean_box(0); -lean_ctor_set(x_13, 0, x_17); -return x_13; -} -else -{ -lean_object* x_18; lean_object* x_19; lean_object* x_20; -x_18 = lean_ctor_get(x_13, 1); -lean_inc(x_18); -lean_dec(x_13); -x_19 = lean_box(0); -x_20 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_20, 0, x_19); -lean_ctor_set(x_20, 1, x_18); -return x_20; -} -} -else -{ -lean_object* x_21; -x_21 = lean_ctor_get(x_14, 1); -lean_inc(x_21); -if (lean_obj_tag(x_21) == 0) -{ -uint8_t x_22; -lean_dec(x_4); -x_22 = !lean_is_exclusive(x_13); -if (x_22 == 0) -{ -lean_object* x_23; lean_object* x_24; lean_object* x_25; -x_23 = lean_ctor_get(x_13, 0); -lean_dec(x_23); -x_24 = lean_ctor_get(x_14, 0); -lean_inc(x_24); -lean_dec(x_14); -x_25 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_25, 0, x_24); -lean_ctor_set(x_13, 0, x_25); -return x_13; -} -else -{ -lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; -x_26 = lean_ctor_get(x_13, 1); -lean_inc(x_26); -lean_dec(x_13); -x_27 = lean_ctor_get(x_14, 0); -lean_inc(x_27); -lean_dec(x_14); -x_28 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_28, 0, x_27); -x_29 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_29, 0, x_28); -lean_ctor_set(x_29, 1, x_26); -return x_29; -} -} -else -{ -uint8_t x_30; -lean_dec(x_21); -x_30 = !lean_is_exclusive(x_13); -if (x_30 == 0) -{ -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; -x_31 = lean_ctor_get(x_13, 0); -lean_dec(x_31); -x_32 = l_Lean_findAtSearchPath___closed__1; -x_33 = lean_string_append(x_32, x_4); -lean_dec(x_4); -x_34 = l_Lean_findAtSearchPath___closed__2; -x_35 = lean_string_append(x_33, x_34); -x_36 = l_List_map___main___at_Lean_findAtSearchPath___spec__3(x_14); -x_37 = l_List_reprAux___main___rarg___closed__1; -x_38 = l_String_intercalate(x_37, x_36); -x_39 = lean_string_append(x_35, x_38); -lean_dec(x_38); -lean_ctor_set_tag(x_13, 1); -lean_ctor_set(x_13, 0, x_39); -return x_13; -} -else -{ -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; -x_40 = lean_ctor_get(x_13, 1); -lean_inc(x_40); -lean_dec(x_13); -x_41 = l_Lean_findAtSearchPath___closed__1; -x_42 = lean_string_append(x_41, x_4); -lean_dec(x_4); -x_43 = l_Lean_findAtSearchPath___closed__2; -x_44 = lean_string_append(x_42, x_43); -x_45 = l_List_map___main___at_Lean_findAtSearchPath___spec__3(x_14); -x_46 = l_List_reprAux___main___rarg___closed__1; -x_47 = l_String_intercalate(x_46, x_45); -x_48 = lean_string_append(x_44, x_47); -lean_dec(x_47); -x_49 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_49, 0, x_48); -lean_ctor_set(x_49, 1, x_40); -return x_49; -} -} -} -} -else -{ -uint8_t x_50; -lean_dec(x_4); -x_50 = !lean_is_exclusive(x_13); -if (x_50 == 0) -{ -return x_13; -} -else -{ -lean_object* x_51; lean_object* x_52; lean_object* x_53; -x_51 = lean_ctor_get(x_13, 0); -x_52 = lean_ctor_get(x_13, 1); -lean_inc(x_52); -lean_inc(x_51); -lean_dec(x_13); -x_53 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_53, 0, x_51); -lean_ctor_set(x_53, 1, x_52); -return x_53; -} -} -} -else -{ -uint8_t x_54; -lean_dec(x_4); -x_54 = !lean_is_exclusive(x_7); -if (x_54 == 0) -{ -return x_7; -} -else -{ -lean_object* x_55; lean_object* x_56; lean_object* x_57; -x_55 = lean_ctor_get(x_7, 0); -x_56 = lean_ctor_get(x_7, 1); -lean_inc(x_56); -lean_inc(x_55); -lean_dec(x_7); -x_57 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_57, 0, x_55); -lean_ctor_set(x_57, 1, x_56); -return x_57; -} -} -} -else -{ -uint8_t x_58; -x_58 = !lean_is_exclusive(x_3); -if (x_58 == 0) -{ -return x_3; -} -else -{ -lean_object* x_59; lean_object* x_60; lean_object* x_61; -x_59 = lean_ctor_get(x_3, 0); -x_60 = lean_ctor_get(x_3, 1); -lean_inc(x_60); -lean_inc(x_59); -lean_dec(x_3); -x_61 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_61, 0, x_59); -lean_ctor_set(x_61, 1, x_60); -return x_61; -} -} -} -} -lean_object* l_AssocList_foldlM___main___at_Lean_findAtSearchPath___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_AssocList_foldlM___main___at_Lean_findAtSearchPath___spec__1(x_1, x_2, x_3, x_4); -lean_dec(x_1); -return x_5; -} -} -lean_object* l_Array_iterateMAux___main___at_Lean_findAtSearchPath___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { -_start: -{ -lean_object* x_7; -x_7 = l_Array_iterateMAux___main___at_Lean_findAtSearchPath___spec__2(x_1, x_2, x_3, x_4, x_5, x_6); -lean_dec(x_3); -lean_dec(x_2); -lean_dec(x_1); -return x_7; -} -} -lean_object* l_List_foldl___main___at_Lean_moduleNameOfFileName___spec__1(lean_object* x_1, lean_object* x_2) { -_start: -{ -if (lean_obj_tag(x_2) == 0) -{ -return x_1; -} -else -{ -lean_object* x_3; lean_object* x_4; lean_object* x_5; -x_3 = lean_ctor_get(x_2, 0); -lean_inc(x_3); -x_4 = lean_ctor_get(x_2, 1); -lean_inc(x_4); -lean_dec(x_2); -x_5 = lean_name_mk_string(x_1, x_3); -x_1 = x_5; -x_2 = x_4; -goto _start; -} -} -} -lean_object* _init_l_Lean_moduleNameOfFileName___closed__1() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string("failed to convert file '"); -return x_1; -} -} -lean_object* _init_l_Lean_moduleNameOfFileName___closed__2() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string("' to module name, extension is missing"); -return x_1; -} -} -lean_object* lean_module_name_of_file(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -lean_inc(x_1); -x_3 = l_Lean_findAtSearchPath(x_1, x_2); -if (lean_obj_tag(x_3) == 0) -{ -lean_object* x_4; -x_4 = lean_ctor_get(x_3, 0); -lean_inc(x_4); -if (lean_obj_tag(x_4) == 0) -{ -uint8_t x_5; -lean_dec(x_1); -x_5 = !lean_is_exclusive(x_3); -if (x_5 == 0) -{ -lean_object* x_6; lean_object* x_7; -x_6 = lean_ctor_get(x_3, 0); -lean_dec(x_6); -x_7 = lean_box(0); -lean_ctor_set(x_3, 0, x_7); -return x_3; -} -else -{ -lean_object* x_8; lean_object* x_9; lean_object* x_10; -x_8 = lean_ctor_get(x_3, 1); -lean_inc(x_8); -lean_dec(x_3); -x_9 = lean_box(0); -x_10 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_10, 0, x_9); -lean_ctor_set(x_10, 1, x_8); -return x_10; -} -} -else -{ -lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; -x_11 = lean_ctor_get(x_4, 0); -lean_inc(x_11); -lean_dec(x_4); -x_12 = lean_ctor_get(x_3, 1); -lean_inc(x_12); -lean_dec(x_3); -x_13 = lean_ctor_get(x_11, 0); -lean_inc(x_13); -x_14 = lean_ctor_get(x_11, 1); -lean_inc(x_14); -lean_dec(x_11); -x_15 = l_Lean_realPathNormalized(x_1, x_12); -if (lean_obj_tag(x_15) == 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; uint32_t x_22; uint32_t x_23; uint8_t x_24; uint32_t x_25; uint8_t x_26; -x_16 = lean_ctor_get(x_15, 0); -lean_inc(x_16); -x_17 = lean_ctor_get(x_15, 1); -lean_inc(x_17); -if (lean_is_exclusive(x_15)) { - lean_ctor_release(x_15, 0); - lean_ctor_release(x_15, 1); - x_18 = x_15; -} else { - lean_dec_ref(x_15); - x_18 = lean_box(0); -} -x_19 = lean_string_length(x_14); -lean_dec(x_14); -x_20 = l_String_drop(x_16, x_19); -lean_dec(x_19); -x_21 = lean_unsigned_to_nat(0u); -x_22 = lean_string_utf8_get(x_20, x_21); -x_23 = l_System_FilePath_pathSeparator; -x_24 = x_22 == x_23; -x_25 = 46; -if (x_24 == 0) -{ -uint8_t x_78; -x_78 = 0; -x_26 = x_78; -goto block_77; -} -else -{ -uint8_t x_79; -x_79 = 1; -x_26 = x_79; -goto block_77; -} -block_77: -{ -if (x_26 == 0) -{ -lean_object* x_27; -x_27 = l_String_revPosOf(x_20, x_25); -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; -lean_dec(x_20); -lean_dec(x_13); -x_28 = l_Lean_moduleNameOfFileName___closed__1; -x_29 = lean_string_append(x_28, x_16); -lean_dec(x_16); -x_30 = l_Lean_moduleNameOfFileName___closed__2; -x_31 = lean_string_append(x_29, x_30); -if (lean_is_scalar(x_18)) { - x_32 = lean_alloc_ctor(1, 2, 0); -} else { - x_32 = x_18; - lean_ctor_set_tag(x_32, 1); -} -lean_ctor_set(x_32, 0, x_31); -lean_ctor_set(x_32, 1, x_17); -return x_32; -} -else -{ -uint8_t x_33; -lean_dec(x_16); -x_33 = !lean_is_exclusive(x_27); -if (x_33 == 0) -{ -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; -x_34 = lean_ctor_get(x_27, 0); -x_35 = lean_string_utf8_extract(x_20, x_21, x_34); -lean_dec(x_34); -lean_dec(x_20); -x_36 = l___private_Init_Lean_Path_1__pathSep; -x_37 = l_String_splitOn(x_35, x_36); -x_38 = lean_box(0); -x_39 = lean_name_mk_string(x_38, x_13); -x_40 = l_List_foldl___main___at_Lean_moduleNameOfFileName___spec__1(x_39, x_37); -lean_ctor_set(x_27, 0, x_40); -if (lean_is_scalar(x_18)) { - x_41 = lean_alloc_ctor(0, 2, 0); -} else { - x_41 = x_18; -} -lean_ctor_set(x_41, 0, x_27); -lean_ctor_set(x_41, 1, x_17); -return x_41; -} -else -{ -lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; -x_42 = lean_ctor_get(x_27, 0); -lean_inc(x_42); -lean_dec(x_27); -x_43 = lean_string_utf8_extract(x_20, x_21, x_42); -lean_dec(x_42); -lean_dec(x_20); -x_44 = l___private_Init_Lean_Path_1__pathSep; -x_45 = l_String_splitOn(x_43, x_44); -x_46 = lean_box(0); -x_47 = lean_name_mk_string(x_46, x_13); -x_48 = l_List_foldl___main___at_Lean_moduleNameOfFileName___spec__1(x_47, x_45); -x_49 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_49, 0, x_48); -if (lean_is_scalar(x_18)) { - x_50 = lean_alloc_ctor(0, 2, 0); -} else { - x_50 = x_18; -} -lean_ctor_set(x_50, 0, x_49); -lean_ctor_set(x_50, 1, x_17); -return x_50; -} -} -} -else -{ -lean_object* x_51; lean_object* x_52; lean_object* x_53; -x_51 = lean_unsigned_to_nat(1u); -x_52 = l_String_drop(x_20, x_51); -lean_dec(x_20); -x_53 = l_String_revPosOf(x_52, x_25); -if (lean_obj_tag(x_53) == 0) -{ -lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; -lean_dec(x_52); -lean_dec(x_13); -x_54 = l_Lean_moduleNameOfFileName___closed__1; -x_55 = lean_string_append(x_54, x_16); -lean_dec(x_16); -x_56 = l_Lean_moduleNameOfFileName___closed__2; -x_57 = lean_string_append(x_55, x_56); -if (lean_is_scalar(x_18)) { - x_58 = lean_alloc_ctor(1, 2, 0); -} else { - x_58 = x_18; - lean_ctor_set_tag(x_58, 1); -} -lean_ctor_set(x_58, 0, x_57); -lean_ctor_set(x_58, 1, x_17); -return x_58; -} -else -{ -uint8_t x_59; -lean_dec(x_16); -x_59 = !lean_is_exclusive(x_53); -if (x_59 == 0) -{ -lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; -x_60 = lean_ctor_get(x_53, 0); -x_61 = lean_string_utf8_extract(x_52, x_21, x_60); -lean_dec(x_60); -lean_dec(x_52); -x_62 = l___private_Init_Lean_Path_1__pathSep; -x_63 = l_String_splitOn(x_61, x_62); -x_64 = lean_box(0); -x_65 = lean_name_mk_string(x_64, x_13); -x_66 = l_List_foldl___main___at_Lean_moduleNameOfFileName___spec__1(x_65, x_63); -lean_ctor_set(x_53, 0, x_66); -if (lean_is_scalar(x_18)) { - x_67 = lean_alloc_ctor(0, 2, 0); -} else { - x_67 = x_18; -} -lean_ctor_set(x_67, 0, x_53); -lean_ctor_set(x_67, 1, x_17); -return x_67; -} -else -{ -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; -x_68 = lean_ctor_get(x_53, 0); -lean_inc(x_68); -lean_dec(x_53); -x_69 = lean_string_utf8_extract(x_52, x_21, x_68); -lean_dec(x_68); -lean_dec(x_52); -x_70 = l___private_Init_Lean_Path_1__pathSep; -x_71 = l_String_splitOn(x_69, x_70); -x_72 = lean_box(0); -x_73 = lean_name_mk_string(x_72, x_13); -x_74 = l_List_foldl___main___at_Lean_moduleNameOfFileName___spec__1(x_73, x_71); -x_75 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_75, 0, x_74); -if (lean_is_scalar(x_18)) { - x_76 = lean_alloc_ctor(0, 2, 0); -} else { - x_76 = x_18; -} -lean_ctor_set(x_76, 0, x_75); -lean_ctor_set(x_76, 1, x_17); -return x_76; -} -} -} -} -} -else -{ -uint8_t x_80; -lean_dec(x_14); -lean_dec(x_13); -x_80 = !lean_is_exclusive(x_15); -if (x_80 == 0) -{ -return x_15; -} -else -{ -lean_object* x_81; lean_object* x_82; lean_object* x_83; -x_81 = lean_ctor_get(x_15, 0); -x_82 = lean_ctor_get(x_15, 1); -lean_inc(x_82); -lean_inc(x_81); -lean_dec(x_15); -x_83 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_83, 0, x_81); -lean_ctor_set(x_83, 1, x_82); -return x_83; -} -} -} -} -else -{ -uint8_t x_84; -lean_dec(x_1); -x_84 = !lean_is_exclusive(x_3); -if (x_84 == 0) -{ -return x_3; -} -else -{ -lean_object* x_85; lean_object* x_86; lean_object* x_87; -x_85 = lean_ctor_get(x_3, 0); -x_86 = lean_ctor_get(x_3, 1); -lean_inc(x_86); -lean_inc(x_85); -lean_dec(x_3); -x_87 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_87, 0, x_85); -lean_ctor_set(x_87, 1, x_86); -return x_87; -} -} -} -} -lean_object* _init_l_Lean_normalizeModuleName___closed__1() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string("Default"); -return x_1; -} -} -lean_object* _init_l_Lean_normalizeModuleName___closed__2() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = lean_box(0); -x_2 = l_Lean_normalizeModuleName___closed__1; -x_3 = lean_name_mk_string(x_1, x_2); -return x_3; -} -} -lean_object* lean_normalize_module_name(lean_object* x_1) { -_start: -{ -if (lean_obj_tag(x_1) == 1) -{ -lean_object* x_2; -x_2 = lean_ctor_get(x_1, 0); -lean_inc(x_2); -if (lean_obj_tag(x_2) == 0) -{ -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 = lean_box(0); -x_5 = lean_name_mk_string(x_4, x_3); -x_6 = l_Lean_normalizeModuleName___closed__2; -x_7 = l_Lean_Name_append___main(x_5, x_6); -lean_dec(x_5); -return x_7; -} -else -{ -lean_dec(x_2); -return x_1; -} -} -else -{ -return x_1; -} -} -} -lean_object* initialize_Init_System_IO(lean_object*); -lean_object* initialize_Init_System_FilePath(lean_object*); -lean_object* initialize_Init_Data_Array(lean_object*); -lean_object* initialize_Init_Data_List_Control(lean_object*); -lean_object* initialize_Init_Data_HashMap(lean_object*); -lean_object* initialize_Init_Data_Nat_Control(lean_object*); -lean_object* initialize_Init_Lean_Data_Name(lean_object*); -static bool _G_initialized = false; -lean_object* initialize_Init_Lean_Path(lean_object* w) { -lean_object * res; -if (_G_initialized) return lean_mk_io_result(lean_box(0)); -_G_initialized = true; -res = initialize_Init_System_IO(lean_io_mk_world()); -if (lean_io_result_is_error(res)) return res; -lean_dec_ref(res); -res = initialize_Init_System_FilePath(lean_io_mk_world()); -if (lean_io_result_is_error(res)) return res; -lean_dec_ref(res); -res = initialize_Init_Data_Array(lean_io_mk_world()); -if (lean_io_result_is_error(res)) return res; -lean_dec_ref(res); -res = initialize_Init_Data_List_Control(lean_io_mk_world()); -if (lean_io_result_is_error(res)) return res; -lean_dec_ref(res); -res = initialize_Init_Data_HashMap(lean_io_mk_world()); -if (lean_io_result_is_error(res)) return res; -lean_dec_ref(res); -res = initialize_Init_Data_Nat_Control(lean_io_mk_world()); -if (lean_io_result_is_error(res)) return res; -lean_dec_ref(res); -res = initialize_Init_Lean_Data_Name(lean_io_mk_world()); -if (lean_io_result_is_error(res)) return res; -lean_dec_ref(res); -l___private_Init_Lean_Path_1__pathSep___closed__1 = _init_l___private_Init_Lean_Path_1__pathSep___closed__1(); -lean_mark_persistent(l___private_Init_Lean_Path_1__pathSep___closed__1); -l___private_Init_Lean_Path_1__pathSep = _init_l___private_Init_Lean_Path_1__pathSep(); -lean_mark_persistent(l___private_Init_Lean_Path_1__pathSep); -l_Lean_mkSearchPathRef___closed__1 = _init_l_Lean_mkSearchPathRef___closed__1(); -lean_mark_persistent(l_Lean_mkSearchPathRef___closed__1); -res = l_Lean_mkSearchPathRef(lean_io_mk_world()); -if (lean_io_result_is_error(res)) return res; -l_Lean_searchPathRef = lean_io_result_get_value(res); -lean_mark_persistent(l_Lean_searchPathRef); -lean_dec_ref(res); -l_List_foldlM___main___at_Lean_parseSearchPath___spec__7___closed__1 = _init_l_List_foldlM___main___at_Lean_parseSearchPath___spec__7___closed__1(); -lean_mark_persistent(l_List_foldlM___main___at_Lean_parseSearchPath___spec__7___closed__1); -l_List_foldlM___main___at_Lean_parseSearchPath___spec__7___closed__2 = _init_l_List_foldlM___main___at_Lean_parseSearchPath___spec__7___closed__2(); -lean_mark_persistent(l_List_foldlM___main___at_Lean_parseSearchPath___spec__7___closed__2); -l_List_foldlM___main___at_Lean_parseSearchPath___spec__7___closed__3 = _init_l_List_foldlM___main___at_Lean_parseSearchPath___spec__7___closed__3(); -lean_mark_persistent(l_List_foldlM___main___at_Lean_parseSearchPath___spec__7___closed__3); -l_Lean_getBuiltinSearchPath___closed__1 = _init_l_Lean_getBuiltinSearchPath___closed__1(); -lean_mark_persistent(l_Lean_getBuiltinSearchPath___closed__1); -l_Lean_getBuiltinSearchPath___closed__2 = _init_l_Lean_getBuiltinSearchPath___closed__2(); -lean_mark_persistent(l_Lean_getBuiltinSearchPath___closed__2); -l_Lean_getBuiltinSearchPath___closed__3 = _init_l_Lean_getBuiltinSearchPath___closed__3(); -lean_mark_persistent(l_Lean_getBuiltinSearchPath___closed__3); -l_Lean_getBuiltinSearchPath___closed__4 = _init_l_Lean_getBuiltinSearchPath___closed__4(); -lean_mark_persistent(l_Lean_getBuiltinSearchPath___closed__4); -l_Lean_getBuiltinSearchPath___closed__5 = _init_l_Lean_getBuiltinSearchPath___closed__5(); -lean_mark_persistent(l_Lean_getBuiltinSearchPath___closed__5); -l_Lean_getBuiltinSearchPath___closed__6 = _init_l_Lean_getBuiltinSearchPath___closed__6(); -lean_mark_persistent(l_Lean_getBuiltinSearchPath___closed__6); -l_Lean_addSearchPathFromEnv___closed__1 = _init_l_Lean_addSearchPathFromEnv___closed__1(); -lean_mark_persistent(l_Lean_addSearchPathFromEnv___closed__1); -l_Lean_modPathToFilePath___main___closed__1 = _init_l_Lean_modPathToFilePath___main___closed__1(); -lean_mark_persistent(l_Lean_modPathToFilePath___main___closed__1); -l_Lean_modPathToFilePath___main___closed__2 = _init_l_Lean_modPathToFilePath___main___closed__2(); -lean_mark_persistent(l_Lean_modPathToFilePath___main___closed__2); -l_Lean_modPathToFilePath___main___closed__3 = _init_l_Lean_modPathToFilePath___main___closed__3(); -lean_mark_persistent(l_Lean_modPathToFilePath___main___closed__3); -l_Lean_splitAtRoot___main___closed__1 = _init_l_Lean_splitAtRoot___main___closed__1(); -lean_mark_persistent(l_Lean_splitAtRoot___main___closed__1); -l_Lean_splitAtRoot___main___closed__2 = _init_l_Lean_splitAtRoot___main___closed__2(); -lean_mark_persistent(l_Lean_splitAtRoot___main___closed__2); -l_Lean_findOLean___closed__1 = _init_l_Lean_findOLean___closed__1(); -lean_mark_persistent(l_Lean_findOLean___closed__1); -l_Lean_findOLean___closed__2 = _init_l_Lean_findOLean___closed__2(); -lean_mark_persistent(l_Lean_findOLean___closed__2); -l_Lean_findAtSearchPath___closed__1 = _init_l_Lean_findAtSearchPath___closed__1(); -lean_mark_persistent(l_Lean_findAtSearchPath___closed__1); -l_Lean_findAtSearchPath___closed__2 = _init_l_Lean_findAtSearchPath___closed__2(); -lean_mark_persistent(l_Lean_findAtSearchPath___closed__2); -l_Lean_moduleNameOfFileName___closed__1 = _init_l_Lean_moduleNameOfFileName___closed__1(); -lean_mark_persistent(l_Lean_moduleNameOfFileName___closed__1); -l_Lean_moduleNameOfFileName___closed__2 = _init_l_Lean_moduleNameOfFileName___closed__2(); -lean_mark_persistent(l_Lean_moduleNameOfFileName___closed__2); -l_Lean_normalizeModuleName___closed__1 = _init_l_Lean_normalizeModuleName___closed__1(); -lean_mark_persistent(l_Lean_normalizeModuleName___closed__1); -l_Lean_normalizeModuleName___closed__2 = _init_l_Lean_normalizeModuleName___closed__2(); -lean_mark_persistent(l_Lean_normalizeModuleName___closed__2); -return lean_mk_io_result(lean_box(0)); -} -#ifdef __cplusplus -} -#endif diff --git a/stage0/stdlib/Init/Lean/Trace.c b/stage0/stdlib/Init/Lean/Trace.c deleted file mode 100644 index 2845e36bbc..0000000000 --- a/stage0/stdlib/Init/Lean/Trace.c +++ /dev/null @@ -1,1550 +0,0 @@ -// Lean compiler output -// Module: Init.Lean.Trace -// Imports: Init.Lean.Message -#include "runtime/lean.h" -#if defined(__clang__) -#pragma clang diagnostic ignored "-Wunused-parameter" -#pragma clang diagnostic ignored "-Wunused-label" -#elif defined(__GNUC__) && !defined(__CLANG__) -#pragma GCC diagnostic ignored "-Wunused-parameter" -#pragma GCC diagnostic ignored "-Wunused-label" -#pragma GCC diagnostic ignored "-Wunused-but-set-variable" -#endif -#ifdef __cplusplus -extern "C" { -#endif -lean_object* l___private_Init_Lean_Trace_1__addNode(lean_object*, lean_object*); -lean_object* l_Lean_SimpleMonadTracerAdapter_enableTracing___rarg___lambda__2(lean_object*, uint8_t, lean_object*); -lean_object* l_Lean_monadTracerAdapter___rarg(lean_object*, lean_object*); -lean_object* l___private_Init_Lean_Trace_4__checkTraceOption___rarg(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Format_joinArraySep___at_Lean_TraceState_Lean_HasFormat___spec__1(lean_object*, lean_object*); -lean_object* l_Lean_Format_joinArraySep___at_Lean_TraceState_Lean_HasFormat___spec__1___boxed(lean_object*, lean_object*); -lean_object* l_Lean_SimpleMonadTracerAdapter_enableTracing___rarg(lean_object*, lean_object*, uint8_t); -lean_object* l_Lean_SimpleMonadTracerAdapter_getTraces___rarg___lambda__1(lean_object*, lean_object*); -uint8_t l___private_Init_Lean_Trace_3__checkTraceOptionAux(lean_object*, lean_object*); -lean_object* l_Lean_MonadTracerAdapter_traceCtx___boxed(lean_object*); -lean_object* l_Lean_MonadTracerAdapter_traceCtxExcept___rarg___lambda__1(lean_object*, lean_object*, uint8_t); -lean_object* l_Lean_monadTracerAdapterExcept___rarg(lean_object*, lean_object*, lean_object*); -extern lean_object* l_Array_empty___closed__1; -lean_object* l_Array_iterateMAux___main___at_Lean_TraceState_Lean_HasFormat___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_TraceState_HasToString___closed__1; -lean_object* l_Lean_MonadTracerAdapter_traceCtx___rarg___lambda__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_MonadTracerAdapter_traceCtx(lean_object*); -lean_object* l_Lean_SimpleMonadTracerAdapter_enableTracing(lean_object*); -uint8_t l___private_Init_Lean_Trace_3__checkTraceOptionAux___main(lean_object*, lean_object*); -lean_object* l_Lean_TraceState_HasToString; -lean_object* l_Lean_TraceState_Inhabited; -lean_object* lean_array_push(lean_object*, lean_object*); -lean_object* lean_array_get_size(lean_object*); -lean_object* l_Lean_MessageData_formatAux___main(lean_object*, lean_object*); -lean_object* l_Lean_MonadTracerAdapter_trace___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, uint8_t); -lean_object* l_Lean_MonadTracerAdapter_traceCtxExcept___rarg___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l___private_Init_Lean_Trace_4__checkTraceOption___boxed(lean_object*); -lean_object* l_Lean_MonadTracerAdapter_traceCtx___rarg___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, uint8_t); -lean_object* l_finally___rarg___lambda__3___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_fmt___at_Lean_TraceState_HasToString___spec__1(lean_object*); -lean_object* lean_nat_add(lean_object*, lean_object*); -lean_object* l_Lean_SimpleMonadTracerAdapter_isTracingEnabledFor___rarg___lambda__1___closed__1; -lean_object* l_Lean_SimpleMonadTracerAdapter_modifyTraces___rarg(lean_object*, lean_object*); -lean_object* l_Lean_MonadTracerAdapter_traceCtx___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l___private_Init_Lean_Trace_4__checkTraceOption(lean_object*); -lean_object* l_Lean_MonadTracerAdapter_traceCtxExcept___rarg___lambda__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_TraceState_HasToString___closed__2; -lean_object* lean_array_fget(lean_object*, lean_object*); -lean_object* l_Lean_SimpleMonadTracerAdapter_isTracingEnabledFor___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_MonadTracerAdapter_traceCtxExcept___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l___private_Init_Lean_Trace_1__addNode___rarg(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_SimpleMonadTracerAdapter_isTracingEnabledFor___rarg___lambda__1___closed__2; -lean_object* l_Lean_SimpleMonadTracerAdapter_getTraces___boxed(lean_object*); -lean_object* l_Lean_Name_append___main(lean_object*, lean_object*); -uint8_t l_Lean_KVMap_getBool(lean_object*, lean_object*, uint8_t); -lean_object* l_finally___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_MonadTracerAdapter_traceCtxExcept___rarg___lambda__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_monadTracerAdapterExcept(lean_object*, lean_object*); -lean_object* l_Lean_SimpleMonadTracerAdapter_modifyTraces(lean_object*, lean_object*); -lean_object* l_Lean_SimpleMonadTracerAdapter_isTracingEnabledFor___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_MonadTracerAdapter_traceCtx___rarg___lambda__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l___private_Init_Lean_Trace_3__checkTraceOptionAux___main___boxed(lean_object*, lean_object*); -lean_object* l_Array_iterateMAux___main___at_Lean_TraceState_Lean_HasFormat___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_SimpleMonadTracerAdapter_modifyTraces___rarg___lambda__1(lean_object*, lean_object*); -lean_object* l_Lean_monadTracerAdapter(lean_object*); -lean_object* l_Lean_SimpleMonadTracerAdapter_enableTracing___boxed(lean_object*); -lean_object* l_Lean_MonadTracerAdapter_trace___rarg(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_MonadTracerAdapter_traceCtxExcept___rarg___lambda__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l___private_Init_Lean_Trace_3__checkTraceOptionAux___boxed(lean_object*, lean_object*); -lean_object* lean_name_mk_string(lean_object*, lean_object*); -lean_object* l_Lean_SimpleMonadTracerAdapter_getTraces___rarg(lean_object*, lean_object*); -lean_object* l_Lean_MonadTracerAdapter_addTrace___rarg___lambda__1(lean_object*, lean_object*, lean_object*); -lean_object* l___private_Init_Lean_Trace_4__checkTraceOption___rarg___lambda__1(lean_object*, lean_object*, lean_object*); -lean_object* l_Function_comp___rarg(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_MonadTracerAdapter_traceCtx___rarg___lambda__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_MonadTracerAdapter_traceCtxExcept___rarg___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, uint8_t); -uint8_t l_Lean_KVMap_contains(lean_object*, lean_object*); -lean_object* l_Lean_MonadTracerAdapter_trace___boxed(lean_object*); -lean_object* l_Lean_simpleMonadTracerAdapter(lean_object*); -extern lean_object* l_Lean_PersistentEnvExtension_inhabited___rarg___closed__3; -lean_object* l_Lean_MonadTracerAdapter_trace___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -extern lean_object* l_Lean_HasRepr___closed__1; -lean_object* l_Lean_monadTracerAdapter___boxed(lean_object*); -lean_object* l_Lean_MonadTracerAdapter_traceCtx___rarg___lambda__1(lean_object*, lean_object*, uint8_t); -lean_object* l_Lean_SimpleMonadTracerAdapter_enableTracing___rarg___lambda__3(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_TraceState_Lean_HasFormat___boxed(lean_object*); -lean_object* l___private_Init_Lean_Trace_2__getResetTraces___rarg(lean_object*, lean_object*); -lean_object* l_Lean_MonadTracerAdapter_traceCtxExcept___rarg___lambda__6(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, uint8_t); -lean_object* l___private_Init_Lean_Trace_1__addNode___rarg___lambda__1(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_fmt___at_Lean_TraceState_HasToString___spec__1___boxed(lean_object*); -lean_object* l_Lean_MonadTracerAdapter_traceCtxExcept___rarg___lambda__2(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); -lean_object* l___private_Init_Lean_Trace_2__getResetTraces(lean_object*); -lean_object* l_Lean_MonadTracerAdapter_traceCtxExcept___rarg___lambda__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_monadTracerAdapterExcept___boxed(lean_object*, lean_object*); -lean_object* l___private_Init_Lean_Trace_4__checkTraceOption___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_simpleMonadTracerAdapter___boxed(lean_object*); -lean_object* l_Lean_SimpleMonadTracerAdapter_enableTracing___rarg___lambda__2___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_SimpleMonadTracerAdapter_enableTracing___rarg___lambda__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_SimpleMonadTracerAdapter_isTracingEnabledFor(lean_object*); -lean_object* l___private_Init_Lean_Trace_1__addNode___boxed(lean_object*, lean_object*); -lean_object* l_Lean_MonadTracerAdapter_addTrace(lean_object*, lean_object*); -lean_object* l_Lean_SimpleMonadTracerAdapter_getTraces(lean_object*); -lean_object* l_Lean_SimpleMonadTracerAdapter_enableTracing___rarg___lambda__1(uint8_t, lean_object*); -lean_object* l_Lean_simpleMonadTracerAdapter___rarg(lean_object*, lean_object*); -lean_object* l_Lean_TraceState_Inhabited___closed__1; -lean_object* l_Lean_TraceState_Lean_HasFormat(lean_object*); -lean_object* l_Lean_MonadTracerAdapter_traceCtx___rarg___lambda__6(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, uint8_t); -lean_object* l_Lean_MonadTracerAdapter_traceCtx___rarg___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_MonadTracerAdapter_traceCtx___rarg___lambda__2(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_SimpleMonadTracerAdapter_isTracingEnabledFor___boxed(lean_object*); -lean_object* l_Lean_MonadTracerAdapter_addTrace___boxed(lean_object*, lean_object*); -uint8_t l_List_isEmpty___rarg(lean_object*); -lean_object* l_Lean_MonadTracerAdapter_traceCtx___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l___private_Init_Lean_Trace_2__getResetTraces___boxed(lean_object*); -lean_object* l_Lean_MonadTracerAdapter_traceCtx___rarg___lambda__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_SimpleMonadTracerAdapter_modifyTraces___boxed(lean_object*, lean_object*); -lean_object* l_Lean_SimpleMonadTracerAdapter_enableTracing___rarg___lambda__1___boxed(lean_object*, lean_object*); -lean_object* l_Lean_MonadTracerAdapter_addTrace___rarg(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_MonadTracerAdapter_traceCtxExcept___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_MonadTracerAdapter_traceCtxExcept(lean_object*, lean_object*); -lean_object* l___private_Init_Lean_Trace_2__getResetTraces___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_MonadTracerAdapter_trace(lean_object*); -lean_object* l_Lean_MonadTracerAdapter_traceCtxExcept___boxed(lean_object*, lean_object*); -lean_object* l_Lean_SimpleMonadTracerAdapter_enableTracing___rarg___boxed(lean_object*, lean_object*, lean_object*); -uint8_t lean_nat_dec_lt(lean_object*, lean_object*); -lean_object* l_Lean_SimpleMonadTracerAdapter_isTracingEnabledFor___rarg(lean_object*, lean_object*, lean_object*); -lean_object* l___private_Init_Lean_Trace_1__addNode___rarg___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; lean_object* x_5; lean_object* x_6; -x_4 = lean_alloc_ctor(10, 1, 0); -lean_ctor_set(x_4, 0, x_3); -x_5 = lean_alloc_ctor(9, 2, 0); -lean_ctor_set(x_5, 0, x_1); -lean_ctor_set(x_5, 1, x_4); -x_6 = lean_array_push(x_2, x_5); -return x_6; -} -} -lean_object* l___private_Init_Lean_Trace_1__addNode___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; -x_4 = lean_ctor_get(x_1, 3); -lean_inc(x_4); -lean_dec(x_1); -x_5 = lean_alloc_closure((void*)(l___private_Init_Lean_Trace_1__addNode___rarg___lambda__1), 3, 2); -lean_closure_set(x_5, 0, x_3); -lean_closure_set(x_5, 1, x_2); -x_6 = lean_apply_1(x_4, x_5); -return x_6; -} -} -lean_object* l___private_Init_Lean_Trace_1__addNode(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = lean_alloc_closure((void*)(l___private_Init_Lean_Trace_1__addNode___rarg), 3, 0); -return x_3; -} -} -lean_object* l___private_Init_Lean_Trace_1__addNode___boxed(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = l___private_Init_Lean_Trace_1__addNode(x_1, x_2); -lean_dec(x_2); -lean_dec(x_1); -return x_3; -} -} -lean_object* l___private_Init_Lean_Trace_2__getResetTraces___rarg___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; -x_5 = lean_ctor_get(x_1, 3); -lean_inc(x_5); -lean_dec(x_1); -x_6 = l_Lean_PersistentEnvExtension_inhabited___rarg___closed__3; -x_7 = lean_apply_1(x_5, x_6); -x_8 = lean_alloc_closure((void*)(l_finally___rarg___lambda__1___boxed), 3, 2); -lean_closure_set(x_8, 0, x_2); -lean_closure_set(x_8, 1, x_4); -x_9 = lean_apply_4(x_3, lean_box(0), lean_box(0), x_7, x_8); -return x_9; -} -} -lean_object* l___private_Init_Lean_Trace_2__getResetTraces___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); -x_4 = lean_ctor_get(x_2, 2); -lean_inc(x_4); -lean_inc(x_3); -x_5 = lean_alloc_closure((void*)(l___private_Init_Lean_Trace_2__getResetTraces___rarg___lambda__1), 4, 3); -lean_closure_set(x_5, 0, x_2); -lean_closure_set(x_5, 1, x_1); -lean_closure_set(x_5, 2, x_3); -x_6 = lean_apply_4(x_3, lean_box(0), lean_box(0), x_4, x_5); -return x_6; -} -} -lean_object* l___private_Init_Lean_Trace_2__getResetTraces(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l___private_Init_Lean_Trace_2__getResetTraces___rarg), 2, 0); -return x_2; -} -} -lean_object* l___private_Init_Lean_Trace_2__getResetTraces___boxed(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = l___private_Init_Lean_Trace_2__getResetTraces(x_1); -lean_dec(x_1); -return x_2; -} -} -lean_object* l_Lean_MonadTracerAdapter_addTrace___rarg___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; lean_object* x_5; -x_4 = lean_alloc_ctor(9, 2, 0); -lean_ctor_set(x_4, 0, x_1); -lean_ctor_set(x_4, 1, x_2); -x_5 = lean_array_push(x_3, x_4); -return x_5; -} -} -lean_object* l_Lean_MonadTracerAdapter_addTrace___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; -x_4 = lean_ctor_get(x_1, 3); -lean_inc(x_4); -lean_dec(x_1); -x_5 = lean_alloc_closure((void*)(l_Lean_MonadTracerAdapter_addTrace___rarg___lambda__1), 3, 2); -lean_closure_set(x_5, 0, x_2); -lean_closure_set(x_5, 1, x_3); -x_6 = lean_apply_1(x_4, x_5); -return x_6; -} -} -lean_object* l_Lean_MonadTracerAdapter_addTrace(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = lean_alloc_closure((void*)(l_Lean_MonadTracerAdapter_addTrace___rarg), 3, 0); -return x_3; -} -} -lean_object* l_Lean_MonadTracerAdapter_addTrace___boxed(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = l_Lean_MonadTracerAdapter_addTrace(x_1, x_2); -lean_dec(x_2); -lean_dec(x_1); -return x_3; -} -} -lean_object* l_Lean_MonadTracerAdapter_trace___rarg___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, uint8_t x_5) { -_start: -{ -if (x_5 == 0) -{ -lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -x_6 = lean_ctor_get(x_1, 0); -lean_inc(x_6); -lean_dec(x_1); -x_7 = lean_ctor_get(x_6, 1); -lean_inc(x_7); -lean_dec(x_6); -x_8 = lean_box(0); -x_9 = lean_apply_2(x_7, lean_box(0), x_8); -return x_9; -} -else -{ -lean_object* x_10; lean_object* x_11; lean_object* x_12; -lean_dec(x_1); -x_10 = lean_box(0); -x_11 = lean_apply_1(x_2, x_10); -x_12 = l_Lean_MonadTracerAdapter_addTrace___rarg(x_3, x_4, x_11); -return x_12; -} -} -} -lean_object* l_Lean_MonadTracerAdapter_trace___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_7; lean_object* x_8; lean_object* x_9; -x_5 = lean_ctor_get(x_1, 1); -lean_inc(x_5); -x_6 = lean_ctor_get(x_2, 0); -lean_inc(x_6); -lean_inc(x_3); -x_7 = lean_apply_1(x_6, x_3); -x_8 = lean_alloc_closure((void*)(l_Lean_MonadTracerAdapter_trace___rarg___lambda__1___boxed), 5, 4); -lean_closure_set(x_8, 0, x_1); -lean_closure_set(x_8, 1, x_4); -lean_closure_set(x_8, 2, x_2); -lean_closure_set(x_8, 3, x_3); -x_9 = lean_apply_4(x_5, lean_box(0), lean_box(0), x_7, x_8); -return x_9; -} -} -lean_object* l_Lean_MonadTracerAdapter_trace(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_MonadTracerAdapter_trace___rarg), 4, 0); -return x_2; -} -} -lean_object* l_Lean_MonadTracerAdapter_trace___rarg___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { -_start: -{ -uint8_t x_6; lean_object* x_7; -x_6 = lean_unbox(x_5); -lean_dec(x_5); -x_7 = l_Lean_MonadTracerAdapter_trace___rarg___lambda__1(x_1, x_2, x_3, x_4, x_6); -return x_7; -} -} -lean_object* l_Lean_MonadTracerAdapter_trace___boxed(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = l_Lean_MonadTracerAdapter_trace(x_1); -lean_dec(x_1); -return x_2; -} -} -lean_object* l_Lean_MonadTracerAdapter_traceCtx___rarg___lambda__1(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_ctor_get(x_1, 0); -lean_inc(x_4); -lean_dec(x_1); -x_5 = lean_ctor_get(x_4, 1); -lean_inc(x_5); -lean_dec(x_4); -x_6 = lean_apply_2(x_5, lean_box(0), x_2); -return x_6; -} -} -lean_object* l_Lean_MonadTracerAdapter_traceCtx___rarg___lambda__2(lean_object* x_1, uint8_t 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; -x_6 = lean_box(x_2); -x_7 = lean_apply_1(x_1, x_6); -x_8 = lean_alloc_closure((void*)(l_Lean_MonadTracerAdapter_traceCtx___rarg___lambda__1___boxed), 3, 2); -lean_closure_set(x_8, 0, x_3); -lean_closure_set(x_8, 1, x_5); -x_9 = lean_apply_4(x_4, lean_box(0), lean_box(0), x_7, x_8); -return x_9; -} -} -lean_object* l_Lean_MonadTracerAdapter_traceCtx___rarg___lambda__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, uint8_t x_5) { -_start: -{ -lean_object* x_6; lean_object* x_7; lean_object* x_8; -x_6 = lean_box(x_5); -lean_inc(x_3); -x_7 = lean_alloc_closure((void*)(l_Lean_MonadTracerAdapter_traceCtx___rarg___lambda__2___boxed), 5, 4); -lean_closure_set(x_7, 0, x_1); -lean_closure_set(x_7, 1, x_6); -lean_closure_set(x_7, 2, x_2); -lean_closure_set(x_7, 3, x_3); -x_8 = lean_apply_4(x_3, lean_box(0), lean_box(0), x_4, x_7); -return x_8; -} -} -lean_object* l_Lean_MonadTracerAdapter_traceCtx___rarg___lambda__4(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; -x_7 = l___private_Init_Lean_Trace_1__addNode___rarg(x_1, x_2, x_3); -x_8 = lean_alloc_closure((void*)(l_finally___rarg___lambda__1___boxed), 3, 2); -lean_closure_set(x_8, 0, x_4); -lean_closure_set(x_8, 1, x_6); -x_9 = lean_apply_4(x_5, lean_box(0), lean_box(0), x_7, x_8); -return x_9; -} -} -lean_object* l_Lean_MonadTracerAdapter_traceCtx___rarg___lambda__5(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_inc(x_4); -x_7 = lean_alloc_closure((void*)(l_Lean_MonadTracerAdapter_traceCtx___rarg___lambda__4), 6, 5); -lean_closure_set(x_7, 0, x_1); -lean_closure_set(x_7, 1, x_6); -lean_closure_set(x_7, 2, x_2); -lean_closure_set(x_7, 3, x_3); -lean_closure_set(x_7, 4, x_4); -x_8 = lean_apply_4(x_4, lean_box(0), lean_box(0), x_5, x_7); -return x_8; -} -} -lean_object* l_Lean_MonadTracerAdapter_traceCtx___rarg___lambda__6(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, uint8_t x_6) { -_start: -{ -if (x_6 == 0) -{ -lean_object* x_7; uint8_t x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; -lean_dec(x_5); -x_7 = lean_ctor_get(x_1, 1); -lean_inc(x_7); -lean_dec(x_1); -x_8 = 0; -x_9 = lean_box(x_8); -lean_inc(x_7); -x_10 = lean_apply_1(x_7, x_9); -lean_inc(x_3); -x_11 = lean_alloc_closure((void*)(l_Lean_MonadTracerAdapter_traceCtx___rarg___lambda__3___boxed), 5, 4); -lean_closure_set(x_11, 0, x_7); -lean_closure_set(x_11, 1, x_2); -lean_closure_set(x_11, 2, x_3); -lean_closure_set(x_11, 3, x_4); -x_12 = lean_apply_4(x_3, lean_box(0), lean_box(0), x_10, x_11); -return x_12; -} -else -{ -lean_object* x_13; lean_object* x_14; lean_object* x_15; -lean_inc(x_1); -lean_inc(x_2); -x_13 = l___private_Init_Lean_Trace_2__getResetTraces___rarg(x_2, x_1); -lean_inc(x_3); -x_14 = lean_alloc_closure((void*)(l_Lean_MonadTracerAdapter_traceCtx___rarg___lambda__5), 6, 5); -lean_closure_set(x_14, 0, x_1); -lean_closure_set(x_14, 1, x_5); -lean_closure_set(x_14, 2, x_2); -lean_closure_set(x_14, 3, x_3); -lean_closure_set(x_14, 4, x_4); -x_15 = lean_apply_4(x_3, lean_box(0), lean_box(0), x_13, x_14); -return x_15; -} -} -} -lean_object* l_Lean_MonadTracerAdapter_traceCtx___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; -x_6 = lean_ctor_get(x_1, 1); -lean_inc(x_6); -x_7 = lean_ctor_get(x_2, 0); -lean_inc(x_7); -lean_inc(x_4); -x_8 = lean_apply_1(x_7, x_4); -lean_inc(x_6); -x_9 = lean_alloc_closure((void*)(l_Lean_MonadTracerAdapter_traceCtx___rarg___lambda__6___boxed), 6, 5); -lean_closure_set(x_9, 0, x_2); -lean_closure_set(x_9, 1, x_1); -lean_closure_set(x_9, 2, x_6); -lean_closure_set(x_9, 3, x_5); -lean_closure_set(x_9, 4, x_4); -x_10 = lean_apply_4(x_6, lean_box(0), lean_box(0), x_8, x_9); -return x_10; -} -} -lean_object* l_Lean_MonadTracerAdapter_traceCtx(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_MonadTracerAdapter_traceCtx___rarg), 5, 0); -return x_2; -} -} -lean_object* l_Lean_MonadTracerAdapter_traceCtx___rarg___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -uint8_t x_4; lean_object* x_5; -x_4 = lean_unbox(x_3); -lean_dec(x_3); -x_5 = l_Lean_MonadTracerAdapter_traceCtx___rarg___lambda__1(x_1, x_2, x_4); -return x_5; -} -} -lean_object* l_Lean_MonadTracerAdapter_traceCtx___rarg___lambda__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { -_start: -{ -uint8_t x_6; lean_object* x_7; -x_6 = lean_unbox(x_2); -lean_dec(x_2); -x_7 = l_Lean_MonadTracerAdapter_traceCtx___rarg___lambda__2(x_1, x_6, x_3, x_4, x_5); -return x_7; -} -} -lean_object* l_Lean_MonadTracerAdapter_traceCtx___rarg___lambda__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { -_start: -{ -uint8_t x_6; lean_object* x_7; -x_6 = lean_unbox(x_5); -lean_dec(x_5); -x_7 = l_Lean_MonadTracerAdapter_traceCtx___rarg___lambda__3(x_1, x_2, x_3, x_4, x_6); -return x_7; -} -} -lean_object* l_Lean_MonadTracerAdapter_traceCtx___rarg___lambda__6___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_7; lean_object* x_8; -x_7 = lean_unbox(x_6); -lean_dec(x_6); -x_8 = l_Lean_MonadTracerAdapter_traceCtx___rarg___lambda__6(x_1, x_2, x_3, x_4, x_5, x_7); -return x_8; -} -} -lean_object* l_Lean_MonadTracerAdapter_traceCtx___boxed(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = l_Lean_MonadTracerAdapter_traceCtx(x_1); -lean_dec(x_1); -return x_2; -} -} -lean_object* l_Lean_MonadTracerAdapter_traceCtxExcept___rarg___lambda__1(lean_object* x_1, lean_object* x_2, uint8_t x_3) { -_start: -{ -lean_object* x_4; lean_object* x_5; -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_2); -return x_5; -} -} -lean_object* l_Lean_MonadTracerAdapter_traceCtxExcept___rarg___lambda__2(lean_object* x_1, uint8_t 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; -x_6 = lean_box(x_2); -x_7 = lean_apply_1(x_1, x_6); -x_8 = lean_alloc_closure((void*)(l_Lean_MonadTracerAdapter_traceCtxExcept___rarg___lambda__1___boxed), 3, 2); -lean_closure_set(x_8, 0, x_3); -lean_closure_set(x_8, 1, x_5); -x_9 = lean_apply_4(x_4, lean_box(0), lean_box(0), x_7, x_8); -return x_9; -} -} -lean_object* l_Lean_MonadTracerAdapter_traceCtxExcept___rarg___lambda__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, uint8_t 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; -x_7 = lean_ctor_get(x_1, 1); -lean_inc(x_7); -x_8 = lean_box(x_6); -lean_inc(x_4); -lean_inc(x_2); -x_9 = lean_alloc_closure((void*)(l_Lean_MonadTracerAdapter_traceCtx___rarg___lambda__2___boxed), 5, 4); -lean_closure_set(x_9, 0, x_2); -lean_closure_set(x_9, 1, x_8); -lean_closure_set(x_9, 2, x_3); -lean_closure_set(x_9, 3, x_4); -lean_inc(x_4); -x_10 = lean_apply_4(x_4, lean_box(0), lean_box(0), x_5, x_9); -x_11 = lean_box(x_6); -x_12 = lean_alloc_closure((void*)(l_Lean_MonadTracerAdapter_traceCtxExcept___rarg___lambda__2___boxed), 5, 4); -lean_closure_set(x_12, 0, x_2); -lean_closure_set(x_12, 1, x_11); -lean_closure_set(x_12, 2, x_1); -lean_closure_set(x_12, 3, x_4); -x_13 = lean_apply_3(x_7, lean_box(0), x_10, x_12); -return x_13; -} -} -lean_object* l_Lean_MonadTracerAdapter_traceCtxExcept___rarg___lambda__4(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; -x_7 = l___private_Init_Lean_Trace_1__addNode___rarg(x_1, x_2, x_3); -x_8 = lean_alloc_closure((void*)(l_finally___rarg___lambda__3___boxed), 3, 2); -lean_closure_set(x_8, 0, x_4); -lean_closure_set(x_8, 1, x_6); -x_9 = lean_apply_4(x_5, lean_box(0), lean_box(0), x_7, x_8); -return x_9; -} -} -lean_object* l_Lean_MonadTracerAdapter_traceCtxExcept___rarg___lambda__5(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; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; -x_8 = lean_ctor_get(x_1, 1); -lean_inc(x_8); -lean_inc(x_5); -lean_inc(x_3); -lean_inc(x_7); -lean_inc(x_2); -x_9 = lean_alloc_closure((void*)(l_Lean_MonadTracerAdapter_traceCtx___rarg___lambda__4), 6, 5); -lean_closure_set(x_9, 0, x_2); -lean_closure_set(x_9, 1, x_7); -lean_closure_set(x_9, 2, x_3); -lean_closure_set(x_9, 3, x_4); -lean_closure_set(x_9, 4, x_5); -lean_inc(x_5); -x_10 = lean_apply_4(x_5, lean_box(0), lean_box(0), x_6, x_9); -x_11 = lean_alloc_closure((void*)(l_Lean_MonadTracerAdapter_traceCtxExcept___rarg___lambda__4), 6, 5); -lean_closure_set(x_11, 0, x_2); -lean_closure_set(x_11, 1, x_7); -lean_closure_set(x_11, 2, x_3); -lean_closure_set(x_11, 3, x_1); -lean_closure_set(x_11, 4, x_5); -x_12 = lean_apply_3(x_8, lean_box(0), x_10, x_11); -return x_12; -} -} -lean_object* l_Lean_MonadTracerAdapter_traceCtxExcept___rarg___lambda__6(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, uint8_t x_7) { -_start: -{ -if (x_7 == 0) -{ -lean_object* x_8; uint8_t x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; -lean_dec(x_6); -x_8 = lean_ctor_get(x_1, 1); -lean_inc(x_8); -lean_dec(x_1); -x_9 = 0; -x_10 = lean_box(x_9); -lean_inc(x_8); -x_11 = lean_apply_1(x_8, x_10); -lean_inc(x_4); -x_12 = lean_alloc_closure((void*)(l_Lean_MonadTracerAdapter_traceCtxExcept___rarg___lambda__3___boxed), 6, 5); -lean_closure_set(x_12, 0, x_2); -lean_closure_set(x_12, 1, x_8); -lean_closure_set(x_12, 2, x_3); -lean_closure_set(x_12, 3, x_4); -lean_closure_set(x_12, 4, x_5); -x_13 = lean_apply_4(x_4, lean_box(0), lean_box(0), x_11, x_12); -return x_13; -} -else -{ -lean_object* x_14; lean_object* x_15; lean_object* x_16; -lean_inc(x_1); -lean_inc(x_3); -x_14 = l___private_Init_Lean_Trace_2__getResetTraces___rarg(x_3, x_1); -lean_inc(x_4); -x_15 = lean_alloc_closure((void*)(l_Lean_MonadTracerAdapter_traceCtxExcept___rarg___lambda__5), 7, 6); -lean_closure_set(x_15, 0, x_2); -lean_closure_set(x_15, 1, x_1); -lean_closure_set(x_15, 2, x_6); -lean_closure_set(x_15, 3, x_3); -lean_closure_set(x_15, 4, x_4); -lean_closure_set(x_15, 5, x_5); -x_16 = lean_apply_4(x_4, lean_box(0), lean_box(0), x_14, x_15); -return x_16; -} -} -} -lean_object* l_Lean_MonadTracerAdapter_traceCtxExcept___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { -_start: -{ -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_2, 1); -lean_inc(x_7); -x_8 = lean_ctor_get(x_3, 0); -lean_inc(x_8); -lean_inc(x_5); -x_9 = lean_apply_1(x_8, x_5); -lean_inc(x_7); -x_10 = lean_alloc_closure((void*)(l_Lean_MonadTracerAdapter_traceCtxExcept___rarg___lambda__6___boxed), 7, 6); -lean_closure_set(x_10, 0, x_3); -lean_closure_set(x_10, 1, x_1); -lean_closure_set(x_10, 2, x_2); -lean_closure_set(x_10, 3, x_7); -lean_closure_set(x_10, 4, x_6); -lean_closure_set(x_10, 5, x_5); -x_11 = lean_apply_4(x_7, lean_box(0), lean_box(0), x_9, x_10); -return x_11; -} -} -lean_object* l_Lean_MonadTracerAdapter_traceCtxExcept(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = lean_alloc_closure((void*)(l_Lean_MonadTracerAdapter_traceCtxExcept___rarg), 6, 0); -return x_3; -} -} -lean_object* l_Lean_MonadTracerAdapter_traceCtxExcept___rarg___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -uint8_t x_4; lean_object* x_5; -x_4 = lean_unbox(x_3); -lean_dec(x_3); -x_5 = l_Lean_MonadTracerAdapter_traceCtxExcept___rarg___lambda__1(x_1, x_2, x_4); -return x_5; -} -} -lean_object* l_Lean_MonadTracerAdapter_traceCtxExcept___rarg___lambda__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { -_start: -{ -uint8_t x_6; lean_object* x_7; -x_6 = lean_unbox(x_2); -lean_dec(x_2); -x_7 = l_Lean_MonadTracerAdapter_traceCtxExcept___rarg___lambda__2(x_1, x_6, x_3, x_4, x_5); -return x_7; -} -} -lean_object* l_Lean_MonadTracerAdapter_traceCtxExcept___rarg___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) { -_start: -{ -uint8_t x_7; lean_object* x_8; -x_7 = lean_unbox(x_6); -lean_dec(x_6); -x_8 = l_Lean_MonadTracerAdapter_traceCtxExcept___rarg___lambda__3(x_1, x_2, x_3, x_4, x_5, x_7); -return x_8; -} -} -lean_object* l_Lean_MonadTracerAdapter_traceCtxExcept___rarg___lambda__6___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: -{ -uint8_t x_8; lean_object* x_9; -x_8 = lean_unbox(x_7); -lean_dec(x_7); -x_9 = l_Lean_MonadTracerAdapter_traceCtxExcept___rarg___lambda__6(x_1, x_2, x_3, x_4, x_5, x_6, x_8); -return x_9; -} -} -lean_object* l_Lean_MonadTracerAdapter_traceCtxExcept___boxed(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = l_Lean_MonadTracerAdapter_traceCtxExcept(x_1, x_2); -lean_dec(x_2); -return x_3; -} -} -lean_object* l_Lean_monadTracerAdapter___rarg(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; lean_object* x_4; lean_object* x_5; -lean_inc(x_2); -lean_inc(x_1); -x_3 = lean_alloc_closure((void*)(l_Lean_MonadTracerAdapter_traceCtx___rarg), 5, 2); -lean_closure_set(x_3, 0, x_1); -lean_closure_set(x_3, 1, x_2); -x_4 = lean_alloc_closure((void*)(l_Lean_MonadTracerAdapter_trace___rarg), 4, 2); -lean_closure_set(x_4, 0, x_1); -lean_closure_set(x_4, 1, x_2); -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_monadTracerAdapter(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_monadTracerAdapter___rarg), 2, 0); -return x_2; -} -} -lean_object* l_Lean_monadTracerAdapter___boxed(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = l_Lean_monadTracerAdapter(x_1); -lean_dec(x_1); -return x_2; -} -} -lean_object* l_Lean_monadTracerAdapterExcept___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_inc(x_3); -lean_inc(x_1); -x_4 = lean_alloc_closure((void*)(l_Lean_MonadTracerAdapter_traceCtxExcept___rarg), 6, 3); -lean_closure_set(x_4, 0, x_2); -lean_closure_set(x_4, 1, x_1); -lean_closure_set(x_4, 2, x_3); -x_5 = lean_alloc_closure((void*)(l_Lean_MonadTracerAdapter_trace___rarg), 4, 2); -lean_closure_set(x_5, 0, x_1); -lean_closure_set(x_5, 1, x_3); -x_6 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_6, 0, x_4); -lean_ctor_set(x_6, 1, x_5); -return x_6; -} -} -lean_object* l_Lean_monadTracerAdapterExcept(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = lean_alloc_closure((void*)(l_Lean_monadTracerAdapterExcept___rarg), 3, 0); -return x_3; -} -} -lean_object* l_Lean_monadTracerAdapterExcept___boxed(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = l_Lean_monadTracerAdapterExcept(x_1, x_2); -lean_dec(x_2); -return x_3; -} -} -lean_object* _init_l_Lean_TraceState_Inhabited___closed__1() { -_start: -{ -uint8_t x_1; lean_object* x_2; lean_object* x_3; -x_1 = 1; -x_2 = l_Array_empty___closed__1; -x_3 = lean_alloc_ctor(0, 1, 1); -lean_ctor_set(x_3, 0, x_2); -lean_ctor_set_uint8(x_3, sizeof(void*)*1, x_1); -return x_3; -} -} -lean_object* _init_l_Lean_TraceState_Inhabited() { -_start: -{ -lean_object* x_1; -x_1 = l_Lean_TraceState_Inhabited___closed__1; -return x_1; -} -} -lean_object* l_Array_iterateMAux___main___at_Lean_TraceState_Lean_HasFormat___spec__2(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; uint8_t x_7; -x_6 = lean_array_get_size(x_3); -x_7 = lean_nat_dec_lt(x_4, x_6); -lean_dec(x_6); -if (x_7 == 0) -{ -lean_dec(x_4); -lean_dec(x_2); -return x_5; -} -else -{ -lean_object* x_8; lean_object* x_9; uint8_t x_10; lean_object* x_11; lean_object* x_12; -x_8 = lean_array_fget(x_3, x_4); -x_9 = lean_unsigned_to_nat(0u); -x_10 = lean_nat_dec_lt(x_9, x_4); -x_11 = lean_unsigned_to_nat(1u); -x_12 = lean_nat_add(x_4, x_11); -lean_dec(x_4); -if (x_10 == 0) -{ -lean_object* x_13; lean_object* x_14; uint8_t x_15; lean_object* x_16; -x_13 = lean_box(0); -x_14 = l_Lean_MessageData_formatAux___main(x_13, x_8); -x_15 = 0; -x_16 = lean_alloc_ctor(4, 2, 1); -lean_ctor_set(x_16, 0, x_5); -lean_ctor_set(x_16, 1, x_14); -lean_ctor_set_uint8(x_16, sizeof(void*)*2, x_15); -x_4 = x_12; -x_5 = x_16; -goto _start; -} -else -{ -uint8_t x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; -x_18 = 0; -lean_inc(x_2); -x_19 = lean_alloc_ctor(4, 2, 1); -lean_ctor_set(x_19, 0, x_5); -lean_ctor_set(x_19, 1, x_2); -lean_ctor_set_uint8(x_19, sizeof(void*)*2, x_18); -x_20 = lean_box(0); -x_21 = l_Lean_MessageData_formatAux___main(x_20, x_8); -x_22 = lean_alloc_ctor(4, 2, 1); -lean_ctor_set(x_22, 0, x_19); -lean_ctor_set(x_22, 1, x_21); -lean_ctor_set_uint8(x_22, sizeof(void*)*2, x_18); -x_4 = x_12; -x_5 = x_22; -goto _start; -} -} -} -} -lean_object* l_Lean_Format_joinArraySep___at_Lean_TraceState_Lean_HasFormat___spec__1(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; lean_object* x_4; lean_object* x_5; -x_3 = lean_unsigned_to_nat(0u); -x_4 = lean_box(0); -x_5 = l_Array_iterateMAux___main___at_Lean_TraceState_Lean_HasFormat___spec__2(x_1, x_2, x_1, x_3, x_4); -return x_5; -} -} -lean_object* l_Lean_TraceState_Lean_HasFormat(lean_object* x_1) { -_start: -{ -lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; -x_2 = lean_ctor_get(x_1, 0); -x_3 = lean_box(1); -x_4 = lean_unsigned_to_nat(0u); -x_5 = lean_box(0); -x_6 = l_Array_iterateMAux___main___at_Lean_TraceState_Lean_HasFormat___spec__2(x_2, x_3, x_2, x_4, x_5); -return x_6; -} -} -lean_object* l_Array_iterateMAux___main___at_Lean_TraceState_Lean_HasFormat___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { -_start: -{ -lean_object* x_6; -x_6 = l_Array_iterateMAux___main___at_Lean_TraceState_Lean_HasFormat___spec__2(x_1, x_2, x_3, x_4, x_5); -lean_dec(x_3); -lean_dec(x_1); -return x_6; -} -} -lean_object* l_Lean_Format_joinArraySep___at_Lean_TraceState_Lean_HasFormat___spec__1___boxed(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = l_Lean_Format_joinArraySep___at_Lean_TraceState_Lean_HasFormat___spec__1(x_1, x_2); -lean_dec(x_1); -return x_3; -} -} -lean_object* l_Lean_TraceState_Lean_HasFormat___boxed(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = l_Lean_TraceState_Lean_HasFormat(x_1); -lean_dec(x_1); -return x_2; -} -} -lean_object* l_Lean_fmt___at_Lean_TraceState_HasToString___spec__1(lean_object* x_1) { -_start: -{ -lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; -x_2 = lean_ctor_get(x_1, 0); -x_3 = lean_box(1); -x_4 = lean_unsigned_to_nat(0u); -x_5 = lean_box(0); -x_6 = l_Array_iterateMAux___main___at_Lean_TraceState_Lean_HasFormat___spec__2(x_2, x_3, x_2, x_4, x_5); -return x_6; -} -} -lean_object* _init_l_Lean_TraceState_HasToString___closed__1() { -_start: -{ -lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Lean_fmt___at_Lean_TraceState_HasToString___spec__1___boxed), 1, 0); -return x_1; -} -} -lean_object* _init_l_Lean_TraceState_HasToString___closed__2() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_HasRepr___closed__1; -x_2 = l_Lean_TraceState_HasToString___closed__1; -x_3 = lean_alloc_closure((void*)(l_Function_comp___rarg), 3, 2); -lean_closure_set(x_3, 0, x_1); -lean_closure_set(x_3, 1, x_2); -return x_3; -} -} -lean_object* _init_l_Lean_TraceState_HasToString() { -_start: -{ -lean_object* x_1; -x_1 = l_Lean_TraceState_HasToString___closed__2; -return x_1; -} -} -lean_object* l_Lean_fmt___at_Lean_TraceState_HasToString___spec__1___boxed(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = l_Lean_fmt___at_Lean_TraceState_HasToString___spec__1(x_1); -lean_dec(x_1); -return x_2; -} -} -uint8_t l___private_Init_Lean_Trace_3__checkTraceOptionAux___main(lean_object* x_1, lean_object* x_2) { -_start: -{ -if (lean_obj_tag(x_2) == 1) -{ -lean_object* x_3; uint8_t x_4; uint8_t x_5; -x_3 = lean_ctor_get(x_2, 0); -x_4 = 0; -x_5 = l_Lean_KVMap_getBool(x_1, x_2, x_4); -if (x_5 == 0) -{ -uint8_t x_6; -x_6 = l_Lean_KVMap_contains(x_1, x_2); -if (x_6 == 0) -{ -x_2 = x_3; -goto _start; -} -else -{ -return x_5; -} -} -else -{ -uint8_t x_8; -x_8 = 1; -return x_8; -} -} -else -{ -uint8_t x_9; -x_9 = 0; -return x_9; -} -} -} -lean_object* l___private_Init_Lean_Trace_3__checkTraceOptionAux___main___boxed(lean_object* x_1, lean_object* x_2) { -_start: -{ -uint8_t x_3; lean_object* x_4; -x_3 = l___private_Init_Lean_Trace_3__checkTraceOptionAux___main(x_1, x_2); -lean_dec(x_2); -lean_dec(x_1); -x_4 = lean_box(x_3); -return x_4; -} -} -uint8_t l___private_Init_Lean_Trace_3__checkTraceOptionAux(lean_object* x_1, lean_object* x_2) { -_start: -{ -uint8_t x_3; -x_3 = l___private_Init_Lean_Trace_3__checkTraceOptionAux___main(x_1, x_2); -return x_3; -} -} -lean_object* l___private_Init_Lean_Trace_3__checkTraceOptionAux___boxed(lean_object* x_1, lean_object* x_2) { -_start: -{ -uint8_t x_3; lean_object* x_4; -x_3 = l___private_Init_Lean_Trace_3__checkTraceOptionAux(x_1, x_2); -lean_dec(x_2); -lean_dec(x_1); -x_4 = lean_box(x_3); -return x_4; -} -} -lean_object* l___private_Init_Lean_Trace_4__checkTraceOption___rarg___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -uint8_t x_4; -x_4 = l_List_isEmpty___rarg(x_3); -if (x_4 == 0) -{ -lean_object* x_5; lean_object* x_6; uint8_t x_7; lean_object* x_8; lean_object* x_9; -x_5 = lean_ctor_get(x_1, 0); -lean_inc(x_5); -lean_dec(x_1); -x_6 = lean_ctor_get(x_5, 1); -lean_inc(x_6); -lean_dec(x_5); -x_7 = l___private_Init_Lean_Trace_3__checkTraceOptionAux___main(x_3, x_2); -x_8 = lean_box(x_7); -x_9 = lean_apply_2(x_6, lean_box(0), x_8); -return x_9; -} -else -{ -lean_object* x_10; lean_object* x_11; uint8_t x_12; lean_object* x_13; lean_object* x_14; -x_10 = lean_ctor_get(x_1, 0); -lean_inc(x_10); -lean_dec(x_1); -x_11 = lean_ctor_get(x_10, 1); -lean_inc(x_11); -lean_dec(x_10); -x_12 = 0; -x_13 = lean_box(x_12); -x_14 = lean_apply_2(x_11, lean_box(0), x_13); -return x_14; -} -} -} -lean_object* l___private_Init_Lean_Trace_4__checkTraceOption___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); -x_5 = lean_ctor_get(x_2, 0); -lean_inc(x_5); -lean_dec(x_2); -x_6 = lean_alloc_closure((void*)(l___private_Init_Lean_Trace_4__checkTraceOption___rarg___lambda__1___boxed), 3, 2); -lean_closure_set(x_6, 0, x_1); -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_Lean_Trace_4__checkTraceOption(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l___private_Init_Lean_Trace_4__checkTraceOption___rarg), 3, 0); -return x_2; -} -} -lean_object* l___private_Init_Lean_Trace_4__checkTraceOption___rarg___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; -x_4 = l___private_Init_Lean_Trace_4__checkTraceOption___rarg___lambda__1(x_1, x_2, x_3); -lean_dec(x_3); -lean_dec(x_2); -return x_4; -} -} -lean_object* l___private_Init_Lean_Trace_4__checkTraceOption___boxed(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = l___private_Init_Lean_Trace_4__checkTraceOption(x_1); -lean_dec(x_1); -return x_2; -} -} -lean_object* _init_l_Lean_SimpleMonadTracerAdapter_isTracingEnabledFor___rarg___lambda__1___closed__1() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string("trace"); -return x_1; -} -} -lean_object* _init_l_Lean_SimpleMonadTracerAdapter_isTracingEnabledFor___rarg___lambda__1___closed__2() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = lean_box(0); -x_2 = l_Lean_SimpleMonadTracerAdapter_isTracingEnabledFor___rarg___lambda__1___closed__1; -x_3 = lean_name_mk_string(x_1, x_2); -return x_3; -} -} -lean_object* l_Lean_SimpleMonadTracerAdapter_isTracingEnabledFor___rarg___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -uint8_t x_5; -x_5 = lean_ctor_get_uint8(x_4, sizeof(void*)*1); -if (x_5 == 0) -{ -lean_object* x_6; lean_object* x_7; uint8_t x_8; lean_object* x_9; lean_object* x_10; -lean_dec(x_3); -lean_dec(x_2); -x_6 = lean_ctor_get(x_1, 0); -lean_inc(x_6); -lean_dec(x_1); -x_7 = lean_ctor_get(x_6, 1); -lean_inc(x_7); -lean_dec(x_6); -x_8 = 0; -x_9 = lean_box(x_8); -x_10 = lean_apply_2(x_7, lean_box(0), x_9); -return x_10; -} -else -{ -lean_object* x_11; lean_object* x_12; lean_object* x_13; -x_11 = l_Lean_SimpleMonadTracerAdapter_isTracingEnabledFor___rarg___lambda__1___closed__2; -x_12 = l_Lean_Name_append___main(x_11, x_2); -x_13 = l___private_Init_Lean_Trace_4__checkTraceOption___rarg(x_1, x_3, x_12); -return x_13; -} -} -} -lean_object* l_Lean_SimpleMonadTracerAdapter_isTracingEnabledFor___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); -x_5 = lean_ctor_get(x_2, 2); -lean_inc(x_5); -x_6 = lean_alloc_closure((void*)(l_Lean_SimpleMonadTracerAdapter_isTracingEnabledFor___rarg___lambda__1___boxed), 4, 3); -lean_closure_set(x_6, 0, x_1); -lean_closure_set(x_6, 1, x_3); -lean_closure_set(x_6, 2, x_2); -x_7 = lean_apply_4(x_4, lean_box(0), lean_box(0), x_5, x_6); -return x_7; -} -} -lean_object* l_Lean_SimpleMonadTracerAdapter_isTracingEnabledFor(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_SimpleMonadTracerAdapter_isTracingEnabledFor___rarg), 3, 0); -return x_2; -} -} -lean_object* l_Lean_SimpleMonadTracerAdapter_isTracingEnabledFor___rarg___lambda__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_Lean_SimpleMonadTracerAdapter_isTracingEnabledFor___rarg___lambda__1(x_1, x_2, x_3, x_4); -lean_dec(x_4); -return x_5; -} -} -lean_object* l_Lean_SimpleMonadTracerAdapter_isTracingEnabledFor___boxed(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = l_Lean_SimpleMonadTracerAdapter_isTracingEnabledFor(x_1); -lean_dec(x_1); -return x_2; -} -} -lean_object* l_Lean_SimpleMonadTracerAdapter_enableTracing___rarg___lambda__1(uint8_t x_1, lean_object* x_2) { -_start: -{ -uint8_t x_3; -x_3 = !lean_is_exclusive(x_2); -if (x_3 == 0) -{ -lean_ctor_set_uint8(x_2, sizeof(void*)*1, x_1); -return x_2; -} -else -{ -lean_object* x_4; lean_object* x_5; -x_4 = lean_ctor_get(x_2, 0); -lean_inc(x_4); -lean_dec(x_2); -x_5 = lean_alloc_ctor(0, 1, 1); -lean_ctor_set(x_5, 0, x_4); -lean_ctor_set_uint8(x_5, sizeof(void*)*1, x_1); -return x_5; -} -} -} -lean_object* l_Lean_SimpleMonadTracerAdapter_enableTracing___rarg___lambda__2(lean_object* x_1, uint8_t 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, 0); -lean_inc(x_4); -lean_dec(x_1); -x_5 = lean_ctor_get(x_4, 1); -lean_inc(x_5); -lean_dec(x_4); -x_6 = lean_box(x_2); -x_7 = lean_apply_2(x_5, lean_box(0), x_6); -return x_7; -} -} -lean_object* l_Lean_SimpleMonadTracerAdapter_enableTracing___rarg___lambda__3(lean_object* x_1, uint8_t x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { -_start: -{ -uint8_t x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; -x_6 = lean_ctor_get_uint8(x_5, sizeof(void*)*1); -x_7 = lean_ctor_get(x_1, 1); -lean_inc(x_7); -lean_dec(x_1); -x_8 = lean_box(x_2); -x_9 = lean_alloc_closure((void*)(l_Lean_SimpleMonadTracerAdapter_enableTracing___rarg___lambda__1___boxed), 2, 1); -lean_closure_set(x_9, 0, x_8); -x_10 = lean_apply_1(x_7, x_9); -x_11 = lean_box(x_6); -x_12 = lean_alloc_closure((void*)(l_Lean_SimpleMonadTracerAdapter_enableTracing___rarg___lambda__2___boxed), 3, 2); -lean_closure_set(x_12, 0, x_3); -lean_closure_set(x_12, 1, x_11); -x_13 = lean_apply_4(x_4, lean_box(0), lean_box(0), x_10, x_12); -return x_13; -} -} -lean_object* l_Lean_SimpleMonadTracerAdapter_enableTracing___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; lean_object* x_7; lean_object* x_8; -x_4 = lean_ctor_get(x_1, 1); -lean_inc(x_4); -x_5 = lean_ctor_get(x_2, 2); -lean_inc(x_5); -x_6 = lean_box(x_3); -lean_inc(x_4); -x_7 = lean_alloc_closure((void*)(l_Lean_SimpleMonadTracerAdapter_enableTracing___rarg___lambda__3___boxed), 5, 4); -lean_closure_set(x_7, 0, x_2); -lean_closure_set(x_7, 1, x_6); -lean_closure_set(x_7, 2, x_1); -lean_closure_set(x_7, 3, x_4); -x_8 = lean_apply_4(x_4, lean_box(0), lean_box(0), x_5, x_7); -return x_8; -} -} -lean_object* l_Lean_SimpleMonadTracerAdapter_enableTracing(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_SimpleMonadTracerAdapter_enableTracing___rarg___boxed), 3, 0); -return x_2; -} -} -lean_object* l_Lean_SimpleMonadTracerAdapter_enableTracing___rarg___lambda__1___boxed(lean_object* x_1, lean_object* x_2) { -_start: -{ -uint8_t x_3; lean_object* x_4; -x_3 = lean_unbox(x_1); -lean_dec(x_1); -x_4 = l_Lean_SimpleMonadTracerAdapter_enableTracing___rarg___lambda__1(x_3, x_2); -return x_4; -} -} -lean_object* l_Lean_SimpleMonadTracerAdapter_enableTracing___rarg___lambda__2___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 = l_Lean_SimpleMonadTracerAdapter_enableTracing___rarg___lambda__2(x_1, x_4, x_3); -lean_dec(x_3); -return x_5; -} -} -lean_object* l_Lean_SimpleMonadTracerAdapter_enableTracing___rarg___lambda__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { -_start: -{ -uint8_t x_6; lean_object* x_7; -x_6 = lean_unbox(x_2); -lean_dec(x_2); -x_7 = l_Lean_SimpleMonadTracerAdapter_enableTracing___rarg___lambda__3(x_1, x_6, x_3, x_4, x_5); -lean_dec(x_5); -return x_7; -} -} -lean_object* l_Lean_SimpleMonadTracerAdapter_enableTracing___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_Lean_SimpleMonadTracerAdapter_enableTracing___rarg(x_1, x_2, x_4); -return x_5; -} -} -lean_object* l_Lean_SimpleMonadTracerAdapter_enableTracing___boxed(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = l_Lean_SimpleMonadTracerAdapter_enableTracing(x_1); -lean_dec(x_1); -return x_2; -} -} -lean_object* l_Lean_SimpleMonadTracerAdapter_getTraces___rarg___lambda__1(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, 0); -lean_inc(x_3); -lean_dec(x_1); -x_4 = lean_ctor_get(x_3, 1); -lean_inc(x_4); -lean_dec(x_3); -x_5 = lean_ctor_get(x_2, 0); -lean_inc(x_5); -lean_dec(x_2); -x_6 = lean_apply_2(x_4, lean_box(0), x_5); -return x_6; -} -} -lean_object* l_Lean_SimpleMonadTracerAdapter_getTraces___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); -x_4 = lean_ctor_get(x_2, 2); -lean_inc(x_4); -lean_dec(x_2); -x_5 = lean_alloc_closure((void*)(l_Lean_SimpleMonadTracerAdapter_getTraces___rarg___lambda__1), 2, 1); -lean_closure_set(x_5, 0, x_1); -x_6 = lean_apply_4(x_3, lean_box(0), lean_box(0), x_4, x_5); -return x_6; -} -} -lean_object* l_Lean_SimpleMonadTracerAdapter_getTraces(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_SimpleMonadTracerAdapter_getTraces___rarg), 2, 0); -return x_2; -} -} -lean_object* l_Lean_SimpleMonadTracerAdapter_getTraces___boxed(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = l_Lean_SimpleMonadTracerAdapter_getTraces(x_1); -lean_dec(x_1); -return x_2; -} -} -lean_object* l_Lean_SimpleMonadTracerAdapter_modifyTraces___rarg___lambda__1(lean_object* x_1, lean_object* x_2) { -_start: -{ -uint8_t x_3; -x_3 = !lean_is_exclusive(x_2); -if (x_3 == 0) -{ -lean_object* x_4; lean_object* x_5; -x_4 = lean_ctor_get(x_2, 0); -x_5 = lean_apply_1(x_1, x_4); -lean_ctor_set(x_2, 0, x_5); -return x_2; -} -else -{ -uint8_t x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; -x_6 = lean_ctor_get_uint8(x_2, sizeof(void*)*1); -x_7 = lean_ctor_get(x_2, 0); -lean_inc(x_7); -lean_dec(x_2); -x_8 = lean_apply_1(x_1, x_7); -x_9 = lean_alloc_ctor(0, 1, 1); -lean_ctor_set(x_9, 0, x_8); -lean_ctor_set_uint8(x_9, sizeof(void*)*1, x_6); -return x_9; -} -} -} -lean_object* l_Lean_SimpleMonadTracerAdapter_modifyTraces___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_ctor_get(x_1, 1); -lean_inc(x_3); -lean_dec(x_1); -x_4 = lean_alloc_closure((void*)(l_Lean_SimpleMonadTracerAdapter_modifyTraces___rarg___lambda__1), 2, 1); -lean_closure_set(x_4, 0, x_2); -x_5 = lean_apply_1(x_3, x_4); -return x_5; -} -} -lean_object* l_Lean_SimpleMonadTracerAdapter_modifyTraces(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = lean_alloc_closure((void*)(l_Lean_SimpleMonadTracerAdapter_modifyTraces___rarg), 2, 0); -return x_3; -} -} -lean_object* l_Lean_SimpleMonadTracerAdapter_modifyTraces___boxed(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = l_Lean_SimpleMonadTracerAdapter_modifyTraces(x_1, x_2); -lean_dec(x_2); -lean_dec(x_1); -return x_3; -} -} -lean_object* l_Lean_simpleMonadTracerAdapter___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; lean_object* x_9; lean_object* x_10; -lean_inc(x_1); -lean_inc(x_2); -x_3 = lean_alloc_closure((void*)(l_Lean_SimpleMonadTracerAdapter_isTracingEnabledFor___rarg), 3, 2); -lean_closure_set(x_3, 0, x_2); -lean_closure_set(x_3, 1, x_1); -lean_inc(x_1); -lean_inc(x_2); -x_4 = lean_alloc_closure((void*)(l_Lean_SimpleMonadTracerAdapter_enableTracing___rarg___boxed), 3, 2); -lean_closure_set(x_4, 0, x_2); -lean_closure_set(x_4, 1, x_1); -x_5 = lean_ctor_get(x_2, 1); -lean_inc(x_5); -x_6 = lean_ctor_get(x_1, 2); -lean_inc(x_6); -x_7 = lean_alloc_closure((void*)(l_Lean_SimpleMonadTracerAdapter_getTraces___rarg___lambda__1), 2, 1); -lean_closure_set(x_7, 0, x_2); -x_8 = lean_apply_4(x_5, lean_box(0), lean_box(0), x_6, x_7); -x_9 = lean_alloc_closure((void*)(l_Lean_SimpleMonadTracerAdapter_modifyTraces___rarg), 2, 1); -lean_closure_set(x_9, 0, x_1); -x_10 = lean_alloc_ctor(0, 4, 0); -lean_ctor_set(x_10, 0, x_3); -lean_ctor_set(x_10, 1, x_4); -lean_ctor_set(x_10, 2, x_8); -lean_ctor_set(x_10, 3, x_9); -return x_10; -} -} -lean_object* l_Lean_simpleMonadTracerAdapter(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_simpleMonadTracerAdapter___rarg), 2, 0); -return x_2; -} -} -lean_object* l_Lean_simpleMonadTracerAdapter___boxed(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = l_Lean_simpleMonadTracerAdapter(x_1); -lean_dec(x_1); -return x_2; -} -} -lean_object* initialize_Init_Lean_Message(lean_object*); -static bool _G_initialized = false; -lean_object* initialize_Init_Lean_Trace(lean_object* w) { -lean_object * res; -if (_G_initialized) return lean_mk_io_result(lean_box(0)); -_G_initialized = true; -res = initialize_Init_Lean_Message(lean_io_mk_world()); -if (lean_io_result_is_error(res)) return res; -lean_dec_ref(res); -l_Lean_TraceState_Inhabited___closed__1 = _init_l_Lean_TraceState_Inhabited___closed__1(); -lean_mark_persistent(l_Lean_TraceState_Inhabited___closed__1); -l_Lean_TraceState_Inhabited = _init_l_Lean_TraceState_Inhabited(); -lean_mark_persistent(l_Lean_TraceState_Inhabited); -l_Lean_TraceState_HasToString___closed__1 = _init_l_Lean_TraceState_HasToString___closed__1(); -lean_mark_persistent(l_Lean_TraceState_HasToString___closed__1); -l_Lean_TraceState_HasToString___closed__2 = _init_l_Lean_TraceState_HasToString___closed__2(); -lean_mark_persistent(l_Lean_TraceState_HasToString___closed__2); -l_Lean_TraceState_HasToString = _init_l_Lean_TraceState_HasToString(); -lean_mark_persistent(l_Lean_TraceState_HasToString); -l_Lean_SimpleMonadTracerAdapter_isTracingEnabledFor___rarg___lambda__1___closed__1 = _init_l_Lean_SimpleMonadTracerAdapter_isTracingEnabledFor___rarg___lambda__1___closed__1(); -lean_mark_persistent(l_Lean_SimpleMonadTracerAdapter_isTracingEnabledFor___rarg___lambda__1___closed__1); -l_Lean_SimpleMonadTracerAdapter_isTracingEnabledFor___rarg___lambda__1___closed__2 = _init_l_Lean_SimpleMonadTracerAdapter_isTracingEnabledFor___rarg___lambda__1___closed__2(); -lean_mark_persistent(l_Lean_SimpleMonadTracerAdapter_isTracingEnabledFor___rarg___lambda__1___closed__2); -return lean_mk_io_result(lean_box(0)); -} -#ifdef __cplusplus -} -#endif diff --git a/stage0/stdlib/Init/Lean/Util.c b/stage0/stdlib/Init/Lean/Util.c deleted file mode 100644 index 3264575831..0000000000 --- a/stage0/stdlib/Init/Lean/Util.c +++ /dev/null @@ -1,77 +0,0 @@ -// Lean compiler output -// Module: Init.Lean.Util -// Imports: Init.System.IO Init.Lean.Data.Position -#include "runtime/lean.h" -#if defined(__clang__) -#pragma clang diagnostic ignored "-Wunused-parameter" -#pragma clang diagnostic ignored "-Wunused-label" -#elif defined(__GNUC__) && !defined(__CLANG__) -#pragma GCC diagnostic ignored "-Wunused-parameter" -#pragma GCC diagnostic ignored "-Wunused-label" -#pragma GCC diagnostic ignored "-Wunused-but-set-variable" -#endif -#ifdef __cplusplus -extern "C" { -#endif -lean_object* lean_lean_profileit(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_IO_lazyPure___rarg(lean_object*, lean_object*); -lean_object* l_Lean_profileitPure___rarg(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_profileit___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_profileitPure(lean_object*); -lean_object* l_Lean_profileitPure___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_profileit___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { -_start: -{ -lean_object* x_6; -x_6 = lean_lean_profileit(x_2, x_3, x_4, x_5); -lean_dec(x_3); -lean_dec(x_2); -return x_6; -} -} -lean_object* l_Lean_profileitPure___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_alloc_closure((void*)(l_IO_lazyPure___rarg), 2, 1); -lean_closure_set(x_5, 0, x_3); -x_6 = lean_lean_profileit(x_1, x_2, x_5, x_4); -return x_6; -} -} -lean_object* l_Lean_profileitPure(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_profileitPure___rarg___boxed), 4, 0); -return x_2; -} -} -lean_object* l_Lean_profileitPure___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -lean_object* x_5; -x_5 = l_Lean_profileitPure___rarg(x_1, x_2, x_3, x_4); -lean_dec(x_2); -lean_dec(x_1); -return x_5; -} -} -lean_object* initialize_Init_System_IO(lean_object*); -lean_object* initialize_Init_Lean_Data_Position(lean_object*); -static bool _G_initialized = false; -lean_object* initialize_Init_Lean_Util(lean_object* w) { -lean_object * res; -if (_G_initialized) return lean_mk_io_result(lean_box(0)); -_G_initialized = true; -res = initialize_Init_System_IO(lean_io_mk_world()); -if (lean_io_result_is_error(res)) return res; -lean_dec_ref(res); -res = initialize_Init_Lean_Data_Position(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)); -} -#ifdef __cplusplus -} -#endif diff --git a/stage0/stdlib/Init/Lean/WHNF.c b/stage0/stdlib/Init/Lean/WHNF.c deleted file mode 100644 index 56c2a4a53e..0000000000 --- a/stage0/stdlib/Init/Lean/WHNF.c +++ /dev/null @@ -1,4200 +0,0 @@ -// Lean compiler output -// Module: Init.Lean.WHNF -// Imports: Init.Lean.Declaration Init.Lean.LocalContext -#include "runtime/lean.h" -#if defined(__clang__) -#pragma clang diagnostic ignored "-Wunused-parameter" -#pragma clang diagnostic ignored "-Wunused-label" -#elif defined(__GNUC__) && !defined(__CLANG__) -#pragma GCC diagnostic ignored "-Wunused-parameter" -#pragma GCC diagnostic ignored "-Wunused-label" -#pragma GCC diagnostic ignored "-Wunused-but-set-variable" -#endif -#ifdef __cplusplus -extern "C" { -#endif -lean_object* l___private_Init_Lean_WHNF_3__toCtorIfLit___closed__2; -lean_object* l___private_Init_Lean_WHNF_2__mkNullaryCtor___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WHNF_reduceQuotRec___rarg___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WHNF_getStuckMVar___main___boxed(lean_object*); -lean_object* l___private_Init_Lean_WHNF_3__toCtorIfLit___boxed(lean_object*); -uint8_t l___private_Init_Lean_WHNF_4__getRecRuleFor___lambda__1(lean_object*, lean_object*); -lean_object* l_Lean_WHNF_whnfCore___main___rarg___lambda__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WHNF_reduceRec___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WHNF_whnfEasyCases___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WHNF_whnfCore___main___boxed(lean_object*); -lean_object* l_Lean_WHNF_matchConstAux___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l___private_Init_Lean_WHNF_3__toCtorIfLit___closed__1; -lean_object* lean_mk_empty_array_with_capacity(lean_object*); -lean_object* l___private_Init_Lean_WHNF_1__getFirstCtor___rarg___lambda__1(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WHNF_unfoldDefinitionAux___boxed(lean_object*); -lean_object* l_Lean_WHNF_whnfEasyCases___main___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_unreachable_x21___rarg(lean_object*); -lean_object* l_Lean_WHNF_matchConstAux(lean_object*, lean_object*); -lean_object* l___private_Init_Lean_WHNF_10__whnfCoreUnstuck(lean_object*); -lean_object* l___private_Init_Lean_WHNF_3__toCtorIfLit___closed__4; -lean_object* l___private_Init_Lean_WHNF_10__whnfCoreUnstuck___main___rarg___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l___private_Init_Lean_WHNF_4__getRecRuleFor(lean_object*, lean_object*); -lean_object* l_Lean_WHNF_whnfMain___main(lean_object*); -lean_object* l___private_Init_Lean_WHNF_5__toCtorWhenK___rarg___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WHNF_whnfMain___boxed(lean_object*); -uint8_t l___private_Init_Lean_WHNF_6__isIdRhsApp(lean_object*); -lean_object* l___private_Init_Lean_WHNF_5__toCtorWhenK___rarg___lambda__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WHNF_reduceQuotRec___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l___private_Init_Lean_WHNF_5__toCtorWhenK___rarg___lambda__1(lean_object*, lean_object*, uint8_t); -lean_object* l___private_Init_Lean_WHNF_2__mkNullaryCtor(lean_object*); -lean_object* l___private_Init_Lean_WHNF_4__getRecRuleFor___boxed(lean_object*, lean_object*); -lean_object* l___private_Init_Lean_WHNF_10__whnfCoreUnstuck___main___boxed(lean_object*); -uint8_t lean_name_eq(lean_object*, lean_object*); -lean_object* l_Lean_WHNF_getStuckMVar___main___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l___private_Init_Lean_WHNF_1__getFirstCtor(lean_object*); -lean_object* l___private_Init_Lean_WHNF_10__whnfCoreUnstuck___main___rarg___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WHNF_whnfCore___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -uint8_t l_Lean_Expr_isAppOf(lean_object*, lean_object*); -lean_object* lean_expr_instantiate1(lean_object*, lean_object*); -lean_object* lean_array_get_size(lean_object*); -lean_object* l_Lean_WHNF_whnfEasyCases___main___rarg___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WHNF_getStuckMVar___main___rarg(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WHNF_matchConstAux___boxed(lean_object*, lean_object*); -lean_object* l___private_Init_Lean_WHNF_5__toCtorWhenK___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Expr_getAppFn___main(lean_object*); -lean_object* l___private_Init_Lean_WHNF_9__deltaBetaDefinition___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -extern lean_object* l_Lean_Expr_getAppArgs___closed__1; -lean_object* l___private_Init_Lean_WHNF_10__whnfCoreUnstuck___main___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WHNF_isRecStuck___boxed(lean_object*); -lean_object* l_Lean_WHNF_unfoldDefinitionAux___rarg___lambda__7___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WHNF_smartUnfoldingSuffix___closed__1; -lean_object* l_Lean_WHNF_whnfCore___main___rarg___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_List_find___main___rarg(lean_object*, lean_object*); -lean_object* l_Lean_WHNF_getStuckMVar(lean_object*); -lean_object* l___private_Init_Lean_WHNF_10__whnfCoreUnstuck___main(lean_object*); -lean_object* lean_nat_add(lean_object*, lean_object*); -lean_object* l_Lean_Expr_hasExprMVar___boxed(lean_object*); -lean_object* l_Lean_WHNF_reduceQuotRec___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WHNF_unfoldDefinitionAux___rarg___lambda__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Expr_getAppNumArgsAux___main(lean_object*, lean_object*); -lean_object* l_Lean_WHNF_isQuotRecStuck___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WHNF_isQuotRecStuck(lean_object*); -lean_object* l_Lean_RecursorVal_getMajorIdx(lean_object*); -lean_object* l___private_Init_Lean_WHNF_1__getFirstCtor___boxed(lean_object*); -lean_object* l_Lean_WHNF_whnfCore___main___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* lean_array_fget(lean_object*, lean_object*); -uint8_t lean_nat_dec_eq(lean_object*, lean_object*); -lean_object* l_Lean_WHNF_reduceQuotRec___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WHNF_unfoldDefinitionAux(lean_object*); -lean_object* l___private_Init_Lean_WHNF_3__toCtorIfLit(lean_object*); -lean_object* l___private_Init_Lean_WHNF_2__mkNullaryCtor___rarg(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* lean_nat_sub(lean_object*, lean_object*); -lean_object* l_Lean_WHNF_getStuckMVar___boxed(lean_object*); -lean_object* l_Array_shrink___main___rarg(lean_object*, lean_object*); -lean_object* l___private_Init_Lean_WHNF_10__whnfCoreUnstuck___boxed(lean_object*); -lean_object* l___private_Init_Lean_WHNF_5__toCtorWhenK___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l___private_Init_Lean_WHNF_8__deltaDefinition(lean_object*); -uint8_t l_Lean_Expr_hasExprMVar(lean_object*); -lean_object* lean_array_get(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WHNF_whnfEasyCases___main___boxed(lean_object*); -lean_object* l___private_Init_Lean_WHNF_3__toCtorIfLit___closed__5; -lean_object* l_Lean_WHNF_reduceRec___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l___private_Init_Lean_Expr_2__mkAppRangeAux___main(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_List_lengthAux___main___rarg(lean_object*, lean_object*); -lean_object* l_Lean_Expr_instantiateLevelParams(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_ConstantInfo_name(lean_object*); -lean_object* l_Lean_WHNF_whnfCore___main___rarg___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l___private_Init_Lean_WHNF_10__whnfCoreUnstuck___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l___private_Init_Lean_WHNF_3__toCtorIfLit___closed__3; -lean_object* l_Lean_WHNF_whnfCore___main___rarg___lambda__7(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* lean_name_mk_string(lean_object*, lean_object*); -lean_object* l_Lean_WHNF_whnfMain(lean_object*); -lean_object* l_Lean_WHNF_whnfCore(lean_object*); -uint8_t l_Lean_ConstantInfo_hasValue(lean_object*); -lean_object* l_Lean_WHNF_whnfMain___main___boxed(lean_object*); -lean_object* l___private_Init_Lean_WHNF_2__mkNullaryCtor___boxed(lean_object*); -lean_object* l_Lean_WHNF_unfoldDefinitionAux___rarg___lambda__1(lean_object*, lean_object*); -lean_object* l_Lean_WHNF_getStuckMVar___main(lean_object*); -lean_object* l_Lean_WHNF_getStuckMVar___main___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WHNF_reduceRec___boxed(lean_object*, lean_object*); -extern lean_object* l_Lean_Literal_type___closed__2; -lean_object* l___private_Init_Lean_WHNF_5__toCtorWhenK___boxed(lean_object*); -uint8_t l_Lean_Expr_isConstOf(lean_object*, lean_object*); -lean_object* l_Lean_WHNF_unfoldDefinitionAux___rarg___lambda__4___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l___private_Init_Lean_Expr_3__getAppArgsAux___main(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WHNF_reduceRec___rarg___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WHNF_whnfCore___main___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WHNF_smartUnfoldingSuffix; -lean_object* l_Lean_WHNF_reduceQuotRec___boxed(lean_object*, lean_object*); -extern lean_object* l_Id_Monad; -uint8_t l_Lean_Expr_isLambda(lean_object*); -lean_object* l_Lean_WHNF_whnfMain___main___rarg___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WHNF_unfoldDefinitionAux___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WHNF_unfoldDefinitionAux___rarg___lambda__7(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_RecursorVal_getInduct(lean_object*); -lean_object* l_Lean_WHNF_matchConstAux___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_LocalDecl_value_x3f(lean_object*); -lean_object* l_Lean_ConstantInfo_lparams(lean_object*); -lean_object* l_Lean_WHNF_unfoldDefinitionAux___rarg___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* lean_instantiate_value_lparams(lean_object*, lean_object*); -lean_object* l_Lean_WHNF_reduceRec___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WHNF_unfoldDefinitionAux___rarg___lambda__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WHNF_whnfEasyCases___main___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l___private_Init_Lean_WHNF_7__extractIdRhs(lean_object*); -lean_object* l_Lean_WHNF_unfoldDefinitionAux___rarg___lambda__1___boxed(lean_object*, lean_object*); -lean_object* l_Lean_WHNF_reduceQuotRec(lean_object*, lean_object*); -uint8_t lean_expr_eqv(lean_object*, lean_object*); -lean_object* l___private_Init_Lean_Expr_4__getAppRevArgsAux___main(lean_object*, lean_object*); -lean_object* l_Lean_WHNF_whnfCore___main___rarg___lambda__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_mkApp(lean_object*, lean_object*); -lean_object* l_Lean_Expr_betaRev(lean_object*, lean_object*); -lean_object* l___private_Init_Lean_WHNF_1__getFirstCtor___rarg(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WHNF_reduceRec(lean_object*, lean_object*); -lean_object* l_Lean_WHNF_unfoldDefinitionAux___rarg___lambda__2(lean_object*, lean_object*); -lean_object* l___private_Init_Lean_WHNF_5__toCtorWhenK(lean_object*); -lean_object* l_Lean_Expr_updateFn___main(lean_object*, lean_object*); -lean_object* l_Lean_WHNF_getStuckMVar___rarg(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WHNF_unfoldDefinitionAux___rarg___lambda__6(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WHNF_whnfEasyCases___main___rarg___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l___private_Init_Lean_WHNF_8__deltaDefinition___rarg(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l___private_Init_Lean_WHNF_10__whnfCoreUnstuck___main___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l___private_Init_Lean_WHNF_5__toCtorWhenK___rarg___lambda__4___closed__1; -lean_object* l___private_Init_Lean_WHNF_4__getRecRuleFor___lambda__1___boxed(lean_object*, lean_object*); -lean_object* l_Lean_WHNF_mkSmartUnfoldingNameFor(lean_object*); -lean_object* l_Lean_WHNF_whnfCore___main___rarg___lambda__6(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WHNF_isQuotRecStuck___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -extern lean_object* l_Lean_Expr_Inhabited; -lean_object* l_Lean_WHNF_whnfEasyCases(lean_object*); -lean_object* lean_mk_array(lean_object*, lean_object*); -lean_object* l_Lean_WHNF_isQuotRecStuck___boxed(lean_object*); -lean_object* l___private_Init_Lean_WHNF_5__toCtorWhenK___rarg___lambda__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WHNF_whnfCore___main___rarg___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, uint8_t); -lean_object* l_Lean_WHNF_whnfEasyCases___boxed(lean_object*); -lean_object* l_Lean_WHNF_whnfMain___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l___private_Init_Lean_WHNF_9__deltaBetaDefinition(lean_object*); -lean_object* l_Lean_WHNF_whnfMain___main___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l___private_Init_Lean_WHNF_3__toCtorIfLit___closed__6; -lean_object* l_Lean_WHNF_unfoldDefinitionAux___rarg___lambda__4(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_mkNatLit(lean_object*); -lean_object* l___private_Init_Lean_WHNF_2__mkNullaryCtor___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l___private_Init_Lean_WHNF_6__isIdRhsApp___closed__1; -lean_object* l___private_Init_Lean_WHNF_1__getFirstCtor___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WHNF_whnfCore___main___rarg___lambda__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Array_iterateMAux___main___at_Lean_mkAppN___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l___private_Init_Lean_WHNF_6__isIdRhsApp___boxed(lean_object*); -lean_object* l_Lean_WHNF_whnfMain___main___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l___private_Init_Lean_WHNF_5__toCtorWhenK___rarg___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WHNF_whnfCore___main(lean_object*); -lean_object* l_Lean_Expr_getRevArgD___main(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WHNF_whnfCore___main___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WHNF_whnfCore___main___rarg___lambda__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l___private_Init_Lean_WHNF_6__isIdRhsApp___closed__2; -lean_object* l_Lean_mkConst(lean_object*, lean_object*); -lean_object* l_Lean_WHNF_reduceRec___rarg___lambda__2(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WHNF_reduceQuotRec___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WHNF_whnfEasyCases___main___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l___private_Init_Lean_WHNF_10__whnfCoreUnstuck___main___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, uint8_t); -lean_object* l_Lean_WHNF_isRecStuck___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WHNF_whnfCore___boxed(lean_object*); -lean_object* l_Lean_WHNF_unfoldDefinitionAux___rarg___lambda__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Array_anyRangeMAux___main___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WHNF_isRecStuck___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_WHNF_isRecStuck(lean_object*); -lean_object* l_Lean_WHNF_whnfEasyCases___main(lean_object*); -uint8_t lean_nat_dec_lt(lean_object*, lean_object*); -lean_object* l_monadInhabited___rarg(lean_object*, lean_object*); -lean_object* _init_l_Lean_WHNF_smartUnfoldingSuffix___closed__1() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string("_sunfold"); -return x_1; -} -} -lean_object* _init_l_Lean_WHNF_smartUnfoldingSuffix() { -_start: -{ -lean_object* x_1; -x_1 = l_Lean_WHNF_smartUnfoldingSuffix___closed__1; -return x_1; -} -} -lean_object* l_Lean_WHNF_mkSmartUnfoldingNameFor(lean_object* x_1) { -_start: -{ -lean_object* x_2; lean_object* x_3; -x_2 = l_Lean_WHNF_smartUnfoldingSuffix; -x_3 = lean_name_mk_string(x_1, x_2); -return x_3; -} -} -lean_object* l_Lean_WHNF_matchConstAux___rarg___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -if (lean_obj_tag(x_4) == 0) -{ -lean_object* x_5; lean_object* x_6; -lean_dec(x_3); -lean_dec(x_2); -x_5 = lean_box(0); -x_6 = lean_apply_1(x_1, x_5); -return x_6; -} -else -{ -lean_object* x_7; lean_object* x_8; -lean_dec(x_1); -x_7 = lean_ctor_get(x_4, 0); -lean_inc(x_7); -lean_dec(x_4); -x_8 = lean_apply_2(x_2, x_7, x_3); -return x_8; -} -} -} -lean_object* l_Lean_WHNF_matchConstAux___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { -_start: -{ -if (lean_obj_tag(x_3) == 4) -{ -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_3, 0); -lean_inc(x_6); -x_7 = lean_ctor_get(x_3, 1); -lean_inc(x_7); -lean_dec(x_3); -x_8 = lean_ctor_get(x_1, 1); -lean_inc(x_8); -lean_dec(x_1); -x_9 = lean_apply_1(x_2, x_6); -x_10 = lean_alloc_closure((void*)(l_Lean_WHNF_matchConstAux___rarg___lambda__1), 4, 3); -lean_closure_set(x_10, 0, x_4); -lean_closure_set(x_10, 1, x_5); -lean_closure_set(x_10, 2, x_7); -x_11 = lean_apply_4(x_8, lean_box(0), lean_box(0), x_9, x_10); -return x_11; -} -else -{ -lean_object* x_12; lean_object* x_13; -lean_dec(x_5); -lean_dec(x_3); -lean_dec(x_2); -lean_dec(x_1); -x_12 = lean_box(0); -x_13 = lean_apply_1(x_4, x_12); -return x_13; -} -} -} -lean_object* l_Lean_WHNF_matchConstAux(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = lean_alloc_closure((void*)(l_Lean_WHNF_matchConstAux___rarg), 5, 0); -return x_3; -} -} -lean_object* l_Lean_WHNF_matchConstAux___boxed(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = l_Lean_WHNF_matchConstAux(x_1, x_2); -lean_dec(x_2); -return x_3; -} -} -lean_object* l___private_Init_Lean_WHNF_1__getFirstCtor___rarg___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; -if (lean_obj_tag(x_3) == 0) -{ -lean_object* x_10; -x_10 = lean_box(0); -x_4 = x_10; -goto block_9; -} -else -{ -uint8_t x_11; -x_11 = !lean_is_exclusive(x_3); -if (x_11 == 0) -{ -lean_object* x_12; -x_12 = lean_ctor_get(x_3, 0); -if (lean_obj_tag(x_12) == 5) -{ -lean_object* x_13; lean_object* x_14; -x_13 = lean_ctor_get(x_12, 0); -lean_inc(x_13); -lean_dec(x_12); -x_14 = lean_ctor_get(x_13, 4); -lean_inc(x_14); -lean_dec(x_13); -if (lean_obj_tag(x_14) == 0) -{ -lean_object* x_15; -lean_free_object(x_3); -x_15 = lean_box(0); -x_4 = x_15; -goto block_9; -} -else -{ -lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; -x_16 = lean_ctor_get(x_14, 0); -lean_inc(x_16); -lean_dec(x_14); -x_17 = lean_ctor_get(x_2, 0); -lean_inc(x_17); -lean_dec(x_2); -x_18 = lean_ctor_get(x_17, 1); -lean_inc(x_18); -lean_dec(x_17); -lean_ctor_set(x_3, 0, x_16); -x_19 = lean_apply_2(x_18, lean_box(0), x_3); -return x_19; -} -} -else -{ -lean_object* x_20; -lean_free_object(x_3); -lean_dec(x_12); -x_20 = lean_box(0); -x_4 = x_20; -goto block_9; -} -} -else -{ -lean_object* x_21; -x_21 = lean_ctor_get(x_3, 0); -lean_inc(x_21); -lean_dec(x_3); -if (lean_obj_tag(x_21) == 5) -{ -lean_object* x_22; lean_object* x_23; -x_22 = lean_ctor_get(x_21, 0); -lean_inc(x_22); -lean_dec(x_21); -x_23 = lean_ctor_get(x_22, 4); -lean_inc(x_23); -lean_dec(x_22); -if (lean_obj_tag(x_23) == 0) -{ -lean_object* x_24; -x_24 = lean_box(0); -x_4 = x_24; -goto block_9; -} -else -{ -lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; -x_25 = lean_ctor_get(x_23, 0); -lean_inc(x_25); -lean_dec(x_23); -x_26 = lean_ctor_get(x_2, 0); -lean_inc(x_26); -lean_dec(x_2); -x_27 = lean_ctor_get(x_26, 1); -lean_inc(x_27); -lean_dec(x_26); -x_28 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_28, 0, x_25); -x_29 = lean_apply_2(x_27, lean_box(0), x_28); -return x_29; -} -} -else -{ -lean_object* x_30; -lean_dec(x_21); -x_30 = lean_box(0); -x_4 = x_30; -goto block_9; -} -} -} -block_9: -{ -lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; -lean_dec(x_4); -x_5 = lean_ctor_get(x_2, 0); -lean_inc(x_5); -lean_dec(x_2); -x_6 = lean_ctor_get(x_5, 1); -lean_inc(x_6); -lean_dec(x_5); -x_7 = lean_box(0); -x_8 = lean_apply_2(x_6, lean_box(0), x_7); -return x_8; -} -} -} -lean_object* l___private_Init_Lean_WHNF_1__getFirstCtor___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); -x_5 = lean_apply_1(x_2, x_3); -lean_inc(x_1); -x_6 = lean_alloc_closure((void*)(l___private_Init_Lean_WHNF_1__getFirstCtor___rarg___lambda__1___boxed), 3, 2); -lean_closure_set(x_6, 0, x_1); -lean_closure_set(x_6, 1, x_1); -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_Lean_WHNF_1__getFirstCtor(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l___private_Init_Lean_WHNF_1__getFirstCtor___rarg), 3, 0); -return x_2; -} -} -lean_object* l___private_Init_Lean_WHNF_1__getFirstCtor___rarg___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; -x_4 = l___private_Init_Lean_WHNF_1__getFirstCtor___rarg___lambda__1(x_1, x_2, x_3); -lean_dec(x_1); -return x_4; -} -} -lean_object* l___private_Init_Lean_WHNF_1__getFirstCtor___boxed(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = l___private_Init_Lean_WHNF_1__getFirstCtor(x_1); -lean_dec(x_1); -return x_2; -} -} -lean_object* l___private_Init_Lean_WHNF_2__mkNullaryCtor___rarg___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) { -_start: -{ -if (lean_obj_tag(x_6) == 0) -{ -lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; -lean_dec(x_4); -lean_dec(x_3); -x_7 = lean_ctor_get(x_2, 0); -lean_inc(x_7); -lean_dec(x_2); -x_8 = lean_ctor_get(x_7, 1); -lean_inc(x_8); -lean_dec(x_7); -x_9 = lean_box(0); -x_10 = lean_apply_2(x_8, lean_box(0), x_9); -return x_10; -} -else -{ -uint8_t x_11; -x_11 = !lean_is_exclusive(x_6); -if (x_11 == 0) -{ -lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; -x_12 = lean_ctor_get(x_6, 0); -x_13 = lean_ctor_get(x_2, 0); -lean_inc(x_13); -lean_dec(x_2); -x_14 = lean_ctor_get(x_13, 1); -lean_inc(x_14); -lean_dec(x_13); -x_15 = l_Lean_mkConst(x_12, x_3); -x_16 = lean_unsigned_to_nat(0u); -x_17 = l_Lean_Expr_getAppNumArgsAux___main(x_4, x_16); -x_18 = l_Lean_Expr_getAppArgs___closed__1; -lean_inc(x_17); -x_19 = lean_mk_array(x_17, x_18); -x_20 = lean_unsigned_to_nat(1u); -x_21 = lean_nat_sub(x_17, x_20); -lean_dec(x_17); -x_22 = l___private_Init_Lean_Expr_3__getAppArgsAux___main(x_4, x_19, x_21); -x_23 = l_Array_shrink___main___rarg(x_22, x_5); -x_24 = l_Array_iterateMAux___main___at_Lean_mkAppN___spec__1(x_23, x_23, x_16, x_15); -lean_dec(x_23); -lean_ctor_set(x_6, 0, x_24); -x_25 = lean_apply_2(x_14, lean_box(0), x_6); -return x_25; -} -else -{ -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; -x_26 = lean_ctor_get(x_6, 0); -lean_inc(x_26); -lean_dec(x_6); -x_27 = lean_ctor_get(x_2, 0); -lean_inc(x_27); -lean_dec(x_2); -x_28 = lean_ctor_get(x_27, 1); -lean_inc(x_28); -lean_dec(x_27); -x_29 = l_Lean_mkConst(x_26, x_3); -x_30 = lean_unsigned_to_nat(0u); -x_31 = l_Lean_Expr_getAppNumArgsAux___main(x_4, x_30); -x_32 = l_Lean_Expr_getAppArgs___closed__1; -lean_inc(x_31); -x_33 = lean_mk_array(x_31, x_32); -x_34 = lean_unsigned_to_nat(1u); -x_35 = lean_nat_sub(x_31, x_34); -lean_dec(x_31); -x_36 = l___private_Init_Lean_Expr_3__getAppArgsAux___main(x_4, x_33, x_35); -x_37 = l_Array_shrink___main___rarg(x_36, x_5); -x_38 = l_Array_iterateMAux___main___at_Lean_mkAppN___spec__1(x_37, x_37, x_30, x_29); -lean_dec(x_37); -x_39 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_39, 0, x_38); -x_40 = lean_apply_2(x_28, lean_box(0), x_39); -return x_40; -} -} -} -} -lean_object* l___private_Init_Lean_WHNF_2__mkNullaryCtor___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_11; -x_11 = l_Lean_Expr_getAppFn___main(x_3); -if (lean_obj_tag(x_11) == 4) -{ -lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; -x_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); -x_14 = lean_ctor_get(x_1, 1); -lean_inc(x_14); -lean_inc(x_1); -x_15 = l___private_Init_Lean_WHNF_1__getFirstCtor___rarg(x_1, x_2, x_12); -lean_inc(x_1); -x_16 = lean_alloc_closure((void*)(l___private_Init_Lean_WHNF_2__mkNullaryCtor___rarg___lambda__1___boxed), 6, 5); -lean_closure_set(x_16, 0, x_1); -lean_closure_set(x_16, 1, x_1); -lean_closure_set(x_16, 2, x_13); -lean_closure_set(x_16, 3, x_3); -lean_closure_set(x_16, 4, x_4); -x_17 = lean_apply_4(x_14, lean_box(0), lean_box(0), x_15, x_16); -return x_17; -} -else -{ -lean_object* x_18; -lean_dec(x_11); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -x_18 = lean_box(0); -x_5 = x_18; -goto block_10; -} -block_10: -{ -lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; -lean_dec(x_5); -x_6 = lean_ctor_get(x_1, 0); -lean_inc(x_6); -lean_dec(x_1); -x_7 = lean_ctor_get(x_6, 1); -lean_inc(x_7); -lean_dec(x_6); -x_8 = lean_box(0); -x_9 = lean_apply_2(x_7, lean_box(0), x_8); -return x_9; -} -} -} -lean_object* l___private_Init_Lean_WHNF_2__mkNullaryCtor(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l___private_Init_Lean_WHNF_2__mkNullaryCtor___rarg), 4, 0); -return x_2; -} -} -lean_object* l___private_Init_Lean_WHNF_2__mkNullaryCtor___rarg___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) { -_start: -{ -lean_object* x_7; -x_7 = l___private_Init_Lean_WHNF_2__mkNullaryCtor___rarg___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6); -lean_dec(x_5); -lean_dec(x_1); -return x_7; -} -} -lean_object* l___private_Init_Lean_WHNF_2__mkNullaryCtor___boxed(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = l___private_Init_Lean_WHNF_2__mkNullaryCtor(x_1); -lean_dec(x_1); -return x_2; -} -} -lean_object* _init_l___private_Init_Lean_WHNF_3__toCtorIfLit___closed__1() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string("succ"); -return x_1; -} -} -lean_object* _init_l___private_Init_Lean_WHNF_3__toCtorIfLit___closed__2() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Literal_type___closed__2; -x_2 = l___private_Init_Lean_WHNF_3__toCtorIfLit___closed__1; -x_3 = lean_name_mk_string(x_1, x_2); -return x_3; -} -} -lean_object* _init_l___private_Init_Lean_WHNF_3__toCtorIfLit___closed__3() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = lean_box(0); -x_2 = l___private_Init_Lean_WHNF_3__toCtorIfLit___closed__2; -x_3 = l_Lean_mkConst(x_2, x_1); -return x_3; -} -} -lean_object* _init_l___private_Init_Lean_WHNF_3__toCtorIfLit___closed__4() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string("zero"); -return x_1; -} -} -lean_object* _init_l___private_Init_Lean_WHNF_3__toCtorIfLit___closed__5() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Literal_type___closed__2; -x_2 = l___private_Init_Lean_WHNF_3__toCtorIfLit___closed__4; -x_3 = lean_name_mk_string(x_1, x_2); -return x_3; -} -} -lean_object* _init_l___private_Init_Lean_WHNF_3__toCtorIfLit___closed__6() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = lean_box(0); -x_2 = l___private_Init_Lean_WHNF_3__toCtorIfLit___closed__5; -x_3 = l_Lean_mkConst(x_2, x_1); -return x_3; -} -} -lean_object* l___private_Init_Lean_WHNF_3__toCtorIfLit(lean_object* x_1) { -_start: -{ -if (lean_obj_tag(x_1) == 9) -{ -lean_object* x_2; -x_2 = lean_ctor_get(x_1, 0); -if (lean_obj_tag(x_2) == 0) -{ -lean_object* x_3; lean_object* x_4; uint8_t x_5; -x_3 = lean_ctor_get(x_2, 0); -x_4 = lean_unsigned_to_nat(0u); -x_5 = lean_nat_dec_eq(x_3, x_4); -if (x_5 == 0) -{ -lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; -x_6 = lean_unsigned_to_nat(1u); -x_7 = lean_nat_sub(x_3, x_6); -x_8 = l_Lean_mkNatLit(x_7); -x_9 = l___private_Init_Lean_WHNF_3__toCtorIfLit___closed__3; -x_10 = l_Lean_mkApp(x_9, x_8); -return x_10; -} -else -{ -lean_object* x_11; -x_11 = l___private_Init_Lean_WHNF_3__toCtorIfLit___closed__6; -return x_11; -} -} -else -{ -lean_inc(x_1); -return x_1; -} -} -else -{ -lean_inc(x_1); -return x_1; -} -} -} -lean_object* l___private_Init_Lean_WHNF_3__toCtorIfLit___boxed(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = l___private_Init_Lean_WHNF_3__toCtorIfLit(x_1); -lean_dec(x_1); -return x_2; -} -} -uint8_t l___private_Init_Lean_WHNF_4__getRecRuleFor___lambda__1(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; uint8_t x_4; -x_3 = lean_ctor_get(x_2, 0); -x_4 = lean_name_eq(x_3, x_1); -return x_4; -} -} -lean_object* l___private_Init_Lean_WHNF_4__getRecRuleFor(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = l_Lean_Expr_getAppFn___main(x_2); -if (lean_obj_tag(x_3) == 4) -{ -lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; -x_4 = lean_ctor_get(x_3, 0); -lean_inc(x_4); -lean_dec(x_3); -x_5 = lean_alloc_closure((void*)(l___private_Init_Lean_WHNF_4__getRecRuleFor___lambda__1___boxed), 2, 1); -lean_closure_set(x_5, 0, x_4); -x_6 = lean_ctor_get(x_1, 6); -lean_inc(x_6); -lean_dec(x_1); -x_7 = l_List_find___main___rarg(x_5, x_6); -return x_7; -} -else -{ -lean_object* x_8; -lean_dec(x_3); -lean_dec(x_1); -x_8 = lean_box(0); -return x_8; -} -} -} -lean_object* l___private_Init_Lean_WHNF_4__getRecRuleFor___lambda__1___boxed(lean_object* x_1, lean_object* x_2) { -_start: -{ -uint8_t x_3; lean_object* x_4; -x_3 = l___private_Init_Lean_WHNF_4__getRecRuleFor___lambda__1(x_1, x_2); -lean_dec(x_2); -lean_dec(x_1); -x_4 = lean_box(x_3); -return x_4; -} -} -lean_object* l___private_Init_Lean_WHNF_4__getRecRuleFor___boxed(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = l___private_Init_Lean_WHNF_4__getRecRuleFor(x_1, x_2); -lean_dec(x_2); -return x_3; -} -} -lean_object* l___private_Init_Lean_WHNF_5__toCtorWhenK___rarg___lambda__1(lean_object* x_1, lean_object* x_2, uint8_t x_3) { -_start: -{ -if (x_3 == 0) -{ -lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; -lean_dec(x_2); -x_4 = lean_ctor_get(x_1, 0); -lean_inc(x_4); -lean_dec(x_1); -x_5 = lean_ctor_get(x_4, 1); -lean_inc(x_5); -lean_dec(x_4); -x_6 = lean_box(0); -x_7 = lean_apply_2(x_5, lean_box(0), x_6); -return x_7; -} -else -{ -lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; -x_8 = lean_ctor_get(x_1, 0); -lean_inc(x_8); -lean_dec(x_1); -x_9 = lean_ctor_get(x_8, 1); -lean_inc(x_9); -lean_dec(x_8); -x_10 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_10, 0, x_2); -x_11 = lean_apply_2(x_9, lean_box(0), x_10); -return x_11; -} -} -} -lean_object* l___private_Init_Lean_WHNF_5__toCtorWhenK___rarg___lambda__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { -_start: -{ -lean_object* x_7; lean_object* x_8; lean_object* x_9; -x_7 = lean_apply_2(x_1, x_2, x_6); -x_8 = lean_alloc_closure((void*)(l___private_Init_Lean_WHNF_5__toCtorWhenK___rarg___lambda__1___boxed), 3, 2); -lean_closure_set(x_8, 0, x_3); -lean_closure_set(x_8, 1, x_4); -x_9 = lean_apply_4(x_5, lean_box(0), lean_box(0), x_7, x_8); -return x_9; -} -} -lean_object* l___private_Init_Lean_WHNF_5__toCtorWhenK___rarg___lambda__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { -_start: -{ -if (lean_obj_tag(x_6) == 0) -{ -lean_object* x_7; lean_object* x_8; lean_object* x_9; -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -x_7 = lean_ctor_get(x_1, 0); -lean_inc(x_7); -lean_dec(x_1); -x_8 = lean_ctor_get(x_7, 1); -lean_inc(x_8); -lean_dec(x_7); -x_9 = lean_apply_2(x_8, lean_box(0), x_6); -return x_9; -} -else -{ -lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; -x_10 = lean_ctor_get(x_6, 0); -lean_inc(x_10); -lean_dec(x_6); -lean_inc(x_10); -x_11 = lean_apply_1(x_2, x_10); -lean_inc(x_5); -x_12 = lean_alloc_closure((void*)(l___private_Init_Lean_WHNF_5__toCtorWhenK___rarg___lambda__2), 6, 5); -lean_closure_set(x_12, 0, x_3); -lean_closure_set(x_12, 1, x_4); -lean_closure_set(x_12, 2, x_1); -lean_closure_set(x_12, 3, x_10); -lean_closure_set(x_12, 4, x_5); -x_13 = lean_apply_4(x_5, lean_box(0), lean_box(0), x_11, x_12); -return x_13; -} -} -} -lean_object* _init_l___private_Init_Lean_WHNF_5__toCtorWhenK___rarg___lambda__4___closed__1() { -_start: -{ -lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Lean_Expr_hasExprMVar___boxed), 1, 0); -return x_1; -} -} -lean_object* l___private_Init_Lean_WHNF_5__toCtorWhenK___rarg___lambda__4(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; lean_object* x_9; uint8_t x_10; -x_8 = l_Lean_Expr_getAppFn___main(x_7); -x_9 = l_Lean_RecursorVal_getInduct(x_1); -x_10 = l_Lean_Expr_isConstOf(x_8, x_9); -lean_dec(x_9); -lean_dec(x_8); -if (x_10 == 0) -{ -lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_1); -x_11 = lean_ctor_get(x_2, 0); -lean_inc(x_11); -lean_dec(x_2); -x_12 = lean_ctor_get(x_11, 1); -lean_inc(x_12); -lean_dec(x_11); -x_13 = lean_box(0); -x_14 = lean_apply_2(x_12, lean_box(0), x_13); -return x_14; -} -else -{ -uint8_t x_15; -x_15 = l_Lean_Expr_hasExprMVar(x_7); -if (x_15 == 0) -{ -lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; -x_16 = lean_ctor_get(x_1, 2); -lean_inc(x_16); -lean_dec(x_1); -lean_inc(x_7); -lean_inc(x_2); -x_17 = l___private_Init_Lean_WHNF_2__mkNullaryCtor___rarg(x_2, x_3, x_7, x_16); -lean_inc(x_6); -x_18 = lean_alloc_closure((void*)(l___private_Init_Lean_WHNF_5__toCtorWhenK___rarg___lambda__3), 6, 5); -lean_closure_set(x_18, 0, x_2); -lean_closure_set(x_18, 1, x_4); -lean_closure_set(x_18, 2, x_5); -lean_closure_set(x_18, 3, x_7); -lean_closure_set(x_18, 4, x_6); -x_19 = lean_apply_4(x_6, lean_box(0), lean_box(0), x_17, x_18); -return x_19; -} -else -{ -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; uint8_t x_32; -x_20 = lean_unsigned_to_nat(0u); -x_21 = l_Lean_Expr_getAppNumArgsAux___main(x_7, x_20); -x_22 = l_Lean_Expr_getAppArgs___closed__1; -lean_inc(x_21); -x_23 = lean_mk_array(x_21, x_22); -x_24 = lean_unsigned_to_nat(1u); -x_25 = lean_nat_sub(x_21, x_24); -lean_dec(x_21); -lean_inc(x_7); -x_26 = l___private_Init_Lean_Expr_3__getAppArgsAux___main(x_7, x_23, x_25); -x_27 = lean_ctor_get(x_1, 2); -lean_inc(x_27); -lean_dec(x_1); -x_28 = lean_array_get_size(x_26); -x_29 = l_Id_Monad; -x_30 = l___private_Init_Lean_WHNF_5__toCtorWhenK___rarg___lambda__4___closed__1; -lean_inc(x_27); -x_31 = l_Array_anyRangeMAux___main___rarg(x_29, x_26, x_28, lean_box(0), x_30, x_27); -x_32 = lean_unbox(x_31); -lean_dec(x_31); -if (x_32 == 0) -{ -lean_object* x_33; lean_object* x_34; lean_object* x_35; -lean_inc(x_7); -lean_inc(x_2); -x_33 = l___private_Init_Lean_WHNF_2__mkNullaryCtor___rarg(x_2, x_3, x_7, x_27); -lean_inc(x_6); -x_34 = lean_alloc_closure((void*)(l___private_Init_Lean_WHNF_5__toCtorWhenK___rarg___lambda__3), 6, 5); -lean_closure_set(x_34, 0, x_2); -lean_closure_set(x_34, 1, x_4); -lean_closure_set(x_34, 2, x_5); -lean_closure_set(x_34, 3, x_7); -lean_closure_set(x_34, 4, x_6); -x_35 = lean_apply_4(x_6, lean_box(0), lean_box(0), x_33, x_34); -return x_35; -} -else -{ -lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; -lean_dec(x_27); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_3); -x_36 = lean_ctor_get(x_2, 0); -lean_inc(x_36); -lean_dec(x_2); -x_37 = lean_ctor_get(x_36, 1); -lean_inc(x_37); -lean_dec(x_36); -x_38 = lean_box(0); -x_39 = lean_apply_2(x_37, lean_box(0), x_38); -return x_39; -} -} -} -} -} -lean_object* l___private_Init_Lean_WHNF_5__toCtorWhenK___rarg___lambda__5(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; -x_9 = lean_apply_1(x_1, x_8); -lean_inc(x_7); -x_10 = lean_alloc_closure((void*)(l___private_Init_Lean_WHNF_5__toCtorWhenK___rarg___lambda__4), 7, 6); -lean_closure_set(x_10, 0, x_2); -lean_closure_set(x_10, 1, x_3); -lean_closure_set(x_10, 2, x_4); -lean_closure_set(x_10, 3, x_5); -lean_closure_set(x_10, 4, x_6); -lean_closure_set(x_10, 5, x_7); -x_11 = lean_apply_4(x_7, lean_box(0), lean_box(0), x_9, x_10); -return x_11; -} -} -lean_object* l___private_Init_Lean_WHNF_5__toCtorWhenK___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; -x_8 = lean_ctor_get(x_1, 1); -lean_inc(x_8); -lean_inc(x_4); -x_9 = lean_apply_1(x_4, x_7); -lean_inc(x_8); -x_10 = lean_alloc_closure((void*)(l___private_Init_Lean_WHNF_5__toCtorWhenK___rarg___lambda__5), 8, 7); -lean_closure_set(x_10, 0, x_3); -lean_closure_set(x_10, 1, x_6); -lean_closure_set(x_10, 2, x_1); -lean_closure_set(x_10, 3, x_2); -lean_closure_set(x_10, 4, x_4); -lean_closure_set(x_10, 5, x_5); -lean_closure_set(x_10, 6, x_8); -x_11 = lean_apply_4(x_8, lean_box(0), lean_box(0), x_9, x_10); -return x_11; -} -} -lean_object* l___private_Init_Lean_WHNF_5__toCtorWhenK(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l___private_Init_Lean_WHNF_5__toCtorWhenK___rarg), 7, 0); -return x_2; -} -} -lean_object* l___private_Init_Lean_WHNF_5__toCtorWhenK___rarg___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -uint8_t x_4; lean_object* x_5; -x_4 = lean_unbox(x_3); -lean_dec(x_3); -x_5 = l___private_Init_Lean_WHNF_5__toCtorWhenK___rarg___lambda__1(x_1, x_2, x_4); -return x_5; -} -} -lean_object* l___private_Init_Lean_WHNF_5__toCtorWhenK___boxed(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = l___private_Init_Lean_WHNF_5__toCtorWhenK(x_1); -lean_dec(x_1); -return x_2; -} -} -lean_object* l_Lean_WHNF_reduceRec___rarg___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; -x_9 = l___private_Init_Lean_WHNF_3__toCtorIfLit(x_8); -lean_inc(x_1); -x_10 = l___private_Init_Lean_WHNF_4__getRecRuleFor(x_1, x_9); -if (lean_obj_tag(x_10) == 0) -{ -lean_object* x_11; lean_object* x_12; -lean_dec(x_9); -lean_dec(x_7); -lean_dec(x_1); -x_11 = lean_box(0); -x_12 = lean_apply_1(x_2, x_11); -return x_12; -} -else -{ -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; uint8_t x_25; -x_13 = lean_ctor_get(x_10, 0); -lean_inc(x_13); -lean_dec(x_10); -x_14 = lean_unsigned_to_nat(0u); -x_15 = l_Lean_Expr_getAppNumArgsAux___main(x_9, x_14); -x_16 = l_Lean_Expr_getAppArgs___closed__1; -lean_inc(x_15); -x_17 = lean_mk_array(x_15, x_16); -x_18 = lean_unsigned_to_nat(1u); -x_19 = lean_nat_sub(x_15, x_18); -lean_dec(x_15); -x_20 = l___private_Init_Lean_Expr_3__getAppArgsAux___main(x_9, x_17, x_19); -x_21 = l_List_lengthAux___main___rarg(x_3, x_14); -x_22 = lean_ctor_get(x_1, 0); -lean_inc(x_22); -x_23 = lean_ctor_get(x_22, 1); -lean_inc(x_23); -lean_dec(x_22); -x_24 = l_List_lengthAux___main___rarg(x_23, x_14); -x_25 = lean_nat_dec_eq(x_21, x_24); -lean_dec(x_24); -lean_dec(x_21); -if (x_25 == 0) -{ -lean_object* x_26; lean_object* x_27; -lean_dec(x_23); -lean_dec(x_20); -lean_dec(x_13); -lean_dec(x_7); -lean_dec(x_1); -x_26 = lean_box(0); -x_27 = lean_apply_1(x_2, x_26); -return x_27; -} -else -{ -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_dec(x_2); -x_28 = lean_ctor_get(x_13, 2); -lean_inc(x_28); -x_29 = l_Lean_Expr_instantiateLevelParams(x_28, x_23, x_3); -lean_dec(x_23); -x_30 = lean_ctor_get(x_1, 2); -lean_inc(x_30); -x_31 = lean_ctor_get(x_1, 4); -lean_inc(x_31); -x_32 = lean_nat_add(x_30, x_31); -lean_dec(x_31); -lean_dec(x_30); -x_33 = lean_ctor_get(x_1, 5); -lean_inc(x_33); -lean_dec(x_1); -x_34 = lean_nat_add(x_32, x_33); -lean_dec(x_33); -lean_dec(x_32); -x_35 = l___private_Init_Lean_Expr_2__mkAppRangeAux___main(x_34, x_4, x_14, x_29); -lean_dec(x_34); -x_36 = lean_array_get_size(x_20); -x_37 = lean_ctor_get(x_13, 1); -lean_inc(x_37); -lean_dec(x_13); -x_38 = lean_nat_sub(x_36, x_37); -lean_dec(x_37); -x_39 = l___private_Init_Lean_Expr_2__mkAppRangeAux___main(x_36, x_20, x_38, x_35); -lean_dec(x_20); -lean_dec(x_36); -x_40 = lean_nat_add(x_5, x_18); -x_41 = l___private_Init_Lean_Expr_2__mkAppRangeAux___main(x_6, x_4, x_40, x_39); -x_42 = lean_apply_1(x_7, x_41); -return x_42; -} -} -} -} -lean_object* l_Lean_WHNF_reduceRec___rarg___lambda__2(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -if (lean_obj_tag(x_3) == 0) -{ -lean_object* x_4; lean_object* x_5; lean_object* x_6; -x_4 = lean_ctor_get(x_1, 0); -lean_inc(x_4); -lean_dec(x_1); -x_5 = lean_ctor_get(x_4, 1); -lean_inc(x_5); -lean_dec(x_4); -x_6 = lean_apply_2(x_5, lean_box(0), x_2); -return x_6; -} -else -{ -lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; -lean_dec(x_2); -x_7 = lean_ctor_get(x_1, 0); -lean_inc(x_7); -lean_dec(x_1); -x_8 = lean_ctor_get(x_7, 1); -lean_inc(x_8); -lean_dec(x_7); -x_9 = lean_ctor_get(x_3, 0); -lean_inc(x_9); -lean_dec(x_3); -x_10 = lean_apply_2(x_8, lean_box(0), x_9); -return x_10; -} -} -} -lean_object* l_Lean_WHNF_reduceRec___rarg___lambda__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14) { -_start: -{ -uint8_t x_15; lean_object* x_16; -x_15 = lean_ctor_get_uint8(x_1, sizeof(void*)*7); -lean_inc(x_1); -x_16 = lean_alloc_closure((void*)(l_Lean_WHNF_reduceRec___rarg___lambda__1___boxed), 8, 7); -lean_closure_set(x_16, 0, x_1); -lean_closure_set(x_16, 1, x_2); -lean_closure_set(x_16, 2, x_3); -lean_closure_set(x_16, 3, x_4); -lean_closure_set(x_16, 4, x_5); -lean_closure_set(x_16, 5, x_6); -lean_closure_set(x_16, 6, x_7); -if (x_15 == 0) -{ -lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; -lean_dec(x_13); -lean_dec(x_12); -lean_dec(x_11); -lean_dec(x_10); -lean_dec(x_1); -x_17 = lean_ctor_get(x_8, 0); -lean_inc(x_17); -lean_dec(x_8); -x_18 = lean_ctor_get(x_17, 1); -lean_inc(x_18); -lean_dec(x_17); -x_19 = lean_apply_2(x_18, lean_box(0), x_14); -x_20 = lean_apply_4(x_9, lean_box(0), lean_box(0), x_19, x_16); -return x_20; -} -else -{ -lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; -lean_inc(x_14); -lean_inc(x_8); -x_21 = l___private_Init_Lean_WHNF_5__toCtorWhenK___rarg(x_8, x_10, x_11, x_12, x_13, x_1, x_14); -x_22 = lean_alloc_closure((void*)(l_Lean_WHNF_reduceRec___rarg___lambda__2), 3, 2); -lean_closure_set(x_22, 0, x_8); -lean_closure_set(x_22, 1, x_14); -lean_inc(x_9); -x_23 = lean_apply_4(x_9, lean_box(0), lean_box(0), x_21, x_22); -x_24 = lean_apply_4(x_9, lean_box(0), lean_box(0), x_23, x_16); -return x_24; -} -} -} -lean_object* l_Lean_WHNF_reduceRec___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { -_start: -{ -lean_object* x_11; lean_object* x_12; uint8_t x_13; -x_11 = l_Lean_RecursorVal_getMajorIdx(x_6); -x_12 = lean_array_get_size(x_8); -x_13 = lean_nat_dec_lt(x_11, x_12); -if (x_13 == 0) -{ -lean_object* x_14; lean_object* x_15; -lean_dec(x_12); -lean_dec(x_11); -lean_dec(x_10); -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -lean_dec(x_1); -x_14 = lean_box(0); -x_15 = lean_apply_1(x_9, x_14); -return x_15; -} -else -{ -lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; -x_16 = lean_array_fget(x_8, x_11); -x_17 = lean_ctor_get(x_1, 1); -lean_inc(x_17); -lean_inc(x_3); -x_18 = lean_apply_1(x_3, x_16); -lean_inc(x_17); -x_19 = lean_alloc_closure((void*)(l_Lean_WHNF_reduceRec___rarg___lambda__3), 14, 13); -lean_closure_set(x_19, 0, x_6); -lean_closure_set(x_19, 1, x_9); -lean_closure_set(x_19, 2, x_7); -lean_closure_set(x_19, 3, x_8); -lean_closure_set(x_19, 4, x_11); -lean_closure_set(x_19, 5, x_12); -lean_closure_set(x_19, 6, x_10); -lean_closure_set(x_19, 7, x_1); -lean_closure_set(x_19, 8, x_17); -lean_closure_set(x_19, 9, x_2); -lean_closure_set(x_19, 10, x_3); -lean_closure_set(x_19, 11, x_4); -lean_closure_set(x_19, 12, x_5); -x_20 = lean_apply_4(x_17, lean_box(0), lean_box(0), x_18, x_19); -return x_20; -} -} -} -lean_object* l_Lean_WHNF_reduceRec(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = lean_alloc_closure((void*)(l_Lean_WHNF_reduceRec___rarg), 10, 0); -return x_3; -} -} -lean_object* l_Lean_WHNF_reduceRec___rarg___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_WHNF_reduceRec___rarg___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); -lean_dec(x_8); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_3); -return x_9; -} -} -lean_object* l_Lean_WHNF_reduceRec___boxed(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = l_Lean_WHNF_reduceRec(x_1, x_2); -lean_dec(x_2); -return x_3; -} -} -lean_object* l_Lean_WHNF_isRecStuck___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { -_start: -{ -uint8_t x_7; -x_7 = lean_ctor_get_uint8(x_4, sizeof(void*)*7); -if (x_7 == 0) -{ -lean_object* x_8; lean_object* x_9; uint8_t x_10; -x_8 = l_Lean_RecursorVal_getMajorIdx(x_4); -x_9 = lean_array_get_size(x_6); -x_10 = lean_nat_dec_lt(x_8, x_9); -lean_dec(x_9); -if (x_10 == 0) -{ -lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; -lean_dec(x_8); -lean_dec(x_3); -lean_dec(x_2); -x_11 = lean_ctor_get(x_1, 0); -lean_inc(x_11); -lean_dec(x_1); -x_12 = lean_ctor_get(x_11, 1); -lean_inc(x_12); -lean_dec(x_11); -x_13 = lean_box(0); -x_14 = lean_apply_2(x_12, lean_box(0), x_13); -return x_14; -} -else -{ -lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; -x_15 = lean_array_fget(x_6, x_8); -lean_dec(x_8); -x_16 = lean_ctor_get(x_1, 1); -lean_inc(x_16); -lean_dec(x_1); -x_17 = lean_apply_1(x_2, x_15); -x_18 = lean_apply_4(x_16, lean_box(0), lean_box(0), x_17, x_3); -return x_18; -} -} -else -{ -lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; -lean_dec(x_3); -lean_dec(x_2); -x_19 = lean_ctor_get(x_1, 0); -lean_inc(x_19); -lean_dec(x_1); -x_20 = lean_ctor_get(x_19, 1); -lean_inc(x_20); -lean_dec(x_19); -x_21 = lean_box(0); -x_22 = lean_apply_2(x_20, lean_box(0), x_21); -return x_22; -} -} -} -lean_object* l_Lean_WHNF_isRecStuck(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_WHNF_isRecStuck___rarg___boxed), 6, 0); -return x_2; -} -} -lean_object* l_Lean_WHNF_isRecStuck___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { -_start: -{ -lean_object* x_7; -x_7 = l_Lean_WHNF_isRecStuck___rarg(x_1, x_2, x_3, x_4, x_5, x_6); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -return x_7; -} -} -lean_object* l_Lean_WHNF_isRecStuck___boxed(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = l_Lean_WHNF_isRecStuck(x_1); -lean_dec(x_1); -return x_2; -} -} -lean_object* l_Lean_WHNF_reduceQuotRec___rarg___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: -{ -if (lean_obj_tag(x_8) == 0) -{ -lean_object* x_9; lean_object* x_10; -lean_dec(x_7); -lean_dec(x_4); -x_9 = lean_box(0); -x_10 = lean_apply_1(x_1, x_9); -return x_10; -} -else -{ -lean_object* x_11; -x_11 = lean_ctor_get(x_8, 0); -if (lean_obj_tag(x_11) == 4) -{ -lean_object* x_12; uint8_t x_13; lean_object* x_14; -x_12 = lean_ctor_get(x_11, 0); -x_13 = lean_ctor_get_uint8(x_12, sizeof(void*)*1); -x_14 = lean_box(x_13); -if (lean_obj_tag(x_14) == 1) -{ -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_dec(x_1); -x_15 = l_Lean_Expr_Inhabited; -x_16 = lean_array_get(x_15, x_2, x_3); -x_17 = l_Lean_mkApp(x_16, x_4); -x_18 = lean_unsigned_to_nat(1u); -x_19 = lean_nat_add(x_5, x_18); -x_20 = l___private_Init_Lean_Expr_2__mkAppRangeAux___main(x_6, x_2, x_19, x_17); -x_21 = lean_apply_1(x_7, x_20); -return x_21; -} -else -{ -lean_object* x_22; lean_object* x_23; -lean_dec(x_14); -lean_dec(x_7); -lean_dec(x_4); -x_22 = lean_box(0); -x_23 = lean_apply_1(x_1, x_22); -return x_23; -} -} -else -{ -lean_object* x_24; lean_object* x_25; -lean_dec(x_7); -lean_dec(x_4); -x_24 = lean_box(0); -x_25 = lean_apply_1(x_1, x_24); -return x_25; -} -} -} -} -lean_object* l_Lean_WHNF_reduceQuotRec___rarg___lambda__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { -_start: -{ -if (lean_obj_tag(x_9) == 5) -{ -lean_object* x_10; -x_10 = lean_ctor_get(x_9, 0); -lean_inc(x_10); -if (lean_obj_tag(x_10) == 5) -{ -lean_object* x_11; -x_11 = lean_ctor_get(x_10, 0); -lean_inc(x_11); -lean_dec(x_10); -if (lean_obj_tag(x_11) == 5) -{ -lean_object* x_12; -x_12 = lean_ctor_get(x_11, 0); -lean_inc(x_12); -lean_dec(x_11); -if (lean_obj_tag(x_12) == 4) -{ -lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; -x_13 = lean_ctor_get(x_9, 1); -lean_inc(x_13); -lean_dec(x_9); -x_14 = lean_ctor_get(x_12, 0); -lean_inc(x_14); -lean_dec(x_12); -x_15 = lean_apply_1(x_2, x_14); -x_16 = lean_alloc_closure((void*)(l_Lean_WHNF_reduceQuotRec___rarg___lambda__1___boxed), 8, 7); -lean_closure_set(x_16, 0, x_1); -lean_closure_set(x_16, 1, x_3); -lean_closure_set(x_16, 2, x_4); -lean_closure_set(x_16, 3, x_13); -lean_closure_set(x_16, 4, x_5); -lean_closure_set(x_16, 5, x_6); -lean_closure_set(x_16, 6, x_7); -x_17 = lean_apply_4(x_8, lean_box(0), lean_box(0), x_15, x_16); -return x_17; -} -else -{ -lean_object* x_18; lean_object* x_19; -lean_dec(x_12); -lean_dec(x_9); -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -x_18 = lean_box(0); -x_19 = lean_apply_1(x_1, x_18); -return x_19; -} -} -else -{ -lean_object* x_20; lean_object* x_21; -lean_dec(x_11); -lean_dec(x_9); -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -x_20 = lean_box(0); -x_21 = lean_apply_1(x_1, x_20); -return x_21; -} -} -else -{ -lean_object* x_22; lean_object* x_23; -lean_dec(x_10); -lean_dec(x_9); -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -x_22 = lean_box(0); -x_23 = lean_apply_1(x_1, x_22); -return x_23; -} -} -else -{ -lean_object* x_24; lean_object* x_25; -lean_dec(x_9); -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -x_24 = lean_box(0); -x_25 = lean_apply_1(x_1, x_24); -return x_25; -} -} -} -lean_object* l_Lean_WHNF_reduceQuotRec___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { -_start: -{ -lean_object* x_9; lean_object* x_10; uint8_t x_21; lean_object* x_22; -x_21 = lean_ctor_get_uint8(x_4, sizeof(void*)*1); -x_22 = lean_box(x_21); -switch (lean_obj_tag(x_22)) { -case 2: -{ -lean_object* x_23; lean_object* x_24; -x_23 = lean_unsigned_to_nat(5u); -x_24 = lean_unsigned_to_nat(3u); -x_9 = x_23; -x_10 = x_24; -goto block_20; -} -case 3: -{ -lean_object* x_25; lean_object* x_26; -x_25 = lean_unsigned_to_nat(4u); -x_26 = lean_unsigned_to_nat(3u); -x_9 = x_25; -x_10 = x_26; -goto block_20; -} -default: -{ -lean_object* x_27; lean_object* x_28; -lean_dec(x_22); -lean_dec(x_8); -lean_dec(x_6); -lean_dec(x_3); -lean_dec(x_2); -lean_dec(x_1); -x_27 = lean_box(0); -x_28 = lean_apply_1(x_7, x_27); -return x_28; -} -} -block_20: -{ -lean_object* x_11; uint8_t x_12; -x_11 = lean_array_get_size(x_6); -x_12 = lean_nat_dec_lt(x_9, x_11); -if (x_12 == 0) -{ -lean_object* x_13; lean_object* x_14; -lean_dec(x_11); -lean_dec(x_10); -lean_dec(x_9); -lean_dec(x_8); -lean_dec(x_6); -lean_dec(x_3); -lean_dec(x_2); -lean_dec(x_1); -x_13 = lean_box(0); -x_14 = lean_apply_1(x_7, x_13); -return x_14; -} -else -{ -lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; -x_15 = lean_array_fget(x_6, x_9); -x_16 = lean_ctor_get(x_1, 1); -lean_inc(x_16); -lean_dec(x_1); -x_17 = lean_apply_1(x_3, x_15); -lean_inc(x_16); -x_18 = lean_alloc_closure((void*)(l_Lean_WHNF_reduceQuotRec___rarg___lambda__2), 9, 8); -lean_closure_set(x_18, 0, x_7); -lean_closure_set(x_18, 1, x_2); -lean_closure_set(x_18, 2, x_6); -lean_closure_set(x_18, 3, x_10); -lean_closure_set(x_18, 4, x_9); -lean_closure_set(x_18, 5, x_11); -lean_closure_set(x_18, 6, x_8); -lean_closure_set(x_18, 7, x_16); -x_19 = lean_apply_4(x_16, lean_box(0), lean_box(0), x_17, x_18); -return x_19; -} -} -} -} -lean_object* l_Lean_WHNF_reduceQuotRec(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = lean_alloc_closure((void*)(l_Lean_WHNF_reduceQuotRec___rarg___boxed), 8, 0); -return x_3; -} -} -lean_object* l_Lean_WHNF_reduceQuotRec___rarg___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_WHNF_reduceQuotRec___rarg___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); -lean_dec(x_8); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_3); -lean_dec(x_2); -return x_9; -} -} -lean_object* l_Lean_WHNF_reduceQuotRec___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { -_start: -{ -lean_object* x_9; -x_9 = l_Lean_WHNF_reduceQuotRec___rarg(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); -lean_dec(x_5); -lean_dec(x_4); -return x_9; -} -} -lean_object* l_Lean_WHNF_reduceQuotRec___boxed(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = l_Lean_WHNF_reduceQuotRec(x_1, x_2); -lean_dec(x_2); -return x_3; -} -} -lean_object* l_Lean_WHNF_isQuotRecStuck___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { -_start: -{ -lean_object* x_7; lean_object* x_13; uint8_t x_22; lean_object* x_23; -x_22 = lean_ctor_get_uint8(x_4, sizeof(void*)*1); -x_23 = lean_box(x_22); -switch (lean_obj_tag(x_23)) { -case 2: -{ -lean_object* x_24; -x_24 = lean_unsigned_to_nat(5u); -x_13 = x_24; -goto block_21; -} -case 3: -{ -lean_object* x_25; -x_25 = lean_unsigned_to_nat(4u); -x_13 = x_25; -goto block_21; -} -default: -{ -lean_object* x_26; -lean_dec(x_23); -lean_dec(x_3); -lean_dec(x_2); -x_26 = lean_box(0); -x_7 = x_26; -goto block_12; -} -} -block_12: -{ -lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; -lean_dec(x_7); -x_8 = lean_ctor_get(x_1, 0); -lean_inc(x_8); -lean_dec(x_1); -x_9 = lean_ctor_get(x_8, 1); -lean_inc(x_9); -lean_dec(x_8); -x_10 = lean_box(0); -x_11 = lean_apply_2(x_9, lean_box(0), x_10); -return x_11; -} -block_21: -{ -lean_object* x_14; uint8_t x_15; -x_14 = lean_array_get_size(x_6); -x_15 = lean_nat_dec_lt(x_13, x_14); -lean_dec(x_14); -if (x_15 == 0) -{ -lean_object* x_16; -lean_dec(x_3); -lean_dec(x_2); -x_16 = lean_box(0); -x_7 = x_16; -goto block_12; -} -else -{ -lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; -x_17 = lean_array_fget(x_6, x_13); -x_18 = lean_ctor_get(x_1, 1); -lean_inc(x_18); -lean_dec(x_1); -x_19 = lean_apply_1(x_2, x_17); -x_20 = lean_apply_4(x_18, lean_box(0), lean_box(0), x_19, x_3); -return x_20; -} -} -} -} -lean_object* l_Lean_WHNF_isQuotRecStuck(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_WHNF_isQuotRecStuck___rarg___boxed), 6, 0); -return x_2; -} -} -lean_object* l_Lean_WHNF_isQuotRecStuck___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { -_start: -{ -lean_object* x_7; -x_7 = l_Lean_WHNF_isQuotRecStuck___rarg(x_1, x_2, x_3, x_4, x_5, x_6); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -return x_7; -} -} -lean_object* l_Lean_WHNF_isQuotRecStuck___boxed(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = l_Lean_WHNF_isQuotRecStuck(x_1); -lean_dec(x_1); -return x_2; -} -} -lean_object* l_Lean_WHNF_getStuckMVar___main___rarg___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) { -_start: -{ -lean_object* x_8; -if (lean_obj_tag(x_7) == 0) -{ -lean_object* x_14; -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_3); -x_14 = lean_box(0); -x_8 = x_14; -goto block_13; -} -else -{ -lean_object* x_15; -x_15 = lean_ctor_get(x_7, 0); -switch (lean_obj_tag(x_15)) { -case 4: -{ -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; -x_16 = lean_ctor_get(x_15, 0); -lean_inc(x_4); -lean_inc(x_2); -x_17 = lean_alloc_closure((void*)(l_Lean_WHNF_getStuckMVar___main___rarg), 4, 3); -lean_closure_set(x_17, 0, x_2); -lean_closure_set(x_17, 1, x_3); -lean_closure_set(x_17, 2, x_4); -x_18 = lean_unsigned_to_nat(0u); -x_19 = l_Lean_Expr_getAppNumArgsAux___main(x_5, x_18); -x_20 = l_Lean_Expr_getAppArgs___closed__1; -lean_inc(x_19); -x_21 = lean_mk_array(x_19, x_20); -x_22 = lean_unsigned_to_nat(1u); -x_23 = lean_nat_sub(x_19, x_22); -lean_dec(x_19); -x_24 = l___private_Init_Lean_Expr_3__getAppArgsAux___main(x_5, x_21, x_23); -x_25 = l_Lean_WHNF_isQuotRecStuck___rarg(x_2, x_4, x_17, x_16, x_6, x_24); -lean_dec(x_24); -return x_25; -} -case 7: -{ -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; -x_26 = lean_ctor_get(x_15, 0); -lean_inc(x_4); -lean_inc(x_2); -x_27 = lean_alloc_closure((void*)(l_Lean_WHNF_getStuckMVar___main___rarg), 4, 3); -lean_closure_set(x_27, 0, x_2); -lean_closure_set(x_27, 1, x_3); -lean_closure_set(x_27, 2, x_4); -x_28 = lean_unsigned_to_nat(0u); -x_29 = l_Lean_Expr_getAppNumArgsAux___main(x_5, x_28); -x_30 = l_Lean_Expr_getAppArgs___closed__1; -lean_inc(x_29); -x_31 = lean_mk_array(x_29, x_30); -x_32 = lean_unsigned_to_nat(1u); -x_33 = lean_nat_sub(x_29, x_32); -lean_dec(x_29); -x_34 = l___private_Init_Lean_Expr_3__getAppArgsAux___main(x_5, x_31, x_33); -x_35 = l_Lean_WHNF_isRecStuck___rarg(x_2, x_4, x_27, x_26, x_6, x_34); -lean_dec(x_34); -return x_35; -} -default: -{ -lean_object* x_36; -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_3); -x_36 = lean_box(0); -x_8 = x_36; -goto block_13; -} -} -} -block_13: -{ -lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; -lean_dec(x_8); -x_9 = lean_ctor_get(x_2, 0); -lean_inc(x_9); -lean_dec(x_2); -x_10 = lean_ctor_get(x_9, 1); -lean_inc(x_10); -lean_dec(x_9); -x_11 = lean_box(0); -x_12 = lean_apply_2(x_10, lean_box(0), x_11); -return x_12; -} -} -} -lean_object* l_Lean_WHNF_getStuckMVar___main___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -lean_object* x_5; -switch (lean_obj_tag(x_4)) { -case 2: -{ -lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; -lean_dec(x_3); -lean_dec(x_2); -x_11 = lean_ctor_get(x_1, 0); -lean_inc(x_11); -lean_dec(x_1); -x_12 = lean_ctor_get(x_11, 1); -lean_inc(x_12); -lean_dec(x_11); -x_13 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_13, 0, x_4); -x_14 = lean_apply_2(x_12, lean_box(0), x_13); -return x_14; -} -case 5: -{ -lean_object* x_15; lean_object* x_16; -x_15 = lean_ctor_get(x_4, 0); -lean_inc(x_15); -x_16 = l_Lean_Expr_getAppFn___main(x_15); -lean_dec(x_15); -switch (lean_obj_tag(x_16)) { -case 2: -{ -lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -x_17 = lean_ctor_get(x_1, 0); -lean_inc(x_17); -lean_dec(x_1); -x_18 = lean_ctor_get(x_17, 1); -lean_inc(x_18); -lean_dec(x_17); -x_19 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_19, 0, x_16); -x_20 = lean_apply_2(x_18, lean_box(0), x_19); -return x_20; -} -case 4: -{ -lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; -x_21 = lean_ctor_get(x_16, 0); -lean_inc(x_21); -x_22 = lean_ctor_get(x_16, 1); -lean_inc(x_22); -lean_dec(x_16); -x_23 = lean_ctor_get(x_1, 1); -lean_inc(x_23); -lean_inc(x_2); -x_24 = lean_apply_1(x_2, x_21); -lean_inc(x_1); -x_25 = lean_alloc_closure((void*)(l_Lean_WHNF_getStuckMVar___main___rarg___lambda__1___boxed), 7, 6); -lean_closure_set(x_25, 0, x_1); -lean_closure_set(x_25, 1, x_1); -lean_closure_set(x_25, 2, x_2); -lean_closure_set(x_25, 3, x_3); -lean_closure_set(x_25, 4, x_4); -lean_closure_set(x_25, 5, x_22); -x_26 = lean_apply_4(x_23, lean_box(0), lean_box(0), x_24, x_25); -return x_26; -} -default: -{ -lean_object* x_27; -lean_dec(x_16); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -x_27 = lean_box(0); -x_5 = x_27; -goto block_10; -} -} -} -case 10: -{ -lean_object* x_28; -x_28 = lean_ctor_get(x_4, 1); -lean_inc(x_28); -lean_dec(x_4); -x_4 = x_28; -goto _start; -} -case 11: -{ -lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; -x_30 = lean_ctor_get(x_4, 2); -lean_inc(x_30); -lean_dec(x_4); -x_31 = lean_ctor_get(x_1, 1); -lean_inc(x_31); -lean_inc(x_3); -x_32 = lean_apply_1(x_3, x_30); -x_33 = lean_alloc_closure((void*)(l_Lean_WHNF_getStuckMVar___main___rarg), 4, 3); -lean_closure_set(x_33, 0, x_1); -lean_closure_set(x_33, 1, x_2); -lean_closure_set(x_33, 2, x_3); -x_34 = lean_apply_4(x_31, lean_box(0), lean_box(0), x_32, x_33); -return x_34; -} -default: -{ -lean_object* x_35; -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -x_35 = lean_box(0); -x_5 = x_35; -goto block_10; -} -} -block_10: -{ -lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; -lean_dec(x_5); -x_6 = lean_ctor_get(x_1, 0); -lean_inc(x_6); -lean_dec(x_1); -x_7 = lean_ctor_get(x_6, 1); -lean_inc(x_7); -lean_dec(x_6); -x_8 = lean_box(0); -x_9 = lean_apply_2(x_7, lean_box(0), x_8); -return x_9; -} -} -} -lean_object* l_Lean_WHNF_getStuckMVar___main(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_WHNF_getStuckMVar___main___rarg), 4, 0); -return x_2; -} -} -lean_object* l_Lean_WHNF_getStuckMVar___main___rarg___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) { -_start: -{ -lean_object* x_8; -x_8 = l_Lean_WHNF_getStuckMVar___main___rarg___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_1); -return x_8; -} -} -lean_object* l_Lean_WHNF_getStuckMVar___main___boxed(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = l_Lean_WHNF_getStuckMVar___main(x_1); -lean_dec(x_1); -return x_2; -} -} -lean_object* l_Lean_WHNF_getStuckMVar___rarg(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_WHNF_getStuckMVar___main___rarg(x_1, x_2, x_3, x_4); -return x_5; -} -} -lean_object* l_Lean_WHNF_getStuckMVar(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_WHNF_getStuckMVar___rarg), 4, 0); -return x_2; -} -} -lean_object* l_Lean_WHNF_getStuckMVar___boxed(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = l_Lean_WHNF_getStuckMVar(x_1); -lean_dec(x_1); -return x_2; -} -} -lean_object* l_Lean_WHNF_whnfEasyCases___main___rarg___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) { -_start: -{ -lean_object* x_8; -x_8 = l_Lean_LocalDecl_value_x3f(x_7); -if (lean_obj_tag(x_8) == 0) -{ -lean_object* x_9; lean_object* x_10; lean_object* x_11; -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -x_9 = lean_ctor_get(x_3, 0); -lean_inc(x_9); -lean_dec(x_3); -x_10 = lean_ctor_get(x_9, 1); -lean_inc(x_10); -lean_dec(x_9); -x_11 = lean_apply_2(x_10, lean_box(0), x_2); -return x_11; -} -else -{ -lean_object* x_12; lean_object* x_13; -lean_dec(x_2); -x_12 = lean_ctor_get(x_8, 0); -lean_inc(x_12); -lean_dec(x_8); -x_13 = l_Lean_WHNF_whnfEasyCases___main___rarg(x_3, x_4, x_5, x_12, x_6); -return x_13; -} -} -} -lean_object* l_Lean_WHNF_whnfEasyCases___main___rarg___lambda__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -if (lean_obj_tag(x_7) == 0) -{ -lean_object* x_8; lean_object* x_9; lean_object* x_10; -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -x_8 = lean_ctor_get(x_3, 0); -lean_inc(x_8); -lean_dec(x_3); -x_9 = lean_ctor_get(x_8, 1); -lean_inc(x_9); -lean_dec(x_8); -x_10 = lean_apply_2(x_9, lean_box(0), x_2); -return x_10; -} -else -{ -lean_object* x_11; lean_object* x_12; -lean_dec(x_2); -x_11 = lean_ctor_get(x_7, 0); -lean_inc(x_11); -lean_dec(x_7); -x_12 = l_Lean_WHNF_whnfEasyCases___main___rarg(x_3, x_4, x_5, x_11, x_6); -return x_12; -} -} -} -lean_object* l_Lean_WHNF_whnfEasyCases___main___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; -switch (lean_obj_tag(x_4)) { -case 0: -{ -lean_object* x_11; lean_object* x_12; lean_object* x_13; -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -x_11 = l_Lean_Expr_Inhabited; -x_12 = l_monadInhabited___rarg(x_1, x_11); -x_13 = l_unreachable_x21___rarg(x_12); -return x_13; -} -case 1: -{ -lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; -x_14 = lean_ctor_get(x_4, 0); -lean_inc(x_14); -x_15 = lean_ctor_get(x_1, 1); -lean_inc(x_15); -lean_inc(x_2); -x_16 = lean_apply_1(x_2, x_14); -lean_inc(x_1); -x_17 = lean_alloc_closure((void*)(l_Lean_WHNF_whnfEasyCases___main___rarg___lambda__1___boxed), 7, 6); -lean_closure_set(x_17, 0, x_1); -lean_closure_set(x_17, 1, x_4); -lean_closure_set(x_17, 2, x_1); -lean_closure_set(x_17, 3, x_2); -lean_closure_set(x_17, 4, x_3); -lean_closure_set(x_17, 5, x_5); -x_18 = lean_apply_4(x_15, lean_box(0), lean_box(0), x_16, x_17); -return x_18; -} -case 2: -{ -lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; -x_19 = lean_ctor_get(x_4, 0); -lean_inc(x_19); -x_20 = lean_ctor_get(x_1, 1); -lean_inc(x_20); -lean_inc(x_3); -x_21 = lean_apply_1(x_3, x_19); -lean_inc(x_1); -x_22 = lean_alloc_closure((void*)(l_Lean_WHNF_whnfEasyCases___main___rarg___lambda__2___boxed), 7, 6); -lean_closure_set(x_22, 0, x_1); -lean_closure_set(x_22, 1, x_4); -lean_closure_set(x_22, 2, x_1); -lean_closure_set(x_22, 3, x_2); -lean_closure_set(x_22, 4, x_3); -lean_closure_set(x_22, 5, x_5); -x_23 = lean_apply_4(x_20, lean_box(0), lean_box(0), x_21, x_22); -return x_23; -} -case 4: -{ -lean_object* x_24; -lean_dec(x_3); -lean_dec(x_2); -lean_dec(x_1); -x_24 = lean_apply_1(x_5, x_4); -return x_24; -} -case 5: -{ -lean_object* x_25; -lean_dec(x_3); -lean_dec(x_2); -lean_dec(x_1); -x_25 = lean_apply_1(x_5, x_4); -return x_25; -} -case 8: -{ -lean_object* x_26; -lean_dec(x_3); -lean_dec(x_2); -lean_dec(x_1); -x_26 = lean_apply_1(x_5, x_4); -return x_26; -} -case 10: -{ -lean_object* x_27; -x_27 = lean_ctor_get(x_4, 1); -lean_inc(x_27); -lean_dec(x_4); -x_4 = x_27; -goto _start; -} -case 11: -{ -lean_object* x_29; -lean_dec(x_3); -lean_dec(x_2); -lean_dec(x_1); -x_29 = lean_apply_1(x_5, x_4); -return x_29; -} -case 12: -{ -lean_object* x_30; lean_object* x_31; lean_object* x_32; -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -x_30 = l_Lean_Expr_Inhabited; -x_31 = l_monadInhabited___rarg(x_1, x_30); -x_32 = l_unreachable_x21___rarg(x_31); -return x_32; -} -default: -{ -lean_object* x_33; -lean_dec(x_5); -lean_dec(x_3); -lean_dec(x_2); -x_33 = lean_box(0); -x_6 = x_33; -goto block_10; -} -} -block_10: -{ -lean_object* x_7; lean_object* x_8; lean_object* x_9; -lean_dec(x_6); -x_7 = lean_ctor_get(x_1, 0); -lean_inc(x_7); -lean_dec(x_1); -x_8 = lean_ctor_get(x_7, 1); -lean_inc(x_8); -lean_dec(x_7); -x_9 = lean_apply_2(x_8, lean_box(0), x_4); -return x_9; -} -} -} -lean_object* l_Lean_WHNF_whnfEasyCases___main(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_WHNF_whnfEasyCases___main___rarg), 5, 0); -return x_2; -} -} -lean_object* l_Lean_WHNF_whnfEasyCases___main___rarg___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) { -_start: -{ -lean_object* x_8; -x_8 = l_Lean_WHNF_whnfEasyCases___main___rarg___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7); -lean_dec(x_7); -lean_dec(x_1); -return x_8; -} -} -lean_object* l_Lean_WHNF_whnfEasyCases___main___rarg___lambda__2___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_WHNF_whnfEasyCases___main___rarg___lambda__2(x_1, x_2, x_3, x_4, x_5, x_6, x_7); -lean_dec(x_1); -return x_8; -} -} -lean_object* l_Lean_WHNF_whnfEasyCases___main___boxed(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = l_Lean_WHNF_whnfEasyCases___main(x_1); -lean_dec(x_1); -return x_2; -} -} -lean_object* l_Lean_WHNF_whnfEasyCases___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; -x_6 = l_Lean_WHNF_whnfEasyCases___main___rarg(x_1, x_2, x_3, x_4, x_5); -return x_6; -} -} -lean_object* l_Lean_WHNF_whnfEasyCases(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_WHNF_whnfEasyCases___rarg), 5, 0); -return x_2; -} -} -lean_object* l_Lean_WHNF_whnfEasyCases___boxed(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = l_Lean_WHNF_whnfEasyCases(x_1); -lean_dec(x_1); -return x_2; -} -} -lean_object* _init_l___private_Init_Lean_WHNF_6__isIdRhsApp___closed__1() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string("idRhs"); -return x_1; -} -} -lean_object* _init_l___private_Init_Lean_WHNF_6__isIdRhsApp___closed__2() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = lean_box(0); -x_2 = l___private_Init_Lean_WHNF_6__isIdRhsApp___closed__1; -x_3 = lean_name_mk_string(x_1, x_2); -return x_3; -} -} -uint8_t l___private_Init_Lean_WHNF_6__isIdRhsApp(lean_object* x_1) { -_start: -{ -lean_object* x_2; uint8_t x_3; -x_2 = l___private_Init_Lean_WHNF_6__isIdRhsApp___closed__2; -x_3 = l_Lean_Expr_isAppOf(x_1, x_2); -return x_3; -} -} -lean_object* l___private_Init_Lean_WHNF_6__isIdRhsApp___boxed(lean_object* x_1) { -_start: -{ -uint8_t x_2; lean_object* x_3; -x_2 = l___private_Init_Lean_WHNF_6__isIdRhsApp(x_1); -lean_dec(x_1); -x_3 = lean_box(x_2); -return x_3; -} -} -lean_object* l___private_Init_Lean_WHNF_7__extractIdRhs(lean_object* x_1) { -_start: -{ -uint8_t x_2; -x_2 = l___private_Init_Lean_WHNF_6__isIdRhsApp(x_1); -if (x_2 == 0) -{ -return x_1; -} -else -{ -lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; uint8_t x_12; -x_3 = lean_unsigned_to_nat(0u); -x_4 = l_Lean_Expr_getAppNumArgsAux___main(x_1, x_3); -x_5 = l_Lean_Expr_getAppArgs___closed__1; -lean_inc(x_4); -x_6 = lean_mk_array(x_4, x_5); -x_7 = lean_unsigned_to_nat(1u); -x_8 = lean_nat_sub(x_4, x_7); -lean_dec(x_4); -lean_inc(x_1); -x_9 = l___private_Init_Lean_Expr_3__getAppArgsAux___main(x_1, x_6, x_8); -x_10 = lean_array_get_size(x_9); -x_11 = lean_unsigned_to_nat(2u); -x_12 = lean_nat_dec_lt(x_10, x_11); -if (x_12 == 0) -{ -lean_object* x_13; lean_object* x_14; lean_object* x_15; -lean_dec(x_1); -x_13 = l_Lean_Expr_Inhabited; -x_14 = lean_array_get(x_13, x_9, x_7); -x_15 = l___private_Init_Lean_Expr_2__mkAppRangeAux___main(x_10, x_9, x_11, x_14); -lean_dec(x_9); -lean_dec(x_10); -return x_15; -} -else -{ -lean_dec(x_10); -lean_dec(x_9); -return x_1; -} -} -} -} -lean_object* l___private_Init_Lean_WHNF_8__deltaDefinition___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_7; lean_object* x_8; uint8_t x_9; -x_5 = l_Lean_ConstantInfo_lparams(x_1); -x_6 = lean_unsigned_to_nat(0u); -x_7 = l_List_lengthAux___main___rarg(x_5, x_6); -lean_dec(x_5); -x_8 = l_List_lengthAux___main___rarg(x_2, x_6); -x_9 = lean_nat_dec_eq(x_7, x_8); -lean_dec(x_8); -lean_dec(x_7); -if (x_9 == 0) -{ -lean_object* x_10; lean_object* x_11; -lean_dec(x_4); -lean_dec(x_2); -lean_dec(x_1); -x_10 = lean_box(0); -x_11 = lean_apply_1(x_3, x_10); -return x_11; -} -else -{ -lean_object* x_12; lean_object* x_13; lean_object* x_14; -lean_dec(x_3); -x_12 = lean_instantiate_value_lparams(x_1, x_2); -x_13 = l___private_Init_Lean_WHNF_7__extractIdRhs(x_12); -x_14 = lean_apply_1(x_4, x_13); -return x_14; -} -} -} -lean_object* l___private_Init_Lean_WHNF_8__deltaDefinition(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l___private_Init_Lean_WHNF_8__deltaDefinition___rarg), 4, 0); -return x_2; -} -} -lean_object* l___private_Init_Lean_WHNF_9__deltaBetaDefinition___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; uint8_t x_10; -x_6 = l_Lean_ConstantInfo_lparams(x_1); -x_7 = lean_unsigned_to_nat(0u); -x_8 = l_List_lengthAux___main___rarg(x_6, x_7); -lean_dec(x_6); -x_9 = l_List_lengthAux___main___rarg(x_2, x_7); -x_10 = lean_nat_dec_eq(x_8, x_9); -lean_dec(x_9); -lean_dec(x_8); -if (x_10 == 0) -{ -lean_object* x_11; lean_object* x_12; -lean_dec(x_5); -lean_dec(x_3); -lean_dec(x_2); -lean_dec(x_1); -x_11 = lean_box(0); -x_12 = lean_apply_1(x_4, x_11); -return x_12; -} -else -{ -lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; -lean_dec(x_4); -x_13 = lean_instantiate_value_lparams(x_1, x_2); -x_14 = l_Lean_Expr_betaRev(x_13, x_3); -lean_dec(x_13); -x_15 = l___private_Init_Lean_WHNF_7__extractIdRhs(x_14); -x_16 = lean_apply_1(x_5, x_15); -return x_16; -} -} -} -lean_object* l___private_Init_Lean_WHNF_9__deltaBetaDefinition(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l___private_Init_Lean_WHNF_9__deltaBetaDefinition___rarg), 5, 0); -return x_2; -} -} -lean_object* l_Lean_WHNF_whnfCore___main___rarg___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { -_start: -{ -uint8_t x_6; -x_6 = lean_expr_eqv(x_1, x_2); -if (x_6 == 0) -{ -lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; -x_7 = lean_ctor_get(x_3, 0); -lean_inc(x_7); -lean_dec(x_3); -x_8 = lean_ctor_get(x_7, 1); -lean_inc(x_8); -lean_dec(x_7); -x_9 = l_Lean_Expr_updateFn___main(x_4, x_2); -x_10 = lean_apply_2(x_8, lean_box(0), x_9); -return x_10; -} -else -{ -lean_object* x_11; lean_object* x_12; lean_object* x_13; -x_11 = lean_ctor_get(x_3, 0); -lean_inc(x_11); -lean_dec(x_3); -x_12 = lean_ctor_get(x_11, 1); -lean_inc(x_12); -lean_dec(x_11); -x_13 = lean_apply_2(x_12, lean_box(0), x_4); -return x_13; -} -} -} -lean_object* l_Lean_WHNF_whnfCore___main___rarg___lambda__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14, uint8_t x_15) { -_start: -{ -if (x_15 == 0) -{ -uint8_t x_16; -lean_dec(x_14); -lean_dec(x_13); -lean_dec(x_12); -lean_dec(x_11); -lean_dec(x_10); -lean_dec(x_9); -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -x_16 = lean_expr_eqv(x_1, x_2); -if (x_16 == 0) -{ -lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; -x_17 = lean_ctor_get(x_3, 0); -lean_inc(x_17); -lean_dec(x_3); -x_18 = lean_ctor_get(x_17, 1); -lean_inc(x_18); -lean_dec(x_17); -x_19 = l_Lean_Expr_updateFn___main(x_4, x_2); -x_20 = lean_apply_2(x_18, lean_box(0), x_19); -return x_20; -} -else -{ -lean_object* x_21; lean_object* x_22; lean_object* x_23; -x_21 = lean_ctor_get(x_3, 0); -lean_inc(x_21); -lean_dec(x_3); -x_22 = lean_ctor_get(x_21, 1); -lean_inc(x_22); -lean_dec(x_21); -x_23 = lean_apply_2(x_22, lean_box(0), x_4); -return x_23; -} -} -else -{ -lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; -x_24 = lean_unsigned_to_nat(0u); -x_25 = l_Lean_Expr_getAppNumArgsAux___main(x_4, x_24); -x_26 = lean_mk_empty_array_with_capacity(x_25); -lean_dec(x_25); -x_27 = l___private_Init_Lean_Expr_4__getAppRevArgsAux___main(x_4, x_26); -x_28 = lean_alloc_closure((void*)(l_Lean_WHNF_whnfCore___main___rarg), 9, 8); -lean_closure_set(x_28, 0, x_3); -lean_closure_set(x_28, 1, x_5); -lean_closure_set(x_28, 2, x_6); -lean_closure_set(x_28, 3, x_7); -lean_closure_set(x_28, 4, x_8); -lean_closure_set(x_28, 5, x_9); -lean_closure_set(x_28, 6, x_10); -lean_closure_set(x_28, 7, x_11); -x_29 = l___private_Init_Lean_WHNF_9__deltaBetaDefinition___rarg(x_12, x_13, x_27, x_14, x_28); -return x_29; -} -} -} -lean_object* l_Lean_WHNF_whnfCore___main___rarg___lambda__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14, lean_object* x_15) { -_start: -{ -lean_object* x_16; -if (lean_obj_tag(x_15) == 0) -{ -uint8_t x_21; -lean_dec(x_14); -lean_dec(x_13); -lean_dec(x_12); -lean_dec(x_11); -lean_dec(x_10); -lean_dec(x_9); -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -x_21 = lean_expr_eqv(x_1, x_2); -lean_dec(x_1); -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_3, 0); -lean_inc(x_22); -lean_dec(x_3); -x_23 = lean_ctor_get(x_22, 1); -lean_inc(x_23); -lean_dec(x_22); -x_24 = l_Lean_Expr_updateFn___main(x_4, x_2); -lean_dec(x_2); -x_25 = lean_apply_2(x_23, lean_box(0), x_24); -return x_25; -} -else -{ -lean_object* x_26; -lean_dec(x_2); -x_26 = lean_box(0); -x_16 = x_26; -goto block_20; -} -} -else -{ -lean_object* x_27; -x_27 = lean_ctor_get(x_15, 0); -lean_inc(x_27); -lean_dec(x_15); -switch (lean_obj_tag(x_27)) { -case 1: -{ -lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; -x_28 = l_Lean_ConstantInfo_name(x_27); -lean_inc(x_5); -x_29 = lean_apply_1(x_5, x_28); -x_30 = lean_alloc_closure((void*)(l_Lean_WHNF_whnfCore___main___rarg___lambda__2___boxed), 15, 14); -lean_closure_set(x_30, 0, x_1); -lean_closure_set(x_30, 1, x_2); -lean_closure_set(x_30, 2, x_3); -lean_closure_set(x_30, 3, x_4); -lean_closure_set(x_30, 4, x_6); -lean_closure_set(x_30, 5, x_5); -lean_closure_set(x_30, 6, x_7); -lean_closure_set(x_30, 7, x_8); -lean_closure_set(x_30, 8, x_9); -lean_closure_set(x_30, 9, x_10); -lean_closure_set(x_30, 10, x_11); -lean_closure_set(x_30, 11, x_27); -lean_closure_set(x_30, 12, x_12); -lean_closure_set(x_30, 13, x_13); -x_31 = lean_apply_4(x_14, lean_box(0), lean_box(0), x_29, x_30); -return x_31; -} -case 4: -{ -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_dec(x_14); -lean_dec(x_2); -lean_dec(x_1); -x_32 = lean_ctor_get(x_27, 0); -lean_inc(x_32); -lean_dec(x_27); -x_33 = lean_unsigned_to_nat(0u); -x_34 = l_Lean_Expr_getAppNumArgsAux___main(x_4, x_33); -x_35 = l_Lean_Expr_getAppArgs___closed__1; -lean_inc(x_34); -x_36 = lean_mk_array(x_34, x_35); -x_37 = lean_unsigned_to_nat(1u); -x_38 = lean_nat_sub(x_34, x_37); -lean_dec(x_34); -x_39 = l___private_Init_Lean_Expr_3__getAppArgsAux___main(x_4, x_36, x_38); -lean_inc(x_7); -lean_inc(x_6); -lean_inc(x_3); -x_40 = lean_alloc_closure((void*)(l_Lean_WHNF_whnfCore___main___rarg), 9, 8); -lean_closure_set(x_40, 0, x_3); -lean_closure_set(x_40, 1, x_6); -lean_closure_set(x_40, 2, x_5); -lean_closure_set(x_40, 3, x_7); -lean_closure_set(x_40, 4, x_8); -lean_closure_set(x_40, 5, x_9); -lean_closure_set(x_40, 6, x_10); -lean_closure_set(x_40, 7, x_11); -x_41 = l_Lean_WHNF_reduceQuotRec___rarg(x_3, x_6, x_7, x_32, x_12, x_39, x_13, x_40); -lean_dec(x_12); -lean_dec(x_32); -return x_41; -} -case 7: -{ -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_dec(x_14); -lean_dec(x_2); -lean_dec(x_1); -x_42 = lean_ctor_get(x_27, 0); -lean_inc(x_42); -lean_dec(x_27); -x_43 = lean_unsigned_to_nat(0u); -x_44 = l_Lean_Expr_getAppNumArgsAux___main(x_4, x_43); -x_45 = l_Lean_Expr_getAppArgs___closed__1; -lean_inc(x_44); -x_46 = lean_mk_array(x_44, x_45); -x_47 = lean_unsigned_to_nat(1u); -x_48 = lean_nat_sub(x_44, x_47); -lean_dec(x_44); -x_49 = l___private_Init_Lean_Expr_3__getAppArgsAux___main(x_4, x_46, x_48); -lean_inc(x_9); -lean_inc(x_8); -lean_inc(x_7); -lean_inc(x_6); -lean_inc(x_3); -x_50 = lean_alloc_closure((void*)(l_Lean_WHNF_whnfCore___main___rarg), 9, 8); -lean_closure_set(x_50, 0, x_3); -lean_closure_set(x_50, 1, x_6); -lean_closure_set(x_50, 2, x_5); -lean_closure_set(x_50, 3, x_7); -lean_closure_set(x_50, 4, x_8); -lean_closure_set(x_50, 5, x_9); -lean_closure_set(x_50, 6, x_10); -lean_closure_set(x_50, 7, x_11); -x_51 = l_Lean_WHNF_reduceRec___rarg(x_3, x_6, x_7, x_8, x_9, x_42, x_12, x_49, x_13, x_50); -return x_51; -} -default: -{ -uint8_t x_52; -lean_dec(x_27); -lean_dec(x_14); -lean_dec(x_13); -lean_dec(x_12); -lean_dec(x_11); -lean_dec(x_10); -lean_dec(x_9); -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -x_52 = lean_expr_eqv(x_1, x_2); -lean_dec(x_1); -if (x_52 == 0) -{ -lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; -x_53 = lean_ctor_get(x_3, 0); -lean_inc(x_53); -lean_dec(x_3); -x_54 = lean_ctor_get(x_53, 1); -lean_inc(x_54); -lean_dec(x_53); -x_55 = l_Lean_Expr_updateFn___main(x_4, x_2); -lean_dec(x_2); -x_56 = lean_apply_2(x_54, lean_box(0), x_55); -return x_56; -} -else -{ -lean_object* x_57; -lean_dec(x_2); -x_57 = lean_box(0); -x_16 = x_57; -goto block_20; -} -} -} -} -block_20: -{ -lean_object* x_17; lean_object* x_18; lean_object* x_19; -lean_dec(x_16); -x_17 = lean_ctor_get(x_3, 0); -lean_inc(x_17); -lean_dec(x_3); -x_18 = lean_ctor_get(x_17, 1); -lean_inc(x_18); -lean_dec(x_17); -x_19 = lean_apply_2(x_18, lean_box(0), x_4); -return x_19; -} -} -} -lean_object* l_Lean_WHNF_whnfCore___main___rarg___lambda__4(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12) { -_start: -{ -lean_object* x_13; uint8_t x_18; -x_18 = l_Lean_Expr_isLambda(x_12); -if (x_18 == 0) -{ -if (lean_obj_tag(x_12) == 4) -{ -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_12, 0); -lean_inc(x_19); -x_20 = lean_ctor_get(x_12, 1); -lean_inc(x_20); -lean_inc(x_3); -lean_inc(x_2); -lean_inc(x_12); -lean_inc(x_1); -x_21 = lean_alloc_closure((void*)(l_Lean_WHNF_whnfCore___main___rarg___lambda__1___boxed), 5, 4); -lean_closure_set(x_21, 0, x_1); -lean_closure_set(x_21, 1, x_12); -lean_closure_set(x_21, 2, x_2); -lean_closure_set(x_21, 3, x_3); -lean_inc(x_4); -x_22 = lean_apply_1(x_4, x_19); -lean_inc(x_11); -x_23 = lean_alloc_closure((void*)(l_Lean_WHNF_whnfCore___main___rarg___lambda__3), 15, 14); -lean_closure_set(x_23, 0, x_1); -lean_closure_set(x_23, 1, x_12); -lean_closure_set(x_23, 2, x_2); -lean_closure_set(x_23, 3, x_3); -lean_closure_set(x_23, 4, x_5); -lean_closure_set(x_23, 5, x_4); -lean_closure_set(x_23, 6, x_6); -lean_closure_set(x_23, 7, x_7); -lean_closure_set(x_23, 8, x_8); -lean_closure_set(x_23, 9, x_9); -lean_closure_set(x_23, 10, x_10); -lean_closure_set(x_23, 11, x_20); -lean_closure_set(x_23, 12, x_21); -lean_closure_set(x_23, 13, x_11); -x_24 = lean_apply_4(x_11, lean_box(0), lean_box(0), x_22, x_23); -return x_24; -} -else -{ -uint8_t x_25; -lean_dec(x_11); -lean_dec(x_10); -lean_dec(x_9); -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -x_25 = lean_expr_eqv(x_1, x_12); -lean_dec(x_1); -if (x_25 == 0) -{ -lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; -x_26 = lean_ctor_get(x_2, 0); -lean_inc(x_26); -lean_dec(x_2); -x_27 = lean_ctor_get(x_26, 1); -lean_inc(x_27); -lean_dec(x_26); -x_28 = l_Lean_Expr_updateFn___main(x_3, x_12); -lean_dec(x_12); -x_29 = lean_apply_2(x_27, lean_box(0), x_28); -return x_29; -} -else -{ -lean_object* x_30; -lean_dec(x_12); -x_30 = lean_box(0); -x_13 = x_30; -goto block_17; -} -} -} -else -{ -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_dec(x_12); -lean_dec(x_11); -x_31 = lean_unsigned_to_nat(0u); -x_32 = l_Lean_Expr_getAppNumArgsAux___main(x_3, x_31); -x_33 = lean_mk_empty_array_with_capacity(x_32); -lean_dec(x_32); -x_34 = l___private_Init_Lean_Expr_4__getAppRevArgsAux___main(x_3, x_33); -x_35 = l_Lean_Expr_betaRev(x_1, x_34); -lean_dec(x_1); -x_36 = l_Lean_WHNF_whnfCore___main___rarg(x_2, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_35); -return x_36; -} -block_17: -{ -lean_object* x_14; lean_object* x_15; lean_object* x_16; -lean_dec(x_13); -x_14 = lean_ctor_get(x_2, 0); -lean_inc(x_14); -lean_dec(x_2); -x_15 = lean_ctor_get(x_14, 1); -lean_inc(x_15); -lean_dec(x_14); -x_16 = lean_apply_2(x_15, lean_box(0), x_3); -return x_16; -} -} -} -lean_object* l_Lean_WHNF_whnfCore___main___rarg___lambda__5(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; -if (lean_obj_tag(x_7) == 0) -{ -lean_object* x_13; -x_13 = lean_box(0); -x_8 = x_13; -goto block_12; -} -else -{ -lean_object* x_14; -x_14 = lean_ctor_get(x_7, 0); -if (lean_obj_tag(x_14) == 6) -{ -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; -x_15 = lean_ctor_get(x_14, 0); -x_16 = lean_ctor_get(x_3, 0); -lean_inc(x_16); -lean_dec(x_3); -x_17 = lean_ctor_get(x_16, 1); -lean_inc(x_17); -lean_dec(x_16); -x_18 = lean_ctor_get(x_15, 3); -x_19 = lean_nat_add(x_18, x_4); -x_20 = lean_unsigned_to_nat(0u); -x_21 = l_Lean_Expr_getAppNumArgsAux___main(x_5, x_20); -x_22 = lean_nat_sub(x_21, x_19); -lean_dec(x_19); -lean_dec(x_21); -x_23 = lean_unsigned_to_nat(1u); -x_24 = lean_nat_sub(x_22, x_23); -lean_dec(x_22); -x_25 = l_Lean_Expr_getRevArgD___main(x_5, x_24, x_6); -lean_dec(x_6); -x_26 = lean_apply_2(x_17, lean_box(0), x_25); -return x_26; -} -else -{ -lean_object* x_27; -x_27 = lean_box(0); -x_8 = x_27; -goto block_12; -} -} -block_12: -{ -lean_object* x_9; lean_object* x_10; lean_object* x_11; -lean_dec(x_8); -x_9 = lean_ctor_get(x_3, 0); -lean_inc(x_9); -lean_dec(x_3); -x_10 = lean_ctor_get(x_9, 1); -lean_inc(x_10); -lean_dec(x_9); -x_11 = lean_apply_2(x_10, lean_box(0), x_6); -return x_11; -} -} -} -lean_object* l_Lean_WHNF_whnfCore___main___rarg___lambda__6(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_14; -x_14 = l_Lean_Expr_getAppFn___main(x_8); -if (lean_obj_tag(x_14) == 4) -{ -lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; -x_15 = lean_ctor_get(x_14, 0); -lean_inc(x_15); -lean_dec(x_14); -x_16 = lean_apply_1(x_3, x_15); -lean_inc(x_5); -lean_inc(x_4); -x_17 = lean_alloc_closure((void*)(l_Lean_WHNF_whnfCore___main___rarg___lambda__5___boxed), 7, 6); -lean_closure_set(x_17, 0, x_4); -lean_closure_set(x_17, 1, x_5); -lean_closure_set(x_17, 2, x_4); -lean_closure_set(x_17, 3, x_6); -lean_closure_set(x_17, 4, x_8); -lean_closure_set(x_17, 5, x_5); -x_18 = lean_apply_4(x_7, lean_box(0), lean_box(0), x_16, x_17); -return x_18; -} -else -{ -lean_object* x_19; -lean_dec(x_14); -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_3); -x_19 = lean_box(0); -x_9 = x_19; -goto block_13; -} -block_13: -{ -lean_object* x_10; lean_object* x_11; lean_object* x_12; -lean_dec(x_9); -x_10 = lean_ctor_get(x_4, 0); -lean_inc(x_10); -lean_dec(x_4); -x_11 = lean_ctor_get(x_10, 1); -lean_inc(x_11); -lean_dec(x_10); -x_12 = lean_apply_2(x_11, lean_box(0), x_5); -return x_12; -} -} -} -lean_object* l_Lean_WHNF_whnfCore___main___rarg___lambda__7(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { -_start: -{ -switch (lean_obj_tag(x_9)) { -case 4: -{ -lean_object* x_10; lean_object* x_11; lean_object* x_12; -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -x_10 = lean_ctor_get(x_1, 0); -lean_inc(x_10); -lean_dec(x_1); -x_11 = lean_ctor_get(x_10, 1); -lean_inc(x_11); -lean_dec(x_10); -x_12 = lean_apply_2(x_11, lean_box(0), x_9); -return x_12; -} -case 5: -{ -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_13 = lean_ctor_get(x_9, 0); -lean_inc(x_13); -x_14 = l_Lean_Expr_getAppFn___main(x_13); -lean_dec(x_13); -x_15 = lean_ctor_get(x_1, 1); -lean_inc(x_15); -lean_inc(x_14); -lean_inc(x_8); -lean_inc(x_7); -lean_inc(x_6); -lean_inc(x_5); -lean_inc(x_4); -lean_inc(x_3); -lean_inc(x_2); -lean_inc(x_1); -x_16 = l_Lean_WHNF_whnfCore___main___rarg(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_14); -lean_inc(x_15); -x_17 = lean_alloc_closure((void*)(l_Lean_WHNF_whnfCore___main___rarg___lambda__4), 12, 11); -lean_closure_set(x_17, 0, x_14); -lean_closure_set(x_17, 1, x_1); -lean_closure_set(x_17, 2, x_9); -lean_closure_set(x_17, 3, x_2); -lean_closure_set(x_17, 4, x_3); -lean_closure_set(x_17, 5, x_4); -lean_closure_set(x_17, 6, x_5); -lean_closure_set(x_17, 7, x_6); -lean_closure_set(x_17, 8, x_7); -lean_closure_set(x_17, 9, x_8); -lean_closure_set(x_17, 10, x_15); -x_18 = lean_apply_4(x_15, lean_box(0), lean_box(0), x_16, x_17); -return x_18; -} -case 8: -{ -lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; -x_19 = lean_ctor_get(x_9, 2); -lean_inc(x_19); -x_20 = lean_ctor_get(x_9, 3); -lean_inc(x_20); -lean_dec(x_9); -x_21 = lean_expr_instantiate1(x_20, x_19); -lean_dec(x_19); -lean_dec(x_20); -x_22 = l_Lean_WHNF_whnfCore___main___rarg(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_21); -return x_22; -} -case 11: -{ -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_dec(x_8); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_3); -x_23 = lean_ctor_get(x_9, 1); -lean_inc(x_23); -x_24 = lean_ctor_get(x_9, 2); -lean_inc(x_24); -x_25 = lean_ctor_get(x_1, 1); -lean_inc(x_25); -x_26 = lean_apply_1(x_4, x_24); -lean_inc(x_25); -lean_inc(x_9); -lean_inc(x_1); -x_27 = lean_alloc_closure((void*)(l_Lean_WHNF_whnfCore___main___rarg___lambda__6___boxed), 8, 7); -lean_closure_set(x_27, 0, x_1); -lean_closure_set(x_27, 1, x_9); -lean_closure_set(x_27, 2, x_2); -lean_closure_set(x_27, 3, x_1); -lean_closure_set(x_27, 4, x_9); -lean_closure_set(x_27, 5, x_23); -lean_closure_set(x_27, 6, x_25); -x_28 = lean_apply_4(x_25, lean_box(0), lean_box(0), x_26, x_27); -return x_28; -} -default: -{ -lean_object* x_29; lean_object* x_30; lean_object* x_31; -lean_dec(x_9); -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -x_29 = l_Lean_Expr_Inhabited; -x_30 = l_monadInhabited___rarg(x_1, x_29); -x_31 = l_unreachable_x21___rarg(x_30); -return x_31; -} -} -} -} -lean_object* l_Lean_WHNF_whnfCore___main___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { -_start: -{ -lean_object* x_10; lean_object* x_11; -lean_inc(x_8); -lean_inc(x_7); -lean_inc(x_1); -x_10 = lean_alloc_closure((void*)(l_Lean_WHNF_whnfCore___main___rarg___lambda__7), 9, 8); -lean_closure_set(x_10, 0, x_1); -lean_closure_set(x_10, 1, x_2); -lean_closure_set(x_10, 2, x_3); -lean_closure_set(x_10, 3, x_4); -lean_closure_set(x_10, 4, x_5); -lean_closure_set(x_10, 5, x_6); -lean_closure_set(x_10, 6, x_7); -lean_closure_set(x_10, 7, x_8); -x_11 = l_Lean_WHNF_whnfEasyCases___main___rarg(x_1, x_7, x_8, x_9, x_10); -return x_11; -} -} -lean_object* l_Lean_WHNF_whnfCore___main(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_WHNF_whnfCore___main___rarg), 9, 0); -return x_2; -} -} -lean_object* l_Lean_WHNF_whnfCore___main___rarg___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { -_start: -{ -lean_object* x_6; -x_6 = l_Lean_WHNF_whnfCore___main___rarg___lambda__1(x_1, x_2, x_3, x_4, x_5); -lean_dec(x_5); -lean_dec(x_2); -lean_dec(x_1); -return x_6; -} -} -lean_object* l_Lean_WHNF_whnfCore___main___rarg___lambda__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14, lean_object* x_15) { -_start: -{ -uint8_t x_16; lean_object* x_17; -x_16 = lean_unbox(x_15); -lean_dec(x_15); -x_17 = l_Lean_WHNF_whnfCore___main___rarg___lambda__2(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12, x_13, x_14, x_16); -lean_dec(x_2); -lean_dec(x_1); -return x_17; -} -} -lean_object* l_Lean_WHNF_whnfCore___main___rarg___lambda__5___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_WHNF_whnfCore___main___rarg___lambda__5(x_1, x_2, x_3, x_4, x_5, x_6, x_7); -lean_dec(x_7); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_2); -lean_dec(x_1); -return x_8; -} -} -lean_object* l_Lean_WHNF_whnfCore___main___rarg___lambda__6___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_WHNF_whnfCore___main___rarg___lambda__6(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); -lean_dec(x_2); -lean_dec(x_1); -return x_9; -} -} -lean_object* l_Lean_WHNF_whnfCore___main___boxed(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = l_Lean_WHNF_whnfCore___main(x_1); -lean_dec(x_1); -return x_2; -} -} -lean_object* l_Lean_WHNF_whnfCore___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { -_start: -{ -lean_object* x_10; -x_10 = l_Lean_WHNF_whnfCore___main___rarg(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9); -return x_10; -} -} -lean_object* l_Lean_WHNF_whnfCore(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_WHNF_whnfCore___rarg), 9, 0); -return x_2; -} -} -lean_object* l_Lean_WHNF_whnfCore___boxed(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = l_Lean_WHNF_whnfCore(x_1); -lean_dec(x_1); -return x_2; -} -} -lean_object* l___private_Init_Lean_WHNF_10__whnfCoreUnstuck___main___rarg___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, lean_object* x_9, lean_object* x_10, uint8_t x_11) { -_start: -{ -if (x_11 == 0) -{ -lean_object* x_12; lean_object* x_13; lean_object* x_14; -lean_dec(x_10); -lean_dec(x_9); -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_3); -x_12 = lean_ctor_get(x_1, 0); -lean_inc(x_12); -lean_dec(x_1); -x_13 = lean_ctor_get(x_12, 1); -lean_inc(x_13); -lean_dec(x_12); -x_14 = lean_apply_2(x_13, lean_box(0), x_2); -return x_14; -} -else -{ -lean_object* x_15; -x_15 = l___private_Init_Lean_WHNF_10__whnfCoreUnstuck___main___rarg(x_1, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_2); -return x_15; -} -} -} -lean_object* l___private_Init_Lean_WHNF_10__whnfCoreUnstuck___main___rarg___lambda__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12) { -_start: -{ -if (lean_obj_tag(x_12) == 0) -{ -lean_object* x_13; lean_object* x_14; lean_object* x_15; -lean_dec(x_11); -lean_dec(x_10); -lean_dec(x_9); -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_3); -x_13 = lean_ctor_get(x_1, 0); -lean_inc(x_13); -lean_dec(x_1); -x_14 = lean_ctor_get(x_13, 1); -lean_inc(x_14); -lean_dec(x_13); -x_15 = lean_apply_2(x_14, lean_box(0), x_2); -return x_15; -} -else -{ -lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; -x_16 = lean_ctor_get(x_12, 0); -lean_inc(x_16); -lean_dec(x_12); -lean_inc(x_3); -x_17 = lean_apply_1(x_3, x_16); -x_18 = lean_alloc_closure((void*)(l___private_Init_Lean_WHNF_10__whnfCoreUnstuck___main___rarg___lambda__1___boxed), 11, 10); -lean_closure_set(x_18, 0, x_1); -lean_closure_set(x_18, 1, x_2); -lean_closure_set(x_18, 2, x_4); -lean_closure_set(x_18, 3, x_5); -lean_closure_set(x_18, 4, x_6); -lean_closure_set(x_18, 5, x_7); -lean_closure_set(x_18, 6, x_8); -lean_closure_set(x_18, 7, x_3); -lean_closure_set(x_18, 8, x_9); -lean_closure_set(x_18, 9, x_10); -x_19 = lean_apply_4(x_11, lean_box(0), lean_box(0), x_17, x_18); -return x_19; -} -} -} -lean_object* l___private_Init_Lean_WHNF_10__whnfCoreUnstuck___main___rarg___lambda__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) { -_start: -{ -lean_object* x_12; lean_object* x_13; lean_object* x_14; -lean_inc(x_11); -lean_inc(x_3); -lean_inc(x_2); -lean_inc(x_1); -x_12 = l_Lean_WHNF_getStuckMVar___main___rarg(x_1, x_2, x_3, x_11); -lean_inc(x_10); -x_13 = lean_alloc_closure((void*)(l___private_Init_Lean_WHNF_10__whnfCoreUnstuck___main___rarg___lambda__2), 12, 11); -lean_closure_set(x_13, 0, x_1); -lean_closure_set(x_13, 1, x_11); -lean_closure_set(x_13, 2, x_4); -lean_closure_set(x_13, 3, x_2); -lean_closure_set(x_13, 4, x_5); -lean_closure_set(x_13, 5, x_3); -lean_closure_set(x_13, 6, x_6); -lean_closure_set(x_13, 7, x_7); -lean_closure_set(x_13, 8, x_8); -lean_closure_set(x_13, 9, x_9); -lean_closure_set(x_13, 10, x_10); -x_14 = lean_apply_4(x_10, lean_box(0), lean_box(0), x_12, x_13); -return x_14; -} -} -lean_object* l___private_Init_Lean_WHNF_10__whnfCoreUnstuck___main___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { -_start: -{ -lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; -x_11 = lean_ctor_get(x_1, 1); -lean_inc(x_11); -lean_inc(x_9); -lean_inc(x_8); -lean_inc(x_6); -lean_inc(x_5); -lean_inc(x_4); -lean_inc(x_3); -lean_inc(x_2); -lean_inc(x_1); -x_12 = l_Lean_WHNF_whnfCore___main___rarg(x_1, x_2, x_3, x_4, x_5, x_6, x_8, x_9, x_10); -lean_inc(x_11); -x_13 = lean_alloc_closure((void*)(l___private_Init_Lean_WHNF_10__whnfCoreUnstuck___main___rarg___lambda__3), 11, 10); -lean_closure_set(x_13, 0, x_1); -lean_closure_set(x_13, 1, x_2); -lean_closure_set(x_13, 2, x_4); -lean_closure_set(x_13, 3, x_7); -lean_closure_set(x_13, 4, x_3); -lean_closure_set(x_13, 5, x_5); -lean_closure_set(x_13, 6, x_6); -lean_closure_set(x_13, 7, x_8); -lean_closure_set(x_13, 8, x_9); -lean_closure_set(x_13, 9, x_11); -x_14 = lean_apply_4(x_11, lean_box(0), lean_box(0), x_12, x_13); -return x_14; -} -} -lean_object* l___private_Init_Lean_WHNF_10__whnfCoreUnstuck___main(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l___private_Init_Lean_WHNF_10__whnfCoreUnstuck___main___rarg), 10, 0); -return x_2; -} -} -lean_object* l___private_Init_Lean_WHNF_10__whnfCoreUnstuck___main___rarg___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, lean_object* x_9, lean_object* x_10, lean_object* x_11) { -_start: -{ -uint8_t x_12; lean_object* x_13; -x_12 = lean_unbox(x_11); -lean_dec(x_11); -x_13 = l___private_Init_Lean_WHNF_10__whnfCoreUnstuck___main___rarg___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_12); -return x_13; -} -} -lean_object* l___private_Init_Lean_WHNF_10__whnfCoreUnstuck___main___boxed(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = l___private_Init_Lean_WHNF_10__whnfCoreUnstuck___main(x_1); -lean_dec(x_1); -return x_2; -} -} -lean_object* l___private_Init_Lean_WHNF_10__whnfCoreUnstuck___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { -_start: -{ -lean_object* x_11; -x_11 = l___private_Init_Lean_WHNF_10__whnfCoreUnstuck___main___rarg(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); -return x_11; -} -} -lean_object* l___private_Init_Lean_WHNF_10__whnfCoreUnstuck(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l___private_Init_Lean_WHNF_10__whnfCoreUnstuck___rarg), 10, 0); -return x_2; -} -} -lean_object* l___private_Init_Lean_WHNF_10__whnfCoreUnstuck___boxed(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = l___private_Init_Lean_WHNF_10__whnfCoreUnstuck(x_1); -lean_dec(x_1); -return x_2; -} -} -lean_object* l_Lean_WHNF_unfoldDefinitionAux___rarg___lambda__1(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, 0); -lean_inc(x_3); -lean_dec(x_1); -x_4 = lean_ctor_get(x_3, 1); -lean_inc(x_4); -lean_dec(x_3); -x_5 = lean_box(0); -x_6 = lean_apply_2(x_4, lean_box(0), x_5); -return x_6; -} -} -lean_object* l_Lean_WHNF_unfoldDefinitionAux___rarg___lambda__2(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, 0); -lean_inc(x_3); -lean_dec(x_1); -x_4 = lean_ctor_get(x_3, 1); -lean_inc(x_4); -lean_dec(x_3); -x_5 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_5, 0, x_2); -x_6 = lean_apply_2(x_4, lean_box(0), x_5); -return x_6; -} -} -lean_object* l_Lean_WHNF_unfoldDefinitionAux___rarg___lambda__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -lean_object* x_5; -if (lean_obj_tag(x_4) == 0) -{ -lean_object* x_11; -lean_dec(x_3); -x_11 = lean_box(0); -x_5 = x_11; -goto block_10; -} -else -{ -lean_object* x_12; -x_12 = lean_ctor_get(x_4, 0); -lean_inc(x_12); -lean_dec(x_4); -if (lean_obj_tag(x_12) == 1) -{ -lean_object* x_13; lean_object* x_14; lean_object* x_15; -lean_inc(x_2); -x_13 = lean_alloc_closure((void*)(l_Lean_WHNF_unfoldDefinitionAux___rarg___lambda__1___boxed), 2, 1); -lean_closure_set(x_13, 0, x_2); -x_14 = lean_alloc_closure((void*)(l_Lean_WHNF_unfoldDefinitionAux___rarg___lambda__2), 2, 1); -lean_closure_set(x_14, 0, x_2); -x_15 = l___private_Init_Lean_WHNF_8__deltaDefinition___rarg(x_12, x_3, x_13, x_14); -return x_15; -} -else -{ -lean_object* x_16; -lean_dec(x_12); -lean_dec(x_3); -x_16 = lean_box(0); -x_5 = x_16; -goto block_10; -} -} -block_10: -{ -lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; -lean_dec(x_5); -x_6 = lean_ctor_get(x_2, 0); -lean_inc(x_6); -lean_dec(x_2); -x_7 = lean_ctor_get(x_6, 1); -lean_inc(x_7); -lean_dec(x_6); -x_8 = lean_box(0); -x_9 = lean_apply_2(x_7, lean_box(0), x_8); -return x_9; -} -} -} -lean_object* l_Lean_WHNF_unfoldDefinitionAux___rarg___lambda__4(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -uint8_t x_4; -x_4 = l___private_Init_Lean_WHNF_6__isIdRhsApp(x_3); -if (x_4 == 0) -{ -lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; -lean_dec(x_3); -x_5 = lean_ctor_get(x_2, 0); -lean_inc(x_5); -lean_dec(x_2); -x_6 = lean_ctor_get(x_5, 1); -lean_inc(x_6); -lean_dec(x_5); -x_7 = lean_box(0); -x_8 = lean_apply_2(x_6, lean_box(0), x_7); -return x_8; -} -else -{ -lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; -x_9 = lean_ctor_get(x_2, 0); -lean_inc(x_9); -lean_dec(x_2); -x_10 = lean_ctor_get(x_9, 1); -lean_inc(x_10); -lean_dec(x_9); -x_11 = l___private_Init_Lean_WHNF_7__extractIdRhs(x_3); -x_12 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_12, 0, x_11); -x_13 = lean_apply_2(x_10, lean_box(0), x_12); -return x_13; -} -} -} -lean_object* l_Lean_WHNF_unfoldDefinitionAux___rarg___lambda__5(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) { -_start: -{ -lean_object* x_12; lean_object* x_13; lean_object* x_14; -lean_inc(x_1); -x_12 = l___private_Init_Lean_WHNF_10__whnfCoreUnstuck___main___rarg(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_11); -lean_inc(x_1); -x_13 = lean_alloc_closure((void*)(l_Lean_WHNF_unfoldDefinitionAux___rarg___lambda__4___boxed), 3, 2); -lean_closure_set(x_13, 0, x_1); -lean_closure_set(x_13, 1, x_1); -x_14 = lean_apply_4(x_10, lean_box(0), lean_box(0), x_12, x_13); -return x_14; -} -} -lean_object* l_Lean_WHNF_unfoldDefinitionAux___rarg___lambda__6(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14, lean_object* x_15, lean_object* x_16) { -_start: -{ -lean_object* x_17; -if (lean_obj_tag(x_16) == 0) -{ -uint8_t x_23; -lean_dec(x_15); -lean_dec(x_14); -lean_dec(x_13); -lean_dec(x_12); -lean_dec(x_11); -lean_dec(x_10); -lean_dec(x_9); -lean_dec(x_8); -lean_dec(x_7); -x_23 = l_Lean_ConstantInfo_hasValue(x_1); -if (x_23 == 0) -{ -lean_object* x_24; -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_3); -lean_dec(x_1); -x_24 = lean_box(0); -x_17 = x_24; -goto block_22; -} -else -{ -lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; -x_25 = lean_unsigned_to_nat(0u); -x_26 = l_Lean_Expr_getAppNumArgsAux___main(x_3, x_25); -x_27 = lean_mk_empty_array_with_capacity(x_26); -lean_dec(x_26); -x_28 = l___private_Init_Lean_Expr_4__getAppRevArgsAux___main(x_3, x_27); -x_29 = lean_alloc_closure((void*)(l_Lean_WHNF_unfoldDefinitionAux___rarg___lambda__2), 2, 1); -lean_closure_set(x_29, 0, x_4); -x_30 = l___private_Init_Lean_WHNF_9__deltaBetaDefinition___rarg(x_1, x_5, x_28, x_6, x_29); -return x_30; -} -} -else -{ -lean_object* x_31; -x_31 = lean_ctor_get(x_16, 0); -lean_inc(x_31); -lean_dec(x_16); -if (lean_obj_tag(x_31) == 1) -{ -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_dec(x_1); -x_32 = lean_unsigned_to_nat(0u); -x_33 = l_Lean_Expr_getAppNumArgsAux___main(x_3, x_32); -x_34 = lean_mk_empty_array_with_capacity(x_33); -lean_dec(x_33); -x_35 = l___private_Init_Lean_Expr_4__getAppRevArgsAux___main(x_3, x_34); -x_36 = lean_alloc_closure((void*)(l_Lean_WHNF_unfoldDefinitionAux___rarg___lambda__5), 11, 10); -lean_closure_set(x_36, 0, x_4); -lean_closure_set(x_36, 1, x_7); -lean_closure_set(x_36, 2, x_8); -lean_closure_set(x_36, 3, x_9); -lean_closure_set(x_36, 4, x_10); -lean_closure_set(x_36, 5, x_11); -lean_closure_set(x_36, 6, x_12); -lean_closure_set(x_36, 7, x_13); -lean_closure_set(x_36, 8, x_14); -lean_closure_set(x_36, 9, x_15); -x_37 = l___private_Init_Lean_WHNF_9__deltaBetaDefinition___rarg(x_31, x_5, x_35, x_6, x_36); -return x_37; -} -else -{ -uint8_t x_38; -lean_dec(x_31); -lean_dec(x_15); -lean_dec(x_14); -lean_dec(x_13); -lean_dec(x_12); -lean_dec(x_11); -lean_dec(x_10); -lean_dec(x_9); -lean_dec(x_8); -lean_dec(x_7); -x_38 = l_Lean_ConstantInfo_hasValue(x_1); -if (x_38 == 0) -{ -lean_object* x_39; -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_3); -lean_dec(x_1); -x_39 = lean_box(0); -x_17 = x_39; -goto block_22; -} -else -{ -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_unsigned_to_nat(0u); -x_41 = l_Lean_Expr_getAppNumArgsAux___main(x_3, x_40); -x_42 = lean_mk_empty_array_with_capacity(x_41); -lean_dec(x_41); -x_43 = l___private_Init_Lean_Expr_4__getAppRevArgsAux___main(x_3, x_42); -x_44 = lean_alloc_closure((void*)(l_Lean_WHNF_unfoldDefinitionAux___rarg___lambda__2), 2, 1); -lean_closure_set(x_44, 0, x_4); -x_45 = l___private_Init_Lean_WHNF_9__deltaBetaDefinition___rarg(x_1, x_5, x_43, x_6, x_44); -return x_45; -} -} -} -block_22: -{ -lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; -lean_dec(x_17); -x_18 = lean_ctor_get(x_4, 0); -lean_inc(x_18); -lean_dec(x_4); -x_19 = lean_ctor_get(x_18, 1); -lean_inc(x_19); -lean_dec(x_18); -x_20 = lean_box(0); -x_21 = lean_apply_2(x_19, lean_box(0), x_20); -return x_21; -} -} -} -lean_object* l_Lean_WHNF_unfoldDefinitionAux___rarg___lambda__7(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14, lean_object* x_15) { -_start: -{ -lean_object* x_16; -if (lean_obj_tag(x_15) == 0) -{ -lean_object* x_22; -lean_dec(x_14); -lean_dec(x_13); -lean_dec(x_12); -lean_dec(x_11); -lean_dec(x_10); -lean_dec(x_9); -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_3); -lean_dec(x_2); -x_22 = lean_box(0); -x_16 = x_22; -goto block_21; -} -else -{ -lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; uint8_t x_28; -x_23 = lean_ctor_get(x_15, 0); -lean_inc(x_23); -lean_dec(x_15); -x_24 = l_Lean_ConstantInfo_lparams(x_23); -x_25 = lean_unsigned_to_nat(0u); -x_26 = l_List_lengthAux___main___rarg(x_24, x_25); -lean_dec(x_24); -x_27 = l_List_lengthAux___main___rarg(x_2, x_25); -x_28 = lean_nat_dec_eq(x_26, x_27); -lean_dec(x_27); -lean_dec(x_26); -if (x_28 == 0) -{ -lean_object* x_29; -lean_dec(x_23); -lean_dec(x_14); -lean_dec(x_13); -lean_dec(x_12); -lean_dec(x_11); -lean_dec(x_10); -lean_dec(x_9); -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_3); -lean_dec(x_2); -x_29 = lean_box(0); -x_16 = x_29; -goto block_21; -} -else -{ -lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; -x_30 = l_Lean_ConstantInfo_name(x_23); -x_31 = l_Lean_WHNF_smartUnfoldingSuffix; -x_32 = lean_name_mk_string(x_30, x_31); -lean_inc(x_3); -x_33 = lean_apply_1(x_3, x_32); -lean_inc(x_14); -lean_inc(x_4); -x_34 = lean_alloc_closure((void*)(l_Lean_WHNF_unfoldDefinitionAux___rarg___lambda__6___boxed), 16, 15); -lean_closure_set(x_34, 0, x_23); -lean_closure_set(x_34, 1, x_4); -lean_closure_set(x_34, 2, x_5); -lean_closure_set(x_34, 3, x_4); -lean_closure_set(x_34, 4, x_2); -lean_closure_set(x_34, 5, x_6); -lean_closure_set(x_34, 6, x_3); -lean_closure_set(x_34, 7, x_7); -lean_closure_set(x_34, 8, x_8); -lean_closure_set(x_34, 9, x_9); -lean_closure_set(x_34, 10, x_10); -lean_closure_set(x_34, 11, x_11); -lean_closure_set(x_34, 12, x_12); -lean_closure_set(x_34, 13, x_13); -lean_closure_set(x_34, 14, x_14); -x_35 = lean_apply_4(x_14, lean_box(0), lean_box(0), x_33, x_34); -return x_35; -} -} -block_21: -{ -lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; -lean_dec(x_16); -x_17 = lean_ctor_get(x_4, 0); -lean_inc(x_17); -lean_dec(x_4); -x_18 = lean_ctor_get(x_17, 1); -lean_inc(x_18); -lean_dec(x_17); -x_19 = lean_box(0); -x_20 = lean_apply_2(x_18, lean_box(0), x_19); -return x_20; -} -} -} -lean_object* l_Lean_WHNF_unfoldDefinitionAux___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { -_start: -{ -lean_object* x_11; -switch (lean_obj_tag(x_10)) { -case 4: -{ -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_dec(x_9); -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_3); -x_17 = lean_ctor_get(x_10, 0); -lean_inc(x_17); -x_18 = lean_ctor_get(x_10, 1); -lean_inc(x_18); -lean_dec(x_10); -x_19 = lean_ctor_get(x_1, 1); -lean_inc(x_19); -x_20 = lean_apply_1(x_2, x_17); -lean_inc(x_1); -x_21 = lean_alloc_closure((void*)(l_Lean_WHNF_unfoldDefinitionAux___rarg___lambda__3___boxed), 4, 3); -lean_closure_set(x_21, 0, x_1); -lean_closure_set(x_21, 1, x_1); -lean_closure_set(x_21, 2, x_18); -x_22 = lean_apply_4(x_19, lean_box(0), lean_box(0), x_20, x_21); -return x_22; -} -case 5: -{ -lean_object* x_23; lean_object* x_24; -x_23 = lean_ctor_get(x_10, 0); -lean_inc(x_23); -x_24 = l_Lean_Expr_getAppFn___main(x_23); -lean_dec(x_23); -if (lean_obj_tag(x_24) == 4) -{ -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; -x_25 = lean_ctor_get(x_24, 0); -lean_inc(x_25); -x_26 = lean_ctor_get(x_24, 1); -lean_inc(x_26); -lean_dec(x_24); -lean_inc(x_1); -x_27 = lean_alloc_closure((void*)(l_Lean_WHNF_unfoldDefinitionAux___rarg___lambda__1___boxed), 2, 1); -lean_closure_set(x_27, 0, x_1); -x_28 = lean_ctor_get(x_1, 1); -lean_inc(x_28); -lean_inc(x_2); -x_29 = lean_apply_1(x_2, x_25); -lean_inc(x_28); -lean_inc(x_1); -x_30 = lean_alloc_closure((void*)(l_Lean_WHNF_unfoldDefinitionAux___rarg___lambda__7___boxed), 15, 14); -lean_closure_set(x_30, 0, x_1); -lean_closure_set(x_30, 1, x_26); -lean_closure_set(x_30, 2, x_2); -lean_closure_set(x_30, 3, x_1); -lean_closure_set(x_30, 4, x_10); -lean_closure_set(x_30, 5, x_27); -lean_closure_set(x_30, 6, x_3); -lean_closure_set(x_30, 7, x_4); -lean_closure_set(x_30, 8, x_5); -lean_closure_set(x_30, 9, x_6); -lean_closure_set(x_30, 10, x_7); -lean_closure_set(x_30, 11, x_8); -lean_closure_set(x_30, 12, x_9); -lean_closure_set(x_30, 13, x_28); -x_31 = lean_apply_4(x_28, lean_box(0), lean_box(0), x_29, x_30); -return x_31; -} -else -{ -lean_object* x_32; -lean_dec(x_24); -lean_dec(x_10); -lean_dec(x_9); -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -x_32 = lean_box(0); -x_11 = x_32; -goto block_16; -} -} -default: -{ -lean_object* x_33; -lean_dec(x_10); -lean_dec(x_9); -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -x_33 = lean_box(0); -x_11 = x_33; -goto block_16; -} -} -block_16: -{ -lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; -lean_dec(x_11); -x_12 = lean_ctor_get(x_1, 0); -lean_inc(x_12); -lean_dec(x_1); -x_13 = lean_ctor_get(x_12, 1); -lean_inc(x_13); -lean_dec(x_12); -x_14 = lean_box(0); -x_15 = lean_apply_2(x_13, lean_box(0), x_14); -return x_15; -} -} -} -lean_object* l_Lean_WHNF_unfoldDefinitionAux(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_WHNF_unfoldDefinitionAux___rarg), 10, 0); -return x_2; -} -} -lean_object* l_Lean_WHNF_unfoldDefinitionAux___rarg___lambda__1___boxed(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = l_Lean_WHNF_unfoldDefinitionAux___rarg___lambda__1(x_1, x_2); -lean_dec(x_2); -return x_3; -} -} -lean_object* l_Lean_WHNF_unfoldDefinitionAux___rarg___lambda__3___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_WHNF_unfoldDefinitionAux___rarg___lambda__3(x_1, x_2, x_3, x_4); -lean_dec(x_1); -return x_5; -} -} -lean_object* l_Lean_WHNF_unfoldDefinitionAux___rarg___lambda__4___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; -x_4 = l_Lean_WHNF_unfoldDefinitionAux___rarg___lambda__4(x_1, x_2, x_3); -lean_dec(x_1); -return x_4; -} -} -lean_object* l_Lean_WHNF_unfoldDefinitionAux___rarg___lambda__6___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14, lean_object* x_15, lean_object* x_16) { -_start: -{ -lean_object* x_17; -x_17 = l_Lean_WHNF_unfoldDefinitionAux___rarg___lambda__6(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12, x_13, x_14, x_15, x_16); -lean_dec(x_2); -return x_17; -} -} -lean_object* l_Lean_WHNF_unfoldDefinitionAux___rarg___lambda__7___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14, lean_object* x_15) { -_start: -{ -lean_object* x_16; -x_16 = l_Lean_WHNF_unfoldDefinitionAux___rarg___lambda__7(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12, x_13, x_14, x_15); -lean_dec(x_1); -return x_16; -} -} -lean_object* l_Lean_WHNF_unfoldDefinitionAux___boxed(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = l_Lean_WHNF_unfoldDefinitionAux(x_1); -lean_dec(x_1); -return x_2; -} -} -lean_object* l_Lean_WHNF_whnfMain___main___rarg___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, lean_object* x_9, lean_object* x_10) { -_start: -{ -if (lean_obj_tag(x_10) == 0) -{ -lean_object* x_11; lean_object* x_12; lean_object* x_13; -lean_dec(x_9); -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_3); -x_11 = lean_ctor_get(x_1, 0); -lean_inc(x_11); -lean_dec(x_1); -x_12 = lean_ctor_get(x_11, 1); -lean_inc(x_12); -lean_dec(x_11); -x_13 = lean_apply_2(x_12, lean_box(0), x_2); -return x_13; -} -else -{ -lean_object* x_14; lean_object* x_15; -lean_dec(x_2); -x_14 = lean_ctor_get(x_10, 0); -lean_inc(x_14); -lean_dec(x_10); -x_15 = l_Lean_WHNF_whnfMain___main___rarg(x_1, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_14); -return x_15; -} -} -} -lean_object* l_Lean_WHNF_whnfMain___main___rarg___lambda__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) { -_start: -{ -lean_object* x_12; lean_object* x_13; lean_object* x_14; -lean_inc(x_11); -lean_inc(x_9); -lean_inc(x_8); -lean_inc(x_7); -lean_inc(x_6); -lean_inc(x_5); -lean_inc(x_3); -lean_inc(x_2); -lean_inc(x_1); -x_12 = l_Lean_WHNF_unfoldDefinitionAux___rarg(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_11); -x_13 = lean_alloc_closure((void*)(l_Lean_WHNF_whnfMain___main___rarg___lambda__1), 10, 9); -lean_closure_set(x_13, 0, x_1); -lean_closure_set(x_13, 1, x_11); -lean_closure_set(x_13, 2, x_2); -lean_closure_set(x_13, 3, x_3); -lean_closure_set(x_13, 4, x_5); -lean_closure_set(x_13, 5, x_6); -lean_closure_set(x_13, 6, x_7); -lean_closure_set(x_13, 7, x_8); -lean_closure_set(x_13, 8, x_9); -x_14 = lean_apply_4(x_10, lean_box(0), lean_box(0), x_12, x_13); -return x_14; -} -} -lean_object* l_Lean_WHNF_whnfMain___main___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { -_start: -{ -lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; -x_10 = lean_ctor_get(x_1, 1); -lean_inc(x_10); -lean_inc(x_8); -lean_inc(x_7); -lean_inc(x_6); -lean_inc(x_5); -lean_inc(x_4); -lean_inc(x_3); -lean_inc(x_2); -lean_inc(x_1); -x_11 = lean_alloc_closure((void*)(l_Lean_WHNF_whnfMain___main___rarg), 9, 8); -lean_closure_set(x_11, 0, x_1); -lean_closure_set(x_11, 1, x_2); -lean_closure_set(x_11, 2, x_3); -lean_closure_set(x_11, 3, x_4); -lean_closure_set(x_11, 4, x_5); -lean_closure_set(x_11, 5, x_6); -lean_closure_set(x_11, 6, x_7); -lean_closure_set(x_11, 7, x_8); -lean_inc(x_8); -lean_inc(x_7); -lean_inc(x_5); -lean_inc(x_4); -lean_inc(x_11); -lean_inc(x_3); -lean_inc(x_2); -lean_inc(x_1); -x_12 = l_Lean_WHNF_whnfCore___main___rarg(x_1, x_2, x_3, x_11, x_4, x_5, x_7, x_8, x_9); -lean_inc(x_10); -x_13 = lean_alloc_closure((void*)(l_Lean_WHNF_whnfMain___main___rarg___lambda__2), 11, 10); -lean_closure_set(x_13, 0, x_1); -lean_closure_set(x_13, 1, x_2); -lean_closure_set(x_13, 2, x_3); -lean_closure_set(x_13, 3, x_11); -lean_closure_set(x_13, 4, x_4); -lean_closure_set(x_13, 5, x_5); -lean_closure_set(x_13, 6, x_6); -lean_closure_set(x_13, 7, x_7); -lean_closure_set(x_13, 8, x_8); -lean_closure_set(x_13, 9, x_10); -x_14 = lean_apply_4(x_10, lean_box(0), lean_box(0), x_12, x_13); -return x_14; -} -} -lean_object* l_Lean_WHNF_whnfMain___main(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_WHNF_whnfMain___main___rarg), 9, 0); -return x_2; -} -} -lean_object* l_Lean_WHNF_whnfMain___main___boxed(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = l_Lean_WHNF_whnfMain___main(x_1); -lean_dec(x_1); -return x_2; -} -} -lean_object* l_Lean_WHNF_whnfMain___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { -_start: -{ -lean_object* x_10; -x_10 = l_Lean_WHNF_whnfMain___main___rarg(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9); -return x_10; -} -} -lean_object* l_Lean_WHNF_whnfMain(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_WHNF_whnfMain___rarg), 9, 0); -return x_2; -} -} -lean_object* l_Lean_WHNF_whnfMain___boxed(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = l_Lean_WHNF_whnfMain(x_1); -lean_dec(x_1); -return x_2; -} -} -lean_object* initialize_Init_Lean_Declaration(lean_object*); -lean_object* initialize_Init_Lean_LocalContext(lean_object*); -static bool _G_initialized = false; -lean_object* initialize_Init_Lean_WHNF(lean_object* w) { -lean_object * res; -if (_G_initialized) return lean_mk_io_result(lean_box(0)); -_G_initialized = true; -res = initialize_Init_Lean_Declaration(lean_io_mk_world()); -if (lean_io_result_is_error(res)) return res; -lean_dec_ref(res); -res = initialize_Init_Lean_LocalContext(lean_io_mk_world()); -if (lean_io_result_is_error(res)) return res; -lean_dec_ref(res); -l_Lean_WHNF_smartUnfoldingSuffix___closed__1 = _init_l_Lean_WHNF_smartUnfoldingSuffix___closed__1(); -lean_mark_persistent(l_Lean_WHNF_smartUnfoldingSuffix___closed__1); -l_Lean_WHNF_smartUnfoldingSuffix = _init_l_Lean_WHNF_smartUnfoldingSuffix(); -lean_mark_persistent(l_Lean_WHNF_smartUnfoldingSuffix); -l___private_Init_Lean_WHNF_3__toCtorIfLit___closed__1 = _init_l___private_Init_Lean_WHNF_3__toCtorIfLit___closed__1(); -lean_mark_persistent(l___private_Init_Lean_WHNF_3__toCtorIfLit___closed__1); -l___private_Init_Lean_WHNF_3__toCtorIfLit___closed__2 = _init_l___private_Init_Lean_WHNF_3__toCtorIfLit___closed__2(); -lean_mark_persistent(l___private_Init_Lean_WHNF_3__toCtorIfLit___closed__2); -l___private_Init_Lean_WHNF_3__toCtorIfLit___closed__3 = _init_l___private_Init_Lean_WHNF_3__toCtorIfLit___closed__3(); -lean_mark_persistent(l___private_Init_Lean_WHNF_3__toCtorIfLit___closed__3); -l___private_Init_Lean_WHNF_3__toCtorIfLit___closed__4 = _init_l___private_Init_Lean_WHNF_3__toCtorIfLit___closed__4(); -lean_mark_persistent(l___private_Init_Lean_WHNF_3__toCtorIfLit___closed__4); -l___private_Init_Lean_WHNF_3__toCtorIfLit___closed__5 = _init_l___private_Init_Lean_WHNF_3__toCtorIfLit___closed__5(); -lean_mark_persistent(l___private_Init_Lean_WHNF_3__toCtorIfLit___closed__5); -l___private_Init_Lean_WHNF_3__toCtorIfLit___closed__6 = _init_l___private_Init_Lean_WHNF_3__toCtorIfLit___closed__6(); -lean_mark_persistent(l___private_Init_Lean_WHNF_3__toCtorIfLit___closed__6); -l___private_Init_Lean_WHNF_5__toCtorWhenK___rarg___lambda__4___closed__1 = _init_l___private_Init_Lean_WHNF_5__toCtorWhenK___rarg___lambda__4___closed__1(); -lean_mark_persistent(l___private_Init_Lean_WHNF_5__toCtorWhenK___rarg___lambda__4___closed__1); -l___private_Init_Lean_WHNF_6__isIdRhsApp___closed__1 = _init_l___private_Init_Lean_WHNF_6__isIdRhsApp___closed__1(); -lean_mark_persistent(l___private_Init_Lean_WHNF_6__isIdRhsApp___closed__1); -l___private_Init_Lean_WHNF_6__isIdRhsApp___closed__2 = _init_l___private_Init_Lean_WHNF_6__isIdRhsApp___closed__2(); -lean_mark_persistent(l___private_Init_Lean_WHNF_6__isIdRhsApp___closed__2); -return lean_mk_io_result(lean_box(0)); -} -#ifdef __cplusplus -} -#endif diff --git a/stage0/stdlib/Init/System/IO.c b/stage0/stdlib/Init/System/IO.c index baea3b6a87..6231f41850 100644 --- a/stage0/stdlib/Init/System/IO.c +++ b/stage0/stdlib/Init/System/IO.c @@ -13,8 +13,7 @@ #ifdef __cplusplus extern "C" { #endif -lean_object* l_IO_HasEval___rarg(lean_object*, lean_object*, lean_object*); -lean_object* l___private_Init_System_IO_1__putStr___at_HasRepr_HasEval___spec__3___boxed(lean_object*, lean_object*); +lean_object* l_Lean_IOUnit_HasEval(lean_object*, lean_object*); lean_object* l___private_Init_System_IO_1__putStr(lean_object*, 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*); @@ -56,13 +55,12 @@ lean_object* l_IO_Ref_swap___rarg(lean_object*, lean_object*, lean_object*, lean lean_object* l_IO_Error_HasToString; lean_object* l_EIO_Inhabited(lean_object*, lean_object*); lean_object* l_IO_Fs_handle_close(lean_object*, 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_Fs_handle_getLine___at_IO_Fs_handle_readToEnd___spec__2___boxed(lean_object*, lean_object*); lean_object* lean_io_getenv(lean_object*, lean_object*); lean_object* l_IO_Fs_readFile(lean_object*); -lean_object* l_IO_println___at_HasRepr_HasEval___spec__1(lean_object*, lean_object*); lean_object* l_IO_Ref_get___rarg(lean_object*, lean_object*, lean_object*); -lean_object* l___private_Init_System_IO_1__putStr___at_HasRepr_HasEval___spec__3(lean_object*, lean_object*); -lean_object* l_IOUnit_HasEval(lean_object*, lean_object*); +lean_object* l_Lean_HasRepr_HasEval(lean_object*); lean_object* l_IO_readTextFile___rarg(lean_object*, lean_object*); lean_object* l_EIO_Inhabited___rarg(lean_object*); lean_object* l_IO_Fs_handle_isEof(lean_object*, lean_object*); @@ -84,8 +82,8 @@ lean_object* l_IO_Prim_liftIO___rarg(lean_object*, lean_object*); lean_object* l_EIO_MonadExcept(lean_object*); lean_object* l_finally___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_IO_Ref_reset___rarg(lean_object*, lean_object*, lean_object*); -lean_object* l_IO_HasEval(lean_object*); lean_object* l_IO_Prim_handle_isEof___boxed(lean_object*, lean_object*); +lean_object* l_IO_println___at_Lean_HasRepr_HasEval___spec__1(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*); @@ -102,13 +100,11 @@ lean_object* l_IO_Prim_liftIO___boxed(lean_object*, lean_object*); lean_object* l_IO_Prim_getLine___boxed(lean_object*); lean_object* l_IO_println___rarg___closed__1; lean_object* l_IO_initializing___boxed(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_Prim_iterate(lean_object*, lean_object*); lean_object* l_IO_Prim_iterate___rarg(lean_object*, lean_object*, lean_object*); -lean_object* l_IO_print___at_HasRepr_HasEval___spec__2(lean_object*, lean_object*); -lean_object* l_HasRepr_HasEval(lean_object*); lean_object* lean_io_prim_handle_get_line(lean_object*, lean_object*); lean_object* l_IO_println___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_IO_print___at_HasRepr_HasEval___spec__2___boxed(lean_object*, lean_object*); lean_object* l_IO_isDir___boxed(lean_object*, lean_object*); lean_object* l_IO_Fs_handle_close___boxed(lean_object*, lean_object*); lean_object* l_IO_fileExists___rarg(lean_object*, lean_object*); @@ -130,17 +126,19 @@ lean_object* l_IO_Fs_handle_mk___boxed(lean_object*, 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*); -lean_object* l_IO_println___at_HasRepr_HasEval___spec__1___boxed(lean_object*, lean_object*); lean_object* l_IO_Fs_handle_isEof___boxed(lean_object*, lean_object*); lean_object* l_IO_Fs_handle_getLine(lean_object*, lean_object*); lean_object* l_IO_Prim_isDir___boxed(lean_object*, lean_object*); lean_object* l_IO_isDir___rarg(lean_object*, lean_object*); lean_object* l_IO_getEnv(lean_object*, lean_object*); lean_object* l_IO_Ref_modify___boxed(lean_object*); +lean_object* l_IO_print___at_Lean_HasRepr_HasEval___spec__2(lean_object*, lean_object*); lean_object* l_IO_lazyPure(lean_object*); lean_object* l_EStateM_Monad(lean_object*, lean_object*); lean_object* l_MonadExcept_orelse___at_EIO_HasOrelse___spec__1___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l_IO_println___at_Lean_HasRepr_HasEval___spec__1___boxed(lean_object*, lean_object*); lean_object* lean_io_prim_handle_is_eof(lean_object*, lean_object*); lean_object* lean_io_prim_handle_mk(lean_object*, uint8_t, uint8_t, lean_object*); lean_object* l_IO_Fs_handle_mk(lean_object*, lean_object*); @@ -153,6 +151,7 @@ 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_Fs_readFile___rarg(lean_object*, lean_object*, lean_object*, uint8_t); lean_object* l_IO_print___boxed(lean_object*, lean_object*); +lean_object* l_IO_print___at_Lean_HasRepr_HasEval___spec__2___boxed(lean_object*, lean_object*); lean_object* l_IO_Ref_swap(lean_object*, 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*); @@ -160,6 +159,7 @@ lean_object* l_IO_appDir___rarg___lambda__1(lean_object*, lean_object*); lean_object* l_IO_Ref_reset___boxed(lean_object*, lean_object*); lean_object* l_IO_Fs_handle_getLine___at_IO_Fs_handle_readToEnd___spec__2(lean_object*, lean_object*); lean_object* l_EStateM_MonadExcept___rarg(lean_object*); +lean_object* l_Lean_HasRepr_HasEval___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_EIO_MonadExcept___closed__2; lean_object* lean_io_prim_read_text_file(lean_object*, lean_object*); lean_object* l_IO_Fs_handle_flush___boxed(lean_object*, lean_object*); @@ -172,6 +172,7 @@ lean_object* l_IO_mkRef(lean_object*, lean_object*); lean_object* l_MonadExcept_orelse___at_EIO_HasOrelse___spec__1(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_Lean_IO_HasEval___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_timeit___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_io_app_dir(lean_object*); lean_object* l_IO_Fs_readFile___boxed(lean_object*); @@ -192,7 +193,6 @@ lean_object* l_IO_Fs_handle_mk___rarg___boxed(lean_object*, lean_object*, lean_o lean_object* l_IO_Fs_handle_flush___rarg(lean_object*, lean_object*); lean_object* l_IO_appDir___rarg(lean_object*, lean_object*); lean_object* l_IO_Prim_iterate___main___rarg(lean_object*, lean_object*, lean_object*); -lean_object* l_HasRepr_HasEval___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_IO_Ref_reset(lean_object*, lean_object*); lean_object* l_IO_Fs_handle_isEof___rarg(lean_object*, lean_object*); lean_object* _init_l_EIO_Monad___closed__1() { @@ -1741,7 +1741,7 @@ lean_dec(x_1); return x_2; } } -lean_object* l___private_Init_System_IO_1__putStr___at_HasRepr_HasEval___spec__3(lean_object* x_1, lean_object* x_2) { +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; @@ -1749,7 +1749,7 @@ x_3 = lean_io_prim_put_str(x_1, x_2); return x_3; } } -lean_object* l_IO_print___at_HasRepr_HasEval___spec__2(lean_object* x_1, lean_object* x_2) { +lean_object* l_IO_print___at_Lean_HasRepr_HasEval___spec__2(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; @@ -1757,7 +1757,7 @@ x_3 = lean_io_prim_put_str(x_1, x_2); return x_3; } } -lean_object* l_IO_println___at_HasRepr_HasEval___spec__1(lean_object* x_1, lean_object* x_2) { +lean_object* l_IO_println___at_Lean_HasRepr_HasEval___spec__1(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; @@ -1796,52 +1796,52 @@ return x_10; } } } -lean_object* l_HasRepr_HasEval___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Lean_HasRepr_HasEval___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; lean_object* x_5; x_4 = lean_apply_1(x_1, x_2); -x_5 = l_IO_println___at_HasRepr_HasEval___spec__1(x_4, x_3); +x_5 = l_IO_println___at_Lean_HasRepr_HasEval___spec__1(x_4, x_3); lean_dec(x_4); return x_5; } } -lean_object* l_HasRepr_HasEval(lean_object* x_1) { +lean_object* l_Lean_HasRepr_HasEval(lean_object* x_1) { _start: { lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_HasRepr_HasEval___rarg), 3, 0); +x_2 = lean_alloc_closure((void*)(l_Lean_HasRepr_HasEval___rarg), 3, 0); return x_2; } } -lean_object* l___private_Init_System_IO_1__putStr___at_HasRepr_HasEval___spec__3___boxed(lean_object* x_1, lean_object* x_2) { +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: { lean_object* x_3; -x_3 = l___private_Init_System_IO_1__putStr___at_HasRepr_HasEval___spec__3(x_1, x_2); +x_3 = l___private_Init_System_IO_1__putStr___at_Lean_HasRepr_HasEval___spec__3(x_1, x_2); lean_dec(x_1); return x_3; } } -lean_object* l_IO_print___at_HasRepr_HasEval___spec__2___boxed(lean_object* x_1, lean_object* x_2) { +lean_object* l_IO_print___at_Lean_HasRepr_HasEval___spec__2___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; -x_3 = l_IO_print___at_HasRepr_HasEval___spec__2(x_1, x_2); +x_3 = l_IO_print___at_Lean_HasRepr_HasEval___spec__2(x_1, x_2); lean_dec(x_1); return x_3; } } -lean_object* l_IO_println___at_HasRepr_HasEval___spec__1___boxed(lean_object* x_1, lean_object* x_2) { +lean_object* l_IO_println___at_Lean_HasRepr_HasEval___spec__1___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; -x_3 = l_IO_println___at_HasRepr_HasEval___spec__1(x_1, x_2); +x_3 = l_IO_println___at_Lean_HasRepr_HasEval___spec__1(x_1, x_2); lean_dec(x_1); return x_3; } } -lean_object* l_IO_HasEval___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Lean_IO_HasEval___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; @@ -1882,15 +1882,15 @@ return x_11; } } } -lean_object* l_IO_HasEval(lean_object* x_1) { +lean_object* l_Lean_IO_HasEval(lean_object* x_1) { _start: { lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_IO_HasEval___rarg), 3, 0); +x_2 = lean_alloc_closure((void*)(l_Lean_IO_HasEval___rarg), 3, 0); return x_2; } } -lean_object* l_IOUnit_HasEval(lean_object* x_1, lean_object* x_2) { +lean_object* l_Lean_IOUnit_HasEval(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3;