aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/interp/apply.boot4
-rw-r--r--src/interp/c-util.boot22
-rw-r--r--src/interp/compiler.boot70
-rw-r--r--src/interp/define.boot10
-rw-r--r--src/interp/format.boot4
-rw-r--r--src/interp/functor.boot2
-rw-r--r--src/interp/i-analy.boot2
-rw-r--r--src/interp/i-output.boot2
-rw-r--r--src/interp/i-toplev.boot1
-rw-r--r--src/interp/info.boot7
-rw-r--r--src/interp/int-top.boot1
-rw-r--r--src/interp/iterator.boot21
-rw-r--r--src/interp/lisplib.boot2
-rw-r--r--src/interp/modemap.boot6
-rw-r--r--src/interp/msgdb.boot7
-rw-r--r--src/interp/nrunopt.boot11
-rw-r--r--src/interp/package.boot2
-rw-r--r--src/interp/sys-driver.boot4
18 files changed, 95 insertions, 83 deletions
diff --git a/src/interp/apply.boot b/src/interp/apply.boot
index 4bc7a660..19b812ae 100644
--- a/src/interp/apply.boot
+++ b/src/interp/apply.boot
@@ -236,7 +236,7 @@ compMapCond(op,mc,$bindings,fnsel) ==
compMapCond': (%List,%Symbol,%Mode,%Env) -> %Code
compMapCond'([cexpr,fnexpr],op,dc,bindings) ==
compMapCond''(cexpr,dc) => compMapCondFun(fnexpr,op,dc,bindings)
- stackMessage ["not known that",'%b,dc,'%d,"has",'%b,cexpr,'%d]
+ stackMessage('"not known that %1pb has %2pb",[dc,cexpr])
compMapCond'': (%Thing,%Mode) -> %Boolean
compMapCond''(cexpr,dc) ==
@@ -253,7 +253,7 @@ compMapCond''(cexpr,dc) ==
--now it must be an attribute
member(["ATTRIBUTE",dc,cexpr],get("$Information","special",$e)) => true
--for the time being we'll stop here - shouldn't happen so far
- stackMessage ["not known that",'%b,dc,'%d,"has",'%b,cexpr,'%d]
+ stackMessage('"not known that %1pb has %2pb",[dc,cexpr])
false
compMapCondFun: (%Thing,%Symbol,%Mode,%Env) -> %Code
diff --git a/src/interp/c-util.boot b/src/interp/c-util.boot
index 941f24fb..a8475327 100644
--- a/src/interp/c-util.boot
+++ b/src/interp/c-util.boot
@@ -139,9 +139,11 @@ compAndTrace [x,m,e] ==
UNTRACE_,1 "compFormWithModemap"
T
-errorRef s == stackWarning ['%b,s,'%d,'"has no value"]
+errorRef s ==
+ stackWarning('"%1b has no value", [s])
-unErrorRef s == unStackWarning ['%b,s,'%d,'"has no value"]
+unErrorRef s ==
+ unStackWarning('"'%1b has no value",[s])
--% ENVIRONMENT FUNCTIONS
@@ -246,8 +248,8 @@ addContour(c,E is [cur,:tail]) ==
--check for conflicts with earlier mode
if vv:=LASSOC("mode",e) then
if v ^=vv then
- stackWarning ["The conditional modes ",
- v," and ",vv," conflict"]
+ stackWarning('"The conditional modes %1p and %2p conflict",
+ [v,vv])
LIST c
makeCommonEnvironment(e,e') ==
@@ -497,18 +499,20 @@ stackSemanticError(msg,expr) ==
$initCapsuleErrorCount>3 => THROW("compCapsuleBody",nil)
nil
-stackWarning msg ==
+stackWarning(msg,args == nil) ==
+ msg := buildMessage(msg, args)
if $insideCapsuleFunctionIfTrue then msg:= [$op,": ",:msg]
if not member(msg,$warningStack) then $warningStack:= [msg,:$warningStack]
nil
-unStackWarning msg ==
+unStackWarning(msg,args) ==
+ msg := buildMessage(msg,args)
if $insideCapsuleFunctionIfTrue then msg:= [$op,": ",:msg]
$warningStack:= EFFACE(msg,$warningStack)
nil
-stackMessage msg ==
- $compErrorMessageStack:= [msg,:$compErrorMessageStack]
+stackMessage(msg,args == nil) ==
+ $compErrorMessageStack:= [buildMessage(msg,args),:$compErrorMessageStack]
nil
stackMessageIfNone msg ==
@@ -576,7 +580,7 @@ extendsCategoryForm(domain,form,form') ==
form is ["Join",:l] => or/[extendsCategoryForm(domain,x,form') for x in l]
form is ["CATEGORY",.,:l] =>
member(form',l) or
- stackWarning ["not known that ",form'," is of mode ",form] or true
+ stackWarning('"not known that %1 is of mode %2p",[form',form]) or true
isCategoryForm(form,$EmptyEnvironment) =>
--Constructs the associated vector
formVec:=(compMakeCategoryObject(form,$e)).expr
diff --git a/src/interp/compiler.boot b/src/interp/compiler.boot
index 8534306d..0a8162d3 100644
--- a/src/interp/compiler.boot
+++ b/src/interp/compiler.boot
@@ -332,7 +332,8 @@ compSymbol(s,m,e) ==
if not member(s,$formalArgList) and not MEMQ(s,$FormalMapVariableList) and
not isFunction(s,e) and null ($compForModeIfTrue=true) then errorRef s
[s,m',e] --s is a declared argument
- MEMQ(s,$FormalMapVariableList) => stackMessage ["no mode found for",s]
+ MEMQ(s,$FormalMapVariableList) =>
+ stackMessage('"no mode found for %1",[s])
m = $OutputForm or m = $Symbol => [['QUOTE,s],m,e]
not isFunction(s,e) => errorRef s
@@ -515,7 +516,7 @@ getFormModemaps(form is [op,:argl],e) ==
nargs:= #argl
finalModemapList:= [mm for (mm:= [[.,.,:sig],:.]) in modemapList | #sig=nargs]
modemapList and null finalModemapList =>
- stackMessage ["no modemap for","%b",op,"%d","with ",nargs," arguments"]
+ stackMessage('"no modemap for %1b with %2 arguments", [op,nargs])
finalModemapList
++ We are either compiling a function call, or trying to determine
@@ -562,7 +563,7 @@ eltModemapFilter(name,mmList,e) ==
isConstantId(name,e) =>
l:= [mm for mm in mmList | mm is [[.,.,.,sel,:.],:.] and sel=name] => l
--there are elts with extra parameters
- stackMessage ["selector variable: ",name," is undeclared and unbound"]
+ stackMessage('"selector variable: %1 is undeclared and unbound",[name])
nil
mmList
@@ -570,7 +571,7 @@ seteltModemapFilter(name,mmList,e) ==
isConstantId(name,e) =>
l:= [mm for (mm:= [[.,.,.,sel,:.],:.]) in mmList | sel=name] => l
--there are setelts with extra parameters
- stackMessage ["selector variable: ",name," is undeclared and unbound"]
+ stackMessage('"selector variable: %1 is undeclared and unbound",[name])
nil
mmList
@@ -683,8 +684,7 @@ setqSingle(id,val,m,E) ==
e':= (PAIRP id => e'; addBinding(id,newProplist,e'))
if isDomainForm(val,e') then
if isDomainInScope(id,e') then
- stackWarning ["domain valued variable","%b",id,"%d",
- "has been reassigned within its scope"]
+ stackWarning("domain valued variable %1b has been reassigned within its scope",[id])
e':= augModemapsFromDomain1(id,val,e')
--all we do now is to allocate a slot number for lhs
--e.g. the LET form below will be changed by putInLocalDomainReferences
@@ -698,12 +698,10 @@ setqSingle(id,val,m,E) ==
[form,m',e']
assignError(val,m',form,m) ==
- message:=
- val =>
- ["CANNOT ASSIGN: ",val,"%l"," OF MODE: ",m',"%l"," TO: ",form,"%l",
- " OF MODE: ",m]
- ["CANNOT ASSIGN: ",val,"%l"," TO: ",form,"%l"," OF MODE: ",m]
- stackMessage message
+ val =>
+ stackMessage('"CANNOT ASSIGN: %1b OF MODE: %2pb TO: %3b OF MODE: %4bp",
+ [val,m',form,m])
+ stackMessage('"CANNOT ASSIGN: %1b TO: %2b OF MODE: %3pb",[val,form,m])
setqMultiple(nameList,val,m,e) ==
val is ["CONS",:.] and m=$NoValueMode =>
@@ -727,9 +725,9 @@ setqMultiple(nameList,val,m,e) ==
t is ["Record",:l] => [[name,:mode] for [":",name,mode] in l]
comp(t,$EmptyMode,e) is [.,["RecordCategory",:l],.] =>
[[name,:mode] for [":",name,mode] in l]
- stackMessage ["no multiple assigns to mode: ",t]
+ stackMessage('"no multiple assigns to mode: %1p",[t])
#nameList^=#selectorModePairs =>
- stackMessage [val," must decompose into ",#nameList," components"]
+ stackMessage('"%1 must decompose into %2 components",[val,#nameList])
3 --generate code; return
assignList:=
[([.,.,e]:= compSetq1(x,["elt",g,y],z,e) or return "failed").expr
@@ -739,8 +737,7 @@ setqMultiple(nameList,val,m,e) ==
setqMultipleExplicit(nameList,valList,m,e) ==
#nameList^=#valList =>
- stackMessage ["Multiple assignment error; # of items in: ",nameList,
- "must = # in: ",valList]
+ stackMessage('"Multiple assignment error; # of items in: %1 must = # in: %2",[nameList,valList])
gensymList:= [genVariable() for name in nameList]
assignList:=
--should be fixed to declare genVar when possible
@@ -949,11 +946,10 @@ compElt(form,m,E) ==
1=n => mmList.(0)
0=n =>
return
- stackMessage ['"Operation ","%b",anOp,"%d",
- '"missing from domain: ", aDomain]
- stackWarning ['"more than 1 modemap for: ",anOp,
- '" with dc=",aDomain,'" ===>"
- ,mmList]
+ stackMessage('"Operation %1b missing from domain: %2p",
+ [anOp,aDomain])
+ stackWarning('"more than 1 modemap for: %1 with dc = %2p ===> %3",
+ [anOp,aDomain,mmList])
mmList.(0)
[sig,[pred,val]]:= modemap
#sig^=2 and ^val is ["elt",:.] => nil --what does the second clause do ????
@@ -1216,9 +1212,15 @@ compPretend: (%Form,%Mode,%Env) -> %Maybe %Triple
compPretend(["pretend",x,t],m,e) ==
e:= addDomain(t,e)
T:= comp(x,t,e) or comp(x,$EmptyMode,e) or return nil
- if T.mode=t then warningMessage:= ["pretend",t," -- should replace by @"]
+ t' := T.mode -- save this, in case we need to make suggestions
T:= [T.expr,t,T.env]
- T':= coerce(T,m) => (if warningMessage then stackWarning warningMessage; T')
+ T':= coerce(T,m) =>
+ -- If the `pretend' wasn't necessary, we should advise user to use
+ -- less crude way of selecting expressions of thr `right type'.
+ if t' = t then
+ stackWarning('"pretend %1p -- should replace by @",[t])
+ T'
+ nil
compColonInside(x,m,e,m') ==
e:= addDomain(m',e)
@@ -1226,10 +1228,10 @@ compColonInside(x,m,e,m') ==
if (m'':=T.mode)=m' then warningMessage:= [":",m'," -- should replace by @"]
T:= [T.expr,m',T.env]
T':= coerce(T,m) =>
- if warningMessage
- then stackWarning warningMessage
- else
- stackWarning [":",m'," -- should replace by pretend"]
+ if m'' = m' then
+ stackWarning('": %1p -- should replace by @",[m'])
+ else
+ stackWarning('" : %1p -- replace by pretend", [m'])
T'
compIs: (%Form,%Mode,%Env) -> %Maybe %Triple
@@ -1256,13 +1258,11 @@ coerce(T,m) ==
T':= coerceEasy(T,m) => T'
T':= coerceSubset(T,m) => T'
T':= coerceHard(T,m) => T'
+ -- if from from coerceable, this coerce was just a trial coercion
+ -- from compFormWithModemap to filter through the modemaps
T.expr = "$fromCoerceable$" or isSomeDomainVariable m => nil
- stackMessage fn(T.expr,T.mode,m) where
- -- if from from coerceable, this coerce was just a trial coercion
- -- from compFormWithModemap to filter through the modemaps
- fn(x,m1,m2) ==
- ["Cannot coerce","%b",x,"%d","%l"," of mode","%b",m1,"%d","%l",
- " to mode","%b",m2,"%d"]
+ stackMessage('"Cannot coerce %1b of mode %2pb to mode %3pb",
+ [T.expr,T.mode,m])
coerceEasy: (%Maybe %Triple,%Mode) -> %Maybe %Triple
@@ -1402,8 +1402,8 @@ autoCoerceByModemap([x,source,e],target) ==
(y:= get(x,"condition",e)) and (or/[u is ["case",., =target] for u in y])
=> [["call",genDeltaEntry ["autoCoerce", :fn],x],target,e]
x="$fromCoerceable$" => nil
- stackMessage ["cannot coerce: ",x,"%l"," of mode: ",source,"%l",
- " to: ",target," without a case statement"]
+ stackMessage('"cannot coerce %1b of mode %2pb to %3pb without a case statement",
+ [x,source,target])
[["call",genDeltaEntry ["autoCoerce", :fn],x],target,e]
--% Very old resolve
diff --git a/src/interp/define.boot b/src/interp/define.boot
index 673c45cd..29205ebd 100644
--- a/src/interp/define.boot
+++ b/src/interp/define.boot
@@ -929,8 +929,7 @@ hasSigInTargetCategory(argl,form,opsig,e) ==
0=c => (#(sig:= getSignatureFromMode(form,e))=#form => sig; nil)
1<c =>
sig:= first potentialSigList
- stackWarning ["signature of lhs not unique:",
- :bright formatSignature sig, "chosen"]
+ stackWarning('"signature of lhs not unique: %1bp chosen",[sig])
sig
nil --this branch will force all arguments to be declared
@@ -1326,9 +1325,12 @@ doIt(item,$predl) ==
for it1 in rest item repeat $e:= compSingleCapsuleItem(it1,$predl,$e)
--This will RPLAC as appropriate
isDomainForm(item,$e) =>
- -- convert naked top level domains to import
+ -- convert naked top level domains to import.
+ -- Note: The apparent useless destructing of `item' below is necessary
+ -- because it is subject to RPLACA/RPLACD, which would create
+ -- a cycle otherwise.
u:= ["import", [first item,:rest item]]
- stackWarning ["Use: import ", [first item,:rest item]]
+ stackWarning('"Use: import %1p",[[first item,:rest item]])
RPLACA(item,first u)
RPLACD(item,rest u)
doIt(item,$predl)
diff --git a/src/interp/format.boot b/src/interp/format.boot
index c807bffc..64d0ee28 100644
--- a/src/interp/format.boot
+++ b/src/interp/format.boot
@@ -427,7 +427,7 @@ form2String1 u ==
["[",:(atom argl' => [argl']; argl'),"]"]
op = "SIGNATURE" =>
[operation,sig] := argl
- concat(operation,": ",formatSignature sig)
+ concat(operation,'": ",formatSignature sig)
op = 'COLLECT => formCollect2String argl
op = 'construct =>
concat(lbrkSch(),
@@ -438,7 +438,7 @@ form2String1 u ==
argl := rest argl
(null argl) or null (first argl) => [lo, '".."]
[lo, '"..", form2String1 first argl]
- isBinaryInfix op => fortexp0 [op,:argl]
+ isBinaryInfix op => outputTran [op,:argl]
-- COMPILED_-FUNCTION_-P(op) => form2String1 coerceMap2E(u1,NIL)
application2String(op,[form2String1 x for x in argl], u1)
diff --git a/src/interp/functor.boot b/src/interp/functor.boot
index 4d42c2ed..e955078a 100644
--- a/src/interp/functor.boot
+++ b/src/interp/functor.boot
@@ -653,7 +653,7 @@ DescendCode(code,flag,viewAssoc,EnvToPass) ==
code is ['SETELT,:.] => code -- can be generated by doItIf
code is ['QSETREFV,:.] => code -- can be generated by doItIf
code is ["setShellEntry",:.] => code -- can be generated by doItIf
- stackWarning ['"unknown Functor code ",code]
+ stackWarning('"unknown Functor code: %1 ",[code])
code
ConstantCreator u ==
diff --git a/src/interp/i-analy.boot b/src/interp/i-analy.boot
index ea19ccda..6dbd19fe 100644
--- a/src/interp/i-analy.boot
+++ b/src/interp/i-analy.boot
@@ -47,6 +47,8 @@ $multivariateDomains ==
HomogeneousDistributedMultivariatePolynomial
GeneralDistributedMultivariatePolynomial)
+--%
+$inRetract := false
--% Interpreter Analysis Functions
diff --git a/src/interp/i-output.boot b/src/interp/i-output.boot
index e79da786..22c3fe69 100644
--- a/src/interp/i-output.boot
+++ b/src/interp/i-output.boot
@@ -226,7 +226,7 @@ lbrkSch() == PNAME specialChar 'lbrk
quadSch() == PNAME specialChar 'quad
isBinaryInfix x ==
- x in '(_= _+ _- _* _/ _*_* _^ "=" "+" "-" "*" "/" "**" "^")
+ member(x, '(_= _+ _- _* _/ _*_* _^ "=" "+" "-" "*" "/" "**" "^"))
stringApp([.,u],x,y,d) ==
appChar(STRCONC($DoubleQuote,atom2String u,$DoubleQuote),x,y,d)
diff --git a/src/interp/i-toplev.boot b/src/interp/i-toplev.boot
index 686531f4..c8f4f9d0 100644
--- a/src/interp/i-toplev.boot
+++ b/src/interp/i-toplev.boot
@@ -75,7 +75,6 @@ spadpo() ==
start(:l) ==
-- The function start begins the interpreter process, reading in
-- the profile and printing start-up messages.
- $PrintCompilerMessageIfTrue: local
$inLispVM : local := nil
if $displayStartMsgs then sayKeyedMsg("S2IZ0053",['"interpreter"])
initializeTimedNames($interpreterTimedNames,$interpreterTimedClasses)
diff --git a/src/interp/info.boot b/src/interp/info.boot
index 8f8cd290..e71e1218 100644
--- a/src/interp/info.boot
+++ b/src/interp/info.boot
@@ -223,7 +223,7 @@ actOnInfo(u,$e) ==
$e
u is ["ATTRIBUTE",name,att] =>
[vval,vmode,venv]:= GetValue name
- SAY("augmenting ",name,": ",u)
+ compilerMessage('"augmenting %1: %2p", [name,["ATTRIBUTE",att]])
key:= if CONTAINED("$",vmode) then "domain" else name
cat:= ["CATEGORY",key,["ATTRIBUTE",att]]
$e:= put(name,"value",[vval,mkJoin(cat,vmode),venv],$e)
@@ -236,7 +236,8 @@ actOnInfo(u,$e) ==
['ELT,name,substitute('$,name,modemap)]
$e:= addModemap(operator,name,modemap,true,implem,$e)
[vval,vmode,venv]:= GetValue name
- SAY("augmenting ",name,": ",u)
+ compilerMessage('"augmenting %1: %2p",
+ [name,["SIGNATURE",operator,modemap]])
key:= if CONTAINED("$",vmode) then "domain" else name
cat:= ["CATEGORY",key,["SIGNATURE",operator,modemap]]
$e:= put(name,"value",[vval,mkJoin(cat,vmode),venv],$e)
@@ -268,7 +269,7 @@ actOnInfo(u,$e) ==
genDomainView(viewName,name,cat,"HasCategory")
if not MEMQ(viewName,$functorLocalParameters) then
$functorLocalParameters:=[:$functorLocalParameters,viewName]
- SAY("augmenting ",name,": ",cat)
+ compilerMessage('"augmenting %1: %2p", [name,cat])
$e:= put(name,"value",[vval,mkJoin(cat,vmode),venv],$e)
SAY("extension of ",vval," to ",cat," ignored")
$e
diff --git a/src/interp/int-top.boot b/src/interp/int-top.boot
index 055074ca..d1386a70 100644
--- a/src/interp/int-top.boot
+++ b/src/interp/int-top.boot
@@ -75,7 +75,6 @@ ncSetCurrentLine l ==
spad() ==
-- starts the interpreter but does not read in profiles, etc.
- $PrintCompilerMessageIfTrue: local
$inLispVM : local := nil
setOutputAlgebra "%initialize%"
runspad()
diff --git a/src/interp/iterator.boot b/src/interp/iterator.boot
index 52642669..70a52f6d 100644
--- a/src/interp/iterator.boot
+++ b/src/interp/iterator.boot
@@ -153,7 +153,7 @@ compIterator(it,e) ==
$formalArgList:= [x,:$formalArgList]
[mOver,mUnder]:=
modeIsAggregateOf("List",m,e) or return
- stackMessage ["mode: ",m," must be a list of some mode"]
+ stackMessage('"mode: %1pb must be a list of some mode",[m])
if null get(x,"mode",e) then [.,.,e]:=
compMakeDeclaration([":",x,mUnder],$EmptyMode,e) or return nil
e:= put(x,"value",[genSomeVariable(),mUnder,e],e)
@@ -164,7 +164,7 @@ compIterator(it,e) ==
[y',m,e]:= comp(y,$EmptyMode,e) or return nil
[mOver,mUnder]:=
modeIsAggregateOf("List",m,e) or return
- stackMessage ["mode: ",m," must be a list of other modes"]
+ stackMessage('"mode: %1pb must be a list of other modes",[m])
if null get(x,"mode",e) then [.,.,e]:=
compMakeDeclaration([":",x,m],$EmptyMode,e) or return nil
e:= put(x,"value",[genSomeVariable(),m,e],e)
@@ -191,14 +191,14 @@ compIterator(it,e) ==
[["ISTEP",index,start'.expr,inc'.expr,:optFinal],e]
[start,.,e]:=
comp(start,$Integer,e) or return
- stackMessage ["start value of index: ",start," must be an integer"]
+ stackMessage('"start value of index: %1b must be an integer",[start])
[inc,.,e]:=
comp(inc,$Integer,e) or return
- stackMessage ["index increment:",inc," must be an integer"]
+ stackMessage('"index increment: %1b must be an integer",[inc])
if optFinal is [final] then
[final,.,e]:=
comp(final,$Integer,e) or return
- stackMessage ["final value of index: ",final," must be an integer"]
+ stackMessage('"final value of index: %1b must be an integer",[final])
optFinal:= [final]
indexmode:=
comp(CADDR it,$NonNegativeInteger,e) => $NonNegativeInteger
@@ -210,13 +210,13 @@ compIterator(it,e) ==
it is ["WHILE",p] =>
[p',m,e]:=
comp(p,$Boolean,e) or return
- stackMessage ["WHILE operand: ",p," is not Boolean valued"]
+ stackMessage('"WHILE operand: %1 is not Boolean valued",[p])
[["WHILE",p'],e]
it is ["UNTIL",p] => ($until:= p; ['$until,e])
it is ["|",x] =>
u:=
comp(x,$Boolean,e) or return
- stackMessage ["SUCHTHAT operand: ",x," is not Boolean value"]
+ stackMessage('"SUCHTHAT operand: %1b is not Boolean value",[x])
[["|",u.expr],u.env]
nil
@@ -274,13 +274,14 @@ compIteratorV(it,e) ==
[["ISTEP",index,start'.expr,inc'.expr,final'.expr],e]
[start,.,e]:=
comp(start,$Integer,e) or return
- stackMessage ["start value of index: ",start," is not an integer"]
+ stackMessage('"start value of index: %1b is not an integer",[start])
[inc,.,e]:=
comp(inc,$NonNegativeInteger,e) or return
- stackMessage ["index increment: ",inc," must be a non-negative integer"]
+ stackMessage('"index increment: %1b must be a non-negative integer",
+ [inc])
[final,.,e]:=
comp(final,$Integer,e) or return
- stackMessage ["final value of index: ",final," is not an integer"]
+ stackMessage('"final value of index: %1b is not an integer",[final])
indexmode:=
comp(CADDR it,$NonNegativeInteger,e) => $NonNegativeInteger
$Integer
diff --git a/src/interp/lisplib.boot b/src/interp/lisplib.boot
index 286eb3eb..74c00370 100644
--- a/src/interp/lisplib.boot
+++ b/src/interp/lisplib.boot
@@ -646,7 +646,7 @@ augModemapsFromDomain1(name,functorForm,e) ==
["Mapping",categoryForm,:functArgTypes]:= mappingForm
catform:= substituteCategoryArguments(rest functorForm,categoryForm)
augModemapsFromCategory(name,name,functorForm,catform,e)
- stackMessage [functorForm," is an unknown mode"]
+ stackMessage('"%1pb is an unknown mode",[functorForm])
e
getSlotFromCategoryForm ([op,:argl],index) ==
diff --git a/src/interp/modemap.boot b/src/interp/modemap.boot
index f941c3aa..97f29a33 100644
--- a/src/interp/modemap.boot
+++ b/src/interp/modemap.boot
@@ -86,8 +86,8 @@ getUniqueSignature(form,e) ==
getUniqueModemap(op,numOfArgs,e) ==
1=#(mml:= getModemapList(op,numOfArgs,e)) => first mml
1<#mml =>
- stackWarning [numOfArgs,'" argument form of: ",op,
- '" has more than one modemap"]
+ stackWarning('"%1 argument form of %2b has more than one modemap",
+ [numOfArgs,op])
first mml
nil
@@ -324,7 +324,7 @@ getOperationAlist(name,functorForm,form) ==
$insideFunctorIfTrue and name="$" =>
($domainShell => $domainShell.(1); systemError '"$ has no shell now")
T:= compMakeCategoryObject(form,$e) => ([.,.,$e]:= T; T.expr.(1))
- stackMessage ["not a category form: ",form]
+ stackMessage('"not a category form: %1bp",[form])
substNames(domainName,viewName,functorForm,opalist) ==
functorForm := SUBSTQ("$$","$", functorForm)
diff --git a/src/interp/msgdb.boot b/src/interp/msgdb.boot
index 5af024b8..3833651c 100644
--- a/src/interp/msgdb.boot
+++ b/src/interp/msgdb.boot
@@ -296,10 +296,11 @@ operationLink name ==
escapeSpecialChars STRINGIMAGE name)
----------------------------------------
+buildMessage(msg, args) ==
+ substituteSegmentedMsg(segmentKeyedMsg msg,args)
+
sayPatternMsg(msg,args) ==
- msg := segmentKeyedMsg msg
- msg := substituteSegmentedMsg(msg,args)
- sayMSG flowSegmentedMsg(msg,$LINELENGTH,3)
+ sayMSG flowSegmentedMsg(buildMessage(msg, args),$LINELENGTH,3)
throwPatternMsg(key,args) ==
sayMSG '" "
diff --git a/src/interp/nrunopt.boot b/src/interp/nrunopt.boot
index ade21c0f..19ff1932 100644
--- a/src/interp/nrunopt.boot
+++ b/src/interp/nrunopt.boot
@@ -798,11 +798,12 @@ NRTgetLookupFunction(domform,exCategory,addForm) ==
extends := NRTextendsCategory1(domform,exCategory,getExportCategory addForm)
if null extends then
[u,msg,:v] := $why
- sayBrightly '"--------------non extending category----------------------"
- sayBrightlyNT ['"..",:bright form2String domform,"of cat "]
- PRINT u
- sayBrightlyNT bright msg
- if v then PRINT CAR v else TERPRI()
+ SAY '"--------------non extending category----------------------"
+ compilerMessage('"%1p of category %2p", [domform,u])
+ if v ^= nil then
+ compilerMessage('"%1b %2p",[msg,first v])
+ else
+ compilerMessage('"%1b",[msg])
extends => 'lookupIncomplete
'lookupComplete
diff --git a/src/interp/package.boot b/src/interp/package.boot
index 454d6cca..bc38f77a 100644
--- a/src/interp/package.boot
+++ b/src/interp/package.boot
@@ -176,7 +176,7 @@ PackageDescendCode(code,flag,viewAssoc) ==
code is ["SETELT",:.] => code
code is ["QSETREFV",:.] => code
code is ["setShellEntry",:.] => code
- stackWarning ["unknown Package code ",code]
+ stackWarning('"unknown Package code: %1 ",[code])
code
mkOperatorEntry(domainOrPackage,opSig is [op,sig,:flag],pred,count) ==
diff --git a/src/interp/sys-driver.boot b/src/interp/sys-driver.boot
index 4b38b5cd..697928e5 100644
--- a/src/interp/sys-driver.boot
+++ b/src/interp/sys-driver.boot
@@ -52,7 +52,7 @@ $SpadServer := false
++ code generation, etc.
$verbose := true
-$PrintCompilerMessageIfTrue := $verbose
+$PrintCompilerMessageIfTrue := true
++
$options := []
@@ -197,6 +197,7 @@ executeSpadScript(progname,options,file) ==
$verbose := false
$options := [["quiet"]]
$ProcessInteractiveValue := true
+ $PrintCompilerMessageIfTrue := $verbose
CATCH($intCoerceFailure,
CATCH($intSpadReader,read [file]))
coreQuit (errorCount()> 0 => 1; 0)
@@ -221,6 +222,7 @@ compileSpadLibrary(progname,options,file) ==
ECHO_-META : fluid := false
$verbose := false
$ProcessInteractiveValue := true
+ $PrintCompilerMessageIfTrue := $verbose
CATCH($intTopLevel,
CATCH("SpadCompileItem",
CATCH($intSpadReader,compiler [file])))