pushed updated library tests Felix Thibault (21 Aug 2020 22:28 UTC)
Re: pushed updated library tests Marc Nieper-Wißkirchen (22 Aug 2020 15:27 UTC)
Re: pushed updated library tests Felix Thibault (22 Aug 2020 16:23 UTC)
Re: pushed updated library tests Marc Nieper-Wißkirchen (25 Aug 2020 07:04 UTC)
Re: pushed updated library tests Alex Shinn (25 Aug 2020 07:20 UTC)
Re: pushed updated library tests Marc Nieper-Wißkirchen (25 Aug 2020 07:40 UTC)
Re: pushed updated library tests Alex Shinn (25 Aug 2020 07:58 UTC)
Re: pushed updated library tests Marc Nieper-Wißkirchen (25 Aug 2020 08:13 UTC)
Re: pushed updated library tests Alex Shinn (27 Aug 2020 02:14 UTC)
Re: pushed updated library tests Marc Nieper-Wißkirchen (27 Aug 2020 07:35 UTC)
Re: pushed updated library tests John Cowan (27 Aug 2020 17:43 UTC)
Re: pushed updated library tests Felix Thibault (27 Aug 2020 22:19 UTC)
Re: pushed updated library tests Arthur A. Gleckler (27 Aug 2020 23:23 UTC)
Re: pushed updated library tests Alex Shinn (28 Aug 2020 00:43 UTC)
Re: pushed updated library tests Marc Nieper-Wißkirchen (28 Aug 2020 05:26 UTC)
Re: pushed updated library tests Alex Shinn (28 Aug 2020 05:35 UTC)
Re: pushed updated library tests Marc Nieper-Wißkirchen (28 Aug 2020 05:52 UTC)
Re: pushed updated library tests Marc Nieper-Wißkirchen (28 Aug 2020 13:47 UTC)
Re: pushed updated library tests Alex Shinn (28 Aug 2020 14:24 UTC)
Re: pushed updated library tests Marc Nieper-Wißkirchen (28 Aug 2020 15:03 UTC)
Re: pushed updated library tests Alex Shinn (31 Aug 2020 13:14 UTC)
Re: pushed updated library tests Marc Nieper-Wißkirchen (31 Aug 2020 14:44 UTC)
Re: pushed updated library tests Alex Shinn (31 Aug 2020 21:15 UTC)
Re: pushed updated library tests Marc Nieper-Wißkirchen (01 Sep 2020 06:52 UTC)
Re: pushed updated library tests Alex Shinn (01 Sep 2020 07:18 UTC)
Re: pushed updated library tests Marc Nieper-Wißkirchen (01 Sep 2020 07:24 UTC)
Re: pushed updated library tests Alex Shinn (01 Sep 2020 07:29 UTC)
Re: pushed updated library tests Marc Nieper-Wißkirchen (01 Sep 2020 07:47 UTC)
Re: pushed updated library tests Alex Shinn (02 Sep 2020 01:19 UTC)
Re: pushed updated library tests Marc Nieper-Wißkirchen (02 Sep 2020 07:02 UTC)
Re: pushed updated library tests Marc Nieper-Wißkirchen (31 Aug 2020 15:50 UTC)

Re: pushed updated library tests Marc Nieper-Wißkirchen 25 Aug 2020 07:03 UTC

Am Sa., 22. Aug. 2020 um 18:23 Uhr schrieb Felix Thibault
<xxxxxx@gmail.com>:

>>> integrated the new match-letrec
>>> updated the documentation to reference Oleg's "How to Write Seemingly Unhygienic and Referentially Opaque Macros with Syntax-rules"
>>
>> I hope someone volunteers to follow Alex's comments in the source code to adapt the implementation so that it just works in all cases.
>>
>> Alternatively, if match-letrec has no use cases one may think of dropping it?

The following examples are failing with the current implementation of
match-letrec:

A.

(match-letrec (((x 'x) (list #t 'x))) x)

yields an error "no matching pattern" instead of the expected #t. On
the other hand, (match-letrec (((x 'x) (list #t 'p-ls))) x) yields #t.

B.

(match-letrec (('#0=(#0#) '#1=(#1#))) #t)

causes the syntax expander to loop indefinitely instead of evaluating
to the expected #t.

The first problem A. can be cured in the current implementation. It is
due to the fact that all occurrences of 'x' are renamed in the pattern
but to identifiers named 'p-ls'. When they are renamed to identifiers
with the same symbolic name, the problem should go away.

The second problem B. cannot be fixed in general and limits, in
general, the applicability of the trick in Oleg's paper. In the case
of the current match-letrec implementation, however, it seems to be
fixable if the variable rewriter understands the pattern language and
skips all quoted patterns (this will also make problem A. go away).
This correction of the rewriter, however, is probably much more work
than reimplementing match-letrec in a way that doesn't need rewriting
(the alternative version mentioned in Alex's source code). NB: The
reason why the situation here is better than in the general case of
Oleg's paper is that the trick in Oleg's paper wants to scan arbitrary
code, which is, in general, not possible, while we are here just
scanning a restricted pattern language that does not contain macro
uses.

The current rewriter also doesn't descend into vectors, but this is easy to fix.