I find this as well when porting to Allegro CL.

I take a look at open-axiom, found that it is fixed by
https://github.com/GabrielDosReis/open-axiom/commit/9584120cc4fd35f1ae0639430e07d5936f1ac39b

My fix is in attachment.

- Qian

On 2/5/24 06:50, Waldek Hebisch wrote:
On Sun, Feb 04, 2024 at 04:24:38PM -0500, Camm Maguire wrote:
Greetings!  i-map.clisp contains three instances of

'

What is intended by this?

It is a symbol with a strange name.  It is used as a kind of
"error mark".  AFAICS the name is intended to reduce probability
of clash with user identifiers.


--
You received this message because you are subscribed to the Google Groups "FriCAS - 
computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/63d22773-9719-4a6d-9a16-8b944049d7c5%40gmail.com.
diff --git a/src/interp/define.boot b/src/interp/define.boot
index ecff6499..ffd9fc75 100644
--- a/src/interp/define.boot
+++ b/src/interp/define.boot
@@ -683,7 +683,7 @@ compDefineCapsuleFunction(df is ['DEF, form, signature, body],
       :bright $op,'": ",:formattedSig]
 
     T := CATCH('compCapsuleBody, compOrCroak(body,rettype,e))
-           or ["",rettype,e]
+           or [$ClearBodyToken, rettype, e]
 --+
     NRTassignCapsuleFunctionSlot($op, signature', $domainShell, e)
     if $newCompCompare=true then
@@ -823,7 +823,8 @@ do_compile(u, e) ==
 spadCompileOrSetq (form is [nam,[lam,vl,body]]) ==
         --bizarre hack to take account of the existence of "known" functions
         --good for performance (LISPLLIB size, BPI size, NILSEC)
-  CONTAINED("",body) => sayBrightly ['"  ",:bright nam,'" not compiled"]
+  CONTAINED($ClearBodyToken, body) =>
+      sayBrightly ['"  ", :bright nam, '" not compiled"]
   if vl is [:vl',E] and body is [nam',: =vl'] then
       output_lisp_form(['PUT,MKQ nam,MKQ 'SPADreplace,MKQ nam'])
       sayBrightly ['"     ",:bright nam,'"is replaced by",:bright nam']
diff --git a/src/interp/i-map.boot b/src/interp/i-map.boot
index cbe7aa3c..4b2409f7 100644
--- a/src/interp/i-map.boot
+++ b/src/interp/i-map.boot
@@ -39,6 +39,7 @@ DEFPARAMETER($mapName, 'noMapName)
 DEFPARAMETER($mapThrowCount, 0) -- times a "return" occurs in map
 DEFPARAMETER($compilingMap, NIL)
 DEFPARAMETER($definingMap, NIL)
+DEFPARAMETER($ClearBodyToken, GENSYM('"^L"'))
 
 --% Generating internal names for functions
 
@@ -176,7 +177,7 @@ addMap(lhs,rhs,pred) ==
   null newMap =>
     sayRemoveFunctionOrValue op
     putHist(op,'alias,nil,$e)
-    ""      -- clears value--- see return from addDefMap in tree2Atree1
+    $ClearBodyToken      -- see return from addDefMap in tree2Atree1
   if get(op,'isInterpreterRule,$e) then type := ['RuleCalled,op]
   else type := ['FunctionCalled,op]
   recursive :=
@@ -188,10 +189,10 @@ addMap(lhs,rhs,pred) ==
 augmentMap(op,args,pred,body,oldMap) ==
   pattern:= makePattern(args,pred)
   newMap:=deleteMap(op,pattern,oldMap)
-  body="" =>
+  body = $ClearBodyToken =>
     if newMap=oldMap then
       sayMSG ['"   Cannot find part of",:bright op,'"to delete."]
-    newMap  --just delete rule if body is 
+    newMap  --just delete rule if body is $ClearBodyToken
   entry:= [pattern,:body]
   resultMap:=
     newMap is ["SPADMAP", :tail] => ["SPADMAP", :tail, entry]
@@ -211,7 +212,7 @@ getUserIdentifiersIn body ==
   null body => nil
   IDENTP body =>
     isSharpVarWithNum body => nil
-    body="" => nil
+    body = $ClearBodyToken => nil
     [body]
   body is ["WRAPPED",:.] => nil
   (body is ["COLLECT",:itl,body1]) or (body is ['REPEAT,:itl,body1]) =>

Reply via email to