Re: defconstant
Greg Bennett <[email protected]> Wed, 20 May 2026 19:07:55 -0400
| Newsgroups | gmane.lisp.steel-bank.general |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format.
--===============1775210143649805769==
Content-Type: multipart/alternative;
boundary="------------EZiCwpCWUQY8Mcmt8phEAwob"
Content-Language: en-US
This is a multi-part message in MIME format.
--------------EZiCwpCWUQY8Mcmt8phEAwob
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
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
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/sbcl-help
>
>
--------------EZiCwpCWUQY8Mcmt8phEAwob
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
Thanks!<br>
<br>
<div class="moz-cite-prefix">On 2026-05-20 19:05, Michał "phoe"
Herda wrote:<br>
</div>
<blockquote type="cite"
cite="mid:[email protected]">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<p>Use alexandria:define-constant with :test #'equal.</p>
<p id="reply-intro">W dniu 2026-05-21 00:58, Greg Bennett
napisał(a):</p>
<blockquote type="cite"
style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">
<div class="pre"
style="margin: 0; padding: 0; font-family: monospace">Running
sbcl 2.6.4 under linux mint 22.3<br>
<br>
The file ~/RESREVE/test-defconstant.lsp contains the single
line<br>
<br>
(defconstant +zot+ '("a" "b"))<br>
<br>
Compiling that file and then loading test-defconstant.fasl
leads to<br>
<br>
(load "~/RESERVE/test-constant.fasl")<br>
<br>
debugger invoked on a DEFCONSTANT-UNEQL in thread<br>
#<THREAD tid=391763 "main thread" RUNNING {1200038003}>:<br>
The constant +ZOT+ is being redefined (from ("a" "b") to
("a" "b"))<br>
See also:<br>
The ANSI Standard, Macro DEFCONSTANT<br>
The SBCL Manual, Node "Idiosyncrasies"<br>
<br>
Type HELP for debugger help, or (SB-EXT:EXIT) to exit from
SBCL.<br>
<br>
restarts (invokable by number or by possibly-abbreviated
name):<br>
0: [CONTINUE] Go ahead and change the value.<br>
1: [ABORT ] Keep the old value.<br>
2: Exit debugger, returning to top level.<br>
<br>
(SB-IMPL::%DEFCONSTANT +ZOT+ ("a" "b")
#S(SB-C:DEFINITION-SOURCE-LOCATION :NAMESTRING
"~/RESERVE/test-constant.lsp" :INDICES 32769) NIL)<br>
0] 2<br>
<br>
Is there a way to avoid this situation ?<br>
<br>
Cheers,<br>
Greg<br>
<br>
<br>
_______________________________________________<br>
Sbcl-help mailing list<br>
<a href="mailto:[email protected]"
moz-do-not-send="true" class="moz-txt-link-freetext">[email protected]</a><br>
<a
href="https://lists.sourceforge.net/lists/listinfo/sbcl-help"
target="_blank" rel="noopener noreferrer"
moz-do-not-send="true" class="moz-txt-link-freetext">https://lists.sourceforge.net/lists/listinfo/sbcl-help</a></div>
</blockquote>
<p><br>
</p>
</blockquote>
<br>
</body>
</html>
--------------EZiCwpCWUQY8Mcmt8phEAwob--
--===============1775210143649805769==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
--===============1775210143649805769==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Sbcl-help mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sbcl-help
--===============1775210143649805769==--