unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Damien Mattei <damien.mattei@gmail.com>
To: Jean Abou Samra <jean@abou-samra.fr>
Cc: guile-user <guile-user@gnu.org>
Subject: Re: with-syntax return error in Guile, not in Kawa or Racket
Date: Mon, 6 May 2024 19:52:46 +0200	[thread overview]
Message-ID: <CADEOadf=-L8QmaM5tzhHJGspdYDKDbh9=RKzkdtwMbuQ2L-vNw@mail.gmail.com> (raw)
In-Reply-To: <cc9e66f761dd336585257572254fb69ba607ed01.camel@abou-samra.fr>

On Mon, May 6, 2024 at 11:41 AM Jean Abou Samra <jean@abou-samra.fr> wrote:

> > (with-syntax ((parsed-evaluated-args
> >                (datum->syntax #f (cons 'list
> (optimizer-parse-square-brackets-arguments-lister
> >                                               (syntax->datum
> #'args-brackets))))))
>
> That should work, but it's also non-hygienic. For example, it will
> be affected if the user does
>
> (let ((list ...))
>   (call-your-macro ...))
>
> and since you use #f in the datum->syntax call, it will also strip away
> all hygiene annotations from the args-brackets, causing problems inside
> that as well.
>

i changed #f to stx in the macro

>
> I'd advise you refactor your
> optimizer-parse-square-brackets-arguments-lister
> function so that it takes #'args-brackets instead of (syntax->datum
> #'args-brackets)
> and works with it in a hygienic way.
>


  parent reply	other threads:[~2024-05-06 17:52 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-05 12:36 with-syntax return error in Guile, not in Kawa or Racket Damien Mattei
2024-05-05 12:48 ` Jean Abou Samra
2024-05-05 13:35   ` Damien Mattei
2024-05-06  7:27     ` Damien Mattei
2024-05-06  9:41       ` Jean Abou Samra
2024-05-06 10:29         ` Damien Mattei
2024-05-06 12:03           ` Damien Mattei
2024-05-06 17:52         ` Damien Mattei [this message]
2024-05-06 18:58           ` Maxime Devos
2024-05-06 21:34             ` Damien Mattei
2024-05-09  9:21               ` Maxime Devos
2024-05-09 21:56                 ` Damien Mattei
2024-05-09 22:35                   ` Jean Abou Samra
2024-05-10  9:40                     ` Damien Mattei
2024-05-10 10:33                       ` Jean Abou Samra
2024-05-10 13:52                         ` Damien Mattei
2024-05-10 15:24                           ` Jean Abou Samra
2024-05-10 20:21                             ` Damien Mattei
2024-05-11 10:53                               ` Damien Mattei
2024-05-11 19:14                                 ` Jean Abou Samra
2024-05-12 12:37                                   ` Damien Mattei
2024-05-10 21:57                             ` Damien Mattei
2024-05-10 22:23                               ` Jean Abou Samra
2024-05-10 23:04                                 ` Damien Mattei
2024-05-15 17:44                     ` Macros that don't work Keith Wright

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='CADEOadf=-L8QmaM5tzhHJGspdYDKDbh9=RKzkdtwMbuQ2L-vNw@mail.gmail.com' \
    --to=damien.mattei@gmail.com \
    --cc=guile-user@gnu.org \
    --cc=jean@abou-samra.fr \
    /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).