mirror of
https://github.com/CatalaLang/catala.git
synced 2024-09-19 16:28:12 +03:00
Typer: on error, print the expression being typed in debug mode
useful when typing fails on internally generated expressions
This commit is contained in:
parent
63f0cad312
commit
4fa9326618
@ -222,8 +222,10 @@ let handle_type_error ctx (A.AnyExpr e) t1 t2 =
|
||||
[
|
||||
( Some
|
||||
(fun ppf ->
|
||||
Format.pp_print_string ppf
|
||||
"Error coming from typechecking the following expression:"),
|
||||
Format.fprintf ppf
|
||||
"@[<hv 2>Error coming from typechecking the following expression:";
|
||||
if Cli.globals.debug then Format.fprintf ppf "@ %a@]" Expr.format e
|
||||
else Format.pp_close_box ppf ()),
|
||||
Expr.pos e );
|
||||
( Some
|
||||
(fun ppf ->
|
||||
|
Loading…
Reference in New Issue
Block a user