refactor(library): move library/definitional/util module to library

This commit is contained in:
Leonardo de Moura 2014-12-10 11:23:23 -08:00
parent ac664505e6
commit d98aabe9ab
12 changed files with 16 additions and 15 deletions

View file

@ -23,8 +23,8 @@ Author: Leonardo de Moura
#include "library/print.h"
#include "library/class.h"
#include "library/flycheck.h"
#include "library/util.h"
#include "library/definitional/projection.h"
#include "library/definitional/util.h"
#include "frontends/lean/util.h"
#include "frontends/lean/parser.h"
#include "frontends/lean/calc.h"

View file

@ -22,12 +22,12 @@ Author: Leonardo de Moura
#include "library/explicit.h"
#include "library/reducible.h"
#include "library/class.h"
#include "library/util.h"
#include "library/definitional/rec_on.h"
#include "library/definitional/induction_on.h"
#include "library/definitional/cases_on.h"
#include "library/definitional/brec_on.h"
#include "library/definitional/no_confusion.h"
#include "library/definitional/util.h"
#include "frontends/lean/decl_cmds.h"
#include "frontends/lean/util.h"
#include "frontends/lean/parser.h"

View file

@ -27,10 +27,10 @@ Author: Leonardo de Moura
#include "library/explicit.h"
#include "library/protected.h"
#include "library/class.h"
#include "library/util.h"
#include "library/definitional/rec_on.h"
#include "library/definitional/induction_on.h"
#include "library/definitional/cases_on.h"
#include "library/definitional/util.h"
#include "library/definitional/projection.h"
#include "library/definitional/no_confusion.h"
#include "frontends/lean/parser.h"

View file

@ -7,7 +7,7 @@ add_library(library deep_copy.cpp expr_lt.cpp io_state.cpp occurs.cpp
standard_kernel.cpp sorry.cpp replace_visitor.cpp
unifier.cpp unifier_plugin.cpp inductive_unifier_plugin.cpp
explicit.cpp num.cpp string.cpp head_map.cpp match.cpp
definition_cache.cpp declaration_index.cpp class.cpp
definition_cache.cpp declaration_index.cpp class.cpp util.cpp
print.cpp annotation.cpp typed_expr.cpp let.cpp type_util.cpp
protected.cpp metavar_closure.cpp reducible.cpp init_module.cpp
fingerprint.cpp flycheck.cpp hott_kernel.cpp)

View file

@ -1,5 +1,5 @@
add_library(definitional rec_on.cpp induction_on.cpp cases_on.cpp
no_confusion.cpp util.cpp projection.cpp brec_on.cpp equations.cpp
no_confusion.cpp projection.cpp brec_on.cpp equations.cpp
init_module.cpp)
target_link_libraries(definitional ${LEAN_LIBS})

View file

@ -14,7 +14,7 @@ Author: Leonardo de Moura
#include "library/reducible.h"
#include "library/module.h"
#include "library/bin_app.h"
#include "library/definitional/util.h"
#include "library/util.h"
namespace lean {
static void throw_corrupted(name const & n) {

View file

@ -10,7 +10,7 @@ Author: Leonardo de Moura
#include "kernel/type_checker.h"
#include "library/module.h"
#include "library/protected.h"
#include "library/definitional/util.h"
#include "library/util.h"
namespace lean {
environment mk_induction_on(environment const & env, name const & n) {

View file

@ -4,17 +4,15 @@ Released under Apache 2.0 license as described in the file LICENSE.
Author: Leonardo de Moura
*/
#include "library/definitional/util.h"
#include "library/util.h"
#include "library/definitional/equations.h"
namespace lean{
void initialize_definitional_module() {
initialize_definitional_util();
initialize_equations();
}
void finalize_definitional_module() {
finalize_equations();
finalize_definitional_util();
}
}

View file

@ -12,7 +12,7 @@ Author: Leonardo de Moura
#include "kernel/type_checker.h"
#include "library/protected.h"
#include "library/module.h"
#include "library/definitional/util.h"
#include "library/util.h"
namespace lean {
static void throw_corrupted(name const & n) {

View file

@ -30,6 +30,7 @@ Author: Leonardo de Moura
#include "library/placeholder.h"
#include "library/print.h"
#include "library/fingerprint.h"
#include "library/util.h"
namespace lean {
void initialize_library_module() {
@ -59,9 +60,11 @@ void initialize_library_module() {
initialize_unifier_plugin();
initialize_sorry();
initialize_class();
initialize_library_util();
}
void finalize_library_module() {
finalize_library_util();
finalize_class();
finalize_sorry();
finalize_unifier_plugin();

View file

@ -155,7 +155,7 @@ static name * g_eq_name = nullptr;
static name * g_eq_refl_name = nullptr;
static name * g_eq_rec_name = nullptr;
void initialize_definitional_util() {
void initialize_library_util() {
g_true = new expr(mk_constant("true"));
g_true_intro = new expr(mk_constant(name({"true", "intro"})));
g_and = new expr(mk_constant("and"));
@ -175,7 +175,7 @@ void initialize_definitional_util() {
g_eq_rec_name = new name{"eq", "rec"};
}
void finalize_definitional_util() {
void finalize_library_util() {
delete g_true;
delete g_true_intro;
delete g_and;

View file

@ -86,6 +86,6 @@ void mk_telescopic_eq(type_checker & tc, buffer<expr> const & t, buffer<expr> &
level mk_max(levels const & ls);
void initialize_definitional_util();
void finalize_definitional_util();
void initialize_library_util();
void finalize_library_util();
}