Hello,
The following code executes sucessfully when I load it under CMUCL, but
fails when I try to compile it. Can someone enlighten on why this is
happening?
--------------
(defun new-string ()
(make-array 1024 :fill-pointer 0 :adjustable t :element-type 'character))
(set-macro-character #\[
#'(lambda (stream char)
(let ((forms '())
(curr-string (new-string)))
(do ((ch (read-char stream t nil t) (read-char stream t nil t)))
((eql ch #\]))
(vector-push-extend ch curr-string))
(push curr-string forms)
`(progn ,@(nreverse forms)))))
(describe [test])
----------------
This is what happens when I load it:
"test" is a vector of length 4.
It has a fill pointer, currently 4
Now, when I try to compile the file, I get this:
Byte Compiling Top-Level Form:
"test" can't be converted to type SIMPLE-ARRAY.
This code is a modified version (in order to make a simple test case)
from Kevin Rosenberg's LML package, which he confirms the problem on
CMUCL, but says it works on other compilers.
Thanks,
Fabricio
--
http://raw.no-ip.com/~fc/