lean2/src/frontends/lean
Leonardo de Moura f97c260b0b refactor(kernel/environment): add ro_environment
The environment object is a "smart-pointer".
Before this commit, the use of "const &" for environment objects was broken.
For example, suppose we have a function f that should not modify the input environment.
Before this commit, its signature would be
       void f(environment const & env)
This is broken, f's implementation can easilty convert it to a read-write pointer by using
the copy constructor.
       environment rw_env(env);
Now, f can use rw_env to update env.

To fix this issue, we now have ro_environment. It is a shared *const* pointer.
We can convert an environment into a ro_environment, but not the other way around.

ro_environment can also be seen as a form of documentation.
For example, now it is clear that type_inferer is not updating the environment, since its constructor takes a ro_environment.

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-12 16:48:34 -08:00
..
CMakeLists.txt refactor(frontends/lua): rename leanlua_state to script_state, and move it to util 2013-11-27 14:57:36 -08:00
coercion.h Rename lean frontend files. The prefix lean_ is not necessary anymore. 2013-09-12 20:09:35 -07:00
frontend.cpp refactor(kernel/environment): add ro_environment 2013-12-12 16:48:34 -08:00
frontend.h refactor(kernel/environment): add ro_environment 2013-12-12 16:48:34 -08:00
frontend_elaborator.cpp feat(frontends/lean): implement relaxed operator compatibility in the parser 2013-12-10 15:42:43 -08:00
frontend_elaborator.h feat(frontends/lean/parser): add basic tactic support in the frontend 2013-11-28 21:08:12 -08:00
notation.cpp refactor(kernel/environment): add ro_environment 2013-12-12 16:48:34 -08:00
notation.h fix(frontends/lean/notation): change the precedence of '->' 2013-12-06 13:23:24 -08:00
operator_info.cpp refactor(library/io_state): simplify regular/diagnostic 2013-12-10 13:09:35 -08:00
operator_info.h refactor(library/io_state): simplify regular/diagnostic 2013-12-10 13:09:35 -08:00
parser.cpp refactor(kernel/environment): add ro_environment 2013-12-12 16:48:34 -08:00
parser.h refactor(frontends/lua): rename leanlua_state to script_state, and move it to util 2013-11-27 14:57:36 -08:00
pp.cpp refactor(kernel/environment): add ro_environment 2013-12-12 16:48:34 -08:00
pp.h refactor(kernel/environment): add ro_environment 2013-12-12 16:48:34 -08:00
register_module.cpp refactor(kernel/environment): add ro_environment 2013-12-12 16:48:34 -08:00
register_module.h refactor(frontends/lua): rename leanlua_state to script_state, and move it to util 2013-11-27 14:57:36 -08:00
scanner.cpp feat(frontends/lean): allow 'tactic hints' to be associated with 'holes' 2013-12-06 14:49:39 -08:00
scanner.h feat(frontends/lean): allow 'tactic hints' to be associated with 'holes' 2013-12-06 14:49:39 -08:00