Files
mercury/tests/invalid/require_det_in_lambda.err_exp
Zoltan Somogyi e64c41d735 Generate better error messages for bad switch arm determinisms.
compiler/det_report.m:
    When a switch is wrapped in a require_switch_arms_<detism> scope
    but a switch arm violates the requirement, we generate an error message.
    Modify that message to identify both the switched-on variable and
    the functor(s) of the arm with the determinism error.

compiler/det_util.m:
    To make it possible to print the name of the switched-on variable,
    record the varset of the procedure being analyzed.

compiler/det_analysis.m:
compiler/pd_util.m:
compiler/simplify_proc.m:
    Supply the varset.

tests/invalid/require_det_in_lambda.err_exp:
tests/invalid/require_scopes.err_exp:
    Expect the improved error messages.
2015-11-18 00:40:05 +11:00

5 lines
265 B
Plaintext

require_det_in_lambda.m:017: Error: the required determinism of the goal in
require_det_in_lambda.m:017: this scope is `det', but its actual determinism
require_det_in_lambda.m:017: is `semidet'.
require_det_in_lambda.m:018: Call to `int.<'(in, in) can fail.