Re: Getting all symbols in a Scheme file as a list

2024-02-05 Thread Christina O'Donnell
Hi, There is no such thing as symbol definitions in Scheme – you can make symbols with symbol->string, but you can’t define a symbol to anything, symbols simply are. You can, however, define variables, which have a symbol as name (and that name may depend on context in case of hygienic macro

Re: Getting all symbols in a Scheme file as a list

2024-02-04 Thread Matt Wette
On 2/4/24 11:50 AM, Christina O'Donnell wrote: I'm trying to write a Guile script to trace symbol definition and reference between modules in a large Guile repo (GNU/Guix), for the purposes of large scale refactoring. ? Seems a little bit baroque to me, I'd expect a simpler way of doing it.

RE: Getting all symbols in a Scheme file as a list

2024-02-04 Thread M
>Onderwerp: Getting all symbols in a Scheme file as a list The following will give you a list of all the symbols (unless I made some syntax errors) (also replace ‘ by a proper quote, e-mail program is corrupting it): (use-modules (ice-9 match)) (define (all-symbols s-exp) (match s-

Getting all symbols in a Scheme file as a list

2024-02-04 Thread Christina O'Donnell
Hi, I'm trying to write a Guile script to trace symbol definition and reference between modules in a large Guile repo (GNU/Guix), for the purposes of large scale refactoring. I'm wondering how I could programmatically get all the values in a Scheme file as an S-expression. From the manual, I k