"Nikodemus Siivola" <nikodemus@...> writes:
> On Wed, Jun 18, 2008 at 4:53 PM, Kevin Reid <kpreid@...> wrote:
>> On Jun 18, 2008, at 9:27, Richard M Kreuter wrote:
>>> Does anybody have strong objections to extending the scope of
>>> SB-EXT:MUFFLE-CONDITIONS to include conditions raised outside of
>>> compilation proper?
>> Do you mean this?
>> (declare (sb-ext:muffle-conditions warning))
>> (warn "foo" #| will be muffled |#))
>> If so, I object. It seems to me that (outside of interpreted mode)
> If so, me too...
> But if it means that
> (proclaim '(sb-ext:muffle-conditions warning))
> (warn "will be muffled")
> ...then I'm ok with it.
I want to know the semantics intended for the locally form, and how a
mental model can be built linking it to the globally-proclaimed form,
before expressing an opinion.
> The use-case of course is
> (proclaim '(muffle-conditions compiler-note))
> or whatever in .sbclrc, expressing a global default.
(And this use case already works because compiler notes are emitted at
If we're playing, let's talk
#| in SBCL
(defvar sb-ext:*run-time-muffled-condition-types* nil)
(defun sb-int:run-time-muffled-p (x)
(member x sb-ext:*run-time-muffled-condition-types* :key 'typep))
(deftype sb-int:run-time-muffled-conditions ()
(defun eval (form)
(handler-bind ((sb-int:run-time-muffled-conditions #'muffle-warning))
#| in ~/.sbclrc
(pushnew 'warning sb-ext:*run-time-muffled-condition-types*)
The point here is that there is no need for the interface for run-time
conditions to be a proclamation or declaration. There was for the
interface for muffling compile-time conditions to be, so that they
could be selectively disabled and enabled for compiling particular
regions of code.