enumeration set case syntax Kevin Wortman (10 Dec 2013 06:57 UTC)
Re: enumeration set case syntax John Cowan (10 Dec 2013 20:19 UTC)
Re: enumeration set case syntax Kevin Wortman (23 Dec 2013 05:27 UTC)

Re: enumeration set case syntax John Cowan 10 Dec 2013 20:19 UTC

Kevin Wortman scripsit:

> How about a syntax similar to case, that dispatches based on a member of
> an enumeration set, with enumeration-specific error checking?
> Specifically, an error would be signaled if the cases are not
> exhaustive, or if any clause datum is not a member of the enumeration set.

Due to phasing problems, this would only work with enumerations defined
using define-enumeration, and it would be awkward to implement it with
syntax-rules only.  So I regretfully reject it for this SRFI.

I've added a version of the above to the Rationale section.

> Also:
> (enum-set-min integer-set)
> (enum-set-max integer-set)
> should read
> (enum-set-min enum-set)
> (enum-set-max enum-set)

Fixed, thanks.

--
John Cowan                                xxxxxx@ccil.org
At times of peril or dubitation,          http://www.ccil.org/~cowan
Perform swift circular ambulation,
With loud and high-pitched ululation.