fix(kernel/environment): compilation errors

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2014-04-28 10:58:14 -07:00
parent 9f57ec059a
commit 2ddadfc920
3 changed files with 7 additions and 4 deletions

View file

@ -3,7 +3,7 @@ for_each_fn.cpp replace_fn.cpp free_vars.cpp abstract.cpp
instantiate.cpp context.cpp formatter.cpp max_sharing.cpp instantiate.cpp context.cpp formatter.cpp max_sharing.cpp
definition.cpp replace_visitor.cpp environment.cpp definition.cpp replace_visitor.cpp environment.cpp
justification.cpp pos_info_provider.cpp metavar.cpp justification.cpp pos_info_provider.cpp metavar.cpp
constraint.cpp type_checker.cpp error_msgs.cpp constraint.cpp type_checker.cpp error_msgs.cpp kernel_exception.cpp
) )
target_link_libraries(kernel ${LEAN_LIBS}) target_link_libraries(kernel ${LEAN_LIBS})

View file

@ -16,8 +16,8 @@ namespace lean {
*/ */
class noop_normalizer_extension : public normalizer_extension { class noop_normalizer_extension : public normalizer_extension {
public: public:
virtual optional<std::pair<expr, constraints>> operator()(expr const &, environment const &, type_checker &) const { virtual optional<expr> operator()(expr const &, extension_context const &) const {
return optional<std::pair<expr, constraints>>(); return none_expr();
} }
}; };
@ -54,6 +54,8 @@ environment::environment(unsigned trust_lvl, bool proof_irrel, bool eta, std::un
m_extensions(std::make_shared<environment_extensions const>()) m_extensions(std::make_shared<environment_extensions const>())
{} {}
environment::~environment() {}
optional<definition> environment::find(name const & n) const { optional<definition> environment::find(name const & n) const {
definition const * r = m_definitions.find(n); definition const * r = m_definitions.find(n);
return r ? some_definition(*r) : none_definition(); return r ? some_definition(*r) : none_definition();

View file

@ -30,7 +30,8 @@ class certified_definition;
*/ */
class normalizer_extension { class normalizer_extension {
public: public:
virtual optional<expr> operator()(expr const & e, extension_context const & ctx) const; virtual ~normalizer_extension() {}
virtual optional<expr> operator()(expr const & e, extension_context const & ctx) const = 0;
}; };
/** /**