While implementing srfi-209 for Gauche, I found a couple of discrepancies between srfi text and the reference implementation/tests. Although the fix will require changing srfi text, both seem to be an oversight.
- enum-empty-set is missing from srfi text, but reference implementation and test have it.
- enum-set-indexer : The srfi text says "..., if the symbol is the name of an enum in enum-set, then the ordinal of that enum is returned. Otherwise, #f is returned." However, the reference implementation and tests doesn't check if the name is in the given set; it is enough that the named enum is in the enum type of the set. R6RS agrees with the reference implementation.
- enum-set-disjoint? : This isn't a discrepancy but can be clarified. The srfi text doesn't say anything if enum-set-1 and enum-set-2 do not belong to the same type. The reference implementation checks it and raises an error if they don't. We can add the text.
And one more: This is probably implied, but I wondered when I was writing it.
- enum-set-projection: The srfi text says nothing about when the enum-type of the first argument does not contain an enum with a name in the second argument. The reference implementation doesn't explicitly check it, but raises an error from list->enum-set. If it does raise an error, the cause is not immediately obvious to the user (enum-name->enum returns #f for such names, and by the time list->enum-set rejects it, the name that caused the error will be lost.) If the text explicitly says it's an error, an implementation may opt to do an extra check.