The type
string
(and hence
simple-string
) is defined by ANSI Common Lisp to be a union of all the character array types. This makes a call like
(coerce
s
'simple-string)
ambiguous because it needs to select a concrete type (such as
simple-base-string
or
simple-text-string
).
When LispWorks is running with
*default-character-element-type*
set to
base-char
, it expects that you will want strings with element type
base-char
, so functions like
coerce
treat references to
simple-string
as if they were
(simple-array base-char (*))
.
If you call
set-default-character-element-type
with a larger character type, then
simple-string
becomes a union of the array types that are subtypes of that character type.