From: J. G. W. <ga...@te...> - 2015-04-29 17:15:12
|
Thank you! Looks good so far. Probably unrelated, but in trying to understand that problem, I also ran across this oddity. This is not new behaviour, I see it in 1.2.10. Not sure if this is a SBCL problem or SLIME, or SWANK, but given the previous forms, if I do 'BLIST-TYPE and try to Inspect the presentation that results, I get this condition: Value of (SB-C::GET-INFO-VALUE SYMBOL 29) in .. [Condition of type SIMPLE-TYPE-ERROR] Restarts: 0: [*ABORT] Return to SLIME's top level. 1: [ABORT] abort thread (#<THREAD "repl-thread" RUNNING {1005A30063}>) Backtrace: 0: (SB-C::%COMPILE-TIME-TYPE-ERROR (NIL) NIL #<unavailable argument> ((SB-C::GET-INFO-VALUE SYMBOL 29)) "(SB-EXT:TRULY-THE (VALUES NIL BOOLEAN) (SB-C::GET-INFO-VALUE SYMBOL 29))") 1: (SWANK::INSPECT-TYPE-SPECIFIER BLIST-TYPE) Locals: SB-DEBUG::ARG-0 = BLIST-TYPE 2: ((:METHOD SWANK/BACKEND:EMACS-INSPECT (SYMBOL)) BLIST-TYPE) [fast-method] 3: (SWANK::CALL-WITH-BINDINGS ((*PRINT-LINES* . 1) (*PRINT-RIGHT-MARGIN* . 75) (*PRINT-PRETTY* . T) (*PRINT-READABLY*)) #<CLOSURE (LAMBDA NIL :IN SWANK::EMACS-INSPECT/ISTATE) {100615C24B}>) 4: (SWANK::INSPECT-OBJECT BLIST-TYPE) 5: (SB-INT:SIMPLE-EVAL-IN-LEXENV (SWANK:INSPECT-PRESENTATION (QUOTE 1) T) #<NULL-LEXENV>) 6: (EVAL (SWANK:INSPECT-PRESENTATION (QUOTE 1) T)) 7: (SWANK:EVAL-FOR-EMACS (SWANK:INSPECT-PRESENTATION (QUOTE 1) T) "COMMON-LISP-USER" 10) 8: (SWANK::PROCESS-REQUESTS NIL) 9: ((LAMBDA NIL :IN SWANK::HANDLE-REQUESTS)) 10: ((LAMBDA NIL :IN SWANK::HANDLE-REQUESTS)) 11: (SWANK/SBCL::CALL-WITH-BREAK-HOOK #<FUNCTION SWANK:SWANK-DEBUGGER-HOOK> #<CLOSURE (LAMBDA NIL :IN SWANK::HANDLE-REQUESTS) {1005A3142B}>) 12: ((FLET SWANK/BACKEND:CALL-WITH-DEBUGGER-HOOK :IN "/home/gwilliams/quicklisp/dists/quicklisp/software/slime-2.13/swank/sbcl.lisp") #<FUNCTION SWANK:SWANK-DEBUGGER-HOOK> #<CLOSURE (LAMBDA NIL :IN SWANK:.. 13: (SWANK::CALL-WITH-BINDINGS ((*STANDARD-OUTPUT* . #1=#<SWANK/GRAY::SLIME-OUTPUT-STREAM {1005A094A3}>) (*STANDARD-INPUT* . #2=#<SWANK/GRAY::SLIME-INPUT-STREAM {1005929F93}>) (*TRACE-OUTPUT* . #1#) (*ERR.. 14: (SWANK::HANDLE-REQUESTS #<SWANK::MULTITHREADED-CONNECTION {1004D8BDE3}> NIL) 15: ((FLET #:WITHOUT-INTERRUPTS-BODY-1167 :IN SB-THREAD::INITIAL-THREAD-FUNCTION-TRAMPOLINE)) 16: ((FLET SB-THREAD::WITH-MUTEX-THUNK :IN SB-THREAD::INITIAL-THREAD-FUNCTION-TRAMPOLINE)) 17: ((FLET #:WITHOUT-INTERRUPTS-BODY-618 :IN SB-THREAD::CALL-WITH-MUTEX)) 18: (SB-THREAD::CALL-WITH-MUTEX #<CLOSURE (FLET SB-THREAD::WITH-MUTEX-THUNK :IN SB-THREAD::INITIAL-THREAD-FUNCTION-TRAMPOLINE) {7FFFF0B4ECEB}> #<SB-THREAD:MUTEX "thread result lock" owner: #<SB-THREAD:THR.. 19: (SB-THREAD::INITIAL-THREAD-FUNCTION-TRAMPOLINE #<SB-THREAD:THREAD "repl-thread" RUNNING {1005A30063}> NIL #<CLOSURE (LAMBDA NIL :IN SWANK-REPL::SPAWN-REPL-THREAD) {1005A27F9B}> (#<SB-THREAD:THREAD "re.. 20: ("foreign function: call_into_lisp") 21: ("foreign function: new_thread_trampoline") Should this be addressed elsewhere? g On Wed, Apr 29, 2015 at 2:52 AM, Christophe Rhodes <cs...@ca...> wrote: > "J. Gareth Williams" <ga...@te...> writes: > > > I see in the release notes that SET-PPRINT-DISPATCH does some more > > checking now. Was this code never legal? Is there a better way to do > > this (other than using the CONS type specifier directly)? > > I think your code is perfectly legal, and there's a newly-introduced bug > in the checking. Lightly-tested patch attached. > > Best wishes, > > Christophe > > > diff --git a/src/code/pprint.lisp b/src/code/pprint.lisp > index 80627ba..881ff38 100644 > --- a/src/code/pprint.lisp > +++ b/src/code/pprint.lisp > @@ -1012,7 +1012,7 @@ line break." > (warn "~S contains an unrecognized type specifier" type))) > (if consp > (let ((hashtable (pprint-dispatch-table-cons-entries table)) > - (key (second (second type)))) > + (key (car (member-type-members (cons-type-car-type > ctype))))) > (if function > (setf (gethash key hashtable) entry) > (remhash key hashtable))) > > |