GNU bug report logs - #52112
Compilation of macro returning record type fails

Previous Next

Package: guile;

Reported by: Jean Abou Samra <jean <at> abou-samra.fr>

Date: Thu, 25 Nov 2021 17:52:01 UTC

Severity: normal

Full log


View this message in rfc822 format

From: Jean Abou Samra <jean <at> abou-samra.fr>
To: Taylan Kammer <taylan.kammer <at> gmail.com>, 52112 <at> debbugs.gnu.org
Subject: bug#52112: Compilation of macro returning record type fails
Date: Fri, 26 Nov 2021 20:02:39 +0100
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.




This bug report was last modified 3 years and 200 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.