This PR splits the environment used by the kernel from that used by the elaborator, providing the foundation for tracking of asynchronously elaborated declarations, which will exist as a concept only in the latter. Minor changes: * kernel diagnostics are moved from an environment extension to a direct environment as they are the only extension used directly by the kernel * `initQuot` is moved from an environment header field to a direct environment as it is the only header field used by the kernel; this also makes the remaining header immutable after import
16 lines
523 B
C++
16 lines
523 B
C++
/*
|
|
Copyright (c) 2019 Microsoft Corporation. All rights reserved.
|
|
Released under Apache 2.0 license as described in the file LICENSE.
|
|
|
|
Author: Leonardo de Moura
|
|
*/
|
|
#include "library/constants.h"
|
|
#include "library/util.h"
|
|
#include "library/elab_environment.h"
|
|
|
|
namespace lean {
|
|
extern "C" object* lean_get_export_name_for(object* env, object *n);
|
|
optional<name> get_export_name_for(elab_environment const & env, name const & n) {
|
|
return to_optional<name>(lean_get_export_name_for(env.to_obj_arg(), n.to_obj_arg()));
|
|
}
|
|
}
|