Re: defconstant
Michał "phoe" Herda via Sbcl-help <[email protected]> Thu, 21 May 2026 01:05:49 +0200
| Newsgroups | gmane.lisp.steel-bank.general |
|---|---|
| Message-ID | <[email protected]> |
--===============5757727741283904600==
Content-Type: multipart/alternative;
boundary="=_f108b222ef3a984694281db7a2731b65"
--=_f108b222ef3a984694281db7a2731b65
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset=UTF-8;
format=flowed
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
--=_f108b222ef3a984694281db7a2731b65
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset=UTF-8
<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html; charset=
=3DUTF-8" /></head><body style=3D'font-size: 10pt; font-family: Verdana,Gen=
eva,sans-serif'>
<p>Use alexandria:define-constant with :test #'equal.</p>
<p id=3D"reply-intro">W dniu 2026-05-21 00:58, Greg Bennett napisa=C5=82(a)=
:</p>
<blockquote type=3D"cite" style=3D"padding: 0 0.4em; border-left: #1010ff 2=
px solid; margin: 0">
<div class=3D"pre" style=3D"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.f=
asl leads to<br /><br />(load "~/RESERVE/test-constant.fasl")<br /><br />de=
bugger invoked on a DEFCONSTANT-UNEQL in thread<br />#<THREAD tid=3D3917=
63 "main thread" RUNNING {1200038003}>:<br /> The constant +ZOT+ i=
s being redefined (from ("a" "b") to ("a" "b"))<br />See also:<br /> =
The ANSI Standard, Macro DEFCONSTANT<br /> The SBCL Manual, Node "Idi=
osyncrasies"<br /><br />Type HELP for debugger help, or (SB-EXT:EXIT) to ex=
it from SBCL.<br /><br />restarts (invokable by number or by possibly-abbre=
viated name):<br /> 0: [CONTINUE] Go ahead and change the value.<br /=
> 1: [ABORT ] Keep the old value.<br /> 2: &n=
bsp; Exit debugger, returning to top level.<br =
/><br />(SB-IMPL::%DEFCONSTANT +ZOT+ ("a" "b") #S(SB-C:DEFINITION-SOURCE-LO=
CATION :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=3D"mailto:[email protected]=
orge.net">[email protected]</a><br /><a href=3D"https://lists=
=2Esourceforge.net/lists/listinfo/sbcl-help" target=3D"_blank" rel=3D"noope=
ner noreferrer">https://lists.sourceforge.net/lists/listinfo/sbcl-help</a><=
/div>
</blockquote>
<p><br /></p>
</body></html>
--=_f108b222ef3a984694281db7a2731b65--
--===============5757727741283904600==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
--===============5757727741283904600==
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
--===============5757727741283904600==--