Discussion:
[Larceny-users] Bug in case-lambda
David Van Horn
2009-09-13 16:23:44 UTC
Permalink
I noticed that when running in non-R6RS mode, a case-lambda form with no
clauses causes a syntax error:

$ larceny
Larceny v0.97 "Funny in the Head" (Aug 19 2009 04:24:46,
precise:Posix:unified)
larceny.heap, built on Wed Aug 19 04:26:48 EDT 2009
(case-lambda)
ERROR detected during macro expansion:
Use of macro does not match definition
(case-lambda)
#f

This is a bug according to R6RS and SRFI 16.

David
David Van Horn
2009-09-13 16:27:58 UTC
Permalink
Post by David Van Horn
I noticed that when running in non-R6RS mode, a case-lambda form with no
$ larceny
Larceny v0.97 "Funny in the Head" (Aug 19 2009 04:24:46,
precise:Posix:unified)
larceny.heap, built on Wed Aug 19 04:26:48 EDT 2009
(case-lambda)
Use of macro does not match definition
(case-lambda)
#f
This is a bug according to R6RS and SRFI 16.
Actually, I believe this also demonstrates a bug in the reference
implementation for SRFI 16. The specification states:

(CASE-LAMBDA <clause> ...)

implying a case-lambda form includes 0 or more clauses, but the
reference implementation accepts only 1 or more.

David
David Van Horn
2009-09-19 13:58:35 UTC
Permalink
Post by David Van Horn
Post by David Van Horn
I noticed that when running in non-R6RS mode, a case-lambda form with no
$ larceny
Larceny v0.97 "Funny in the Head" (Aug 19 2009 04:24:46,
precise:Posix:unified)
larceny.heap, built on Wed Aug 19 04:26:48 EDT 2009
(case-lambda)
Use of macro does not match definition
(case-lambda)
#f
This is a bug according to R6RS and SRFI 16.
Actually, I believe this also demonstrates a bug in the reference
(CASE-LAMBDA <clause> ...)
implying a case-lambda form includes 0 or more clauses, but the
reference implementation accepts only 1 or more.
The reference implementation of SRFI 16 has been fixed to address this.

David

Loading...