Re: Creating a list of procedures in a file.

2009-11-20 Thread Richard Shann
Works like a dream - thank you! Richard On Thu, 2009-11-19 at 22:41 +, Neil Jerram wrote: > Richard Shann writes: > > > Thanks for this: the only problem might be that it is the top-level > > definitions in Denemo's initialization script that I want to list. I > > haven't created a module f

Fwd: Creating a list of procedures in a file.

2009-11-19 Thread Daniel Ridge
On Nov 19, 2009, at 5:41 PM, Neil Jerram wrote: Alternatively, assuming that it is safe to do so - i.e. that there are no possible side-effects from reading - you could just read and process the script. Something like: (with-input-from-file FILENAME (lambda () (let loop ((x (read)) (defs

Re: Creating a list of procedures in a file.

2009-11-19 Thread Neil Jerram
Richard Shann writes: > Thanks for this: the only problem might be that it is the top-level > definitions in Denemo's initialization script that I want to list. I > haven't created a module for it (I wouldn't know how! But as it is very > much an end user, I suppose there is no need). > I tried '

Re: Creating a list of procedures in a file.

2009-11-19 Thread Richard Shann
dule) where you have '(the denemo module) with a (no code for module (current-module) error message. Any further thoughts? Thanks again, Richard > From: l...@gnu.org (Ludovic Court?s ) > Subject: Re: Creating a list of procedures in a file. > To: guile-user@gnu.org > Message-I

Re: Creating a list of procedures in a file.

2009-11-18 Thread Ludovic Courtès
Hi, Richard Shann writes: > I wonder if anyone knows of a method to extract a list of top-level > procedure definitions from a string? You can use ‘module-for-each’: (module-for-each (lambda (name var) (format #t "variable `~A', value `~s'~%" name

Creating a list of procedures in a file.

2009-11-18 Thread Richard Shann
I wonder if anyone knows of a method to extract a list of top-level procedure definitions from a string? I ask because we are creating procedures for use in scripts written by users of the GNU Denemo music program and would like to be able to list them automatically for documentation purposes. Rich