Skip to content

Commit 4afc85f

Browse files
committed
more
1 parent 2970770 commit 4afc85f

File tree

13 files changed

+154
-172
lines changed

13 files changed

+154
-172
lines changed

src/include/lean/lean.h

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2829,17 +2829,16 @@ LEAN_EXPORT lean_obj_res lean_decode_uv_error(int errnum, b_lean_obj_arg fname);
28292829

28302830
static inline b_lean_obj_res lean_baseio_out_val(b_lean_obj_arg r) {
28312831
// TODO: This function needs to become identity after we are done.
2832-
return lean_ctor_get(r, 0);
2833-
// return r;
2832+
// return lean_ctor_get(r, 0);
2833+
return r;
28342834
}
28352835

28362836
static inline lean_obj_res lean_mk_baseio_out(lean_obj_arg i) {
2837-
// TODO: This function needs to become identity after we are done.
2838-
lean_object * r = lean_alloc_ctor(0, 2, 0);
2839-
lean_ctor_set(r, 0, i);
2840-
lean_ctor_set(r, 1, lean_box(0));
2841-
return r;
2837+
// lean_object * r = lean_alloc_ctor(0, 2, 0);
2838+
// lean_ctor_set(r, 0, i);
2839+
// lean_ctor_set(r, 1, lean_box(0));
28422840
// return i;
2841+
return i;
28432842
}
28442843

28452844
static inline lean_obj_res lean_io_mk_world() { return lean_box(0); }
@@ -2859,15 +2858,13 @@ static inline lean_obj_res lean_io_result_take_value(lean_obj_arg r) {
28592858
LEAN_EXPORT void lean_io_result_show_error(b_lean_obj_arg r);
28602859
LEAN_EXPORT void lean_io_mark_end_initialization(void);
28612860
static inline lean_obj_res lean_io_result_mk_ok(lean_obj_arg a) {
2862-
lean_object * r = lean_alloc_ctor(0, 2, 0);
2861+
lean_object * r = lean_alloc_ctor(0, 1, 0);
28632862
lean_ctor_set(r, 0, a);
2864-
lean_ctor_set(r, 1, lean_box(0));
28652863
return r;
28662864
}
28672865
static inline lean_obj_res lean_io_result_mk_error(lean_obj_arg e) {
2868-
lean_object * r = lean_alloc_ctor(1, 2, 0);
2866+
lean_object * r = lean_alloc_ctor(1, 1, 0);
28692867
lean_ctor_set(r, 0, e);
2870-
lean_ctor_set(r, 1, lean_box(0));
28712868
return r;
28722869
}
28732870

src/library/ir_interpreter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1153,9 +1153,9 @@ uint32 run_main(elab_environment const & env, options const & opts, list_ref<str
11531153
}
11541154

11551155
/* runMain (env : Environment) (opts : Iptions) (args : List String) : BaseIO UInt32 */
1156-
extern "C" LEAN_EXPORT obj_res lean_run_main(b_obj_arg env, b_obj_arg opts, b_obj_arg args, obj_arg) {
1156+
extern "C" LEAN_EXPORT uint32_t lean_run_main(b_obj_arg env, b_obj_arg opts, b_obj_arg args, obj_arg) {
11571157
uint32 ret = run_main(TO_REF(elab_environment, env), TO_REF(options, opts), TO_REF(list_ref<string_ref>, args));
1158-
return lean_mk_baseio_out(box(ret));
1158+
return ret;
11591159
}
11601160

11611161
extern "C" LEAN_EXPORT object * lean_eval_const(object * env, object * opts, object * c) {

0 commit comments

Comments
 (0)