mirror of
https://github.com/CatalaLang/catala.git
synced 2024-11-08 07:51:43 +03:00
Comment
This commit is contained in:
parent
7bad9aa20e
commit
ea838ed6af
@ -752,6 +752,11 @@ and partially_evaluate_expr_for_assertion_failure_message :
|
|||||||
type d e.
|
type d e.
|
||||||
decl_ctx -> ((d, e, yes) astk, 't) gexpr -> ((d, e, yes) astk, 't) gexpr =
|
decl_ctx -> ((d, e, yes) astk, 't) gexpr -> ((d, e, yes) astk, 't) gexpr =
|
||||||
fun ctx e ->
|
fun ctx e ->
|
||||||
|
(* Here we want to print an expression that explains why an assertion has
|
||||||
|
failed. Since assertions have type [bool] and are usually constructed with
|
||||||
|
comparisons and logical operators, we leave those unevaluated at the top of
|
||||||
|
the AST while evaluating everything below. This makes for a good error
|
||||||
|
message. *)
|
||||||
match Mark.remove e with
|
match Mark.remove e with
|
||||||
| EApp { f = EOp ({ op = op_kind; _ } as op), m; args = [e1; e2] }
|
| EApp { f = EOp ({ op = op_kind; _ } as op), m; args = [e1; e2] }
|
||||||
when match op_kind with
|
when match op_kind with
|
||||||
|
Loading…
Reference in New Issue
Block a user