Patch for LispWorks compiler notes error

Martin Simmons martin at lispworks.com
Tue May 14 15:46:48 UTC 2013


>>>>> On Sun, 12 May 2013 15:30:53 -0700, Robert Smith said:
> 
> Hello:
> 
> As it stands, SLIME will error when it encounters compiler notes generated
> by LispWorks 6 :EXPLAIN functionality. For example:
> 
> (defun dist (x y)
>   (declare (:explain :variables))
>   (sqrt (+ (* x x) (* y y))))
> 
> will error with
> 
> #<CONDITIONS:COMPILER-NOTE 402026DC23> fell through ETYPECASE expression.
> Wanted one of (ERROR STYLE-WARNING WARNING).
>    [Condition of type CONDITIONS:CASE-FAILURE]
> 
> As a patch, add the two lines prefixed by a + to the function
> LISPWORKS-SEVERITY in the file "swank-lispworks.lisp" indicated at the end
> of this mail.
> 
> Thanks,
> 
> Robert
> 
> 
> PATCH FOR "swank-lispworks.lisp":
> 
>   (defun lispworks-severity (condition)
>     (cond ((not condition) :warning)
>           (t (etypecase condition
> +              #+lispworks6
> +              (conditions:compiler-note :note)
>                (error :error)
>                (style-warning :warning)
>                (warning :warning)))))

Thanks, I've fixed it.

-- 
Martin Simmons
LispWorks Ltd
http://www.lispworks.com/



More information about the slime-devel mailing list