Comment 1 for bug 800010

Revision history for this message
Matthias Benkard (mulk) wrote :

The reason is that a PRETTY-STREAM is an ANSI-STREAM, so STREAM-ELEMENT-TYPE delegates to the ANSI-STREAM-MISC of the stream, which is SB-PRETTY::PRETTY-MISC for PRETTY-STREAMs. PRETTY-MISC returns NIL for (EQ OP :ELEMENT-TYPE). This is the definition:

(defun pretty-misc (stream op &optional arg1 arg2)
  (declare (ignore stream op arg1 arg2)))

I'm not sure what the fix should look like. Maybe something like this?

(defun pretty-misc (stream op &optional arg1 arg2)
  (declare (ignore arg1 arg2))
  (case op
    ((:element-type) (stream-element-type (pretty-stream-target stream)))))

Are there other -MISC features that PRETTY-STREAMs should hand through to the target stream?