Next: , Previous: Evaluator options, Up: Runtime Options


5.18.3.6 Evaluator trap options

[FIXME: These flags, together with their corresponding handlers, are not user level options. Probably this entire section should be moved to the documentation about the low-level programmer debugging interface.]

Here is the list of evaluator trap options generated by typing (traps 'full) in Guile. You can also see the default values.

     exit-frame      no      Trap when exiting eval or apply.
     apply-frame     no      Trap when entering apply.
     enter-frame     no      Trap when eval enters new frame.
     traps		yes	Enable evaluator traps.
— apply-frame-handler: key cont tailp

Called when a procedure is being applied.

Called if:

cont is a “debug object”, which means that it can be passed to make-stack to discover the stack at the point of the trap. The apply frame handler's code can capture a restartable continuation if it wants to by using call-with-current-continuation in the usual way.

tailp is true if this is a tail call

— exit-frame-handler: key cont retval

Called when a value is returned from a procedure.

Called if:

cont is a “debug object”, which means that it can be passed to make-stack to discover the stack at the point of the trap. The exit frame handler's code can capture a restartable continuation if it wants to by using call-with-current-continuation in the usual way.

retval is the return value.