Estimated hours taken: 2
Branches: main
Fix a problem reported by Ian: the debugger ignored information about the head
variables of the predicates generated by the compiler from lambda expressions
because they didn't have names.
compiler/hlds_pred.m:
Add a predicate to ensure that all headvars have names.
compiler/lambda.m:
Call that predicate to give names to the predicates created from lambda
expressions.
compiler/code_gen.m:
Call that predicate to give names to the predicates created from lambda
expressions, in case other transformations also create predicates
with unnamed head variables.
doc/user_guide.texi:
Add a new mdb command, var_details, and a new method of invocation of
an existing mdb command, flag. I used them to track down this bug.
trace/mercury_trace_internal.c:
Implement the var_details mdb command, and the new method of invocation
of the flag command.
trace/mercury_trace_vars.[ch]:
Add a function to print variable details.
tests/debugger/mdb_command_test.inp:
Test the documentation of the new command.
tests/debugger/completion.exp:
Expect the new command.
tests/debugger/lambda_expr.{m,inp,exp}:
Add the new test case to test for the bug.
tests/debugger/Mmakefile:
Enable the new test case.