refactor(library/init/array): implement mkArray in Lean, add allow mkEmpty to set initial capacity

This commit is contained in:
Leonardo de Moura 2019-03-29 10:19:21 -07:00
parent c8e11d289f
commit 229e4a25b3
34 changed files with 31900 additions and 31620 deletions

View file

@ -10,7 +10,7 @@ universes u v w
/-
The Compiler has special support for arrays.
They are implemented as a dynamic Array.
They are implemented using dynamic arrays: https://en.wikipedia.org/wiki/Dynamic_array
-/
-- TODO(Leo): mark as opaque
@ -24,24 +24,28 @@ attribute [extern cpp inline "lean::array_sz(#2)"] Array.sz
def Array.size {α : Type u} (a : @& Array α) : Nat :=
a.sz
@[extern cpp inline "lean::mk_array(#2, #3)"]
def mkArray {α : Type u} (n : Nat) (v : α) : Array α :=
{ sz := n,
data := λ _, v}
theorem szMkArrayEq {α : Type u} (n : Nat) (v : α) : (mkArray n v).sz = n :=
rfl
namespace Array
variables {α : Type u} {β : Type v}
@[extern cpp inline "lean::mk_empty_array()"]
def mkEmpty (_ : Unit) : Array α :=
/- The parameter `c` is the initial capacity -/
@[extern cpp inline "lean::mk_empty_array(#1)"]
def mkEmpty (c : @& Nat) : Array α :=
{ sz := 0,
data := λ ⟨x, h⟩, absurd h (Nat.notLtZero x) }
@[extern cpp inline "lean::array_push(#2, #3)"]
def push (a : Array α) (v : α) : Array α :=
{ sz := Nat.succ a.sz,
data := λ ⟨j, h₁⟩,
if h₂ : j = a.sz then v
else a.data ⟨j, Nat.ltOfLeOfNe (Nat.leOfLtSucc h₁) h₂⟩ }
def mkArray {α : Type u} (n : Nat) (v : α) : Array α :=
let a : Array α := mkEmpty n in
n.repeat (λ _ a, a.push v) a
def empty : Array α :=
mkEmpty ()
mkEmpty 0
instance : HasEmptyc (Array α) :=
⟨Array.empty⟩
@ -94,13 +98,6 @@ if h : i < a.sz then a.update ⟨i, h⟩ v else a
theorem szUpdateEq (a : Array α) (i : Fin a.sz) (v : α) : (update a i v).sz = a.sz :=
rfl
@[extern cpp inline "lean::array_push(#2, #3)"]
def push (a : Array α) (v : α) : Array α :=
{ sz := Nat.succ a.sz,
data := λ ⟨j, h₁⟩,
if h₂ : j = a.sz then v
else a.data ⟨j, Nat.ltOfLeOfNe (Nat.leOfLtSucc h₁) h₂⟩ }
@[extern cpp inline "lean::array_pop(#2)"]
def pop (a : Array α) : Array α :=
{ sz := Nat.pred a.sz,
@ -184,9 +181,42 @@ else foreach b (λ ⟨i, h'⟩, f (a.index ⟨i, Nat.ltTrans h' (Nat.gtOfNotLe h
end Array
export Array (mkArray)
private theorem repeatCoreIndexIndep {α : Type u} (f : αα) (n m₁ m₂ : Nat) :
∀ (a : α), Nat.repeatCore (λ _ a, f a) m₁ n a =
Nat.repeatCore (λ _ a, f a) m₂ n a :=
Nat.recOn n (λ a, rfl) (λ n ih a,
show Nat.repeatCore (λ _ a, f a) m₁ n (f a) =
Nat.repeatCore (λ _ a, f a) m₂ n (f a), from
ih (f a))
private theorem repeatCorePushSz {α : Type u} : ∀ (n m : Nat) (v : α) (a : Array α),
(Nat.repeatCore (λ _ (a : Array α), a.push v) m n (a.push v)).sz =
(Nat.repeatCore (λ _ (a : Array α), a.push v) m n a).sz.succ
| 0 _ _ _ := rfl
| (Nat.succ n) m v a :=
show (Nat.repeatCore (λ _ (a : Array α), a.push v) m n ((a.push v).push v)).sz =
(Nat.repeatCore (λ _ (a : Array α), a.push v) m n (a.push v)).sz.succ, from
repeatCorePushSz n m v (a.push v)
theorem szMkArrayEq {α : Type u} (n : Nat) (v : α) : (mkArray n v).sz = n :=
Nat.recOn n rfl $ λ n ih,
have aux₁ : (Nat.repeatCore (λ _ (a : Array α), a.push v) n n (Array.mkEmpty n)).sz = n, from ih,
have aux₂ : (Nat.repeatCore (λ _ (a : Array α), a.push v) n.succ n (Array.mkEmpty n)).sz = n, from
repeatCoreIndexIndep (λ (a : Array α), a.push v) n n n.succ (Array.mkEmpty n) ▸ aux₁,
have aux₃ : (Nat.repeatCore (λ _ (a : Array α), a.push v) n.succ n ((Array.mkEmpty n).push v)).sz =
(Nat.repeatCore (λ _ (a : Array α), a.push v) n.succ n (Array.mkEmpty n)).sz.succ, from
repeatCorePushSz _ _ _ _,
have aux₄ : (Nat.repeatCore (λ _ (a : Array α), a.push v) n.succ n (Array.mkEmpty n)).sz.succ = n.succ, from
congrArg _ aux₂,
have aux₄ : (Nat.repeatCore (λ _ (a : Array α), a.push v) n.succ n ((Array.mkEmpty n).push v)).sz = n.succ, from
Eq.trans aux₃ aux₄,
aux₄
@[inlineIfReduce] def List.toArrayAux {α : Type u} : List α → Array α → Array α
| [] r := r
| (a::as) r := List.toArrayAux as (r.push a)
@[inline] def List.toArray {α : Type u} (l : List α) : Array α :=
l.toArrayAux ∅
@[inline] def List.toArray {α : Type u} (as : List α) : Array α :=
as.toArrayAux (Array.mkEmpty as.length)

View file

@ -82,9 +82,10 @@ match m with
if size' <= buckets.val.sz
then ⟨size', buckets'⟩
else let nbuckets' := buckets.val.sz * 2 in
let nz' : nbuckets' > 0 := Nat.mulPos buckets.property (Nat.zeroLtBit0 Nat.oneNeZero) in
let aux₁ : nbuckets' > 0 := Nat.mulPos buckets.property (Nat.zeroLtBit0 Nat.oneNeZero) in
let aux₂ : (mkArray nbuckets' ([] : List (Σ a, β a))).sz = nbuckets' := szMkArrayEq _ _ in
⟨ size',
foldBuckets buckets' ⟨mkArray nbuckets' [], nz'⟩ (reinsertAux hash) ⟩
foldBuckets buckets' ⟨mkArray nbuckets' [], aux₂.symm ▸ aux₁⟩ (reinsertAux hash) ⟩
def erase [DecidableEq α] [Hashable α] (m : HashmapImp α β) (a : α) : HashmapImp α β :=
match m with

View file

@ -1367,12 +1367,16 @@ inline object * array_get_size(b_obj_arg a) {
return box(array_size(a));
}
object * mk_array(obj_arg n, obj_arg v);
inline object * mk_empty_array() {
return alloc_array(0, 0);
}
inline object * mk_empty_array(b_obj_arg capacity) {
if (!is_scalar(capacity)) throw std::bad_alloc(); // we will run out of memory
usize cap = unbox(capacity);
return alloc_array(0, cap);
}
inline object * array_idx(b_obj_arg a, usize i) {
object * r = array_get(a, i); inc(r);
return r;

View file

@ -1 +1 @@
add_library (stage0 OBJECT ./init/coe.cpp ./init/control/alternative.cpp ./init/control/applicative.cpp ./init/control/combinators.cpp ./init/control/default.cpp ./init/control/estate.cpp ./init/control/except.cpp ./init/control/functor.cpp ./init/control/id.cpp ./init/control/lift.cpp ./init/control/monad.cpp ./init/control/monadfail.cpp ./init/control/option.cpp ./init/control/reader.cpp ./init/control/state.cpp ./init/core.cpp ./init/data/array/basic.cpp ./init/data/array/default.cpp ./init/data/basic.cpp ./init/data/char/basic.cpp ./init/data/char/default.cpp ./init/data/default.cpp ./init/data/dlist.cpp ./init/data/fin/basic.cpp ./init/data/fin/default.cpp ./init/data/hashable.cpp ./init/data/hashmap/basic.cpp ./init/data/int/basic.cpp ./init/data/int/default.cpp ./init/data/list/basic.cpp ./init/data/list/default.cpp ./init/data/list/instances.cpp ./init/data/nat/basic.cpp ./init/data/nat/bitwise.cpp ./init/data/nat/default.cpp ./init/data/nat/div.cpp ./init/data/option/basic.cpp ./init/data/option/instances.cpp ./init/data/ordering/basic.cpp ./init/data/ordering/default.cpp ./init/data/rbmap/basic.cpp ./init/data/rbmap/default.cpp ./init/data/rbtree/basic.cpp ./init/data/rbtree/default.cpp ./init/data/repr.cpp ./init/data/string/basic.cpp ./init/data/string/default.cpp ./init/data/tostring.cpp ./init/data/uint.cpp ./init/default.cpp ./init/env_ext.cpp ./init/io.cpp ./init/lean/compiler/constfolding.cpp ./init/lean/compiler/default.cpp ./init/lean/compiler/ir.cpp ./init/lean/compiler/util.cpp ./init/lean/config.cpp ./init/lean/declaration.cpp ./init/lean/default.cpp ./init/lean/disjoint_set.cpp ./init/lean/elaborator.cpp ./init/lean/expander.cpp ./init/lean/expr.cpp ./init/lean/extern.cpp ./init/lean/format.cpp ./init/lean/frontend.cpp ./init/lean/kvmap.cpp ./init/lean/level.cpp ./init/lean/message.cpp ./init/lean/name.cpp ./init/lean/name_mangling.cpp ./init/lean/options.cpp ./init/lean/parser/basic.cpp ./init/lean/parser/combinators.cpp ./init/lean/parser/command.cpp ./init/lean/parser/declaration.cpp ./init/lean/parser/identifier.cpp ./init/lean/parser/level.cpp ./init/lean/parser/module.cpp ./init/lean/parser/notation.cpp ./init/lean/parser/parsec.cpp ./init/lean/parser/pratt.cpp ./init/lean/parser/rec.cpp ./init/lean/parser/stringliteral.cpp ./init/lean/parser/syntax.cpp ./init/lean/parser/term.cpp ./init/lean/parser/token.cpp ./init/lean/parser/trie.cpp ./init/lean/position.cpp ./init/lean/trace.cpp ./init/lean/util.cpp ./init/platform.cpp ./init/util.cpp ./init/wf.cpp)
add_library (stage0 OBJECT ./init/coe.cpp ./init/control/alternative.cpp ./init/control/applicative.cpp ./init/control/combinators.cpp ./init/control/default.cpp ./init/control/estate.cpp ./init/control/except.cpp ./init/control/functor.cpp ./init/control/id.cpp ./init/control/lift.cpp ./init/control/monad.cpp ./init/control/monadfail.cpp ./init/control/option.cpp ./init/control/reader.cpp ./init/control/state.cpp ./init/core.cpp ./init/data/array/basic.cpp ./init/data/array/default.cpp ./init/data/basic.cpp ./init/data/char/basic.cpp ./init/data/char/default.cpp ./init/data/default.cpp ./init/data/dlist.cpp ./init/data/fin/basic.cpp ./init/data/fin/default.cpp ./init/data/hashable.cpp ./init/data/hashmap/basic.cpp ./init/data/int/basic.cpp ./init/data/int/default.cpp ./init/data/list/basic.cpp ./init/data/list/default.cpp ./init/data/list/instances.cpp ./init/data/nat/basic.cpp ./init/data/nat/bitwise.cpp ./init/data/nat/default.cpp ./init/data/nat/div.cpp ./init/data/option/basic.cpp ./init/data/option/instances.cpp ./init/data/ordering/basic.cpp ./init/data/ordering/default.cpp ./init/data/rbmap/basic.cpp ./init/data/rbmap/default.cpp ./init/data/rbtree/basic.cpp ./init/data/rbtree/default.cpp ./init/data/repr.cpp ./init/data/string/basic.cpp ./init/data/string/default.cpp ./init/data/tostring.cpp ./init/data/uint.cpp ./init/default.cpp ./init/env_ext.cpp ./init/fix.cpp ./init/io.cpp ./init/lean/compiler/constfolding.cpp ./init/lean/compiler/default.cpp ./init/lean/compiler/ir.cpp ./init/lean/compiler/util.cpp ./init/lean/config.cpp ./init/lean/declaration.cpp ./init/lean/default.cpp ./init/lean/disjoint_set.cpp ./init/lean/elaborator.cpp ./init/lean/expander.cpp ./init/lean/expr.cpp ./init/lean/extern.cpp ./init/lean/format.cpp ./init/lean/frontend.cpp ./init/lean/kvmap.cpp ./init/lean/level.cpp ./init/lean/message.cpp ./init/lean/name.cpp ./init/lean/name_mangling.cpp ./init/lean/options.cpp ./init/lean/parser/basic.cpp ./init/lean/parser/combinators.cpp ./init/lean/parser/command.cpp ./init/lean/parser/declaration.cpp ./init/lean/parser/identifier.cpp ./init/lean/parser/level.cpp ./init/lean/parser/module.cpp ./init/lean/parser/notation.cpp ./init/lean/parser/parsec.cpp ./init/lean/parser/pratt.cpp ./init/lean/parser/rec.cpp ./init/lean/parser/stringliteral.cpp ./init/lean/parser/syntax.cpp ./init/lean/parser/term.cpp ./init/lean/parser/token.cpp ./init/lean/parser/trie.cpp ./init/lean/position.cpp ./init/lean/trace.cpp ./init/lean/util.cpp ./init/platform.cpp ./init/util.cpp ./init/wf.cpp)

View file

@ -14,9 +14,12 @@ typedef lean::uint32 uint32; typedef lean::uint64 uint64;
#pragma GCC diagnostic ignored "-Wunused-label"
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
#endif
obj* l_monadInhabited_x_27___rarg(obj*);
obj* l_monadInhabited___rarg(obj*, obj*);
obj* l_monadInhabited(obj*, obj*);
obj* l_monadInhabited_x_27___boxed(obj*, obj*);
obj* l_monadInhabited___boxed(obj*, obj*);
obj* l_monadInhabited_x_27(obj*, obj*);
obj* l_monadInhabited___rarg(obj* x_0, obj* x_1) {
_start:
{
@ -49,6 +52,38 @@ lean::dec(x_1);
return x_2;
}
}
obj* l_monadInhabited_x_27___rarg(obj* x_0) {
_start:
{
obj* x_1; obj* x_4; obj* x_7;
x_1 = lean::cnstr_get(x_0, 0);
lean::inc(x_1);
lean::dec(x_0);
x_4 = lean::cnstr_get(x_1, 1);
lean::inc(x_4);
lean::dec(x_1);
x_7 = lean::apply_1(x_4, lean::box(0));
return x_7;
}
}
obj* l_monadInhabited_x_27(obj* x_0, obj* x_1) {
_start:
{
obj* x_2;
x_2 = lean::alloc_closure(reinterpret_cast<void*>(l_monadInhabited_x_27___rarg), 1, 0);
return x_2;
}
}
obj* l_monadInhabited_x_27___boxed(obj* x_0, obj* x_1) {
_start:
{
obj* x_2;
x_2 = l_monadInhabited_x_27(x_0, x_1);
lean::dec(x_0);
lean::dec(x_1);
return x_2;
}
}
obj* initialize_init_control_applicative(obj*);
static bool _G_initialized = false;
obj* initialize_init_control_monad(obj* w) {

View file

@ -33,6 +33,7 @@ obj* l_Fun_Inhabited(obj*, obj*);
obj* l_inline___rarg(obj*);
obj* l_inferInstanceAs___rarg(obj*);
obj* l_Nat_Inhabited;
obj* l_strictAnd___boxed(obj*, obj*);
obj* l_id___boxed(obj*);
obj* l_Fun_Inhabited___rarg___boxed(obj*, obj*);
obj* l_Quot_rec___rarg___boxed(obj*, obj*, obj*);
@ -236,6 +237,7 @@ obj* l_Quot_rec___boxed(obj*, obj*, obj*);
obj* l_Prod_map___rarg(obj*, obj*, obj*);
obj* l_PSigma_sizeof___at_PSigma_HasSizeof___spec__1(obj*, obj*);
obj* l_Sum_HasSizeof___rarg(obj*, obj*);
obj* l_strictOr___boxed(obj*, obj*);
obj* l_std_prec_arrow;
obj* l_Quotient_DecidableEq___boxed(obj*);
obj* l_bit0___rarg(obj*, obj*);
@ -257,6 +259,7 @@ obj* l_inline___boxed(obj*);
namespace lean {
obj* nat_add(obj*, obj*);
}
uint8 l_strictOr(uint8, uint8);
obj* l_Subtype_sizeof___boxed(obj*);
obj* l_PSigma_sizeof___boxed(obj*, obj*);
uint8 l_not___main(uint8);
@ -471,6 +474,7 @@ uint8 l_or___main(uint8, uint8);
obj* l___private_init_core_21__funSetoid___boxed(obj*, obj*);
obj* l_Or_Decidable___boxed(obj*, obj*);
obj* l_Decidable_recOnFalse___boxed(obj*);
uint8 l_strictAnd(uint8, uint8);
obj* l_Eq_mp___rarg(obj*);
obj* l_Quotient_hrecOn___boxed(obj*, obj*, obj*);
obj* l_id___rarg(obj* x_0) {
@ -685,7 +689,7 @@ obj* l_Thunk_get___boxed(obj* x_0, obj* x_1) {
_start:
{
obj* x_2;
x_2 = lean::thunk_get(x_1);
x_2 = lean::thunk_get_own(x_1);
lean::dec(x_1);
return x_2;
}
@ -2483,6 +2487,58 @@ x_5 = lean::box(x_4);
return x_5;
}
}
uint8 l_strictOr(uint8 x_0, uint8 x_1) {
_start:
{
if (x_0 == 0)
{
return x_1;
}
else
{
uint8 x_2;
x_2 = 1;
return x_2;
}
}
}
obj* l_strictOr___boxed(obj* x_0, obj* x_1) {
_start:
{
uint8 x_2; uint8 x_3; uint8 x_4; obj* x_5;
x_2 = lean::unbox(x_0);
x_3 = lean::unbox(x_1);
x_4 = l_strictOr(x_2, x_3);
x_5 = lean::box(x_4);
return x_5;
}
}
uint8 l_strictAnd(uint8 x_0, uint8 x_1) {
_start:
{
if (x_0 == 0)
{
uint8 x_2;
x_2 = 0;
return x_2;
}
else
{
return x_1;
}
}
}
obj* l_strictAnd___boxed(obj* x_0, obj* x_1) {
_start:
{
uint8 x_2; uint8 x_3; uint8 x_4; obj* x_5;
x_2 = lean::unbox(x_0);
x_3 = lean::unbox(x_1);
x_4 = l_strictAnd(x_2, x_3);
x_5 = lean::box(x_4);
return x_5;
}
}
uint8 l_bne___rarg(obj* x_0, obj* x_1, obj* x_2) {
_start:
{

File diff suppressed because it is too large Load diff

View file

@ -30,18 +30,15 @@ obj* l_Hashmap_erase___rarg(obj*, obj*, obj*, obj*);
obj* l_DHashmap_insert(obj*, obj*);
obj* l_Hashmap_empty___boxed(obj*, obj*, obj*, obj*);
obj* l_HashmapImp_insert(obj*, obj*);
uint8 l_Option_isSome___main___rarg(obj*);
obj* l_HashmapImp_foldBuckets___boxed(obj*, obj*, obj*);
obj* l_HashmapImp_reinsertAux(obj*, obj*);
uint8 l_HashmapImp_containsAux___rarg(obj*, obj*, obj*);
obj* l_Array_iterateAux___main___at_HashmapImp_foldBuckets___spec__2(obj*, obj*, obj*);
obj* l_Hashmap_find___rarg(obj*, obj*, obj*, obj*);
obj* l_Hashmap_size___boxed(obj*, obj*, obj*, obj*);
obj* l_DHashmap_find___boxed(obj*, obj*);
uint8 l_Hashmap_contains___rarg(obj*, obj*, obj*, obj*);
obj* l_HashmapImp_find___rarg(obj*, obj*, obj*, obj*);
obj* l_HashmapImp_reinsertAux___rarg(obj*, obj*, obj*, obj*);
obj* l_Array_iterateAux___main___at_HashmapImp_foldBuckets___spec__2___boxed(obj*, obj*, obj*);
obj* l_Hashmap_size(obj*, obj*, obj*, obj*);
obj* l_HashmapImp_containsAux(obj*, obj*);
obj* l_mkHashmapImp(obj*, obj*);
@ -55,7 +52,6 @@ obj* l_bucketArray_updt___rarg(obj*, usize, obj*, obj*);
obj* l_HashmapImp_replaceAux___boxed(obj*, obj*);
obj* l_List_foldl___main___at_HashmapImp_foldBuckets___spec__1___boxed(obj*, obj*, obj*);
obj* l_HashmapImp_findAux___main___rarg(obj*, obj*, obj*);
obj* l_Array_iterateAux___main___at_HashmapImp_foldBuckets___spec__2___rarg___boxed(obj*, obj*, obj*, obj*, obj*);
obj* l_HashmapImp_fold___rarg(obj*, obj*, obj*);
obj* l_HashmapImp_erase___boxed(obj*, obj*);
obj* l_HashmapImp_containsAux___boxed(obj*, obj*);
@ -68,11 +64,13 @@ obj* l_DHashmap_erase(obj*, obj*);
obj* l_DHashmap_contains___boxed(obj*, obj*);
obj* l_Hashmap_insert___boxed(obj*, obj*);
obj* l_HashmapImp_findAux___main(obj*, obj*);
obj* l_Array_miterateAux___main___at_HashmapImp_foldBuckets___spec__2(obj*, obj*, obj*);
obj* l_HashmapImp_find___boxed(obj*, obj*);
obj* l_mkHashmapImp___rarg(obj*);
obj* l_Hashmap_size___rarg(obj*);
obj* l_HashmapImp_insert___boxed(obj*, obj*);
obj* l_HashmapImp_replaceAux___rarg(obj*, obj*, obj*, obj*);
obj* l_Array_miterateAux___main___at_HashmapImp_foldBuckets___spec__2___boxed(obj*, obj*, obj*);
obj* l_HashmapImp_findAux(obj*, obj*);
obj* l_HashmapImp_insert___rarg(obj*, obj*, obj*, obj*, obj*);
obj* l_DHashmap_size(obj*, obj*, obj*, obj*);
@ -104,6 +102,7 @@ obj* l_Hashmap_fold(obj*, obj*, obj*, obj*, obj*);
obj* l_Hashmap_contains(obj*, obj*);
obj* l_Hashmap_size___rarg___boxed(obj*);
obj* l_HashmapImp_findAux___boxed(obj*, obj*);
obj* l_Array_mkArray___rarg(obj*, obj*);
obj* l_bucketArray_updt___rarg___boxed(obj*, obj*, obj*, obj*);
obj* l_mkDHashmap(obj*, obj*, obj*, obj*);
obj* l_mkDHashmap___rarg(obj*);
@ -117,6 +116,7 @@ namespace lean {
usize usize_modn(usize, obj*);
}
obj* l_Hashmap_contains___boxed(obj*, obj*);
obj* l_Array_miterateAux___main___at_HashmapImp_foldBuckets___spec__2___rarg(obj*, obj*, obj*, obj*, obj*);
obj* l_HashmapImp_eraseAux(obj*, obj*);
obj* l_DHashmap_size___boxed(obj*, obj*, obj*, obj*);
obj* l_HashmapImp_eraseAux___boxed(obj*, obj*);
@ -128,7 +128,7 @@ uint8 nat_dec_le(obj*, obj*);
}
obj* l_DHashmap_find___rarg(obj*, obj*, obj*, obj*);
obj* l_mkHashmapImp___rarg___closed__1;
obj* l_Array_iterateAux___main___at_HashmapImp_foldBuckets___spec__2___rarg(obj*, obj*, obj*, obj*, obj*);
obj* l_Array_miterateAux___main___at_HashmapImp_foldBuckets___spec__2___rarg___boxed(obj*, obj*, obj*, obj*, obj*);
obj* l_List_foldl___main___at_HashmapImp_foldBuckets___spec__1___rarg(obj*, obj*, obj*);
obj* l_Hashmap_insert___rarg(obj*, obj*, obj*, obj*, obj*);
obj* l_HashmapImp_foldBuckets(obj*, obj*, obj*);
@ -191,7 +191,7 @@ _start:
obj* x_0; obj* x_1; obj* x_2; obj* x_3; obj* x_4;
x_0 = lean::box(0);
x_1 = lean::mk_nat_obj(8ul);
x_2 = lean::mk_array(x_1, x_0);
x_2 = l_Array_mkArray___rarg(x_1, x_0);
x_3 = lean::mk_nat_obj(0ul);
x_4 = lean::alloc_cnstr(0, 2, 0);
lean::cnstr_set(x_4, 0, x_3);
@ -209,7 +209,7 @@ if (x_2 == 0)
{
obj* x_3; obj* x_4; obj* x_5;
x_3 = lean::box(0);
x_4 = lean::mk_array(x_0, x_3);
x_4 = l_Array_mkArray___rarg(x_0, x_3);
x_5 = lean::alloc_cnstr(0, 2, 0);
lean::cnstr_set(x_5, 0, x_1);
lean::cnstr_set(x_5, 1, x_4);
@ -341,7 +341,7 @@ x_3 = lean::alloc_closure(reinterpret_cast<void*>(l_List_foldl___main___at_Hashm
return x_3;
}
}
obj* l_Array_iterateAux___main___at_HashmapImp_foldBuckets___spec__2___rarg(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) {
obj* l_Array_miterateAux___main___at_HashmapImp_foldBuckets___spec__2___rarg(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) {
_start:
{
obj* x_6; uint8 x_7;
@ -358,24 +358,24 @@ return x_4;
}
else
{
obj* x_12; obj* x_13; obj* x_14; obj* x_17;
x_12 = lean::mk_nat_obj(1ul);
x_13 = lean::nat_add(x_3, x_12);
x_14 = lean::array_index(x_2, x_3);
lean::dec(x_3);
obj* x_12; obj* x_14; obj* x_15; obj* x_16;
x_12 = lean::array_index(x_2, x_3);
lean::inc(x_1);
x_17 = l_List_foldl___main___at_HashmapImp_foldBuckets___spec__1___rarg(x_1, x_4, x_14);
x_3 = x_13;
x_4 = x_17;
x_14 = l_List_foldl___main___at_HashmapImp_foldBuckets___spec__1___rarg(x_1, x_4, x_12);
x_15 = lean::mk_nat_obj(1ul);
x_16 = lean::nat_add(x_3, x_15);
lean::dec(x_3);
x_3 = x_16;
x_4 = x_14;
goto _start;
}
}
}
obj* l_Array_iterateAux___main___at_HashmapImp_foldBuckets___spec__2(obj* x_0, obj* x_1, obj* x_2) {
obj* l_Array_miterateAux___main___at_HashmapImp_foldBuckets___spec__2(obj* x_0, obj* x_1, obj* x_2) {
_start:
{
obj* x_3;
x_3 = lean::alloc_closure(reinterpret_cast<void*>(l_Array_iterateAux___main___at_HashmapImp_foldBuckets___spec__2___rarg___boxed), 5, 0);
x_3 = lean::alloc_closure(reinterpret_cast<void*>(l_Array_miterateAux___main___at_HashmapImp_foldBuckets___spec__2___rarg___boxed), 5, 0);
return x_3;
}
}
@ -385,7 +385,7 @@ _start:
obj* x_3; obj* x_5;
x_3 = lean::mk_nat_obj(0ul);
lean::inc(x_0);
x_5 = l_Array_iterateAux___main___at_HashmapImp_foldBuckets___spec__2___rarg(x_0, x_2, x_0, x_3, x_1);
x_5 = l_Array_miterateAux___main___at_HashmapImp_foldBuckets___spec__2___rarg(x_0, x_2, x_0, x_3, x_1);
lean::dec(x_0);
return x_5;
}
@ -409,20 +409,20 @@ lean::dec(x_2);
return x_3;
}
}
obj* l_Array_iterateAux___main___at_HashmapImp_foldBuckets___spec__2___rarg___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) {
obj* l_Array_miterateAux___main___at_HashmapImp_foldBuckets___spec__2___rarg___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) {
_start:
{
obj* x_5;
x_5 = l_Array_iterateAux___main___at_HashmapImp_foldBuckets___spec__2___rarg(x_0, x_1, x_2, x_3, x_4);
x_5 = l_Array_miterateAux___main___at_HashmapImp_foldBuckets___spec__2___rarg(x_0, x_1, x_2, x_3, x_4);
lean::dec(x_0);
return x_5;
}
}
obj* l_Array_iterateAux___main___at_HashmapImp_foldBuckets___spec__2___boxed(obj* x_0, obj* x_1, obj* x_2) {
obj* l_Array_miterateAux___main___at_HashmapImp_foldBuckets___spec__2___boxed(obj* x_0, obj* x_1, obj* x_2) {
_start:
{
obj* x_3;
x_3 = l_Array_iterateAux___main___at_HashmapImp_foldBuckets___spec__2(x_0, x_1, x_2);
x_3 = l_Array_miterateAux___main___at_HashmapImp_foldBuckets___spec__2(x_0, x_1, x_2);
lean::dec(x_0);
lean::dec(x_1);
lean::dec(x_2);
@ -534,12 +534,22 @@ return x_2;
uint8 l_HashmapImp_containsAux___rarg(obj* x_0, obj* x_1, obj* x_2) {
_start:
{
obj* x_3; uint8 x_4;
obj* x_3;
x_3 = l_HashmapImp_findAux___main___rarg(x_0, x_1, x_2);
x_4 = l_Option_isSome___main___rarg(x_3);
lean::dec(x_3);
if (lean::obj_tag(x_3) == 0)
{
uint8 x_4;
x_4 = 0;
return x_4;
}
else
{
uint8 x_6;
lean::dec(x_3);
x_6 = 1;
return x_6;
}
}
}
obj* l_HashmapImp_containsAux(obj* x_0, obj* x_1) {
_start:
@ -615,7 +625,7 @@ lean::inc(x_3);
lean::dec(x_0);
x_6 = lean::mk_nat_obj(0ul);
lean::inc(x_3);
x_8 = l_Array_iterateAux___main___at_HashmapImp_foldBuckets___spec__2___rarg(x_3, x_2, x_3, x_6, x_1);
x_8 = l_Array_miterateAux___main___at_HashmapImp_foldBuckets___spec__2___rarg(x_3, x_2, x_3, x_6, x_1);
lean::dec(x_3);
return x_8;
}
@ -908,12 +918,12 @@ x_32 = lean::mk_nat_obj(2ul);
x_33 = lean::nat_mul(x_11, x_32);
lean::dec(x_11);
x_35 = lean::box(0);
x_36 = lean::mk_array(x_33, x_35);
x_36 = l_Array_mkArray___rarg(x_33, x_35);
x_37 = lean::alloc_closure(reinterpret_cast<void*>(l_HashmapImp_reinsertAux___rarg), 4, 1);
lean::closure_set(x_37, 0, x_1);
x_38 = lean::mk_nat_obj(0ul);
lean::inc(x_28);
x_40 = l_Array_iterateAux___main___at_HashmapImp_foldBuckets___spec__2___rarg(x_28, x_37, x_28, x_38, x_36);
x_40 = l_Array_miterateAux___main___at_HashmapImp_foldBuckets___spec__2___rarg(x_28, x_37, x_28, x_38, x_36);
lean::dec(x_28);
if (lean::is_scalar(x_9)) {
x_42 = lean::alloc_cnstr(0, 2, 0);
@ -1162,12 +1172,22 @@ return x_2;
uint8 l_DHashmap_contains___rarg(obj* x_0, obj* x_1, obj* x_2, obj* x_3) {
_start:
{
obj* x_4; uint8 x_5;
obj* x_4;
x_4 = l_HashmapImp_find___rarg(x_0, x_1, x_2, x_3);
x_5 = l_Option_isSome___main___rarg(x_4);
lean::dec(x_4);
if (lean::obj_tag(x_4) == 0)
{
uint8 x_5;
x_5 = 0;
return x_5;
}
else
{
uint8 x_7;
lean::dec(x_4);
x_7 = 1;
return x_7;
}
}
}
obj* l_DHashmap_contains(obj* x_0, obj* x_1) {
_start:
@ -1413,12 +1433,22 @@ return x_2;
uint8 l_Hashmap_contains___rarg(obj* x_0, obj* x_1, obj* x_2, obj* x_3) {
_start:
{
obj* x_4; uint8 x_5;
obj* x_4;
x_4 = l_HashmapImp_find___rarg(x_0, x_1, x_2, x_3);
x_5 = l_Option_isSome___main___rarg(x_4);
lean::dec(x_4);
if (lean::obj_tag(x_4) == 0)
{
uint8 x_5;
x_5 = 0;
return x_5;
}
else
{
uint8 x_7;
lean::dec(x_4);
x_7 = 1;
return x_7;
}
}
}
obj* l_Hashmap_contains(obj* x_0, obj* x_1) {
_start:

View file

@ -66,8 +66,8 @@ obj* l_Option_toMonad___main(obj*);
obj* l_Option_HasLess(obj*, obj*);
obj* l_Option_orelse___main___rarg(obj*, obj*);
obj* l_Option_isSome___main___boxed(obj*);
obj* l_Option_Alternative___lambda__1___boxed(obj*);
obj* l_Option_Alternative___lambda__1(obj*);
obj* l_Option_Alternative___lambda__1___boxed(obj*, obj*, obj*);
obj* l_Option_Alternative___lambda__1(obj*, obj*, obj*);
uint8 l_Option_DecidableEq___rarg(obj*, obj*, obj*);
obj* l_Option_Inhabited___boxed(obj*);
obj* l_Option_Inhabited(obj*);
@ -78,6 +78,7 @@ obj* l_Option_toBool___rarg___boxed(obj*);
obj* l_Option_get(obj*);
obj* l_Option_getOrElse___boxed(obj*);
obj* l_Option_bind___main___rarg(obj*, obj*);
obj* l_Option_Alternative___lambda__2(obj*);
obj* l_Option_isSome___rarg___boxed(obj*);
obj* l_Option_orelse(obj*);
obj* l_Option_getOrElse___main(obj*);
@ -95,6 +96,7 @@ obj* l_Option_isNone___main___boxed(obj*);
obj* l_Option_isSome(obj*);
obj* l_Option_decidableRelLt___main___boxed(obj*, obj*);
obj* l_Option_Monad___lambda__3(obj*, obj*, obj*, obj*);
obj* l_Option_Alternative___lambda__2___boxed(obj*);
obj* l_Option_getOrElse___main___boxed(obj*);
obj* l_Option_decidableRelLt___main(obj*, obj*);
obj* l_Option_toMonad(obj*, obj*);
@ -244,9 +246,18 @@ return x_1;
obj* l_Option_getOrElse___rarg(obj* x_0, obj* x_1) {
_start:
{
obj* x_2;
x_2 = l_Option_getOrElse___main___rarg(x_0, x_1);
return x_2;
if (lean::obj_tag(x_0) == 0)
{
lean::inc(x_1);
return x_1;
}
else
{
obj* x_3;
x_3 = lean::cnstr_get(x_0, 0);
lean::inc(x_3);
return x_3;
}
}
}
obj* l_Option_getOrElse(obj* x_0) {
@ -323,9 +334,18 @@ return x_1;
obj* l_Option_get___rarg(obj* x_0, obj* x_1) {
_start:
{
obj* x_2;
x_2 = l_Option_get___main___rarg(x_0, x_1);
return x_2;
if (lean::obj_tag(x_1) == 0)
{
lean::inc(x_0);
return x_0;
}
else
{
obj* x_3;
x_3 = lean::cnstr_get(x_1, 0);
lean::inc(x_3);
return x_3;
}
}
}
obj* l_Option_get(obj* x_0) {
@ -402,10 +422,19 @@ return x_1;
uint8 l_Option_toBool___rarg(obj* x_0) {
_start:
{
if (lean::obj_tag(x_0) == 0)
{
uint8 x_1;
x_1 = l_Option_toBool___main___rarg(x_0);
x_1 = 0;
return x_1;
}
else
{
uint8 x_2;
x_2 = 1;
return x_2;
}
}
}
obj* l_Option_toBool(obj* x_0) {
_start:
@ -481,10 +510,19 @@ return x_1;
uint8 l_Option_isSome___rarg(obj* x_0) {
_start:
{
if (lean::obj_tag(x_0) == 0)
{
uint8 x_1;
x_1 = l_Option_isSome___main___rarg(x_0);
x_1 = 0;
return x_1;
}
else
{
uint8 x_2;
x_2 = 1;
return x_2;
}
}
}
obj* l_Option_isSome(obj* x_0) {
_start:
@ -560,10 +598,19 @@ return x_1;
uint8 l_Option_isNone___rarg(obj* x_0) {
_start:
{
if (lean::obj_tag(x_0) == 0)
{
uint8 x_1;
x_1 = l_Option_isNone___main___rarg(x_0);
x_1 = 1;
return x_1;
}
else
{
uint8 x_2;
x_2 = 0;
return x_2;
}
}
}
obj* l_Option_isNone(obj* x_0) {
_start:
@ -985,9 +1032,16 @@ return x_1;
obj* l_Option_orelse___rarg(obj* x_0, obj* x_1) {
_start:
{
obj* x_2;
x_2 = l_Option_orelse___main___rarg(x_0, x_1);
return x_2;
if (lean::obj_tag(x_0) == 0)
{
lean::inc(x_1);
return x_1;
}
else
{
lean::inc(x_0);
return x_0;
}
}
}
obj* l_Option_orelse(obj* x_0) {
@ -1017,7 +1071,22 @@ lean::dec(x_0);
return x_1;
}
}
obj* l_Option_Alternative___lambda__1(obj* x_0) {
obj* l_Option_Alternative___lambda__1(obj* x_0, obj* x_1, obj* x_2) {
_start:
{
if (lean::obj_tag(x_1) == 0)
{
lean::inc(x_2);
return x_2;
}
else
{
lean::inc(x_1);
return x_1;
}
}
}
obj* l_Option_Alternative___lambda__2(obj* x_0) {
_start:
{
obj* x_1;
@ -1044,8 +1113,8 @@ lean::cnstr_set(x_7, 1, x_3);
lean::cnstr_set(x_7, 2, x_4);
lean::cnstr_set(x_7, 3, x_5);
lean::cnstr_set(x_7, 4, x_6);
x_8 = lean::alloc_closure(reinterpret_cast<void*>(l_Option_orelse___boxed), 1, 0);
x_9 = lean::alloc_closure(reinterpret_cast<void*>(l_Option_Alternative___lambda__1___boxed), 1, 0);
x_8 = lean::alloc_closure(reinterpret_cast<void*>(l_Option_Alternative___lambda__1___boxed), 3, 0);
x_9 = lean::alloc_closure(reinterpret_cast<void*>(l_Option_Alternative___lambda__2___boxed), 1, 0);
x_10 = lean::alloc_cnstr(0, 3, 0);
lean::cnstr_set(x_10, 0, x_7);
lean::cnstr_set(x_10, 1, x_8);
@ -1053,11 +1122,22 @@ lean::cnstr_set(x_10, 2, x_9);
return x_10;
}
}
obj* l_Option_Alternative___lambda__1___boxed(obj* x_0) {
obj* l_Option_Alternative___lambda__1___boxed(obj* x_0, obj* x_1, obj* x_2) {
_start:
{
obj* x_3;
x_3 = l_Option_Alternative___lambda__1(x_0, x_1, x_2);
lean::dec(x_0);
lean::dec(x_1);
lean::dec(x_2);
return x_3;
}
}
obj* l_Option_Alternative___lambda__2___boxed(obj* x_0) {
_start:
{
obj* x_1;
x_1 = l_Option_Alternative___lambda__1(x_0);
x_1 = l_Option_Alternative___lambda__2(x_0);
lean::dec(x_0);
return x_1;
}

View file

@ -47,7 +47,6 @@ obj* l_RBMap_any___main(obj*, obj*, obj*);
obj* l_RBMap_contains___boxed(obj*, obj*, obj*);
obj* l_RBMap_any___main___rarg___boxed(obj*, obj*);
obj* l_RBNode_setBlack(obj*, obj*);
uint8 l_Option_isSome___main___rarg(obj*);
obj* l_RBNode_isRed___boxed(obj*, obj*);
obj* l_RBNode_ins___main(obj*, obj*, obj*);
obj* l_RBNode_balance2___main___boxed(obj*, obj*);
@ -6498,12 +6497,22 @@ return x_3;
uint8 l_RBMap_contains___rarg(obj* x_0, obj* x_1, obj* x_2) {
_start:
{
obj* x_3; uint8 x_4;
obj* x_3;
x_3 = l_RBNode_find___main___at_RBMap_contains___spec__2___rarg(x_0, lean::box(0), x_1, x_2);
x_4 = l_Option_isSome___main___rarg(x_3);
lean::dec(x_3);
if (lean::obj_tag(x_3) == 0)
{
uint8 x_4;
x_4 = 0;
return x_4;
}
else
{
uint8 x_6;
lean::dec(x_3);
x_6 = 1;
return x_6;
}
}
}
obj* l_RBMap_contains(obj* x_0, obj* x_1, obj* x_2) {
_start:

View file

@ -41,7 +41,6 @@ obj* l_rbtreeOf___boxed(obj*);
obj* l_rbtreeOf(obj*);
obj* l_RBTree_insert___at_rbtreeOf___spec__2___boxed(obj*, obj*);
obj* l_RBNode_findCore___main___at_RBTree_seteq___spec__4___rarg(obj*, obj*, obj*);
uint8 l_Option_isSome___main___rarg(obj*);
obj* l_RBNode_ins___main___at_RBTree_ofList___main___spec__3___boxed(obj*, obj*);
obj* l_RBNode_all___main___at_RBTree_seteq___spec__5___rarg___boxed(obj*, obj*, obj*);
obj* l_RBTree_max___boxed(obj*, obj*);
@ -144,7 +143,6 @@ obj* l_RBNode_all___main___at_RBTree_seteq___spec__10___rarg___boxed(obj*, obj*,
obj* l_RBTree_revFold___boxed(obj*, obj*, obj*);
obj* l_RBTree_find___at_RBTree_seteq___spec__7___boxed(obj*, obj*);
obj* l_RBNode_all___main___at_RBTree_seteq___spec__10___boxed(obj*, obj*);
uint8 l_Option_toBool___main___rarg(obj*);
obj* l_RBTree_isEmpty(obj*, obj*);
obj* l_List_foldl___main___at_rbtreeOf___spec__7(obj*, obj*);
obj* l_RBTree_mfold___boxed(obj*, obj*, obj*, obj*);
@ -2562,12 +2560,22 @@ return x_2;
uint8 l_RBTree_contains___rarg(obj* x_0, obj* x_1, obj* x_2) {
_start:
{
obj* x_3; uint8 x_4;
obj* x_3;
x_3 = l_RBTree_find___at_RBTree_contains___spec__1___rarg(x_0, x_1, x_2);
x_4 = l_Option_isSome___main___rarg(x_3);
lean::dec(x_3);
if (lean::obj_tag(x_3) == 0)
{
uint8 x_4;
x_4 = 0;
return x_4;
}
else
{
uint8 x_6;
lean::dec(x_3);
x_6 = 1;
return x_6;
}
}
}
obj* l_RBTree_contains(obj* x_0, obj* x_1) {
_start:
@ -3712,7 +3720,7 @@ return x_5;
}
else
{
obj* x_6; obj* x_8; obj* x_10; obj* x_15; uint8 x_16;
obj* x_6; obj* x_8; obj* x_10; obj* x_15;
x_6 = lean::cnstr_get(x_2, 0);
lean::inc(x_6);
x_8 = lean::cnstr_get(x_2, 1);
@ -3723,32 +3731,31 @@ lean::dec(x_2);
lean::inc(x_1);
lean::inc(x_0);
x_15 = l_RBTree_find___at_RBTree_subset___spec__1___rarg(x_0, x_1, x_8);
x_16 = l_Option_toBool___main___rarg(x_15);
lean::dec(x_15);
if (x_16 == 0)
if (lean::obj_tag(x_15) == 0)
{
uint8 x_22;
uint8 x_20;
lean::dec(x_10);
lean::dec(x_1);
lean::dec(x_0);
lean::dec(x_6);
x_22 = 0;
return x_22;
x_20 = 0;
return x_20;
}
else
{
uint8 x_25;
uint8 x_24;
lean::dec(x_15);
lean::inc(x_1);
lean::inc(x_0);
x_25 = l_RBNode_all___main___at_RBTree_subset___spec__4___rarg(x_0, x_1, x_6);
if (x_25 == 0)
x_24 = l_RBNode_all___main___at_RBTree_subset___spec__4___rarg(x_0, x_1, x_6);
if (x_24 == 0)
{
uint8 x_29;
uint8 x_28;
lean::dec(x_10);
lean::dec(x_1);
lean::dec(x_0);
x_29 = 0;
return x_29;
x_28 = 0;
return x_28;
}
else
{
@ -4000,7 +4007,7 @@ return x_5;
}
else
{
obj* x_6; obj* x_8; obj* x_10; obj* x_15; uint8 x_16;
obj* x_6; obj* x_8; obj* x_10; obj* x_15;
x_6 = lean::cnstr_get(x_2, 0);
lean::inc(x_6);
x_8 = lean::cnstr_get(x_2, 1);
@ -4011,32 +4018,31 @@ lean::dec(x_2);
lean::inc(x_1);
lean::inc(x_0);
x_15 = l_RBTree_find___at_RBTree_seteq___spec__2___rarg(x_0, x_1, x_8);
x_16 = l_Option_toBool___main___rarg(x_15);
lean::dec(x_15);
if (x_16 == 0)
if (lean::obj_tag(x_15) == 0)
{
uint8 x_22;
uint8 x_20;
lean::dec(x_10);
lean::dec(x_1);
lean::dec(x_0);
lean::dec(x_6);
x_22 = 0;
return x_22;
x_20 = 0;
return x_20;
}
else
{
uint8 x_25;
uint8 x_24;
lean::dec(x_15);
lean::inc(x_1);
lean::inc(x_0);
x_25 = l_RBNode_all___main___at_RBTree_seteq___spec__5___rarg(x_0, x_1, x_6);
if (x_25 == 0)
x_24 = l_RBNode_all___main___at_RBTree_seteq___spec__5___rarg(x_0, x_1, x_6);
if (x_24 == 0)
{
uint8 x_29;
uint8 x_28;
lean::dec(x_10);
lean::dec(x_1);
lean::dec(x_0);
x_29 = 0;
return x_29;
x_28 = 0;
return x_28;
}
else
{
@ -4220,7 +4226,7 @@ return x_5;
}
else
{
obj* x_6; obj* x_8; obj* x_10; obj* x_15; uint8 x_16;
obj* x_6; obj* x_8; obj* x_10; obj* x_15;
x_6 = lean::cnstr_get(x_2, 0);
lean::inc(x_6);
x_8 = lean::cnstr_get(x_2, 1);
@ -4231,32 +4237,31 @@ lean::dec(x_2);
lean::inc(x_1);
lean::inc(x_0);
x_15 = l_RBTree_find___at_RBTree_seteq___spec__7___rarg(x_0, x_1, x_8);
x_16 = l_Option_toBool___main___rarg(x_15);
lean::dec(x_15);
if (x_16 == 0)
if (lean::obj_tag(x_15) == 0)
{
uint8 x_22;
uint8 x_20;
lean::dec(x_10);
lean::dec(x_1);
lean::dec(x_0);
lean::dec(x_6);
x_22 = 0;
return x_22;
x_20 = 0;
return x_20;
}
else
{
uint8 x_25;
uint8 x_24;
lean::dec(x_15);
lean::inc(x_1);
lean::inc(x_0);
x_25 = l_RBNode_all___main___at_RBTree_seteq___spec__10___rarg(x_0, x_1, x_6);
if (x_25 == 0)
x_24 = l_RBNode_all___main___at_RBTree_seteq___spec__10___rarg(x_0, x_1, x_6);
if (x_24 == 0)
{
uint8 x_29;
uint8 x_28;
lean::dec(x_10);
lean::dec(x_1);
lean::dec(x_0);
x_29 = 0;
return x_29;
x_28 = 0;
return x_28;
}
else
{

View file

@ -1,6 +1,6 @@
// Lean compiler output
// Module: init.default
// Imports: init.core init.control.default init.data.basic init.coe init.wf init.data.default init.io init.util
// Imports: init.core init.control.default init.data.basic init.coe init.wf init.data.default init.io init.util init.fix
#include "runtime/object.h"
#include "runtime/apply.h"
typedef lean::object obj; typedef lean::usize usize;
@ -22,6 +22,7 @@ obj* initialize_init_wf(obj*);
obj* initialize_init_data_default(obj*);
obj* initialize_init_io(obj*);
obj* initialize_init_util(obj*);
obj* initialize_init_fix(obj*);
static bool _G_initialized = false;
obj* initialize_init_default(obj* w) {
if (_G_initialized) return w;
@ -42,5 +43,7 @@ if (io_result_is_error(w)) return w;
w = initialize_init_io(w);
if (io_result_is_error(w)) return w;
w = initialize_init_util(w);
if (io_result_is_error(w)) return w;
w = initialize_init_fix(w);
return w;
}

File diff suppressed because it is too large Load diff

View file

@ -142,7 +142,6 @@ extern obj* l_Lean_Parser_command_variable_HasView;
obj* l_Lean_Expander_coeNameIdent(obj*);
obj* l_List_map___main___at_Lean_Expander_coeMixedBindersBindersExt___spec__2(obj*);
obj* l_ReaderT_Monad___rarg(obj*);
obj* l_Lean_Expander_error___rarg___lambda__1___closed__1;
obj* l_RBNode_ins___main___at_Lean_Expander_builtinTransformers___spec__5(obj*, obj*, obj*, obj*);
obj* l_Lean_Expander_error___rarg(obj*, obj*, obj*, obj*, obj*, obj*, obj*);
obj* l_List_foldr___main___at_Lean_Expander_expandBinders___spec__7(obj*, obj*, obj*, obj*);
@ -167,7 +166,6 @@ obj* l_Lean_Expander_error___at_Lean_Expander_mkNotationTransformer___spec__1___
extern obj* l_Lean_Parser_command_universes;
obj* l_Lean_Expander_error(obj*, obj*);
obj* l_Lean_Parser_Syntax_mkNode(obj*, obj*);
obj* l_Option_getOrElse___main___rarg(obj*, obj*);
obj* l_Lean_Expander_getOptType___boxed(obj*);
obj* l_List_map___main___at_Lean_Expander_expandBracketedBinder___main___spec__7(obj*, obj*);
obj* l_List_map___main___at_Lean_Expander_expandBracketedBinder___main___spec__21___boxed(obj*, obj*, obj*);
@ -516,16 +514,6 @@ lean::dec(x_0);
return x_1;
}
}
obj* _init_l_Lean_Expander_error___rarg___lambda__1___closed__1() {
_start:
{
obj* x_0; obj* x_1; obj* x_2;
x_0 = lean::box(0);
x_1 = lean::mk_nat_obj(0ul);
x_2 = l_Option_getOrElse___main___rarg(x_0, x_1);
return x_2;
}
}
obj* l_Lean_Expander_error___rarg___lambda__1(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) {
_start:
{
@ -543,7 +531,7 @@ x_14 = lean::box(0);
if (lean::obj_tag(x_2) == 0)
{
obj* x_15; obj* x_16; uint8 x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21;
x_15 = l_Lean_Expander_error___rarg___lambda__1___closed__1;
x_15 = lean::mk_nat_obj(0ul);
x_16 = l_Lean_FileMap_toPosition(x_11, x_15);
x_17 = 2;
x_18 = l_String_splitAux___main___closed__1;
@ -560,25 +548,47 @@ return x_21;
}
else
{
obj* x_22; obj* x_23; obj* x_24; obj* x_25; obj* x_27; uint8 x_28; obj* x_29; obj* x_30; obj* x_31; obj* x_32;
obj* x_22; obj* x_23;
x_22 = lean::cnstr_get(x_2, 0);
x_23 = l_Lean_Parser_Syntax_getPos(x_22);
if (lean::obj_tag(x_23) == 0)
{
obj* x_24; obj* x_25; uint8 x_26; obj* x_27; obj* x_28; obj* x_29; obj* x_30;
x_24 = lean::mk_nat_obj(0ul);
x_25 = l_Option_getOrElse___main___rarg(x_23, x_24);
x_25 = l_Lean_FileMap_toPosition(x_11, x_24);
x_26 = 2;
x_27 = l_String_splitAux___main___closed__1;
x_28 = lean::alloc_cnstr(0, 5, 1);
lean::cnstr_set(x_28, 0, x_9);
lean::cnstr_set(x_28, 1, x_25);
lean::cnstr_set(x_28, 2, x_14);
lean::cnstr_set(x_28, 3, x_27);
lean::cnstr_set(x_28, 4, x_3);
lean::cnstr_set_scalar(x_28, sizeof(void*)*5, x_26);
x_29 = x_28;
x_30 = lean::apply_2(x_5, lean::box(0), x_29);
return x_30;
}
else
{
obj* x_31; obj* x_34; uint8 x_35; obj* x_36; obj* x_37; obj* x_38; obj* x_39;
x_31 = lean::cnstr_get(x_23, 0);
lean::inc(x_31);
lean::dec(x_23);
x_27 = l_Lean_FileMap_toPosition(x_11, x_25);
x_28 = 2;
x_29 = l_String_splitAux___main___closed__1;
x_30 = lean::alloc_cnstr(0, 5, 1);
lean::cnstr_set(x_30, 0, x_9);
lean::cnstr_set(x_30, 1, x_27);
lean::cnstr_set(x_30, 2, x_14);
lean::cnstr_set(x_30, 3, x_29);
lean::cnstr_set(x_30, 4, x_3);
lean::cnstr_set_scalar(x_30, sizeof(void*)*5, x_28);
x_31 = x_30;
x_32 = lean::apply_2(x_5, lean::box(0), x_31);
return x_32;
x_34 = l_Lean_FileMap_toPosition(x_11, x_31);
x_35 = 2;
x_36 = l_String_splitAux___main___closed__1;
x_37 = lean::alloc_cnstr(0, 5, 1);
lean::cnstr_set(x_37, 0, x_9);
lean::cnstr_set(x_37, 1, x_34);
lean::cnstr_set(x_37, 2, x_14);
lean::cnstr_set(x_37, 3, x_36);
lean::cnstr_set(x_37, 4, x_3);
lean::cnstr_set_scalar(x_37, sizeof(void*)*5, x_35);
x_38 = x_37;
x_39 = lean::apply_2(x_5, lean::box(0), x_38);
return x_39;
}
}
}
}
@ -1027,7 +1037,7 @@ x_9 = lean::box(0);
if (lean::obj_tag(x_0) == 0)
{
obj* x_10; obj* x_11; uint8 x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16;
x_10 = l_Lean_Expander_error___rarg___lambda__1___closed__1;
x_10 = lean::mk_nat_obj(0ul);
x_11 = l_Lean_FileMap_toPosition(x_6, x_10);
x_12 = 2;
x_13 = l_String_splitAux___main___closed__1;
@ -1045,26 +1055,49 @@ return x_16;
}
else
{
obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_22; uint8 x_23; obj* x_24; obj* x_25; obj* x_26; obj* x_27;
obj* x_17; obj* x_18;
x_17 = lean::cnstr_get(x_0, 0);
x_18 = l_Lean_Parser_Syntax_getPos(x_17);
if (lean::obj_tag(x_18) == 0)
{
obj* x_19; obj* x_20; uint8 x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25;
x_19 = lean::mk_nat_obj(0ul);
x_20 = l_Option_getOrElse___main___rarg(x_18, x_19);
x_20 = l_Lean_FileMap_toPosition(x_6, x_19);
x_21 = 2;
x_22 = l_String_splitAux___main___closed__1;
x_23 = lean::alloc_cnstr(0, 5, 1);
lean::cnstr_set(x_23, 0, x_4);
lean::cnstr_set(x_23, 1, x_20);
lean::cnstr_set(x_23, 2, x_9);
lean::cnstr_set(x_23, 3, x_22);
lean::cnstr_set(x_23, 4, x_1);
lean::cnstr_set_scalar(x_23, sizeof(void*)*5, x_21);
x_24 = x_23;
x_25 = lean::alloc_cnstr(0, 1, 0);
lean::cnstr_set(x_25, 0, x_24);
return x_25;
}
else
{
obj* x_26; obj* x_29; uint8 x_30; obj* x_31; obj* x_32; obj* x_33; obj* x_34;
x_26 = lean::cnstr_get(x_18, 0);
lean::inc(x_26);
lean::dec(x_18);
x_22 = l_Lean_FileMap_toPosition(x_6, x_20);
x_23 = 2;
x_24 = l_String_splitAux___main___closed__1;
x_25 = lean::alloc_cnstr(0, 5, 1);
lean::cnstr_set(x_25, 0, x_4);
lean::cnstr_set(x_25, 1, x_22);
lean::cnstr_set(x_25, 2, x_9);
lean::cnstr_set(x_25, 3, x_24);
lean::cnstr_set(x_25, 4, x_1);
lean::cnstr_set_scalar(x_25, sizeof(void*)*5, x_23);
x_26 = x_25;
x_27 = lean::alloc_cnstr(0, 1, 0);
lean::cnstr_set(x_27, 0, x_26);
return x_27;
x_29 = l_Lean_FileMap_toPosition(x_6, x_26);
x_30 = 2;
x_31 = l_String_splitAux___main___closed__1;
x_32 = lean::alloc_cnstr(0, 5, 1);
lean::cnstr_set(x_32, 0, x_4);
lean::cnstr_set(x_32, 1, x_29);
lean::cnstr_set(x_32, 2, x_9);
lean::cnstr_set(x_32, 3, x_31);
lean::cnstr_set(x_32, 4, x_1);
lean::cnstr_set_scalar(x_32, sizeof(void*)*5, x_30);
x_33 = x_32;
x_34 = lean::alloc_cnstr(0, 1, 0);
lean::cnstr_set(x_34, 0, x_33);
return x_34;
}
}
}
}
@ -1165,7 +1198,7 @@ x_8 = lean::box(0);
if (lean::obj_tag(x_0) == 0)
{
obj* x_9; obj* x_10; uint8 x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15;
x_9 = l_Lean_Expander_error___rarg___lambda__1___closed__1;
x_9 = lean::mk_nat_obj(0ul);
x_10 = l_Lean_FileMap_toPosition(x_5, x_9);
x_11 = 2;
x_12 = l_String_splitAux___main___closed__1;
@ -1183,26 +1216,49 @@ return x_15;
}
else
{
obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_21; uint8 x_22; obj* x_23; obj* x_24; obj* x_25; obj* x_26;
obj* x_16; obj* x_17;
x_16 = lean::cnstr_get(x_0, 0);
x_17 = l_Lean_Parser_Syntax_getPos(x_16);
if (lean::obj_tag(x_17) == 0)
{
obj* x_18; obj* x_19; uint8 x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24;
x_18 = lean::mk_nat_obj(0ul);
x_19 = l_Option_getOrElse___main___rarg(x_17, x_18);
x_19 = l_Lean_FileMap_toPosition(x_5, x_18);
x_20 = 2;
x_21 = l_String_splitAux___main___closed__1;
x_22 = lean::alloc_cnstr(0, 5, 1);
lean::cnstr_set(x_22, 0, x_3);
lean::cnstr_set(x_22, 1, x_19);
lean::cnstr_set(x_22, 2, x_8);
lean::cnstr_set(x_22, 3, x_21);
lean::cnstr_set(x_22, 4, x_1);
lean::cnstr_set_scalar(x_22, sizeof(void*)*5, x_20);
x_23 = x_22;
x_24 = lean::alloc_cnstr(0, 1, 0);
lean::cnstr_set(x_24, 0, x_23);
return x_24;
}
else
{
obj* x_25; obj* x_28; uint8 x_29; obj* x_30; obj* x_31; obj* x_32; obj* x_33;
x_25 = lean::cnstr_get(x_17, 0);
lean::inc(x_25);
lean::dec(x_17);
x_21 = l_Lean_FileMap_toPosition(x_5, x_19);
x_22 = 2;
x_23 = l_String_splitAux___main___closed__1;
x_24 = lean::alloc_cnstr(0, 5, 1);
lean::cnstr_set(x_24, 0, x_3);
lean::cnstr_set(x_24, 1, x_21);
lean::cnstr_set(x_24, 2, x_8);
lean::cnstr_set(x_24, 3, x_23);
lean::cnstr_set(x_24, 4, x_1);
lean::cnstr_set_scalar(x_24, sizeof(void*)*5, x_22);
x_25 = x_24;
x_26 = lean::alloc_cnstr(0, 1, 0);
lean::cnstr_set(x_26, 0, x_25);
return x_26;
x_28 = l_Lean_FileMap_toPosition(x_5, x_25);
x_29 = 2;
x_30 = l_String_splitAux___main___closed__1;
x_31 = lean::alloc_cnstr(0, 5, 1);
lean::cnstr_set(x_31, 0, x_3);
lean::cnstr_set(x_31, 1, x_28);
lean::cnstr_set(x_31, 2, x_8);
lean::cnstr_set(x_31, 3, x_30);
lean::cnstr_set(x_31, 4, x_1);
lean::cnstr_set_scalar(x_31, sizeof(void*)*5, x_29);
x_32 = x_31;
x_33 = lean::alloc_cnstr(0, 1, 0);
lean::cnstr_set(x_33, 0, x_32);
return x_33;
}
}
}
}
@ -9026,58 +9082,83 @@ return x_2;
obj* _init_l_Lean_Expander_Declaration_transform___closed__1() {
_start:
{
obj* x_0; obj* x_1; obj* x_2; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_10; obj* x_11; obj* x_12;
obj* x_0; obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_6; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25;
x_0 = lean::box(0);
x_1 = lean::mk_string("@[");
x_2 = l_String_trim(x_1);
lean::dec(x_1);
x_4 = lean::alloc_cnstr(0, 2, 0);
lean::cnstr_set(x_4, 0, x_0);
lean::cnstr_set(x_4, 1, x_2);
x_5 = lean::alloc_cnstr(1, 1, 0);
lean::cnstr_set(x_5, 0, x_4);
x_6 = lean::box(0);
x_7 = lean::mk_string("]");
x_8 = l_String_trim(x_7);
lean::dec(x_7);
x_10 = lean::alloc_cnstr(0, 2, 0);
lean::cnstr_set(x_10, 0, x_0);
x_1 = lean::mk_string("class");
x_2 = lean_name_mk_string(x_0, x_1);
x_3 = lean::box(0);
x_4 = lean::mk_string(".");
lean::inc(x_2);
x_6 = l_Lean_Name_toStringWithSep___main(x_4, x_2);
lean::dec(x_4);
x_8 = l_Lean_Parser_Substring_ofString(x_6);
x_9 = lean::box(0);
x_10 = lean::alloc_cnstr(0, 5, 0);
lean::cnstr_set(x_10, 0, x_3);
lean::cnstr_set(x_10, 1, x_8);
x_11 = lean::alloc_cnstr(1, 1, 0);
lean::cnstr_set(x_10, 2, x_2);
lean::cnstr_set(x_10, 3, x_9);
lean::cnstr_set(x_10, 4, x_9);
x_11 = lean::alloc_cnstr(0, 2, 0);
lean::cnstr_set(x_11, 0, x_10);
x_12 = lean::alloc_cnstr(0, 3, 0);
lean::cnstr_set(x_12, 0, x_5);
lean::cnstr_set(x_12, 1, x_6);
lean::cnstr_set(x_12, 2, x_11);
return x_12;
lean::cnstr_set(x_11, 1, x_9);
x_12 = lean::alloc_cnstr(0, 2, 0);
lean::cnstr_set(x_12, 0, x_11);
lean::cnstr_set(x_12, 1, x_3);
x_13 = lean::mk_string("@[");
x_14 = l_String_trim(x_13);
lean::dec(x_13);
x_16 = lean::alloc_cnstr(0, 2, 0);
lean::cnstr_set(x_16, 0, x_3);
lean::cnstr_set(x_16, 1, x_14);
x_17 = lean::alloc_cnstr(1, 1, 0);
lean::cnstr_set(x_17, 0, x_16);
x_18 = lean::mk_string("]");
x_19 = l_String_trim(x_18);
lean::dec(x_18);
x_21 = lean::alloc_cnstr(0, 2, 0);
lean::cnstr_set(x_21, 0, x_3);
lean::cnstr_set(x_21, 1, x_19);
x_22 = lean::alloc_cnstr(1, 1, 0);
lean::cnstr_set(x_22, 0, x_21);
x_23 = lean::alloc_cnstr(1, 2, 0);
lean::cnstr_set(x_23, 0, x_12);
lean::cnstr_set(x_23, 1, x_9);
x_24 = lean::alloc_cnstr(0, 3, 0);
lean::cnstr_set(x_24, 0, x_17);
lean::cnstr_set(x_24, 1, x_23);
lean::cnstr_set(x_24, 2, x_22);
x_25 = lean::alloc_cnstr(1, 1, 0);
lean::cnstr_set(x_25, 0, x_24);
return x_25;
}
}
obj* _init_l_Lean_Expander_Declaration_transform___closed__2() {
_start:
{
obj* x_0; obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_7; obj* x_9; obj* x_10; obj* x_11; obj* x_12;
obj* x_0; obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_6; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12;
x_0 = lean::box(0);
x_1 = lean::box(0);
x_2 = lean::box(0);
x_3 = lean::mk_string("class");
x_4 = lean_name_mk_string(x_2, x_3);
x_5 = lean::mk_string(".");
lean::inc(x_4);
x_7 = l_Lean_Name_toStringWithSep___main(x_5, x_4);
lean::dec(x_5);
x_9 = l_Lean_Parser_Substring_ofString(x_7);
x_1 = lean::mk_string("class");
x_2 = lean_name_mk_string(x_0, x_1);
x_3 = lean::box(0);
x_4 = lean::mk_string(".");
lean::inc(x_2);
x_6 = l_Lean_Name_toStringWithSep___main(x_4, x_2);
lean::dec(x_4);
x_8 = l_Lean_Parser_Substring_ofString(x_6);
x_9 = lean::box(0);
x_10 = lean::alloc_cnstr(0, 5, 0);
lean::cnstr_set(x_10, 0, x_0);
lean::cnstr_set(x_10, 1, x_9);
lean::cnstr_set(x_10, 2, x_4);
lean::cnstr_set(x_10, 3, x_1);
lean::cnstr_set(x_10, 4, x_1);
lean::cnstr_set(x_10, 0, x_3);
lean::cnstr_set(x_10, 1, x_8);
lean::cnstr_set(x_10, 2, x_2);
lean::cnstr_set(x_10, 3, x_9);
lean::cnstr_set(x_10, 4, x_9);
x_11 = lean::alloc_cnstr(0, 2, 0);
lean::cnstr_set(x_11, 0, x_10);
lean::cnstr_set(x_11, 1, x_1);
lean::cnstr_set(x_11, 1, x_9);
x_12 = lean::alloc_cnstr(0, 2, 0);
lean::cnstr_set(x_12, 0, x_11);
lean::cnstr_set(x_12, 1, x_0);
lean::cnstr_set(x_12, 1, x_3);
return x_12;
}
}
@ -9135,7 +9216,7 @@ return x_16;
}
else
{
obj* x_17; obj* x_18; obj* x_20; obj* x_22; obj* x_24; obj* x_26; obj* x_28; obj* x_30; obj* x_31; obj* x_34; obj* x_36; obj* x_37; obj* x_38; obj* x_40; obj* x_43; obj* x_45; obj* x_47; obj* x_49; obj* x_50; obj* x_51; obj* x_54; obj* x_55; obj* x_56; obj* x_58; obj* x_60; obj* x_63; obj* x_64; obj* x_65; obj* x_66; obj* x_67; obj* x_68; obj* x_69;
obj* x_17; obj* x_18; obj* x_20; obj* x_22; obj* x_24; obj* x_26; obj* x_28; obj* x_30; obj* x_31; obj* x_34; obj* x_36; obj* x_39; obj* x_41; obj* x_42; obj* x_44; obj* x_46; obj* x_49; obj* x_50;
if (lean::is_exclusive(x_11)) {
lean::cnstr_release(x_11, 0);
x_17 = x_11;
@ -9167,208 +9248,278 @@ lean::inc(x_31);
lean::dec(x_5);
x_34 = lean::cnstr_get(x_31, 1);
lean::inc(x_34);
x_36 = lean::box(0);
x_37 = l_Lean_Expander_Declaration_transform___closed__1;
x_38 = l_Option_getOrElse___main___rarg(x_34, x_37);
lean::dec(x_34);
x_40 = lean::cnstr_get(x_2, 1);
lean::inc(x_40);
x_36 = lean::cnstr_get(x_2, 1);
lean::inc(x_36);
lean::dec(x_2);
x_43 = lean::cnstr_get(x_31, 0);
lean::inc(x_43);
x_45 = lean::cnstr_get(x_38, 0);
lean::inc(x_45);
x_47 = lean::cnstr_get(x_38, 1);
lean::inc(x_47);
x_49 = l_Lean_Expander_Declaration_transform___closed__2;
x_50 = lean::alloc_cnstr(1, 2, 0);
x_39 = lean::cnstr_get(x_31, 0);
lean::inc(x_39);
x_41 = lean::box(0);
x_42 = lean::cnstr_get(x_31, 2);
lean::inc(x_42);
x_44 = lean::cnstr_get(x_31, 3);
lean::inc(x_44);
x_46 = lean::cnstr_get(x_31, 4);
lean::inc(x_46);
lean::dec(x_31);
if (lean::is_scalar(x_30)) {
x_49 = lean::alloc_cnstr(0, 7, 0);
} else {
x_49 = x_30;
}
lean::cnstr_set(x_49, 0, x_41);
lean::cnstr_set(x_49, 1, x_18);
lean::cnstr_set(x_49, 2, x_20);
lean::cnstr_set(x_49, 3, x_22);
lean::cnstr_set(x_49, 4, x_24);
lean::cnstr_set(x_49, 5, x_26);
lean::cnstr_set(x_49, 6, x_28);
if (lean::is_scalar(x_10)) {
x_50 = lean::alloc_cnstr(4, 1, 0);
} else {
x_50 = x_10;
}
lean::cnstr_set(x_50, 0, x_49);
lean::cnstr_set(x_50, 1, x_47);
x_51 = lean::cnstr_get(x_38, 2);
lean::inc(x_51);
lean::dec(x_38);
x_54 = lean::alloc_cnstr(0, 3, 0);
lean::cnstr_set(x_54, 0, x_45);
lean::cnstr_set(x_54, 1, x_50);
lean::cnstr_set(x_54, 2, x_51);
if (lean::obj_tag(x_34) == 0)
{
obj* x_51; obj* x_52; obj* x_53; obj* x_54; obj* x_55; obj* x_56;
x_51 = l_Lean_Expander_Declaration_transform___closed__1;
x_52 = lean::alloc_cnstr(0, 5, 0);
lean::cnstr_set(x_52, 0, x_39);
lean::cnstr_set(x_52, 1, x_51);
lean::cnstr_set(x_52, 2, x_42);
lean::cnstr_set(x_52, 3, x_44);
lean::cnstr_set(x_52, 4, x_46);
x_53 = lean::alloc_cnstr(0, 2, 0);
lean::cnstr_set(x_53, 0, x_52);
lean::cnstr_set(x_53, 1, x_50);
x_54 = lean::apply_1(x_36, x_53);
if (lean::is_scalar(x_17)) {
x_55 = lean::alloc_cnstr(1, 1, 0);
} else {
x_55 = x_17;
}
lean::cnstr_set(x_55, 0, x_54);
x_56 = lean::cnstr_get(x_31, 2);
lean::inc(x_56);
x_58 = lean::cnstr_get(x_31, 3);
lean::inc(x_58);
x_60 = lean::cnstr_get(x_31, 4);
x_56 = lean::alloc_cnstr(1, 1, 0);
lean::cnstr_set(x_56, 0, x_55);
return x_56;
}
else
{
obj* x_57; obj* x_59; obj* x_60; obj* x_62; obj* x_64; obj* x_65; obj* x_66; obj* x_69; obj* x_70; obj* x_71; obj* x_72; obj* x_73; obj* x_74; obj* x_75;
x_57 = lean::cnstr_get(x_34, 0);
if (lean::is_exclusive(x_34)) {
x_59 = x_34;
} else {
lean::inc(x_57);
lean::dec(x_34);
x_59 = lean::box(0);
}
x_60 = lean::cnstr_get(x_57, 0);
lean::inc(x_60);
lean::dec(x_31);
x_63 = lean::alloc_cnstr(0, 5, 0);
lean::cnstr_set(x_63, 0, x_43);
lean::cnstr_set(x_63, 1, x_55);
lean::cnstr_set(x_63, 2, x_56);
lean::cnstr_set(x_63, 3, x_58);
lean::cnstr_set(x_63, 4, x_60);
if (lean::is_scalar(x_30)) {
x_64 = lean::alloc_cnstr(0, 7, 0);
} else {
x_64 = x_30;
}
lean::cnstr_set(x_64, 0, x_36);
lean::cnstr_set(x_64, 1, x_18);
lean::cnstr_set(x_64, 2, x_20);
lean::cnstr_set(x_64, 3, x_22);
lean::cnstr_set(x_64, 4, x_24);
lean::cnstr_set(x_64, 5, x_26);
lean::cnstr_set(x_64, 6, x_28);
if (lean::is_scalar(x_10)) {
x_65 = lean::alloc_cnstr(4, 1, 0);
} else {
x_65 = x_10;
}
x_62 = lean::cnstr_get(x_57, 1);
lean::inc(x_62);
x_64 = l_Lean_Expander_Declaration_transform___closed__2;
x_65 = lean::alloc_cnstr(1, 2, 0);
lean::cnstr_set(x_65, 0, x_64);
x_66 = lean::alloc_cnstr(0, 2, 0);
lean::cnstr_set(x_66, 0, x_63);
lean::cnstr_set(x_66, 1, x_65);
x_67 = lean::apply_1(x_40, x_66);
x_68 = lean::alloc_cnstr(1, 1, 0);
lean::cnstr_set(x_68, 0, x_67);
x_69 = lean::alloc_cnstr(1, 1, 0);
lean::cnstr_set(x_69, 0, x_68);
return x_69;
lean::cnstr_set(x_65, 1, x_62);
x_66 = lean::cnstr_get(x_57, 2);
lean::inc(x_66);
lean::dec(x_57);
x_69 = lean::alloc_cnstr(0, 3, 0);
lean::cnstr_set(x_69, 0, x_60);
lean::cnstr_set(x_69, 1, x_65);
lean::cnstr_set(x_69, 2, x_66);
if (lean::is_scalar(x_59)) {
x_70 = lean::alloc_cnstr(1, 1, 0);
} else {
x_70 = x_59;
}
lean::cnstr_set(x_70, 0, x_69);
x_71 = lean::alloc_cnstr(0, 5, 0);
lean::cnstr_set(x_71, 0, x_39);
lean::cnstr_set(x_71, 1, x_70);
lean::cnstr_set(x_71, 2, x_42);
lean::cnstr_set(x_71, 3, x_44);
lean::cnstr_set(x_71, 4, x_46);
x_72 = lean::alloc_cnstr(0, 2, 0);
lean::cnstr_set(x_72, 0, x_71);
lean::cnstr_set(x_72, 1, x_50);
x_73 = lean::apply_1(x_36, x_72);
if (lean::is_scalar(x_17)) {
x_74 = lean::alloc_cnstr(1, 1, 0);
} else {
x_74 = x_17;
}
lean::cnstr_set(x_74, 0, x_73);
x_75 = lean::alloc_cnstr(1, 1, 0);
lean::cnstr_set(x_75, 0, x_74);
return x_75;
}
}
}
case 5:
{
obj* x_70; obj* x_72; obj* x_73;
x_70 = lean::cnstr_get(x_6, 0);
obj* x_76; obj* x_78; obj* x_79;
x_76 = lean::cnstr_get(x_6, 0);
if (lean::is_exclusive(x_6)) {
lean::cnstr_set(x_6, 0, lean::box(0));
x_72 = x_6;
x_78 = x_6;
} else {
lean::inc(x_70);
lean::inc(x_76);
lean::dec(x_6);
x_72 = lean::box(0);
x_78 = lean::box(0);
}
x_73 = lean::cnstr_get(x_70, 0);
lean::inc(x_73);
if (lean::obj_tag(x_73) == 0)
x_79 = lean::cnstr_get(x_76, 0);
lean::inc(x_79);
if (lean::obj_tag(x_79) == 0)
{
obj* x_79;
obj* x_85;
lean::dec(x_5);
lean::dec(x_72);
lean::dec(x_70);
lean::dec(x_73);
x_79 = l_Lean_Expander_noExpansion___closed__1;
return x_79;
lean::dec(x_78);
lean::dec(x_79);
lean::dec(x_76);
x_85 = l_Lean_Expander_noExpansion___closed__1;
return x_85;
}
else
{
obj* x_81; obj* x_83; obj* x_85; obj* x_87; obj* x_89; obj* x_91; obj* x_93; obj* x_95; obj* x_96; obj* x_99; obj* x_101; obj* x_102; obj* x_104; obj* x_107; obj* x_109; obj* x_111; obj* x_113; obj* x_114; obj* x_115; obj* x_118; obj* x_119; obj* x_120; obj* x_122; obj* x_124; obj* x_127; obj* x_128; obj* x_129; obj* x_130; obj* x_131; obj* x_132; obj* x_133; obj* x_134;
lean::dec(x_73);
x_81 = lean::cnstr_get(x_70, 1);
x_83 = lean::cnstr_get(x_70, 2);
x_85 = lean::cnstr_get(x_70, 3);
x_87 = lean::cnstr_get(x_70, 4);
x_89 = lean::cnstr_get(x_70, 5);
x_91 = lean::cnstr_get(x_70, 6);
x_93 = lean::cnstr_get(x_70, 7);
if (lean::is_exclusive(x_70)) {
lean::cnstr_release(x_70, 0);
x_95 = x_70;
obj* x_87; obj* x_89; obj* x_91; obj* x_93; obj* x_95; obj* x_97; obj* x_99; obj* x_101; obj* x_102; obj* x_105; obj* x_107; obj* x_110; obj* x_112; obj* x_114; obj* x_116; obj* x_119; obj* x_120; obj* x_121;
lean::dec(x_79);
x_87 = lean::cnstr_get(x_76, 1);
x_89 = lean::cnstr_get(x_76, 2);
x_91 = lean::cnstr_get(x_76, 3);
x_93 = lean::cnstr_get(x_76, 4);
x_95 = lean::cnstr_get(x_76, 5);
x_97 = lean::cnstr_get(x_76, 6);
x_99 = lean::cnstr_get(x_76, 7);
if (lean::is_exclusive(x_76)) {
lean::cnstr_release(x_76, 0);
x_101 = x_76;
} else {
lean::inc(x_81);
lean::inc(x_83);
lean::inc(x_85);
lean::inc(x_87);
lean::inc(x_89);
lean::inc(x_91);
lean::inc(x_93);
lean::dec(x_70);
x_95 = lean::box(0);
lean::inc(x_95);
lean::inc(x_97);
lean::inc(x_99);
lean::dec(x_76);
x_101 = lean::box(0);
}
x_96 = lean::cnstr_get(x_5, 0);
lean::inc(x_96);
x_102 = lean::cnstr_get(x_5, 0);
lean::inc(x_102);
lean::dec(x_5);
x_99 = lean::cnstr_get(x_96, 1);
lean::inc(x_99);
x_101 = l_Lean_Expander_Declaration_transform___closed__1;
x_102 = l_Option_getOrElse___main___rarg(x_99, x_101);
lean::dec(x_99);
x_104 = lean::cnstr_get(x_2, 1);
lean::inc(x_104);
lean::dec(x_2);
x_107 = lean::cnstr_get(x_96, 0);
x_105 = lean::cnstr_get(x_102, 1);
lean::inc(x_105);
x_107 = lean::cnstr_get(x_2, 1);
lean::inc(x_107);
x_109 = lean::cnstr_get(x_102, 0);
lean::inc(x_109);
x_111 = lean::cnstr_get(x_102, 1);
lean::inc(x_111);
x_113 = l_Lean_Expander_Declaration_transform___closed__2;
x_114 = lean::alloc_cnstr(1, 2, 0);
lean::cnstr_set(x_114, 0, x_113);
lean::cnstr_set(x_114, 1, x_111);
x_115 = lean::cnstr_get(x_102, 2);
lean::inc(x_115);
lean::dec(x_2);
x_110 = lean::cnstr_get(x_102, 0);
lean::inc(x_110);
x_112 = lean::cnstr_get(x_102, 2);
lean::inc(x_112);
x_114 = lean::cnstr_get(x_102, 3);
lean::inc(x_114);
x_116 = lean::cnstr_get(x_102, 4);
lean::inc(x_116);
lean::dec(x_102);
x_118 = lean::alloc_cnstr(0, 3, 0);
lean::cnstr_set(x_118, 0, x_109);
lean::cnstr_set(x_118, 1, x_114);
lean::cnstr_set(x_118, 2, x_115);
x_119 = lean::alloc_cnstr(1, 1, 0);
lean::cnstr_set(x_119, 0, x_118);
x_120 = lean::cnstr_get(x_96, 2);
lean::inc(x_120);
x_122 = lean::cnstr_get(x_96, 3);
lean::inc(x_122);
x_124 = lean::cnstr_get(x_96, 4);
lean::inc(x_124);
lean::dec(x_96);
x_127 = lean::alloc_cnstr(0, 5, 0);
lean::cnstr_set(x_127, 0, x_107);
lean::cnstr_set(x_127, 1, x_119);
lean::cnstr_set(x_127, 2, x_120);
lean::cnstr_set(x_127, 3, x_122);
lean::cnstr_set(x_127, 4, x_124);
x_128 = l_Lean_Expander_Declaration_transform___closed__3;
if (lean::is_scalar(x_95)) {
x_129 = lean::alloc_cnstr(0, 8, 0);
x_119 = l_Lean_Expander_Declaration_transform___closed__3;
if (lean::is_scalar(x_101)) {
x_120 = lean::alloc_cnstr(0, 8, 0);
} else {
x_129 = x_95;
x_120 = x_101;
}
lean::cnstr_set(x_129, 0, x_128);
lean::cnstr_set(x_129, 1, x_81);
lean::cnstr_set(x_129, 2, x_83);
lean::cnstr_set(x_129, 3, x_85);
lean::cnstr_set(x_129, 4, x_87);
lean::cnstr_set(x_129, 5, x_89);
lean::cnstr_set(x_129, 6, x_91);
lean::cnstr_set(x_129, 7, x_93);
if (lean::is_scalar(x_72)) {
x_130 = lean::alloc_cnstr(5, 1, 0);
lean::cnstr_set(x_120, 0, x_119);
lean::cnstr_set(x_120, 1, x_87);
lean::cnstr_set(x_120, 2, x_89);
lean::cnstr_set(x_120, 3, x_91);
lean::cnstr_set(x_120, 4, x_93);
lean::cnstr_set(x_120, 5, x_95);
lean::cnstr_set(x_120, 6, x_97);
lean::cnstr_set(x_120, 7, x_99);
if (lean::is_scalar(x_78)) {
x_121 = lean::alloc_cnstr(5, 1, 0);
} else {
x_130 = x_72;
x_121 = x_78;
}
lean::cnstr_set(x_121, 0, x_120);
if (lean::obj_tag(x_105) == 0)
{
obj* x_122; obj* x_123; obj* x_124; obj* x_125; obj* x_126; obj* x_127;
x_122 = l_Lean_Expander_Declaration_transform___closed__1;
x_123 = lean::alloc_cnstr(0, 5, 0);
lean::cnstr_set(x_123, 0, x_110);
lean::cnstr_set(x_123, 1, x_122);
lean::cnstr_set(x_123, 2, x_112);
lean::cnstr_set(x_123, 3, x_114);
lean::cnstr_set(x_123, 4, x_116);
x_124 = lean::alloc_cnstr(0, 2, 0);
lean::cnstr_set(x_124, 0, x_123);
lean::cnstr_set(x_124, 1, x_121);
x_125 = lean::apply_1(x_107, x_124);
x_126 = lean::alloc_cnstr(1, 1, 0);
lean::cnstr_set(x_126, 0, x_125);
x_127 = lean::alloc_cnstr(1, 1, 0);
lean::cnstr_set(x_127, 0, x_126);
return x_127;
}
else
{
obj* x_128; obj* x_130; obj* x_131; obj* x_133; obj* x_135; obj* x_136; obj* x_137; obj* x_140; obj* x_141; obj* x_142; obj* x_143; obj* x_144; obj* x_145; obj* x_146;
x_128 = lean::cnstr_get(x_105, 0);
if (lean::is_exclusive(x_105)) {
x_130 = x_105;
} else {
lean::inc(x_128);
lean::dec(x_105);
x_130 = lean::box(0);
}
x_131 = lean::cnstr_get(x_128, 0);
lean::inc(x_131);
x_133 = lean::cnstr_get(x_128, 1);
lean::inc(x_133);
x_135 = l_Lean_Expander_Declaration_transform___closed__2;
x_136 = lean::alloc_cnstr(1, 2, 0);
lean::cnstr_set(x_136, 0, x_135);
lean::cnstr_set(x_136, 1, x_133);
x_137 = lean::cnstr_get(x_128, 2);
lean::inc(x_137);
lean::dec(x_128);
x_140 = lean::alloc_cnstr(0, 3, 0);
lean::cnstr_set(x_140, 0, x_131);
lean::cnstr_set(x_140, 1, x_136);
lean::cnstr_set(x_140, 2, x_137);
if (lean::is_scalar(x_130)) {
x_141 = lean::alloc_cnstr(1, 1, 0);
} else {
x_141 = x_130;
}
lean::cnstr_set(x_141, 0, x_140);
x_142 = lean::alloc_cnstr(0, 5, 0);
lean::cnstr_set(x_142, 0, x_110);
lean::cnstr_set(x_142, 1, x_141);
lean::cnstr_set(x_142, 2, x_112);
lean::cnstr_set(x_142, 3, x_114);
lean::cnstr_set(x_142, 4, x_116);
x_143 = lean::alloc_cnstr(0, 2, 0);
lean::cnstr_set(x_143, 0, x_142);
lean::cnstr_set(x_143, 1, x_121);
x_144 = lean::apply_1(x_107, x_143);
x_145 = lean::alloc_cnstr(1, 1, 0);
lean::cnstr_set(x_145, 0, x_144);
x_146 = lean::alloc_cnstr(1, 1, 0);
lean::cnstr_set(x_146, 0, x_145);
return x_146;
}
lean::cnstr_set(x_130, 0, x_129);
x_131 = lean::alloc_cnstr(0, 2, 0);
lean::cnstr_set(x_131, 0, x_127);
lean::cnstr_set(x_131, 1, x_130);
x_132 = lean::apply_1(x_104, x_131);
x_133 = lean::alloc_cnstr(1, 1, 0);
lean::cnstr_set(x_133, 0, x_132);
x_134 = lean::alloc_cnstr(1, 1, 0);
lean::cnstr_set(x_134, 0, x_133);
return x_134;
}
}
default:
{
obj* x_137;
obj* x_149;
lean::dec(x_6);
lean::dec(x_5);
x_137 = l_Lean_Expander_noExpansion___closed__1;
return x_137;
x_149 = l_Lean_Expander_noExpansion___closed__1;
return x_149;
}
}
}
@ -9668,17 +9819,15 @@ return x_6;
obj* _init_l_Lean_Expander_bindingAnnotationUpdate_HasView_x_27___lambda__1___closed__1() {
_start:
{
obj* x_0; obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6;
obj* x_0; obj* x_1; obj* x_2; obj* x_3; obj* x_4;
x_0 = lean::box(0);
x_1 = lean::box(0);
x_2 = lean::box(3);
x_3 = l_Option_getOrElse___main___rarg(x_1, x_2);
x_4 = lean::alloc_cnstr(1, 2, 0);
lean::cnstr_set(x_4, 0, x_3);
lean::cnstr_set(x_4, 1, x_0);
x_5 = l_Lean_Expander_bindingAnnotationUpdate;
x_6 = l_Lean_Parser_Syntax_mkNode(x_5, x_4);
return x_6;
x_1 = lean::box(3);
x_2 = lean::alloc_cnstr(1, 2, 0);
lean::cnstr_set(x_2, 0, x_1);
lean::cnstr_set(x_2, 1, x_0);
x_3 = l_Lean_Expander_bindingAnnotationUpdate;
x_4 = l_Lean_Parser_Syntax_mkNode(x_3, x_2);
return x_4;
}
}
obj* l_Lean_Expander_bindingAnnotationUpdate_HasView_x_27___lambda__1(obj* x_0) {
@ -9692,33 +9841,19 @@ return x_1;
}
else
{
obj* x_2; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_11; obj* x_12; obj* x_13;
obj* x_2; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9;
x_2 = lean::cnstr_get(x_0, 0);
if (lean::is_exclusive(x_0)) {
x_4 = x_0;
} else {
lean::inc(x_2);
lean::dec(x_0);
x_4 = lean::box(0);
}
lean::inc(x_2);
lean::dec(x_0);
x_5 = lean::box(0);
x_6 = lean::alloc_cnstr(0, 1, 0);
lean::cnstr_set(x_6, 0, x_2);
if (lean::is_scalar(x_4)) {
x_7 = lean::alloc_cnstr(1, 1, 0);
} else {
x_7 = x_4;
}
x_7 = lean::alloc_cnstr(1, 2, 0);
lean::cnstr_set(x_7, 0, x_6);
x_8 = lean::box(3);
x_9 = l_Option_getOrElse___main___rarg(x_7, x_8);
lean::dec(x_7);
x_11 = lean::alloc_cnstr(1, 2, 0);
lean::cnstr_set(x_11, 0, x_9);
lean::cnstr_set(x_11, 1, x_5);
x_12 = l_Lean_Expander_bindingAnnotationUpdate;
x_13 = l_Lean_Parser_Syntax_mkNode(x_12, x_11);
return x_13;
lean::cnstr_set(x_7, 1, x_5);
x_8 = l_Lean_Expander_bindingAnnotationUpdate;
x_9 = l_Lean_Parser_Syntax_mkNode(x_8, x_7);
return x_9;
}
}
}
@ -11243,7 +11378,7 @@ x_12 = lean::box(0);
if (lean::obj_tag(x_0) == 0)
{
obj* x_13; obj* x_14; uint8 x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19;
x_13 = l_Lean_Expander_error___rarg___lambda__1___closed__1;
x_13 = lean::mk_nat_obj(0ul);
x_14 = l_Lean_FileMap_toPosition(x_9, x_13);
x_15 = 2;
x_16 = l_String_splitAux___main___closed__1;
@ -11261,26 +11396,49 @@ return x_19;
}
else
{
obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_25; uint8 x_26; obj* x_27; obj* x_28; obj* x_29; obj* x_30;
obj* x_20; obj* x_21;
x_20 = lean::cnstr_get(x_0, 0);
x_21 = l_Lean_Parser_Syntax_getPos(x_20);
if (lean::obj_tag(x_21) == 0)
{
obj* x_22; obj* x_23; uint8 x_24; obj* x_25; obj* x_26; obj* x_27; obj* x_28;
x_22 = lean::mk_nat_obj(0ul);
x_23 = l_Option_getOrElse___main___rarg(x_21, x_22);
x_23 = l_Lean_FileMap_toPosition(x_9, x_22);
x_24 = 2;
x_25 = l_String_splitAux___main___closed__1;
x_26 = lean::alloc_cnstr(0, 5, 1);
lean::cnstr_set(x_26, 0, x_7);
lean::cnstr_set(x_26, 1, x_23);
lean::cnstr_set(x_26, 2, x_12);
lean::cnstr_set(x_26, 3, x_25);
lean::cnstr_set(x_26, 4, x_1);
lean::cnstr_set_scalar(x_26, sizeof(void*)*5, x_24);
x_27 = x_26;
x_28 = lean::alloc_cnstr(0, 1, 0);
lean::cnstr_set(x_28, 0, x_27);
return x_28;
}
else
{
obj* x_29; obj* x_32; uint8 x_33; obj* x_34; obj* x_35; obj* x_36; obj* x_37;
x_29 = lean::cnstr_get(x_21, 0);
lean::inc(x_29);
lean::dec(x_21);
x_25 = l_Lean_FileMap_toPosition(x_9, x_23);
x_26 = 2;
x_27 = l_String_splitAux___main___closed__1;
x_28 = lean::alloc_cnstr(0, 5, 1);
lean::cnstr_set(x_28, 0, x_7);
lean::cnstr_set(x_28, 1, x_25);
lean::cnstr_set(x_28, 2, x_12);
lean::cnstr_set(x_28, 3, x_27);
lean::cnstr_set(x_28, 4, x_1);
lean::cnstr_set_scalar(x_28, sizeof(void*)*5, x_26);
x_29 = x_28;
x_30 = lean::alloc_cnstr(0, 1, 0);
lean::cnstr_set(x_30, 0, x_29);
return x_30;
x_32 = l_Lean_FileMap_toPosition(x_9, x_29);
x_33 = 2;
x_34 = l_String_splitAux___main___closed__1;
x_35 = lean::alloc_cnstr(0, 5, 1);
lean::cnstr_set(x_35, 0, x_7);
lean::cnstr_set(x_35, 1, x_32);
lean::cnstr_set(x_35, 2, x_12);
lean::cnstr_set(x_35, 3, x_34);
lean::cnstr_set(x_35, 4, x_1);
lean::cnstr_set_scalar(x_35, sizeof(void*)*5, x_33);
x_36 = x_35;
x_37 = lean::alloc_cnstr(0, 1, 0);
lean::cnstr_set(x_37, 0, x_36);
return x_37;
}
}
}
}
@ -12015,8 +12173,6 @@ lean::mark_persistent(l_Lean_Expander_TransformM_MonadReader);
lean::mark_persistent(l_Lean_Expander_TransformM_MonadExcept);
l_Lean_Expander_noExpansion___closed__1 = _init_l_Lean_Expander_noExpansion___closed__1();
lean::mark_persistent(l_Lean_Expander_noExpansion___closed__1);
l_Lean_Expander_error___rarg___lambda__1___closed__1 = _init_l_Lean_Expander_error___rarg___lambda__1___closed__1();
lean::mark_persistent(l_Lean_Expander_error___rarg___lambda__1___closed__1);
l_Lean_Expander_coeBinderBracketedBinder___closed__1 = _init_l_Lean_Expander_coeBinderBracketedBinder___closed__1();
lean::mark_persistent(l_Lean_Expander_coeBinderBracketedBinder___closed__1);
l_Lean_Expander_coeBinderBracketedBinder___closed__2 = _init_l_Lean_Expander_coeBinderBracketedBinder___closed__2();

View file

@ -55,7 +55,6 @@ namespace lean {
obj* string_append(obj*, obj*);
}
extern obj* l_List_reprAux___main___rarg___closed__1;
obj* l_Option_getOrElse___main___rarg(obj*, obj*);
extern obj* l_Option_HasRepr___rarg___closed__3;
obj* l_Lean_expandExternPatternAux___main(obj*, obj*, obj*, obj*);
extern "C" obj* lean_name_mk_string(obj*, obj*);
@ -286,7 +285,7 @@ goto _start;
}
else
{
obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_24; obj* x_27; obj* x_30; obj* x_31; obj* x_32; obj* x_34;
obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_24; obj* x_27; obj* x_30;
x_19 = l_String_Iterator_next___main(x_2);
x_20 = l_String_Iterator_remainingBytes___main(x_19);
x_21 = l___private_init_lean_extern_1__parseOptNum___main(x_20, x_19, x_4);
@ -299,16 +298,30 @@ x_27 = lean::nat_sub(x_24, x_10);
lean::dec(x_24);
lean::inc(x_0);
x_30 = l_List_nth___main___rarg(x_0, x_27);
if (lean::obj_tag(x_30) == 0)
{
obj* x_31; obj* x_32;
x_31 = l_String_splitAux___main___closed__1;
x_32 = l_Option_getOrElse___main___rarg(x_30, x_31);
lean::dec(x_30);
x_34 = lean::string_append(x_3, x_32);
lean::dec(x_32);
x_32 = lean::string_append(x_3, x_31);
x_1 = x_11;
x_2 = x_22;
x_3 = x_34;
x_3 = x_32;
goto _start;
}
else
{
obj* x_34; obj* x_37;
x_34 = lean::cnstr_get(x_30, 0);
lean::inc(x_34);
lean::dec(x_30);
x_37 = lean::string_append(x_3, x_34);
lean::dec(x_34);
x_1 = x_11;
x_2 = x_22;
x_3 = x_37;
goto _start;
}
}
}
}
else

View file

@ -415,7 +415,7 @@ x_4 = lean::cnstr_get_scalar<uint8>(x_1, sizeof(void*)*1);
if (x_4 == 0)
{
obj* x_5; uint8 x_6;
x_5 = lean::thunk_get(x_2);
x_5 = lean::thunk_get_own(x_2);
x_6 = lean::cnstr_get_scalar<uint8>(x_5, sizeof(void*)*1 + 1);
if (x_6 == 0)
{
@ -573,7 +573,7 @@ x_27 = lean::alloc_closure(reinterpret_cast<void*>(l_Lean_Format_spaceUptoLine__
lean::closure_set(x_27, 0, x_19);
lean::closure_set(x_27, 1, x_1);
x_28 = lean::mk_thunk(x_27);
x_29 = lean::thunk_get(x_28);
x_29 = lean::thunk_get_own(x_28);
lean::dec(x_28);
x_31 = lean::cnstr_get_scalar<uint8>(x_29, sizeof(void*)*1 + 1);
if (x_31 == 0)
@ -704,7 +704,7 @@ x_17 = lean::alloc_closure(reinterpret_cast<void*>(l_Lean_Format_spaceUptoLine_x
lean::closure_set(x_17, 0, x_6);
lean::closure_set(x_17, 1, x_1);
x_18 = lean::mk_thunk(x_17);
x_19 = lean::thunk_get(x_18);
x_19 = lean::thunk_get_own(x_18);
lean::dec(x_18);
x_21 = lean::cnstr_get_scalar<uint8>(x_19, sizeof(void*)*1 + 1);
if (x_21 == 0)
@ -990,7 +990,7 @@ x_96 = lean::alloc_closure(reinterpret_cast<void*>(l_Lean_Format_spaceUptoLine_x
lean::closure_set(x_96, 0, x_76);
lean::closure_set(x_96, 1, x_0);
x_97 = lean::mk_thunk(x_96);
x_98 = lean::thunk_get(x_97);
x_98 = lean::thunk_get_own(x_97);
lean::dec(x_97);
x_100 = lean::cnstr_get_scalar<uint8>(x_98, sizeof(void*)*1 + 1);
if (x_100 == 0)

View file

@ -22,7 +22,6 @@ obj* l_Lean_KVMap_setBool(obj*, obj*, uint8);
uint8 l_Lean_DataValue_beq(obj*, obj*);
obj* l_Lean_KVMap_subset___boxed(obj*, obj*);
obj* l_Lean_KVMap_getInt(obj*, obj*, obj*);
uint8 l_Option_isSome___main___rarg(obj*);
obj* l_Lean_KVMap_getString(obj*, obj*, obj*);
obj* l_Lean_DataValue_beq___main___boxed(obj*, obj*);
obj* l_Lean_KVMap_findCore___main(obj*, obj*);
@ -479,12 +478,22 @@ return x_3;
uint8 l_Lean_KVMap_contains(obj* x_0, obj* x_1) {
_start:
{
obj* x_2; uint8 x_3;
obj* x_2;
x_2 = l_Lean_KVMap_findCore___main(x_0, x_1);
x_3 = l_Option_isSome___main___rarg(x_2);
lean::dec(x_2);
if (lean::obj_tag(x_2) == 0)
{
uint8 x_3;
x_3 = 0;
return x_3;
}
else
{
uint8 x_5;
lean::dec(x_2);
x_5 = 1;
return x_5;
}
}
}
obj* l_Lean_KVMap_contains___boxed(obj* x_0, obj* x_1) {
_start:

View file

@ -27,7 +27,6 @@ obj* l_RBMap_insert___main___at_Lean_NameMap_insert___spec__1(obj*);
obj* l_RBMap_find___main___at_Lean_NameMap_find___spec__1___rarg(obj*, obj*);
obj* l_RBMap_find___main___at_Lean_NameMap_find___spec__1___boxed(obj*);
obj* l_Lean_NameMap_insert(obj*);
uint8 l_Option_isSome___main___rarg(obj*);
obj* l_RBMap_find___main___at_Lean_NameSet_contains___spec__1___boxed(obj*, obj*);
obj* l_RBNode_insert___at_Lean_NameSet_insert___spec__2___boxed(obj*, obj*, obj*, obj*);
obj* l_Lean_Name_Hashable;
@ -1621,12 +1620,22 @@ return x_1;
uint8 l_Lean_NameMap_contains___rarg(obj* x_0, obj* x_1) {
_start:
{
obj* x_2; uint8 x_3;
obj* x_2;
x_2 = l_RBMap_find___main___at_Lean_NameMap_contains___spec__1___rarg(x_0, x_1);
x_3 = l_Option_isSome___main___rarg(x_2);
lean::dec(x_2);
if (lean::obj_tag(x_2) == 0)
{
uint8 x_3;
x_3 = 0;
return x_3;
}
else
{
uint8 x_5;
lean::dec(x_2);
x_5 = 1;
return x_5;
}
}
}
obj* l_Lean_NameMap_contains(obj* x_0) {
_start:
@ -2316,12 +2325,22 @@ return x_3;
uint8 l_Lean_NameSet_contains(obj* x_0, obj* x_1) {
_start:
{
obj* x_2; uint8 x_3;
obj* x_2;
x_2 = l_RBMap_find___main___at_Lean_NameSet_contains___spec__1(x_0, x_1);
x_3 = l_Option_isSome___main___rarg(x_2);
lean::dec(x_2);
if (lean::obj_tag(x_2) == 0)
{
uint8 x_3;
x_3 = 0;
return x_3;
}
else
{
uint8 x_5;
lean::dec(x_2);
x_5 = 1;
return x_5;
}
}
}
obj* l_RBMap_find___main___at_Lean_NameSet_contains___spec__1___boxed(obj* x_0, obj* x_1) {
_start:

View file

@ -54,7 +54,6 @@ obj* string_push(obj*, uint32);
obj* l___private_init_lean_name__mangling_4__Name_mangleAux___main___boxed(obj*, obj*);
obj* l_Nat_repr(obj*);
extern obj* l_Lean_Parser_MonadParsec_eoiError___rarg___closed__1;
obj* l_Lean_Parser_MonadParsec_error___at___private_init_lean_name__mangling_2__parseMangledStringAux___main___spec__3___rarg___boxed(obj*, obj*, obj*, obj*, obj*);
obj* l___private_init_lean_parser_parsec_2__strAux___main(obj*, obj*, obj*);
obj* l_matchFailed___at___private_init_lean_name__mangling_5__parseMangledNameAux___main___spec__11(obj*);
obj* l_Lean_String_demangle___closed__1;
@ -69,7 +68,6 @@ obj* l_String_OldIterator_next___main(obj*);
obj* l_Lean_Parser_MonadParsec_error___at___private_init_lean_name__mangling_2__parseMangledStringAux___main___spec__3___rarg(obj*, obj*, obj*, obj*, obj*);
obj* l___private_init_lean_name__mangling_4__Name_mangleAux(obj*, obj*);
obj* l___private_init_lean_name__mangling_3__parseMangledString(obj*);
obj* l_Option_getOrElse___main___rarg(obj*, obj*);
obj* l_Lean_Parser_MonadParsec_takeWhileCont___at___private_init_lean_name__mangling_5__parseMangledNameAux___main___spec__4(obj*, obj*);
namespace lean {
uint8 nat_dec_lt(obj*, obj*);
@ -386,26 +384,47 @@ return x_28;
obj* l_Lean_Parser_MonadParsec_error___at___private_init_lean_name__mangling_2__parseMangledStringAux___main___spec__3___rarg(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) {
_start:
{
obj* x_5; obj* x_6; uint8 x_7; obj* x_8; obj* x_9;
x_5 = l_Option_getOrElse___main___rarg(x_2, x_4);
x_6 = lean::alloc_cnstr(0, 4, 0);
lean::cnstr_set(x_6, 0, x_5);
lean::cnstr_set(x_6, 1, x_0);
lean::cnstr_set(x_6, 2, x_1);
lean::cnstr_set(x_6, 3, x_3);
x_7 = 0;
x_8 = lean::alloc_cnstr(1, 1, 1);
lean::cnstr_set(x_8, 0, x_6);
lean::cnstr_set_scalar(x_8, sizeof(void*)*1, x_7);
x_9 = x_8;
return x_9;
if (lean::obj_tag(x_2) == 0)
{
obj* x_5; uint8 x_6; obj* x_7; obj* x_8;
x_5 = lean::alloc_cnstr(0, 4, 0);
lean::cnstr_set(x_5, 0, x_4);
lean::cnstr_set(x_5, 1, x_0);
lean::cnstr_set(x_5, 2, x_1);
lean::cnstr_set(x_5, 3, x_3);
x_6 = 0;
x_7 = lean::alloc_cnstr(1, 1, 1);
lean::cnstr_set(x_7, 0, x_5);
lean::cnstr_set_scalar(x_7, sizeof(void*)*1, x_6);
x_8 = x_7;
return x_8;
}
else
{
obj* x_10; obj* x_13; uint8 x_14; obj* x_15; obj* x_16;
lean::dec(x_4);
x_10 = lean::cnstr_get(x_2, 0);
lean::inc(x_10);
lean::dec(x_2);
x_13 = lean::alloc_cnstr(0, 4, 0);
lean::cnstr_set(x_13, 0, x_10);
lean::cnstr_set(x_13, 1, x_0);
lean::cnstr_set(x_13, 2, x_1);
lean::cnstr_set(x_13, 3, x_3);
x_14 = 0;
x_15 = lean::alloc_cnstr(1, 1, 1);
lean::cnstr_set(x_15, 0, x_13);
lean::cnstr_set_scalar(x_15, sizeof(void*)*1, x_14);
x_16 = x_15;
return x_16;
}
}
}
obj* l_Lean_Parser_MonadParsec_error___at___private_init_lean_name__mangling_2__parseMangledStringAux___main___spec__3(obj* x_0) {
_start:
{
obj* x_1;
x_1 = lean::alloc_closure(reinterpret_cast<void*>(l_Lean_Parser_MonadParsec_error___at___private_init_lean_name__mangling_2__parseMangledStringAux___main___spec__3___rarg___boxed), 5, 0);
x_1 = lean::alloc_closure(reinterpret_cast<void*>(l_Lean_Parser_MonadParsec_error___at___private_init_lean_name__mangling_2__parseMangledStringAux___main___spec__3___rarg), 5, 0);
return x_1;
}
}
@ -416,48 +435,46 @@ uint8 x_1;
x_1 = l_String_OldIterator_hasNext___main(x_0);
if (x_1 == 0)
{
obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_7; obj* x_8;
obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7;
x_2 = lean::box(0);
x_3 = l_Lean_Parser_MonadParsec_eoiError___rarg___closed__1;
x_4 = l_mjoin___rarg___closed__1;
x_5 = l_Lean_Parser_MonadParsec_error___at___private_init_lean_name__mangling_2__parseMangledStringAux___main___spec__3___rarg(x_3, x_4, x_2, x_2, x_0);
lean::dec(x_0);
x_7 = l_Lean_Parser_Parsec_Result_mkEps___rarg___closed__1;
x_8 = l_Lean_Parser_ParsecT_bindMkRes___rarg(x_7, x_5);
return x_8;
x_6 = l_Lean_Parser_Parsec_Result_mkEps___rarg___closed__1;
x_7 = l_Lean_Parser_ParsecT_bindMkRes___rarg(x_6, x_5);
return x_7;
}
else
{
uint32 x_9; uint8 x_10;
x_9 = l_String_OldIterator_curr___main(x_0);
x_10 = l_Char_isDigit(x_9);
if (x_10 == 0)
uint32 x_8; uint8 x_9;
x_8 = l_String_OldIterator_curr___main(x_0);
x_9 = l_Char_isDigit(x_8);
if (x_9 == 0)
{
obj* x_11; obj* x_12; obj* x_13; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_20; obj* x_21;
x_11 = l_Char_quoteCore(x_9);
x_12 = l_Char_HasRepr___closed__1;
x_13 = lean::string_append(x_12, x_11);
lean::dec(x_11);
x_15 = lean::string_append(x_13, x_12);
x_16 = lean::box(0);
x_17 = l_mjoin___rarg___closed__1;
x_18 = l_Lean_Parser_MonadParsec_error___at___private_init_lean_name__mangling_2__parseMangledStringAux___main___spec__3___rarg(x_15, x_17, x_16, x_16, x_0);
lean::dec(x_0);
x_20 = l_Lean_Parser_Parsec_Result_mkEps___rarg___closed__1;
x_21 = l_Lean_Parser_ParsecT_bindMkRes___rarg(x_20, x_18);
return x_21;
obj* x_10; obj* x_11; obj* x_12; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19;
x_10 = l_Char_quoteCore(x_8);
x_11 = l_Char_HasRepr___closed__1;
x_12 = lean::string_append(x_11, x_10);
lean::dec(x_10);
x_14 = lean::string_append(x_12, x_11);
x_15 = lean::box(0);
x_16 = l_mjoin___rarg___closed__1;
x_17 = l_Lean_Parser_MonadParsec_error___at___private_init_lean_name__mangling_2__parseMangledStringAux___main___spec__3___rarg(x_14, x_16, x_15, x_15, x_0);
x_18 = l_Lean_Parser_Parsec_Result_mkEps___rarg___closed__1;
x_19 = l_Lean_Parser_ParsecT_bindMkRes___rarg(x_18, x_17);
return x_19;
}
else
{
obj* x_22; obj* x_23; obj* x_24; obj* x_25;
x_22 = l_String_OldIterator_next___main(x_0);
x_23 = lean::box(0);
x_24 = lean::box_uint32(x_9);
x_25 = lean::alloc_cnstr(0, 3, 0);
lean::cnstr_set(x_25, 0, x_24);
lean::cnstr_set(x_25, 1, x_22);
lean::cnstr_set(x_25, 2, x_23);
return x_25;
obj* x_20; obj* x_21; obj* x_22; obj* x_23;
x_20 = l_String_OldIterator_next___main(x_0);
x_21 = lean::box(0);
x_22 = lean::box_uint32(x_8);
x_23 = lean::alloc_cnstr(0, 3, 0);
lean::cnstr_set(x_23, 0, x_22);
lean::cnstr_set(x_23, 1, x_20);
lean::cnstr_set(x_23, 2, x_21);
return x_23;
}
}
}
@ -564,243 +581,243 @@ lean::dec(x_1);
x_42 = l_String_OldIterator_hasNext___main(x_0);
if (x_42 == 0)
{
obj* x_43; obj* x_44; obj* x_45; obj* x_46;
obj* x_43; obj* x_44; obj* x_45; obj* x_47;
x_43 = lean::box(0);
x_44 = l_Lean_Parser_MonadParsec_eoiError___rarg___closed__1;
x_45 = l_mjoin___rarg___closed__1;
x_46 = l_Lean_Parser_MonadParsec_error___at___private_init_lean_name__mangling_2__parseMangledStringAux___main___spec__3___rarg(x_44, x_45, x_43, x_43, x_0);
x_40 = x_46;
goto lbl_41;
}
else
{
uint32 x_47; uint32 x_48; uint8 x_49;
x_47 = l_String_OldIterator_curr___main(x_0);
x_48 = 97;
x_49 = x_48 <= x_47;
if (x_49 == 0)
{
obj* x_50; obj* x_51; obj* x_52; obj* x_54; obj* x_55; obj* x_56; obj* x_57;
x_50 = l_Char_quoteCore(x_47);
x_51 = l_Char_HasRepr___closed__1;
x_52 = lean::string_append(x_51, x_50);
lean::dec(x_50);
x_54 = lean::string_append(x_52, x_51);
x_55 = lean::box(0);
x_56 = l_mjoin___rarg___closed__1;
x_57 = l_Lean_Parser_MonadParsec_error___at___private_init_lean_name__mangling_2__parseMangledStringAux___main___spec__3___rarg(x_54, x_56, x_55, x_55, x_0);
x_40 = x_57;
goto lbl_41;
}
else
{
uint32 x_58; uint8 x_59;
x_58 = 102;
x_59 = x_47 <= x_58;
if (x_59 == 0)
{
obj* x_60; obj* x_61; obj* x_62; obj* x_64; obj* x_65; obj* x_66; obj* x_67;
x_60 = l_Char_quoteCore(x_47);
x_61 = l_Char_HasRepr___closed__1;
x_62 = lean::string_append(x_61, x_60);
lean::dec(x_60);
x_64 = lean::string_append(x_62, x_61);
x_65 = lean::box(0);
x_66 = l_mjoin___rarg___closed__1;
x_67 = l_Lean_Parser_MonadParsec_error___at___private_init_lean_name__mangling_2__parseMangledStringAux___main___spec__3___rarg(x_64, x_66, x_65, x_65, x_0);
x_40 = x_67;
goto lbl_41;
}
else
{
obj* x_69; obj* x_70; obj* x_71; obj* x_72;
lean::inc(x_0);
x_69 = l_String_OldIterator_next___main(x_0);
x_70 = lean::box(0);
x_71 = lean::box_uint32(x_47);
x_72 = lean::alloc_cnstr(0, 3, 0);
lean::cnstr_set(x_72, 0, x_71);
lean::cnstr_set(x_72, 1, x_69);
lean::cnstr_set(x_72, 2, x_70);
x_40 = x_72;
x_47 = l_Lean_Parser_MonadParsec_error___at___private_init_lean_name__mangling_2__parseMangledStringAux___main___spec__3___rarg(x_44, x_45, x_43, x_43, x_0);
x_40 = x_47;
goto lbl_41;
}
else
{
uint32 x_48; uint32 x_49; uint8 x_50;
x_48 = l_String_OldIterator_curr___main(x_0);
x_49 = 97;
x_50 = x_49 <= x_48;
if (x_50 == 0)
{
obj* x_51; obj* x_52; obj* x_53; obj* x_55; obj* x_56; obj* x_57; obj* x_59;
x_51 = l_Char_quoteCore(x_48);
x_52 = l_Char_HasRepr___closed__1;
x_53 = lean::string_append(x_52, x_51);
lean::dec(x_51);
x_55 = lean::string_append(x_53, x_52);
x_56 = lean::box(0);
x_57 = l_mjoin___rarg___closed__1;
lean::inc(x_0);
x_59 = l_Lean_Parser_MonadParsec_error___at___private_init_lean_name__mangling_2__parseMangledStringAux___main___spec__3___rarg(x_55, x_57, x_56, x_56, x_0);
x_40 = x_59;
goto lbl_41;
}
else
{
uint32 x_60; uint8 x_61;
x_60 = 102;
x_61 = x_48 <= x_60;
if (x_61 == 0)
{
obj* x_62; obj* x_63; obj* x_64; obj* x_66; obj* x_67; obj* x_68; obj* x_70;
x_62 = l_Char_quoteCore(x_48);
x_63 = l_Char_HasRepr___closed__1;
x_64 = lean::string_append(x_63, x_62);
lean::dec(x_62);
x_66 = lean::string_append(x_64, x_63);
x_67 = lean::box(0);
x_68 = l_mjoin___rarg___closed__1;
lean::inc(x_0);
x_70 = l_Lean_Parser_MonadParsec_error___at___private_init_lean_name__mangling_2__parseMangledStringAux___main___spec__3___rarg(x_66, x_68, x_67, x_67, x_0);
x_40 = x_70;
goto lbl_41;
}
else
{
obj* x_72; obj* x_73; obj* x_74; obj* x_75;
lean::inc(x_0);
x_72 = l_String_OldIterator_next___main(x_0);
x_73 = lean::box(0);
x_74 = lean::box_uint32(x_48);
x_75 = lean::alloc_cnstr(0, 3, 0);
lean::cnstr_set(x_75, 0, x_74);
lean::cnstr_set(x_75, 1, x_72);
lean::cnstr_set(x_75, 2, x_73);
x_40 = x_75;
goto lbl_41;
}
}
}
lbl_41:
{
obj* x_73; obj* x_74;
x_73 = l_Lean_Parser_Parsec_Result_mkEps___rarg___closed__1;
x_74 = l_Lean_Parser_ParsecT_bindMkRes___rarg(x_73, x_40);
if (lean::obj_tag(x_74) == 0)
obj* x_76; obj* x_77;
x_76 = l_Lean_Parser_Parsec_Result_mkEps___rarg___closed__1;
x_77 = l_Lean_Parser_ParsecT_bindMkRes___rarg(x_76, x_40);
if (lean::obj_tag(x_77) == 0)
{
obj* x_75; obj* x_77; obj* x_79; obj* x_81; uint32 x_82; obj* x_83; obj* x_84; obj* x_85; obj* x_87; obj* x_88; obj* x_90; obj* x_91;
x_75 = lean::cnstr_get(x_74, 0);
x_77 = lean::cnstr_get(x_74, 1);
x_79 = lean::cnstr_get(x_74, 2);
if (lean::is_exclusive(x_74)) {
x_81 = x_74;
obj* x_78; obj* x_80; obj* x_82; obj* x_84; uint32 x_85; obj* x_86; obj* x_87; obj* x_88; obj* x_90; obj* x_91; obj* x_93; obj* x_94;
x_78 = lean::cnstr_get(x_77, 0);
x_80 = lean::cnstr_get(x_77, 1);
x_82 = lean::cnstr_get(x_77, 2);
if (lean::is_exclusive(x_77)) {
x_84 = x_77;
} else {
lean::inc(x_75);
lean::inc(x_77);
lean::inc(x_79);
lean::dec(x_74);
x_81 = lean::box(0);
lean::inc(x_78);
lean::inc(x_80);
lean::inc(x_82);
lean::dec(x_77);
x_84 = lean::box(0);
}
x_82 = lean::unbox_uint32(x_75);
x_83 = lean::uint32_to_nat(x_82);
x_84 = l_Lean_Parser_parseHexDigit___rarg___lambda__3___closed__1;
x_85 = lean::nat_sub(x_83, x_84);
lean::dec(x_83);
x_87 = lean::mk_nat_obj(10ul);
x_88 = lean::nat_add(x_87, x_85);
lean::dec(x_85);
if (lean::is_scalar(x_81)) {
x_90 = lean::alloc_cnstr(0, 3, 0);
x_85 = lean::unbox_uint32(x_78);
x_86 = lean::uint32_to_nat(x_85);
x_87 = l_Lean_Parser_parseHexDigit___rarg___lambda__3___closed__1;
x_88 = lean::nat_sub(x_86, x_87);
lean::dec(x_86);
x_90 = lean::mk_nat_obj(10ul);
x_91 = lean::nat_add(x_90, x_88);
lean::dec(x_88);
if (lean::is_scalar(x_84)) {
x_93 = lean::alloc_cnstr(0, 3, 0);
} else {
x_90 = x_81;
x_93 = x_84;
}
lean::cnstr_set(x_90, 0, x_88);
lean::cnstr_set(x_90, 1, x_77);
lean::cnstr_set(x_90, 2, x_73);
x_91 = l_Lean_Parser_ParsecT_bindMkRes___rarg(x_79, x_90);
if (lean::obj_tag(x_91) == 0)
lean::cnstr_set(x_93, 0, x_91);
lean::cnstr_set(x_93, 1, x_80);
lean::cnstr_set(x_93, 2, x_76);
x_94 = l_Lean_Parser_ParsecT_bindMkRes___rarg(x_82, x_93);
if (lean::obj_tag(x_94) == 0)
{
obj* x_93; obj* x_94; obj* x_95;
obj* x_96; obj* x_97; obj* x_98;
lean::dec(x_0);
x_93 = l_Lean_Parser_ParsecT_orelseMkRes___rarg(x_2, x_91);
x_94 = l_Lean_Parser_parseHexDigit___at___private_init_lean_name__mangling_2__parseMangledStringAux___main___spec__2___closed__1;
x_95 = l_Lean_Parser_ParsecT_labelsMkRes___rarg(x_93, x_94);
return x_95;
x_96 = l_Lean_Parser_ParsecT_orelseMkRes___rarg(x_2, x_94);
x_97 = l_Lean_Parser_parseHexDigit___at___private_init_lean_name__mangling_2__parseMangledStringAux___main___spec__2___closed__1;
x_98 = l_Lean_Parser_ParsecT_labelsMkRes___rarg(x_96, x_97);
return x_98;
}
else
{
obj* x_96; uint8 x_98;
x_96 = lean::cnstr_get(x_91, 0);
lean::inc(x_96);
x_98 = lean::cnstr_get_scalar<uint8>(x_91, sizeof(void*)*1);
x_35 = x_91;
x_36 = x_96;
x_37 = x_98;
goto lbl_38;
}
}
else
{
obj* x_99; uint8 x_101; obj* x_102; obj* x_104; obj* x_105;
x_99 = lean::cnstr_get(x_74, 0);
x_101 = lean::cnstr_get_scalar<uint8>(x_74, sizeof(void*)*1);
if (lean::is_exclusive(x_74)) {
x_102 = x_74;
} else {
lean::inc(x_99);
lean::dec(x_74);
x_102 = lean::box(0);
}
obj* x_99; uint8 x_101;
x_99 = lean::cnstr_get(x_94, 0);
lean::inc(x_99);
if (lean::is_scalar(x_102)) {
x_104 = lean::alloc_cnstr(1, 1, 1);
} else {
x_104 = x_102;
}
lean::cnstr_set(x_104, 0, x_99);
lean::cnstr_set_scalar(x_104, sizeof(void*)*1, x_101);
x_105 = x_104;
x_35 = x_105;
x_101 = lean::cnstr_get_scalar<uint8>(x_94, sizeof(void*)*1);
x_35 = x_94;
x_36 = x_99;
x_37 = x_101;
goto lbl_38;
}
}
else
{
obj* x_102; uint8 x_104; obj* x_105; obj* x_107; obj* x_108;
x_102 = lean::cnstr_get(x_77, 0);
x_104 = lean::cnstr_get_scalar<uint8>(x_77, sizeof(void*)*1);
if (lean::is_exclusive(x_77)) {
x_105 = x_77;
} else {
lean::inc(x_102);
lean::dec(x_77);
x_105 = lean::box(0);
}
lean::inc(x_102);
if (lean::is_scalar(x_105)) {
x_107 = lean::alloc_cnstr(1, 1, 1);
} else {
x_107 = x_105;
}
lean::cnstr_set(x_107, 0, x_102);
lean::cnstr_set_scalar(x_107, sizeof(void*)*1, x_104);
x_108 = x_107;
x_35 = x_108;
x_36 = x_102;
x_37 = x_104;
goto lbl_38;
}
}
}
else
{
obj* x_108; obj* x_109;
obj* x_111; obj* x_112;
lean::dec(x_0);
lean::dec(x_2);
x_108 = l_Lean_Parser_parseHexDigit___at___private_init_lean_name__mangling_2__parseMangledStringAux___main___spec__2___closed__1;
x_109 = l_Lean_Parser_ParsecT_labelsMkRes___rarg(x_1, x_108);
return x_109;
x_111 = l_Lean_Parser_parseHexDigit___at___private_init_lean_name__mangling_2__parseMangledStringAux___main___spec__2___closed__1;
x_112 = l_Lean_Parser_ParsecT_labelsMkRes___rarg(x_1, x_111);
return x_112;
}
lbl_38:
{
if (x_37 == 0)
{
obj* x_111; uint8 x_113;
obj* x_114; uint8 x_116;
lean::dec(x_35);
x_113 = l_String_OldIterator_hasNext___main(x_0);
if (x_113 == 0)
x_116 = l_String_OldIterator_hasNext___main(x_0);
if (x_116 == 0)
{
obj* x_114; obj* x_115; obj* x_116; obj* x_117;
x_114 = lean::box(0);
x_115 = l_Lean_Parser_MonadParsec_eoiError___rarg___closed__1;
x_116 = l_mjoin___rarg___closed__1;
x_117 = l_Lean_Parser_MonadParsec_error___at___private_init_lean_name__mangling_2__parseMangledStringAux___main___spec__3___rarg(x_115, x_116, x_114, x_114, x_0);
lean::dec(x_0);
x_111 = x_117;
goto lbl_112;
obj* x_117; obj* x_118; obj* x_119; obj* x_120;
x_117 = lean::box(0);
x_118 = l_Lean_Parser_MonadParsec_eoiError___rarg___closed__1;
x_119 = l_mjoin___rarg___closed__1;
x_120 = l_Lean_Parser_MonadParsec_error___at___private_init_lean_name__mangling_2__parseMangledStringAux___main___spec__3___rarg(x_118, x_119, x_117, x_117, x_0);
x_114 = x_120;
goto lbl_115;
}
else
{
uint32 x_119; uint32 x_120; uint8 x_121;
x_119 = l_String_OldIterator_curr___main(x_0);
x_120 = 65;
x_121 = x_120 <= x_119;
if (x_121 == 0)
uint32 x_121; uint32 x_122; uint8 x_123;
x_121 = l_String_OldIterator_curr___main(x_0);
x_122 = 65;
x_123 = x_122 <= x_121;
if (x_123 == 0)
{
obj* x_122; obj* x_123; obj* x_124; obj* x_126; obj* x_127; obj* x_128; obj* x_129;
x_122 = l_Char_quoteCore(x_119);
x_123 = l_Char_HasRepr___closed__1;
x_124 = lean::string_append(x_123, x_122);
lean::dec(x_122);
x_126 = lean::string_append(x_124, x_123);
x_127 = lean::box(0);
x_128 = l_mjoin___rarg___closed__1;
x_129 = l_Lean_Parser_MonadParsec_error___at___private_init_lean_name__mangling_2__parseMangledStringAux___main___spec__3___rarg(x_126, x_128, x_127, x_127, x_0);
lean::dec(x_0);
x_111 = x_129;
goto lbl_112;
obj* x_124; obj* x_125; obj* x_126; obj* x_128; obj* x_129; obj* x_130; obj* x_131;
x_124 = l_Char_quoteCore(x_121);
x_125 = l_Char_HasRepr___closed__1;
x_126 = lean::string_append(x_125, x_124);
lean::dec(x_124);
x_128 = lean::string_append(x_126, x_125);
x_129 = lean::box(0);
x_130 = l_mjoin___rarg___closed__1;
x_131 = l_Lean_Parser_MonadParsec_error___at___private_init_lean_name__mangling_2__parseMangledStringAux___main___spec__3___rarg(x_128, x_130, x_129, x_129, x_0);
x_114 = x_131;
goto lbl_115;
}
else
{
uint32 x_131; uint8 x_132;
x_131 = 70;
x_132 = x_119 <= x_131;
if (x_132 == 0)
uint32 x_132; uint8 x_133;
x_132 = 70;
x_133 = x_121 <= x_132;
if (x_133 == 0)
{
obj* x_133; obj* x_134; obj* x_135; obj* x_137; obj* x_138; obj* x_139; obj* x_140;
x_133 = l_Char_quoteCore(x_119);
x_134 = l_Char_HasRepr___closed__1;
x_135 = lean::string_append(x_134, x_133);
lean::dec(x_133);
x_137 = lean::string_append(x_135, x_134);
x_138 = lean::box(0);
x_139 = l_mjoin___rarg___closed__1;
x_140 = l_Lean_Parser_MonadParsec_error___at___private_init_lean_name__mangling_2__parseMangledStringAux___main___spec__3___rarg(x_137, x_139, x_138, x_138, x_0);
lean::dec(x_0);
x_111 = x_140;
goto lbl_112;
obj* x_134; obj* x_135; obj* x_136; obj* x_138; obj* x_139; obj* x_140; obj* x_141;
x_134 = l_Char_quoteCore(x_121);
x_135 = l_Char_HasRepr___closed__1;
x_136 = lean::string_append(x_135, x_134);
lean::dec(x_134);
x_138 = lean::string_append(x_136, x_135);
x_139 = lean::box(0);
x_140 = l_mjoin___rarg___closed__1;
x_141 = l_Lean_Parser_MonadParsec_error___at___private_init_lean_name__mangling_2__parseMangledStringAux___main___spec__3___rarg(x_138, x_140, x_139, x_139, x_0);
x_114 = x_141;
goto lbl_115;
}
else
{
obj* x_142; obj* x_143; obj* x_144; obj* x_145;
x_142 = l_String_OldIterator_next___main(x_0);
x_143 = lean::box(0);
x_144 = lean::box_uint32(x_119);
x_144 = lean::box_uint32(x_121);
x_145 = lean::alloc_cnstr(0, 3, 0);
lean::cnstr_set(x_145, 0, x_144);
lean::cnstr_set(x_145, 1, x_142);
lean::cnstr_set(x_145, 2, x_143);
x_111 = x_145;
goto lbl_112;
x_114 = x_145;
goto lbl_115;
}
}
}
lbl_112:
lbl_115:
{
obj* x_146; obj* x_147;
x_146 = l_Lean_Parser_Parsec_Result_mkEps___rarg___closed__1;
x_147 = l_Lean_Parser_ParsecT_bindMkRes___rarg(x_146, x_111);
x_147 = l_Lean_Parser_ParsecT_bindMkRes___rarg(x_146, x_114);
if (lean::obj_tag(x_147) == 0)
{
obj* x_148; obj* x_150; obj* x_152; obj* x_154; uint32 x_155; obj* x_156; obj* x_157; obj* x_158; obj* x_160; obj* x_161; obj* x_163; obj* x_164; obj* x_165; obj* x_166; obj* x_167; obj* x_168;
@ -888,48 +905,46 @@ uint8 x_1;
x_1 = l_String_OldIterator_hasNext___main(x_0);
if (x_1 == 0)
{
obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_7; obj* x_8;
obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7;
x_2 = lean::box(0);
x_3 = l_Lean_Parser_MonadParsec_eoiError___rarg___closed__1;
x_4 = l_mjoin___rarg___closed__1;
x_5 = l_Lean_Parser_MonadParsec_error___at___private_init_lean_name__mangling_2__parseMangledStringAux___main___spec__3___rarg(x_3, x_4, x_2, x_2, x_0);
lean::dec(x_0);
x_7 = l_Lean_Parser_Parsec_Result_mkEps___rarg___closed__1;
x_8 = l_Lean_Parser_ParsecT_bindMkRes___rarg(x_7, x_5);
return x_8;
x_6 = l_Lean_Parser_Parsec_Result_mkEps___rarg___closed__1;
x_7 = l_Lean_Parser_ParsecT_bindMkRes___rarg(x_6, x_5);
return x_7;
}
else
{
uint32 x_9; uint8 x_10;
x_9 = l_String_OldIterator_curr___main(x_0);
x_10 = l_Char_isAlpha(x_9);
if (x_10 == 0)
uint32 x_8; uint8 x_9;
x_8 = l_String_OldIterator_curr___main(x_0);
x_9 = l_Char_isAlpha(x_8);
if (x_9 == 0)
{
obj* x_11; obj* x_12; obj* x_13; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_20; obj* x_21;
x_11 = l_Char_quoteCore(x_9);
x_12 = l_Char_HasRepr___closed__1;
x_13 = lean::string_append(x_12, x_11);
lean::dec(x_11);
x_15 = lean::string_append(x_13, x_12);
x_16 = lean::box(0);
x_17 = l_mjoin___rarg___closed__1;
x_18 = l_Lean_Parser_MonadParsec_error___at___private_init_lean_name__mangling_2__parseMangledStringAux___main___spec__3___rarg(x_15, x_17, x_16, x_16, x_0);
lean::dec(x_0);
x_20 = l_Lean_Parser_Parsec_Result_mkEps___rarg___closed__1;
x_21 = l_Lean_Parser_ParsecT_bindMkRes___rarg(x_20, x_18);
return x_21;
obj* x_10; obj* x_11; obj* x_12; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19;
x_10 = l_Char_quoteCore(x_8);
x_11 = l_Char_HasRepr___closed__1;
x_12 = lean::string_append(x_11, x_10);
lean::dec(x_10);
x_14 = lean::string_append(x_12, x_11);
x_15 = lean::box(0);
x_16 = l_mjoin___rarg___closed__1;
x_17 = l_Lean_Parser_MonadParsec_error___at___private_init_lean_name__mangling_2__parseMangledStringAux___main___spec__3___rarg(x_14, x_16, x_15, x_15, x_0);
x_18 = l_Lean_Parser_Parsec_Result_mkEps___rarg___closed__1;
x_19 = l_Lean_Parser_ParsecT_bindMkRes___rarg(x_18, x_17);
return x_19;
}
else
{
obj* x_22; obj* x_23; obj* x_24; obj* x_25;
x_22 = l_String_OldIterator_next___main(x_0);
x_23 = lean::box(0);
x_24 = lean::box_uint32(x_9);
x_25 = lean::alloc_cnstr(0, 3, 0);
lean::cnstr_set(x_25, 0, x_24);
lean::cnstr_set(x_25, 1, x_22);
lean::cnstr_set(x_25, 2, x_23);
return x_25;
obj* x_20; obj* x_21; obj* x_22; obj* x_23;
x_20 = l_String_OldIterator_next___main(x_0);
x_21 = lean::box(0);
x_22 = lean::box_uint32(x_8);
x_23 = lean::alloc_cnstr(0, 3, 0);
lean::cnstr_set(x_23, 0, x_22);
lean::cnstr_set(x_23, 1, x_20);
lean::cnstr_set(x_23, 2, x_21);
return x_23;
}
}
}
@ -958,7 +973,7 @@ x_3 = lean::nat_dec_eq(x_1, x_2);
lean::dec(x_1);
if (x_3 == 0)
{
uint32 x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_15; obj* x_16;
uint32 x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15;
x_5 = l_String_OldIterator_curr___main(x_0);
x_6 = l_Char_quoteCore(x_5);
x_7 = l_Char_HasRepr___closed__1;
@ -968,21 +983,20 @@ x_10 = lean::string_append(x_8, x_7);
x_11 = lean::box(0);
x_12 = l_Lean_Parser_MonadParsec_eoi___rarg___lambda__1___closed__1;
x_13 = l_Lean_Parser_MonadParsec_error___at___private_init_lean_name__mangling_2__parseMangledStringAux___main___spec__3___rarg(x_10, x_12, x_11, x_11, x_0);
lean::dec(x_0);
x_15 = l_Lean_Parser_Parsec_Result_mkEps___rarg___closed__1;
x_16 = l_Lean_Parser_ParsecT_bindMkRes___rarg(x_15, x_13);
return x_16;
x_14 = l_Lean_Parser_Parsec_Result_mkEps___rarg___closed__1;
x_15 = l_Lean_Parser_ParsecT_bindMkRes___rarg(x_14, x_13);
return x_15;
}
else
{
obj* x_17; obj* x_18; obj* x_19;
x_17 = lean::box(0);
x_18 = l_Lean_Parser_MonadParsec_eoi___at___private_init_lean_name__mangling_2__parseMangledStringAux___main___spec__6___closed__1;
x_19 = lean::alloc_cnstr(0, 3, 0);
lean::cnstr_set(x_19, 0, x_17);
lean::cnstr_set(x_19, 1, x_0);
lean::cnstr_set(x_19, 2, x_18);
return x_19;
obj* x_16; obj* x_17; obj* x_18;
x_16 = lean::box(0);
x_17 = l_Lean_Parser_MonadParsec_eoi___at___private_init_lean_name__mangling_2__parseMangledStringAux___main___spec__6___closed__1;
x_18 = lean::alloc_cnstr(0, 3, 0);
lean::cnstr_set(x_18, 0, x_16);
lean::cnstr_set(x_18, 1, x_0);
lean::cnstr_set(x_18, 2, x_17);
return x_18;
}
}
}
@ -1849,16 +1863,6 @@ return x_417;
}
}
}
obj* l_Lean_Parser_MonadParsec_error___at___private_init_lean_name__mangling_2__parseMangledStringAux___main___spec__3___rarg___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) {
_start:
{
obj* x_5;
x_5 = l_Lean_Parser_MonadParsec_error___at___private_init_lean_name__mangling_2__parseMangledStringAux___main___spec__3___rarg(x_0, x_1, x_2, x_3, x_4);
lean::dec(x_2);
lean::dec(x_4);
return x_5;
}
}
obj* l_Lean_Parser_MonadParsec_error___at___private_init_lean_name__mangling_2__parseMangledStringAux___main___spec__3___boxed(obj* x_0) {
_start:
{
@ -2058,48 +2062,46 @@ uint8 x_2;
x_2 = l_String_OldIterator_hasNext___main(x_1);
if (x_2 == 0)
{
obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_8; obj* x_9;
obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8;
x_3 = lean::box(0);
x_4 = l_Lean_Parser_MonadParsec_eoiError___rarg___closed__1;
x_5 = l_mjoin___rarg___closed__1;
x_6 = l_Lean_Parser_MonadParsec_error___at___private_init_lean_name__mangling_2__parseMangledStringAux___main___spec__3___rarg(x_4, x_5, x_3, x_3, x_1);
lean::dec(x_1);
x_8 = l_Lean_Parser_Parsec_Result_mkEps___rarg___closed__1;
x_9 = l_Lean_Parser_ParsecT_bindMkRes___rarg(x_8, x_6);
return x_9;
x_7 = l_Lean_Parser_Parsec_Result_mkEps___rarg___closed__1;
x_8 = l_Lean_Parser_ParsecT_bindMkRes___rarg(x_7, x_6);
return x_8;
}
else
{
uint32 x_10; uint8 x_11;
x_10 = l_String_OldIterator_curr___main(x_1);
x_11 = x_10 == x_0;
if (x_11 == 0)
uint32 x_9; uint8 x_10;
x_9 = l_String_OldIterator_curr___main(x_1);
x_10 = x_9 == x_0;
if (x_10 == 0)
{
obj* x_12; obj* x_13; obj* x_14; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_21; obj* x_22;
x_12 = l_Char_quoteCore(x_10);
x_13 = l_Char_HasRepr___closed__1;
x_14 = lean::string_append(x_13, x_12);
lean::dec(x_12);
x_16 = lean::string_append(x_14, x_13);
x_17 = lean::box(0);
x_18 = l_mjoin___rarg___closed__1;
x_19 = l_Lean_Parser_MonadParsec_error___at___private_init_lean_name__mangling_2__parseMangledStringAux___main___spec__3___rarg(x_16, x_18, x_17, x_17, x_1);
lean::dec(x_1);
x_21 = l_Lean_Parser_Parsec_Result_mkEps___rarg___closed__1;
x_22 = l_Lean_Parser_ParsecT_bindMkRes___rarg(x_21, x_19);
return x_22;
obj* x_11; obj* x_12; obj* x_13; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20;
x_11 = l_Char_quoteCore(x_9);
x_12 = l_Char_HasRepr___closed__1;
x_13 = lean::string_append(x_12, x_11);
lean::dec(x_11);
x_15 = lean::string_append(x_13, x_12);
x_16 = lean::box(0);
x_17 = l_mjoin___rarg___closed__1;
x_18 = l_Lean_Parser_MonadParsec_error___at___private_init_lean_name__mangling_2__parseMangledStringAux___main___spec__3___rarg(x_15, x_17, x_16, x_16, x_1);
x_19 = l_Lean_Parser_Parsec_Result_mkEps___rarg___closed__1;
x_20 = l_Lean_Parser_ParsecT_bindMkRes___rarg(x_19, x_18);
return x_20;
}
else
{
obj* x_23; obj* x_24; obj* x_25; obj* x_26;
x_23 = l_String_OldIterator_next___main(x_1);
x_24 = lean::box(0);
x_25 = lean::box_uint32(x_10);
x_26 = lean::alloc_cnstr(0, 3, 0);
lean::cnstr_set(x_26, 0, x_25);
lean::cnstr_set(x_26, 1, x_23);
lean::cnstr_set(x_26, 2, x_24);
return x_26;
obj* x_21; obj* x_22; obj* x_23; obj* x_24;
x_21 = l_String_OldIterator_next___main(x_1);
x_22 = lean::box(0);
x_23 = lean::box_uint32(x_9);
x_24 = lean::alloc_cnstr(0, 3, 0);
lean::cnstr_set(x_24, 0, x_23);
lean::cnstr_set(x_24, 1, x_21);
lean::cnstr_set(x_24, 2, x_22);
return x_24;
}
}
}
@ -2297,123 +2299,121 @@ uint8 x_1;
x_1 = l_String_OldIterator_hasNext___main(x_0);
if (x_1 == 0)
{
obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_7; obj* x_8;
obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7;
x_2 = lean::box(0);
x_3 = l_Lean_Parser_MonadParsec_eoiError___rarg___closed__1;
x_4 = l_mjoin___rarg___closed__1;
x_5 = l_Lean_Parser_MonadParsec_error___at___private_init_lean_name__mangling_2__parseMangledStringAux___main___spec__3___rarg(x_3, x_4, x_2, x_2, x_0);
lean::dec(x_0);
x_7 = l_Lean_Parser_Parsec_Result_mkEps___rarg___closed__1;
x_8 = l_Lean_Parser_ParsecT_bindMkRes___rarg(x_7, x_5);
if (lean::obj_tag(x_8) == 0)
x_6 = l_Lean_Parser_Parsec_Result_mkEps___rarg___closed__1;
x_7 = l_Lean_Parser_ParsecT_bindMkRes___rarg(x_6, x_5);
if (lean::obj_tag(x_7) == 0)
{
obj* x_9; obj* x_11; obj* x_13; obj* x_16; uint32 x_17; obj* x_18; obj* x_19; obj* x_20;
x_9 = lean::cnstr_get(x_8, 0);
lean::inc(x_9);
x_11 = lean::cnstr_get(x_8, 1);
lean::inc(x_11);
x_13 = lean::cnstr_get(x_8, 2);
lean::inc(x_13);
lean::dec(x_8);
x_16 = l_String_splitAux___main___closed__1;
x_17 = lean::unbox_uint32(x_9);
x_18 = lean::string_push(x_16, x_17);
x_19 = l_Lean_Parser_MonadParsec_takeWhileCont___at___private_init_lean_name__mangling_5__parseMangledNameAux___main___spec__4(x_18, x_11);
x_20 = l_Lean_Parser_ParsecT_bindMkRes___rarg(x_13, x_19);
return x_20;
obj* x_8; obj* x_10; obj* x_12; obj* x_15; uint32 x_16; obj* x_17; obj* x_18; obj* x_19;
x_8 = lean::cnstr_get(x_7, 0);
lean::inc(x_8);
x_10 = lean::cnstr_get(x_7, 1);
lean::inc(x_10);
x_12 = lean::cnstr_get(x_7, 2);
lean::inc(x_12);
lean::dec(x_7);
x_15 = l_String_splitAux___main___closed__1;
x_16 = lean::unbox_uint32(x_8);
x_17 = lean::string_push(x_15, x_16);
x_18 = l_Lean_Parser_MonadParsec_takeWhileCont___at___private_init_lean_name__mangling_5__parseMangledNameAux___main___spec__4(x_17, x_10);
x_19 = l_Lean_Parser_ParsecT_bindMkRes___rarg(x_12, x_18);
return x_19;
}
else
{
obj* x_21; uint8 x_23; obj* x_24; obj* x_25; obj* x_26;
x_21 = lean::cnstr_get(x_8, 0);
x_23 = lean::cnstr_get_scalar<uint8>(x_8, sizeof(void*)*1);
if (lean::is_exclusive(x_8)) {
x_24 = x_8;
obj* x_20; uint8 x_22; obj* x_23; obj* x_24; obj* x_25;
x_20 = lean::cnstr_get(x_7, 0);
x_22 = lean::cnstr_get_scalar<uint8>(x_7, sizeof(void*)*1);
if (lean::is_exclusive(x_7)) {
x_23 = x_7;
} else {
lean::inc(x_21);
lean::dec(x_8);
x_24 = lean::box(0);
lean::inc(x_20);
lean::dec(x_7);
x_23 = lean::box(0);
}
if (lean::is_scalar(x_24)) {
x_25 = lean::alloc_cnstr(1, 1, 1);
if (lean::is_scalar(x_23)) {
x_24 = lean::alloc_cnstr(1, 1, 1);
} else {
x_25 = x_24;
x_24 = x_23;
}
lean::cnstr_set(x_25, 0, x_21);
lean::cnstr_set_scalar(x_25, sizeof(void*)*1, x_23);
x_26 = x_25;
return x_26;
lean::cnstr_set(x_24, 0, x_20);
lean::cnstr_set_scalar(x_24, sizeof(void*)*1, x_22);
x_25 = x_24;
return x_25;
}
}
else
{
uint32 x_27; uint8 x_28;
x_27 = l_String_OldIterator_curr___main(x_0);
x_28 = l_Char_isDigit(x_27);
if (x_28 == 0)
uint32 x_26; uint8 x_27;
x_26 = l_String_OldIterator_curr___main(x_0);
x_27 = l_Char_isDigit(x_26);
if (x_27 == 0)
{
obj* x_29; obj* x_30; obj* x_31; obj* x_33; obj* x_34; obj* x_35; obj* x_36; obj* x_38; obj* x_39;
x_29 = l_Char_quoteCore(x_27);
x_30 = l_Char_HasRepr___closed__1;
x_31 = lean::string_append(x_30, x_29);
lean::dec(x_29);
x_33 = lean::string_append(x_31, x_30);
x_34 = lean::box(0);
x_35 = l_mjoin___rarg___closed__1;
x_36 = l_Lean_Parser_MonadParsec_error___at___private_init_lean_name__mangling_2__parseMangledStringAux___main___spec__3___rarg(x_33, x_35, x_34, x_34, x_0);
lean::dec(x_0);
x_38 = l_Lean_Parser_Parsec_Result_mkEps___rarg___closed__1;
x_39 = l_Lean_Parser_ParsecT_bindMkRes___rarg(x_38, x_36);
if (lean::obj_tag(x_39) == 0)
obj* x_28; obj* x_29; obj* x_30; obj* x_32; obj* x_33; obj* x_34; obj* x_35; obj* x_36; obj* x_37;
x_28 = l_Char_quoteCore(x_26);
x_29 = l_Char_HasRepr___closed__1;
x_30 = lean::string_append(x_29, x_28);
lean::dec(x_28);
x_32 = lean::string_append(x_30, x_29);
x_33 = lean::box(0);
x_34 = l_mjoin___rarg___closed__1;
x_35 = l_Lean_Parser_MonadParsec_error___at___private_init_lean_name__mangling_2__parseMangledStringAux___main___spec__3___rarg(x_32, x_34, x_33, x_33, x_0);
x_36 = l_Lean_Parser_Parsec_Result_mkEps___rarg___closed__1;
x_37 = l_Lean_Parser_ParsecT_bindMkRes___rarg(x_36, x_35);
if (lean::obj_tag(x_37) == 0)
{
obj* x_40; obj* x_42; obj* x_44; obj* x_47; uint32 x_48; obj* x_49; obj* x_50; obj* x_51;
x_40 = lean::cnstr_get(x_39, 0);
obj* x_38; obj* x_40; obj* x_42; obj* x_45; uint32 x_46; obj* x_47; obj* x_48; obj* x_49;
x_38 = lean::cnstr_get(x_37, 0);
lean::inc(x_38);
x_40 = lean::cnstr_get(x_37, 1);
lean::inc(x_40);
x_42 = lean::cnstr_get(x_39, 1);
x_42 = lean::cnstr_get(x_37, 2);
lean::inc(x_42);
x_44 = lean::cnstr_get(x_39, 2);
lean::inc(x_44);
lean::dec(x_39);
x_47 = l_String_splitAux___main___closed__1;
x_48 = lean::unbox_uint32(x_40);
x_49 = lean::string_push(x_47, x_48);
x_50 = l_Lean_Parser_MonadParsec_takeWhileCont___at___private_init_lean_name__mangling_5__parseMangledNameAux___main___spec__6(x_49, x_42);
x_51 = l_Lean_Parser_ParsecT_bindMkRes___rarg(x_44, x_50);
return x_51;
lean::dec(x_37);
x_45 = l_String_splitAux___main___closed__1;
x_46 = lean::unbox_uint32(x_38);
x_47 = lean::string_push(x_45, x_46);
x_48 = l_Lean_Parser_MonadParsec_takeWhileCont___at___private_init_lean_name__mangling_5__parseMangledNameAux___main___spec__6(x_47, x_40);
x_49 = l_Lean_Parser_ParsecT_bindMkRes___rarg(x_42, x_48);
return x_49;
}
else
{
obj* x_52; uint8 x_54; obj* x_55; obj* x_56; obj* x_57;
x_52 = lean::cnstr_get(x_39, 0);
x_54 = lean::cnstr_get_scalar<uint8>(x_39, sizeof(void*)*1);
if (lean::is_exclusive(x_39)) {
x_55 = x_39;
obj* x_50; uint8 x_52; obj* x_53; obj* x_54; obj* x_55;
x_50 = lean::cnstr_get(x_37, 0);
x_52 = lean::cnstr_get_scalar<uint8>(x_37, sizeof(void*)*1);
if (lean::is_exclusive(x_37)) {
x_53 = x_37;
} else {
lean::inc(x_52);
lean::dec(x_39);
x_55 = lean::box(0);
lean::inc(x_50);
lean::dec(x_37);
x_53 = lean::box(0);
}
if (lean::is_scalar(x_55)) {
x_56 = lean::alloc_cnstr(1, 1, 1);
if (lean::is_scalar(x_53)) {
x_54 = lean::alloc_cnstr(1, 1, 1);
} else {
x_56 = x_55;
x_54 = x_53;
}
lean::cnstr_set(x_56, 0, x_52);
lean::cnstr_set_scalar(x_56, sizeof(void*)*1, x_54);
x_57 = x_56;
return x_57;
lean::cnstr_set(x_54, 0, x_50);
lean::cnstr_set_scalar(x_54, sizeof(void*)*1, x_52);
x_55 = x_54;
return x_55;
}
}
else
{
obj* x_58; obj* x_59; obj* x_60; obj* x_61; obj* x_62; obj* x_63;
x_58 = l_String_OldIterator_next___main(x_0);
x_59 = lean::box(0);
x_60 = l_String_splitAux___main___closed__1;
x_61 = lean::string_push(x_60, x_27);
x_62 = l_Lean_Parser_MonadParsec_takeWhileCont___at___private_init_lean_name__mangling_5__parseMangledNameAux___main___spec__8(x_61, x_58);
x_63 = l_Lean_Parser_ParsecT_bindMkRes___rarg(x_59, x_62);
return x_63;
obj* x_56; obj* x_57; obj* x_58; obj* x_59; obj* x_60; obj* x_61;
x_56 = l_String_OldIterator_next___main(x_0);
x_57 = lean::box(0);
x_58 = l_String_splitAux___main___closed__1;
x_59 = lean::string_push(x_58, x_26);
x_60 = l_Lean_Parser_MonadParsec_takeWhileCont___at___private_init_lean_name__mangling_5__parseMangledNameAux___main___spec__8(x_59, x_56);
x_61 = l_Lean_Parser_ParsecT_bindMkRes___rarg(x_57, x_60);
return x_61;
}
}
}

View file

@ -79,8 +79,6 @@ obj* l_Lean_Parser_mkTokenTrie(obj*);
obj* l_Lean_Parser_parserCoreT_Monad(obj*);
obj* l_List_mfoldl___main___at_Lean_Parser_mkTokenTrie___spec__1(obj*, obj*);
obj* l_Lean_Parser_tokenMapCons_tokens___boxed(obj*, obj*, obj*, obj*);
obj* l_Option_get___main___at_Lean_Parser_run___spec__2___boxed(obj*);
obj* l_Option_get___main___at_Lean_Parser_run___spec__2(obj*);
obj* l_Lean_Parser_parserCoreT_Alternative___rarg(obj*);
obj* l_Lean_Parser_tokenMapCons_tokens(obj*, obj*, obj*, obj*);
obj* l_Lean_Parser_logMessage___boxed(obj*, obj*, obj*);
@ -156,6 +154,7 @@ obj* l_Lean_Parser_getCache___rarg(obj*, obj*);
obj* l_Lean_Parser_TrailingTermParserM_MonadReader;
obj* l_RBNode_ins___main___at_Lean_Parser_TokenMap_insert___spec__5___rarg___boxed(obj*, obj*, obj*, obj*);
obj* l_ReaderT_MonadFunctor___boxed(obj*, obj*, obj*, obj*, obj*, obj*);
obj* l_Lean_Parser_run___rarg___lambda__1___closed__1;
obj* l_RBNode_ins___main___at_Lean_Parser_TokenMap_insert___spec__4___rarg___boxed(obj*, obj*, obj*, obj*);
obj* l_Lean_Parser_CommandParserM_MonadReader___boxed(obj*);
obj* l_Lean_Parser_HasView_default___boxed(obj*);
@ -1060,23 +1059,15 @@ x_1 = lean::alloc_closure(reinterpret_cast<void*>(l_Lean_Parser_ParsecT_run___at
return x_1;
}
}
obj* l_Option_get___main___at_Lean_Parser_run___spec__2(obj* x_0) {
obj* _init_l_Lean_Parser_run___rarg___lambda__1___closed__1() {
_start:
{
if (lean::obj_tag(x_0) == 0)
{
obj* x_1;
x_1 = lean::box(3);
obj* x_0; obj* x_1;
x_0 = lean::box(3);
x_1 = lean::alloc_cnstr(1, 1, 0);
lean::cnstr_set(x_1, 0, x_0);
return x_1;
}
else
{
obj* x_2;
x_2 = lean::cnstr_get(x_0, 0);
lean::inc(x_2);
return x_2;
}
}
}
obj* l_Lean_Parser_run___rarg___lambda__1(obj* x_0, obj* x_1, obj* x_2, obj* x_3) {
_start:
@ -1094,7 +1085,7 @@ if (lean::is_exclusive(x_3)) {
}
if (lean::obj_tag(x_4) == 0)
{
obj* x_7; obj* x_10; obj* x_13; obj* x_16; obj* x_18; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25; obj* x_26;
obj* x_7; obj* x_10; obj* x_13; obj* x_16; obj* x_18; obj* x_19; obj* x_20; obj* x_21;
x_7 = lean::cnstr_get(x_0, 0);
lean::inc(x_7);
lean::dec(x_0);
@ -1106,62 +1097,81 @@ lean::inc(x_13);
lean::dec(x_4);
x_16 = lean::cnstr_get(x_13, 3);
lean::inc(x_16);
x_18 = l_Option_get___main___at_Lean_Parser_run___spec__2(x_16);
lean::dec(x_16);
x_20 = lean::alloc_cnstr(1, 1, 0);
lean::cnstr_set(x_20, 0, x_18);
x_21 = lean::apply_1(x_1, x_2);
x_22 = l_Lean_Parser_messageOfParsecMessage___rarg(x_21, x_13);
x_23 = l_Lean_MessageLog_empty;
x_24 = lean::alloc_cnstr(1, 2, 0);
lean::cnstr_set(x_24, 0, x_22);
lean::cnstr_set(x_24, 1, x_23);
x_18 = lean::apply_1(x_1, x_2);
x_19 = l_Lean_Parser_messageOfParsecMessage___rarg(x_18, x_13);
x_20 = l_Lean_MessageLog_empty;
x_21 = lean::alloc_cnstr(1, 2, 0);
lean::cnstr_set(x_21, 0, x_19);
lean::cnstr_set(x_21, 1, x_20);
if (lean::obj_tag(x_16) == 0)
{
obj* x_22; obj* x_23; obj* x_24;
x_22 = l_Lean_Parser_run___rarg___lambda__1___closed__1;
if (lean::is_scalar(x_6)) {
x_25 = lean::alloc_cnstr(0, 2, 0);
x_23 = lean::alloc_cnstr(0, 2, 0);
} else {
x_25 = x_6;
x_23 = x_6;
}
lean::cnstr_set(x_25, 0, x_20);
lean::cnstr_set(x_25, 1, x_24);
x_26 = lean::apply_2(x_10, lean::box(0), x_25);
return x_26;
lean::cnstr_set(x_23, 0, x_22);
lean::cnstr_set(x_23, 1, x_21);
x_24 = lean::apply_2(x_10, lean::box(0), x_23);
return x_24;
}
else
{
obj* x_30; obj* x_33; obj* x_36; obj* x_39; obj* x_41; obj* x_43; obj* x_44; obj* x_45; obj* x_46;
obj* x_25; obj* x_28; obj* x_29; obj* x_30;
x_25 = lean::cnstr_get(x_16, 0);
lean::inc(x_25);
lean::dec(x_16);
x_28 = lean::alloc_cnstr(1, 1, 0);
lean::cnstr_set(x_28, 0, x_25);
if (lean::is_scalar(x_6)) {
x_29 = lean::alloc_cnstr(0, 2, 0);
} else {
x_29 = x_6;
}
lean::cnstr_set(x_29, 0, x_28);
lean::cnstr_set(x_29, 1, x_21);
x_30 = lean::apply_2(x_10, lean::box(0), x_29);
return x_30;
}
}
else
{
obj* x_34; obj* x_37; obj* x_40; obj* x_43; obj* x_45; obj* x_47; obj* x_48; obj* x_49; obj* x_50;
lean::dec(x_6);
lean::dec(x_1);
lean::dec(x_2);
x_30 = lean::cnstr_get(x_4, 0);
lean::inc(x_30);
x_34 = lean::cnstr_get(x_4, 0);
lean::inc(x_34);
lean::dec(x_4);
x_33 = lean::cnstr_get(x_0, 0);
lean::inc(x_33);
x_37 = lean::cnstr_get(x_0, 0);
lean::inc(x_37);
lean::dec(x_0);
x_36 = lean::cnstr_get(x_33, 1);
lean::inc(x_36);
lean::dec(x_33);
x_39 = lean::cnstr_get(x_30, 0);
x_41 = lean::cnstr_get(x_30, 1);
if (lean::is_exclusive(x_30)) {
x_43 = x_30;
x_40 = lean::cnstr_get(x_37, 1);
lean::inc(x_40);
lean::dec(x_37);
x_43 = lean::cnstr_get(x_34, 0);
x_45 = lean::cnstr_get(x_34, 1);
if (lean::is_exclusive(x_34)) {
x_47 = x_34;
} else {
lean::inc(x_39);
lean::inc(x_41);
lean::dec(x_30);
x_43 = lean::box(0);
lean::inc(x_43);
lean::inc(x_45);
lean::dec(x_34);
x_47 = lean::box(0);
}
x_44 = lean::alloc_cnstr(0, 1, 0);
lean::cnstr_set(x_44, 0, x_39);
if (lean::is_scalar(x_43)) {
x_45 = lean::alloc_cnstr(0, 2, 0);
x_48 = lean::alloc_cnstr(0, 1, 0);
lean::cnstr_set(x_48, 0, x_43);
if (lean::is_scalar(x_47)) {
x_49 = lean::alloc_cnstr(0, 2, 0);
} else {
x_45 = x_43;
x_49 = x_47;
}
lean::cnstr_set(x_45, 0, x_44);
lean::cnstr_set(x_45, 1, x_41);
x_46 = lean::apply_2(x_36, lean::box(0), x_45);
return x_46;
lean::cnstr_set(x_49, 0, x_48);
lean::cnstr_set(x_49, 1, x_45);
x_50 = lean::apply_2(x_40, lean::box(0), x_49);
return x_50;
}
}
}
@ -1227,15 +1237,6 @@ lean::dec(x_0);
return x_1;
}
}
obj* l_Option_get___main___at_Lean_Parser_run___spec__2___boxed(obj* x_0) {
_start:
{
obj* x_1;
x_1 = l_Option_get___main___at_Lean_Parser_run___spec__2(x_0);
lean::dec(x_0);
return x_1;
}
}
obj* l_Lean_Parser_run___boxed(obj* x_0, obj* x_1, obj* x_2) {
_start:
{
@ -3541,6 +3542,8 @@ lean::mark_persistent(l_Lean_Parser_BasicParserM_MonadReader);
lean::mark_persistent(l_Lean_Parser_BasicParserM_Lean_Parser_MonadParsec);
l_Lean_Parser_BasicParserM_MonadExcept = _init_l_Lean_Parser_BasicParserM_MonadExcept();
lean::mark_persistent(l_Lean_Parser_BasicParserM_MonadExcept);
l_Lean_Parser_run___rarg___lambda__1___closed__1 = _init_l_Lean_Parser_run___rarg___lambda__1___closed__1();
lean::mark_persistent(l_Lean_Parser_run___rarg___lambda__1___closed__1);
l_Lean_Parser_run___rarg___closed__1 = _init_l_Lean_Parser_run___rarg___closed__1();
lean::mark_persistent(l_Lean_Parser_run___rarg___closed__1);
l_List_mfoldl___main___at_Lean_Parser_mkTokenTrie___spec__1___closed__1 = _init_l_List_mfoldl___main___at_Lean_Parser_mkTokenTrie___spec__1___closed__1();

View file

@ -97,7 +97,6 @@ obj* l_Lean_Parser_Combinators_node_view___rarg(obj*, obj*, obj*, obj*, obj*, ob
obj* l_Lean_Parser_Combinators_try_view(obj*, obj*, obj*, obj*);
obj* l_Lean_Parser_Combinators_choiceAux___rarg___boxed(obj*, obj*, obj*, obj*, obj*, obj*);
obj* l_Lean_Parser_Combinators_label_view(obj*, obj*, obj*, obj*);
obj* l_Option_get___main___at_Lean_Parser_run___spec__2(obj*);
obj* l_Lean_Parser_Combinators_anyOf___boxed(obj*, obj*, obj*);
obj* l___private_init_lean_parser_combinators_1__many1Aux___main___rarg___lambda__2___boxed(obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*);
obj* l_Lean_Parser_MonadParsec_longestMatch___rarg(obj*, obj*, obj*, obj*, obj*);
@ -167,6 +166,7 @@ obj* l_Lean_Parser_Combinators_optional_tokens___boxed(obj*, obj*, obj*, obj*, o
obj* l_List_append___rarg(obj*, obj*);
obj* l_Lean_Parser_Combinators_choice(obj*);
obj* l_Lean_Parser_Combinators_many___boxed(obj*);
obj* l_Lean_Parser_Combinators_optional___rarg___lambda__1___closed__1;
obj* l_Lean_Parser_Combinators_optional_view___rarg___lambda__2(obj*, obj*);
obj* l_Lean_Parser_Combinators_sepBy1_View___rarg___lambda__1(obj*, obj*, obj*, obj*, obj*);
obj* l_Lean_Parser_Combinators_longestMatch_view___rarg(obj*, obj*, obj*, obj*, obj*);
@ -315,35 +315,78 @@ return x_8;
}
else
{
obj* x_9; obj* x_11; obj* x_13; obj* x_14; obj* x_17; obj* x_19; obj* x_21; obj* x_24; obj* x_25; obj* x_26; obj* x_27; obj* x_28;
obj* x_9;
x_9 = lean::cnstr_get(x_3, 3);
lean::inc(x_9);
x_11 = l_Option_get___main___at_Lean_Parser_run___spec__2(x_9);
lean::dec(x_9);
x_13 = lean::alloc_cnstr(1, 2, 0);
lean::cnstr_set(x_13, 0, x_11);
lean::cnstr_set(x_13, 1, x_0);
x_14 = lean::cnstr_get(x_1, 0);
lean::inc(x_14);
if (lean::obj_tag(x_9) == 0)
{
obj* x_11; obj* x_14; obj* x_16; obj* x_18; obj* x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25; obj* x_26; obj* x_27;
x_11 = lean::cnstr_get(x_1, 0);
lean::inc(x_11);
lean::dec(x_1);
x_17 = lean::cnstr_get(x_3, 0);
lean::inc(x_17);
x_19 = lean::cnstr_get(x_3, 1);
lean::inc(x_19);
x_21 = lean::cnstr_get(x_3, 2);
lean::inc(x_21);
x_14 = lean::cnstr_get(x_3, 0);
lean::inc(x_14);
x_16 = lean::cnstr_get(x_3, 1);
lean::inc(x_16);
x_18 = lean::cnstr_get(x_3, 2);
lean::inc(x_18);
lean::dec(x_3);
x_24 = l_List_reverse___rarg(x_13);
x_25 = l_Lean_Parser_Syntax_mkNode(x_2, x_24);
x_26 = lean::alloc_cnstr(1, 1, 0);
lean::cnstr_set(x_26, 0, x_25);
x_27 = lean::alloc_cnstr(0, 4, 0);
lean::cnstr_set(x_27, 0, x_17);
lean::cnstr_set(x_27, 1, x_19);
lean::cnstr_set(x_27, 2, x_21);
lean::cnstr_set(x_27, 3, x_26);
x_28 = lean::apply_2(x_14, lean::box(0), x_27);
return x_28;
x_21 = lean::box(3);
x_22 = lean::alloc_cnstr(1, 2, 0);
lean::cnstr_set(x_22, 0, x_21);
lean::cnstr_set(x_22, 1, x_0);
x_23 = l_List_reverse___rarg(x_22);
x_24 = l_Lean_Parser_Syntax_mkNode(x_2, x_23);
x_25 = lean::alloc_cnstr(1, 1, 0);
lean::cnstr_set(x_25, 0, x_24);
x_26 = lean::alloc_cnstr(0, 4, 0);
lean::cnstr_set(x_26, 0, x_14);
lean::cnstr_set(x_26, 1, x_16);
lean::cnstr_set(x_26, 2, x_18);
lean::cnstr_set(x_26, 3, x_25);
x_27 = lean::apply_2(x_11, lean::box(0), x_26);
return x_27;
}
else
{
obj* x_28; obj* x_31; obj* x_33; obj* x_35; obj* x_38; obj* x_40; obj* x_41; obj* x_42; obj* x_43; obj* x_44; obj* x_45; obj* x_46;
x_28 = lean::cnstr_get(x_1, 0);
lean::inc(x_28);
lean::dec(x_1);
x_31 = lean::cnstr_get(x_3, 0);
lean::inc(x_31);
x_33 = lean::cnstr_get(x_3, 1);
lean::inc(x_33);
x_35 = lean::cnstr_get(x_3, 2);
lean::inc(x_35);
lean::dec(x_3);
x_38 = lean::cnstr_get(x_9, 0);
if (lean::is_exclusive(x_9)) {
x_40 = x_9;
} else {
lean::inc(x_38);
lean::dec(x_9);
x_40 = lean::box(0);
}
x_41 = lean::alloc_cnstr(1, 2, 0);
lean::cnstr_set(x_41, 0, x_38);
lean::cnstr_set(x_41, 1, x_0);
x_42 = l_List_reverse___rarg(x_41);
x_43 = l_Lean_Parser_Syntax_mkNode(x_2, x_42);
if (lean::is_scalar(x_40)) {
x_44 = lean::alloc_cnstr(1, 1, 0);
} else {
x_44 = x_40;
}
lean::cnstr_set(x_44, 0, x_43);
x_45 = lean::alloc_cnstr(0, 4, 0);
lean::cnstr_set(x_45, 0, x_31);
lean::cnstr_set(x_45, 1, x_33);
lean::cnstr_set(x_45, 2, x_35);
lean::cnstr_set(x_45, 3, x_44);
x_46 = lean::apply_2(x_28, lean::box(0), x_45);
return x_46;
}
}
}
}
@ -631,40 +674,87 @@ return x_2;
obj* l___private_init_lean_parser_combinators_1__many1Aux___main___rarg___lambda__1(obj* x_0, obj* x_1, obj* x_2) {
_start:
{
obj* x_3; obj* x_6; obj* x_8; obj* x_10; obj* x_12; obj* x_15; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25;
x_3 = lean::cnstr_get(x_0, 0);
obj* x_3;
x_3 = lean::cnstr_get(x_2, 3);
lean::inc(x_3);
if (lean::obj_tag(x_3) == 0)
{
obj* x_5; obj* x_8; obj* x_10; obj* x_12; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23;
x_5 = lean::cnstr_get(x_0, 0);
lean::inc(x_5);
lean::dec(x_0);
x_6 = lean::cnstr_get(x_2, 0);
lean::inc(x_6);
x_8 = lean::cnstr_get(x_2, 1);
x_8 = lean::cnstr_get(x_2, 0);
lean::inc(x_8);
x_10 = lean::cnstr_get(x_2, 2);
x_10 = lean::cnstr_get(x_2, 1);
lean::inc(x_10);
x_12 = lean::cnstr_get(x_2, 3);
x_12 = lean::cnstr_get(x_2, 2);
lean::inc(x_12);
lean::dec(x_2);
x_15 = l_Option_get___main___at_Lean_Parser_run___spec__2(x_12);
lean::dec(x_12);
x_15 = lean::box(3);
x_16 = lean::alloc_cnstr(1, 2, 0);
lean::cnstr_set(x_16, 0, x_15);
lean::cnstr_set(x_16, 1, x_1);
x_17 = lean::alloc_cnstr(1, 2, 0);
lean::cnstr_set(x_17, 0, x_15);
lean::cnstr_set(x_17, 1, x_1);
x_18 = lean::box(3);
x_19 = lean::alloc_cnstr(1, 2, 0);
lean::cnstr_set(x_19, 0, x_18);
lean::cnstr_set(x_19, 1, x_17);
x_20 = l_List_reverse___rarg(x_19);
x_21 = l_Lean_Parser_noKind;
x_22 = l_Lean_Parser_Syntax_mkNode(x_21, x_20);
x_23 = lean::alloc_cnstr(1, 1, 0);
lean::cnstr_set(x_23, 0, x_22);
x_24 = lean::alloc_cnstr(0, 4, 0);
lean::cnstr_set(x_24, 0, x_6);
lean::cnstr_set(x_24, 1, x_8);
lean::cnstr_set(x_24, 2, x_10);
lean::cnstr_set(x_24, 3, x_23);
x_25 = lean::apply_2(x_3, lean::box(0), x_24);
return x_25;
lean::cnstr_set(x_17, 1, x_16);
x_18 = l_List_reverse___rarg(x_17);
x_19 = l_Lean_Parser_noKind;
x_20 = l_Lean_Parser_Syntax_mkNode(x_19, x_18);
x_21 = lean::alloc_cnstr(1, 1, 0);
lean::cnstr_set(x_21, 0, x_20);
x_22 = lean::alloc_cnstr(0, 4, 0);
lean::cnstr_set(x_22, 0, x_8);
lean::cnstr_set(x_22, 1, x_10);
lean::cnstr_set(x_22, 2, x_12);
lean::cnstr_set(x_22, 3, x_21);
x_23 = lean::apply_2(x_5, lean::box(0), x_22);
return x_23;
}
else
{
obj* x_24; obj* x_27; obj* x_29; obj* x_31; obj* x_34; obj* x_36; obj* x_37; obj* x_38; obj* x_39; obj* x_40; obj* x_41; obj* x_42; obj* x_43; obj* x_44; obj* x_45;
x_24 = lean::cnstr_get(x_0, 0);
lean::inc(x_24);
lean::dec(x_0);
x_27 = lean::cnstr_get(x_2, 0);
lean::inc(x_27);
x_29 = lean::cnstr_get(x_2, 1);
lean::inc(x_29);
x_31 = lean::cnstr_get(x_2, 2);
lean::inc(x_31);
lean::dec(x_2);
x_34 = lean::cnstr_get(x_3, 0);
if (lean::is_exclusive(x_3)) {
x_36 = x_3;
} else {
lean::inc(x_34);
lean::dec(x_3);
x_36 = lean::box(0);
}
x_37 = lean::alloc_cnstr(1, 2, 0);
lean::cnstr_set(x_37, 0, x_34);
lean::cnstr_set(x_37, 1, x_1);
x_38 = lean::box(3);
x_39 = lean::alloc_cnstr(1, 2, 0);
lean::cnstr_set(x_39, 0, x_38);
lean::cnstr_set(x_39, 1, x_37);
x_40 = l_List_reverse___rarg(x_39);
x_41 = l_Lean_Parser_noKind;
x_42 = l_Lean_Parser_Syntax_mkNode(x_41, x_40);
if (lean::is_scalar(x_36)) {
x_43 = lean::alloc_cnstr(1, 1, 0);
} else {
x_43 = x_36;
}
lean::cnstr_set(x_43, 0, x_42);
x_44 = lean::alloc_cnstr(0, 4, 0);
lean::cnstr_set(x_44, 0, x_27);
lean::cnstr_set(x_44, 1, x_29);
lean::cnstr_set(x_44, 2, x_31);
lean::cnstr_set(x_44, 3, x_43);
x_45 = lean::apply_2(x_24, lean::box(0), x_44);
return x_45;
}
}
}
obj* l___private_init_lean_parser_combinators_1__many1Aux___main___rarg___lambda__2(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6, obj* x_7) {
@ -2317,39 +2407,91 @@ lean::dec(x_0);
return x_1;
}
}
obj* _init_l_Lean_Parser_Combinators_optional___rarg___lambda__1___closed__1() {
_start:
{
obj* x_0; obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5;
x_0 = lean::box(0);
x_1 = lean::box(3);
x_2 = lean::alloc_cnstr(1, 2, 0);
lean::cnstr_set(x_2, 0, x_1);
lean::cnstr_set(x_2, 1, x_0);
x_3 = l_Lean_Parser_noKind;
x_4 = l_Lean_Parser_Syntax_mkNode(x_3, x_2);
x_5 = lean::alloc_cnstr(1, 1, 0);
lean::cnstr_set(x_5, 0, x_4);
return x_5;
}
}
obj* l_Lean_Parser_Combinators_optional___rarg___lambda__1(obj* x_0, obj* x_1) {
_start:
{
obj* x_2; obj* x_5; obj* x_7; obj* x_9; obj* x_11; obj* x_14; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22;
x_2 = lean::cnstr_get(x_0, 0);
obj* x_2;
x_2 = lean::cnstr_get(x_1, 3);
lean::inc(x_2);
if (lean::obj_tag(x_2) == 0)
{
obj* x_4; obj* x_7; obj* x_9; obj* x_11; obj* x_14; obj* x_15; obj* x_16;
x_4 = lean::cnstr_get(x_0, 0);
lean::inc(x_4);
lean::dec(x_0);
x_5 = lean::cnstr_get(x_1, 0);
lean::inc(x_5);
x_7 = lean::cnstr_get(x_1, 1);
x_7 = lean::cnstr_get(x_1, 0);
lean::inc(x_7);
x_9 = lean::cnstr_get(x_1, 2);
x_9 = lean::cnstr_get(x_1, 1);
lean::inc(x_9);
x_11 = lean::cnstr_get(x_1, 3);
x_11 = lean::cnstr_get(x_1, 2);
lean::inc(x_11);
lean::dec(x_1);
x_14 = l_Option_get___main___at_Lean_Parser_run___spec__2(x_11);
lean::dec(x_11);
x_16 = lean::box(0);
x_17 = lean::alloc_cnstr(1, 2, 0);
lean::cnstr_set(x_17, 0, x_14);
lean::cnstr_set(x_17, 1, x_16);
x_18 = l_Lean_Parser_noKind;
x_19 = l_Lean_Parser_Syntax_mkNode(x_18, x_17);
x_20 = lean::alloc_cnstr(1, 1, 0);
lean::cnstr_set(x_20, 0, x_19);
x_21 = lean::alloc_cnstr(0, 4, 0);
lean::cnstr_set(x_21, 0, x_5);
lean::cnstr_set(x_21, 1, x_7);
lean::cnstr_set(x_21, 2, x_9);
lean::cnstr_set(x_21, 3, x_20);
x_22 = lean::apply_2(x_2, lean::box(0), x_21);
return x_22;
x_14 = l_Lean_Parser_Combinators_optional___rarg___lambda__1___closed__1;
x_15 = lean::alloc_cnstr(0, 4, 0);
lean::cnstr_set(x_15, 0, x_7);
lean::cnstr_set(x_15, 1, x_9);
lean::cnstr_set(x_15, 2, x_11);
lean::cnstr_set(x_15, 3, x_14);
x_16 = lean::apply_2(x_4, lean::box(0), x_15);
return x_16;
}
else
{
obj* x_17; obj* x_20; obj* x_22; obj* x_24; obj* x_27; obj* x_29; obj* x_30; obj* x_31; obj* x_32; obj* x_33; obj* x_34; obj* x_35; obj* x_36;
x_17 = lean::cnstr_get(x_0, 0);
lean::inc(x_17);
lean::dec(x_0);
x_20 = lean::cnstr_get(x_1, 0);
lean::inc(x_20);
x_22 = lean::cnstr_get(x_1, 1);
lean::inc(x_22);
x_24 = lean::cnstr_get(x_1, 2);
lean::inc(x_24);
lean::dec(x_1);
x_27 = lean::cnstr_get(x_2, 0);
if (lean::is_exclusive(x_2)) {
x_29 = x_2;
} else {
lean::inc(x_27);
lean::dec(x_2);
x_29 = lean::box(0);
}
x_30 = lean::box(0);
x_31 = lean::alloc_cnstr(1, 2, 0);
lean::cnstr_set(x_31, 0, x_27);
lean::cnstr_set(x_31, 1, x_30);
x_32 = l_Lean_Parser_noKind;
x_33 = l_Lean_Parser_Syntax_mkNode(x_32, x_31);
if (lean::is_scalar(x_29)) {
x_34 = lean::alloc_cnstr(1, 1, 0);
} else {
x_34 = x_29;
}
lean::cnstr_set(x_34, 0, x_33);
x_35 = lean::alloc_cnstr(0, 4, 0);
lean::cnstr_set(x_35, 0, x_20);
lean::cnstr_set(x_35, 1, x_22);
lean::cnstr_set(x_35, 2, x_24);
lean::cnstr_set(x_35, 3, x_34);
x_36 = lean::apply_2(x_17, lean::box(0), x_35);
return x_36;
}
}
}
obj* l_Lean_Parser_Combinators_optional___rarg___lambda__2(obj* x_0, obj* x_1) {
@ -4015,6 +4157,8 @@ w = initialize_init_data_list_instances(w);
lean::mark_persistent(l___private_init_lean_parser_combinators_1__many1Aux___main___rarg___closed__1);
l_Lean_Parser_Combinators_many___rarg___closed__1 = _init_l_Lean_Parser_Combinators_many___rarg___closed__1();
lean::mark_persistent(l_Lean_Parser_Combinators_many___rarg___closed__1);
l_Lean_Parser_Combinators_optional___rarg___lambda__1___closed__1 = _init_l_Lean_Parser_Combinators_optional___rarg___lambda__1___closed__1();
lean::mark_persistent(l_Lean_Parser_Combinators_optional___rarg___lambda__1___closed__1);
l_Lean_Parser_Combinators_anyOf___rarg___closed__1 = _init_l_Lean_Parser_Combinators_anyOf___rarg___closed__1();
lean::mark_persistent(l_Lean_Parser_Combinators_anyOf___rarg___closed__1);
l_Lean_Parser_Combinators_choiceAux___main___rarg___closed__1 = _init_l_Lean_Parser_Combinators_choiceAux___main___rarg___closed__1();

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -334,7 +334,6 @@ obj* l_Lean_Parser_MonadParsec_notFollowedBy___rarg(obj*, obj*, obj*, obj*, obj*
obj* l_Lean_Parser_MonadParsec_pos___boxed(obj*, obj*);
obj* l_Lean_Parser_MonadParsec_many1Aux___main___rarg(obj*, obj*, obj*, obj*, obj*);
obj* l_Lean_Parser_ParsecT_bind(obj*);
obj* l_Option_getOrElse___main___rarg(obj*, obj*);
obj* l_Lean_Parser_MonadParsec_unexpected___rarg___boxed(obj*, obj*, obj*);
obj* l_Lean_Parser_MonadParsec_takeWhile(obj*, obj*, obj*);
obj* l_Lean_Parser_MonadParsec_label___boxed(obj*, obj*, obj*);
@ -429,7 +428,6 @@ obj* l_Lean_Parser_MonadParsec_fixAux___main(obj*, obj*);
obj* l___private_init_lean_parser_parsec_7__takeWhileAux_x_27(obj*);
obj* l_Lean_Parser_MonadParsec_try___rarg___closed__1;
obj* l_Lean_Parser_ParsecT_labels___rarg___boxed(obj*, obj*, obj*, obj*, obj*, obj*);
obj* l_Lean_Parser_MonadParsec_error___rarg___lambda__1___boxed(obj*, obj*, obj*, obj*, obj*);
obj* l_Lean_Parser_MonadParsec_many1Aux___rarg___boxed(obj*, obj*, obj*, obj*, obj*, obj*);
obj* l_Lean_Parser_MonadParsec_many_x_27___rarg___boxed(obj*, obj*, obj*, obj*, obj*);
obj* l_Lean_Parser_MonadParsec_takeWhileCont___at_Lean_Parser_MonadParsec_takeUntil1___spec__2___boxed(obj*, obj*, obj*);
@ -658,7 +656,6 @@ obj* l_Lean_Parser_ParsecT_Alternative___rarg___lambda__1___boxed(obj*, obj*, ob
obj* l_Lean_Parser_ParsecT_try___rarg(obj*, obj*, obj*, obj*, obj*);
obj* l_Lean_Parser_ParsecT_parse___rarg___boxed(obj*, obj*, obj*, obj*, obj*);
obj* l_Lean_Parser_ParsecT_run___at_Lean_Parser_ParsecT_parseWithEoi___spec__3___rarg___boxed(obj*, obj*, obj*, obj*, obj*, obj*);
obj* l_Lean_Parser_MonadParsec_error___at_Lean_Parser_MonadParsec_longestMatch___spec__1___rarg___boxed(obj*, obj*, obj*, obj*, obj*);
obj* l_Lean_Parser_ParsecT_Monad_x_27___rarg___lambda__4___boxed(obj*, obj*, obj*, obj*, obj*, obj*);
obj* l_Lean_Parser_MonadParsec_str___boxed(obj*, obj*);
obj* l_String_quote(obj*);
@ -5068,19 +5065,40 @@ return x_3;
obj* l_Lean_Parser_MonadParsec_error___rarg___lambda__1(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) {
_start:
{
obj* x_5; obj* x_6; uint8 x_7; obj* x_8; obj* x_9;
x_5 = l_Option_getOrElse___main___rarg(x_0, x_4);
x_6 = lean::alloc_cnstr(0, 4, 0);
lean::cnstr_set(x_6, 0, x_5);
lean::cnstr_set(x_6, 1, x_1);
lean::cnstr_set(x_6, 2, x_2);
lean::cnstr_set(x_6, 3, x_3);
x_7 = 0;
x_8 = lean::alloc_cnstr(1, 1, 1);
lean::cnstr_set(x_8, 0, x_6);
lean::cnstr_set_scalar(x_8, sizeof(void*)*1, x_7);
x_9 = x_8;
return x_9;
if (lean::obj_tag(x_0) == 0)
{
obj* x_5; uint8 x_6; obj* x_7; obj* x_8;
x_5 = lean::alloc_cnstr(0, 4, 0);
lean::cnstr_set(x_5, 0, x_4);
lean::cnstr_set(x_5, 1, x_1);
lean::cnstr_set(x_5, 2, x_2);
lean::cnstr_set(x_5, 3, x_3);
x_6 = 0;
x_7 = lean::alloc_cnstr(1, 1, 1);
lean::cnstr_set(x_7, 0, x_5);
lean::cnstr_set_scalar(x_7, sizeof(void*)*1, x_6);
x_8 = x_7;
return x_8;
}
else
{
obj* x_10; obj* x_13; uint8 x_14; obj* x_15; obj* x_16;
lean::dec(x_4);
x_10 = lean::cnstr_get(x_0, 0);
lean::inc(x_10);
lean::dec(x_0);
x_13 = lean::alloc_cnstr(0, 4, 0);
lean::cnstr_set(x_13, 0, x_10);
lean::cnstr_set(x_13, 1, x_1);
lean::cnstr_set(x_13, 2, x_2);
lean::cnstr_set(x_13, 3, x_3);
x_14 = 0;
x_15 = lean::alloc_cnstr(1, 1, 1);
lean::cnstr_set(x_15, 0, x_13);
lean::cnstr_set_scalar(x_15, sizeof(void*)*1, x_14);
x_16 = x_15;
return x_16;
}
}
}
obj* l_Lean_Parser_MonadParsec_error___rarg(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) {
@ -5090,7 +5108,7 @@ obj* x_6; obj* x_9; obj* x_10;
x_6 = lean::cnstr_get(x_0, 0);
lean::inc(x_6);
lean::dec(x_0);
x_9 = lean::alloc_closure(reinterpret_cast<void*>(l_Lean_Parser_MonadParsec_error___rarg___lambda__1___boxed), 5, 4);
x_9 = lean::alloc_closure(reinterpret_cast<void*>(l_Lean_Parser_MonadParsec_error___rarg___lambda__1), 5, 4);
lean::closure_set(x_9, 0, x_4);
lean::closure_set(x_9, 1, x_2);
lean::closure_set(x_9, 2, x_3);
@ -5107,16 +5125,6 @@ x_3 = lean::alloc_closure(reinterpret_cast<void*>(l_Lean_Parser_MonadParsec_erro
return x_3;
}
}
obj* l_Lean_Parser_MonadParsec_error___rarg___lambda__1___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) {
_start:
{
obj* x_5;
x_5 = l_Lean_Parser_MonadParsec_error___rarg___lambda__1(x_0, x_1, x_2, x_3, x_4);
lean::dec(x_0);
lean::dec(x_4);
return x_5;
}
}
obj* l_Lean_Parser_MonadParsec_error___rarg___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) {
_start:
{
@ -9917,26 +9925,47 @@ return x_3;
obj* l_Lean_Parser_MonadParsec_error___at_Lean_Parser_MonadParsec_longestMatch___spec__1___rarg(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) {
_start:
{
obj* x_5; obj* x_6; uint8 x_7; obj* x_8; obj* x_9;
x_5 = l_Option_getOrElse___main___rarg(x_2, x_4);
x_6 = lean::alloc_cnstr(0, 4, 0);
lean::cnstr_set(x_6, 0, x_5);
lean::cnstr_set(x_6, 1, x_0);
lean::cnstr_set(x_6, 2, x_1);
lean::cnstr_set(x_6, 3, x_3);
x_7 = 0;
x_8 = lean::alloc_cnstr(1, 1, 1);
lean::cnstr_set(x_8, 0, x_6);
lean::cnstr_set_scalar(x_8, sizeof(void*)*1, x_7);
x_9 = x_8;
return x_9;
if (lean::obj_tag(x_2) == 0)
{
obj* x_5; uint8 x_6; obj* x_7; obj* x_8;
x_5 = lean::alloc_cnstr(0, 4, 0);
lean::cnstr_set(x_5, 0, x_4);
lean::cnstr_set(x_5, 1, x_0);
lean::cnstr_set(x_5, 2, x_1);
lean::cnstr_set(x_5, 3, x_3);
x_6 = 0;
x_7 = lean::alloc_cnstr(1, 1, 1);
lean::cnstr_set(x_7, 0, x_5);
lean::cnstr_set_scalar(x_7, sizeof(void*)*1, x_6);
x_8 = x_7;
return x_8;
}
else
{
obj* x_10; obj* x_13; uint8 x_14; obj* x_15; obj* x_16;
lean::dec(x_4);
x_10 = lean::cnstr_get(x_2, 0);
lean::inc(x_10);
lean::dec(x_2);
x_13 = lean::alloc_cnstr(0, 4, 0);
lean::cnstr_set(x_13, 0, x_10);
lean::cnstr_set(x_13, 1, x_0);
lean::cnstr_set(x_13, 2, x_1);
lean::cnstr_set(x_13, 3, x_3);
x_14 = 0;
x_15 = lean::alloc_cnstr(1, 1, 1);
lean::cnstr_set(x_15, 0, x_13);
lean::cnstr_set_scalar(x_15, sizeof(void*)*1, x_14);
x_16 = x_15;
return x_16;
}
}
}
obj* l_Lean_Parser_MonadParsec_error___at_Lean_Parser_MonadParsec_longestMatch___spec__1(obj* x_0, obj* x_1) {
_start:
{
obj* x_2;
x_2 = lean::alloc_closure(reinterpret_cast<void*>(l_Lean_Parser_MonadParsec_error___at_Lean_Parser_MonadParsec_longestMatch___spec__1___rarg___boxed), 5, 0);
x_2 = lean::alloc_closure(reinterpret_cast<void*>(l_Lean_Parser_MonadParsec_error___at_Lean_Parser_MonadParsec_longestMatch___spec__1___rarg), 5, 0);
return x_2;
}
}
@ -10287,17 +10316,18 @@ return x_0;
obj* l_Lean_Parser_MonadParsec_longestMatch___rarg___lambda__2(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6, obj* x_7) {
_start:
{
obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_13; obj* x_14; obj* x_15;
obj* x_8; obj* x_9; obj* x_10; obj* x_12; obj* x_14; obj* x_15; obj* x_16;
x_8 = lean::box(0);
x_9 = l_Lean_Parser_MonadParsec_longestMatch___rarg___lambda__2___closed__1;
x_10 = l_mjoin___rarg___closed__1;
x_11 = l_Lean_Parser_MonadParsec_error___at_Lean_Parser_MonadParsec_longestMatch___spec__1___rarg(x_9, x_10, x_8, x_8, x_7);
lean::inc(x_7);
x_12 = l_Lean_Parser_MonadParsec_error___at_Lean_Parser_MonadParsec_longestMatch___spec__1___rarg(x_9, x_10, x_8, x_8, x_7);
lean::inc(x_3);
x_13 = l_List_mfoldr___main___at_Lean_Parser_MonadParsec_longestMatch___spec__2___rarg(x_0, x_1, lean::box(0), x_2, x_3, x_4, x_7, x_11, x_5);
x_14 = lean::alloc_closure(reinterpret_cast<void*>(l_Lean_Parser_MonadParsec_longestMatch___rarg___lambda__1), 2, 1);
lean::closure_set(x_14, 0, x_6);
x_15 = lean::apply_4(x_3, lean::box(0), lean::box(0), x_13, x_14);
return x_15;
x_14 = l_List_mfoldr___main___at_Lean_Parser_MonadParsec_longestMatch___spec__2___rarg(x_0, x_1, lean::box(0), x_2, x_3, x_4, x_7, x_12, x_5);
x_15 = lean::alloc_closure(reinterpret_cast<void*>(l_Lean_Parser_MonadParsec_longestMatch___rarg___lambda__1), 2, 1);
lean::closure_set(x_15, 0, x_6);
x_16 = lean::apply_4(x_3, lean::box(0), lean::box(0), x_14, x_15);
return x_16;
}
}
obj* l_Lean_Parser_MonadParsec_longestMatch___rarg(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) {
@ -10333,16 +10363,6 @@ x_2 = lean::alloc_closure(reinterpret_cast<void*>(l_Lean_Parser_MonadParsec_long
return x_2;
}
}
obj* l_Lean_Parser_MonadParsec_error___at_Lean_Parser_MonadParsec_longestMatch___spec__1___rarg___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) {
_start:
{
obj* x_5;
x_5 = l_Lean_Parser_MonadParsec_error___at_Lean_Parser_MonadParsec_longestMatch___spec__1___rarg(x_0, x_1, x_2, x_3, x_4);
lean::dec(x_2);
lean::dec(x_4);
return x_5;
}
}
obj* l_Lean_Parser_MonadParsec_error___at_Lean_Parser_MonadParsec_longestMatch___spec__1___boxed(obj* x_0, obj* x_1) {
_start:
{
@ -10503,26 +10523,54 @@ return x_2;
obj* l_Lean_Parser_MonadParsec_error___at_Lean_Parser_ParsecT_parseWithEoi___spec__2___rarg(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6) {
_start:
{
obj* x_7; obj* x_10; obj* x_13; obj* x_14; uint8 x_15; obj* x_16; obj* x_17; obj* x_18;
if (lean::obj_tag(x_4) == 0)
{
obj* x_7; obj* x_10; obj* x_13; uint8 x_14; obj* x_15; obj* x_16; obj* x_17;
x_7 = lean::cnstr_get(x_0, 0);
lean::inc(x_7);
lean::dec(x_0);
x_10 = lean::cnstr_get(x_7, 1);
lean::inc(x_10);
lean::dec(x_7);
x_13 = l_Option_getOrElse___main___rarg(x_4, x_6);
x_14 = lean::alloc_cnstr(0, 4, 0);
lean::cnstr_set(x_14, 0, x_13);
lean::cnstr_set(x_14, 1, x_2);
lean::cnstr_set(x_14, 2, x_3);
lean::cnstr_set(x_14, 3, x_5);
x_15 = 0;
x_16 = lean::alloc_cnstr(1, 1, 1);
lean::cnstr_set(x_16, 0, x_14);
lean::cnstr_set_scalar(x_16, sizeof(void*)*1, x_15);
x_17 = x_16;
x_18 = lean::apply_2(x_10, lean::box(0), x_17);
return x_18;
x_13 = lean::alloc_cnstr(0, 4, 0);
lean::cnstr_set(x_13, 0, x_6);
lean::cnstr_set(x_13, 1, x_2);
lean::cnstr_set(x_13, 2, x_3);
lean::cnstr_set(x_13, 3, x_5);
x_14 = 0;
x_15 = lean::alloc_cnstr(1, 1, 1);
lean::cnstr_set(x_15, 0, x_13);
lean::cnstr_set_scalar(x_15, sizeof(void*)*1, x_14);
x_16 = x_15;
x_17 = lean::apply_2(x_10, lean::box(0), x_16);
return x_17;
}
else
{
obj* x_19; obj* x_22; obj* x_25; obj* x_28; uint8 x_29; obj* x_30; obj* x_31; obj* x_32;
lean::dec(x_6);
x_19 = lean::cnstr_get(x_0, 0);
lean::inc(x_19);
lean::dec(x_0);
x_22 = lean::cnstr_get(x_19, 1);
lean::inc(x_22);
lean::dec(x_19);
x_25 = lean::cnstr_get(x_4, 0);
lean::inc(x_25);
lean::dec(x_4);
x_28 = lean::alloc_cnstr(0, 4, 0);
lean::cnstr_set(x_28, 0, x_25);
lean::cnstr_set(x_28, 1, x_2);
lean::cnstr_set(x_28, 2, x_3);
lean::cnstr_set(x_28, 3, x_5);
x_29 = 0;
x_30 = lean::alloc_cnstr(1, 1, 1);
lean::cnstr_set(x_30, 0, x_28);
lean::cnstr_set_scalar(x_30, sizeof(void*)*1, x_29);
x_31 = x_30;
x_32 = lean::apply_2(x_22, lean::box(0), x_31);
return x_32;
}
}
}
obj* l_Lean_Parser_MonadParsec_error___at_Lean_Parser_ParsecT_parseWithEoi___spec__2(obj* x_0, obj* x_1) {
@ -10568,7 +10616,7 @@ x_21 = lean::nat_dec_eq(x_19, x_20);
lean::dec(x_19);
if (x_21 == 0)
{
uint32 x_26; obj* x_28; obj* x_29; obj* x_30; obj* x_32; obj* x_33; obj* x_34; obj* x_35; obj* x_37;
uint32 x_26; obj* x_28; obj* x_29; obj* x_30; obj* x_32; obj* x_33; obj* x_34; obj* x_35; obj* x_36;
lean::dec(x_3);
lean::dec(x_11);
lean::dec(x_2);
@ -10582,54 +10630,53 @@ x_32 = lean::string_append(x_30, x_29);
x_33 = lean::box(0);
x_34 = l_Lean_Parser_MonadParsec_eoi___rarg___lambda__1___closed__1;
x_35 = l_Lean_Parser_MonadParsec_error___at_Lean_Parser_ParsecT_parseWithEoi___spec__2___rarg(x_1, lean::box(0), x_32, x_34, x_33, x_33, x_7);
lean::dec(x_7);
x_37 = lean::apply_4(x_15, lean::box(0), lean::box(0), x_18, x_35);
return x_37;
x_36 = lean::apply_4(x_15, lean::box(0), lean::box(0), x_18, x_35);
return x_36;
}
else
{
obj* x_40; obj* x_41; obj* x_42; obj* x_43;
obj* x_39; obj* x_40; obj* x_41; obj* x_42;
lean::dec(x_5);
lean::dec(x_1);
x_40 = lean::box(0);
x_39 = lean::box(0);
if (lean::is_scalar(x_11)) {
x_41 = lean::alloc_cnstr(0, 3, 0);
x_40 = lean::alloc_cnstr(0, 3, 0);
} else {
x_41 = x_11;
x_40 = x_11;
}
lean::cnstr_set(x_41, 0, x_40);
lean::cnstr_set(x_41, 1, x_7);
lean::cnstr_set(x_41, 2, x_2);
x_42 = lean::apply_2(x_3, lean::box(0), x_41);
x_43 = lean::apply_4(x_15, lean::box(0), lean::box(0), x_18, x_42);
return x_43;
lean::cnstr_set(x_40, 0, x_39);
lean::cnstr_set(x_40, 1, x_7);
lean::cnstr_set(x_40, 2, x_2);
x_41 = lean::apply_2(x_3, lean::box(0), x_40);
x_42 = lean::apply_4(x_15, lean::box(0), lean::box(0), x_18, x_41);
return x_42;
}
}
else
{
obj* x_47; uint8 x_49; obj* x_50; obj* x_51; obj* x_52; obj* x_53;
obj* x_46; uint8 x_48; obj* x_49; obj* x_50; obj* x_51; obj* x_52;
lean::dec(x_1);
lean::dec(x_0);
lean::dec(x_2);
x_47 = lean::cnstr_get(x_4, 0);
x_49 = lean::cnstr_get_scalar<uint8>(x_4, sizeof(void*)*1);
x_46 = lean::cnstr_get(x_4, 0);
x_48 = lean::cnstr_get_scalar<uint8>(x_4, sizeof(void*)*1);
if (lean::is_exclusive(x_4)) {
x_50 = x_4;
x_49 = x_4;
} else {
lean::inc(x_47);
lean::inc(x_46);
lean::dec(x_4);
x_50 = lean::box(0);
x_49 = lean::box(0);
}
if (lean::is_scalar(x_50)) {
x_51 = lean::alloc_cnstr(1, 1, 1);
if (lean::is_scalar(x_49)) {
x_50 = lean::alloc_cnstr(1, 1, 1);
} else {
x_51 = x_50;
x_50 = x_49;
}
lean::cnstr_set(x_51, 0, x_47);
lean::cnstr_set_scalar(x_51, sizeof(void*)*1, x_49);
x_52 = x_51;
x_53 = lean::apply_2(x_3, lean::box(0), x_52);
return x_53;
lean::cnstr_set(x_50, 0, x_46);
lean::cnstr_set_scalar(x_50, sizeof(void*)*1, x_48);
x_51 = x_50;
x_52 = lean::apply_2(x_3, lean::box(0), x_51);
return x_52;
}
}
}
@ -10799,8 +10846,6 @@ _start:
obj* x_7;
x_7 = l_Lean_Parser_MonadParsec_error___at_Lean_Parser_ParsecT_parseWithEoi___spec__2___rarg(x_0, x_1, x_2, x_3, x_4, x_5, x_6);
lean::dec(x_1);
lean::dec(x_4);
lean::dec(x_6);
return x_7;
}
}

View file

@ -15,28 +15,21 @@ typedef lean::uint32 uint32; typedef lean::uint64 uint64;
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
#endif
obj* l_Lean_Parser_prattParser_View___rarg(obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*);
obj* l___private_init_lean_parser_rec_1__runAux___main___at_Lean_Parser_prattParser___spec__2___rarg___lambda__3(obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*);
extern obj* l_Lean_Parser_indexed___rarg___closed__1;
obj* l_Lean_Parser_MonadParsec_error___at_Lean_Parser_prattParser___spec__4___boxed(obj*, obj*);
obj* l_fixCore___rarg___boxed(obj*, obj*, obj*);
extern "C" uint8 lean_name_dec_eq(obj*, obj*);
obj* l_Lean_Parser_prattParser_tokens___boxed(obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*);
obj* l_Lean_Parser_MonadParsec_error___at_Lean_Parser_currLbp___spec__1___rarg___boxed(obj*, obj*, obj*, obj*, obj*, obj*, obj*);
namespace lean {
obj* nat_sub(obj*, obj*);
}
obj* l___private_init_lean_parser_rec_1__runAux___main___at_Lean_Parser_prattParser___spec__2___rarg___lambda__2___boxed(obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*);
obj* l_Lean_Parser_MonadParsec_error___at_Lean_Parser_currLbp___spec__3(obj*, obj*);
obj* l___private_init_lean_parser_rec_1__runAux___main___at_Lean_Parser_prattParser___spec__2(obj*);
obj* l_Lean_Parser_prattParser_View___boxed(obj*);
extern obj* l_mjoin___rarg___closed__1;
obj* l_Lean_Parser_MonadParsec_error___at_Lean_Parser_prattParser___spec__4___rarg(obj*, obj*, obj*, obj*, obj*, obj*, obj*);
obj* l_Lean_Parser_currLbp___rarg___lambda__3___closed__2;
obj* l___private_init_lean_parser_pratt_1__trailingLoop___main___boxed(obj*);
obj* l___private_init_lean_parser_pratt_1__trailingLoop___main___rarg___lambda__1___boxed(obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*);
obj* l_Lean_Parser_MonadParsec_error___at_Lean_Parser_prattParser___spec__4(obj*, obj*);
obj* l_Lean_Parser_MonadParsec_error___at_Lean_Parser_currLbp___spec__2___rarg___boxed(obj*, obj*, obj*, obj*, obj*, obj*, obj*);
obj* l_Lean_Parser_MonadParsec_error___rarg(obj*, obj*, obj*, obj*, obj*, obj*);
obj* l___private_init_lean_parser_rec_1__runAux___main___at_Lean_Parser_prattParser___spec__2___rarg(obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*);
obj* l_String_OldIterator_remaining___main(obj*);
obj* l_Lean_Parser_MonadParsec_error___at_Lean_Parser_currLbp___spec__3___boxed(obj*, obj*);
obj* l_Lean_Parser_currLbp(obj*);
@ -44,15 +37,14 @@ obj* l___private_init_lean_parser_pratt_1__trailingLoop___main(obj*);
obj* l___private_init_lean_parser_pratt_1__trailingLoop___rarg___boxed(obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*);
obj* l_Lean_Parser_currLbp___rarg___lambda__1___closed__1;
obj* l_Lean_Parser_prattParser_View___rarg___boxed(obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*);
obj* l___private_init_lean_parser_rec_1__runAux___at_Lean_Parser_prattParser___spec__1___boxed(obj*);
obj* l_Lean_Parser_MonadParsec_error___rarg___lambda__1(obj*, obj*, obj*, obj*, obj*);
obj* l___private_init_lean_parser_pratt_1__trailingLoop___main___rarg(obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*);
obj* l___private_init_lean_parser_pratt_1__trailingLoop___main___at_Lean_Parser_prattParser___spec__3___rarg___lambda__2(obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*);
obj* l_Lean_Parser_prattParser___rarg___lambda__1___boxed(obj*, obj*);
obj* l_Lean_Parser_currLbp___boxed(obj*);
obj* l___private_init_lean_parser_pratt_1__trailingLoop(obj*);
obj* l___private_init_lean_parser_pratt_1__trailingLoop___main___at_Lean_Parser_prattParser___spec__3___rarg___boxed(obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*);
obj* l___private_init_lean_parser_pratt_1__trailingLoop___main___at_Lean_Parser_prattParser___spec__3___rarg(obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*);
obj* l_Lean_Parser_MonadParsec_error___at_Lean_Parser_currLbp___spec__2___boxed(obj*, obj*);
obj* l___private_init_lean_parser_rec_1__runAux___main___at_Lean_Parser_prattParser___spec__2___rarg___lambda__1___boxed(obj*, obj*);
obj* l_Lean_Parser_prattParser___rarg___lambda__2___boxed(obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*);
obj* l_Lean_Parser_prattParser___rarg___lambda__4(obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*);
obj* l_Lean_Parser_currLbp___rarg___lambda__3___closed__1;
namespace lean {
uint8 nat_dec_lt(obj*, obj*);
@ -61,7 +53,7 @@ extern obj* l___private_init_lean_parser_combinators_1__many1Aux___main___rarg__
obj* l_List_append___rarg(obj*, obj*);
obj* l_Lean_Parser_currLbp___rarg(obj*, obj*, obj*, obj*, obj*);
extern "C" obj* lean_name_mk_string(obj*, obj*);
obj* l___private_init_lean_parser_pratt_1__trailingLoop___main___at_Lean_Parser_prattParser___spec__3___boxed(obj*);
obj* l_Lean_Parser_prattParser___rarg___lambda__3(obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*);
namespace lean {
obj* nat_add(obj*, obj*);
}
@ -71,20 +63,15 @@ obj* l_Lean_Parser_Trie_matchPrefix___rarg(obj*, obj*);
namespace lean {
uint8 nat_dec_eq(obj*, obj*);
}
obj* l___private_init_lean_parser_pratt_1__trailingLoop___main___at_Lean_Parser_prattParser___spec__3___rarg___lambda__1(obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*);
obj* l_Lean_Parser_prattParser___boxed(obj*);
obj* l_Lean_Parser_MonadParsec_error___at___private_init_lean_parser_pratt_1__trailingLoop___main___spec__1(obj*, obj*);
obj* l_Lean_Parser_MonadParsec_error___at_Lean_Parser_prattParser___spec__4___rarg___boxed(obj*, obj*, obj*, obj*, obj*, obj*, obj*);
obj* l_Lean_Parser_MonadParsec_error___at_Lean_Parser_currLbp___spec__3___rarg___boxed(obj*, obj*, obj*, obj*, obj*, obj*, obj*);
obj* l___private_init_lean_parser_pratt_1__trailingLoop___main___at_Lean_Parser_prattParser___spec__3___rarg___lambda__1___boxed(obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*);
obj* l_Lean_Parser_MonadParsec_error___rarg___lambda__1___boxed(obj*, obj*, obj*, obj*, obj*);
obj* l_Lean_Parser_currLbp___rarg___lambda__1(obj*, obj*, obj*, obj*, obj*);
obj* l___private_init_lean_parser_pratt_1__trailingLoop___main___at_Lean_Parser_prattParser___spec__3(obj*);
obj* l_Lean_Parser_prattParser___rarg___boxed(obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*);
obj* l___private_init_lean_parser_pratt_1__trailingLoop___rarg(obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*);
extern obj* l_Lean_Parser_maxPrec;
obj* l_Lean_Parser_MonadParsec_error___at_Lean_Parser_currLbp___spec__2(obj*, obj*);
obj* l___private_init_lean_parser_rec_1__runAux___main___at_Lean_Parser_prattParser___spec__2___rarg___lambda__1(obj*, obj*);
obj* l_Lean_Parser_RecT_runParsec___rarg___lambda__1___boxed(obj*, obj*);
obj* l___private_init_lean_parser_pratt_1__trailingLoop___main___rarg___boxed(obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*);
obj* l_Lean_Parser_MonadParsec_error___at_Lean_Parser_currLbp___spec__3___rarg(obj*, obj*, obj*, obj*, obj*, obj*, obj*);
obj* l_Lean_Parser_MonadParsec_error___at_Lean_Parser_currLbp___spec__1(obj*, obj*);
@ -94,29 +81,25 @@ obj* l_Lean_Parser_prattParser_tokens___rarg(obj*, obj*);
obj* l_Lean_Parser_MonadParsec_error___at___private_init_lean_parser_pratt_1__trailingLoop___main___spec__1___rarg(obj*, obj*, obj*, obj*, obj*, obj*, obj*);
obj* l_Lean_Parser_currLbp___rarg___lambda__3(obj*, obj*, obj*, obj*, obj*, obj*);
obj* l_Lean_Parser_MonadParsec_error___at_Lean_Parser_currLbp___spec__2___rarg(obj*, obj*, obj*, obj*, obj*, obj*, obj*);
obj* l___private_init_lean_parser_rec_1__runAux___main___at_Lean_Parser_prattParser___spec__2___rarg___lambda__2(obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*);
obj* l_Lean_Parser_prattParser(obj*);
obj* l_Lean_Parser_MonadParsec_error___at_Lean_Parser_currLbp___spec__1___boxed(obj*, obj*);
obj* l_Lean_Parser_prattParser___rarg___lambda__2(obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*);
extern obj* l_Lean_Parser_number_HasView_x_27___lambda__1___closed__6;
obj* l_Lean_Parser_currLbp___rarg___lambda__2(obj*, obj*, obj*, obj*, obj*, obj*);
extern obj* l_Lean_Parser_RecT_runParsec___rarg___closed__1;
obj* l_Lean_Parser_prattParser___rarg___lambda__1(obj*, obj*);
obj* l___private_init_lean_parser_pratt_1__trailingLoop___main___rarg___lambda__2___boxed(obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*);
obj* l___private_init_lean_parser_pratt_1__trailingLoop___main___rarg___lambda__2(obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*);
obj* l___private_init_lean_parser_rec_1__runAux___at_Lean_Parser_prattParser___spec__1___rarg(obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*);
obj* l___private_init_lean_parser_pratt_1__trailingLoop___main___rarg___lambda__1(obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*);
obj* l_Lean_Parser_MonadParsec_error___at_Lean_Parser_currLbp___spec__1___rarg(obj*, obj*, obj*, obj*, obj*, obj*, obj*);
obj* l_Lean_Parser_prattParser___rarg(obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*);
obj* l___private_init_lean_parser_rec_1__runAux___main___at_Lean_Parser_prattParser___spec__2___boxed(obj*);
obj* l_Lean_Parser_MonadParsec_error___at___private_init_lean_parser_pratt_1__trailingLoop___main___spec__1___boxed(obj*, obj*);
obj* l___private_init_lean_parser_pratt_1__trailingLoop___main___at_Lean_Parser_prattParser___spec__3___rarg___lambda__2___boxed(obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*);
obj* l___private_init_lean_parser_rec_1__runAux___at_Lean_Parser_prattParser___spec__1(obj*);
obj* l_Lean_Parser_prattParser_View(obj*);
obj* l_Lean_Parser_prattParser_tokens(obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*);
obj* l_Lean_Parser_MonadParsec_error___at_Lean_Parser_currLbp___spec__1___rarg(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6) {
_start:
{
obj* x_7; obj* x_8; obj* x_11;
x_7 = lean::alloc_closure(reinterpret_cast<void*>(l_Lean_Parser_MonadParsec_error___rarg___lambda__1___boxed), 5, 4);
x_7 = lean::alloc_closure(reinterpret_cast<void*>(l_Lean_Parser_MonadParsec_error___rarg___lambda__1), 5, 4);
lean::closure_set(x_7, 0, x_4);
lean::closure_set(x_7, 1, x_2);
lean::closure_set(x_7, 2, x_3);
@ -140,7 +123,7 @@ obj* l_Lean_Parser_MonadParsec_error___at_Lean_Parser_currLbp___spec__2___rarg(o
_start:
{
obj* x_7; obj* x_8; obj* x_11;
x_7 = lean::alloc_closure(reinterpret_cast<void*>(l_Lean_Parser_MonadParsec_error___rarg___lambda__1___boxed), 5, 4);
x_7 = lean::alloc_closure(reinterpret_cast<void*>(l_Lean_Parser_MonadParsec_error___rarg___lambda__1), 5, 4);
lean::closure_set(x_7, 0, x_4);
lean::closure_set(x_7, 1, x_2);
lean::closure_set(x_7, 2, x_3);
@ -164,7 +147,7 @@ obj* l_Lean_Parser_MonadParsec_error___at_Lean_Parser_currLbp___spec__3___rarg(o
_start:
{
obj* x_7; obj* x_8; obj* x_11;
x_7 = lean::alloc_closure(reinterpret_cast<void*>(l_Lean_Parser_MonadParsec_error___rarg___lambda__1___boxed), 5, 4);
x_7 = lean::alloc_closure(reinterpret_cast<void*>(l_Lean_Parser_MonadParsec_error___rarg___lambda__1), 5, 4);
lean::closure_set(x_7, 0, x_4);
lean::closure_set(x_7, 1, x_2);
lean::closure_set(x_7, 2, x_3);
@ -529,7 +512,7 @@ obj* l_Lean_Parser_MonadParsec_error___at___private_init_lean_parser_pratt_1__tr
_start:
{
obj* x_7; obj* x_8; obj* x_11;
x_7 = lean::alloc_closure(reinterpret_cast<void*>(l_Lean_Parser_MonadParsec_error___rarg___lambda__1___boxed), 5, 4);
x_7 = lean::alloc_closure(reinterpret_cast<void*>(l_Lean_Parser_MonadParsec_error___rarg___lambda__1), 5, 4);
lean::closure_set(x_7, 0, x_4);
lean::closure_set(x_7, 1, x_2);
lean::closure_set(x_7, 2, x_3);
@ -752,144 +735,7 @@ lean::dec(x_0);
return x_1;
}
}
obj* l_Lean_Parser_MonadParsec_error___at_Lean_Parser_prattParser___spec__4___rarg(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6) {
_start:
{
obj* x_7; obj* x_8; obj* x_11;
x_7 = lean::alloc_closure(reinterpret_cast<void*>(l_Lean_Parser_MonadParsec_error___rarg___lambda__1___boxed), 5, 4);
lean::closure_set(x_7, 0, x_4);
lean::closure_set(x_7, 1, x_2);
lean::closure_set(x_7, 2, x_3);
lean::closure_set(x_7, 3, x_5);
x_8 = lean::cnstr_get(x_0, 0);
lean::inc(x_8);
lean::dec(x_0);
x_11 = lean::apply_2(x_8, lean::box(0), x_7);
return x_11;
}
}
obj* l_Lean_Parser_MonadParsec_error___at_Lean_Parser_prattParser___spec__4(obj* x_0, obj* x_1) {
_start:
{
obj* x_2;
x_2 = lean::alloc_closure(reinterpret_cast<void*>(l_Lean_Parser_MonadParsec_error___at_Lean_Parser_prattParser___spec__4___rarg___boxed), 7, 0);
return x_2;
}
}
obj* l___private_init_lean_parser_pratt_1__trailingLoop___main___at_Lean_Parser_prattParser___spec__3___rarg___lambda__1(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6, obj* x_7, obj* x_8) {
_start:
{
obj* x_9;
x_9 = l___private_init_lean_parser_pratt_1__trailingLoop___main___at_Lean_Parser_prattParser___spec__3___rarg(x_0, x_1, x_2, x_3, x_4, x_5, x_6, x_8, x_7);
return x_9;
}
}
obj* l___private_init_lean_parser_pratt_1__trailingLoop___main___at_Lean_Parser_prattParser___spec__3___rarg___lambda__2(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6, obj* x_7, obj* x_8, obj* x_9, obj* x_10) {
_start:
{
uint8 x_11;
x_11 = lean::nat_dec_lt(x_0, x_10);
if (x_11 == 0)
{
obj* x_20; obj* x_23; obj* x_26;
lean::dec(x_5);
lean::dec(x_9);
lean::dec(x_8);
lean::dec(x_7);
lean::dec(x_4);
lean::dec(x_6);
lean::dec(x_3);
lean::dec(x_0);
x_20 = lean::cnstr_get(x_1, 0);
lean::inc(x_20);
lean::dec(x_1);
x_23 = lean::cnstr_get(x_20, 1);
lean::inc(x_23);
lean::dec(x_20);
x_26 = lean::apply_2(x_23, lean::box(0), x_2);
return x_26;
}
else
{
obj* x_29; obj* x_30; obj* x_31;
lean::inc(x_4);
lean::inc(x_3);
x_29 = lean::apply_2(x_3, x_2, x_4);
x_30 = lean::alloc_closure(reinterpret_cast<void*>(l___private_init_lean_parser_pratt_1__trailingLoop___main___at_Lean_Parser_prattParser___spec__3___rarg___lambda__1___boxed), 9, 8);
lean::closure_set(x_30, 0, x_1);
lean::closure_set(x_30, 1, x_5);
lean::closure_set(x_30, 2, x_6);
lean::closure_set(x_30, 3, x_7);
lean::closure_set(x_30, 4, x_3);
lean::closure_set(x_30, 5, x_0);
lean::closure_set(x_30, 6, x_8);
lean::closure_set(x_30, 7, x_4);
x_31 = lean::apply_4(x_9, lean::box(0), lean::box(0), x_29, x_30);
return x_31;
}
}
}
obj* l___private_init_lean_parser_pratt_1__trailingLoop___main___at_Lean_Parser_prattParser___spec__3___rarg(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6, obj* x_7, obj* x_8) {
_start:
{
obj* x_9; uint8 x_10;
x_9 = lean::mk_nat_obj(0ul);
x_10 = lean::nat_dec_eq(x_6, x_9);
if (x_10 == 0)
{
obj* x_11; obj* x_12; obj* x_13; obj* x_20; obj* x_22; obj* x_23;
x_11 = lean::mk_nat_obj(1ul);
x_12 = lean::nat_sub(x_6, x_11);
x_13 = lean::cnstr_get(x_0, 1);
lean::inc(x_13);
lean::inc(x_8);
lean::inc(x_3);
lean::inc(x_2);
lean::inc(x_1);
lean::inc(x_0);
x_20 = l_Lean_Parser_currLbp___rarg(x_0, x_1, x_2, x_3, x_8);
lean::inc(x_13);
x_22 = lean::alloc_closure(reinterpret_cast<void*>(l___private_init_lean_parser_pratt_1__trailingLoop___main___at_Lean_Parser_prattParser___spec__3___rarg___lambda__2___boxed), 11, 10);
lean::closure_set(x_22, 0, x_5);
lean::closure_set(x_22, 1, x_0);
lean::closure_set(x_22, 2, x_7);
lean::closure_set(x_22, 3, x_4);
lean::closure_set(x_22, 4, x_8);
lean::closure_set(x_22, 5, x_1);
lean::closure_set(x_22, 6, x_2);
lean::closure_set(x_22, 7, x_3);
lean::closure_set(x_22, 8, x_12);
lean::closure_set(x_22, 9, x_13);
x_23 = lean::apply_4(x_13, lean::box(0), lean::box(0), x_20, x_22);
return x_23;
}
else
{
obj* x_30; obj* x_31; obj* x_32; obj* x_33;
lean::dec(x_5);
lean::dec(x_7);
lean::dec(x_4);
lean::dec(x_1);
lean::dec(x_3);
lean::dec(x_0);
x_30 = lean::box(0);
x_31 = l___private_init_lean_parser_combinators_1__many1Aux___main___rarg___closed__1;
x_32 = l_mjoin___rarg___closed__1;
x_33 = l_Lean_Parser_MonadParsec_error___at_Lean_Parser_prattParser___spec__4___rarg(x_2, lean::box(0), x_31, x_32, x_30, x_30, x_8);
lean::dec(x_8);
return x_33;
}
}
}
obj* l___private_init_lean_parser_pratt_1__trailingLoop___main___at_Lean_Parser_prattParser___spec__3(obj* x_0) {
_start:
{
obj* x_1;
x_1 = lean::alloc_closure(reinterpret_cast<void*>(l___private_init_lean_parser_pratt_1__trailingLoop___main___at_Lean_Parser_prattParser___spec__3___rarg___boxed), 9, 0);
return x_1;
}
}
obj* l___private_init_lean_parser_rec_1__runAux___main___at_Lean_Parser_prattParser___spec__2___rarg___lambda__1(obj* x_0, obj* x_1) {
obj* l_Lean_Parser_prattParser___rarg___lambda__1(obj* x_0, obj* x_1) {
_start:
{
obj* x_2; obj* x_3; obj* x_6; obj* x_9;
@ -904,18 +750,18 @@ x_9 = lean::apply_2(x_6, lean::box(0), x_2);
return x_9;
}
}
obj* l___private_init_lean_parser_rec_1__runAux___main___at_Lean_Parser_prattParser___spec__2___rarg___lambda__2(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6, obj* x_7, obj* x_8) {
obj* l_Lean_Parser_prattParser___rarg___lambda__2(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6, obj* x_7, obj* x_8) {
_start:
{
obj* x_9; obj* x_10; obj* x_11;
x_9 = lean::mk_nat_obj(1ul);
x_10 = lean::nat_add(x_8, x_9);
x_11 = l___private_init_lean_parser_pratt_1__trailingLoop___main___at_Lean_Parser_prattParser___spec__3___rarg(x_0, x_1, x_2, x_3, x_4, x_5, x_10, x_6, x_7);
x_11 = l___private_init_lean_parser_pratt_1__trailingLoop___main___rarg(x_0, x_1, x_2, x_3, x_4, x_5, x_10, x_6, x_7);
lean::dec(x_10);
return x_11;
}
}
obj* l___private_init_lean_parser_rec_1__runAux___main___at_Lean_Parser_prattParser___spec__2___rarg___lambda__3(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6, obj* x_7, obj* x_8) {
obj* l_Lean_Parser_prattParser___rarg___lambda__3(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6, obj* x_7, obj* x_8) {
_start:
{
obj* x_9; obj* x_11; obj* x_12; obj* x_14; obj* x_16; obj* x_17; obj* x_18;
@ -924,11 +770,11 @@ lean::inc(x_9);
x_11 = l_Lean_Parser_MonadParsec_leftOver___rarg___closed__1;
x_12 = lean::apply_2(x_9, lean::box(0), x_11);
lean::inc(x_1);
x_14 = lean::alloc_closure(reinterpret_cast<void*>(l___private_init_lean_parser_rec_1__runAux___main___at_Lean_Parser_prattParser___spec__2___rarg___lambda__1___boxed), 2, 1);
x_14 = lean::alloc_closure(reinterpret_cast<void*>(l_Lean_Parser_prattParser___rarg___lambda__1___boxed), 2, 1);
lean::closure_set(x_14, 0, x_1);
lean::inc(x_2);
x_16 = lean::apply_4(x_2, lean::box(0), lean::box(0), x_12, x_14);
x_17 = lean::alloc_closure(reinterpret_cast<void*>(l___private_init_lean_parser_rec_1__runAux___main___at_Lean_Parser_prattParser___spec__2___rarg___lambda__2___boxed), 9, 8);
x_17 = lean::alloc_closure(reinterpret_cast<void*>(l_Lean_Parser_prattParser___rarg___lambda__2___boxed), 9, 8);
lean::closure_set(x_17, 0, x_1);
lean::closure_set(x_17, 1, x_3);
lean::closure_set(x_17, 2, x_0);
@ -941,85 +787,47 @@ x_18 = lean::apply_4(x_2, lean::box(0), lean::box(0), x_16, x_17);
return x_18;
}
}
obj* l___private_init_lean_parser_rec_1__runAux___main___at_Lean_Parser_prattParser___spec__2___rarg(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6, obj* x_7) {
obj* l_Lean_Parser_prattParser___rarg___lambda__4(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6, obj* x_7) {
_start:
{
obj* x_14; obj* x_15; obj* x_18; obj* x_20; obj* x_21;
lean::inc(x_5);
lean::inc(x_4);
lean::inc(x_3);
lean::inc(x_2);
lean::inc(x_1);
lean::inc(x_0);
x_14 = lean::alloc_closure(reinterpret_cast<void*>(l___private_init_lean_parser_rec_1__runAux___main___at_Lean_Parser_prattParser___spec__2___rarg), 8, 7);
lean::closure_set(x_14, 0, x_0);
lean::closure_set(x_14, 1, x_1);
lean::closure_set(x_14, 2, x_2);
lean::closure_set(x_14, 3, x_3);
lean::closure_set(x_14, 4, x_4);
lean::closure_set(x_14, 5, x_5);
lean::closure_set(x_14, 6, x_6);
x_15 = lean::cnstr_get(x_0, 1);
lean::inc(x_15);
lean::inc(x_14);
x_18 = lean::apply_1(x_4, x_14);
lean::inc(x_15);
x_20 = lean::alloc_closure(reinterpret_cast<void*>(l___private_init_lean_parser_rec_1__runAux___main___at_Lean_Parser_prattParser___spec__2___rarg___lambda__3), 9, 8);
lean::closure_set(x_20, 0, x_2);
lean::closure_set(x_20, 1, x_0);
lean::closure_set(x_20, 2, x_15);
lean::closure_set(x_20, 3, x_1);
lean::closure_set(x_20, 4, x_3);
lean::closure_set(x_20, 5, x_5);
lean::closure_set(x_20, 6, x_7);
lean::closure_set(x_20, 7, x_14);
x_21 = lean::apply_4(x_15, lean::box(0), lean::box(0), x_18, x_20);
return x_21;
}
}
obj* l___private_init_lean_parser_rec_1__runAux___main___at_Lean_Parser_prattParser___spec__2(obj* x_0) {
_start:
{
obj* x_1;
x_1 = lean::alloc_closure(reinterpret_cast<void*>(l___private_init_lean_parser_rec_1__runAux___main___at_Lean_Parser_prattParser___spec__2___rarg), 8, 0);
return x_1;
}
}
obj* l___private_init_lean_parser_rec_1__runAux___at_Lean_Parser_prattParser___spec__1___rarg(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6, obj* x_7) {
_start:
{
obj* x_8;
x_8 = l___private_init_lean_parser_rec_1__runAux___main___at_Lean_Parser_prattParser___spec__2___rarg(x_0, x_1, x_2, x_3, x_4, x_5, x_6, x_7);
return x_8;
}
}
obj* l___private_init_lean_parser_rec_1__runAux___at_Lean_Parser_prattParser___spec__1(obj* x_0) {
_start:
{
obj* x_1;
x_1 = lean::alloc_closure(reinterpret_cast<void*>(l___private_init_lean_parser_rec_1__runAux___at_Lean_Parser_prattParser___spec__1___rarg), 8, 0);
return x_1;
obj* x_8; obj* x_11; obj* x_13; obj* x_14;
x_8 = lean::cnstr_get(x_0, 1);
lean::inc(x_8);
lean::inc(x_6);
x_11 = lean::apply_1(x_1, x_6);
lean::inc(x_8);
x_13 = lean::alloc_closure(reinterpret_cast<void*>(l_Lean_Parser_prattParser___rarg___lambda__3), 9, 8);
lean::closure_set(x_13, 0, x_2);
lean::closure_set(x_13, 1, x_0);
lean::closure_set(x_13, 2, x_8);
lean::closure_set(x_13, 3, x_3);
lean::closure_set(x_13, 4, x_4);
lean::closure_set(x_13, 5, x_5);
lean::closure_set(x_13, 6, x_7);
lean::closure_set(x_13, 7, x_6);
x_14 = lean::apply_4(x_8, lean::box(0), lean::box(0), x_11, x_13);
return x_14;
}
}
obj* l_Lean_Parser_prattParser___rarg(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6, obj* x_7, obj* x_8) {
_start:
{
obj* x_9; obj* x_10; obj* x_11; obj* x_13; obj* x_14; obj* x_15;
x_9 = lean::box(0);
x_10 = l_Lean_Parser_RecT_runParsec___rarg___closed__1;
x_11 = l_mjoin___rarg___closed__1;
obj* x_10; obj* x_11; obj* x_12; obj* x_13;
lean::inc(x_2);
x_13 = l_Lean_Parser_MonadParsec_error___rarg(x_2, lean::box(0), x_10, x_11, x_9, x_9);
x_14 = lean::alloc_closure(reinterpret_cast<void*>(l___private_init_lean_parser_rec_1__runAux___at_Lean_Parser_prattParser___spec__1___rarg), 8, 7);
lean::closure_set(x_14, 0, x_0);
lean::closure_set(x_14, 1, x_1);
lean::closure_set(x_14, 2, x_2);
lean::closure_set(x_14, 3, x_3);
lean::closure_set(x_14, 4, x_6);
lean::closure_set(x_14, 5, x_7);
lean::closure_set(x_14, 6, x_13);
x_15 = lean::apply_1(x_8, x_14);
return x_15;
x_10 = lean::alloc_closure(reinterpret_cast<void*>(l_Lean_Parser_RecT_runParsec___rarg___lambda__1___boxed), 2, 1);
lean::closure_set(x_10, 0, x_2);
x_11 = lean::alloc_closure(reinterpret_cast<void*>(l_Lean_Parser_prattParser___rarg___lambda__4), 8, 6);
lean::closure_set(x_11, 0, x_0);
lean::closure_set(x_11, 1, x_6);
lean::closure_set(x_11, 2, x_2);
lean::closure_set(x_11, 3, x_1);
lean::closure_set(x_11, 4, x_3);
lean::closure_set(x_11, 5, x_7);
x_12 = lean::alloc_closure(reinterpret_cast<void*>(l_fixCore___rarg___boxed), 3, 2);
lean::closure_set(x_12, 0, x_10);
lean::closure_set(x_12, 1, x_11);
x_13 = lean::apply_1(x_8, x_12);
return x_13;
}
}
obj* l_Lean_Parser_prattParser(obj* x_0) {
@ -1030,98 +838,24 @@ x_1 = lean::alloc_closure(reinterpret_cast<void*>(l_Lean_Parser_prattParser___ra
return x_1;
}
}
obj* l_Lean_Parser_MonadParsec_error___at_Lean_Parser_prattParser___spec__4___rarg___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6) {
_start:
{
obj* x_7;
x_7 = l_Lean_Parser_MonadParsec_error___at_Lean_Parser_prattParser___spec__4___rarg(x_0, x_1, x_2, x_3, x_4, x_5, x_6);
lean::dec(x_1);
lean::dec(x_6);
return x_7;
}
}
obj* l_Lean_Parser_MonadParsec_error___at_Lean_Parser_prattParser___spec__4___boxed(obj* x_0, obj* x_1) {
obj* l_Lean_Parser_prattParser___rarg___lambda__1___boxed(obj* x_0, obj* x_1) {
_start:
{
obj* x_2;
x_2 = l_Lean_Parser_MonadParsec_error___at_Lean_Parser_prattParser___spec__4(x_0, x_1);
lean::dec(x_0);
x_2 = l_Lean_Parser_prattParser___rarg___lambda__1(x_0, x_1);
lean::dec(x_1);
return x_2;
}
}
obj* l___private_init_lean_parser_pratt_1__trailingLoop___main___at_Lean_Parser_prattParser___spec__3___rarg___lambda__1___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6, obj* x_7, obj* x_8) {
obj* l_Lean_Parser_prattParser___rarg___lambda__2___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6, obj* x_7, obj* x_8) {
_start:
{
obj* x_9;
x_9 = l___private_init_lean_parser_pratt_1__trailingLoop___main___at_Lean_Parser_prattParser___spec__3___rarg___lambda__1(x_0, x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8);
lean::dec(x_6);
return x_9;
}
}
obj* l___private_init_lean_parser_pratt_1__trailingLoop___main___at_Lean_Parser_prattParser___spec__3___rarg___lambda__2___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6, obj* x_7, obj* x_8, obj* x_9, obj* x_10) {
_start:
{
obj* x_11;
x_11 = l___private_init_lean_parser_pratt_1__trailingLoop___main___at_Lean_Parser_prattParser___spec__3___rarg___lambda__2(x_0, x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10);
lean::dec(x_10);
return x_11;
}
}
obj* l___private_init_lean_parser_pratt_1__trailingLoop___main___at_Lean_Parser_prattParser___spec__3___rarg___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6, obj* x_7, obj* x_8) {
_start:
{
obj* x_9;
x_9 = l___private_init_lean_parser_pratt_1__trailingLoop___main___at_Lean_Parser_prattParser___spec__3___rarg(x_0, x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8);
lean::dec(x_6);
return x_9;
}
}
obj* l___private_init_lean_parser_pratt_1__trailingLoop___main___at_Lean_Parser_prattParser___spec__3___boxed(obj* x_0) {
_start:
{
obj* x_1;
x_1 = l___private_init_lean_parser_pratt_1__trailingLoop___main___at_Lean_Parser_prattParser___spec__3(x_0);
lean::dec(x_0);
return x_1;
}
}
obj* l___private_init_lean_parser_rec_1__runAux___main___at_Lean_Parser_prattParser___spec__2___rarg___lambda__1___boxed(obj* x_0, obj* x_1) {
_start:
{
obj* x_2;
x_2 = l___private_init_lean_parser_rec_1__runAux___main___at_Lean_Parser_prattParser___spec__2___rarg___lambda__1(x_0, x_1);
lean::dec(x_1);
return x_2;
}
}
obj* l___private_init_lean_parser_rec_1__runAux___main___at_Lean_Parser_prattParser___spec__2___rarg___lambda__2___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6, obj* x_7, obj* x_8) {
_start:
{
obj* x_9;
x_9 = l___private_init_lean_parser_rec_1__runAux___main___at_Lean_Parser_prattParser___spec__2___rarg___lambda__2(x_0, x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8);
x_9 = l_Lean_Parser_prattParser___rarg___lambda__2(x_0, x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8);
lean::dec(x_8);
return x_9;
}
}
obj* l___private_init_lean_parser_rec_1__runAux___main___at_Lean_Parser_prattParser___spec__2___boxed(obj* x_0) {
_start:
{
obj* x_1;
x_1 = l___private_init_lean_parser_rec_1__runAux___main___at_Lean_Parser_prattParser___spec__2(x_0);
lean::dec(x_0);
return x_1;
}
}
obj* l___private_init_lean_parser_rec_1__runAux___at_Lean_Parser_prattParser___spec__1___boxed(obj* x_0) {
_start:
{
obj* x_1;
x_1 = l___private_init_lean_parser_rec_1__runAux___at_Lean_Parser_prattParser___spec__1(x_0);
lean::dec(x_0);
return x_1;
}
}
obj* l_Lean_Parser_prattParser___rarg___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6, obj* x_7, obj* x_8) {
_start:
{

View file

@ -1,6 +1,6 @@
// Lean compiler output
// Module: init.lean.parser.rec
// Imports: init.control.reader init.lean.parser.parsec
// Imports: init.control.reader init.lean.parser.parsec init.fix
#include "runtime/object.h"
#include "runtime/apply.h"
typedef lean::object obj; typedef lean::usize usize;
@ -15,10 +15,11 @@ typedef lean::uint32 uint32; typedef lean::uint64 uint64;
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
#endif
obj* l_Lean_Parser_RecT_Alternative(obj*, obj*, obj*);
obj* l___private_init_lean_parser_rec_1__runAux___main___rarg(obj*, obj*, obj*);
obj* l_fixCore___rarg___boxed(obj*, obj*, obj*);
obj* l_Lean_Parser_monadParsecTrans___rarg(obj*, obj*, obj*);
obj* l_Lean_Parser_MonadRec_base(obj*, obj*, obj*, obj*);
obj* l_Lean_Parser_RecT_Lean_Parser_MonadParsec___boxed(obj*, obj*, obj*);
obj* l_Lean_Parser_RecT_runParsec___rarg___lambda__1(obj*, obj*);
obj* l_Lean_Parser_MonadRec_trans___rarg(obj*, obj*, obj*, obj*);
obj* l_Lean_Parser_MonadRec_trans___rarg___boxed(obj*, obj*, obj*, obj*);
obj* l_Lean_Parser_RecT_MonadExcept___boxed(obj*, obj*, obj*, obj*, obj*);
@ -31,23 +32,22 @@ obj* l_Lean_Parser_RecT_run(obj*, obj*, obj*, obj*, obj*);
obj* l_Lean_Parser_MonadParsec_error___rarg(obj*, obj*, obj*, obj*, obj*, obj*);
obj* l_Lean_Parser_MonadRec_base___boxed(obj*, obj*, obj*, obj*);
obj* l_Lean_Parser_RecT_Monad___boxed(obj*, obj*, obj*);
obj* l___private_init_lean_parser_rec_1__runAux___main(obj*, obj*, obj*);
obj* l_Lean_Parser_RecT_runParsec___rarg___lambda__1___closed__1;
obj* l_Lean_Parser_RecT_MonadExcept___rarg(obj*);
obj* l_ReaderT_Monad___rarg(obj*);
obj* l_Lean_Parser_RecT_Lean_Parser_MonadParsec___rarg(obj*, obj*, obj*);
obj* l___private_init_lean_parser_rec_1__runAux(obj*, obj*, obj*, obj*);
obj* l_Lean_Parser_MonadRec_trans(obj*, obj*, obj*, obj*);
obj* l_StateT_MonadExcept___rarg___lambda__2(obj*, obj*, obj*);
obj* l_Lean_Parser_RecT_Alternative___boxed(obj*, obj*, obj*);
obj* l___private_init_lean_parser_rec_1__runAux___rarg(obj*, obj*, obj*);
obj* l_Lean_Parser_RecT_run___boxed(obj*, obj*, obj*, obj*, obj*);
obj* l_Lean_Parser_RecT_runParsec___boxed(obj*, obj*, obj*, obj*, obj*, obj*);
obj* l_Lean_Parser_RecT_HasMonadLift(obj*, obj*, obj*);
obj* l_Lean_Parser_RecT_runParsec(obj*, obj*, obj*, obj*, obj*, obj*);
obj* l_Lean_Parser_RecT_runParsec___rarg___lambda__1___boxed(obj*, obj*);
obj* l_Lean_Parser_MonadRec_trans___boxed(obj*, obj*, obj*, obj*);
obj* l_Lean_Parser_RecT_Alternative___rarg(obj*, obj*);
obj* l_ReaderT_MonadFunctor___boxed(obj*, obj*, obj*, obj*, obj*, obj*);
obj* l_Lean_Parser_RecT_runParsec___rarg(obj*, obj*, obj*);
obj* l___private_init_lean_parser_rec_1__runAux___boxed(obj*, obj*, obj*, obj*);
obj* l_ReaderT_MonadExcept___rarg(obj*);
obj* l_Lean_Parser_RecT_recurse___boxed(obj*, obj*, obj*, obj*);
obj* l_Lean_Parser_RecT_Lean_Parser_MonadParsec___rarg___boxed(obj*, obj*, obj*);
@ -56,13 +56,11 @@ obj* l_Lean_Parser_RecT_MonadFunctor___rarg(obj*);
obj* l_Lean_Parser_RecT_recurse___rarg(obj*, obj*);
obj* l_Lean_Parser_RecT_Monad(obj*, obj*, obj*);
obj* l_Lean_Parser_RecT_recurse(obj*, obj*, obj*, obj*);
obj* l_Lean_Parser_RecT_runParsec___rarg___closed__1;
obj* l_ReaderT_Alternative___rarg(obj*, obj*);
obj* l_Lean_Parser_RecT_MonadExcept(obj*, obj*, obj*, obj*, obj*);
obj* l_ReaderT_lift___boxed(obj*, obj*, obj*, obj*);
obj* l_Lean_Parser_RecT_Monad___rarg(obj*);
obj* l_Lean_Parser_RecT_MonadFunctor___boxed(obj*, obj*, obj*, obj*);
obj* l___private_init_lean_parser_rec_1__runAux___main___boxed(obj*, obj*, obj*);
obj* l_Lean_Parser_RecT_recurse___rarg(obj* x_0, obj* x_1) {
_start:
{
@ -91,76 +89,17 @@ lean::dec(x_3);
return x_4;
}
}
obj* l___private_init_lean_parser_rec_1__runAux___main___rarg(obj* x_0, obj* x_1, obj* x_2) {
_start:
{
obj* x_4; obj* x_5;
lean::inc(x_1);
x_4 = lean::alloc_closure(reinterpret_cast<void*>(l___private_init_lean_parser_rec_1__runAux___main___rarg), 3, 2);
lean::closure_set(x_4, 0, x_0);
lean::closure_set(x_4, 1, x_1);
x_5 = lean::apply_2(x_1, x_2, x_4);
return x_5;
}
}
obj* l___private_init_lean_parser_rec_1__runAux___main(obj* x_0, obj* x_1, obj* x_2) {
_start:
{
obj* x_3;
x_3 = lean::alloc_closure(reinterpret_cast<void*>(l___private_init_lean_parser_rec_1__runAux___main___rarg), 3, 0);
return x_3;
}
}
obj* l___private_init_lean_parser_rec_1__runAux___main___boxed(obj* x_0, obj* x_1, obj* x_2) {
_start:
{
obj* x_3;
x_3 = l___private_init_lean_parser_rec_1__runAux___main(x_0, x_1, x_2);
lean::dec(x_0);
lean::dec(x_1);
lean::dec(x_2);
return x_3;
}
}
obj* l___private_init_lean_parser_rec_1__runAux___rarg(obj* x_0, obj* x_1, obj* x_2) {
_start:
{
obj* x_3;
x_3 = l___private_init_lean_parser_rec_1__runAux___main___rarg(x_0, x_1, x_2);
return x_3;
}
}
obj* l___private_init_lean_parser_rec_1__runAux(obj* x_0, obj* x_1, obj* x_2, obj* x_3) {
_start:
{
obj* x_4;
x_4 = lean::alloc_closure(reinterpret_cast<void*>(l___private_init_lean_parser_rec_1__runAux___rarg), 3, 0);
return x_4;
}
}
obj* l___private_init_lean_parser_rec_1__runAux___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3) {
_start:
{
obj* x_4;
x_4 = l___private_init_lean_parser_rec_1__runAux(x_0, x_1, x_2, x_3);
lean::dec(x_0);
lean::dec(x_1);
lean::dec(x_2);
lean::dec(x_3);
return x_4;
}
}
obj* l_Lean_Parser_RecT_run___rarg(obj* x_0, obj* x_1, obj* x_2) {
_start:
{
obj* x_3; obj* x_4; obj* x_5; obj* x_6;
x_3 = lean::box(0);
x_4 = lean::apply_1(x_1, x_3);
x_5 = lean::alloc_closure(reinterpret_cast<void*>(l___private_init_lean_parser_rec_1__runAux___rarg), 3, 2);
lean::closure_set(x_5, 0, x_4);
lean::closure_set(x_5, 1, x_2);
x_6 = lean::apply_1(x_0, x_5);
return x_6;
obj* x_3; obj* x_4; obj* x_5;
x_3 = lean::alloc_closure(reinterpret_cast<void*>(l_StateT_MonadExcept___rarg___lambda__2), 3, 1);
lean::closure_set(x_3, 0, x_2);
x_4 = lean::alloc_closure(reinterpret_cast<void*>(l_fixCore___rarg___boxed), 3, 2);
lean::closure_set(x_4, 0, x_1);
lean::closure_set(x_4, 1, x_3);
x_5 = lean::apply_1(x_0, x_4);
return x_5;
}
}
obj* l_Lean_Parser_RecT_run(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) {
@ -184,7 +123,7 @@ lean::dec(x_4);
return x_5;
}
}
obj* _init_l_Lean_Parser_RecT_runParsec___rarg___closed__1() {
obj* _init_l_Lean_Parser_RecT_runParsec___rarg___lambda__1___closed__1() {
_start:
{
obj* x_0;
@ -192,19 +131,30 @@ x_0 = lean::mk_string("RecT.runParsec: no progress");
return x_0;
}
}
obj* l_Lean_Parser_RecT_runParsec___rarg___lambda__1(obj* x_0, obj* x_1) {
_start:
{
obj* x_2; obj* x_3; obj* x_4; obj* x_5;
x_2 = lean::box(0);
x_3 = l_Lean_Parser_RecT_runParsec___rarg___lambda__1___closed__1;
x_4 = l_mjoin___rarg___closed__1;
x_5 = l_Lean_Parser_MonadParsec_error___rarg(x_0, lean::box(0), x_3, x_4, x_2, x_2);
return x_5;
}
}
obj* l_Lean_Parser_RecT_runParsec___rarg(obj* x_0, obj* x_1, obj* x_2) {
_start:
{
obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8;
x_3 = lean::box(0);
x_4 = l_Lean_Parser_RecT_runParsec___rarg___closed__1;
x_5 = l_mjoin___rarg___closed__1;
x_6 = l_Lean_Parser_MonadParsec_error___rarg(x_0, lean::box(0), x_4, x_5, x_3, x_3);
x_7 = lean::alloc_closure(reinterpret_cast<void*>(l___private_init_lean_parser_rec_1__runAux___rarg), 3, 2);
lean::closure_set(x_7, 0, x_6);
lean::closure_set(x_7, 1, x_2);
x_8 = lean::apply_1(x_1, x_7);
return x_8;
obj* x_3; obj* x_4; obj* x_5; obj* x_6;
x_3 = lean::alloc_closure(reinterpret_cast<void*>(l_Lean_Parser_RecT_runParsec___rarg___lambda__1___boxed), 2, 1);
lean::closure_set(x_3, 0, x_0);
x_4 = lean::alloc_closure(reinterpret_cast<void*>(l_StateT_MonadExcept___rarg___lambda__2), 3, 1);
lean::closure_set(x_4, 0, x_2);
x_5 = lean::alloc_closure(reinterpret_cast<void*>(l_fixCore___rarg___boxed), 3, 2);
lean::closure_set(x_5, 0, x_3);
lean::closure_set(x_5, 1, x_4);
x_6 = lean::apply_1(x_1, x_5);
return x_6;
}
}
obj* l_Lean_Parser_RecT_runParsec(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) {
@ -215,6 +165,15 @@ x_6 = lean::alloc_closure(reinterpret_cast<void*>(l_Lean_Parser_RecT_runParsec__
return x_6;
}
}
obj* l_Lean_Parser_RecT_runParsec___rarg___lambda__1___boxed(obj* x_0, obj* x_1) {
_start:
{
obj* x_2;
x_2 = l_Lean_Parser_RecT_runParsec___rarg___lambda__1(x_0, x_1);
lean::dec(x_1);
return x_2;
}
}
obj* l_Lean_Parser_RecT_runParsec___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) {
_start:
{
@ -484,6 +443,7 @@ return x_4;
}
obj* initialize_init_control_reader(obj*);
obj* initialize_init_lean_parser_parsec(obj*);
obj* initialize_init_fix(obj*);
static bool _G_initialized = false;
obj* initialize_init_lean_parser_rec(obj* w) {
if (_G_initialized) return w;
@ -492,7 +452,9 @@ if (io_result_is_error(w)) return w;
w = initialize_init_control_reader(w);
if (io_result_is_error(w)) return w;
w = initialize_init_lean_parser_parsec(w);
l_Lean_Parser_RecT_runParsec___rarg___closed__1 = _init_l_Lean_Parser_RecT_runParsec___rarg___closed__1();
lean::mark_persistent(l_Lean_Parser_RecT_runParsec___rarg___closed__1);
if (io_result_is_error(w)) return w;
w = initialize_init_fix(w);
l_Lean_Parser_RecT_runParsec___rarg___lambda__1___closed__1 = _init_l_Lean_Parser_RecT_runParsec___rarg___lambda__1___closed__1();
lean::mark_persistent(l_Lean_Parser_RecT_runParsec___rarg___lambda__1___closed__1);
return w;
}

View file

@ -77,7 +77,6 @@ obj* l_Lean_Parser_Syntax_list(obj*);
obj* l_Lean_Parser_Syntax_mreplace___boxed(obj*);
extern obj* l_Lean_Format_paren___closed__1;
obj* l_Lean_Parser_Syntax_mkNode(obj*, obj*);
obj* l_Option_getOrElse___main___rarg(obj*, obj*);
obj* l_Lean_Parser_Syntax_kind(obj*);
obj* l_List_map___main___at_Lean_Parser_Syntax_toFormat___main___spec__12(obj*);
obj* l_Lean_Parser_Syntax_mreplace___main___rarg___lambda__3(obj*, obj*, obj*, obj*, obj*);
@ -99,7 +98,6 @@ uint8 nat_dec_eq(obj*, obj*);
}
uint8 l_List_foldr___main___at_Lean_Parser_Syntax_reprint___main___spec__3(obj*, uint8, obj*);
obj* l_Lean_Parser_Syntax_reprint___main___closed__1;
obj* l_Option_orelse___main___rarg(obj*, obj*);
obj* l_Lean_Parser_Syntax_reprintAtom(obj*);
obj* l_Lean_Parser_Syntax_mreplace___main___at_Lean_Parser_Syntax_updateLeading___spec__1(obj*, obj*, obj*);
obj* l_Lean_Parser_Syntax_reprint(obj*);
@ -140,7 +138,6 @@ obj* l_Lean_Parser_Syntax_reprint___main(obj*);
obj* l_List_foldl___main___at_String_join___spec__1(obj*, obj*);
obj* l_String_quote(obj*);
obj* l_Lean_Parser_Syntax_toFormat___main___closed__7;
obj* l_Lean_Parser_Syntax_mreplace___main___rarg___lambda__1___boxed(obj*, obj*, obj*);
obj* l_Lean_Parser_Substring_ofString(obj*);
uint8 l_Lean_Parser_Syntax_isOfKind(obj*, obj*);
obj* l_Lean_Format_joinSep___main___at_Lean_Parser_Syntax_toFormat___main___spec__10(obj*, obj*);
@ -700,16 +697,34 @@ return x_1;
obj* l_Lean_Parser_Syntax_mreplace___main___rarg___lambda__1(obj* x_0, obj* x_1, obj* x_2) {
_start:
{
obj* x_3; obj* x_6; obj* x_9; obj* x_10;
if (lean::obj_tag(x_2) == 0)
{
obj* x_3; obj* x_6; obj* x_9;
x_3 = lean::cnstr_get(x_0, 0);
lean::inc(x_3);
lean::dec(x_0);
x_6 = lean::cnstr_get(x_3, 1);
lean::inc(x_6);
lean::dec(x_3);
x_9 = l_Option_getOrElse___main___rarg(x_2, x_1);
x_10 = lean::apply_2(x_6, lean::box(0), x_9);
return x_10;
x_9 = lean::apply_2(x_6, lean::box(0), x_1);
return x_9;
}
else
{
obj* x_11; obj* x_14; obj* x_17; obj* x_20;
lean::dec(x_1);
x_11 = lean::cnstr_get(x_0, 0);
lean::inc(x_11);
lean::dec(x_0);
x_14 = lean::cnstr_get(x_11, 1);
lean::inc(x_14);
lean::dec(x_11);
x_17 = lean::cnstr_get(x_2, 0);
lean::inc(x_17);
lean::dec(x_2);
x_20 = lean::apply_2(x_14, lean::box(0), x_17);
return x_20;
}
}
}
obj* l_Lean_Parser_Syntax_mreplace___main___rarg___lambda__2(obj* x_0, obj* x_1, obj* x_2) {
@ -812,7 +827,7 @@ x_16 = lean::cnstr_get(x_0, 1);
lean::inc(x_16);
lean::inc(x_2);
x_19 = lean::apply_1(x_1, x_2);
x_20 = lean::alloc_closure(reinterpret_cast<void*>(l_Lean_Parser_Syntax_mreplace___main___rarg___lambda__1___boxed), 3, 2);
x_20 = lean::alloc_closure(reinterpret_cast<void*>(l_Lean_Parser_Syntax_mreplace___main___rarg___lambda__1), 3, 2);
lean::closure_set(x_20, 0, x_0);
lean::closure_set(x_20, 1, x_2);
x_21 = lean::apply_4(x_16, lean::box(0), lean::box(0), x_19, x_20);
@ -837,16 +852,6 @@ lean::dec(x_0);
return x_1;
}
}
obj* l_Lean_Parser_Syntax_mreplace___main___rarg___lambda__1___boxed(obj* x_0, obj* x_1, obj* x_2) {
_start:
{
obj* x_3;
x_3 = l_Lean_Parser_Syntax_mreplace___main___rarg___lambda__1(x_0, x_1, x_2);
lean::dec(x_1);
lean::dec(x_2);
return x_3;
}
}
obj* l_Lean_Parser_Syntax_mreplace___main___boxed(obj* x_0) {
_start:
{
@ -921,74 +926,84 @@ return x_12;
obj* l_Lean_Parser_Syntax_mreplace___main___at_Lean_Parser_Syntax_replace___spec__1(obj* x_0, obj* x_1) {
_start:
{
obj* x_2;
switch (lean::obj_tag(x_1)) {
case 2:
{
obj* x_2; obj* x_6; obj* x_7;
x_2 = lean::cnstr_get(x_1, 0);
lean::inc(x_2);
obj* x_4; obj* x_8; obj* x_9;
x_4 = lean::cnstr_get(x_1, 0);
lean::inc(x_4);
lean::inc(x_1);
lean::inc(x_0);
x_6 = lean::apply_1(x_0, x_1);
x_8 = lean::apply_1(x_0, x_1);
if (lean::is_exclusive(x_1)) {
lean::cnstr_release(x_1, 0);
x_7 = x_1;
x_9 = x_1;
} else {
lean::dec(x_1);
x_7 = lean::box(0);
x_9 = lean::box(0);
}
if (lean::obj_tag(x_6) == 0)
if (lean::obj_tag(x_8) == 0)
{
obj* x_8; obj* x_10; obj* x_11; obj* x_13; obj* x_16; obj* x_17;
x_8 = lean::cnstr_get(x_2, 1);
lean::inc(x_8);
x_10 = l_List_mmap___main___at_Lean_Parser_Syntax_replace___spec__2(x_0, x_8);
x_11 = lean::cnstr_get(x_2, 0);
lean::inc(x_11);
x_13 = lean::cnstr_get(x_2, 2);
obj* x_10; obj* x_12; obj* x_13; obj* x_15; obj* x_18; obj* x_19;
x_10 = lean::cnstr_get(x_4, 1);
lean::inc(x_10);
x_12 = l_List_mmap___main___at_Lean_Parser_Syntax_replace___spec__2(x_0, x_10);
x_13 = lean::cnstr_get(x_4, 0);
lean::inc(x_13);
lean::dec(x_2);
x_16 = lean::alloc_cnstr(0, 3, 0);
lean::cnstr_set(x_16, 0, x_11);
lean::cnstr_set(x_16, 1, x_10);
lean::cnstr_set(x_16, 2, x_13);
if (lean::is_scalar(x_7)) {
x_17 = lean::alloc_cnstr(2, 1, 0);
x_15 = lean::cnstr_get(x_4, 2);
lean::inc(x_15);
lean::dec(x_4);
x_18 = lean::alloc_cnstr(0, 3, 0);
lean::cnstr_set(x_18, 0, x_13);
lean::cnstr_set(x_18, 1, x_12);
lean::cnstr_set(x_18, 2, x_15);
if (lean::is_scalar(x_9)) {
x_19 = lean::alloc_cnstr(2, 1, 0);
} else {
x_17 = x_7;
x_19 = x_9;
}
lean::cnstr_set(x_17, 0, x_16);
return x_17;
lean::cnstr_set(x_19, 0, x_18);
return x_19;
}
else
{
obj* x_21;
lean::dec(x_2);
obj* x_23;
lean::dec(x_4);
lean::dec(x_9);
lean::dec(x_0);
lean::dec(x_7);
x_21 = lean::cnstr_get(x_6, 0);
lean::inc(x_21);
lean::dec(x_6);
return x_21;
x_23 = lean::cnstr_get(x_8, 0);
lean::inc(x_23);
lean::dec(x_8);
return x_23;
}
}
case 3:
{
obj* x_24; obj* x_25;
x_24 = lean::apply_1(x_0, x_1);
x_25 = l_Option_getOrElse___main___rarg(x_24, x_1);
lean::dec(x_24);
return x_25;
}
default:
{
obj* x_28; obj* x_29;
obj* x_26;
x_26 = lean::box(0);
x_2 = x_26;
goto lbl_3;
}
}
lbl_3:
{
obj* x_29;
lean::dec(x_2);
lean::inc(x_1);
x_28 = lean::apply_1(x_0, x_1);
x_29 = l_Option_getOrElse___main___rarg(x_28, x_1);
x_29 = lean::apply_1(x_0, x_1);
if (lean::obj_tag(x_29) == 0)
{
return x_1;
}
else
{
obj* x_31;
lean::dec(x_1);
lean::dec(x_28);
return x_29;
x_31 = lean::cnstr_get(x_29, 0);
lean::inc(x_31);
lean::dec(x_29);
return x_31;
}
}
}
@ -1393,31 +1408,58 @@ goto lbl_4;
}
lbl_4:
{
obj* x_45; obj* x_46; obj* x_48; obj* x_50; obj* x_51; obj* x_54;
obj* x_45; obj* x_46;
lean::dec(x_3);
lean::inc(x_1);
x_45 = lean::apply_2(x_0, x_1, x_2);
x_46 = lean::cnstr_get(x_45, 0);
lean::inc(x_46);
if (lean::obj_tag(x_46) == 0)
{
obj* x_48; obj* x_50; obj* x_51;
x_48 = lean::cnstr_get(x_45, 1);
if (lean::is_exclusive(x_45)) {
lean::cnstr_release(x_45, 0);
x_50 = x_45;
} else {
lean::inc(x_46);
lean::inc(x_48);
lean::dec(x_45);
x_50 = lean::box(0);
}
x_51 = l_Option_getOrElse___main___rarg(x_46, x_1);
lean::dec(x_1);
lean::dec(x_46);
if (lean::is_scalar(x_50)) {
x_54 = lean::alloc_cnstr(0, 2, 0);
x_51 = lean::alloc_cnstr(0, 2, 0);
} else {
x_54 = x_50;
x_51 = x_50;
}
lean::cnstr_set(x_51, 0, x_1);
lean::cnstr_set(x_51, 1, x_48);
return x_51;
}
else
{
obj* x_53; obj* x_55; obj* x_56; obj* x_59;
lean::dec(x_1);
x_53 = lean::cnstr_get(x_45, 1);
if (lean::is_exclusive(x_45)) {
lean::cnstr_release(x_45, 0);
x_55 = x_45;
} else {
lean::inc(x_53);
lean::dec(x_45);
x_55 = lean::box(0);
}
x_56 = lean::cnstr_get(x_46, 0);
lean::inc(x_56);
lean::dec(x_46);
if (lean::is_scalar(x_55)) {
x_59 = lean::alloc_cnstr(0, 2, 0);
} else {
x_59 = x_55;
}
lean::cnstr_set(x_59, 0, x_56);
lean::cnstr_set(x_59, 1, x_53);
return x_59;
}
lean::cnstr_set(x_54, 0, x_51);
lean::cnstr_set(x_54, 1, x_48);
return x_54;
}
}
}
@ -1456,15 +1498,19 @@ return x_0;
}
else
{
obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7;
obj* x_3; obj* x_4; obj* x_5;
x_3 = lean::cnstr_get(x_1, 0);
x_4 = lean::cnstr_get(x_1, 1);
x_5 = l_List_foldr___main___at_Lean_Parser_Syntax_getHeadInfo___main___spec__1(x_0, x_4);
x_6 = l_Lean_Parser_Syntax_getHeadInfo___main(x_3);
x_7 = l_Option_orelse___main___rarg(x_6, x_5);
lean::dec(x_5);
lean::dec(x_6);
return x_7;
x_5 = l_Lean_Parser_Syntax_getHeadInfo___main(x_3);
if (lean::obj_tag(x_5) == 0)
{
x_1 = x_4;
goto _start;
}
else
{
return x_5;
}
}
}
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -25,8 +25,11 @@ namespace lean {
obj* nat_sub(obj*, obj*);
}
obj* l_Lean_Format_pretty(obj*, obj*);
obj* l_RBNode_ins___main___at___private_init_lean_parser_trie_1__insertAux___main___spec__7___rarg___boxed(obj*, obj*, obj*);
obj* l_Lean_Parser_Trie_insert___boxed(obj*);
obj* l_Lean_Parser_Trie_mk___closed__1;
obj* l_RBNode_insert___at___private_init_lean_parser_trie_1__insertAux___main___spec__5(obj*);
obj* l_RBNode_ins___main___at___private_init_lean_parser_trie_1__insertAux___main___spec__7___boxed(obj*);
obj* l_Lean_Format_group___main(obj*);
obj* l___private_init_lean_parser_trie_4__toStringAux___main___rarg(obj*);
obj* l_RBNode_ins___main___at___private_init_lean_parser_trie_1__insertAux___main___spec__3(obj*);
@ -46,6 +49,7 @@ obj* l___private_init_lean_parser_trie_1__insertAux___rarg(obj*, obj*, obj*, obj
obj* l___private_init_lean_parser_trie_3__matchPrefixAux___main___rarg(obj*, obj*, obj*, obj*);
obj* l_Lean_Parser_Trie_insert___rarg(obj*, obj*, obj*);
obj* l_RBNode_balance2___main___rarg(obj*, obj*);
obj* l_RBNode_insert___at___private_init_lean_parser_trie_1__insertAux___main___spec__5___boxed(obj*);
obj* l_Lean_toFmt___at___private_init_lean_parser_trie_4__toStringAux___main___spec__2(obj*);
obj* l___private_init_lean_parser_trie_4__toStringAux___rarg(obj*);
obj* l___private_init_lean_parser_trie_2__findAux___main___rarg(obj*, obj*, obj*);
@ -59,12 +63,12 @@ obj* l_RBNode_fold___main___at___private_init_lean_parser_trie_4__toStringAux___
obj* l_RBNode_insert___at___private_init_lean_parser_trie_1__insertAux___main___spec__2(obj*);
obj* l___private_init_lean_parser_trie_4__toStringAux___boxed(obj*);
obj* l_String_Iterator_next___main(obj*);
obj* l_RBNode_ins___main___at___private_init_lean_parser_trie_1__insertAux___main___spec__7(obj*);
namespace lean {
obj* string_append(obj*, obj*);
}
obj* l_Lean_Parser_Trie_find___boxed(obj*);
obj* l_String_OldIterator_next___main(obj*);
obj* l_Option_getOrElse___main___rarg(obj*, obj*);
obj* l_Lean_toFmt___at___private_init_lean_parser_trie_4__toStringAux___main___spec__2___boxed(obj*);
obj* l___private_init_lean_parser_trie_3__matchPrefixAux(obj*);
obj* l_Lean_Parser_Trie_HasToString___rarg(obj*);
@ -77,14 +81,18 @@ uint8 nat_dec_eq(obj*, obj*);
}
obj* l___private_init_lean_parser_trie_2__findAux(obj*);
uint8 l_RBNode_isRed___main___rarg(obj*);
obj* l_Option_orelse___main___rarg(obj*, obj*);
obj* l_RBNode_ins___main___at___private_init_lean_parser_trie_1__insertAux___main___spec__7___rarg(obj*, uint32, obj*);
obj* l_RBNode_fold___main___at___private_init_lean_parser_trie_4__toStringAux___main___spec__3(obj*);
obj* l_Lean_Parser_Trie_mk(obj*);
obj* l___private_init_lean_parser_trie_2__findAux___boxed(obj*);
obj* l_RBNode_ins___main___at___private_init_lean_parser_trie_1__insertAux___main___spec__6___rarg(obj*, uint32, obj*);
obj* l_RBNode_ins___main___at___private_init_lean_parser_trie_1__insertAux___main___spec__6(obj*);
obj* l_Lean_Parser_Trie_HasToString(obj*);
obj* l_RBNode_fold___main___at___private_init_lean_parser_trie_4__toStringAux___main___spec__3___boxed(obj*);
obj* l___private_init_lean_parser_trie_3__matchPrefixAux___rarg(obj*, obj*, obj*, obj*);
obj* l_Lean_Parser_Trie_matchPrefix(obj*);
obj* l_RBNode_ins___main___at___private_init_lean_parser_trie_1__insertAux___main___spec__6___rarg___boxed(obj*, obj*, obj*);
obj* l_RBNode_insert___at___private_init_lean_parser_trie_1__insertAux___main___spec__5___rarg(obj*, uint32, obj*);
obj* l_RBNode_ins___main___at___private_init_lean_parser_trie_1__insertAux___main___spec__4___rarg(obj*, uint32, obj*);
obj* l_RBNode_insert___at___private_init_lean_parser_trie_1__insertAux___main___spec__2___rarg(obj*, uint32, obj*);
obj* l_RBNode_find___main___at___private_init_lean_parser_trie_1__insertAux___main___spec__1(obj*);
@ -100,8 +108,10 @@ obj* l_RBNode_ins___main___at___private_init_lean_parser_trie_1__insertAux___mai
obj* l_RBNode_fold___main___at___private_init_lean_parser_trie_4__toStringAux___main___spec__3___rarg(obj*, obj*);
obj* l___private_init_lean_parser_trie_1__insertAux(obj*);
obj* l___private_init_lean_parser_trie_1__insertAux___main___rarg___boxed(obj*, obj*, obj*, obj*);
obj* l_RBNode_ins___main___at___private_init_lean_parser_trie_1__insertAux___main___spec__6___boxed(obj*);
obj* l_Lean_Parser_Trie_find___rarg(obj*, obj*);
obj* l___private_init_lean_parser_trie_2__findAux___main___boxed(obj*);
obj* l_RBNode_insert___at___private_init_lean_parser_trie_1__insertAux___main___spec__5___rarg___boxed(obj*, obj*, obj*);
obj* l_RBNode_insert___at___private_init_lean_parser_trie_1__insertAux___main___spec__2___rarg___boxed(obj*, obj*, obj*);
obj* l_Lean_Parser_Trie_mk___boxed(obj*);
obj* l_Lean_Parser_Trie_insert(obj*);
@ -711,6 +721,518 @@ x_1 = lean::alloc_closure(reinterpret_cast<void*>(l_RBNode_insert___at___private
return x_1;
}
}
obj* l_RBNode_ins___main___at___private_init_lean_parser_trie_1__insertAux___main___spec__6___rarg(obj* x_0, uint32 x_1, obj* x_2) {
_start:
{
if (lean::obj_tag(x_0) == 0)
{
uint8 x_3; obj* x_4; obj* x_5; obj* x_6;
x_3 = 0;
x_4 = lean::box_uint32(x_1);
x_5 = lean::alloc_cnstr(1, 4, 1);
lean::cnstr_set(x_5, 0, x_0);
lean::cnstr_set(x_5, 1, x_4);
lean::cnstr_set(x_5, 2, x_2);
lean::cnstr_set(x_5, 3, x_0);
lean::cnstr_set_scalar(x_5, sizeof(void*)*4, x_3);
x_6 = x_5;
return x_6;
}
else
{
uint8 x_7;
x_7 = lean::cnstr_get_scalar<uint8>(x_0, sizeof(void*)*4);
if (x_7 == 0)
{
obj* x_8; obj* x_10; obj* x_12; obj* x_14; obj* x_16; uint32 x_17; uint8 x_18;
x_8 = lean::cnstr_get(x_0, 0);
x_10 = lean::cnstr_get(x_0, 1);
x_12 = lean::cnstr_get(x_0, 2);
x_14 = lean::cnstr_get(x_0, 3);
if (lean::is_exclusive(x_0)) {
lean::cnstr_set(x_0, 0, lean::box(0));
lean::cnstr_set(x_0, 1, lean::box(0));
lean::cnstr_set(x_0, 2, lean::box(0));
lean::cnstr_set(x_0, 3, lean::box(0));
x_16 = x_0;
} else {
lean::inc(x_8);
lean::inc(x_10);
lean::inc(x_12);
lean::inc(x_14);
lean::dec(x_0);
x_16 = lean::box(0);
}
x_17 = lean::unbox_uint32(x_10);
x_18 = x_1 < x_17;
if (x_18 == 0)
{
uint8 x_19;
x_19 = x_17 < x_1;
if (x_19 == 0)
{
obj* x_21; obj* x_22; obj* x_23;
lean::dec(x_12);
x_21 = lean::box_uint32(x_1);
if (lean::is_scalar(x_16)) {
x_22 = lean::alloc_cnstr(1, 4, 1);
} else {
x_22 = x_16;
}
lean::cnstr_set(x_22, 0, x_8);
lean::cnstr_set(x_22, 1, x_21);
lean::cnstr_set(x_22, 2, x_2);
lean::cnstr_set(x_22, 3, x_14);
lean::cnstr_set_scalar(x_22, sizeof(void*)*4, x_7);
x_23 = x_22;
return x_23;
}
else
{
obj* x_24; obj* x_25; obj* x_26;
x_24 = l_RBNode_ins___main___at___private_init_lean_parser_trie_1__insertAux___main___spec__6___rarg(x_14, x_1, x_2);
if (lean::is_scalar(x_16)) {
x_25 = lean::alloc_cnstr(1, 4, 1);
} else {
x_25 = x_16;
}
lean::cnstr_set(x_25, 0, x_8);
lean::cnstr_set(x_25, 1, x_10);
lean::cnstr_set(x_25, 2, x_12);
lean::cnstr_set(x_25, 3, x_24);
lean::cnstr_set_scalar(x_25, sizeof(void*)*4, x_7);
x_26 = x_25;
return x_26;
}
}
else
{
obj* x_27; obj* x_28; obj* x_29;
x_27 = l_RBNode_ins___main___at___private_init_lean_parser_trie_1__insertAux___main___spec__6___rarg(x_8, x_1, x_2);
if (lean::is_scalar(x_16)) {
x_28 = lean::alloc_cnstr(1, 4, 1);
} else {
x_28 = x_16;
}
lean::cnstr_set(x_28, 0, x_27);
lean::cnstr_set(x_28, 1, x_10);
lean::cnstr_set(x_28, 2, x_12);
lean::cnstr_set(x_28, 3, x_14);
lean::cnstr_set_scalar(x_28, sizeof(void*)*4, x_7);
x_29 = x_28;
return x_29;
}
}
else
{
obj* x_30; obj* x_32; obj* x_34; obj* x_36; obj* x_38; uint32 x_39; uint8 x_40;
x_30 = lean::cnstr_get(x_0, 0);
x_32 = lean::cnstr_get(x_0, 1);
x_34 = lean::cnstr_get(x_0, 2);
x_36 = lean::cnstr_get(x_0, 3);
if (lean::is_exclusive(x_0)) {
lean::cnstr_set(x_0, 0, lean::box(0));
lean::cnstr_set(x_0, 1, lean::box(0));
lean::cnstr_set(x_0, 2, lean::box(0));
lean::cnstr_set(x_0, 3, lean::box(0));
x_38 = x_0;
} else {
lean::inc(x_30);
lean::inc(x_32);
lean::inc(x_34);
lean::inc(x_36);
lean::dec(x_0);
x_38 = lean::box(0);
}
x_39 = lean::unbox_uint32(x_32);
x_40 = x_1 < x_39;
if (x_40 == 0)
{
uint8 x_41;
x_41 = x_39 < x_1;
if (x_41 == 0)
{
obj* x_43; obj* x_44; obj* x_45;
lean::dec(x_34);
x_43 = lean::box_uint32(x_1);
if (lean::is_scalar(x_38)) {
x_44 = lean::alloc_cnstr(1, 4, 1);
} else {
x_44 = x_38;
}
lean::cnstr_set(x_44, 0, x_30);
lean::cnstr_set(x_44, 1, x_43);
lean::cnstr_set(x_44, 2, x_2);
lean::cnstr_set(x_44, 3, x_36);
lean::cnstr_set_scalar(x_44, sizeof(void*)*4, x_7);
x_45 = x_44;
return x_45;
}
else
{
uint8 x_46;
x_46 = l_RBNode_isRed___main___rarg(x_36);
if (x_46 == 0)
{
obj* x_47; obj* x_48; obj* x_49;
x_47 = l_RBNode_ins___main___at___private_init_lean_parser_trie_1__insertAux___main___spec__6___rarg(x_36, x_1, x_2);
if (lean::is_scalar(x_38)) {
x_48 = lean::alloc_cnstr(1, 4, 1);
} else {
x_48 = x_38;
}
lean::cnstr_set(x_48, 0, x_30);
lean::cnstr_set(x_48, 1, x_32);
lean::cnstr_set(x_48, 2, x_34);
lean::cnstr_set(x_48, 3, x_47);
lean::cnstr_set_scalar(x_48, sizeof(void*)*4, x_7);
x_49 = x_48;
return x_49;
}
else
{
obj* x_50; obj* x_51; obj* x_52; obj* x_53; obj* x_54;
x_50 = lean::box(0);
if (lean::is_scalar(x_38)) {
x_51 = lean::alloc_cnstr(1, 4, 1);
} else {
x_51 = x_38;
}
lean::cnstr_set(x_51, 0, x_30);
lean::cnstr_set(x_51, 1, x_32);
lean::cnstr_set(x_51, 2, x_34);
lean::cnstr_set(x_51, 3, x_50);
lean::cnstr_set_scalar(x_51, sizeof(void*)*4, x_7);
x_52 = x_51;
x_53 = l_RBNode_ins___main___at___private_init_lean_parser_trie_1__insertAux___main___spec__6___rarg(x_36, x_1, x_2);
x_54 = l_RBNode_balance2___main___rarg(x_52, x_53);
return x_54;
}
}
}
else
{
uint8 x_55;
x_55 = l_RBNode_isRed___main___rarg(x_30);
if (x_55 == 0)
{
obj* x_56; obj* x_57; obj* x_58;
x_56 = l_RBNode_ins___main___at___private_init_lean_parser_trie_1__insertAux___main___spec__6___rarg(x_30, x_1, x_2);
if (lean::is_scalar(x_38)) {
x_57 = lean::alloc_cnstr(1, 4, 1);
} else {
x_57 = x_38;
}
lean::cnstr_set(x_57, 0, x_56);
lean::cnstr_set(x_57, 1, x_32);
lean::cnstr_set(x_57, 2, x_34);
lean::cnstr_set(x_57, 3, x_36);
lean::cnstr_set_scalar(x_57, sizeof(void*)*4, x_7);
x_58 = x_57;
return x_58;
}
else
{
obj* x_59; obj* x_60; obj* x_61; obj* x_62; obj* x_63;
x_59 = lean::box(0);
if (lean::is_scalar(x_38)) {
x_60 = lean::alloc_cnstr(1, 4, 1);
} else {
x_60 = x_38;
}
lean::cnstr_set(x_60, 0, x_59);
lean::cnstr_set(x_60, 1, x_32);
lean::cnstr_set(x_60, 2, x_34);
lean::cnstr_set(x_60, 3, x_36);
lean::cnstr_set_scalar(x_60, sizeof(void*)*4, x_7);
x_61 = x_60;
x_62 = l_RBNode_ins___main___at___private_init_lean_parser_trie_1__insertAux___main___spec__6___rarg(x_30, x_1, x_2);
x_63 = l_RBNode_balance1___main___rarg(x_61, x_62);
return x_63;
}
}
}
}
}
}
obj* l_RBNode_ins___main___at___private_init_lean_parser_trie_1__insertAux___main___spec__6(obj* x_0) {
_start:
{
obj* x_1;
x_1 = lean::alloc_closure(reinterpret_cast<void*>(l_RBNode_ins___main___at___private_init_lean_parser_trie_1__insertAux___main___spec__6___rarg___boxed), 3, 0);
return x_1;
}
}
obj* l_RBNode_ins___main___at___private_init_lean_parser_trie_1__insertAux___main___spec__7___rarg(obj* x_0, uint32 x_1, obj* x_2) {
_start:
{
if (lean::obj_tag(x_0) == 0)
{
uint8 x_3; obj* x_4; obj* x_5; obj* x_6;
x_3 = 0;
x_4 = lean::box_uint32(x_1);
x_5 = lean::alloc_cnstr(1, 4, 1);
lean::cnstr_set(x_5, 0, x_0);
lean::cnstr_set(x_5, 1, x_4);
lean::cnstr_set(x_5, 2, x_2);
lean::cnstr_set(x_5, 3, x_0);
lean::cnstr_set_scalar(x_5, sizeof(void*)*4, x_3);
x_6 = x_5;
return x_6;
}
else
{
uint8 x_7;
x_7 = lean::cnstr_get_scalar<uint8>(x_0, sizeof(void*)*4);
if (x_7 == 0)
{
obj* x_8; obj* x_10; obj* x_12; obj* x_14; obj* x_16; uint32 x_17; uint8 x_18;
x_8 = lean::cnstr_get(x_0, 0);
x_10 = lean::cnstr_get(x_0, 1);
x_12 = lean::cnstr_get(x_0, 2);
x_14 = lean::cnstr_get(x_0, 3);
if (lean::is_exclusive(x_0)) {
lean::cnstr_set(x_0, 0, lean::box(0));
lean::cnstr_set(x_0, 1, lean::box(0));
lean::cnstr_set(x_0, 2, lean::box(0));
lean::cnstr_set(x_0, 3, lean::box(0));
x_16 = x_0;
} else {
lean::inc(x_8);
lean::inc(x_10);
lean::inc(x_12);
lean::inc(x_14);
lean::dec(x_0);
x_16 = lean::box(0);
}
x_17 = lean::unbox_uint32(x_10);
x_18 = x_1 < x_17;
if (x_18 == 0)
{
uint8 x_19;
x_19 = x_17 < x_1;
if (x_19 == 0)
{
obj* x_21; obj* x_22; obj* x_23;
lean::dec(x_12);
x_21 = lean::box_uint32(x_1);
if (lean::is_scalar(x_16)) {
x_22 = lean::alloc_cnstr(1, 4, 1);
} else {
x_22 = x_16;
}
lean::cnstr_set(x_22, 0, x_8);
lean::cnstr_set(x_22, 1, x_21);
lean::cnstr_set(x_22, 2, x_2);
lean::cnstr_set(x_22, 3, x_14);
lean::cnstr_set_scalar(x_22, sizeof(void*)*4, x_7);
x_23 = x_22;
return x_23;
}
else
{
obj* x_24; obj* x_25; obj* x_26;
x_24 = l_RBNode_ins___main___at___private_init_lean_parser_trie_1__insertAux___main___spec__7___rarg(x_14, x_1, x_2);
if (lean::is_scalar(x_16)) {
x_25 = lean::alloc_cnstr(1, 4, 1);
} else {
x_25 = x_16;
}
lean::cnstr_set(x_25, 0, x_8);
lean::cnstr_set(x_25, 1, x_10);
lean::cnstr_set(x_25, 2, x_12);
lean::cnstr_set(x_25, 3, x_24);
lean::cnstr_set_scalar(x_25, sizeof(void*)*4, x_7);
x_26 = x_25;
return x_26;
}
}
else
{
obj* x_27; obj* x_28; obj* x_29;
x_27 = l_RBNode_ins___main___at___private_init_lean_parser_trie_1__insertAux___main___spec__7___rarg(x_8, x_1, x_2);
if (lean::is_scalar(x_16)) {
x_28 = lean::alloc_cnstr(1, 4, 1);
} else {
x_28 = x_16;
}
lean::cnstr_set(x_28, 0, x_27);
lean::cnstr_set(x_28, 1, x_10);
lean::cnstr_set(x_28, 2, x_12);
lean::cnstr_set(x_28, 3, x_14);
lean::cnstr_set_scalar(x_28, sizeof(void*)*4, x_7);
x_29 = x_28;
return x_29;
}
}
else
{
obj* x_30; obj* x_32; obj* x_34; obj* x_36; obj* x_38; uint32 x_39; uint8 x_40;
x_30 = lean::cnstr_get(x_0, 0);
x_32 = lean::cnstr_get(x_0, 1);
x_34 = lean::cnstr_get(x_0, 2);
x_36 = lean::cnstr_get(x_0, 3);
if (lean::is_exclusive(x_0)) {
lean::cnstr_set(x_0, 0, lean::box(0));
lean::cnstr_set(x_0, 1, lean::box(0));
lean::cnstr_set(x_0, 2, lean::box(0));
lean::cnstr_set(x_0, 3, lean::box(0));
x_38 = x_0;
} else {
lean::inc(x_30);
lean::inc(x_32);
lean::inc(x_34);
lean::inc(x_36);
lean::dec(x_0);
x_38 = lean::box(0);
}
x_39 = lean::unbox_uint32(x_32);
x_40 = x_1 < x_39;
if (x_40 == 0)
{
uint8 x_41;
x_41 = x_39 < x_1;
if (x_41 == 0)
{
obj* x_43; obj* x_44; obj* x_45;
lean::dec(x_34);
x_43 = lean::box_uint32(x_1);
if (lean::is_scalar(x_38)) {
x_44 = lean::alloc_cnstr(1, 4, 1);
} else {
x_44 = x_38;
}
lean::cnstr_set(x_44, 0, x_30);
lean::cnstr_set(x_44, 1, x_43);
lean::cnstr_set(x_44, 2, x_2);
lean::cnstr_set(x_44, 3, x_36);
lean::cnstr_set_scalar(x_44, sizeof(void*)*4, x_7);
x_45 = x_44;
return x_45;
}
else
{
uint8 x_46;
x_46 = l_RBNode_isRed___main___rarg(x_36);
if (x_46 == 0)
{
obj* x_47; obj* x_48; obj* x_49;
x_47 = l_RBNode_ins___main___at___private_init_lean_parser_trie_1__insertAux___main___spec__7___rarg(x_36, x_1, x_2);
if (lean::is_scalar(x_38)) {
x_48 = lean::alloc_cnstr(1, 4, 1);
} else {
x_48 = x_38;
}
lean::cnstr_set(x_48, 0, x_30);
lean::cnstr_set(x_48, 1, x_32);
lean::cnstr_set(x_48, 2, x_34);
lean::cnstr_set(x_48, 3, x_47);
lean::cnstr_set_scalar(x_48, sizeof(void*)*4, x_7);
x_49 = x_48;
return x_49;
}
else
{
obj* x_50; obj* x_51; obj* x_52; obj* x_53; obj* x_54;
x_50 = lean::box(0);
if (lean::is_scalar(x_38)) {
x_51 = lean::alloc_cnstr(1, 4, 1);
} else {
x_51 = x_38;
}
lean::cnstr_set(x_51, 0, x_30);
lean::cnstr_set(x_51, 1, x_32);
lean::cnstr_set(x_51, 2, x_34);
lean::cnstr_set(x_51, 3, x_50);
lean::cnstr_set_scalar(x_51, sizeof(void*)*4, x_7);
x_52 = x_51;
x_53 = l_RBNode_ins___main___at___private_init_lean_parser_trie_1__insertAux___main___spec__7___rarg(x_36, x_1, x_2);
x_54 = l_RBNode_balance2___main___rarg(x_52, x_53);
return x_54;
}
}
}
else
{
uint8 x_55;
x_55 = l_RBNode_isRed___main___rarg(x_30);
if (x_55 == 0)
{
obj* x_56; obj* x_57; obj* x_58;
x_56 = l_RBNode_ins___main___at___private_init_lean_parser_trie_1__insertAux___main___spec__7___rarg(x_30, x_1, x_2);
if (lean::is_scalar(x_38)) {
x_57 = lean::alloc_cnstr(1, 4, 1);
} else {
x_57 = x_38;
}
lean::cnstr_set(x_57, 0, x_56);
lean::cnstr_set(x_57, 1, x_32);
lean::cnstr_set(x_57, 2, x_34);
lean::cnstr_set(x_57, 3, x_36);
lean::cnstr_set_scalar(x_57, sizeof(void*)*4, x_7);
x_58 = x_57;
return x_58;
}
else
{
obj* x_59; obj* x_60; obj* x_61; obj* x_62; obj* x_63;
x_59 = lean::box(0);
if (lean::is_scalar(x_38)) {
x_60 = lean::alloc_cnstr(1, 4, 1);
} else {
x_60 = x_38;
}
lean::cnstr_set(x_60, 0, x_59);
lean::cnstr_set(x_60, 1, x_32);
lean::cnstr_set(x_60, 2, x_34);
lean::cnstr_set(x_60, 3, x_36);
lean::cnstr_set_scalar(x_60, sizeof(void*)*4, x_7);
x_61 = x_60;
x_62 = l_RBNode_ins___main___at___private_init_lean_parser_trie_1__insertAux___main___spec__7___rarg(x_30, x_1, x_2);
x_63 = l_RBNode_balance1___main___rarg(x_61, x_62);
return x_63;
}
}
}
}
}
}
obj* l_RBNode_ins___main___at___private_init_lean_parser_trie_1__insertAux___main___spec__7(obj* x_0) {
_start:
{
obj* x_1;
x_1 = lean::alloc_closure(reinterpret_cast<void*>(l_RBNode_ins___main___at___private_init_lean_parser_trie_1__insertAux___main___spec__7___rarg___boxed), 3, 0);
return x_1;
}
}
obj* l_RBNode_insert___at___private_init_lean_parser_trie_1__insertAux___main___spec__5___rarg(obj* x_0, uint32 x_1, obj* x_2) {
_start:
{
uint8 x_3;
x_3 = l_RBNode_isRed___main___rarg(x_0);
if (x_3 == 0)
{
obj* x_4;
x_4 = l_RBNode_ins___main___at___private_init_lean_parser_trie_1__insertAux___main___spec__6___rarg(x_0, x_1, x_2);
return x_4;
}
else
{
obj* x_5; obj* x_6;
x_5 = l_RBNode_ins___main___at___private_init_lean_parser_trie_1__insertAux___main___spec__7___rarg(x_0, x_1, x_2);
x_6 = l_RBNode_setBlack___main___rarg(x_5);
return x_6;
}
}
}
obj* l_RBNode_insert___at___private_init_lean_parser_trie_1__insertAux___main___spec__5(obj* x_0) {
_start:
{
obj* x_1;
x_1 = lean::alloc_closure(reinterpret_cast<void*>(l_RBNode_insert___at___private_init_lean_parser_trie_1__insertAux___main___spec__5___rarg___boxed), 3, 0);
return x_1;
}
}
obj* l___private_init_lean_parser_trie_1__insertAux___main___rarg(obj* x_0, obj* x_1, obj* x_2, obj* x_3) {
_start:
{
@ -719,10 +1241,12 @@ x_4 = lean::mk_nat_obj(0ul);
x_5 = lean::nat_dec_eq(x_1, x_4);
if (x_5 == 0)
{
obj* x_6; obj* x_8; obj* x_10; obj* x_11; obj* x_12; uint32 x_13; obj* x_15; obj* x_16; obj* x_17; obj* x_19; obj* x_20; obj* x_22; obj* x_23;
obj* x_6; obj* x_8; obj* x_10; obj* x_11; obj* x_12; uint32 x_13; obj* x_15; obj* x_16;
x_6 = lean::cnstr_get(x_2, 0);
x_8 = lean::cnstr_get(x_2, 1);
if (lean::is_exclusive(x_2)) {
lean::cnstr_set(x_2, 0, lean::box(0));
lean::cnstr_set(x_2, 1, lean::box(0));
x_10 = x_2;
} else {
lean::inc(x_6);
@ -735,45 +1259,65 @@ x_12 = lean::nat_sub(x_1, x_11);
x_13 = l_String_Iterator_curr___main(x_3);
lean::inc(x_8);
x_15 = l_RBNode_find___main___at___private_init_lean_parser_trie_1__insertAux___main___spec__1___rarg(x_8, x_13);
x_16 = l_Lean_Parser_Trie_mk___closed__1;
x_17 = l_Option_getOrElse___main___rarg(x_15, x_16);
lean::dec(x_15);
x_19 = l_String_Iterator_next___main(x_3);
x_20 = l___private_init_lean_parser_trie_1__insertAux___main___rarg(x_0, x_12, x_17, x_19);
x_16 = l_String_Iterator_next___main(x_3);
if (lean::obj_tag(x_15) == 0)
{
obj* x_17; obj* x_18; obj* x_20; obj* x_21;
x_17 = l_Lean_Parser_Trie_mk___closed__1;
x_18 = l___private_init_lean_parser_trie_1__insertAux___main___rarg(x_0, x_12, x_17, x_16);
lean::dec(x_12);
x_22 = l_RBNode_insert___at___private_init_lean_parser_trie_1__insertAux___main___spec__2___rarg(x_8, x_13, x_20);
x_20 = l_RBNode_insert___at___private_init_lean_parser_trie_1__insertAux___main___spec__2___rarg(x_8, x_13, x_18);
if (lean::is_scalar(x_10)) {
x_23 = lean::alloc_cnstr(0, 2, 0);
x_21 = lean::alloc_cnstr(0, 2, 0);
} else {
x_23 = x_10;
x_21 = x_10;
}
lean::cnstr_set(x_23, 0, x_6);
lean::cnstr_set(x_23, 1, x_22);
return x_23;
lean::cnstr_set(x_21, 0, x_6);
lean::cnstr_set(x_21, 1, x_20);
return x_21;
}
else
{
obj* x_25; obj* x_27; obj* x_28; obj* x_29;
obj* x_22; obj* x_25; obj* x_27; obj* x_28;
x_22 = lean::cnstr_get(x_15, 0);
lean::inc(x_22);
lean::dec(x_15);
x_25 = l___private_init_lean_parser_trie_1__insertAux___main___rarg(x_0, x_12, x_22, x_16);
lean::dec(x_12);
x_27 = l_RBNode_insert___at___private_init_lean_parser_trie_1__insertAux___main___spec__5___rarg(x_8, x_13, x_25);
if (lean::is_scalar(x_10)) {
x_28 = lean::alloc_cnstr(0, 2, 0);
} else {
x_28 = x_10;
}
lean::cnstr_set(x_28, 0, x_6);
lean::cnstr_set(x_28, 1, x_27);
return x_28;
}
}
else
{
obj* x_30; obj* x_32; obj* x_33; obj* x_34;
lean::dec(x_3);
x_25 = lean::cnstr_get(x_2, 1);
x_30 = lean::cnstr_get(x_2, 1);
if (lean::is_exclusive(x_2)) {
lean::cnstr_release(x_2, 0);
x_27 = x_2;
x_32 = x_2;
} else {
lean::inc(x_25);
lean::inc(x_30);
lean::dec(x_2);
x_27 = lean::box(0);
x_32 = lean::box(0);
}
x_28 = lean::alloc_cnstr(1, 1, 0);
lean::cnstr_set(x_28, 0, x_0);
if (lean::is_scalar(x_27)) {
x_29 = lean::alloc_cnstr(0, 2, 0);
x_33 = lean::alloc_cnstr(1, 1, 0);
lean::cnstr_set(x_33, 0, x_0);
if (lean::is_scalar(x_32)) {
x_34 = lean::alloc_cnstr(0, 2, 0);
} else {
x_29 = x_27;
x_34 = x_32;
}
lean::cnstr_set(x_29, 0, x_28);
lean::cnstr_set(x_29, 1, x_25);
return x_29;
lean::cnstr_set(x_34, 0, x_33);
lean::cnstr_set(x_34, 1, x_30);
return x_34;
}
}
}
@ -857,6 +1401,60 @@ lean::dec(x_0);
return x_1;
}
}
obj* l_RBNode_ins___main___at___private_init_lean_parser_trie_1__insertAux___main___spec__6___rarg___boxed(obj* x_0, obj* x_1, obj* x_2) {
_start:
{
uint32 x_3; obj* x_4;
x_3 = lean::unbox_uint32(x_1);
x_4 = l_RBNode_ins___main___at___private_init_lean_parser_trie_1__insertAux___main___spec__6___rarg(x_0, x_3, x_2);
return x_4;
}
}
obj* l_RBNode_ins___main___at___private_init_lean_parser_trie_1__insertAux___main___spec__6___boxed(obj* x_0) {
_start:
{
obj* x_1;
x_1 = l_RBNode_ins___main___at___private_init_lean_parser_trie_1__insertAux___main___spec__6(x_0);
lean::dec(x_0);
return x_1;
}
}
obj* l_RBNode_ins___main___at___private_init_lean_parser_trie_1__insertAux___main___spec__7___rarg___boxed(obj* x_0, obj* x_1, obj* x_2) {
_start:
{
uint32 x_3; obj* x_4;
x_3 = lean::unbox_uint32(x_1);
x_4 = l_RBNode_ins___main___at___private_init_lean_parser_trie_1__insertAux___main___spec__7___rarg(x_0, x_3, x_2);
return x_4;
}
}
obj* l_RBNode_ins___main___at___private_init_lean_parser_trie_1__insertAux___main___spec__7___boxed(obj* x_0) {
_start:
{
obj* x_1;
x_1 = l_RBNode_ins___main___at___private_init_lean_parser_trie_1__insertAux___main___spec__7(x_0);
lean::dec(x_0);
return x_1;
}
}
obj* l_RBNode_insert___at___private_init_lean_parser_trie_1__insertAux___main___spec__5___rarg___boxed(obj* x_0, obj* x_1, obj* x_2) {
_start:
{
uint32 x_3; obj* x_4;
x_3 = lean::unbox_uint32(x_1);
x_4 = l_RBNode_insert___at___private_init_lean_parser_trie_1__insertAux___main___spec__5___rarg(x_0, x_3, x_2);
return x_4;
}
}
obj* l_RBNode_insert___at___private_init_lean_parser_trie_1__insertAux___main___spec__5___boxed(obj* x_0) {
_start:
{
obj* x_1;
x_1 = l_RBNode_insert___at___private_init_lean_parser_trie_1__insertAux___main___spec__5(x_0);
lean::dec(x_0);
return x_1;
}
}
obj* l___private_init_lean_parser_trie_1__insertAux___main___rarg___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3) {
_start:
{
@ -1083,115 +1681,102 @@ x_14 = l_String_OldIterator_curr___main(x_2);
x_15 = l_RBNode_find___main___at___private_init_lean_parser_trie_1__insertAux___main___spec__1___rarg(x_8, x_14);
if (lean::obj_tag(x_6) == 0)
{
obj* x_16; obj* x_17;
x_16 = lean::box(0);
x_17 = l_Option_orelse___main___rarg(x_16, x_3);
lean::dec(x_3);
if (lean::obj_tag(x_15) == 0)
{
lean::dec(x_12);
lean::dec(x_2);
return x_17;
return x_3;
}
else
{
obj* x_21; obj* x_24;
x_21 = lean::cnstr_get(x_15, 0);
lean::inc(x_21);
obj* x_18; obj* x_21;
x_18 = lean::cnstr_get(x_15, 0);
lean::inc(x_18);
lean::dec(x_15);
x_24 = l_String_OldIterator_next___main(x_2);
x_21 = l_String_OldIterator_next___main(x_2);
x_0 = x_12;
x_1 = x_21;
x_2 = x_24;
x_3 = x_17;
x_1 = x_18;
x_2 = x_21;
goto _start;
}
}
else
{
obj* x_26; obj* x_28; obj* x_30; obj* x_31; obj* x_32;
x_26 = lean::cnstr_get(x_6, 0);
obj* x_24; obj* x_26; obj* x_28; obj* x_29;
lean::dec(x_3);
x_24 = lean::cnstr_get(x_6, 0);
if (lean::is_exclusive(x_6)) {
x_28 = x_6;
x_26 = x_6;
} else {
lean::inc(x_26);
lean::inc(x_24);
lean::dec(x_6);
x_28 = lean::box(0);
x_26 = lean::box(0);
}
lean::inc(x_2);
x_30 = lean::alloc_cnstr(0, 2, 0);
lean::cnstr_set(x_30, 0, x_2);
lean::cnstr_set(x_30, 1, x_26);
if (lean::is_scalar(x_28)) {
x_31 = lean::alloc_cnstr(1, 1, 0);
x_28 = lean::alloc_cnstr(0, 2, 0);
lean::cnstr_set(x_28, 0, x_2);
lean::cnstr_set(x_28, 1, x_24);
if (lean::is_scalar(x_26)) {
x_29 = lean::alloc_cnstr(1, 1, 0);
} else {
x_31 = x_28;
x_29 = x_26;
}
lean::cnstr_set(x_31, 0, x_30);
x_32 = l_Option_orelse___main___rarg(x_31, x_3);
lean::dec(x_3);
lean::dec(x_31);
lean::cnstr_set(x_29, 0, x_28);
if (lean::obj_tag(x_15) == 0)
{
lean::dec(x_12);
lean::dec(x_2);
return x_32;
return x_29;
}
else
{
obj* x_37; obj* x_40;
x_37 = lean::cnstr_get(x_15, 0);
lean::inc(x_37);
obj* x_32; obj* x_35;
x_32 = lean::cnstr_get(x_15, 0);
lean::inc(x_32);
lean::dec(x_15);
x_40 = l_String_OldIterator_next___main(x_2);
x_35 = l_String_OldIterator_next___main(x_2);
x_0 = x_12;
x_1 = x_37;
x_2 = x_40;
x_3 = x_32;
x_1 = x_32;
x_2 = x_35;
x_3 = x_29;
goto _start;
}
}
}
else
{
obj* x_43;
obj* x_38;
lean::dec(x_0);
x_43 = lean::cnstr_get(x_1, 0);
lean::inc(x_43);
x_38 = lean::cnstr_get(x_1, 0);
lean::inc(x_38);
lean::dec(x_1);
if (lean::obj_tag(x_43) == 0)
if (lean::obj_tag(x_38) == 0)
{
obj* x_47; obj* x_48;
lean::dec(x_2);
x_47 = lean::box(0);
x_48 = l_Option_orelse___main___rarg(x_47, x_3);
lean::dec(x_3);
return x_48;
return x_3;
}
else
{
obj* x_50; obj* x_52; obj* x_53; obj* x_54; obj* x_55;
x_50 = lean::cnstr_get(x_43, 0);
if (lean::is_exclusive(x_43)) {
x_52 = x_43;
} else {
lean::inc(x_50);
lean::dec(x_43);
x_52 = lean::box(0);
}
x_53 = lean::alloc_cnstr(0, 2, 0);
lean::cnstr_set(x_53, 0, x_2);
lean::cnstr_set(x_53, 1, x_50);
if (lean::is_scalar(x_52)) {
x_54 = lean::alloc_cnstr(1, 1, 0);
} else {
x_54 = x_52;
}
lean::cnstr_set(x_54, 0, x_53);
x_55 = l_Option_orelse___main___rarg(x_54, x_3);
obj* x_43; obj* x_45; obj* x_46; obj* x_47;
lean::dec(x_3);
lean::dec(x_54);
return x_55;
x_43 = lean::cnstr_get(x_38, 0);
if (lean::is_exclusive(x_38)) {
x_45 = x_38;
} else {
lean::inc(x_43);
lean::dec(x_38);
x_45 = lean::box(0);
}
x_46 = lean::alloc_cnstr(0, 2, 0);
lean::cnstr_set(x_46, 0, x_2);
lean::cnstr_set(x_46, 1, x_43);
if (lean::is_scalar(x_45)) {
x_47 = lean::alloc_cnstr(1, 1, 0);
} else {
x_47 = x_45;
}
lean::cnstr_set(x_47, 0, x_46);
return x_47;
}
}
}

View file

@ -645,7 +645,7 @@ obj* x_6; obj* x_9; obj* x_10; obj* x_12; obj* x_13;
x_6 = lean::cnstr_get(x_5, 1);
lean::inc(x_6);
lean::dec(x_5);
x_9 = lean::thunk_get(x_0);
x_9 = lean::thunk_get_own(x_0);
x_10 = lean::apply_1(x_9, x_6);
lean::inc(x_4);
x_12 = lean::alloc_closure(reinterpret_cast<void*>(l_Lean_Trace_Lean_Trace_MonadTracer___rarg___lambda__2), 5, 4);
@ -686,7 +686,7 @@ lean::dec(x_11);
lean::dec(x_4);
lean::dec(x_3);
lean::dec(x_2);
x_22 = lean::thunk_get(x_1);
x_22 = lean::thunk_get_own(x_1);
lean::dec(x_1);
x_24 = lean::apply_1(x_22, x_9);
return x_24;
@ -859,7 +859,7 @@ obj* x_7; obj* x_10; obj* x_11; obj* x_13; obj* x_14;
x_7 = lean::cnstr_get(x_6, 1);
lean::inc(x_7);
lean::dec(x_6);
x_10 = lean::thunk_get(x_0);
x_10 = lean::thunk_get_own(x_0);
x_11 = lean::apply_1(x_10, x_7);
lean::inc(x_5);
x_13 = lean::alloc_closure(reinterpret_cast<void*>(l_Lean_Trace_Lean_Trace_MonadTracer___rarg___lambda__8), 6, 5);
@ -890,7 +890,7 @@ lean::dec(x_3);
x_17 = lean::cnstr_get(x_8, 1);
lean::inc(x_17);
lean::dec(x_8);
x_20 = lean::thunk_get(x_0);
x_20 = lean::thunk_get_own(x_0);
lean::dec(x_0);
x_22 = lean::apply_1(x_20, x_17);
return x_22;
@ -926,7 +926,7 @@ lean::closure_set(x_36, 0, x_1);
lean::closure_set(x_36, 1, x_27);
x_37 = lean::alloc_closure(reinterpret_cast<void*>(l_Lean_Trace_Lean_Trace_MonadTracer___rarg___lambda__7), 2, 1);
lean::closure_set(x_37, 0, x_3);
x_38 = lean::thunk_get(x_0);
x_38 = lean::thunk_get_own(x_0);
lean::dec(x_0);
x_40 = l_MonadStateAdapter_adaptState_x_27___at_Lean_Trace_Lean_Trace_MonadTracer___spec__4___rarg(x_4, lean::box(0), x_36, x_37, x_38, x_24);
return x_40;