Rename sexpr eqp to is_eqp
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
375bc817cc
commit
c6d0afcc40
3 changed files with 6 additions and 6 deletions
|
@ -72,10 +72,10 @@ static void tst1() {
|
|||
lean_assert(append(nil(), l) == l);
|
||||
lean_assert(contains(sexpr{10,20,-2,0,10}, [](sexpr e) { return to_int(e) < 0; }));
|
||||
lean_assert(!contains(sexpr{10,20,-2,0,10}, [](sexpr e) { return to_int(e) < -10; }));
|
||||
lean_assert(eqp(s1, s1));
|
||||
lean_assert(is_eqp(s1, s1));
|
||||
sexpr s3 = s1;
|
||||
lean_assert(eqp(s1, s3));
|
||||
lean_assert(!eqp(sexpr(1), sexpr(1)));
|
||||
lean_assert(is_eqp(s1, s3));
|
||||
lean_assert(!is_eqp(sexpr(1), sexpr(1)));
|
||||
lean_assert(is_list(nil()));
|
||||
}
|
||||
|
||||
|
|
|
@ -173,7 +173,7 @@ unsigned length(sexpr const & s) {
|
|||
}
|
||||
|
||||
bool operator==(sexpr const & a, sexpr const & b) {
|
||||
if (eqp(a, b))
|
||||
if (is_eqp(a, b))
|
||||
return true;
|
||||
sexpr_kind ka = a.kind();
|
||||
sexpr_kind kb = b.kind();
|
||||
|
@ -196,7 +196,7 @@ bool operator==(sexpr const & a, sexpr const & b) {
|
|||
}
|
||||
|
||||
int cmp(sexpr const & a, sexpr const & b) {
|
||||
if (eqp(a, b))
|
||||
if (is_eqp(a, b))
|
||||
return 0;
|
||||
sexpr_kind ka = a.kind();
|
||||
sexpr_kind kb = b.kind();
|
||||
|
|
|
@ -78,7 +78,7 @@ public:
|
|||
friend void swap(sexpr & a, sexpr & b) { std::swap(a.m_ptr, b.m_ptr); }
|
||||
|
||||
/** \brief Pointer equality */
|
||||
friend bool eqp(sexpr const & a, sexpr const & b) { return a.m_ptr == b.m_ptr; }
|
||||
friend bool is_eqp(sexpr const & a, sexpr const & b) { return a.m_ptr == b.m_ptr; }
|
||||
|
||||
friend std::ostream & operator<<(std::ostream & out, sexpr const & s);
|
||||
|
||||
|
|
Loading…
Reference in a new issue