[Openmcl-devel] deftype bug?
gb at clozure.com
Thu Mar 18 04:11:26 UTC 2010
It's being handled incorrectly; preserving the left-to-right/short-circuit
order of the AND specifier's subforms is only one of the things that goes
On Wed, 17 Mar 2010, Paul Krueger wrote:
> The following looks like a bug to me. It is a much-simplified example
> of what I encountered. Shouldn't the use of "list" as part of the type
> definition preclude the error that occurs? CLTL is very explicit about
> that, but I couldn't find corresponding language in the hyper-spec, so
> perhaps something changed along the way. Note that using "cons"
> instead of "list" works as expected.
> I also upgraded to 1.5-dev-r13523M-trunk and got the same result. Am I
> missing something?
> Welcome to Clozure Common Lisp Version 1.5-dev-r13388M-trunk
> ? (defun length3 (thing)
> (eql (list-length thing) 3))
> ? (deftype list3 ()
> '(and list (satisfies length3)))
> ? (deftype lst3 ()
> '(and cons (satisfies length3)))
> ? (setf arr (make-array '(3)))
> #(0 0 0)
> ? (typep arr 'lst3)
> ? (typep arr 'list3)
> > Error: value #<SIMPLE-VECTOR 3> is not of the expected type LIST.
> > While executing: LIST-LENGTH, in process Listener(6).
> > Type cmd-. to abort, cmd-\ for a list of available restarts.
> > Type :? for other options.
> 1 > (typep arr 'list)
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
More information about the Openmcl-devel