chore: update stage0
This commit is contained in:
parent
a488ec903e
commit
c19c5e8427
11 changed files with 956 additions and 3985 deletions
|
|
@ -232,12 +232,18 @@ Prim.liftIO Prim.stdout
|
|||
def stderr : m FS.Handle :=
|
||||
Prim.liftIO Prim.stderr
|
||||
|
||||
private def putStr (s : String) : m Unit := do
|
||||
def print {α} [HasToString α] (s : α) : m Unit := do
|
||||
out ← stdout;
|
||||
out.putStr s
|
||||
out.putStr $ toString s
|
||||
|
||||
def println {α} [HasToString α] (s : α) : m Unit := print s *> print "\n"
|
||||
|
||||
def eprint {α} [HasToString α] (s : α) : m Unit := do
|
||||
out ← stderr;
|
||||
out.putStr $ toString s
|
||||
|
||||
def eprintln {α} [HasToString α] (s : α) : m Unit := eprint s *> eprint "\n"
|
||||
|
||||
def print {α} [HasToString α] (s : α) : m Unit := putStr ∘ toString $ s
|
||||
def println {α} [HasToString α] (s : α) : m Unit := print s *> putStr "\n"
|
||||
def getEnv : String → m (Option String) := Prim.liftIO ∘ Prim.getEnv
|
||||
def realPath : String → m String := Prim.liftIO ∘ Prim.realPath
|
||||
def isDir : String → m Bool := Prim.liftIO ∘ Prim.isDir
|
||||
|
|
|
|||
|
|
@ -119,18 +119,27 @@ withDeclId declId $ fun name => do
|
|||
|
||||
/-
|
||||
parser! "inductive " >> declId >> optDeclSig >> many introRule
|
||||
-/
|
||||
def elabInductive (modifiers : Modifiers) (stx : Syntax) : CommandElabM Unit :=
|
||||
let (binders, type?) := expandOptDeclSig (stx.getArg 2);
|
||||
elabInductiveCore stx modifiers (stx.getArg 1) binders type? (stx.getArg 3).getArgs
|
||||
|
||||
/-
|
||||
parser! try ("class " >> "inductive ") >> declId >> optDeclSig >> many introRule
|
||||
|
||||
Remark: numTokens == 1 for regular `inductive` and 2 for `class inductive`.
|
||||
-/
|
||||
private def inductiveSyntaxToView (modifiers : Modifiers) (decl : Syntax) (numTokens := 1) : InductiveView :=
|
||||
let (binders, type?) := expandOptDeclSig (decl.getArg (numTokens + 1));
|
||||
{ ref := decl,
|
||||
modifiers := modifiers,
|
||||
declId := decl.getArg numTokens,
|
||||
binders := binders,
|
||||
type? := type?,
|
||||
introRules := (decl.getArg (numTokens + 2)).getArgs }
|
||||
|
||||
private def classInductiveSyntaxToView (modifiers : Modifiers) (decl : Syntax) : InductiveView :=
|
||||
inductiveSyntaxToView modifiers decl 2
|
||||
|
||||
def elabInductive (modifiers : Modifiers) (stx : Syntax) : CommandElabM Unit :=
|
||||
elabInductiveCore #[inductiveSyntaxToView modifiers stx]
|
||||
|
||||
def elabClassInductive (modifiers : Modifiers) (stx : Syntax) : CommandElabM Unit :=
|
||||
let (binders, type?) := expandOptDeclSig (stx.getArg 3);
|
||||
let modifiers := modifiers.addAttribute { name := `class };
|
||||
elabInductiveCore stx modifiers (stx.getArg 2) binders type? (stx.getArg 4).getArgs
|
||||
elabInductiveCore #[classInductiveSyntaxToView modifiers stx]
|
||||
|
||||
def elabStructure (modifiers : Modifiers) (stx : Syntax) : CommandElabM Unit :=
|
||||
pure () -- TODO
|
||||
|
|
@ -164,6 +173,28 @@ fun stx => do
|
|||
else
|
||||
throwError stx "unexpected declaration"
|
||||
|
||||
/- Return true if all elements of the mutual-block are inductive declarations. -/
|
||||
private def isMutualInductive (stx : Syntax) : Bool :=
|
||||
(stx.getArg 1).getArgs.all $ fun elem =>
|
||||
let decl := elem.getArg 1;
|
||||
let declKind := decl.getKind;
|
||||
declKind == `Lean.Parser.Command.inductive
|
||||
|
||||
private def elabMutualInductive (elems : Array Syntax) : CommandElabM Unit := do
|
||||
views ← elems.mapM $ fun stx => do {
|
||||
modifiers ← elabModifiers (stx.getArg 0);
|
||||
pure $ inductiveSyntaxToView modifiers (stx.getArg 1)
|
||||
};
|
||||
elabInductiveCore views
|
||||
|
||||
@[builtinCommandElab «mutual»]
|
||||
def elabMutual : CommandElab :=
|
||||
fun stx =>
|
||||
if isMutualInductive stx then
|
||||
elabMutualInductive (stx.getArg 1).getArgs
|
||||
else
|
||||
throwError stx "not supported"
|
||||
|
||||
end Command
|
||||
end Elab
|
||||
end Lean
|
||||
|
|
|
|||
|
|
@ -10,17 +10,26 @@ namespace Lean
|
|||
namespace Elab
|
||||
namespace Command
|
||||
|
||||
structure InductiveView :=
|
||||
(ref : Syntax)
|
||||
(modifiers : Modifiers)
|
||||
(declId : Syntax)
|
||||
(binders : Syntax)
|
||||
(type? : Option Syntax)
|
||||
(introRules : Array Syntax)
|
||||
|
||||
instance InductiveView.inhabited : Inhabited InductiveView :=
|
||||
⟨{ ref := arbitrary _, modifiers := {}, declId := arbitrary _, binders := arbitrary _, type? := none, introRules := #[] }⟩
|
||||
|
||||
def mkInductive (ref : Syntax) (declName : Name) (explictLevelNames : List Name) (vars : Array Expr) (xs : Array Expr) (type : Expr) (intros : Array Syntax)
|
||||
: TermElabM Declaration := do
|
||||
Term.throwError ref ref
|
||||
|
||||
def elabInductiveCore
|
||||
(ref : Syntax)
|
||||
(modifiers : Modifiers)
|
||||
(declId : Syntax)
|
||||
(binders : Syntax)
|
||||
(type? : Option Syntax)
|
||||
(introRules : Array Syntax) : CommandElabM Unit := do
|
||||
def elabInductiveCore (views : Array InductiveView) : CommandElabM Unit := do
|
||||
let ref := (views.get! 0).ref;
|
||||
throwError ref ("WIP\n" ++ toString (views.map (fun (v : InductiveView) => v.ref)))
|
||||
-- pure ()
|
||||
/-
|
||||
withDeclId declId $ fun name => do
|
||||
declName ← mkDeclName modifiers name;
|
||||
checkNotAlreadyDeclared ref declName;
|
||||
|
|
@ -32,6 +41,7 @@ withDeclId declId $ fun name => do
|
|||
};
|
||||
|
||||
throwError ref (ref ++ "\n" ++ toString explictLevelNames)
|
||||
-/
|
||||
|
||||
end Command
|
||||
end Elab
|
||||
|
|
|
|||
|
|
@ -6,15 +6,10 @@ Author: Leonardo de Moura
|
|||
*/
|
||||
#include <algorithm>
|
||||
#include <limits>
|
||||
#include <vector>
|
||||
#include "kernel/replace_fn.h"
|
||||
#include "kernel/declaration.h"
|
||||
#include "kernel/instantiate.h"
|
||||
|
||||
#ifndef LEAN_INST_UNIV_CACHE_SIZE
|
||||
#define LEAN_INST_UNIV_CACHE_SIZE 1023
|
||||
#endif
|
||||
|
||||
namespace lean {
|
||||
expr instantiate(expr const & a, unsigned s, unsigned n, expr const * subst) {
|
||||
if (s >= get_loose_bvar_range(a) || n == 0)
|
||||
|
|
@ -233,62 +228,12 @@ expr instantiate_lparams(expr const & e, names const & lps, levels const & ls) {
|
|||
});
|
||||
}
|
||||
|
||||
class instantiate_univ_cache {
|
||||
typedef std::tuple<constant_info, levels, expr> entry;
|
||||
unsigned m_capacity;
|
||||
std::vector<optional<entry>> m_cache;
|
||||
public:
|
||||
instantiate_univ_cache(unsigned capacity):m_capacity(capacity) {
|
||||
if (m_capacity == 0)
|
||||
m_capacity++;
|
||||
}
|
||||
|
||||
optional<expr> is_cached(constant_info const & d, levels const & ls) {
|
||||
if (m_cache.empty())
|
||||
return none_expr();
|
||||
lean_assert(m_cache.size() == m_capacity);
|
||||
unsigned idx = d.get_name().hash() % m_capacity;
|
||||
if (auto it = m_cache[idx]) {
|
||||
constant_info info_c; levels ls_c; expr r_c;
|
||||
std::tie(info_c, ls_c, r_c) = *it;
|
||||
if (!is_eqp(info_c, d))
|
||||
return none_expr();
|
||||
if (ls == ls_c)
|
||||
return some_expr(r_c);
|
||||
else
|
||||
return none_expr();
|
||||
}
|
||||
return none_expr();
|
||||
}
|
||||
|
||||
void save(constant_info const & d, levels const & ls, expr const & r) {
|
||||
if (m_cache.empty())
|
||||
m_cache.resize(m_capacity);
|
||||
lean_assert(m_cache.size() == m_capacity);
|
||||
unsigned idx = d.get_name().hash() % m_cache.size();
|
||||
m_cache[idx] = entry(d, ls, r);
|
||||
}
|
||||
|
||||
void clear() {
|
||||
m_cache.clear();
|
||||
lean_assert(m_cache.empty());
|
||||
}
|
||||
};
|
||||
|
||||
MK_THREAD_LOCAL_GET(instantiate_univ_cache, get_type_univ_cache, LEAN_INST_UNIV_CACHE_SIZE);
|
||||
MK_THREAD_LOCAL_GET(instantiate_univ_cache, get_value_univ_cache, LEAN_INST_UNIV_CACHE_SIZE);
|
||||
|
||||
expr instantiate_type_lparams(constant_info const & info, levels const & ls) {
|
||||
if (info.get_num_lparams() != length(ls))
|
||||
lean_panic("#universes mismatch at instantiateTypeLevelParams");
|
||||
if (is_nil(ls) || !has_param_univ(info.get_type()))
|
||||
return info.get_type();
|
||||
instantiate_univ_cache & cache = get_type_univ_cache();
|
||||
if (auto r = cache.is_cached(info, ls))
|
||||
return *r;
|
||||
expr r = instantiate_lparams(info.get_type(), info.get_lparams(), ls);
|
||||
cache.save(info, ls, r);
|
||||
return r;
|
||||
return instantiate_lparams(info.get_type(), info.get_lparams(), ls);
|
||||
}
|
||||
|
||||
expr instantiate_value_lparams(constant_info const & info, levels const & ls) {
|
||||
|
|
@ -298,12 +243,7 @@ expr instantiate_value_lparams(constant_info const & info, levels const & ls) {
|
|||
lean_panic("definition/theorem expected at instantiateValueLevelParams");
|
||||
if (is_nil(ls) || !has_param_univ(info.get_value()))
|
||||
return info.get_value();
|
||||
instantiate_univ_cache & cache = get_value_univ_cache();
|
||||
if (auto r = cache.is_cached(info, ls))
|
||||
return *r;
|
||||
expr r = instantiate_lparams(info.get_value(), info.get_lparams(), ls);
|
||||
cache.save(info, ls, r);
|
||||
return r;
|
||||
return instantiate_lparams(info.get_value(), info.get_lparams(), ls);
|
||||
}
|
||||
|
||||
extern "C" object * lean_instantiate_type_lparams(b_obj_arg info, b_obj_arg ls) {
|
||||
|
|
@ -313,9 +253,4 @@ extern "C" object * lean_instantiate_type_lparams(b_obj_arg info, b_obj_arg ls)
|
|||
extern "C" object * lean_instantiate_value_lparams(b_obj_arg info, b_obj_arg ls) {
|
||||
return instantiate_value_lparams(TO_REF(constant_info, info), TO_REF(levels, ls)).steal();
|
||||
}
|
||||
|
||||
void clear_instantiate_cache() {
|
||||
get_type_univ_cache().clear();
|
||||
get_value_univ_cache().clear();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,9 +42,4 @@ expr instantiate_type_lparams(constant_info const & info, levels const & ls);
|
|||
/** \brief Instantiate the universe level parameters of the value of the given constant.
|
||||
\pre d.get_num_lparams() == length(ls) */
|
||||
expr instantiate_value_lparams(constant_info const & info, levels const & ls);
|
||||
|
||||
/** \brief Clear thread local caches used by instantiate_value_lparams and instantiate_type_lparams.
|
||||
We clear the caches whenever we enable expression caching (aka max sharing).
|
||||
We do that because the cache may still contain expressions that are not maximally shared. */
|
||||
void clear_instantiate_cache();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ Author: Leonardo de Moura
|
|||
#include "library/util.h"
|
||||
#include "library/trace.h"
|
||||
#include "library/constants.h"
|
||||
#include "library/cache_helper.h"
|
||||
#include "library/app_builder.h"
|
||||
|
||||
namespace lean {
|
||||
|
|
@ -41,86 +40,6 @@ static unsigned get_nargs(unsigned mask_sz, bool const * mask) {
|
|||
return nargs;
|
||||
}
|
||||
|
||||
class app_builder_cache {
|
||||
struct entry {
|
||||
unsigned m_num_umeta;
|
||||
unsigned m_num_emeta;
|
||||
expr m_app;
|
||||
list<optional<expr>> m_inst_args; // "mask" of implicit instance arguments
|
||||
list<expr> m_expl_args; // metavars for explicit arguments
|
||||
/*
|
||||
IMPORTANT: for m_inst_args we store the arguments in reverse order.
|
||||
For example, the first element in the list indicates whether the last argument
|
||||
is an instance implicit argument or not. If it is not none, then the element
|
||||
is the associated metavariable
|
||||
|
||||
m_expl_args are also stored in reverse order
|
||||
*/
|
||||
};
|
||||
|
||||
struct key {
|
||||
name m_name;
|
||||
unsigned m_num_expl;
|
||||
unsigned m_hash;
|
||||
// If nil, then the mask is composed of the last m_num_expl arguments.
|
||||
// If nonnil, then the mask is NOT of the form [false*, true*]
|
||||
list<bool> m_mask;
|
||||
|
||||
key(name const & c, unsigned n):
|
||||
m_name(c), m_num_expl(n),
|
||||
m_hash(::lean::hash(c.hash(), n)) {
|
||||
}
|
||||
|
||||
key(name const & c, list<bool> const & m):
|
||||
m_name(c), m_num_expl(length(m)) {
|
||||
m_hash = ::lean::hash(c.hash(), m_num_expl);
|
||||
m_mask = m;
|
||||
for (bool b : m) {
|
||||
if (b)
|
||||
m_hash = ::lean::hash(m_hash, 17u);
|
||||
else
|
||||
m_hash = ::lean::hash(m_hash, 31u);
|
||||
}
|
||||
}
|
||||
|
||||
bool check_invariant() const {
|
||||
lean_assert(empty(m_mask) || length(m_mask) == m_num_expl);
|
||||
return true;
|
||||
}
|
||||
|
||||
unsigned hash() const { return m_hash; }
|
||||
friend bool operator==(key const & k1, key const & k2) {
|
||||
return k1.m_name == k2.m_name && k1.m_num_expl == k2.m_num_expl && k1.m_mask == k2.m_mask;
|
||||
}
|
||||
};
|
||||
|
||||
struct key_hash_fn {
|
||||
unsigned operator()(key const & k) const { return k.hash(); }
|
||||
};
|
||||
|
||||
typedef std::unordered_map<key, entry, key_hash_fn> map;
|
||||
|
||||
environment m_env;
|
||||
map m_map;
|
||||
friend class app_builder;
|
||||
public:
|
||||
app_builder_cache(environment const & env):
|
||||
m_env(env) {
|
||||
}
|
||||
|
||||
environment const & env() const { return m_env; }
|
||||
};
|
||||
|
||||
typedef cache_compatibility_helper<app_builder_cache> app_builder_cache_helper;
|
||||
|
||||
/* CACHE_RESET: YES */
|
||||
MK_THREAD_LOCAL_GET_DEF(app_builder_cache_helper, get_abch);
|
||||
|
||||
/** Return an app_builder_cache for the transparency_mode in ctx, and compatible with the environment. */
|
||||
app_builder_cache & get_app_builder_cache_for(type_context_old const & ctx) {
|
||||
return get_abch().get_cache_for(ctx);
|
||||
}
|
||||
|
||||
static level get_level_ap(type_context_old & ctx, expr const & A) {
|
||||
try {
|
||||
return get_level(ctx, A);
|
||||
|
|
@ -146,9 +65,22 @@ static level get_level_ap(type_context_old & ctx, expr const & A) {
|
|||
*/
|
||||
class app_builder {
|
||||
type_context_old & m_ctx;
|
||||
app_builder_cache & m_cache;
|
||||
typedef app_builder_cache::key key;
|
||||
typedef app_builder_cache::entry entry;
|
||||
|
||||
struct entry {
|
||||
unsigned m_num_umeta;
|
||||
unsigned m_num_emeta;
|
||||
expr m_app;
|
||||
list<optional<expr>> m_inst_args; // "mask" of implicit instance arguments
|
||||
list<expr> m_expl_args; // metavars for explicit arguments
|
||||
/*
|
||||
IMPORTANT: for m_inst_args we store the arguments in reverse order.
|
||||
For example, the first element in the list indicates whether the last argument
|
||||
is an instance implicit argument or not. If it is not none, then the element
|
||||
is the associated metavariable
|
||||
|
||||
m_expl_args are also stored in reverse order
|
||||
*/
|
||||
};
|
||||
|
||||
environment const & env() const { return m_ctx.env(); }
|
||||
|
||||
|
|
@ -173,8 +105,6 @@ class app_builder {
|
|||
}
|
||||
|
||||
optional<entry> get_entry(name const & c, unsigned nargs) {
|
||||
key k(c, nargs);
|
||||
lean_assert(k.check_invariant());
|
||||
if (optional<constant_info> info = env().find(c)) {
|
||||
buffer<expr> mvars;
|
||||
buffer<optional<expr>> inst_args;
|
||||
|
|
@ -219,8 +149,6 @@ class app_builder {
|
|||
}
|
||||
|
||||
optional<entry> get_entry(name const & c, unsigned mask_sz, bool const * mask) {
|
||||
key k(c, to_list(mask, mask+mask_sz));
|
||||
lean_assert(k.check_invariant());
|
||||
if (auto d = env().find(c)) {
|
||||
buffer<expr> mvars;
|
||||
buffer<optional<expr>> inst_args;
|
||||
|
|
@ -289,7 +217,7 @@ class app_builder {
|
|||
}
|
||||
|
||||
public:
|
||||
app_builder(type_context_old & ctx):m_ctx(ctx), m_cache(get_app_builder_cache_for(ctx)) {}
|
||||
app_builder(type_context_old & ctx):m_ctx(ctx) {}
|
||||
|
||||
level get_level(expr const & A) {
|
||||
return get_level_ap(m_ctx, A);
|
||||
|
|
@ -1044,7 +972,6 @@ expr mk_iff_mp(type_context_old & ctx, expr const & h1, expr const & h2) {
|
|||
|
||||
void initialize_app_builder() {
|
||||
register_trace_class("app_builder");
|
||||
register_thread_local_reset_fn([]() { get_abch().clear(); });
|
||||
}
|
||||
void finalize_app_builder() {}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ extern "C" {
|
|||
lean_object* l_IO_FS_linesAux___main___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_IO_FS_linesAux___main___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_IO_FS_Handle_putStrLn___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Init_System_IO_1__putStr(lean_object*);
|
||||
lean_object* l_allocprof___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_IO_mkRef___boxed(lean_object*, lean_object*);
|
||||
extern uint8_t l_System_Platform_isWindows;
|
||||
|
|
@ -46,9 +45,7 @@ lean_object* l_IO_Prim_stdin___boxed(lean_object*);
|
|||
lean_object* l_IO_FS_Handle_putStr___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* lean_io_prim_handle_put_str(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_IO_stdout___rarg(lean_object*);
|
||||
lean_object* l___private_Init_System_IO_1__putStr___at_Lean_HasRepr_hasEval___spec__3___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_IO_getEnv___rarg(lean_object*, lean_object*);
|
||||
lean_object* l___private_Init_System_IO_1__putStr___rarg___lambda__1(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_IO_FS_Handle_getLine___rarg(lean_object*, lean_object*);
|
||||
lean_object* l_IO_FS_Handle_mk___boxed(lean_object*, lean_object*);
|
||||
extern lean_object* l_Array_empty___closed__1;
|
||||
|
|
@ -85,16 +82,18 @@ lean_object* l_EIO_Inhabited(lean_object*, lean_object*);
|
|||
lean_object* l_IO_FS_Handle_putStr___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_EIO_adaptExcept___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_IO_Prim_fopenFlags___closed__11;
|
||||
lean_object* l_IO_print___at_IO_println___spec__1___rarg___lambda__1(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_IO_FS_lines___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* lean_io_getenv(lean_object*, lean_object*);
|
||||
uint32_t l_IO_AccessRight_flags___closed__13;
|
||||
lean_object* l_IO_setAccessRights(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_IO_Ref_get___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_IO_FS_Handle_putStr___at_Lean_HasRepr_hasEval___spec__5___boxed(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_IO_eprintln(lean_object*);
|
||||
lean_object* l_IO_Prim_Handle_isEof___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_hasMonadLiftTTrans___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_HasRepr_hasEval___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_IO_FS_Handle_getLine___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_IO_eprint___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* lean_with_isolated_streams(lean_object*, lean_object*);
|
||||
lean_object* l_IO_FS_Handle_readToEndAux(lean_object*);
|
||||
uint32_t l_IO_AccessRight_flags___closed__8;
|
||||
|
|
@ -117,6 +116,7 @@ uint8_t lean_nat_dec_eq(lean_object*, lean_object*);
|
|||
uint32_t l_IO_AccessRight_flags___closed__2;
|
||||
lean_object* l_IO_Ref_set___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_IO_MonadIO;
|
||||
lean_object* l_IO_stdout___at_Lean_HasRepr_hasEval___spec__3(lean_object*);
|
||||
lean_object* l_IO_FS_Handle_read___rarg___boxed(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_StateT_MonadExcept___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_IO_Prim_liftIO___rarg(lean_object*, lean_object*);
|
||||
|
|
@ -128,6 +128,7 @@ lean_object* lean_io_current_dir(lean_object*);
|
|||
lean_object* l_EIO_MonadExcept(lean_object*);
|
||||
lean_object* l_IO_Prim_fopenFlags___closed__10;
|
||||
lean_object* l_IO_Ref_reset___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_IO_print___at_IO_println___spec__1(lean_object*);
|
||||
lean_object* l_IO_FS_Handle_write___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_IO_realPath___boxed(lean_object*, lean_object*);
|
||||
lean_object* lean_io_realpath(lean_object*, lean_object*);
|
||||
|
|
@ -137,6 +138,7 @@ lean_object* l_IO_Prim_Ref_reset___boxed(lean_object*, lean_object*, lean_object
|
|||
lean_object* l_IO_FS_Handle_readToEndAux___main___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_IO_Prim_fopenFlags(uint8_t, uint8_t);
|
||||
lean_object* l_ReaderT_monadIO___rarg(lean_object*, lean_object*);
|
||||
lean_object* l_IO_eprintln___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_IO_FS_linesAux___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_IO_Inhabited(lean_object*);
|
||||
lean_object* l_IO_stderr___boxed(lean_object*, lean_object*);
|
||||
|
|
@ -147,10 +149,10 @@ lean_object* lean_io_allocprof(lean_object*, lean_object*, lean_object*);
|
|||
lean_object* l_EIO_HasOrelse(lean_object*, lean_object*);
|
||||
lean_object* l_ReaderT_monadIO(lean_object*, lean_object*);
|
||||
lean_object* l_IO_FS_Handle_getLine(lean_object*, lean_object*);
|
||||
lean_object* l_IO_eprint(lean_object*);
|
||||
lean_object* l_IO_FS_Handle_readToEndAux___main___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_IO_appPath___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_StateT_lift___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_IO_stdout___at_Lean_HasRepr_hasEval___spec__4(lean_object*);
|
||||
lean_object* l_IO_initializing___boxed(lean_object*);
|
||||
lean_object* l_IO_println___at_Lean_HasRepr_hasEval___spec__1___boxed(lean_object*, lean_object*);
|
||||
lean_object* lean_get_stderr(lean_object*);
|
||||
|
|
@ -182,10 +184,11 @@ lean_object* l_String_dropRight(lean_object*, lean_object*);
|
|||
lean_object* l_EIO_catchExceptions(lean_object*, lean_object*);
|
||||
lean_object* l_IO_setAccessRights___boxed(lean_object*, lean_object*, lean_object*);
|
||||
size_t lean_usize_of_nat(lean_object*);
|
||||
lean_object* l_IO_print___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_IO_MonadIO___closed__2;
|
||||
lean_object* l_IO_ofExcept___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_IO_Prim_fileExists___boxed(lean_object*, lean_object*);
|
||||
lean_object* l___private_Init_System_IO_1__putStr___at_Lean_HasRepr_hasEval___spec__3(lean_object*, lean_object*);
|
||||
lean_object* l_IO_print___at_IO_println___spec__1___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_IO_FS_readFile___rarg___lambda__1(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_IO_realPath(lean_object*, lean_object*);
|
||||
lean_object* lean_io_prim_handle_write(lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -206,6 +209,7 @@ lean_object* l_IO_isDir___rarg(lean_object*, lean_object*);
|
|||
lean_object* l_IO_getEnv(lean_object*, lean_object*);
|
||||
lean_object* l_IO_FS_Handle_readToEndAux___main___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_IO_MonadIO___closed__3;
|
||||
lean_object* l_IO_eprint___at_IO_eprintln___spec__1___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_IO_lazyPure(lean_object*);
|
||||
lean_object* l_EStateM_Monad(lean_object*, lean_object*);
|
||||
lean_object* l_IO_FS_Handle_mk___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -214,8 +218,8 @@ lean_object* lean_io_ref_ptr_eq(lean_object*, lean_object*, lean_object*);
|
|||
lean_object* l_IO_Prim_currentDir___boxed(lean_object*);
|
||||
lean_object* l_IO_FS_Handle_write___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_IO_Prim_fopenFlags___closed__5;
|
||||
lean_object* l_IO_FS_Handle_putStr___at_Lean_HasRepr_hasEval___spec__4___boxed(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_IO_Prim_fopenFlags___closed__14;
|
||||
lean_object* l_IO_FS_Handle_putStr___at_Lean_HasRepr_hasEval___spec__5(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_IO_FS_Handle_readToEndAux___main(lean_object*);
|
||||
lean_object* l_IO_FS_readFile___rarg(lean_object*, lean_object*, lean_object*);
|
||||
uint32_t l_IO_AccessRight_flags(lean_object*);
|
||||
|
|
@ -231,6 +235,7 @@ lean_object* l_IO_FS_lines___rarg___lambda__1(lean_object*, lean_object*, lean_o
|
|||
lean_object* lean_get_stdout(lean_object*);
|
||||
lean_object* l_IO_Prim_Ref_swap___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* lean_io_ref_set(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_IO_eprint___at_IO_eprintln___spec__1(lean_object*);
|
||||
lean_object* l_IO_appDir___rarg___lambda__1(lean_object*, lean_object*);
|
||||
lean_object* l_IO_FS_Handle_read___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_IO_Ref_reset___boxed(lean_object*, lean_object*);
|
||||
|
|
@ -277,7 +282,6 @@ lean_object* l_IO_print___rarg(lean_object*, lean_object*, lean_object*, lean_ob
|
|||
lean_object* l_ReaderT_lift___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_IO_Prim_fopenFlags___closed__2;
|
||||
lean_object* l_IO_RefPointed(lean_object*);
|
||||
lean_object* l___private_Init_System_IO_1__putStr___rarg(lean_object*, lean_object*, lean_object*);
|
||||
uint32_t l_IO_AccessRight_flags___closed__5;
|
||||
lean_object* lean_io_prim_handle_mk(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_IO_appDir___rarg(lean_object*, lean_object*);
|
||||
|
|
@ -286,6 +290,7 @@ lean_object* l_IO_Prim_iterate___main___rarg(lean_object*, lean_object*, lean_ob
|
|||
uint32_t l_IO_AccessRight_flags___closed__7;
|
||||
uint32_t l_IO_FileRight_flags(lean_object*);
|
||||
lean_object* l_EIO_catchExceptions___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_IO_FS_Handle_putStr___at_Lean_HasRepr_hasEval___spec__4(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_IO_Prim_Handle_read___boxed(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_IO_stdout___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_IO_Prim_fopenFlags___closed__13;
|
||||
|
|
@ -1938,7 +1943,41 @@ lean_dec(x_2);
|
|||
return x_3;
|
||||
}
|
||||
}
|
||||
lean_object* l___private_Init_System_IO_1__putStr___rarg___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
|
||||
lean_object* l_IO_print___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;
|
||||
x_5 = lean_apply_1(x_1, x_2);
|
||||
x_6 = l_IO_FS_Handle_putStr___rarg(x_3, x_4, x_5);
|
||||
return x_6;
|
||||
}
|
||||
}
|
||||
lean_object* l_IO_print___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_6; lean_object* x_7; 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_2);
|
||||
x_7 = l_IO_stdout___rarg(x_2);
|
||||
x_8 = lean_alloc_closure((void*)(l_IO_print___rarg___lambda__1), 4, 3);
|
||||
lean_closure_set(x_8, 0, x_4);
|
||||
lean_closure_set(x_8, 1, x_5);
|
||||
lean_closure_set(x_8, 2, x_2);
|
||||
x_9 = lean_apply_4(x_6, lean_box(0), lean_box(0), x_7, x_8);
|
||||
return x_9;
|
||||
}
|
||||
}
|
||||
lean_object* l_IO_print(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_2;
|
||||
x_2 = lean_alloc_closure((void*)(l_IO_print___rarg), 5, 0);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
lean_object* l_IO_print___at_IO_println___spec__1___rarg___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_4;
|
||||
|
|
@ -1946,7 +1985,7 @@ x_4 = l_IO_FS_Handle_putStr___rarg(x_1, x_3, x_2);
|
|||
return x_4;
|
||||
}
|
||||
}
|
||||
lean_object* l___private_Init_System_IO_1__putStr___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
|
||||
lean_object* l_IO_print___at_IO_println___spec__1___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;
|
||||
|
|
@ -1955,35 +1994,18 @@ lean_inc(x_4);
|
|||
lean_dec(x_1);
|
||||
lean_inc(x_2);
|
||||
x_5 = l_IO_stdout___rarg(x_2);
|
||||
x_6 = lean_alloc_closure((void*)(l___private_Init_System_IO_1__putStr___rarg___lambda__1), 3, 2);
|
||||
x_6 = lean_alloc_closure((void*)(l_IO_print___at_IO_println___spec__1___rarg___lambda__1), 3, 2);
|
||||
lean_closure_set(x_6, 0, x_2);
|
||||
lean_closure_set(x_6, 1, x_3);
|
||||
x_7 = lean_apply_4(x_4, lean_box(0), lean_box(0), x_5, x_6);
|
||||
return x_7;
|
||||
}
|
||||
}
|
||||
lean_object* l___private_Init_System_IO_1__putStr(lean_object* x_1) {
|
||||
lean_object* l_IO_print___at_IO_println___spec__1(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_2;
|
||||
x_2 = lean_alloc_closure((void*)(l___private_Init_System_IO_1__putStr___rarg), 3, 0);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
lean_object* l_IO_print___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_6; lean_object* x_7;
|
||||
x_6 = lean_apply_1(x_4, x_5);
|
||||
x_7 = l___private_Init_System_IO_1__putStr___rarg(x_1, x_2, x_6);
|
||||
return x_7;
|
||||
}
|
||||
}
|
||||
lean_object* l_IO_print(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_2;
|
||||
x_2 = lean_alloc_closure((void*)(l_IO_print___rarg), 5, 0);
|
||||
x_2 = lean_alloc_closure((void*)(l_IO_print___at_IO_println___spec__1___rarg), 3, 0);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
|
|
@ -2000,7 +2022,7 @@ lean_inc(x_2);
|
|||
lean_inc(x_1);
|
||||
x_8 = l_IO_print___rarg(x_1, x_2, lean_box(0), x_4, x_5);
|
||||
x_9 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_10 = l___private_Init_System_IO_1__putStr___rarg(x_1, x_2, x_9);
|
||||
x_10 = l_IO_print___at_IO_println___spec__1___rarg(x_1, x_2, x_9);
|
||||
x_11 = lean_apply_3(x_7, lean_box(0), x_8, x_10);
|
||||
return x_11;
|
||||
}
|
||||
|
|
@ -2013,6 +2035,81 @@ x_2 = lean_alloc_closure((void*)(l_IO_println___rarg), 5, 0);
|
|||
return x_2;
|
||||
}
|
||||
}
|
||||
lean_object* l_IO_eprint___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_1, 1);
|
||||
lean_inc(x_6);
|
||||
lean_dec(x_1);
|
||||
lean_inc(x_2);
|
||||
x_7 = l_IO_stderr___rarg(x_2);
|
||||
x_8 = lean_alloc_closure((void*)(l_IO_print___rarg___lambda__1), 4, 3);
|
||||
lean_closure_set(x_8, 0, x_4);
|
||||
lean_closure_set(x_8, 1, x_5);
|
||||
lean_closure_set(x_8, 2, x_2);
|
||||
x_9 = lean_apply_4(x_6, lean_box(0), lean_box(0), x_7, x_8);
|
||||
return x_9;
|
||||
}
|
||||
}
|
||||
lean_object* l_IO_eprint(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_2;
|
||||
x_2 = lean_alloc_closure((void*)(l_IO_eprint___rarg), 5, 0);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
lean_object* l_IO_eprint___at_IO_eprintln___spec__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7;
|
||||
x_4 = lean_ctor_get(x_1, 1);
|
||||
lean_inc(x_4);
|
||||
lean_dec(x_1);
|
||||
lean_inc(x_2);
|
||||
x_5 = l_IO_stderr___rarg(x_2);
|
||||
x_6 = lean_alloc_closure((void*)(l_IO_print___at_IO_println___spec__1___rarg___lambda__1), 3, 2);
|
||||
lean_closure_set(x_6, 0, x_2);
|
||||
lean_closure_set(x_6, 1, x_3);
|
||||
x_7 = lean_apply_4(x_4, lean_box(0), lean_box(0), x_5, x_6);
|
||||
return x_7;
|
||||
}
|
||||
}
|
||||
lean_object* l_IO_eprint___at_IO_eprintln___spec__1(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_2;
|
||||
x_2 = lean_alloc_closure((void*)(l_IO_eprint___at_IO_eprintln___spec__1___rarg), 3, 0);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
lean_object* l_IO_eprintln___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11;
|
||||
x_6 = lean_ctor_get(x_1, 0);
|
||||
lean_inc(x_6);
|
||||
x_7 = lean_ctor_get(x_6, 4);
|
||||
lean_inc(x_7);
|
||||
lean_dec(x_6);
|
||||
lean_inc(x_2);
|
||||
lean_inc(x_1);
|
||||
x_8 = l_IO_eprint___rarg(x_1, x_2, lean_box(0), x_4, x_5);
|
||||
x_9 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_10 = l_IO_eprint___at_IO_eprintln___spec__1___rarg(x_1, x_2, x_9);
|
||||
x_11 = lean_apply_3(x_7, lean_box(0), x_8, x_10);
|
||||
return x_11;
|
||||
}
|
||||
}
|
||||
lean_object* l_IO_eprintln(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_2;
|
||||
x_2 = lean_alloc_closure((void*)(l_IO_eprintln___rarg), 5, 0);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
lean_object* l_IO_getEnv___rarg(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
|
|
@ -2839,7 +2936,7 @@ x_2 = lean_alloc_closure((void*)(l_IO_Ref_modify___rarg), 5, 0);
|
|||
return x_2;
|
||||
}
|
||||
}
|
||||
lean_object* l_IO_stdout___at_Lean_HasRepr_hasEval___spec__4(lean_object* x_1) {
|
||||
lean_object* l_IO_stdout___at_Lean_HasRepr_hasEval___spec__3(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_2;
|
||||
|
|
@ -2847,7 +2944,7 @@ x_2 = lean_get_stdout(x_1);
|
|||
return x_2;
|
||||
}
|
||||
}
|
||||
lean_object* l_IO_FS_Handle_putStr___at_Lean_HasRepr_hasEval___spec__5(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
|
||||
lean_object* l_IO_FS_Handle_putStr___at_Lean_HasRepr_hasEval___spec__4(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_4;
|
||||
|
|
@ -2855,7 +2952,7 @@ x_4 = lean_io_prim_handle_put_str(x_1, x_2, x_3);
|
|||
return x_4;
|
||||
}
|
||||
}
|
||||
lean_object* l___private_Init_System_IO_1__putStr___at_Lean_HasRepr_hasEval___spec__3(lean_object* x_1, lean_object* x_2) {
|
||||
lean_object* l_IO_print___at_Lean_HasRepr_hasEval___spec__2(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_3;
|
||||
|
|
@ -2896,19 +2993,11 @@ return x_10;
|
|||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_IO_print___at_Lean_HasRepr_hasEval___spec__2(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_3;
|
||||
x_3 = l___private_Init_System_IO_1__putStr___at_Lean_HasRepr_hasEval___spec__3(x_1, x_2);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
lean_object* l_IO_println___at_Lean_HasRepr_hasEval___spec__1(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_3;
|
||||
x_3 = l___private_Init_System_IO_1__putStr___at_Lean_HasRepr_hasEval___spec__3(x_1, x_2);
|
||||
x_3 = l_IO_print___at_Lean_HasRepr_hasEval___spec__2(x_1, x_2);
|
||||
if (lean_obj_tag(x_3) == 0)
|
||||
{
|
||||
lean_object* x_4; lean_object* x_5; lean_object* x_6;
|
||||
|
|
@ -2916,7 +3005,7 @@ x_4 = lean_ctor_get(x_3, 1);
|
|||
lean_inc(x_4);
|
||||
lean_dec(x_3);
|
||||
x_5 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_6 = l___private_Init_System_IO_1__putStr___at_Lean_HasRepr_hasEval___spec__3(x_5, x_4);
|
||||
x_6 = l_IO_print___at_Lean_HasRepr_hasEval___spec__2(x_5, x_4);
|
||||
return x_6;
|
||||
}
|
||||
else
|
||||
|
|
@ -2961,25 +3050,16 @@ x_2 = lean_alloc_closure((void*)(l_Lean_HasRepr_hasEval___rarg___boxed), 4, 0);
|
|||
return x_2;
|
||||
}
|
||||
}
|
||||
lean_object* l_IO_FS_Handle_putStr___at_Lean_HasRepr_hasEval___spec__5___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
|
||||
lean_object* l_IO_FS_Handle_putStr___at_Lean_HasRepr_hasEval___spec__4___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_4;
|
||||
x_4 = l_IO_FS_Handle_putStr___at_Lean_HasRepr_hasEval___spec__5(x_1, x_2, x_3);
|
||||
x_4 = l_IO_FS_Handle_putStr___at_Lean_HasRepr_hasEval___spec__4(x_1, x_2, x_3);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
return x_4;
|
||||
}
|
||||
}
|
||||
lean_object* l___private_Init_System_IO_1__putStr___at_Lean_HasRepr_hasEval___spec__3___boxed(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_3;
|
||||
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_Lean_HasRepr_hasEval___spec__2___boxed(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ uint8_t l_List_elem___main___at_Lean_NameHashSet_insert___spec__2(lean_object*,
|
|||
lean_object* l_Lean_Elab_Command_elabAbbrev(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Command_elabExample___closed__1;
|
||||
lean_object* l_Lean_Elab_Command_elabConstant___closed__1;
|
||||
lean_object* l_Lean_Elab_Command_elabInductiveCore(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Command_elabInductiveCore(lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l_Array_empty___closed__1;
|
||||
lean_object* l_Array_iterateMAux___main___at_Lean_Elab_Command_elabAxiom___spec__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Elab_Command_6__mkTermContext(lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -42,10 +42,13 @@ lean_object* l_Lean_Elab_Command_elabExample___closed__2;
|
|||
extern lean_object* l_Lean_Parser_Command_declaration___elambda__1___closed__2;
|
||||
lean_object* l_Lean_mkIdentFrom(lean_object*, lean_object*);
|
||||
lean_object* l___regBuiltin_Lean_Elab_Command_elabDeclaration(lean_object*);
|
||||
extern lean_object* l_Lean_Parser_Command_mutual___elambda__1___closed__2;
|
||||
lean_object* l___private_Lean_Elab_Command_3__setState(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Elab_Declaration_2__classInductiveSyntaxToView(lean_object*, lean_object*);
|
||||
lean_object* lean_array_push(lean_object*, lean_object*);
|
||||
lean_object* lean_array_get_size(lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_mkForallUsedOnly(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___regBuiltin_Lean_Elab_Command_elabMutual(lean_object*);
|
||||
lean_object* lean_string_utf8_byte_size(lean_object*);
|
||||
extern lean_object* l_Lean_Parser_Command_example___elambda__1___closed__2;
|
||||
lean_object* l___private_Lean_Elab_SyntheticMVars_11__synthesizeSyntheticMVarsAux___main(uint8_t, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -55,6 +58,7 @@ lean_object* l_Lean_Name_getNumParts___main(lean_object*);
|
|||
lean_object* l___regBuiltin_Lean_Elab_Command_elabDeclaration___closed__1;
|
||||
extern lean_object* l_Lean_mkAppStx___closed__8;
|
||||
lean_object* lean_nat_add(lean_object*, lean_object*);
|
||||
uint8_t l_Array_anyRangeMAux___main___at___private_Lean_Elab_Declaration_3__isMutualInductive___spec__1(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l___private_Lean_Elab_Quotation_4__getHeadInfo___elambda__3___closed__3;
|
||||
extern lean_object* l_Lean_Parser_Command_classInductive___elambda__1___closed__2;
|
||||
extern lean_object* l_Lean_mkTermIdFromIdent___closed__2;
|
||||
|
|
@ -73,6 +77,7 @@ extern lean_object* l_Lean_Parser_Command_def___elambda__1___closed__2;
|
|||
extern lean_object* l_Lean_Parser_Command_declValSimple___elambda__1___closed__2;
|
||||
extern lean_object* l_Lean_Meta_registerInstanceAttr___closed__1;
|
||||
lean_object* l_Lean_Elab_Command_elabConstant(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* lean_array_fset(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Command_elabAxiom___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Command_expandOptDeclSig(lean_object*);
|
||||
extern lean_object* l_Lean_Meta_registerInstanceAttr___closed__2;
|
||||
|
|
@ -84,23 +89,28 @@ extern lean_object* l___private_Lean_Elab_Term_5__expandCDot___main___closed__4;
|
|||
extern lean_object* l_Lean_Parser_Command_namespace___elambda__1___closed__1;
|
||||
lean_object* l_Lean_Elab_Command_throwError___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_Parser_Command_docComment___elambda__1___closed__2;
|
||||
lean_object* l_Lean_Elab_Command_elabMutual___boxed(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_4__elabMutualInductive___spec__1(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_elabAxiom___spec__3(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Elab_Declaration_3__isMutualInductive___boxed(lean_object*);
|
||||
lean_object* l_Lean_Elab_Command_elabMutual___closed__2;
|
||||
lean_object* l_Lean_Elab_Command_elabTheorem(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_Elab_Command_modifyScope___closed__1;
|
||||
lean_object* l_Lean_Elab_Command_elabDef(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_registerClassAttr___closed__2;
|
||||
extern lean_object* l_Lean_Elab_Command_withDeclId___closed__3;
|
||||
lean_object* l_Lean_Elab_Command_elabAxiom___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Command_sortDeclLevelParams(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_addMacroScope(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Elab_Command_2__getState(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Command_elabClassInductive___closed__1;
|
||||
uint8_t l___private_Lean_Elab_Declaration_3__isMutualInductive(lean_object*);
|
||||
extern lean_object* l_Lean_mkReducibilityAttrs___closed__4;
|
||||
lean_object* l_Lean_mkAtomFrom(lean_object*, lean_object*);
|
||||
extern lean_object* l___private_Lean_Elab_Quotation_8__letBindRhss___main___closed__11;
|
||||
lean_object* l_List_drop___main___rarg(lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Elab_Declaration_1__inductiveSyntaxToView(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Command_elabAbbrev___closed__3;
|
||||
lean_object* l_Lean_Elab_Command_elabStructure___boxed(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Command_elabMutual(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Command_elabInstance(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Elab_Command_7__mkTermState(lean_object*);
|
||||
extern lean_object* l_Lean_Parser_Command_axiom___elambda__1___closed__2;
|
||||
|
|
@ -111,10 +121,11 @@ lean_object* l_Lean_Elab_Command_elabInstance___closed__3;
|
|||
lean_object* l_Lean_Syntax_getArgs(lean_object*);
|
||||
lean_object* l_Lean_Syntax_getKind(lean_object*);
|
||||
lean_object* l_Lean_MacroScopesView_review(lean_object*);
|
||||
lean_object* l_Lean_Elab_Command_elabInductive___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Array_anyRangeMAux___main___at___private_Lean_Elab_Declaration_3__isMutualInductive___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Command_elabAbbrev___closed__2;
|
||||
lean_object* l_Lean_Elab_Command_elabStructure(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Command_Modifiers_addAttribute(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Command_elabMutual___closed__3;
|
||||
lean_object* l_Lean_Elab_Term_elabType(lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_Parser_Command_structure___elambda__1___closed__2;
|
||||
extern lean_object* l_Lean_mkAppStx___closed__9;
|
||||
|
|
@ -132,12 +143,16 @@ lean_object* l_Lean_Elab_Command_elabDefLike(lean_object*, lean_object*, lean_ob
|
|||
lean_object* l_Lean_Elab_Command_expandDeclSig___boxed(lean_object*);
|
||||
lean_object* l_Lean_Elab_Command_elabDeclaration___boxed(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_elabBinders___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Elab_Declaration_4__elabMutualInductive(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Syntax_getArg(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Command_elabDeclaration___closed__2;
|
||||
extern lean_object* l_Lean_mkOptionalNode___closed__2;
|
||||
lean_object* l_Lean_Elab_Command_elabAxiom___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Command_elabConstant___closed__5;
|
||||
lean_object* l_unsafeCast(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Command_elabInductive(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Command_elabDeclaration___closed__1;
|
||||
lean_object* l___private_Lean_Elab_Declaration_1__inductiveSyntaxToView___boxed(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Command_elabDeclaration___closed__3;
|
||||
lean_object* l_Lean_Elab_Command_elabConstant___closed__3;
|
||||
lean_object* l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_elabAxiom___spec__2(lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -146,11 +161,13 @@ lean_object* l___private_Lean_Elab_Command_12__addScopes___main(lean_object*, le
|
|||
lean_object* l_Lean_Elab_Command_elabAbbrev___closed__4;
|
||||
lean_object* l_Lean_CollectLevelParams_main___main(lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_Elab_Command_liftTermElabM___rarg___closed__1;
|
||||
lean_object* l___regBuiltin_Lean_Elab_Command_elabMutual___closed__1;
|
||||
lean_object* l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_elabAxiom___spec__1(lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_Parser_Command_constant___elambda__1___closed__2;
|
||||
extern lean_object* l_Lean_Parser_Command_theorem___elambda__1___closed__2;
|
||||
uint8_t lean_nat_dec_lt(lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_Parser_Command_declId___elambda__1___closed__2;
|
||||
lean_object* l_Lean_Elab_Command_elabMutual___closed__1;
|
||||
lean_object* l_Lean_Elab_Command_expandOptDeclSig(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
|
|
@ -5234,12 +5251,14 @@ lean_dec(x_2);
|
|||
return x_5;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_Command_elabInductive(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
lean_object* l___private_Lean_Elab_Declaration_1__inductiveSyntaxToView(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15;
|
||||
x_5 = lean_unsigned_to_nat(2u);
|
||||
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_4 = lean_unsigned_to_nat(1u);
|
||||
x_5 = lean_nat_add(x_3, x_4);
|
||||
x_6 = l_Lean_Syntax_getArg(x_2, x_5);
|
||||
lean_dec(x_5);
|
||||
x_7 = l_Lean_Elab_Command_expandOptDeclSig(x_6);
|
||||
lean_dec(x_6);
|
||||
x_8 = lean_ctor_get(x_7, 0);
|
||||
|
|
@ -5247,67 +5266,63 @@ lean_inc(x_8);
|
|||
x_9 = lean_ctor_get(x_7, 1);
|
||||
lean_inc(x_9);
|
||||
lean_dec(x_7);
|
||||
x_10 = lean_unsigned_to_nat(1u);
|
||||
x_11 = l_Lean_Syntax_getArg(x_2, x_10);
|
||||
x_12 = lean_unsigned_to_nat(3u);
|
||||
x_10 = l_Lean_Syntax_getArg(x_2, x_3);
|
||||
x_11 = lean_unsigned_to_nat(2u);
|
||||
x_12 = lean_nat_add(x_3, x_11);
|
||||
x_13 = l_Lean_Syntax_getArg(x_2, x_12);
|
||||
lean_dec(x_12);
|
||||
x_14 = l_Lean_Syntax_getArgs(x_13);
|
||||
lean_dec(x_13);
|
||||
x_15 = l_Lean_Elab_Command_elabInductiveCore(x_2, x_1, x_11, x_8, x_9, x_14, x_3, x_4);
|
||||
lean_dec(x_14);
|
||||
lean_dec(x_9);
|
||||
lean_dec(x_11);
|
||||
x_15 = lean_alloc_ctor(0, 6, 0);
|
||||
lean_ctor_set(x_15, 0, x_2);
|
||||
lean_ctor_set(x_15, 1, x_1);
|
||||
lean_ctor_set(x_15, 2, x_10);
|
||||
lean_ctor_set(x_15, 3, x_8);
|
||||
lean_ctor_set(x_15, 4, x_9);
|
||||
lean_ctor_set(x_15, 5, x_14);
|
||||
return x_15;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_Command_elabInductive___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
lean_object* l___private_Lean_Elab_Declaration_1__inductiveSyntaxToView___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_5;
|
||||
x_5 = l_Lean_Elab_Command_elabInductive(x_1, x_2, x_3, x_4);
|
||||
lean_dec(x_1);
|
||||
return x_5;
|
||||
lean_object* x_4;
|
||||
x_4 = l___private_Lean_Elab_Declaration_1__inductiveSyntaxToView(x_1, x_2, x_3);
|
||||
lean_dec(x_3);
|
||||
return x_4;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_Lean_Elab_Command_elabClassInductive___closed__1() {
|
||||
lean_object* l___private_Lean_Elab_Declaration_2__classInductiveSyntaxToView(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
x_1 = l_Lean_registerClassAttr___closed__2;
|
||||
x_2 = lean_box(0);
|
||||
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* x_3; lean_object* x_4;
|
||||
x_3 = lean_unsigned_to_nat(2u);
|
||||
x_4 = l___private_Lean_Elab_Declaration_1__inductiveSyntaxToView(x_1, x_2, x_3);
|
||||
return x_4;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_Command_elabInductive(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_unsigned_to_nat(1u);
|
||||
x_6 = l___private_Lean_Elab_Declaration_1__inductiveSyntaxToView(x_1, x_2, x_5);
|
||||
x_7 = l_Lean_mkOptionalNode___closed__2;
|
||||
x_8 = lean_array_push(x_7, x_6);
|
||||
x_9 = l_Lean_Elab_Command_elabInductiveCore(x_8, x_3, x_4);
|
||||
return x_9;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_Command_elabClassInductive(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; lean_object* x_15; lean_object* x_16; lean_object* x_17;
|
||||
x_5 = lean_unsigned_to_nat(3u);
|
||||
x_6 = l_Lean_Syntax_getArg(x_2, x_5);
|
||||
x_7 = l_Lean_Elab_Command_expandOptDeclSig(x_6);
|
||||
lean_dec(x_6);
|
||||
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 = l_Lean_Elab_Command_elabClassInductive___closed__1;
|
||||
x_11 = l_Lean_Elab_Command_Modifiers_addAttribute(x_1, x_10);
|
||||
x_12 = lean_unsigned_to_nat(2u);
|
||||
x_13 = l_Lean_Syntax_getArg(x_2, x_12);
|
||||
x_14 = lean_unsigned_to_nat(4u);
|
||||
x_15 = l_Lean_Syntax_getArg(x_2, x_14);
|
||||
x_16 = l_Lean_Syntax_getArgs(x_15);
|
||||
lean_dec(x_15);
|
||||
x_17 = l_Lean_Elab_Command_elabInductiveCore(x_2, x_11, x_13, x_8, x_9, x_16, x_3, x_4);
|
||||
lean_dec(x_16);
|
||||
lean_dec(x_9);
|
||||
lean_dec(x_13);
|
||||
lean_dec(x_11);
|
||||
return x_17;
|
||||
lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9;
|
||||
x_5 = lean_unsigned_to_nat(2u);
|
||||
x_6 = l___private_Lean_Elab_Declaration_1__inductiveSyntaxToView(x_1, x_2, x_5);
|
||||
x_7 = l_Lean_mkOptionalNode___closed__2;
|
||||
x_8 = lean_array_push(x_7, x_6);
|
||||
x_9 = l_Lean_Elab_Command_elabInductiveCore(x_8, x_3, x_4);
|
||||
return x_9;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_Command_elabStructure___rarg(lean_object* x_1) {
|
||||
|
|
@ -5482,7 +5497,6 @@ lean_object* x_37;
|
|||
lean_dec(x_12);
|
||||
lean_free_object(x_6);
|
||||
x_37 = l_Lean_Elab_Command_elabInductive(x_8, x_11, x_2, x_9);
|
||||
lean_dec(x_8);
|
||||
return x_37;
|
||||
}
|
||||
}
|
||||
|
|
@ -5643,7 +5657,6 @@ else
|
|||
lean_object* x_75;
|
||||
lean_dec(x_49);
|
||||
x_75 = l_Lean_Elab_Command_elabInductive(x_45, x_48, x_2, x_46);
|
||||
lean_dec(x_45);
|
||||
return x_75;
|
||||
}
|
||||
}
|
||||
|
|
@ -5758,6 +5771,303 @@ x_5 = l_Lean_KeyedDeclsAttribute_addBuiltin___rarg(x_2, x_3, x_4, x_1);
|
|||
return x_5;
|
||||
}
|
||||
}
|
||||
uint8_t l_Array_anyRangeMAux___main___at___private_Lean_Elab_Declaration_3__isMutualInductive___spec__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_nat_dec_lt(x_4, x_3);
|
||||
if (x_5 == 0)
|
||||
{
|
||||
uint8_t x_6;
|
||||
lean_dec(x_4);
|
||||
x_6 = 0;
|
||||
return x_6;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; uint8_t x_12;
|
||||
x_7 = lean_array_fget(x_2, x_4);
|
||||
x_8 = lean_unsigned_to_nat(1u);
|
||||
x_9 = l_Lean_Syntax_getArg(x_7, x_8);
|
||||
lean_dec(x_7);
|
||||
x_10 = l_Lean_Syntax_getKind(x_9);
|
||||
x_11 = l_Lean_Parser_Command_inductive___elambda__1___closed__2;
|
||||
x_12 = lean_name_eq(x_10, x_11);
|
||||
lean_dec(x_10);
|
||||
if (x_12 == 0)
|
||||
{
|
||||
uint8_t x_13;
|
||||
lean_dec(x_4);
|
||||
x_13 = 1;
|
||||
return x_13;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_14;
|
||||
x_14 = lean_nat_add(x_4, x_8);
|
||||
lean_dec(x_4);
|
||||
x_4 = x_14;
|
||||
goto _start;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
uint8_t l___private_Lean_Elab_Declaration_3__isMutualInductive(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; uint8_t x_7;
|
||||
x_2 = lean_unsigned_to_nat(1u);
|
||||
x_3 = l_Lean_Syntax_getArg(x_1, x_2);
|
||||
x_4 = l_Lean_Syntax_getArgs(x_3);
|
||||
lean_dec(x_3);
|
||||
x_5 = lean_array_get_size(x_4);
|
||||
x_6 = lean_unsigned_to_nat(0u);
|
||||
x_7 = l_Array_anyRangeMAux___main___at___private_Lean_Elab_Declaration_3__isMutualInductive___spec__1(x_1, x_4, x_5, x_6);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_4);
|
||||
if (x_7 == 0)
|
||||
{
|
||||
uint8_t x_8;
|
||||
x_8 = 1;
|
||||
return x_8;
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_9;
|
||||
x_9 = 0;
|
||||
return x_9;
|
||||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_Array_anyRangeMAux___main___at___private_Lean_Elab_Declaration_3__isMutualInductive___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
uint8_t x_5; lean_object* x_6;
|
||||
x_5 = l_Array_anyRangeMAux___main___at___private_Lean_Elab_Declaration_3__isMutualInductive___spec__1(x_1, x_2, x_3, x_4);
|
||||
lean_dec(x_3);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
x_6 = lean_box(x_5);
|
||||
return x_6;
|
||||
}
|
||||
}
|
||||
lean_object* l___private_Lean_Elab_Declaration_3__isMutualInductive___boxed(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
uint8_t x_2; lean_object* x_3;
|
||||
x_2 = l___private_Lean_Elab_Declaration_3__isMutualInductive(x_1);
|
||||
lean_dec(x_1);
|
||||
x_3 = lean_box(x_2);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_4__elabMutualInductive___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_5; uint8_t x_6;
|
||||
x_5 = lean_array_get_size(x_2);
|
||||
x_6 = lean_nat_dec_lt(x_1, x_5);
|
||||
lean_dec(x_5);
|
||||
if (x_6 == 0)
|
||||
{
|
||||
lean_object* x_7; lean_object* x_8;
|
||||
lean_dec(x_3);
|
||||
lean_dec(x_1);
|
||||
x_7 = x_2;
|
||||
x_8 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_8, 0, x_7);
|
||||
lean_ctor_set(x_8, 1, x_4);
|
||||
return x_8;
|
||||
}
|
||||
else
|
||||
{
|
||||
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_9 = lean_array_fget(x_2, x_1);
|
||||
x_10 = lean_unsigned_to_nat(0u);
|
||||
x_11 = lean_array_fset(x_2, x_1, x_10);
|
||||
x_12 = x_9;
|
||||
x_13 = l_Lean_Syntax_getArg(x_12, x_10);
|
||||
lean_inc(x_3);
|
||||
x_14 = l_Lean_Elab_Command_elabModifiers(x_13, x_3, x_4);
|
||||
lean_dec(x_13);
|
||||
if (lean_obj_tag(x_14) == 0)
|
||||
{
|
||||
lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22;
|
||||
x_15 = lean_ctor_get(x_14, 0);
|
||||
lean_inc(x_15);
|
||||
x_16 = lean_ctor_get(x_14, 1);
|
||||
lean_inc(x_16);
|
||||
lean_dec(x_14);
|
||||
x_17 = lean_unsigned_to_nat(1u);
|
||||
x_18 = l_Lean_Syntax_getArg(x_12, x_17);
|
||||
lean_dec(x_12);
|
||||
x_19 = l___private_Lean_Elab_Declaration_1__inductiveSyntaxToView(x_15, x_18, x_17);
|
||||
x_20 = lean_nat_add(x_1, x_17);
|
||||
x_21 = x_19;
|
||||
x_22 = lean_array_fset(x_11, x_1, x_21);
|
||||
lean_dec(x_1);
|
||||
x_1 = x_20;
|
||||
x_2 = x_22;
|
||||
x_4 = x_16;
|
||||
goto _start;
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_24;
|
||||
lean_dec(x_12);
|
||||
lean_dec(x_11);
|
||||
lean_dec(x_3);
|
||||
lean_dec(x_1);
|
||||
x_24 = !lean_is_exclusive(x_14);
|
||||
if (x_24 == 0)
|
||||
{
|
||||
return x_14;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_25; lean_object* x_26; lean_object* x_27;
|
||||
x_25 = lean_ctor_get(x_14, 0);
|
||||
x_26 = lean_ctor_get(x_14, 1);
|
||||
lean_inc(x_26);
|
||||
lean_inc(x_25);
|
||||
lean_dec(x_14);
|
||||
x_27 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_27, 0, x_25);
|
||||
lean_ctor_set(x_27, 1, x_26);
|
||||
return x_27;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
lean_object* l___private_Lean_Elab_Declaration_4__elabMutualInductive(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;
|
||||
x_4 = x_1;
|
||||
x_5 = lean_unsigned_to_nat(0u);
|
||||
x_6 = lean_alloc_closure((void*)(l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_4__elabMutualInductive___spec__1), 4, 2);
|
||||
lean_closure_set(x_6, 0, x_5);
|
||||
lean_closure_set(x_6, 1, x_4);
|
||||
x_7 = x_6;
|
||||
lean_inc(x_2);
|
||||
x_8 = lean_apply_2(x_7, x_2, x_3);
|
||||
if (lean_obj_tag(x_8) == 0)
|
||||
{
|
||||
lean_object* x_9; lean_object* x_10; lean_object* x_11;
|
||||
x_9 = lean_ctor_get(x_8, 0);
|
||||
lean_inc(x_9);
|
||||
x_10 = lean_ctor_get(x_8, 1);
|
||||
lean_inc(x_10);
|
||||
lean_dec(x_8);
|
||||
x_11 = l_Lean_Elab_Command_elabInductiveCore(x_9, x_2, x_10);
|
||||
return x_11;
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_12;
|
||||
lean_dec(x_2);
|
||||
x_12 = !lean_is_exclusive(x_8);
|
||||
if (x_12 == 0)
|
||||
{
|
||||
return x_8;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_13; lean_object* x_14; lean_object* x_15;
|
||||
x_13 = lean_ctor_get(x_8, 0);
|
||||
x_14 = lean_ctor_get(x_8, 1);
|
||||
lean_inc(x_14);
|
||||
lean_inc(x_13);
|
||||
lean_dec(x_8);
|
||||
x_15 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_15, 0, x_13);
|
||||
lean_ctor_set(x_15, 1, x_14);
|
||||
return x_15;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_Lean_Elab_Command_elabMutual___closed__1() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_mk_string("not supported");
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_Lean_Elab_Command_elabMutual___closed__2() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2;
|
||||
x_1 = l_Lean_Elab_Command_elabMutual___closed__1;
|
||||
x_2 = lean_alloc_ctor(2, 1, 0);
|
||||
lean_ctor_set(x_2, 0, x_1);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_Lean_Elab_Command_elabMutual___closed__3() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2;
|
||||
x_1 = l_Lean_Elab_Command_elabMutual___closed__2;
|
||||
x_2 = lean_alloc_ctor(0, 1, 0);
|
||||
lean_ctor_set(x_2, 0, x_1);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_Command_elabMutual(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
|
||||
_start:
|
||||
{
|
||||
uint8_t x_4;
|
||||
x_4 = l___private_Lean_Elab_Declaration_3__isMutualInductive(x_1);
|
||||
if (x_4 == 0)
|
||||
{
|
||||
lean_object* x_5; lean_object* x_6;
|
||||
x_5 = l_Lean_Elab_Command_elabMutual___closed__3;
|
||||
x_6 = l_Lean_Elab_Command_throwError___rarg(x_1, x_5, x_2, x_3);
|
||||
return x_6;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10;
|
||||
x_7 = lean_unsigned_to_nat(1u);
|
||||
x_8 = l_Lean_Syntax_getArg(x_1, x_7);
|
||||
x_9 = l_Lean_Syntax_getArgs(x_8);
|
||||
lean_dec(x_8);
|
||||
x_10 = l___private_Lean_Elab_Declaration_4__elabMutualInductive(x_9, x_2, x_3);
|
||||
return x_10;
|
||||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_Command_elabMutual___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_4;
|
||||
x_4 = l_Lean_Elab_Command_elabMutual(x_1, x_2, x_3);
|
||||
lean_dec(x_1);
|
||||
return x_4;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l___regBuiltin_Lean_Elab_Command_elabMutual___closed__1() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_alloc_closure((void*)(l_Lean_Elab_Command_elabMutual___boxed), 3, 0);
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
lean_object* l___regBuiltin_Lean_Elab_Command_elabMutual(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5;
|
||||
x_2 = l_Lean_Elab_Command_commandElabAttribute;
|
||||
x_3 = l_Lean_Parser_Command_mutual___elambda__1___closed__2;
|
||||
x_4 = l___regBuiltin_Lean_Elab_Command_elabMutual___closed__1;
|
||||
x_5 = l_Lean_KeyedDeclsAttribute_addBuiltin___rarg(x_2, x_3, x_4, x_1);
|
||||
return x_5;
|
||||
}
|
||||
}
|
||||
lean_object* initialize_Init(lean_object*);
|
||||
lean_object* initialize_Lean_Util_CollectLevelParams(lean_object*);
|
||||
lean_object* initialize_Lean_Elab_Definition(lean_object*);
|
||||
|
|
@ -5811,8 +6121,6 @@ l_Lean_Elab_Command_elabExample___closed__1 = _init_l_Lean_Elab_Command_elabExam
|
|||
lean_mark_persistent(l_Lean_Elab_Command_elabExample___closed__1);
|
||||
l_Lean_Elab_Command_elabExample___closed__2 = _init_l_Lean_Elab_Command_elabExample___closed__2();
|
||||
lean_mark_persistent(l_Lean_Elab_Command_elabExample___closed__2);
|
||||
l_Lean_Elab_Command_elabClassInductive___closed__1 = _init_l_Lean_Elab_Command_elabClassInductive___closed__1();
|
||||
lean_mark_persistent(l_Lean_Elab_Command_elabClassInductive___closed__1);
|
||||
l_Lean_Elab_Command_elabDeclaration___closed__1 = _init_l_Lean_Elab_Command_elabDeclaration___closed__1();
|
||||
lean_mark_persistent(l_Lean_Elab_Command_elabDeclaration___closed__1);
|
||||
l_Lean_Elab_Command_elabDeclaration___closed__2 = _init_l_Lean_Elab_Command_elabDeclaration___closed__2();
|
||||
|
|
@ -5826,6 +6134,17 @@ lean_mark_persistent(l___regBuiltin_Lean_Elab_Command_elabDeclaration___closed__
|
|||
res = l___regBuiltin_Lean_Elab_Command_elabDeclaration(lean_io_mk_world());
|
||||
if (lean_io_result_is_error(res)) return res;
|
||||
lean_dec_ref(res);
|
||||
l_Lean_Elab_Command_elabMutual___closed__1 = _init_l_Lean_Elab_Command_elabMutual___closed__1();
|
||||
lean_mark_persistent(l_Lean_Elab_Command_elabMutual___closed__1);
|
||||
l_Lean_Elab_Command_elabMutual___closed__2 = _init_l_Lean_Elab_Command_elabMutual___closed__2();
|
||||
lean_mark_persistent(l_Lean_Elab_Command_elabMutual___closed__2);
|
||||
l_Lean_Elab_Command_elabMutual___closed__3 = _init_l_Lean_Elab_Command_elabMutual___closed__3();
|
||||
lean_mark_persistent(l_Lean_Elab_Command_elabMutual___closed__3);
|
||||
l___regBuiltin_Lean_Elab_Command_elabMutual___closed__1 = _init_l___regBuiltin_Lean_Elab_Command_elabMutual___closed__1();
|
||||
lean_mark_persistent(l___regBuiltin_Lean_Elab_Command_elabMutual___closed__1);
|
||||
res = l___regBuiltin_Lean_Elab_Command_elabMutual(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
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -57,6 +57,7 @@ extern lean_object* l_EIO_Monad___closed__1;
|
|||
lean_object* l_Lean_Meta_savingCache(lean_object*);
|
||||
lean_object* l_Lean_Meta_addContext___boxed(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_mkFreshExprMVarAt___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_IO_print___at_Lean_HasRepr_hasEval___spec__2(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_mkForall(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_withLocalContext___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* lean_local_ctx_mk_let_decl(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -64,6 +65,7 @@ extern lean_object* l_Std_HashMap_inhabited___closed__1;
|
|||
lean_object* l_ReaderT_bind___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_forallMetaTelescope___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_maxRecDepthErrorMessage;
|
||||
lean_object* lean_io_prim_handle_put_str(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_resettingSynthInstanceCache___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_liftStateMCtx(lean_object*);
|
||||
lean_object* lean_metavar_ctx_get_expr_assignment(lean_object*, lean_object*);
|
||||
|
|
@ -294,7 +296,6 @@ lean_object* l_Lean_Meta_withNewLocalInstances___main___at_Lean_Meta_forallBound
|
|||
extern lean_object* l___private_Lean_Environment_5__envExtensionsRef;
|
||||
lean_object* l_Lean_Meta_forallMetaTelescopeReducing(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_isDelayedAssigned___boxed(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Init_System_IO_1__putStr___at_Lean_HasRepr_hasEval___spec__3(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_approxDefEq(lean_object*);
|
||||
lean_object* l_Lean_Meta_shouldReduceReducibleOnly___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_mkIsExprDefEqAuxRef(lean_object*);
|
||||
|
|
@ -375,6 +376,7 @@ lean_object* l_Lean_Meta_dbgTrace(lean_object*);
|
|||
lean_object* l_Lean_Meta_mkFreshId(lean_object*);
|
||||
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_Lean_Meta_TransparencyMode_beq___boxed(lean_object*, lean_object*);
|
||||
lean_object* lean_get_stdout(lean_object*);
|
||||
lean_object* l_Lean_Meta_metaExt___elambda__1(lean_object*);
|
||||
lean_object* l_Lean_Meta_getTransparency___boxed(lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_TraceState_Inhabited___closed__1;
|
||||
|
|
@ -50202,12 +50204,46 @@ return x_2;
|
|||
lean_object* l_IO_print___at_IO_runMeta___spec__2(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 = l___private_Init_System_IO_1__putStr___at_Lean_HasRepr_hasEval___spec__3(x_4, x_2);
|
||||
lean_object* x_3;
|
||||
x_3 = lean_get_stdout(x_2);
|
||||
if (lean_obj_tag(x_3) == 0)
|
||||
{
|
||||
lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8;
|
||||
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_Options_empty;
|
||||
x_7 = l_Lean_Format_pretty(x_1, x_6);
|
||||
x_8 = lean_io_prim_handle_put_str(x_4, x_7, x_5);
|
||||
lean_dec(x_7);
|
||||
lean_dec(x_4);
|
||||
return x_5;
|
||||
return x_8;
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_9;
|
||||
lean_dec(x_1);
|
||||
x_9 = !lean_is_exclusive(x_3);
|
||||
if (x_9 == 0)
|
||||
{
|
||||
return x_3;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_10; lean_object* x_11; lean_object* x_12;
|
||||
x_10 = lean_ctor_get(x_3, 0);
|
||||
x_11 = lean_ctor_get(x_3, 1);
|
||||
lean_inc(x_11);
|
||||
lean_inc(x_10);
|
||||
lean_dec(x_3);
|
||||
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* l_IO_println___at_IO_runMeta___spec__1(lean_object* x_1, lean_object* x_2) {
|
||||
|
|
@ -50222,7 +50258,7 @@ x_4 = lean_ctor_get(x_3, 1);
|
|||
lean_inc(x_4);
|
||||
lean_dec(x_3);
|
||||
x_5 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_6 = l___private_Init_System_IO_1__putStr___at_Lean_HasRepr_hasEval___spec__3(x_5, x_4);
|
||||
x_6 = l_IO_print___at_Lean_HasRepr_hasEval___spec__2(x_5, x_4);
|
||||
return x_6;
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -30,6 +30,8 @@ lean_object* l_Lean_Parser_ModuleParserState_inhabited___closed__1;
|
|||
lean_object* l_Lean_Parser_testModuleParser___closed__2;
|
||||
lean_object* l_Lean_Format_pretty(lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_Parser_regBuiltinCommandParserAttr___closed__4;
|
||||
lean_object* l_IO_print___at_Lean_HasRepr_hasEval___spec__2(lean_object*, lean_object*);
|
||||
lean_object* lean_io_prim_handle_put_str(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Parser_Module_import___closed__10;
|
||||
lean_object* l_Lean_Parser_Module_prelude;
|
||||
lean_object* l_Lean_Parser_Module_import___elambda__1___closed__12;
|
||||
|
|
@ -128,7 +130,6 @@ lean_object* l_Lean_Parser_Module_header___closed__5;
|
|||
lean_object* l_IO_FS_Handle_getLine___at_Lean_Parser_parseFile___spec__4(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Parser_Module_prelude___closed__5;
|
||||
lean_object* l_Lean_Parser_Module_import___closed__2;
|
||||
lean_object* l___private_Init_System_IO_1__putStr___at_Lean_HasRepr_hasEval___spec__3(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Parser_ModuleParserState_inhabited;
|
||||
lean_object* l_Lean_Parser_Module_prelude___elambda__1___closed__5;
|
||||
lean_object* l_Std_PersistentArray_forM___at___private_Lean_Parser_Module_4__testModuleParserAux___main___spec__6(lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -154,6 +155,7 @@ extern lean_object* l_Lean_Parser_epsilonInfo;
|
|||
lean_object* l_Lean_Parser_Module_prelude___elambda__1___closed__6;
|
||||
lean_object* l_Lean_Parser_categoryParser___elambda__1(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Parser_Module_prelude___closed__2;
|
||||
lean_object* lean_get_stdout(lean_object*);
|
||||
lean_object* l_Lean_Parser_manyAux___main___at_Lean_Parser_Module_header___elambda__1___spec__1(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_MessageLog_forM___at___private_Lean_Parser_Module_4__testModuleParserAux___main___spec__5___boxed(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Parser_Module_import___elambda__1___closed__7;
|
||||
|
|
@ -2509,16 +2511,50 @@ return x_5;
|
|||
lean_object* l_IO_print___at___private_Lean_Parser_Module_4__testModuleParserAux___main___spec__2(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_3; uint8_t 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_box(0);
|
||||
x_4 = 0;
|
||||
x_5 = lean_unsigned_to_nat(0u);
|
||||
x_6 = l_Lean_Syntax_formatStxAux___main(x_3, x_4, x_5, x_1);
|
||||
x_7 = l_Lean_Options_empty;
|
||||
x_8 = l_Lean_Format_pretty(x_6, x_7);
|
||||
x_9 = l___private_Init_System_IO_1__putStr___at_Lean_HasRepr_hasEval___spec__3(x_8, x_2);
|
||||
lean_dec(x_8);
|
||||
return x_9;
|
||||
lean_object* x_3;
|
||||
x_3 = lean_get_stdout(x_2);
|
||||
if (lean_obj_tag(x_3) == 0)
|
||||
{
|
||||
lean_object* x_4; lean_object* x_5; lean_object* x_6; uint8_t x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12;
|
||||
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_box(0);
|
||||
x_7 = 0;
|
||||
x_8 = lean_unsigned_to_nat(0u);
|
||||
x_9 = l_Lean_Syntax_formatStxAux___main(x_6, x_7, x_8, x_1);
|
||||
x_10 = l_Lean_Options_empty;
|
||||
x_11 = l_Lean_Format_pretty(x_9, x_10);
|
||||
x_12 = lean_io_prim_handle_put_str(x_4, x_11, x_5);
|
||||
lean_dec(x_11);
|
||||
lean_dec(x_4);
|
||||
return x_12;
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_13;
|
||||
lean_dec(x_1);
|
||||
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_IO_println___at___private_Lean_Parser_Module_4__testModuleParserAux___main___spec__1(lean_object* x_1, lean_object* x_2) {
|
||||
|
|
@ -2533,7 +2569,7 @@ x_4 = lean_ctor_get(x_3, 1);
|
|||
lean_inc(x_4);
|
||||
lean_dec(x_3);
|
||||
x_5 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_6 = l___private_Init_System_IO_1__putStr___at_Lean_HasRepr_hasEval___spec__3(x_5, x_4);
|
||||
x_6 = l_IO_print___at_Lean_HasRepr_hasEval___spec__2(x_5, x_4);
|
||||
return x_6;
|
||||
}
|
||||
else
|
||||
|
|
@ -2563,11 +2599,45 @@ return x_10;
|
|||
lean_object* l_IO_print___at___private_Lean_Parser_Module_4__testModuleParserAux___main___spec__4(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_3; lean_object* x_4;
|
||||
x_3 = l_Lean_Message_toString(x_1);
|
||||
x_4 = l___private_Init_System_IO_1__putStr___at_Lean_HasRepr_hasEval___spec__3(x_3, x_2);
|
||||
lean_object* x_3;
|
||||
x_3 = lean_get_stdout(x_2);
|
||||
if (lean_obj_tag(x_3) == 0)
|
||||
{
|
||||
lean_object* x_4; lean_object* x_5; lean_object* x_6; 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);
|
||||
return x_4;
|
||||
x_6 = l_Lean_Message_toString(x_1);
|
||||
x_7 = lean_io_prim_handle_put_str(x_4, x_6, x_5);
|
||||
lean_dec(x_6);
|
||||
lean_dec(x_4);
|
||||
return x_7;
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_8;
|
||||
lean_dec(x_1);
|
||||
x_8 = !lean_is_exclusive(x_3);
|
||||
if (x_8 == 0)
|
||||
{
|
||||
return x_3;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_9; lean_object* x_10; lean_object* x_11;
|
||||
x_9 = lean_ctor_get(x_3, 0);
|
||||
x_10 = lean_ctor_get(x_3, 1);
|
||||
lean_inc(x_10);
|
||||
lean_inc(x_9);
|
||||
lean_dec(x_3);
|
||||
x_11 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_11, 0, x_9);
|
||||
lean_ctor_set(x_11, 1, x_10);
|
||||
return x_11;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_IO_println___at___private_Lean_Parser_Module_4__testModuleParserAux___main___spec__3(lean_object* x_1, lean_object* x_2) {
|
||||
|
|
@ -2582,7 +2652,7 @@ x_4 = lean_ctor_get(x_3, 1);
|
|||
lean_inc(x_4);
|
||||
lean_dec(x_3);
|
||||
x_5 = l_IO_FS_Handle_putStrLn___rarg___closed__1;
|
||||
x_6 = l___private_Init_System_IO_1__putStr___at_Lean_HasRepr_hasEval___spec__3(x_5, x_4);
|
||||
x_6 = l_IO_print___at_Lean_HasRepr_hasEval___spec__2(x_5, x_4);
|
||||
return x_6;
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue