Right now all parameters to a custom generator are required, but optional parameters would be helpful -- they would allow something like the character generator to be reimplemented with def-generator.
transparent-wrap's parser assumes lamba lists have already been validated by the Lisp implementation, but def-generator lambda lists will need to be validated before the new generator type is constructed. It may be possible to save the lambda list form, build a do-nothing function with it, and then if Lisp doesn't signal an error while building that function, finally parse the saved lambda list with transparent-wrap's parser to get the variable/slot names. This would lead to style-warnings for unused arguments in the do-nothing function though.
So the right way to go is probably just to steal a good validating lambda list parser from somewhere else.
Right now all parameters to a custom generator are required, but optional parameters would be helpful -- they would allow something like the
character
generator to be reimplemented withdef-generator
.transparent-wrap's parser assumes lamba lists have already been validated by the Lisp implementation, but
def-generator
lambda lists will need to be validated before the new generator type is constructed. It may be possible to save the lambda list form, build a do-nothing function with it, and then if Lisp doesn't signal an error while building that function, finally parse the saved lambda list withtransparent-wrap
's parser to get the variable/slot names. This would lead to style-warnings for unused arguments in the do-nothing function though.So the right way to go is probably just to steal a good validating lambda list parser from somewhere else.