bug-guile
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: r6rs define-record-type is unhygienic


From: Andy Wingo
Subject: Re: r6rs define-record-type is unhygienic
Date: Fri, 17 Jun 2011 10:34:35 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux)

Hi Ian,

Great debugging, and great patch.

On Sat 11 Jun 2011 15:36, Ian Price <address@hidden> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]