unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Jean Abou Samra <jean@abou-samra.fr>
To: Taylan Kammer <taylan.kammer@gmail.com>, 52112@debbugs.gnu.org
Subject: bug#52112: Compilation of macro returning record type fails
Date: Fri, 26 Nov 2021 20:02:39 +0100	[thread overview]
Message-ID: <41883031-68aa-de96-0cd0-504578fbdabe@abou-samra.fr> (raw)
In-Reply-To: <5a97c5fd-ee56-e636-ae18-679570e2502b@gmail.com>

Thanks for your reply.

Le 26/11/2021 à 19:54, Taylan Kammer a écrit :
> I don't think that's supposed to work.  I find it surprising that
> record-type objects are self-evaluating, and in any case they can't
> be turned into bytecode.
>
> Your macro could return code that evaluates to a record definition.
> Would that solve your use-case?


Yes, that is how I solved it in LilyPond
(https://gitlab.com/lilypond/lilypond/-/merge_requests/1026).

I was also somewhat surprised to see that
record types are self-evaluating. I don't
know where to check in R6RS what the expected
behavior would be. At any rate, it seems that
there is an inconsistency between the interpreter
and the compiler that would warrant resolving
either way.





      reply	other threads:[~2021-11-26 19:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-25 17:45 bug#52112: Compilation of macro returning record type fails Jean Abou Samra
2021-11-26 18:54 ` Taylan Kammer
2021-11-26 19:02   ` Jean Abou Samra [this message]

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=41883031-68aa-de96-0cd0-504578fbdabe@abou-samra.fr \
    --to=jean@abou-samra.fr \
    --cc=52112@debbugs.gnu.org \
    --cc=taylan.kammer@gmail.com \
    /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).