refactor(kernel/converter): remove unnecessary exception
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
05d1832425
commit
2954d10df5
2 changed files with 6 additions and 13 deletions
|
@ -330,17 +330,13 @@ struct default_converter : public converter {
|
|||
This method is used to implement an optimization in the method \c is_def_eq.
|
||||
*/
|
||||
bool is_def_eq_args(expr t, expr s, context & c, delayed_justification & jst) {
|
||||
try {
|
||||
while (is_app(t) && is_app(s)) {
|
||||
if (!is_def_eq(app_arg(t), app_arg(s), c, jst))
|
||||
return false;
|
||||
t = app_fn(t);
|
||||
s = app_fn(s);
|
||||
}
|
||||
return !is_app(t) && !is_app(s);
|
||||
} catch (add_cnstr_exception &) {
|
||||
return false;
|
||||
while (is_app(t) && is_app(s)) {
|
||||
if (!is_def_eq(app_arg(t), app_arg(s), c, jst))
|
||||
return false;
|
||||
t = app_fn(t);
|
||||
s = app_fn(s);
|
||||
}
|
||||
return !is_app(t) && !is_app(s);
|
||||
}
|
||||
|
||||
/** \brief Return true iff t is a constant named f_name or an application of the form (f_name a_1 ... a_k) */
|
||||
|
|
|
@ -8,9 +8,6 @@ Author: Leonardo de Moura
|
|||
#include "kernel/environment.h"
|
||||
|
||||
namespace lean {
|
||||
/** \brief Auxiliary exception used to sign that constraints cannot be created when \c m_cnstrs_enabled flag is false. */
|
||||
struct add_cnstr_exception {};
|
||||
|
||||
class converter {
|
||||
public:
|
||||
/** \brief Abstract context that must be provided to a converter object. */
|
||||
|
|
Loading…
Reference in a new issue