chore(util): move format to src/util
This commit is contained in:
parent
12809945ba
commit
d664486eca
12 changed files with 13 additions and 15 deletions
|
|
@ -501,7 +501,8 @@ function(add_exec_test name tgt)
|
|||
endif()
|
||||
endfunction()
|
||||
|
||||
add_subdirectory(tests/util)
|
||||
# C++ unit tests are disabled for now since they rely on `format` which relies on `Lean` generated code.
|
||||
# add_subdirectory(tests/util)
|
||||
|
||||
# Include style check
|
||||
if (NOT(${CMAKE_SYSTEM_NAME} MATCHES "Windows") AND PYTHONINTERP_FOUND)
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ Author: Leonardo de Moura
|
|||
#include "util/name_map.h"
|
||||
#include "util/name_set.h"
|
||||
#include "util/options.h"
|
||||
#include "util/sexpr/format.h"
|
||||
#include "util/format.h"
|
||||
#include "kernel/environment.h"
|
||||
#include "library/abstract_type_context.h"
|
||||
#include "frontends/lean/token_table.h"
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ Author: Leonardo de Moura
|
|||
#include "util/buffer.h"
|
||||
#include "util/kvmap.h"
|
||||
#include "util/list_fn.h"
|
||||
#include "util/sexpr/format.h"
|
||||
#include "util/format.h"
|
||||
#include "kernel/level.h"
|
||||
#include "kernel/expr_eq_fn.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ Author: Leonardo de Moura
|
|||
#include "util/name.h"
|
||||
#include "util/list_ref.h"
|
||||
#include "util/options.h"
|
||||
#include "util/sexpr/format.h"
|
||||
#include "util/format.h"
|
||||
|
||||
namespace lean {
|
||||
class environment;
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ Author: Leonardo de Moura
|
|||
#include <memory>
|
||||
#include <utility>
|
||||
#include "util/options.h"
|
||||
#include "util/sexpr/format.h"
|
||||
#include "util/format.h"
|
||||
|
||||
namespace lean {
|
||||
class expr;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ Author: Leonardo de Moura
|
|||
*/
|
||||
#pragma once
|
||||
#include <utility>
|
||||
#include "util/sexpr/format.h"
|
||||
#include "util/format.h"
|
||||
#include "kernel/expr.h"
|
||||
#include "util/message_definitions.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -3,4 +3,4 @@ add_library(util OBJECT object_ref.cpp name.cpp name_set.cpp fresh_name.cpp
|
|||
path.cpp lean_path.cpp lbool.cpp bitap_fuzzy_search.cpp
|
||||
init_module.cpp list_fn.cpp file_lock.cpp timeit.cpp timer.cpp
|
||||
parser_exception.cpp name_generator.cpp kvmap.cpp map_foreach.cpp
|
||||
options.cpp option_declarations.cpp)
|
||||
options.cpp format.cpp option_declarations.cpp)
|
||||
|
|
|
|||
|
|
@ -13,12 +13,9 @@
|
|||
#include "runtime/interrupt.h"
|
||||
#include "runtime/sstream.h"
|
||||
#include "runtime/hash.h"
|
||||
#include "util/escaped.h"
|
||||
#include "util/sexpr/sexpr.h"
|
||||
#include "util/sexpr/format.h"
|
||||
#include "util/sexpr/sexpr_fn.h"
|
||||
#include "util/options.h"
|
||||
#include "util/option_declarations.h"
|
||||
#include "util/format.h"
|
||||
|
||||
#ifndef LEAN_DEFAULT_PP_INDENTATION
|
||||
#define LEAN_DEFAULT_PP_INDENTATION 2
|
||||
|
|
@ -11,6 +11,7 @@ Author: Leonardo de Moura
|
|||
#include "util/name_generator.h"
|
||||
#include "util/options.h"
|
||||
#include "util/option_declarations.h"
|
||||
#include "util/format.h"
|
||||
|
||||
namespace lean {
|
||||
void initialize_util_module() {
|
||||
|
|
@ -21,8 +22,10 @@ void initialize_util_module() {
|
|||
initialize_fresh_name();
|
||||
initialize_option_declarations();
|
||||
initialize_options();
|
||||
initialize_format();
|
||||
}
|
||||
void finalize_util_module() {
|
||||
finalize_format();
|
||||
finalize_options();
|
||||
finalize_option_declarations();
|
||||
finalize_fresh_name();
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
add_library(sexpr OBJECT sexpr.cpp sexpr_fn.cpp format.cpp init_module.cpp)
|
||||
add_library(sexpr OBJECT sexpr.cpp sexpr_fn.cpp init_module.cpp)
|
||||
|
|
|
|||
|
|
@ -4,17 +4,14 @@ Released under Apache 2.0 license as described in the file LICENSE.
|
|||
|
||||
Author: Leonardo de Moura
|
||||
*/
|
||||
#include "util/sexpr/format.h"
|
||||
#include "util/sexpr/sexpr.h"
|
||||
|
||||
namespace lean {
|
||||
void initialize_sexpr_module() {
|
||||
initialize_sexpr();
|
||||
initialize_format();
|
||||
}
|
||||
|
||||
void finalize_sexpr_module() {
|
||||
finalize_format();
|
||||
finalize_sexpr();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue