-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The parser is overly permissive of values types #10
Comments
I could imagine there being another parameter But I don't feel having a separate |
I'm not sure I understand what you mean. This would be fixing a CLHS incompatibility in ctype, and it is roughly what SBCL does in its own system. You can see here - arg types are parsed with eta: the way |
Okay, TIL about CL-USER> (sb-kernel:values-specifier-type '(values &rest t))
#<SB-KERNEL:NAMED-TYPE *>
CL-USER> (sb-kernel:specifier-type '(values &rest t))
; Evaluation aborted on #<SIMPLE-ERROR #<SB-FORMAT::FMT-CONTROL "VALUES type illegal in this context:~% ~/SB-IMPL:PRINT-TYPE-SPECIFIER/"> {102D3A3963}>. If the actual work is being done by One other alternative to implementing |
yeah, shouldn't need to change cons-specifier-ctype if it works like sbcl |
For example,
(ctype:specifier-ctype '(function ((values integer))))
returns a ctype with a values type in the lambda list, which is nonsensical. It should signal a syntax error.It would probably be good to have separate
specifier-ctype
andvalues-specifier-ctype
functions, where the former errs on values types and the latter coerces everything to a values type, and then call them appropriately. But I'm not sure how that would work with the customization, i.e.cons-specifier-ctype
being generic.The text was updated successfully, but these errors were encountered: