chore: update stage0

This commit is contained in:
Leonardo de Moura 2022-01-14 19:21:29 -08:00
parent b22a3a4cc4
commit 9c5668515c
14 changed files with 1228 additions and 842 deletions

View file

@ -138,23 +138,25 @@ def getExternNameFor (env : Environment) (backend : Name) (fn : Name) : Option S
| ExternEntry.foreign _ n => pure n
| _ => failure
def getExternConstArity (declName : Name) : CoreM (Option Nat) := do
private def getExternConstArity (declName : Name) : CoreM Nat := do
let fromSignature : Unit → CoreM Nat := fun _ => do
let cinfo ← getConstInfo declName
let (arity, _) ← (Meta.forallTelescopeReducing cinfo.type fun xs _ => pure xs.size : MetaM Nat).run
return arity
let env ← getEnv
match getExternAttrData env declName with
| none => pure none
| none => fromSignature ()
| some data => match data.arity? with
| some arity => pure arity
| none =>
let cinfo ← getConstInfo declName
let (arity, _) ← (Meta.forallTelescopeReducing cinfo.type fun xs _ => pure xs.size : MetaM Nat).run
pure (some arity)
| some arity => return arity
| none => fromSignature ()
@[export lean_get_extern_const_arity]
def getExternConstArityExport (env : Environment) (declName : Name) : IO (Option Nat) := do
try
let (arity?, _) ← (getExternConstArity declName).toIO {} { env := env }
pure arity?
catch _ =>
pure none
let (arity, _) ← (getExternConstArity declName).toIO {} { env := env }
return some arity
catch
| IO.Error.userError msg => return none
| _ => return none
end Lean

View file

@ -438,6 +438,10 @@ end Decl
@[export lean_ir_mk_extern_decl] def mkExternDecl (f : FunId) (xs : Array Param) (ty : IRType) (e : ExternAttrData) : Decl :=
Decl.extern f xs ty e
-- Hack: we use this declaration as a stub for declarations annotated with `implementedBy` or `init`
@[export lean_ir_mk_dummy_extern_decl] def mkDummyExternDecl (f : FunId) (xs : Array Param) (ty : IRType) : Decl :=
Decl.fdecl f xs ty FnBody.unreachable {}
open Std (RBTree RBTree.empty RBMap)
/-- Set of variable and join point names -/

View file

@ -132,7 +132,7 @@ def mkDefViewOfConstant (modifiers : Modifiers) (stx : Syntax) : CommandElabM De
let val ← match stx[3].getOptional? with
| some val => pure val
| none =>
let val ← `(arbitrary)
let val ← `(arbitrary_or_ofNonempty%)
pure $ mkNode ``Parser.Command.declValSimple #[ mkAtomFrom stx ":=", val ]
return {
ref := stx, kind := DefKind.opaque, modifiers := modifiers,

View file

@ -313,7 +313,6 @@ def elabBinCalc : TermElab := fun stx expectedType? => do
pure ()
ensureHasType expectedType? result
/-
@[builtinTermElab arbitraryOrOfNonempty]
def elabArbitraryOrNonempty : TermElab := fun stx expectedType? => do
tryPostponeIfNoneOrMVar expectedType?
@ -326,7 +325,6 @@ def elabArbitraryOrNonempty : TermElab := fun stx expectedType? => do
mkOfNonempty expectedType
catch _ =>
throw ex
-/
builtin_initialize
registerTraceClass `Elab.binop

View file

@ -185,7 +185,7 @@ environment compile(environment const & env, options const & opts, names cs) {
if (length(cs) == 1) {
name c = get_real_name(head(cs));
if (is_extern_constant(env, c)) {
if (skip_code_generation(env, c)) {
/* Generate boxed version for extern/native constant if needed. */
return ir::add_extern(env, c);
}

View file

@ -14,6 +14,8 @@ Authors: Leonardo de Moura
#include "library/util.h"
#include "library/projection.h"
#include "library/compiler/borrowed_annotation.h"
#include "library/compiler/init_attribute.h"
#include "library/compiler/implemented_by_attribute.h"
#include "library/compiler/util.h"
#include "library/compiler/ir.h"
#include "library/compiler/extern_attribute.h"
@ -29,6 +31,18 @@ bool is_extern_constant(environment const & env, name const & c) {
return static_cast<bool>(get_extern_attr_data(env, c));
}
bool skip_code_generation(environment const & env, name const & c) {
if (is_extern_constant(env, c)) {
return true;
} else if (auto info = env.find(c)) {
// `declarations marked with `init`
return info->is_opaque() && has_init_attribute(env, c);
} else {
// `declarations marked with `implementedBy`
return has_implemented_by_attribute(env, c);
}
}
extern "C" object * lean_get_extern_const_arity(object* env, object*, object* w);
optional<unsigned> get_extern_constant_arity(environment const & env, name const & c) {
@ -68,7 +82,7 @@ bool get_extern_borrowed_info(environment const & env, name const & c, buffer<bo
}
optional<expr> get_extern_constant_ll_type(environment const & env, name const & c) {
if (is_extern_constant(env, c)) {
if (skip_code_generation(env, c)) {
unsigned arity = 0;
expr type = env.get(c).get_type();
type_checker::state st(env);

View file

@ -9,6 +9,7 @@ Authors: Leonardo de Moura
#include "kernel/environment.h"
namespace lean {
bool is_extern_constant(environment const & env, name const & c);
bool skip_code_generation(environment const & env, name const & c);
optional<expr> get_extern_constant_ll_type(environment const & env, name const & c);
optional<unsigned> get_extern_constant_arity(environment const & env, name const & c);
typedef object_ref extern_attr_data_value;

View file

@ -9,4 +9,7 @@ Author: Leonardo de Moura
namespace lean {
optional<name> get_implemented_by_attribute(environment const & env, name const & n);
inline bool has_implemented_by_attribute(environment const & env, name const & n) {
return static_cast<bool>(get_implemented_by_attribute(env, n));
}
}

View file

@ -40,6 +40,7 @@ extern "C" object * lean_ir_mk_jmp(object * j, object * ys);
extern "C" object * lean_ir_mk_alt(object * n, object * cidx, object * size, object * usize, object * ssize, object * b);
extern "C" object * lean_ir_mk_decl(object * f, object * xs, object * ty, object * b);
extern "C" object * lean_ir_mk_extern_decl(object * f, object * xs, object * ty, object * ext_entry);
extern "C" object * lean_ir_mk_dummy_extern_decl(object * f, object * xs, object * ty);
extern "C" object * lean_ir_decl_to_string(object * d);
extern "C" object * lean_ir_compile(object * env, object * opts, object * decls);
extern "C" object * lean_ir_log_to_string(object * log);
@ -92,6 +93,9 @@ decl mk_decl(fun_id const & f, buffer<param> const & xs, type ty, fn_body const
decl mk_extern_decl(fun_id const & f, buffer<param> const & xs, type ty, extern_attr_data_value const & v) {
return decl(lean_ir_mk_extern_decl(f.to_obj_arg(), to_array(xs), box_type(ty), v.to_obj_arg()));
}
decl mk_dummy_extern_decl(fun_id const & f, buffer<param> const & xs, type ty) {
return decl(lean_ir_mk_dummy_extern_decl(f.to_obj_arg(), to_array(xs), box_type(ty)));
}
std::string decl_to_string(decl const & d) {
string_ref r(lean_ir_decl_to_string(d.to_obj_arg()));
return r.to_std_string();
@ -492,8 +496,12 @@ public:
type = binding_body(type);
}
ir::type result_type = to_ir_type(type);
extern_attr_data_value attr = *get_extern_attr_data(env(), fn);
return ir::mk_extern_decl(fn, xs, result_type, attr);
if (optional<extern_attr_data_value> attr = get_extern_attr_data(env(), fn)) {
return ir::mk_extern_decl(fn, xs, result_type, *attr);
} else {
// Hack: `fn` is marked with `implementedBy` or `init`
return ir::mk_dummy_extern_decl(fn, xs, result_type);
}
}
};

File diff suppressed because it is too large Load diff

View file

@ -40,6 +40,7 @@ static lean_object* l_Lean_IR_instToStringJoinPointId___closed__1;
LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_IR_mmodifyJPs___spec__1___rarg___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT uint8_t l_Lean_IR_Index_lt(lean_object*, lean_object*);
LEAN_EXPORT lean_object* lean_ir_mk_vdecl(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* lean_ir_mk_dummy_extern_decl(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_IR_LocalContext_eraseJoinPointDecl(lean_object*, lean_object*);
lean_object* lean_array_uset(lean_object*, size_t, lean_object*);
LEAN_EXPORT lean_object* l_Lean_IR_LitVal_beq___boxed(lean_object*, lean_object*);
@ -3435,6 +3436,21 @@ lean_ctor_set(x_5, 3, x_4);
return x_5;
}
}
LEAN_EXPORT lean_object* lean_ir_mk_dummy_extern_decl(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_box(0);
x_5 = lean_box(13);
x_6 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_6, 0, x_1);
lean_ctor_set(x_6, 1, x_2);
lean_ctor_set(x_6, 2, x_3);
lean_ctor_set(x_6, 3, x_5);
lean_ctor_set(x_6, 4, x_4);
return x_6;
}
}
static lean_object* _init_l_Lean_IR_instInhabitedIndexSet() {
_start:
{

View file

@ -64,7 +64,6 @@ LEAN_EXPORT lean_object* l_Lean_throwError___at_Lean_Elab_Command_mkDefViewOfIns
LEAN_EXPORT lean_object* l_Lean_Elab_Command_MkInstanceName_collect___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_Command_MkInstanceName_mkFreshInstanceName___rarg___boxed(lean_object*, lean_object*);
static lean_object* l___private_Lean_Elab_DefView_0__Lean_Elab_Command_MkInstanceName_kindReplacements___closed__2;
lean_object* lean_string_utf8_byte_size(lean_object*);
static lean_object* l_Lean_Elab_Command_mkDefViewOfInstance___closed__4;
LEAN_EXPORT lean_object* l_Lean_Elab_Command_mkDefViewOfConstant(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_Command_mkDefViewOfDef(lean_object*, lean_object*);
@ -112,7 +111,6 @@ LEAN_EXPORT lean_object* l_Lean_Elab_throwUnsupportedSyntax___at_Lean_Elab_Comma
lean_object* l_Lean_replaceRef(lean_object*, lean_object*);
lean_object* l_String_capitalize(lean_object*);
static lean_object* l_Lean_Elab_Command_mkDefViewOfConstant___closed__4;
static lean_object* l_Lean_Elab_Command_mkDefViewOfInstance___closed__11;
LEAN_EXPORT lean_object* l_Lean_Elab_DefKind_toCtorIdx(uint8_t);
static lean_object* l_Lean_Elab_Command_mkDefViewOfConstant___closed__8;
uint8_t l_Lean_Name_quickCmp(lean_object*, lean_object*);
@ -164,7 +162,6 @@ LEAN_EXPORT lean_object* l_Lean_Elab_throwUnsupportedSyntax___at_Lean_Elab_Comma
LEAN_EXPORT uint8_t l_Lean_Elab_DefKind_isTheorem(uint8_t);
LEAN_EXPORT lean_object* l_Lean_throwErrorAt___at_Lean_Elab_Command_MkInstanceName_main___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_throwUnsupportedSyntax___at_Lean_Elab_Command_mkDefViewOfInstance___spec__4___rarg(lean_object*);
lean_object* l_Lean_addMacroScope(lean_object*, lean_object*, lean_object*);
static lean_object* l___private_Lean_Elab_DefView_0__Lean_Elab_Command_MkInstanceName_kindReplacements___closed__36;
static lean_object* l_Lean_Elab_Command_MkInstanceName_isFirst___closed__1;
static lean_object* l___private_Lean_Elab_DefView_0__Lean_Elab_Command_MkInstanceName_kindReplacements___closed__35;
@ -182,11 +179,10 @@ LEAN_EXPORT lean_object* l_Lean_Elab_Command_MkInstanceName_isFirst(lean_object*
lean_object* l_Lean_Elab_addMacroStack___at_Lean_Elab_Command_instAddErrorMessageContextCommandElabM___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Elab_Command_getCurrMacroScope(lean_object*, lean_object*, lean_object*);
uint8_t l_Std_RBNode_isRed___rarg(lean_object*);
static lean_object* l_Lean_Elab_Command_mkDefViewOfConstant___closed__12;
LEAN_EXPORT lean_object* l_Lean_Elab_DefKind_noConfusion___rarg___lambda__1(lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwErrorAt___at_Lean_Elab_Command_mkDefViewOfInstance___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Syntax_getKind(lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_Command_initFn____x40_Lean_Elab_DefView___hyg_1520_(lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_Command_initFn____x40_Lean_Elab_DefView___hyg_1514_(lean_object*);
static lean_object* l___private_Lean_Elab_DefView_0__Lean_Elab_Command_MkInstanceName_kindReplacements___closed__20;
static lean_object* l___private_Lean_Elab_DefView_0__Lean_Elab_Command_MkInstanceName_kindReplacements___closed__10;
static lean_object* l___private_Lean_Elab_DefView_0__Lean_Elab_Command_MkInstanceName_kindReplacements___closed__32;
@ -196,10 +192,8 @@ LEAN_EXPORT lean_object* l_Lean_Elab_throwUnsupportedSyntax___at_Lean_Elab_Comma
static lean_object* l_Lean_Elab_Command_mkDefViewOfExample___closed__2;
lean_object* l_Lean_Elab_Command_getRef(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Elab_expandDeclSig(lean_object*);
static lean_object* l_Lean_Elab_Command_initFn____x40_Lean_Elab_DefView___hyg_1520____closed__4;
lean_object* lean_st_ref_set(lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Elab_Command_mkDefViewOfInstance___closed__2;
static lean_object* l_Lean_Elab_Command_mkDefViewOfConstant___closed__11;
LEAN_EXPORT lean_object* l_Lean_throwError___at_Lean_Elab_Command_mkDefView___spec__1(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_resolveGlobalName___at_Lean_Elab_Command_MkInstanceName_collect___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
uint8_t l_Lean_Syntax_isNone(lean_object*);
@ -210,6 +204,7 @@ static lean_object* l_Lean_Elab_Command_mkDefViewOfInstance___closed__9;
static lean_object* l___private_Lean_Elab_DefView_0__Lean_Elab_Command_MkInstanceName_kindReplacements___closed__29;
LEAN_EXPORT lean_object* l_Lean_Elab_liftMacroM___at_Lean_Elab_Command_MkInstanceName_main___spec__1___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_Command_mkDefViewOfAbbrev(lean_object*, lean_object*);
static lean_object* l_Lean_Elab_Command_initFn____x40_Lean_Elab_DefView___hyg_1514____closed__4;
lean_object* l_Lean_Elab_expandOptNamedPrio___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_Command_MkInstanceName_mkFreshInstanceName(lean_object*);
static lean_object* l_Lean_Elab_Command_isDefLike___closed__3;
@ -228,11 +223,14 @@ static lean_object* l___private_Lean_Elab_DefView_0__Lean_Elab_Command_MkInstanc
LEAN_EXPORT lean_object* l_Lean_Elab_DefKind_noConfusion(lean_object*);
static lean_object* l_Lean_Elab_Command_mkDefView___closed__1;
static lean_object* l___private_Lean_Elab_DefView_0__Lean_Elab_Command_MkInstanceName_kindReplacements___closed__28;
static lean_object* l_Lean_Elab_Command_initFn____x40_Lean_Elab_DefView___hyg_1514____closed__1;
uint8_t l_List_isEmpty___rarg(lean_object*);
static lean_object* l___private_Lean_Elab_DefView_0__Lean_Elab_Command_MkInstanceName_kindReplacements___closed__18;
static lean_object* l_Lean_Elab_Command_initFn____x40_Lean_Elab_DefView___hyg_1514____closed__3;
lean_object* l_Lean_Elab_Command_getScope___rarg(lean_object*, lean_object*);
static lean_object* l___private_Lean_Elab_DefView_0__Lean_Elab_Command_MkInstanceName_kindReplacements___closed__5;
static lean_object* l___private_Lean_Elab_DefView_0__Lean_Elab_Command_MkInstanceName_kindReplacements___closed__3;
static lean_object* l_Lean_Elab_Command_initFn____x40_Lean_Elab_DefView___hyg_1514____closed__2;
static lean_object* l___private_Lean_Elab_DefView_0__Lean_Elab_Command_MkInstanceName_kindReplacements___closed__15;
LEAN_EXPORT lean_object* l_Lean_Elab_Command_MkInstanceName_mkFreshInstanceName___boxed(lean_object*);
LEAN_EXPORT lean_object* l_Std_RBNode_ins___at___private_Lean_Elab_DefView_0__Lean_Elab_Command_MkInstanceName_kindReplacements___spec__3(lean_object*, lean_object*, lean_object*);
@ -247,19 +245,16 @@ static lean_object* l_Lean_Elab_Command_mkDefViewOfInstance___closed__3;
LEAN_EXPORT lean_object* l_Lean_Elab_Command_mkDefViewOfInstance(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Elab_Command_isDefLike___closed__7;
static lean_object* l_Lean_Elab_Command_mkDefViewOfConstant___closed__7;
static lean_object* l_Lean_Elab_Command_initFn____x40_Lean_Elab_DefView___hyg_1520____closed__2;
LEAN_EXPORT lean_object* l_Lean_Elab_Command_MkInstanceName_main(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT uint8_t l___private_Lean_Elab_DefView_0__Lean_Elab_beqDefKind____x40_Lean_Elab_DefView___hyg_14_(uint8_t, uint8_t);
static lean_object* l___private_Lean_Elab_DefView_0__Lean_Elab_Command_MkInstanceName_kindReplacements___closed__22;
LEAN_EXPORT lean_object* l_Lean_MonadRef_mkInfoFromRefPos___at_Lean_Elab_Command_mkDefViewOfConstant___spec__1(lean_object*, lean_object*, lean_object*);
static lean_object* l___private_Lean_Elab_DefView_0__Lean_Elab_Command_MkInstanceName_kindReplacements___closed__33;
static lean_object* l___private_Lean_Elab_DefView_0__Lean_Elab_Command_MkInstanceName_kindReplacements___closed__14;
static lean_object* l_Lean_Elab_Command_initFn____x40_Lean_Elab_DefView___hyg_1520____closed__3;
lean_object* l_Lean_Elab_mkUnusedBaseName(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Elab_getBetterRef(lean_object*, lean_object*);
uint8_t lean_string_dec_eq(lean_object*, lean_object*);
lean_object* l_Lean_Syntax_mkLit(lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Elab_Command_initFn____x40_Lean_Elab_DefView___hyg_1520____closed__1;
static lean_object* l_Lean_Elab_Command_mkDefViewOfExample___closed__1;
LEAN_EXPORT lean_object* l_Lean_Elab_DefKind_toCtorIdx(uint8_t x_1) {
_start:
@ -5180,80 +5175,68 @@ static lean_object* _init_l_Lean_Elab_Command_mkDefViewOfConstant___closed__1()
_start:
{
lean_object* x_1;
x_1 = lean_mk_string("arbitrary");
x_1 = lean_mk_string("arbitraryOrOfNonempty");
return x_1;
}
}
static lean_object* _init_l_Lean_Elab_Command_mkDefViewOfConstant___closed__2() {
_start:
{
lean_object* x_1; lean_object* x_2;
x_1 = l_Lean_Elab_Command_mkDefViewOfConstant___closed__1;
x_2 = lean_string_utf8_byte_size(x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_Elab_Command_mkDefViewOfConstant___closed__3() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
x_1 = l_Lean_Elab_Command_mkDefViewOfConstant___closed__1;
x_2 = lean_unsigned_to_nat(0u);
x_3 = l_Lean_Elab_Command_mkDefViewOfConstant___closed__2;
x_4 = lean_alloc_ctor(0, 3, 0);
lean_ctor_set(x_4, 0, x_1);
lean_ctor_set(x_4, 1, x_2);
lean_ctor_set(x_4, 2, x_3);
return x_4;
}
}
static lean_object* _init_l_Lean_Elab_Command_mkDefViewOfConstant___closed__4() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = lean_box(0);
x_1 = l___private_Lean_Elab_DefView_0__Lean_Elab_Command_MkInstanceName_kindReplacements___closed__6;
x_2 = l_Lean_Elab_Command_mkDefViewOfConstant___closed__1;
x_3 = lean_name_mk_string(x_1, x_2);
return x_3;
}
}
static lean_object* _init_l_Lean_Elab_Command_mkDefViewOfConstant___closed__3() {
_start:
{
lean_object* x_1;
x_1 = lean_mk_string("arbitrary_or_ofNonempty%");
return x_1;
}
}
static lean_object* _init_l_Lean_Elab_Command_mkDefViewOfConstant___closed__4() {
_start:
{
lean_object* x_1; lean_object* x_2;
x_1 = lean_unsigned_to_nat(1u);
x_2 = lean_mk_empty_array_with_capacity(x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_Elab_Command_mkDefViewOfConstant___closed__5() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = lean_box(0);
x_2 = l_Lean_Elab_Command_mkDefViewOfConstant___closed__4;
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;
}
}
static lean_object* _init_l_Lean_Elab_Command_mkDefViewOfConstant___closed__6() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = lean_box(0);
x_2 = l_Lean_Elab_Command_mkDefViewOfConstant___closed__5;
x_3 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_3, 0, x_2);
lean_ctor_set(x_3, 1, x_1);
return x_3;
}
}
static lean_object* _init_l_Lean_Elab_Command_mkDefViewOfConstant___closed__7() {
_start:
{
lean_object* x_1;
x_1 = lean_mk_string("Command");
return x_1;
}
}
static lean_object* _init_l_Lean_Elab_Command_mkDefViewOfConstant___closed__8() {
static lean_object* _init_l_Lean_Elab_Command_mkDefViewOfConstant___closed__6() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = l___private_Lean_Elab_DefView_0__Lean_Elab_Command_MkInstanceName_kindReplacements___closed__4;
x_2 = l_Lean_Elab_Command_mkDefViewOfConstant___closed__5;
x_3 = lean_name_mk_string(x_1, x_2);
return x_3;
}
}
static lean_object* _init_l_Lean_Elab_Command_mkDefViewOfConstant___closed__7() {
_start:
{
lean_object* x_1;
x_1 = lean_mk_string("declValSimple");
return x_1;
}
}
static lean_object* _init_l_Lean_Elab_Command_mkDefViewOfConstant___closed__8() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = l_Lean_Elab_Command_mkDefViewOfConstant___closed__6;
x_2 = l_Lean_Elab_Command_mkDefViewOfConstant___closed__7;
x_3 = lean_name_mk_string(x_1, x_2);
return x_3;
@ -5263,29 +5246,11 @@ static lean_object* _init_l_Lean_Elab_Command_mkDefViewOfConstant___closed__9()
_start:
{
lean_object* x_1;
x_1 = lean_mk_string("declValSimple");
return x_1;
}
}
static lean_object* _init_l_Lean_Elab_Command_mkDefViewOfConstant___closed__10() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = l_Lean_Elab_Command_mkDefViewOfConstant___closed__8;
x_2 = l_Lean_Elab_Command_mkDefViewOfConstant___closed__9;
x_3 = lean_name_mk_string(x_1, x_2);
return x_3;
}
}
static lean_object* _init_l_Lean_Elab_Command_mkDefViewOfConstant___closed__11() {
_start:
{
lean_object* x_1;
x_1 = lean_mk_string(":=");
return x_1;
}
}
static lean_object* _init_l_Lean_Elab_Command_mkDefViewOfConstant___closed__12() {
static lean_object* _init_l_Lean_Elab_Command_mkDefViewOfConstant___closed__10() {
_start:
{
lean_object* x_1; lean_object* x_2;
@ -5313,7 +5278,7 @@ x_13 = l_Lean_Syntax_getOptional_x3f(x_12);
lean_dec(x_12);
if (lean_obj_tag(x_13) == 0)
{
lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36;
lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35;
x_14 = l_Lean_MonadRef_mkInfoFromRefPos___at_Lean_Elab_Command_mkDefViewOfConstant___spec__1(x_3, x_4, x_5);
x_15 = lean_ctor_get(x_14, 0);
lean_inc(x_15);
@ -5321,53 +5286,51 @@ x_16 = lean_ctor_get(x_14, 1);
lean_inc(x_16);
lean_dec(x_14);
x_17 = l_Lean_Elab_Command_getCurrMacroScope(x_3, x_4, x_16);
x_18 = lean_ctor_get(x_17, 0);
x_18 = lean_ctor_get(x_17, 1);
lean_inc(x_18);
x_19 = lean_ctor_get(x_17, 1);
lean_inc(x_19);
lean_dec(x_17);
x_20 = l_Lean_Elab_Command_getMainModule___rarg(x_4, x_19);
x_21 = lean_ctor_get(x_20, 0);
lean_inc(x_21);
x_22 = lean_ctor_get(x_20, 1);
lean_inc(x_22);
lean_dec(x_20);
x_19 = l_Lean_Elab_Command_getMainModule___rarg(x_4, x_18);
x_20 = lean_ctor_get(x_19, 1);
lean_inc(x_20);
lean_dec(x_19);
x_21 = l_Lean_Elab_Command_mkDefViewOfConstant___closed__3;
x_22 = lean_alloc_ctor(2, 2, 0);
lean_ctor_set(x_22, 0, x_15);
lean_ctor_set(x_22, 1, x_21);
x_23 = l_Lean_Elab_Command_mkDefViewOfConstant___closed__4;
x_24 = l_Lean_addMacroScope(x_21, x_23, x_18);
x_25 = l_Lean_Elab_Command_mkDefViewOfConstant___closed__3;
x_26 = l_Lean_Elab_Command_mkDefViewOfConstant___closed__6;
x_27 = lean_alloc_ctor(3, 4, 0);
lean_ctor_set(x_27, 0, x_15);
lean_ctor_set(x_27, 1, x_25);
x_24 = lean_array_push(x_23, x_22);
x_25 = lean_box(2);
x_26 = l_Lean_Elab_Command_mkDefViewOfConstant___closed__2;
x_27 = lean_alloc_ctor(1, 3, 0);
lean_ctor_set(x_27, 0, x_25);
lean_ctor_set(x_27, 1, x_26);
lean_ctor_set(x_27, 2, x_24);
lean_ctor_set(x_27, 3, x_26);
x_28 = l_Lean_Elab_Command_mkDefViewOfConstant___closed__11;
x_28 = l_Lean_Elab_Command_mkDefViewOfConstant___closed__9;
lean_inc(x_2);
x_29 = l_Lean_mkAtomFrom(x_2, x_28);
x_30 = l_Lean_Elab_Command_mkDefViewOfConstant___closed__12;
x_30 = l_Lean_Elab_Command_mkDefViewOfConstant___closed__10;
x_31 = lean_array_push(x_30, x_29);
x_32 = lean_array_push(x_31, x_27);
x_33 = lean_box(2);
x_34 = l_Lean_Elab_Command_mkDefViewOfConstant___closed__10;
x_35 = lean_alloc_ctor(1, 3, 0);
lean_ctor_set(x_35, 0, x_33);
lean_ctor_set(x_35, 1, x_34);
lean_ctor_set(x_35, 2, x_32);
x_36 = l_Lean_Elab_Command_mkDefViewOfConstant___lambda__1(x_2, x_10, x_1, x_9, x_35, x_3, x_4, x_22);
x_33 = l_Lean_Elab_Command_mkDefViewOfConstant___closed__8;
x_34 = lean_alloc_ctor(1, 3, 0);
lean_ctor_set(x_34, 0, x_25);
lean_ctor_set(x_34, 1, x_33);
lean_ctor_set(x_34, 2, x_32);
x_35 = l_Lean_Elab_Command_mkDefViewOfConstant___lambda__1(x_2, x_10, x_1, x_9, x_34, x_3, x_4, x_20);
lean_dec(x_4);
lean_dec(x_3);
return x_36;
return x_35;
}
else
{
lean_object* x_37; lean_object* x_38;
x_37 = lean_ctor_get(x_13, 0);
lean_inc(x_37);
lean_object* x_36; lean_object* x_37;
x_36 = lean_ctor_get(x_13, 0);
lean_inc(x_36);
lean_dec(x_13);
x_38 = l_Lean_Elab_Command_mkDefViewOfConstant___lambda__1(x_2, x_10, x_1, x_9, x_37, x_3, x_4, x_5);
x_37 = l_Lean_Elab_Command_mkDefViewOfConstant___lambda__1(x_2, x_10, x_1, x_9, x_36, x_3, x_4, x_5);
lean_dec(x_4);
lean_dec(x_3);
return x_38;
return x_37;
}
}
}
@ -6229,15 +6192,6 @@ return x_3;
static lean_object* _init_l_Lean_Elab_Command_mkDefViewOfInstance___closed__7() {
_start:
{
lean_object* x_1; lean_object* x_2;
x_1 = lean_unsigned_to_nat(1u);
x_2 = lean_mk_empty_array_with_capacity(x_1);
return x_2;
}
}
static lean_object* _init_l_Lean_Elab_Command_mkDefViewOfInstance___closed__8() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = lean_box(0);
x_2 = l_Lean_Elab_Command_mkDefViewOfInstance___closed__3;
@ -6245,7 +6199,7 @@ x_3 = lean_name_mk_string(x_1, x_2);
return x_3;
}
}
static lean_object* _init_l_Lean_Elab_Command_mkDefViewOfInstance___closed__9() {
static lean_object* _init_l_Lean_Elab_Command_mkDefViewOfInstance___closed__8() {
_start:
{
lean_object* x_1;
@ -6253,17 +6207,17 @@ x_1 = lean_mk_string("declId");
return x_1;
}
}
static lean_object* _init_l_Lean_Elab_Command_mkDefViewOfInstance___closed__10() {
static lean_object* _init_l_Lean_Elab_Command_mkDefViewOfInstance___closed__9() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = l_Lean_Elab_Command_mkDefViewOfConstant___closed__8;
x_2 = l_Lean_Elab_Command_mkDefViewOfInstance___closed__9;
x_1 = l_Lean_Elab_Command_mkDefViewOfConstant___closed__6;
x_2 = l_Lean_Elab_Command_mkDefViewOfInstance___closed__8;
x_3 = lean_name_mk_string(x_1, x_2);
return x_3;
}
}
static lean_object* _init_l_Lean_Elab_Command_mkDefViewOfInstance___closed__11() {
static lean_object* _init_l_Lean_Elab_Command_mkDefViewOfInstance___closed__10() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
@ -6333,14 +6287,14 @@ x_27 = l_Nat_repr(x_16);
x_28 = l_Lean_numLitKind;
x_29 = lean_box(2);
x_30 = l_Lean_Syntax_mkLit(x_28, x_27, x_29);
x_31 = l_Lean_Elab_Command_mkDefViewOfInstance___closed__7;
x_31 = l_Lean_Elab_Command_mkDefViewOfConstant___closed__4;
x_32 = lean_array_push(x_31, x_30);
x_33 = l_Lean_Elab_Command_mkDefViewOfInstance___closed__6;
x_34 = lean_alloc_ctor(1, 3, 0);
lean_ctor_set(x_34, 0, x_29);
lean_ctor_set(x_34, 1, x_33);
lean_ctor_set(x_34, 2, x_32);
x_35 = l_Lean_Elab_Command_mkDefViewOfConstant___closed__12;
x_35 = l_Lean_Elab_Command_mkDefViewOfConstant___closed__10;
x_36 = lean_array_push(x_35, x_26);
x_37 = lean_array_push(x_36, x_34);
x_38 = l_Lean_Elab_Command_mkDefViewOfInstance___closed__4;
@ -6357,7 +6311,7 @@ lean_inc(x_43);
x_44 = lean_ctor_get(x_42, 1);
lean_inc(x_44);
lean_dec(x_42);
x_45 = l_Lean_Elab_Command_mkDefViewOfInstance___closed__8;
x_45 = l_Lean_Elab_Command_mkDefViewOfInstance___closed__7;
x_46 = lean_alloc_ctor(0, 2, 1);
lean_ctor_set(x_46, 0, x_45);
lean_ctor_set(x_46, 1, x_39);
@ -6387,9 +6341,9 @@ lean_dec(x_52);
lean_inc(x_2);
x_55 = l_Lean_mkIdentFrom(x_2, x_53);
x_56 = lean_array_push(x_35, x_55);
x_57 = l_Lean_Elab_Command_mkDefViewOfInstance___closed__11;
x_57 = l_Lean_Elab_Command_mkDefViewOfInstance___closed__10;
x_58 = lean_array_push(x_56, x_57);
x_59 = l_Lean_Elab_Command_mkDefViewOfInstance___closed__10;
x_59 = l_Lean_Elab_Command_mkDefViewOfInstance___closed__9;
x_60 = lean_alloc_ctor(1, 3, 0);
lean_ctor_set(x_60, 0, x_29);
lean_ctor_set(x_60, 1, x_59);
@ -6578,12 +6532,12 @@ lean_dec(x_5);
x_8 = l_Lean_Elab_Command_mkDefViewOfExample___closed__2;
lean_inc(x_2);
x_9 = l_Lean_mkIdentFrom(x_2, x_8);
x_10 = l_Lean_Elab_Command_mkDefViewOfConstant___closed__12;
x_10 = l_Lean_Elab_Command_mkDefViewOfConstant___closed__10;
x_11 = lean_array_push(x_10, x_9);
x_12 = l_Lean_Elab_Command_mkDefViewOfInstance___closed__11;
x_12 = l_Lean_Elab_Command_mkDefViewOfInstance___closed__10;
x_13 = lean_array_push(x_11, x_12);
x_14 = lean_box(2);
x_15 = l_Lean_Elab_Command_mkDefViewOfInstance___closed__10;
x_15 = l_Lean_Elab_Command_mkDefViewOfInstance___closed__9;
x_16 = lean_alloc_ctor(1, 3, 0);
lean_ctor_set(x_16, 0, x_14);
lean_ctor_set(x_16, 1, x_15);
@ -6618,7 +6572,7 @@ static lean_object* _init_l_Lean_Elab_Command_isDefLike___closed__2() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = l_Lean_Elab_Command_mkDefViewOfConstant___closed__8;
x_1 = l_Lean_Elab_Command_mkDefViewOfConstant___closed__6;
x_2 = l_Lean_Elab_Command_isDefLike___closed__1;
x_3 = lean_name_mk_string(x_1, x_2);
return x_3;
@ -6636,7 +6590,7 @@ static lean_object* _init_l_Lean_Elab_Command_isDefLike___closed__4() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = l_Lean_Elab_Command_mkDefViewOfConstant___closed__8;
x_1 = l_Lean_Elab_Command_mkDefViewOfConstant___closed__6;
x_2 = l_Lean_Elab_Command_isDefLike___closed__3;
x_3 = lean_name_mk_string(x_1, x_2);
return x_3;
@ -6654,7 +6608,7 @@ static lean_object* _init_l_Lean_Elab_Command_isDefLike___closed__6() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = l_Lean_Elab_Command_mkDefViewOfConstant___closed__8;
x_1 = l_Lean_Elab_Command_mkDefViewOfConstant___closed__6;
x_2 = l_Lean_Elab_Command_isDefLike___closed__5;
x_3 = lean_name_mk_string(x_1, x_2);
return x_3;
@ -6672,7 +6626,7 @@ static lean_object* _init_l_Lean_Elab_Command_isDefLike___closed__8() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = l_Lean_Elab_Command_mkDefViewOfConstant___closed__8;
x_1 = l_Lean_Elab_Command_mkDefViewOfConstant___closed__6;
x_2 = l_Lean_Elab_Command_isDefLike___closed__7;
x_3 = lean_name_mk_string(x_1, x_2);
return x_3;
@ -6682,7 +6636,7 @@ static lean_object* _init_l_Lean_Elab_Command_isDefLike___closed__9() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = l_Lean_Elab_Command_mkDefViewOfConstant___closed__8;
x_1 = l_Lean_Elab_Command_mkDefViewOfConstant___closed__6;
x_2 = l_Lean_Elab_Command_mkDefViewOfInstance___closed__3;
x_3 = lean_name_mk_string(x_1, x_2);
return x_3;
@ -6700,7 +6654,7 @@ static lean_object* _init_l_Lean_Elab_Command_isDefLike___closed__11() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = l_Lean_Elab_Command_mkDefViewOfConstant___closed__8;
x_1 = l_Lean_Elab_Command_mkDefViewOfConstant___closed__6;
x_2 = l_Lean_Elab_Command_isDefLike___closed__10;
x_3 = lean_name_mk_string(x_1, x_2);
return x_3;
@ -6983,7 +6937,7 @@ lean_dec(x_3);
return x_5;
}
}
static lean_object* _init_l_Lean_Elab_Command_initFn____x40_Lean_Elab_DefView___hyg_1520____closed__1() {
static lean_object* _init_l_Lean_Elab_Command_initFn____x40_Lean_Elab_DefView___hyg_1514____closed__1() {
_start:
{
lean_object* x_1;
@ -6991,17 +6945,17 @@ x_1 = lean_mk_string("Elab");
return x_1;
}
}
static lean_object* _init_l_Lean_Elab_Command_initFn____x40_Lean_Elab_DefView___hyg_1520____closed__2() {
static lean_object* _init_l_Lean_Elab_Command_initFn____x40_Lean_Elab_DefView___hyg_1514____closed__2() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = lean_box(0);
x_2 = l_Lean_Elab_Command_initFn____x40_Lean_Elab_DefView___hyg_1520____closed__1;
x_2 = l_Lean_Elab_Command_initFn____x40_Lean_Elab_DefView___hyg_1514____closed__1;
x_3 = lean_name_mk_string(x_1, x_2);
return x_3;
}
}
static lean_object* _init_l_Lean_Elab_Command_initFn____x40_Lean_Elab_DefView___hyg_1520____closed__3() {
static lean_object* _init_l_Lean_Elab_Command_initFn____x40_Lean_Elab_DefView___hyg_1514____closed__3() {
_start:
{
lean_object* x_1;
@ -7009,21 +6963,21 @@ x_1 = lean_mk_string("definition");
return x_1;
}
}
static lean_object* _init_l_Lean_Elab_Command_initFn____x40_Lean_Elab_DefView___hyg_1520____closed__4() {
static lean_object* _init_l_Lean_Elab_Command_initFn____x40_Lean_Elab_DefView___hyg_1514____closed__4() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = l_Lean_Elab_Command_initFn____x40_Lean_Elab_DefView___hyg_1520____closed__2;
x_2 = l_Lean_Elab_Command_initFn____x40_Lean_Elab_DefView___hyg_1520____closed__3;
x_1 = l_Lean_Elab_Command_initFn____x40_Lean_Elab_DefView___hyg_1514____closed__2;
x_2 = l_Lean_Elab_Command_initFn____x40_Lean_Elab_DefView___hyg_1514____closed__3;
x_3 = lean_name_mk_string(x_1, x_2);
return x_3;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_Command_initFn____x40_Lean_Elab_DefView___hyg_1520_(lean_object* x_1) {
LEAN_EXPORT lean_object* l_Lean_Elab_Command_initFn____x40_Lean_Elab_DefView___hyg_1514_(lean_object* x_1) {
_start:
{
lean_object* x_2; lean_object* x_3;
x_2 = l_Lean_Elab_Command_initFn____x40_Lean_Elab_DefView___hyg_1520____closed__4;
x_2 = l_Lean_Elab_Command_initFn____x40_Lean_Elab_DefView___hyg_1514____closed__4;
x_3 = l_Lean_registerTraceClass(x_2, x_1);
return x_3;
}
@ -7202,10 +7156,6 @@ l_Lean_Elab_Command_mkDefViewOfConstant___closed__9 = _init_l_Lean_Elab_Command_
lean_mark_persistent(l_Lean_Elab_Command_mkDefViewOfConstant___closed__9);
l_Lean_Elab_Command_mkDefViewOfConstant___closed__10 = _init_l_Lean_Elab_Command_mkDefViewOfConstant___closed__10();
lean_mark_persistent(l_Lean_Elab_Command_mkDefViewOfConstant___closed__10);
l_Lean_Elab_Command_mkDefViewOfConstant___closed__11 = _init_l_Lean_Elab_Command_mkDefViewOfConstant___closed__11();
lean_mark_persistent(l_Lean_Elab_Command_mkDefViewOfConstant___closed__11);
l_Lean_Elab_Command_mkDefViewOfConstant___closed__12 = _init_l_Lean_Elab_Command_mkDefViewOfConstant___closed__12();
lean_mark_persistent(l_Lean_Elab_Command_mkDefViewOfConstant___closed__12);
l_Lean_Elab_Command_mkDefViewOfInstance___closed__1 = _init_l_Lean_Elab_Command_mkDefViewOfInstance___closed__1();
lean_mark_persistent(l_Lean_Elab_Command_mkDefViewOfInstance___closed__1);
l_Lean_Elab_Command_mkDefViewOfInstance___closed__2 = _init_l_Lean_Elab_Command_mkDefViewOfInstance___closed__2();
@ -7226,8 +7176,6 @@ l_Lean_Elab_Command_mkDefViewOfInstance___closed__9 = _init_l_Lean_Elab_Command_
lean_mark_persistent(l_Lean_Elab_Command_mkDefViewOfInstance___closed__9);
l_Lean_Elab_Command_mkDefViewOfInstance___closed__10 = _init_l_Lean_Elab_Command_mkDefViewOfInstance___closed__10();
lean_mark_persistent(l_Lean_Elab_Command_mkDefViewOfInstance___closed__10);
l_Lean_Elab_Command_mkDefViewOfInstance___closed__11 = _init_l_Lean_Elab_Command_mkDefViewOfInstance___closed__11();
lean_mark_persistent(l_Lean_Elab_Command_mkDefViewOfInstance___closed__11);
l_Lean_Elab_Command_mkDefViewOfExample___closed__1 = _init_l_Lean_Elab_Command_mkDefViewOfExample___closed__1();
lean_mark_persistent(l_Lean_Elab_Command_mkDefViewOfExample___closed__1);
l_Lean_Elab_Command_mkDefViewOfExample___closed__2 = _init_l_Lean_Elab_Command_mkDefViewOfExample___closed__2();
@ -7258,15 +7206,15 @@ l_Lean_Elab_Command_mkDefView___closed__1 = _init_l_Lean_Elab_Command_mkDefView_
lean_mark_persistent(l_Lean_Elab_Command_mkDefView___closed__1);
l_Lean_Elab_Command_mkDefView___closed__2 = _init_l_Lean_Elab_Command_mkDefView___closed__2();
lean_mark_persistent(l_Lean_Elab_Command_mkDefView___closed__2);
l_Lean_Elab_Command_initFn____x40_Lean_Elab_DefView___hyg_1520____closed__1 = _init_l_Lean_Elab_Command_initFn____x40_Lean_Elab_DefView___hyg_1520____closed__1();
lean_mark_persistent(l_Lean_Elab_Command_initFn____x40_Lean_Elab_DefView___hyg_1520____closed__1);
l_Lean_Elab_Command_initFn____x40_Lean_Elab_DefView___hyg_1520____closed__2 = _init_l_Lean_Elab_Command_initFn____x40_Lean_Elab_DefView___hyg_1520____closed__2();
lean_mark_persistent(l_Lean_Elab_Command_initFn____x40_Lean_Elab_DefView___hyg_1520____closed__2);
l_Lean_Elab_Command_initFn____x40_Lean_Elab_DefView___hyg_1520____closed__3 = _init_l_Lean_Elab_Command_initFn____x40_Lean_Elab_DefView___hyg_1520____closed__3();
lean_mark_persistent(l_Lean_Elab_Command_initFn____x40_Lean_Elab_DefView___hyg_1520____closed__3);
l_Lean_Elab_Command_initFn____x40_Lean_Elab_DefView___hyg_1520____closed__4 = _init_l_Lean_Elab_Command_initFn____x40_Lean_Elab_DefView___hyg_1520____closed__4();
lean_mark_persistent(l_Lean_Elab_Command_initFn____x40_Lean_Elab_DefView___hyg_1520____closed__4);
res = l_Lean_Elab_Command_initFn____x40_Lean_Elab_DefView___hyg_1520_(lean_io_mk_world());
l_Lean_Elab_Command_initFn____x40_Lean_Elab_DefView___hyg_1514____closed__1 = _init_l_Lean_Elab_Command_initFn____x40_Lean_Elab_DefView___hyg_1514____closed__1();
lean_mark_persistent(l_Lean_Elab_Command_initFn____x40_Lean_Elab_DefView___hyg_1514____closed__1);
l_Lean_Elab_Command_initFn____x40_Lean_Elab_DefView___hyg_1514____closed__2 = _init_l_Lean_Elab_Command_initFn____x40_Lean_Elab_DefView___hyg_1514____closed__2();
lean_mark_persistent(l_Lean_Elab_Command_initFn____x40_Lean_Elab_DefView___hyg_1514____closed__2);
l_Lean_Elab_Command_initFn____x40_Lean_Elab_DefView___hyg_1514____closed__3 = _init_l_Lean_Elab_Command_initFn____x40_Lean_Elab_DefView___hyg_1514____closed__3();
lean_mark_persistent(l_Lean_Elab_Command_initFn____x40_Lean_Elab_DefView___hyg_1514____closed__3);
l_Lean_Elab_Command_initFn____x40_Lean_Elab_DefView___hyg_1514____closed__4 = _init_l_Lean_Elab_Command_initFn____x40_Lean_Elab_DefView___hyg_1514____closed__4();
lean_mark_persistent(l_Lean_Elab_Command_initFn____x40_Lean_Elab_DefView___hyg_1514____closed__4);
res = l_Lean_Elab_Command_initFn____x40_Lean_Elab_DefView___hyg_1514_(lean_io_mk_world());
if (lean_io_result_is_error(res)) return res;
lean_dec_ref(res);
return lean_io_result_mk_ok(lean_box(0));

View file

@ -18,6 +18,7 @@ static lean_object* l___private_Lean_Elab_Extra_0__Lean_Elab_Term_BinOp_toTree_g
LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_Term_BinOp_elabBinCalc___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabBinRelCore___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_Term_BinOp_elabBinCalc___spec__1___closed__1;
static lean_object* l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty___closed__3;
static lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_Term_BinOp_elabBinCalc___spec__1___closed__2;
lean_object* l_Lean_Elab_throwUnsupportedSyntax___at_Lean_Elab_Term_elabForall___spec__1___rarg(lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabBinRelCore_toBoolIfNecessary___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
@ -32,6 +33,7 @@ lean_object* l_Lean_registerTraceClass(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabForIn(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Elab_Term_elabForIn_getMonad___closed__4;
static lean_object* l___regBuiltin_Lean_Elab_Term_BinOp_elabBinOp_declRange___closed__5;
static lean_object* l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty___closed__5;
lean_object* l_Lean_stringToMessageData(lean_object*);
static lean_object* l___private_Lean_Elab_Extra_0__Lean_Elab_Term_BinOp_toTree_go___closed__5;
lean_object* lean_mk_empty_array_with_capacity(lean_object*);
@ -64,6 +66,7 @@ LEAN_EXPORT lean_object* l___regBuiltin_Lean_Elab_Term_BinOp_elabBinOp_declRange
static lean_object* l___regBuiltin_Lean_Elab_Term_elabBinRel___closed__14;
static lean_object* l_Lean_Elab_Term_elabForIn___closed__16;
static lean_object* l___private_Lean_Elab_Extra_0__Lean_Elab_Term_BinOp_applyCoe_go___closed__2;
LEAN_EXPORT lean_object* l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty(lean_object*);
static lean_object* l___private_Lean_Elab_Extra_0__Lean_Elab_Term_BinOp_toTree_go___closed__1;
static lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_Term_BinOp_elabBinCalc___spec__1___closed__9;
static lean_object* l___regBuiltin_Lean_Elab_Term_elabBinRelNoProp_declRange___closed__3;
@ -85,6 +88,7 @@ LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabBinRelCore_toBoolIfNecessary___lam
static lean_object* l___regBuiltin_Lean_Elab_Term_BinOp_elabBinCalc_declRange___closed__2;
lean_object* l_Lean_Expr_appFn_x21(lean_object*);
static lean_object* l_Lean_Elab_Term_elabForIn_getMonad___closed__5;
lean_object* l_Lean_Meta_mkOfNonempty(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l___regBuiltin_Lean_Elab_Term_BinOp_elabBinOpLazy_declRange___closed__5;
static lean_object* l___regBuiltin_Lean_Elab_Term_BinOp_elabBinOp_declRange___closed__2;
lean_object* lean_array_push(lean_object*, lean_object*);
@ -93,6 +97,7 @@ static lean_object* l___regBuiltin_Lean_Elab_Term_elabBinRel___closed__3;
lean_object* l_Lean_Elab_liftMacroM___at___private_Lean_Elab_Term_0__Lean_Elab_Term_elabTermAux___spec__8(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l___regBuiltin_Lean_Elab_Term_elabBinRelNoProp_declRange___closed__1;
static lean_object* l___regBuiltin_Lean_Elab_Term_elabBinRel___closed__12;
static lean_object* l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty_declRange___closed__3;
static lean_object* l___regBuiltin_Lean_Elab_Term_elabForIn___closed__1;
static lean_object* l___regBuiltin_Lean_Elab_Term_elabBinRelNoProp_declRange___closed__2;
LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_Term_BinOp_elabBinCalc___spec__1___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
@ -110,8 +115,11 @@ LEAN_EXPORT lean_object* l___regBuiltin_Lean_Elab_Term_elabBinRel_declRange(lean
lean_object* l_Lean_KeyedDeclsAttribute_addBuiltin___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Elab_Term_getMainModule___rarg(lean_object*, lean_object*);
uint8_t lean_usize_dec_lt(size_t, size_t);
static lean_object* l_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty___rarg___closed__1;
static lean_object* l_Lean_Elab_Term_BinOp_elabBinOp___closed__17;
static lean_object* l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty_declRange___closed__7;
static lean_object* l___private_Lean_Elab_Extra_0__Lean_Elab_Term_BinOp_applyCoe_go___lambda__2___closed__5;
static lean_object* l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty_declRange___closed__5;
static lean_object* l_Lean_Elab_Term_BinOp_elabBinOp___closed__1;
extern lean_object* l_Lean_levelZero;
lean_object* lean_nat_add(lean_object*, lean_object*);
@ -119,6 +127,7 @@ LEAN_EXPORT lean_object* l_Lean_Elab_Term_BinOp_elabBinOp___lambda__2(lean_objec
static lean_object* l_Lean_Elab_Term_elabForIn___closed__19;
lean_object* l_Lean_Elab_Term_ensureHasType(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_Term_BinOp_elabBinCalc___spec__1___closed__5;
static lean_object* l_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty___rarg___closed__2;
static lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_Term_BinOp_elabBinCalc___spec__2___closed__6;
static lean_object* l___regBuiltin_Lean_Elab_Term_BinOp_elabBinOpLazy_declRange___closed__2;
static lean_object* l___regBuiltin_Lean_Elab_Term_elabBinRel___closed__5;
@ -180,6 +189,7 @@ LEAN_EXPORT lean_object* l_Lean_addTrace___at___private_Lean_Elab_Extra_0__Lean_
static lean_object* l_Lean_throwUnknownConstant___at_Lean_Elab_Term_elabBinRelCore___spec__1___closed__3;
lean_object* l_Lean_Elab_Term_mkCoe(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_EXPORT lean_object* l___private_Lean_Elab_Extra_0__Lean_Elab_Term_BinOp_analyze_go___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty___closed__4;
lean_object* l_Lean_replaceRef(lean_object*, lean_object*);
lean_object* lean_array_get(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Meta_withNewMCtxDepth___at___private_Lean_Elab_Extra_0__Lean_Elab_Term_BinOp_analyze_go___spec__1(lean_object*);
@ -190,7 +200,9 @@ LEAN_EXPORT lean_object* l_Lean_Elab_Term_BinOp_elabBinCalc(lean_object*, lean_o
lean_object* l_Lean_Elab_Term_elabAppArgs(lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Elab_Extra_0__Lean_Elab_Term_BinOp_relation_x3f___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_Term_BinOp_elabBinCalc___spec__2___closed__11;
LEAN_EXPORT lean_object* l_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Elab_Term_BinOp_elabBinOp___closed__20;
lean_object* l_Lean_Meta_mkArbitrary(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l___regBuiltin_Lean_Elab_Term_elabBinRelNoProp___closed__1;
static lean_object* l_Lean_Elab_Term_elabBinRelCore___lambda__2___closed__1;
static lean_object* l___private_Lean_Elab_Extra_0__Lean_Elab_Term_BinOp_applyCoe_go___closed__4;
@ -200,6 +212,7 @@ LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabBinRelCore___lambda__2___boxed(lea
static lean_object* l___regBuiltin_Lean_Elab_Term_elabBinRel___closed__10;
static lean_object* l___regBuiltin_Lean_Elab_Term_BinOp_elabBinCalc___closed__2;
lean_object* lean_st_mk_ref(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Syntax_getId(lean_object*);
lean_object* l_Lean_Elab_addMacroStack___at_Lean_Elab_Term_instAddErrorMessageContextTermElabM___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Elab_Term_synthesizeSyntheticMVars_loop(uint8_t, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
@ -213,6 +226,7 @@ lean_object* l_Lean_Elab_Term_getCurrMacroScope(lean_object*, lean_object*, lean
static lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_Term_BinOp_elabBinCalc___spec__2___closed__13;
static lean_object* l___regBuiltin_Lean_Elab_Term_BinOp_elabBinOpLazy_declRange___closed__1;
uint8_t l_Lean_Environment_contains(lean_object*, lean_object*);
static lean_object* l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty_declRange___closed__6;
static lean_object* l___private_Lean_Elab_Extra_0__Lean_Elab_Term_BinOp_analyze_go___closed__6;
static lean_object* l___regBuiltin_Lean_Elab_Term_BinOp_elabBinCalc_declRange___closed__5;
LEAN_EXPORT lean_object* l_Lean_throwError___at___private_Lean_Elab_Extra_0__Lean_Elab_Term_BinOp_toTree_processOp___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
@ -232,7 +246,7 @@ static lean_object* l_Lean_throwUnknownConstant___at_Lean_Elab_Term_elabBinRelCo
static lean_object* l_Lean_Elab_Term_elabBinRelCore_toBoolIfNecessary___closed__5;
extern lean_object* l_Lean_instInhabitedSyntax;
LEAN_EXPORT lean_object* l___private_Lean_Elab_Extra_0__Lean_Elab_Term_BinOp_toExpr(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_Term_BinOp_initFn____x40_Lean_Elab_Extra___hyg_4917_(lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_Term_BinOp_initFn____x40_Lean_Elab_Extra___hyg_4993_(lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabBinRel(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Elab_Term_elabBinRelCore___lambda__2___closed__5;
LEAN_EXPORT uint8_t l___private_Lean_Elab_Extra_0__Lean_Elab_Term_BinOp_isUnknow(lean_object*);
@ -244,6 +258,8 @@ size_t lean_usize_of_nat(lean_object*);
LEAN_EXPORT lean_object* l___regBuiltin_Lean_Elab_Term_BinOp_elabBinCalc(lean_object*);
lean_object* l_Lean_addTrace___at___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_addMacroScope(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty___boxed(lean_object*);
static lean_object* l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty_declRange___closed__4;
static lean_object* l_Lean_Elab_Term_elabForIn___closed__9;
LEAN_EXPORT lean_object* l___private_Lean_Elab_Extra_0__Lean_Elab_Term_BinOp_mkOp(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l___regBuiltin_Lean_Elab_Term_BinOp_elabBinOp___closed__4;
@ -264,6 +280,7 @@ static lean_object* l_Lean_Elab_Term_elabForIn___closed__8;
static lean_object* l___private_Lean_Elab_Extra_0__Lean_Elab_Term_BinOp_analyze_go___closed__5;
static lean_object* l___private_Lean_Elab_Extra_0__Lean_Elab_Term_BinOp_toTree_go___closed__3;
lean_object* l_panic___at___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_reportStuckSyntheticMVars___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty_declRange___closed__2;
LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabBinRelCore___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l___regBuiltin_Lean_Elab_Term_elabForIn___closed__3;
static lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_Term_BinOp_elabBinCalc___spec__2___closed__4;
@ -273,6 +290,7 @@ static lean_object* l_Lean_Elab_Term_BinOp_elabBinOp___closed__16;
static lean_object* l___regBuiltin_Lean_Elab_Term_BinOp_elabBinCalc___closed__3;
lean_object* l_Lean_Meta_trySynthInstance(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Expr_getAppNumArgsAux(lean_object*, lean_object*);
static lean_object* l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty_declRange___closed__1;
lean_object* l___private_Lean_Util_Trace_0__Lean_checkTraceOptionM___at___private_Lean_Elab_Term_0__Lean_Elab_Term_postponeElabTerm___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Elab_Extra_0__Lean_Elab_Term_BinOp_analyze_go(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_Term_BinOp_elabBinCalc___spec__2___closed__9;
@ -310,6 +328,7 @@ lean_object* l___private_Lean_Elab_SyntheticMVars_0__Lean_Elab_Term_withSynthesi
static lean_object* l___regBuiltin_Lean_Elab_Term_BinOp_elabBinCalc___closed__5;
static lean_object* l_Lean_Elab_Term_elabForIn___closed__21;
static lean_object* l_Lean_Elab_Term_elabBinRelCore_toBoolIfNecessary___closed__4;
LEAN_EXPORT lean_object* l_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty(lean_object*);
static lean_object* l___regBuiltin_Lean_Elab_Term_BinOp_elabBinOpLazy___closed__1;
LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabForIn___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Lean_Elab_Extra_0__Lean_Elab_Term_BinOp_analyze___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
@ -323,6 +342,7 @@ lean_object* l_Lean_Meta_getLevel(lean_object*, lean_object*, lean_object*, lean
static lean_object* l_Lean_Elab_Term_elabForIn___closed__3;
static lean_object* l_Lean_Elab_Term_elabBinRelCore_toBoolIfNecessary___closed__2;
LEAN_EXPORT lean_object* l_Lean_throwError___at___private_Lean_Elab_Extra_0__Lean_Elab_Term_BinOp_toTree_processOp___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty___closed__2;
lean_object* l_Lean_Elab_Term_elabType(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* lean_st_ref_set(lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Elab_Term_elabBinRelCore___closed__1;
@ -360,6 +380,7 @@ LEAN_EXPORT lean_object* l___regBuiltin_Lean_Elab_Term_BinOp_elabBinCalc_declRan
lean_object* l_Lean_Syntax_getArg(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabBinRelCore_toBoolIfNecessary___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l___regBuiltin_Lean_Elab_Term_elabBinRel___closed__2;
static lean_object* l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty___closed__1;
static lean_object* l___regBuiltin_Lean_Elab_Term_BinOp_elabBinOp_declRange___closed__1;
static lean_object* l___regBuiltin_Lean_Elab_Term_BinOp_elabBinCalc_declRange___closed__7;
static lean_object* l___regBuiltin_Lean_Elab_Term_BinOp_elabBinOp___closed__2;
@ -374,6 +395,7 @@ static lean_object* l_Lean_Elab_Term_BinOp_elabBinOp___closed__5;
static lean_object* l_Std_Range_forIn_loop___at_Lean_Elab_Term_BinOp_elabBinCalc___spec__2___closed__12;
static lean_object* l_Lean_Elab_Term_BinOp_elabBinOp___closed__3;
static lean_object* l_Lean_Elab_Term_BinOp_elabBinOp___closed__15;
LEAN_EXPORT lean_object* l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty_declRange(lean_object*);
static lean_object* l_Lean_Elab_Term_BinOp_elabBinOp___closed__14;
LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabBinRelCore___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l___regBuiltin_Lean_Elab_Term_elabForIn_declRange___closed__1;
@ -15344,7 +15366,328 @@ x_4 = l_Lean_addBuiltinDeclarationRanges(x_2, x_3, x_1);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_Term_BinOp_initFn____x40_Lean_Elab_Extra___hyg_4917_(lean_object* x_1) {
static lean_object* _init_l_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty___rarg___closed__1() {
_start:
{
lean_object* x_1;
x_1 = lean_mk_string("invalid 'arbitrary_or_ofNonempty%', expected type is not known");
return x_1;
}
}
static lean_object* _init_l_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty___rarg___closed__2() {
_start:
{
lean_object* x_1; lean_object* x_2;
x_1 = l_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty___rarg___closed__1;
x_2 = l_Lean_stringToMessageData(x_1);
return x_2;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty___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_inc(x_5);
lean_inc(x_2);
lean_inc(x_1);
x_9 = l_Lean_Elab_Term_tryPostponeIfNoneOrMVar(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8);
if (lean_obj_tag(x_9) == 0)
{
if (lean_obj_tag(x_1) == 0)
{
lean_object* x_10; lean_object* x_11; lean_object* x_12;
x_10 = lean_ctor_get(x_9, 1);
lean_inc(x_10);
lean_dec(x_9);
x_11 = l_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty___rarg___closed__2;
x_12 = l_Lean_throwError___at_Lean_Elab_Term_synthesizeInst___spec__1(x_11, x_2, x_3, x_4, x_5, x_6, x_7, x_10);
lean_dec(x_7);
lean_dec(x_6);
lean_dec(x_5);
lean_dec(x_4);
return x_12;
}
else
{
lean_object* x_13; lean_object* x_14; lean_object* x_15;
lean_dec(x_2);
x_13 = lean_ctor_get(x_9, 1);
lean_inc(x_13);
lean_dec(x_9);
x_14 = lean_ctor_get(x_1, 0);
lean_inc(x_14);
lean_dec(x_1);
lean_inc(x_7);
lean_inc(x_6);
lean_inc(x_5);
lean_inc(x_4);
lean_inc(x_14);
x_15 = l_Lean_Meta_mkArbitrary(x_14, x_4, x_5, x_6, x_7, x_13);
if (lean_obj_tag(x_15) == 0)
{
lean_dec(x_14);
lean_dec(x_7);
lean_dec(x_6);
lean_dec(x_5);
lean_dec(x_4);
return x_15;
}
else
{
lean_object* x_16; lean_object* x_17; lean_object* x_18;
x_16 = lean_ctor_get(x_15, 0);
lean_inc(x_16);
x_17 = lean_ctor_get(x_15, 1);
lean_inc(x_17);
lean_dec(x_15);
x_18 = l_Lean_Meta_mkOfNonempty(x_14, x_4, x_5, x_6, x_7, x_17);
if (lean_obj_tag(x_18) == 0)
{
lean_dec(x_16);
return x_18;
}
else
{
uint8_t x_19;
x_19 = !lean_is_exclusive(x_18);
if (x_19 == 0)
{
lean_object* x_20;
x_20 = lean_ctor_get(x_18, 0);
lean_dec(x_20);
lean_ctor_set(x_18, 0, x_16);
return x_18;
}
else
{
lean_object* x_21; lean_object* x_22;
x_21 = lean_ctor_get(x_18, 1);
lean_inc(x_21);
lean_dec(x_18);
x_22 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_22, 0, x_16);
lean_ctor_set(x_22, 1, x_21);
return x_22;
}
}
}
}
}
else
{
uint8_t x_23;
lean_dec(x_7);
lean_dec(x_6);
lean_dec(x_5);
lean_dec(x_4);
lean_dec(x_2);
lean_dec(x_1);
x_23 = !lean_is_exclusive(x_9);
if (x_23 == 0)
{
return x_9;
}
else
{
lean_object* x_24; lean_object* x_25; lean_object* x_26;
x_24 = lean_ctor_get(x_9, 0);
x_25 = lean_ctor_get(x_9, 1);
lean_inc(x_25);
lean_inc(x_24);
lean_dec(x_9);
x_26 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_26, 0, x_24);
lean_ctor_set(x_26, 1, x_25);
return x_26;
}
}
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty(lean_object* x_1) {
_start:
{
lean_object* x_2;
x_2 = lean_alloc_closure((void*)(l_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty___rarg___boxed), 8, 0);
return x_2;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty___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_Elab_Term_BinOp_elabArbitraryOrNonempty___rarg(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8);
lean_dec(x_3);
return x_9;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty___boxed(lean_object* x_1) {
_start:
{
lean_object* x_2;
x_2 = l_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty(x_1);
lean_dec(x_1);
return x_2;
}
}
static lean_object* _init_l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty___closed__1() {
_start:
{
lean_object* x_1;
x_1 = lean_mk_string("arbitraryOrOfNonempty");
return x_1;
}
}
static lean_object* _init_l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty___closed__2() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = l___regBuiltin_Lean_Elab_Term_elabBinRel___closed__6;
x_2 = l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty___closed__1;
x_3 = lean_name_mk_string(x_1, x_2);
return x_3;
}
}
static lean_object* _init_l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty___closed__3() {
_start:
{
lean_object* x_1;
x_1 = lean_mk_string("elabArbitraryOrNonempty");
return x_1;
}
}
static lean_object* _init_l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty___closed__4() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = l___regBuiltin_Lean_Elab_Term_BinOp_elabBinOp___closed__2;
x_2 = l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty___closed__3;
x_3 = lean_name_mk_string(x_1, x_2);
return x_3;
}
}
static lean_object* _init_l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty___closed__5() {
_start:
{
lean_object* x_1;
x_1 = lean_alloc_closure((void*)(l_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty___boxed), 1, 0);
return x_1;
}
}
LEAN_EXPORT lean_object* l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty(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 = l_Lean_Elab_Term_termElabAttribute;
x_3 = l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty___closed__2;
x_4 = l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty___closed__4;
x_5 = l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty___closed__5;
x_6 = l_Lean_KeyedDeclsAttribute_addBuiltin___rarg(x_2, x_3, x_4, x_5, x_1);
return x_6;
}
}
static lean_object* _init_l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty_declRange___closed__1() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = lean_unsigned_to_nat(317u);
x_2 = lean_unsigned_to_nat(0u);
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;
}
}
static lean_object* _init_l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty_declRange___closed__2() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = lean_unsigned_to_nat(327u);
x_2 = lean_unsigned_to_nat(14u);
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;
}
}
static lean_object* _init_l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty_declRange___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___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty_declRange___closed__1;
x_2 = lean_unsigned_to_nat(0u);
x_3 = l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty_declRange___closed__2;
x_4 = lean_unsigned_to_nat(14u);
x_5 = lean_alloc_ctor(0, 4, 0);
lean_ctor_set(x_5, 0, x_1);
lean_ctor_set(x_5, 1, x_2);
lean_ctor_set(x_5, 2, x_3);
lean_ctor_set(x_5, 3, x_4);
return x_5;
}
}
static lean_object* _init_l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty_declRange___closed__4() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = lean_unsigned_to_nat(317u);
x_2 = lean_unsigned_to_nat(4u);
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;
}
}
static lean_object* _init_l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty_declRange___closed__5() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = lean_unsigned_to_nat(317u);
x_2 = lean_unsigned_to_nat(27u);
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;
}
}
static lean_object* _init_l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty_declRange___closed__6() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5;
x_1 = l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty_declRange___closed__4;
x_2 = lean_unsigned_to_nat(4u);
x_3 = l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty_declRange___closed__5;
x_4 = lean_unsigned_to_nat(27u);
x_5 = lean_alloc_ctor(0, 4, 0);
lean_ctor_set(x_5, 0, x_1);
lean_ctor_set(x_5, 1, x_2);
lean_ctor_set(x_5, 2, x_3);
lean_ctor_set(x_5, 3, x_4);
return x_5;
}
}
static lean_object* _init_l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty_declRange___closed__7() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty_declRange___closed__3;
x_2 = l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty_declRange___closed__6;
x_3 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_3, 0, x_1);
lean_ctor_set(x_3, 1, x_2);
return x_3;
}
}
LEAN_EXPORT lean_object* l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty_declRange(lean_object* x_1) {
_start:
{
lean_object* x_2; lean_object* x_3; lean_object* x_4;
x_2 = l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty___closed__4;
x_3 = l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty_declRange___closed__7;
x_4 = l_Lean_addBuiltinDeclarationRanges(x_2, x_3, x_1);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_Term_BinOp_initFn____x40_Lean_Elab_Extra___hyg_4993_(lean_object* x_1) {
_start:
{
lean_object* x_2; lean_object* x_3;
@ -15830,7 +16173,41 @@ lean_mark_persistent(l___regBuiltin_Lean_Elab_Term_BinOp_elabBinCalc_declRange__
res = l___regBuiltin_Lean_Elab_Term_BinOp_elabBinCalc_declRange(lean_io_mk_world());
if (lean_io_result_is_error(res)) return res;
lean_dec_ref(res);
res = l_Lean_Elab_Term_BinOp_initFn____x40_Lean_Elab_Extra___hyg_4917_(lean_io_mk_world());
l_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty___rarg___closed__1 = _init_l_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty___rarg___closed__1();
lean_mark_persistent(l_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty___rarg___closed__1);
l_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty___rarg___closed__2 = _init_l_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty___rarg___closed__2();
lean_mark_persistent(l_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty___rarg___closed__2);
l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty___closed__1 = _init_l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty___closed__1();
lean_mark_persistent(l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty___closed__1);
l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty___closed__2 = _init_l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty___closed__2();
lean_mark_persistent(l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty___closed__2);
l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty___closed__3 = _init_l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty___closed__3();
lean_mark_persistent(l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty___closed__3);
l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty___closed__4 = _init_l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty___closed__4();
lean_mark_persistent(l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty___closed__4);
l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty___closed__5 = _init_l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty___closed__5();
lean_mark_persistent(l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty___closed__5);
res = l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty(lean_io_mk_world());
if (lean_io_result_is_error(res)) return res;
lean_dec_ref(res);
l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty_declRange___closed__1 = _init_l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty_declRange___closed__1();
lean_mark_persistent(l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty_declRange___closed__1);
l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty_declRange___closed__2 = _init_l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty_declRange___closed__2();
lean_mark_persistent(l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty_declRange___closed__2);
l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty_declRange___closed__3 = _init_l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty_declRange___closed__3();
lean_mark_persistent(l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty_declRange___closed__3);
l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty_declRange___closed__4 = _init_l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty_declRange___closed__4();
lean_mark_persistent(l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty_declRange___closed__4);
l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty_declRange___closed__5 = _init_l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty_declRange___closed__5();
lean_mark_persistent(l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty_declRange___closed__5);
l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty_declRange___closed__6 = _init_l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty_declRange___closed__6();
lean_mark_persistent(l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty_declRange___closed__6);
l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty_declRange___closed__7 = _init_l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty_declRange___closed__7();
lean_mark_persistent(l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty_declRange___closed__7);
res = l___regBuiltin_Lean_Elab_Term_BinOp_elabArbitraryOrNonempty_declRange(lean_io_mk_world());
if (lean_io_result_is_error(res)) return res;
lean_dec_ref(res);
res = l_Lean_Elab_Term_BinOp_initFn____x40_Lean_Elab_Extra___hyg_4993_(lean_io_mk_world());
if (lean_io_result_is_error(res)) return res;
lean_dec_ref(res);
return lean_io_result_mk_ok(lean_box(0));

View file

@ -37,7 +37,6 @@ lean_object* lean_eval_const(lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_KeyedDeclsAttribute_getValues___rarg(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwError___at_Lean_PrettyPrinter_runForNodeKind___spec__4___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
uint8_t l_Lean_Expr_isConstOf(lean_object*, lean_object*);
lean_object* l_Lean_getConstInfo___at_Lean_getExternConstArity___spec__1(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_ConstantInfo_type(lean_object*);
static lean_object* l_Lean_PrettyPrinter_initFn____x40_Lean_PrettyPrinter_Basic___hyg_5____closed__1;
lean_object* l_Lean_registerInternalExceptionId(lean_object*, lean_object*);
@ -50,6 +49,7 @@ LEAN_EXPORT lean_object* l_Lean_ofExcept___at_Lean_PrettyPrinter_runForNodeKind_
LEAN_EXPORT lean_object* l_Lean_ofExcept___at_Lean_PrettyPrinter_runForNodeKind___spec__3___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwError___at_Lean_PrettyPrinter_runForNodeKind___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwError___at_Lean_PrettyPrinter_runForNodeKind___spec__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_getConstInfo___at___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___spec__1(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_throwError___at_Lean_PrettyPrinter_runForNodeKind___spec__4(lean_object*);
static lean_object* l_Lean_PrettyPrinter_runForNodeKind___rarg___closed__12;
LEAN_EXPORT lean_object* l_Lean_PrettyPrinter_backtrackExceptionId;
@ -365,7 +365,7 @@ if (lean_obj_tag(x_12) == 0)
lean_object* x_13;
lean_free_object(x_7);
lean_inc(x_2);
x_13 = l_Lean_getConstInfo___at_Lean_getExternConstArity___spec__1(x_2, x_4, x_5, x_10);
x_13 = l_Lean_getConstInfo___at___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___spec__1(x_2, x_4, x_5, x_10);
if (lean_obj_tag(x_13) == 0)
{
lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; uint8_t x_18;
@ -566,7 +566,7 @@ if (lean_obj_tag(x_57) == 0)
{
lean_object* x_58;
lean_inc(x_2);
x_58 = l_Lean_getConstInfo___at_Lean_getExternConstArity___spec__1(x_2, x_4, x_5, x_55);
x_58 = l_Lean_getConstInfo___at___private_Lean_Compiler_ExternAttr_0__Lean_getExternConstArity___spec__1(x_2, x_4, x_5, x_55);
if (lean_obj_tag(x_58) == 0)
{
lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; uint8_t x_63;