| Call (f, args)
(* FIXME: Add the trace only once we enter the function? *)
-> let ntrace = append_typer_trace trace lxp in
eval_call (elexp_location f) ntrace
(_eval f ctx ntrace)
(List.map (fun e -> _eval e ctx ntrace) args)
| Call (f, args) ->
(* we need to keep the trace from f and args evaluation
* else the trace will be truncated.
* we use _global_eval_trace to keep in memory previous steps *)
let ef = _eval f ctx trace in
let eargs = (List.map (fun e -> _eval e ctx (get_trace ())) args) in
eval_call (elexp_location f) f (get_trace ())
Hmm... I don't understand the idea behind this change: the call is not performed "within" the evaluation of f and of the args.
IOW the change makes the trace a half-way between a stack-trace (which is more or less what we had before) and an evaluation-log (i.e. where we push and never pop).
Stefan