/* Copyright (c) 2014 Microsoft Corporation. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Author: Leonardo de Moura */ #pragma once #include "kernel/environment.h" namespace lean { class type_checker; class converter { protected: name mk_fresh_name(type_checker & tc); pair infer_type(type_checker & tc, expr const & e); extension_context & get_extension(type_checker & tc); public: virtual ~converter() {} virtual pair whnf(expr const & e, type_checker & c) = 0; virtual pair is_def_eq(expr const & t, expr const & s, type_checker & c, delayed_justification & j) = 0; virtual optional get_module_idx() const = 0; pair is_def_eq(expr const & t, expr const & s, type_checker & c); }; std::unique_ptr mk_dummy_converter(); std::unique_ptr mk_default_converter(environment const & env, optional mod_idx = optional(), bool memoize = true, name_set const & extra_opaque = name_set()); std::unique_ptr mk_default_converter(environment const & env, bool unfold_opaque_main, bool memoize = true, name_set const & extra_opaque = name_set()); bool is_opaque(declaration const & d, name_set const & extra_opaque, optional const & mod_idx); optional is_delta(environment const & env, expr const & e, name_set const & extra_opaque, optional const & mod_idx); optional is_delta(environment const & env, expr const & e, name_set const & extra_opaque = name_set()); }