Re: syntax? in scheme/Guile

"Thompson, David" <[email protected]>
Newsgroups gmane.lisp.guile.user
Message-ID <CAJ=Rwfb=Kx93Ag0y5b6G=5pdynKBbJqXPswVcaL2Pz7t9JFBUg@mail.gmail.com>
Hi Damien,

On Mon, May 13, 2024 at 4:43 AM Damien Mattei <[email protected]> wrote:
>
> any idea for a predicate for syntax object in Guile/scheme like exist in
> Racket 'syntax?' ?

This predicate is in the (system syntax) module in Guile.

> - what is a wrapped syntax object?

Syntax objects are part of the syntax-case procedural macro system. A
syntax object wraps a value with things like lexical context and
source location (when available).

For example:

scheme@(guile-user)> (call-with-input-string "(1 2 3)" read-syntax)
$16 = #<syntax:unknown file:1:0 (#<syntax:unknown file:1:1 1>
#<syntax:unknown file:1:3 2> #<syntax:unknown file:1:5 3>)>

See 6.8.3 Support for the ‘syntax-case’ System in the manual.

Hope this helps,

- Dave
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.