Skip to content
Commit 5496ae2c authored by Pierre Delaunay's avatar Pierre Delaunay
Browse files

* new file: samples/error.typer

	- Erroneous typer code to test out error messages

* src/lparse.ml
* src/eval.ml:
	- tinking with error messages: replaced
		lexp_error/debruijn_error/eval_fatal/...
	by simple error/fatal/warning/...
	- added typer call trace
	- removed `reset_eval_trace`

* added new functions
	- value_fatal/elexp_fatal/pexp_fatal/pexp_warning/etc..
	Those print an error message then print the expression
	causing the error. Example:

% [Ln  45, cl  12] ./samples/error.typer
%   [!] Error     LPARSE   Lambda require type annotation
%        > Plambda: (lambda_->_ n n)
%        > Root: (lambda_->_ n n)

* src/util.ml
	- removed unused print_trace (old code)

* src/opslexp.ml
	- Added `pol_string` and `pol_name`

* src/debruijn.ml
* src/env.ml
	- `print_rte_ctx` and `print_lexp_ctx` skip builtins (shorter dump)
	 `dump_rte_ctx` and `dump_lexp_ctx`can be used to print the whole context

* src/REPL.ml
	- added %typertrace option
	- `%who` and `%info` use print_..._ctx
	- `%who all` and `%info all` use dump_..._ctx
parent 8c6311a9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment