[Openmcl-devel] two portability issues

Rainer Joswig joswig at lisp.de
Sun Dec 21 10:29:25 PST 2014


Generally it seems to work, but not for some type declarations in the LOOP macro;

Example file:
—
(defstruct foo fa fb)

(defclass bar ()
  ((baz :type foo)
   (baz0 :type foo0)))

(defun func (a b c)
  (declare (type foo a)
           (type bar b))
  (list a b c))

(defun test (l)
  (loop for e of-type foo in l collect e))
—

In function FUNC the type declarations are both accepted. If I would add another, but unknown type declaration, CCL complains nicely.

But in TEST inside the LOOP macro, the type FOO is unknown.
> Error: Unknown type specifier: FOO

That would indicate that while expanding the LOOP macro not know everything about the compile time environment is known or found.

A Class is also not recognized. OTOH a type declared by DEFTYPE is recognized.



> Am 21.12.2014 um 02:35 schrieb Rainer Joswig <joswig at lisp.de>:
> 
> it’s actually    … maximize (…) of-type real )
> 
> 
>> it works for real, but not fixnum… The computed numbers are not outside the fixnum range, though.
>> 
>>   … maximize (…) real )  works
>> 
>> 
>> 
>> _______________________________________________
>> Openmcl-devel mailing list
>> Openmcl-devel at clozure.com
>> https://lists.clozure.com/mailman/listinfo/openmcl-devel
> 
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> https://lists.clozure.com/mailman/listinfo/openmcl-devel




More information about the Openmcl-devel mailing list