[Top][All Lists]

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

Re: Feature request: Expose `ellipsis?' from

From: Mark H Weaver
Subject: Re: Feature request: Expose `ellipsis?' from
Date: Wed, 14 Nov 2018 14:10:21 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Hi Marc,

Marc Nieper-Wißkirchen <address@hidden> writes:

> Guile includes a mechanism to specify a custom ellipsis for
> `syntax-case' macros. For macro writers it would be nice if there were
> a way to check whether a given identifier is the current (custom)
> ellipsis.
> The `ellipsis?' procedure in does exactly this, but it
> isn't available to user code. Re-implementing it is not possible
> without accessing internal details like the special identifier #{
> $sc-ellipsis }# and without resorting to hacks.

Surprisingly, it actually _is_ possible to do it portably in any
R[567]RS Scheme.  See 'match-check-ellipsis' near the end of

> Thus, I would like to ask to add `ellipsis?' to the list of procedures
> exported by Guile (like `identifier?` or `bound-identifier=?` already
> are).

I'll need to think about how this could be exposed in the API.  It's not
as simple as exporting that procedure.  The 'ellipsis?' procedure is not
able to answer the question by looking only at the syntax object; it
also needs the macro-expansion environment 'r', which you do not have.
'identifier?' and 'bound-identifier=?' only need the syntax objects.


reply via email to

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