From: "Thompson, David" <dthompson2@worcester.edu>
To: Damien Mattei <damien.mattei@gmail.com>
Cc: guile-user <guile-user@gnu.org>
Subject: Re: syntax? in scheme/Guile
Date: Mon, 13 May 2024 19:42:54 -0400 [thread overview]
Message-ID: <CAJ=Rwfb=Kx93Ag0y5b6G=5pdynKBbJqXPswVcaL2Pz7t9JFBUg@mail.gmail.com> (raw)
In-Reply-To: <CADEOaddFAG11ZSAxUM2MEiWdcboz_5SGONE5H+BLrPrDRhAPaw@mail.gmail.com>
Hi Damien,
On Mon, May 13, 2024 at 4:43 AM Damien Mattei <damien.mattei@gmail.com> 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
next prev parent reply other threads:[~2024-05-13 23:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-13 8:42 syntax? in scheme/Guile Damien Mattei
2024-05-13 21:02 ` Damien Mattei
2024-05-13 23:42 ` Thompson, David [this message]
2024-05-14 7:39 ` Damien Mattei
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAJ=Rwfb=Kx93Ag0y5b6G=5pdynKBbJqXPswVcaL2Pz7t9JFBUg@mail.gmail.com' \
--to=dthompson2@worcester.edu \
--cc=damien.mattei@gmail.com \
--cc=guile-user@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).