Hello,

I am trying to figure out how to define a procedure based on a list of
fields of some record.  I know I can get list of fields for some record
using `record-type-fields', but I do not know how to do that in a
syntax-case, since I just see identifier <foo>, but do not know how to
get the binding.

I realize this is not possible in general, but for some subset it may be
possible?  Only case I am really interested is the following:

--8<---------------cut here---------------start------------->8---
(define-record-type <foo> ...)
(define-kw-constructor <foo> make-foo/kw)
--8<---------------cut here---------------end--------------->8---

So, my question is whether writing `define-kw-constructor' is possible.
Would anyone know?  Or, is there some prior art available I could learn
from?

Only workable approach I can think of is just generating the source code
as a separate step during compilation inside a Makefile.  That is not
great for obvious reasons.

Have a nice day,
Tomas

-- 
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.

Reply via email to