edicl / cl-unicode

Portable Unicode library for Common Lisp
https://edicl.github.io/cl-unicode/
61 stars 24 forks source link

char-info:case-folding-mapping type is nil - ccl fails #24

Closed bahmanm closed 3 years ago

bahmanm commented 3 years ago

when trying to (ql:quickload "cl-unicode") or (asdf:load-system :cl-unicode), clozure cl fails with

The value NIL, derived from the initform NIL, can not be used to set the value of 
the slot CL-UNICODE::CASE-FOLDING-MAPPING in #<CL-UNICODE::CHAR-INFO #x30200268A09D>, 
because it is not of type NIL.
   [Condition of type CCL::BAD-SLOT-TYPE-FROM-INITFORM]

the error is coming from char-info:case-folding-mapping which has the type nil.

the documentation reads

The case folding mapping of the character (as a list of (status, code point)) if explicitly specified

so perhaps (or list null) is a better option than nil? what do you think?

stassats commented 3 years ago

nil is not even an option. Should either just remove it or make it list. (And null is already a list.)

bahmanm commented 3 years ago

yes..makes sense. i'm testing out list against sbcl, ccl and ecl. should have a pr out shortly.

bahmanm commented 3 years ago

thanks for the quick fix.