[Openmcl-devel] Tracing local functions

Daniel Gackle danielgackle at gmail.com
Tue Jan 6 07:48:22 UTC 2009


Hi,

My partner and I recently switched our project to CCL (from SBCL and
before that ACL Express) and so far I am enjoying it a lot. I have a
question about trace. In Allegro if I compile a function that includes
a local function, like this:

(defun outer ()
  (flet ((inner (x)
       (* x 2)))
    (inner 2)))

...I can trace the local function:

> (trace (flet outer inner))
((FLET OUTER INNER))

> (outer)
 0[7]: ((FLET OUTER INNER) 2)
 0[7]: returned 4
4

Is there a way to do this in CCL? Or something equivalent? I have some
complex functions containing many flet/labels forms. I like them
because they're nicely encapsulated. However, they're hard to debug
without something like the above. I wrote them in Allegro and made
heavy use of the feature at the time.

Thank you,
Daniel



More information about the Openmcl-devel mailing list