Next: , Previous: Evaluator options, Up: Options and Config


33.5 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.

There are three variables that customize evaluator trap handling, enter-frame-handler, apply-frame-handler, and exit-frame-handler. Normally they are set to the procedure default-lazy-handler.

— Scheme Procedure Type: enter-frame-handler key cont tailp

[docs somewhat missing: enter-frame-handler]

— Scheme Procedure Type: apply-frame-handler key cont tailp

Called when a procedure is being applied.

Called if:

If cheap traps are enabled [debug-options interface], cont is a debug object, otherwise it is a restartable continuation.

tailp is true if this is a tail call

— Scheme Procedure Type: exit-frame-handler key cont retval

Called when a value is returned from a procedure.

Called if:

If cheap traps are enabled [debug-options interface], cont is a debug object, otherwise it is a restartable continuation.

retval is the return value.

— Scheme Procedure: default-lazy-handler key cont tailp

Save the stack, then throw again.