Re: ice-9/syncase.scm enhancement request

2002-01-14 Thread Dorai Sitaram

Marius Vollmer wrote:
> Dorai Sitaram <[EMAIL PROTECTED]> writes:
> 
> > ice-9/syncase.scm provides a procedure datum->syntax-object that
> > insists that its first argument be a syntax-object that is an
> > identifier.
> > 
> > This is an unnecessary restriction, and removing this check makes
> > writing low-level macros easier, because you can give a
> > syntax-object directly as datum->syntax-object's first argument,
> > instead of destructuring it to get an appropriate identifier.
> 
> I'll just trust you on this.  Could you provide a ChangeLog entry that
> describes the change?

Hi Marius.  Here's my stab at it:

ice-9/psyntax.ss: Removed assertion in
datum->syntax-object that checked if the first
argument, a syntax-object, is an identifier.
Henceforth, any syntax-object may be used as
datum->syntax-object's first argument. 

You may remove the second sentence if it's too verbose.

Note that you have to regenerate psyntax.pp from the
thus-changed psyntax.ss.  I presume you have a
standard way of doing it.  Here's one method that
will work.

First, go to the ice-9 directory.  Make the
proposed change to psyntax.ss (i.e., comment out the
(arg-check ...) expression in 

(set! datum->syntax-object ...)

Then, staying in the ice-9 directory, do the following
after opening a Guile session:

(use-modules (ice-9 syncase))
(define-module (ice-9 syncase))
(psyncomp)
;takes a while
(exit)

At the end of this, you should have the new psyntax.pp.

--d

___
Bug-guile mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-guile



Re: ice-9/syncase.scm enhancement request

2002-01-14 Thread Marius Vollmer

Dorai Sitaram <[EMAIL PROTECTED]> writes:

> > I'll just trust you on this.  Could you provide a ChangeLog entry that
> > describes the change?
> 
> Hi Marius.  Here's my stab at it:
> 
> ice-9/psyntax.ss: Removed assertion in
> datum->syntax-object that checked if the first
> argument, a syntax-object, is an identifier.
> Henceforth, any syntax-object may be used as
> datum->syntax-object's first argument. 

Ok, thanks.  I used this:

* psyntax.ss (datum->syntax-object): Removed assertion in
datum->syntax-object that checked if the first argument, a
syntax-object, is an identifier.  This was a unconvenient and
unnecessary restriction.  Thanks to Dorai Sitaram!

> Note that you have to regenerate psyntax.pp from the
> thus-changed psyntax.ss.  I presume you have a
> standard way of doing it.  Here's one method that
> will work.

You can also just type "make" in the ice-9 directory (or in your build
directory).

___
Bug-guile mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-guile



Re: ice-9/syncase.scm enhancement request

2002-01-12 Thread Marius Vollmer

Dorai Sitaram <[EMAIL PROTECTED]> writes:

> ice-9/syncase.scm provides a procedure datum->syntax-object that
> insists that its first argument be a syntax-object that is an
> identifier.
> 
> This is an unnecessary restriction, and removing this check makes
> writing low-level macros easier, because you can give a
> syntax-object directly as datum->syntax-object's first argument,
> instead of destructuring it to get an appropriate identifier.

I'll just trust you on this.  Could you provide a ChangeLog entry that
describes the change?

___
Bug-guile mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-guile