jphmrst / cl-nst

Unit testing for Common Lisp
Other
9 stars 1 forks source link

Conditionalization inside arbitrary-grounded-type for non-standard classes #23

Open Yehouda opened 1 year ago

Yehouda commented 1 year ago

https://github.com/jphmrst/cl-nst/blob/6c0990f594abcf5887e8d80f1035e3b60454b61b/core/sampling.lisp#L386

Inside arbitrary-grounded-type there are many conditionalizations of whether to use a non-standard class or just a symbol. I think it is better to add a function like:

  (defun find-class-or-name (class-name) (or (find-class class-name nil) class-name))

and then replace all the conditionalizations by calls to this function.

Note that passing NIL as second argument to find-class means it doesn't error when it fails to find the class, it just returns NIL.

I encountered this issue because we just removed the class short-float from LispWorks 64bit (it was never a separate type on 64bit), and we suddenly have errors in loading "cl-nst" (and any quicklisp system that depends on it).