From: Vladimir Zolotykh
Subject: tracing local functions
Date: 
Message-ID: <3C0A3E34.39D8D955@eurocom.od.ua>
Is some way of tracing (something like (trace foo) for global foo)
local functions (those introduced with flet, labels)
exists ?
For ACL for example ?
-- 
Vladimir Zolotykh                         ······@eurocom.od.ua

From: Pierre R. Mai
Subject: Re: tracing local functions
Date: 
Message-ID: <87u1v9zj2i.fsf@orion.bln.pmsf.de>
Vladimir Zolotykh <······@eurocom.od.ua> writes:

> Is some way of tracing (something like (trace foo) for global foo)
> local functions (those introduced with flet, labels)
> exists ?
> For ACL for example ?

ACL has an extended notion of function names, such that in the
following:

(defun fac (n)
  (labels ((iter-fac (n i prod) 
             (if (> i n) prod (iter-fac n (1+ i) (* i prod)))))
    (iter-fac n 1 1)))

(labels fac iter-fac) is the name of the inner iter-fac function.

cl:trace in ACL takes a list of either function names, or 
(function-name options...) lists, so in order to trace iter-fac,
you'll need to write

(trace ((labels fac iter-fac)))

Regs, Pierre.

-- 
Pierre R. Mai <····@acm.org>                    http://www.pmsf.de/pmai/
 The most likely way for the world to be destroyed, most experts agree,
 is by accident. That's where we come in; we're computer professionals.
 We cause accidents.                           -- Nathaniel Borenstein
From: Vladimir Zolotykh
Subject: Re: tracing local functions
Date: 
Message-ID: <3C0A6FCF.C8DB4052@eurocom.od.ua>
"Pierre R. Mai" wrote:
> 
> (trace ((labels fac iter-fac)))
Thank you Pierre! Very convenient feature.

-- 
Vladimir Zolotykh                         ······@eurocom.od.ua