Re: Birds of a feather, macros
Zelphir Kaltstahl <[email protected]> Fri, 10 Apr 2026 17:08:55 +0000
| Newsgroups | gmane.lisp.guile.user |
|---|---|
| Message-ID | <[email protected]> |
>> Geiser in Emacs can somehow already expand Guile macros. Maybe there are >> things there, that could be used, expanded (ha!), or built upon? > AFAIK, Geiser is just a REPL. If you are talking about `,expand', then > that's Guile meta-command for expanding a form. Otherwise, I don't know > what you are referring to. I should have been more specific. Yes, `,expand' is what I am talking about. Except for changing a macro to output quoted stuff and thinking real hard, Geiser's `,expand' is the only way I know of, to look at what a macro expands to. Though a step by step iterative expand could be even better. I believe Dr.Racket or Racket itself has that feature. >> What else comes to my mind is the question, how difficult it would be to make >> Guile syntax objects carry source location information like they do in >> Racket > They already do. See syntax-source and syntax-sourcev. Are you talking > about other thing? I was not aware of Guile having anything like that. What I mean is being able to access and use the file, line, and character numbers of a definition. Apparently, that is exactly what those functions do, according to https://www.gnu.org/software/guile/manual/html_node/Syntax-Transformer-Helpers.html#index-syntax_002dsourcev. Something like what is discussed in https://www.greghendershott.com/2014/01/using-syntax-loc.html. Best regards, Zelphir -- repositories: https://codeberg.org/ZelphirKaltstahl