hyln9 / ikarus

Optimizing incremental native-code compiler for R6RS scheme. This is a forked repository.
https://launchpad.net/ikarus
Other
5 stars 0 forks source link

Request: trace-define for non-procedures #237

Closed hyln9 closed 10 years ago

hyln9 commented 10 years ago

Currently trace-define gives an error when defining a non-procedure:

(trace-define foo 1) Unhandled exception Condition components:

  1. &assertion
  2. &who: trace-define
  3. &message: "not a procedure"
  4. &irritants: (1)

This limits the utility of tricks like (import (rename (ikarus) (trace-define define))) or similar if there are non-procedure defines involved.

I see two possibilities (there may be others). The first is the simply have trace-define be silent on non-procedures. The second is to have trace-define trace the evaluation of the right hand side when the right hand side is a non-procedure. The later may be a mildly interesting tracing information for tracking down errors being thrown in a long chain of non-procedure defines.

Launchpad Details: #LP316626 Michael D. Adams - 2009-01-12 22:34:09 -0500

hyln9 commented 10 years ago

Removed the error check in revision 1756. Thanks.

Launchpad Details: #LPC Abdulaziz Ghuloum - 2009-04-06 10:24:04 -0400