bug-guile
[Top][All Lists]
Advanced

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

ice-9/syncase.scm enhancement request


From: Dorai Sitaram
Subject: ice-9/syncase.scm enhancement request
Date: Wed, 9 Jan 2002 16:50:09 -0500 (EST)

This is not quite a bug report but an enhancement
suggestion.

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.  The
latter is a tedious process that doesn't buy anything,
since the containing syntax-object and the contained
identifier have the same syntax properties as far as
datum->syntax-object is concerned.

To effect this change, you need to modify
ice-9/psyntax.ss as follows:

(set! datum->syntax-object
  (lambda (id datum)
    (arg-check nonsymbol-id? id 'datum->syntax-object)
    (make-syntax-object datum (syntax-object-wrap id))))

becomes

(set! datum->syntax-object
  (lambda (id datum)
    (make-syntax-object datum (syntax-object-wrap id))))

Then regenerate psyntax.pp.

Sincerely,

--Dorai Sitaram



reply via email to

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