Skip to content

Commit fa0bfa4

Browse files
committed
enserpentiated
1 parent 0cc256a commit fa0bfa4

File tree

6 files changed

+14
-14
lines changed

6 files changed

+14
-14
lines changed

src/Lean/Expr.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -878,7 +878,7 @@ def isHave : Expr → Bool
878878
| letE (nonDep := nonDep) .. => nonDep
879879
| _ => false
880880

881-
@[export lean_expr_isHave] def isHaveEx : Expr → Bool := isHave
881+
@[export lean_expr_is_have] def isHaveEx : Expr → Bool := isHave
882882

883883
/-- Return `true` if the given expression is a metadata. -/
884884
def isMData : Expr → Bool

src/kernel/expr.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -295,10 +295,10 @@ bool is_default_var_name(name const & n) {
295295
return n == *g_default_name;
296296
}
297297

298-
extern "C" uint8 lean_expr_isHave(object * e);
299-
bool let_nonDep_core(expr const & e) {
298+
extern "C" uint8 lean_expr_is_have(object * e);
299+
bool let_nondep_core(expr const & e) {
300300
lean_assert(is_let(e));
301-
return lean_expr_isHave(e.to_obj_arg());
301+
return lean_expr_is_have(e.to_obj_arg());
302302
}
303303

304304
// =======================================
@@ -355,7 +355,7 @@ expr update_const(expr const & e, levels const & new_levels) {
355355

356356
expr update_let(expr const & e, expr const & new_type, expr const & new_value, expr const & new_body) {
357357
if (!is_eqp(let_type(e), new_type) || !is_eqp(let_value(e), new_value) || !is_eqp(let_body(e), new_body))
358-
return mk_let(let_name(e), new_type, new_value, new_body, let_nonDep(e));
358+
return mk_let(let_name(e), new_type, new_value, new_body, let_nondep(e));
359359
else
360360
return e;
361361
}

src/kernel/expr.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -259,11 +259,11 @@ inline name const & let_name(expr const & e) { lean_assert(is_le
259259
inline expr const & let_type(expr const & e) { lean_assert(is_let(e)); return static_cast<expr const &>(cnstr_get_ref(e, 1)); }
260260
inline expr const & let_value(expr const & e) { lean_assert(is_let(e)); return static_cast<expr const &>(cnstr_get_ref(e, 2)); }
261261
inline expr const & let_body(expr const & e) { lean_assert(is_let(e)); return static_cast<expr const &>(cnstr_get_ref(e, 3)); }
262-
bool let_nonDep_core(expr const & e);
263-
inline bool let_nonDep(expr const & e) {
262+
bool let_nondep_core(expr const & e);
263+
inline bool let_nondep(expr const & e) {
264264
lean_assert(is_let(e));
265265
bool r = lean_ctor_get_uint8(e.raw(), 4*sizeof(object*) + sizeof(uint64_t));
266-
lean_assert(r == let_nonDep_core(e)); // ensure the C++ implementation matches the Lean one.
266+
lean_assert(r == let_nondep_core(e)); // ensure the C++ implementation matches the Lean one.
267267
return r;
268268
}
269269
inline bool is_shared(expr const & e) { return !is_exclusive(e.raw()); }

src/kernel/expr_eq_fn.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ class expr_eq_fn {
122122
apply(let_type(a), let_type(b), depth) &&
123123
apply(let_value(a), let_value(b), depth) &&
124124
apply(let_body(a), let_body(b), depth) &&
125-
let_nonDep(a) == let_nonDep(b) &&
125+
let_nondep(a) == let_nondep(b) &&
126126
(!CompareBinderInfo || let_name(a) == let_name(b));
127127
}
128128
lean_unreachable(); // LCOV_EXCL_LINE

src/library/expr_lt.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ bool is_lt(expr const & a, expr const & b, bool use_hash, local_ctx const * lctx
4949
else
5050
return is_lt(binding_body(a), binding_body(b), use_hash, lctx);
5151
case expr_kind::Let:
52-
if (let_nonDep(a) != let_nonDep(b))
53-
return let_nonDep(a) < let_nonDep(b);
52+
if (let_nondep(a) != let_nondep(b))
53+
return let_nondep(a) < let_nondep(b);
5454
else if (let_type(a) != let_type(b))
5555
return is_lt(let_type(a), let_type(b), use_hash, lctx);
5656
else if (let_value(a) != let_value(b))
@@ -159,8 +159,8 @@ bool is_lt_no_level_params(expr const & a, expr const & b) {
159159
else
160160
return is_lt_no_level_params(binding_body(a), binding_body(b));
161161
case expr_kind::Let:
162-
if (let_nonDep(a) != let_nonDep(b))
163-
return let_nonDep(a) < let_nonDep(b);
162+
if (let_nondep(a) != let_nondep(b))
163+
return let_nondep(a) < let_nondep(b);
164164
else if (is_lt_no_level_params(let_type(a), let_type(b)))
165165
return true;
166166
else if (is_lt_no_level_params(let_type(b), let_type(a)))

src/library/print.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ struct print_expr_fn {
191191
}
192192

193193
void print_let(expr const & e) {
194-
out() << (let_nonDep(e) ? "have " : "let ");
194+
out() << (let_nondep(e) ? "have " : "let ");
195195
auto p = let_body_fresh(e);
196196
out() << p.second << " : ";
197197
print(let_type(e));

0 commit comments

Comments
 (0)