unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Andy Wingo <wingo@pobox.com>
To: Ian Price <ianprice90@googlemail.com>
Cc: bug-guile@gnu.org
Subject: Re: r6rs define-record-type is unhygienic
Date: Fri, 17 Jun 2011 10:34:35 +0200	[thread overview]
Message-ID: <877h8kamas.fsf@pobox.com> (raw)
In-Reply-To: <m37h8ssd67.fsf@googlemail.com> (Ian Price's message of "Sat, 11 Jun 2011 14:36:16 +0100")

Hi Ian,

Great debugging, and great patch.

On Sat 11 Jun 2011 15:36, Ian Price <ianprice90@googlemail.com> writes:

> I have attached a patch for stable-2.0 to deal with these
> issues. Keywords are now matched as syntax-case literals, and
> sub-expressions are de-structured as necessary, rather than by using
> syntax->datum on all the clauses at the start. There are some issues I
> didn't touch, e.g. I think that the error messages should be improved,
> but I can do that too if you would like.

Please feel free to improve the error messages, or anything else
really.

Only a couple of nits with the patch:

> * module/rnrs/records/syntactic.scm(define-record-type0, process-fields):
                                     ^ a space goes here

> +         (list (wrap `(immutable ,(syntax->datum #'name))) (guess-accessor-name #'name) #f)]

Please avoid lines longer than 80 characters, if possible.

> +         (let loop ((_fields *unspecified*)
> +                    (_parent *unspecified*)

I realize this was in the original code, but better to use some other
value to indicate a non-initialized value.  In the future *unspecified*
will be the same as (values).

>    :use-module ((rnrs records inspection) :version (6))
> +  :use-module ((rnrs conditions) :version (6))
> +  :use-module ((rnrs exceptions) :version (6))
> +  :use-module ((system base compile) #:select (compile))
>    :use-module (test-suite lib))

Along the same lines, #:use-module and #:version are the preferred
spellings now.

> +(with-test-prefix "record hygiene"

Thanks for the test.

Want to fix the line wrapping and the commit message and resubmit?

Thanks!

Andy
-- 
http://wingolog.org/



  reply	other threads:[~2011-06-17  8:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-11 13:36 r6rs define-record-type is unhygienic Ian Price
2011-06-17  8:34 ` Andy Wingo [this message]
2011-06-17 22:36   ` Ian Price
2011-06-19 19:44     ` Andy Wingo

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=877h8kamas.fsf@pobox.com \
    --to=wingo@pobox.com \
    --cc=bug-guile@gnu.org \
    --cc=ianprice90@googlemail.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).