|
From: Greg B. <gwb...@gm...> - 2026-05-20 23:08:04
|
Thanks!
On 2026-05-20 19:05, Michał "phoe" Herda wrote:
>
> Use alexandria:define-constant with :test #'equal.
>
> W dniu 2026-05-21 00:58, Greg Bennett napisał(a):
>
>> Running sbcl 2.6.4 under linux mint 22.3
>>
>> The file ~/RESREVE/test-defconstant.lsp contains the single line
>>
>> (defconstant +zot+ '("a" "b"))
>>
>> Compiling that file and then loading test-defconstant.fasl leads to
>>
>> (load "~/RESERVE/test-constant.fasl")
>>
>> debugger invoked on a DEFCONSTANT-UNEQL in thread
>> #<THREAD tid=391763 "main thread" RUNNING {1200038003}>:
>> The constant +ZOT+ is being redefined (from ("a" "b") to ("a" "b"))
>> See also:
>> The ANSI Standard, Macro DEFCONSTANT
>> The SBCL Manual, Node "Idiosyncrasies"
>>
>> Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.
>>
>> restarts (invokable by number or by possibly-abbreviated name):
>> 0: [CONTINUE] Go ahead and change the value.
>> 1: [ABORT ] Keep the old value.
>> 2: Exit debugger, returning to top level.
>>
>> (SB-IMPL::%DEFCONSTANT +ZOT+ ("a" "b")
>> #S(SB-C:DEFINITION-SOURCE-LOCATION :NAMESTRING
>> "~/RESERVE/test-constant.lsp" :INDICES 32769) NIL)
>> 0] 2
>>
>> Is there a way to avoid this situation ?
>>
>> Cheers,
>> Greg
>>
>>
>> _______________________________________________
>> Sbcl-help mailing list
>> Sbc...@li...
>> https://lists.sourceforge.net/lists/listinfo/sbcl-help
>
>
|