diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/boot/strap/tokens.clisp | 3 | ||||
-rw-r--r-- | src/interp/as.boot | 6 | ||||
-rw-r--r-- | src/interp/br-con.boot | 12 | ||||
-rw-r--r-- | src/interp/br-op1.boot | 2 | ||||
-rw-r--r-- | src/interp/br-op2.boot | 6 | ||||
-rw-r--r-- | src/interp/br-saturn.boot | 2 | ||||
-rw-r--r-- | src/interp/br-util.boot | 4 | ||||
-rw-r--r-- | src/interp/c-doc.boot | 2 | ||||
-rw-r--r-- | src/interp/c-util.boot | 14 | ||||
-rw-r--r-- | src/interp/clammed.boot | 8 | ||||
-rw-r--r-- | src/interp/database.boot | 2 | ||||
-rw-r--r-- | src/interp/define.boot | 10 | ||||
-rw-r--r-- | src/interp/functor.boot | 6 | ||||
-rw-r--r-- | src/interp/guess.boot | 4 | ||||
-rw-r--r-- | src/interp/i-coerce.boot | 10 | ||||
-rw-r--r-- | src/interp/i-funsel.boot | 6 | ||||
-rw-r--r-- | src/interp/i-map.boot | 8 | ||||
-rw-r--r-- | src/interp/i-resolv.boot | 14 | ||||
-rw-r--r-- | src/interp/i-spec1.boot | 2 | ||||
-rw-r--r-- | src/interp/i-spec2.boot | 2 | ||||
-rw-r--r-- | src/interp/i-syscmd.boot | 18 | ||||
-rw-r--r-- | src/interp/mark.boot | 12 | ||||
-rw-r--r-- | src/interp/nruncomp.boot | 8 | ||||
-rw-r--r-- | src/interp/nrunopt.boot | 2 | ||||
-rw-r--r-- | src/interp/postpar.boot | 2 | ||||
-rw-r--r-- | src/interp/showimp.boot | 2 | ||||
-rw-r--r-- | src/interp/topics.boot | 4 | ||||
-rw-r--r-- | src/interp/wi2.boot | 2 |
28 files changed, 86 insertions, 87 deletions
diff --git a/src/boot/strap/tokens.clisp b/src/boot/strap/tokens.clisp index c288dd05..ba6fe1e6 100644 --- a/src/boot/strap/tokens.clisp +++ b/src/boot/strap/tokens.clisp @@ -201,7 +201,6 @@ (EVAL-WHEN (:EXECUTE :LOAD-TOPLEVEL) (LET ((|bfVar#9| (LIST (LIST '|and| 'AND) (LIST '|append| 'APPEND) (LIST '|apply| 'APPLY) (LIST '|atom| 'ATOM) - (LIST '|car| 'CAR) (LIST '|cdr| 'CDR) (LIST '|cons?| 'CONSP) (LIST '|copy| 'COPY) (LIST '|croak| 'CROAK) (LIST '|drop| 'DROP) (LIST '|exit| 'EXIT) (LIST '|false| 'NIL) @@ -215,7 +214,7 @@ (LIST '|not| 'NOT) (LIST '|nreverse| 'NREVERSE) (LIST '|null| 'NULL) (LIST '|or| 'OR) - (LIST '|otherwise| 'T) (LIST 'PAIRP 'CONSP) + (LIST '|otherwise| 'T) (LIST '|removeDuplicates| 'REMDUP) (LIST '|rest| 'CDR) (LIST '|reverse| 'REVERSE) (LIST '|second| 'CADR) diff --git a/src/interp/as.boot b/src/interp/as.boot index beca8669..1473192c 100644 --- a/src/interp/as.boot +++ b/src/interp/as.boot @@ -72,7 +72,7 @@ astran asyFile == $mmAlist : local := [[con,:asyConstructorModemap con] for con in conlist] $docAlist : local := - [[con,:REMDUP asyDocumentation con] for con in conlist] + [[con,:removeDuplicates asyDocumentation con] for con in conlist] $parentsHash : local := MAKE_-HASH_-TABLE() --$childrenHash: local := MAKE_-HASH_-TABLE() for con in conlist repeat @@ -151,7 +151,7 @@ asMakeAlist con == opAlist := SUBLISLIS($FormalMapVariableList,KDR form,CDDR alists) ancestorAlist:= SUBLISLIS($FormalMapVariableList,KDR form,first alists) catAttrs := [[x,:true] for x in getAttributesFromCATEGORY $constructorCategory] - attributeAlist := REMDUP [:second alists,:catAttrs] + attributeAlist := removeDuplicates [:second alists,:catAttrs] documentation := SUBLISLIS($FormalMapVariableList,KDR form,LASSOC(con,$docAlist)) filestring := strconc(PATHNAME_-NAME STRINGIMAGE filename,'".as") @@ -375,7 +375,7 @@ asyMakeOperationAlist(con,proplist, key) == pred => [sig,nil,asyPredTran pred] [sig] HPUT(ht,id,[entry,:HGET(ht,id)]) - opalist := [[op,:REMDUP HGET(ht,op)] for op in HKEYS ht] + opalist := [[op,:removeDuplicates HGET(ht,op)] for op in HKEYS ht] --HPUT($opHash,con,[ancestorAlist,attributeAlist,:opalist]) HPUT($opHash,con,[ancestorAlist,nil,:opalist]) diff --git a/src/interp/br-con.boot b/src/interp/br-con.boot index 32e0c9df..eb85c055 100644 --- a/src/interp/br-con.boot +++ b/src/interp/br-con.boot @@ -959,7 +959,7 @@ conPageChoose conname == dbShowCons1(nil,cAlist,'names) dbShowCons1(htPage,cAlist,key) == - conlist := REMDUP [item for x in cAlist | pred] where + conlist := removeDuplicates [item for x in cAlist | pred] where pred() == item := first x $exposedOnlyIfTrue => isExposedConstructor opOf item @@ -991,12 +991,12 @@ dbShowCons1(htPage,cAlist,key) == flist := [y for con in conlist | y := (fn := getConstructorSourceFileFromDB con)] - bcUnixTable(listSort(function GLESSEQP,REMDUP flist)) + bcUnixTable(listSort(function GLESSEQP,removeDuplicates flist)) key = 'documentation => dbShowConsDoc(page,conlist) if $exposedOnlyIfTrue then cAlist := [x for x in cAlist | isExposedConstructor opOf first x] key = 'conditions => dbShowConditions(page,cAlist,kind) - key = 'parameters => bcConTable REMDUP ASSOCLEFT cAlist + key = 'parameters => bcConTable removeDuplicates ASSOCLEFT cAlist key = 'kinds => dbShowConsKinds cAlist dbConsExposureMessage() htSayStandard("\endscroll ") @@ -1033,7 +1033,7 @@ dbConsExposureMessage() == -- htSay '" " -- htSay (c > 1 => pluralize kind; kind) -- htSay '":}" --- bcConTable REMDUP [CAAR y for y in x] +-- bcConTable removeDuplicates [CAAR y for y in x] -- htEndMenu(2) -- htSay '"\indent{0}" @@ -1046,7 +1046,7 @@ dbShowConsDoc(htPage,conlist) == cAlist := htpProperty(htPage,'cAlist) --the following code is necessary to skip over duplicates on cAlist index := 0 - for x in REMDUP conlist repeat + for x in removeDuplicates conlist repeat -- for x in conlist repeat dbShowConsDoc1(htPage,getConstructorForm x,i) where i() == while CAAAR cAlist ~= x repeat @@ -1102,7 +1102,7 @@ dbConsHeading(htPage,conlist,view,kind) == place := htPage => htpProperty(htPage,'domname) or htpProperty(htPage,'conform) nil - count := #(REMDUP conlist) + count := #(removeDuplicates conlist) -- count := #conlist thing = '"benefactor" => [STRINGIMAGE count,'" Constructors Used by ",form2HtString(place,nil,true)] diff --git a/src/interp/br-op1.boot b/src/interp/br-op1.boot index 943b7588..b75ac711 100644 --- a/src/interp/br-op1.boot +++ b/src/interp/br-op1.boot @@ -935,7 +935,7 @@ getDomainOpTable(dom,fromIfTrue,:options) == conname := first domname abb := getConstructorAbbreviation conname opAlist := getOperationAlistFromLisplib conname - "append"/[REMDUP [[op1,:fn] for [sig,slot,pred,key,:.] in u + "append"/[removeDuplicates [[op1,:fn] for [sig,slot,pred,key,:.] in u | key ~= 'Subsumed and ((null ops and (op1 := op)) or (op1 := memq(op,ops)))] for [op,:u] in opAlist] where memq(op,ops) == --dirty trick to get 0 and 1 instead of Zero and One diff --git a/src/interp/br-op2.boot b/src/interp/br-op2.boot index 61e76d98..de06e99a 100644 --- a/src/interp/br-op2.boot +++ b/src/interp/br-op2.boot @@ -281,7 +281,7 @@ whoUsesOperation(htPage,which,key) == --see dbPresentOps htSay('"Users of {\em ",ops,'": ") bcConform ['Mapping,:sublisFormal(conargs,sig)] htSay('"}\newline") - bcConTable listSort(function GLESSEQP,REMDUP namelist) + bcConTable listSort(function GLESSEQP,removeDuplicates namelist) noOneUses := SETDIFFERENCE(opl,usedList) if #noOneUses > 0 then htSay('"No constructor uses the ") @@ -298,8 +298,8 @@ whoUsesOperation(htPage,which,key) == --see dbPresentOps htShowPageNoScroll() whoUses(opSigList,conform) == - opList := REMDUP ASSOCLEFT opSigList - numOfArgsList := REMDUP [-1 + #sig for [.,:sig] in opSigList] + opList := removeDuplicates ASSOCLEFT opSigList + numOfArgsList := removeDuplicates [-1 + #sig for [.,:sig] in opSigList] acc := nil $conname : local := first conform domList := getUsersOfConstructor $conname diff --git a/src/interp/br-saturn.boot b/src/interp/br-saturn.boot index 6dd77c9e..7a968bfb 100644 --- a/src/interp/br-saturn.boot +++ b/src/interp/br-saturn.boot @@ -905,7 +905,7 @@ dbShowConsKinds cAlist == htSay(c > 1 => pluralize kind; kind) htSay '":}" htSaySaturn '"\\" - bcConTable REMDUP [CAAR y for y in x] + bcConTable removeDuplicates [CAAR y for y in x] htEndMenu 'description htSayStandard '"\indent{0}" diff --git a/src/interp/br-util.boot b/src/interp/br-util.boot index 0003cf3c..6f926ab6 100644 --- a/src/interp/br-util.boot +++ b/src/interp/br-util.boot @@ -388,7 +388,7 @@ bcOpTable(u,fn) == bcNameConTable u == $bcMultipleNames: local := (#u ~= 1) - bcConTable REMDUP u + bcConTable removeDuplicates u -- bcConTable u bcConTable u == @@ -406,7 +406,7 @@ bcConTable u == bcAbbTable u == htBeginTable() firstTime := true - for x in REMDUP u repeat --allow x to be NIL meaning "no abbreviation" + for x in removeDuplicates u repeat --allow x to be NIL meaning "no abbreviation" -- for x in u repeat --allow x to be NIL meaning "no abbreviation" if firstTime then firstTime := false else htSaySaturn '"&" diff --git a/src/interp/c-doc.boot b/src/interp/c-doc.boot index 2ef2bca1..535c5e31 100644 --- a/src/interp/c-doc.boot +++ b/src/interp/c-doc.boot @@ -181,7 +181,7 @@ finalizeDocumentation() == macroExpand(x,e)) hn u == -- ((op,sig,doc), ...) --> ((op ((sig doc) ...)) ...) - opList := REMDUP ASSOCLEFT u + opList := removeDuplicates ASSOCLEFT u [[op,:[[sig,doc] for [op1,sig,doc] in u | op = op1]] for op in opList] --======================================================================= diff --git a/src/interp/c-util.boot b/src/interp/c-util.boot index bdf55366..7463b2fc 100644 --- a/src/interp/c-util.boot +++ b/src/interp/c-util.boot @@ -190,7 +190,7 @@ DOWN() == down() down() == displayComp ($level:= $level+1) displaySemanticErrors() == - n:= #($semanticErrorStack:= REMDUP $semanticErrorStack) + n:= #($semanticErrorStack:= removeDuplicates $semanticErrorStack) n=0 => nil l:= nreverse $semanticErrorStack $semanticErrorStack:= nil @@ -204,7 +204,7 @@ displaySemanticError(l,stream) == sayBrightly(['" [",i,'"] ",:first x],stream) displayWarnings() == - n:= #($warningStack:= REMDUP $warningStack) + n:= #($warningStack:= removeDuplicates $warningStack) n=0 => nil sayBrightly bright '" Warnings:" l := nreverse $warningStack @@ -296,8 +296,8 @@ intersectionContour(c,c') == $var: local computeIntersection(c,c') where computeIntersection(c,c') == - varlist:= REMDUP ASSOCLEFT c - varlist':= REMDUP ASSOCLEFT c' + varlist:= removeDuplicates ASSOCLEFT c + varlist':= removeDuplicates ASSOCLEFT c' interVars:= intersection(varlist,varlist') unionVars:= union(varlist,varlist') diffVars:= setDifference(unionVars,interVars) @@ -714,7 +714,7 @@ genSomeVariable() == listOfIdentifiersIn x == IDENTP x => [x] - x is [op,:l] => REMDUP ("append"/[listOfIdentifiersIn y for y in l]) + x is [op,:l] => removeDuplicates ("append"/[listOfIdentifiersIn y for y in l]) nil mapInto(x,fn) == [FUNCALL(fn,y) for y in x] @@ -1556,8 +1556,8 @@ transformToBackendCode x == (atom stmt or first stmt = "SEQ" or not CONTAINED("EXIT",stmt)) => body [simplifySEQ ["SEQ",:body]] - $FluidVars := REMDUP nreverse $FluidVars - $LocalVars := S_-(S_-(REMDUP nreverse $LocalVars,$FluidVars), + $FluidVars := removeDuplicates nreverse $FluidVars + $LocalVars := S_-(S_-(removeDuplicates nreverse $LocalVars,$FluidVars), LISTOFATOMS second x) lvars := [:$FluidVars,:$LocalVars] fluids := S_+($FluidVars,$SpecialVars) diff --git a/src/interp/clammed.boot b/src/interp/clammed.boot index 5462d0ee..18632214 100644 --- a/src/interp/clammed.boot +++ b/src/interp/clammed.boot @@ -82,7 +82,7 @@ isValidType form == and/[isValidType type for [:.,type] in selectors] form is ['Enumeration,:args] => null (and/[IDENTP x for x in args]) => false - ((# args) = (# REMDUP args)) => true + ((# args) = (# removeDuplicates args)) => true false form is ['Mapping,:mapargs] => null mapargs => NIL @@ -92,7 +92,7 @@ isValidType form == args and first args is [":",:.] => and/[isValidType type for [:.,type] in args] null (and/[isValidType arg for arg in args]) => NIL - ((# args) = (# REMDUP args)) => true + ((# args) = (# removeDuplicates args)) => true sayKeyedMsg("S2IR0005",[form]) NIL @@ -199,12 +199,12 @@ isLegitimateMode(t,hasPolyMode,polyVarList) == -- check for tagged union ml and first ml is [":",:.] => isLegitimateRecordOrTaggedUnion ml null (and/[isLegitimateMode(m,nil,nil) for m in ml]) => false - ((# ml) = (# REMDUP ml)) => true + ((# ml) = (# removeDuplicates ml)) => true false t is ['Record,:r] => isLegitimateRecordOrTaggedUnion r t is ['Enumeration,:r] => null (and/[IDENTP x for x in r]) => false - ((# r) = (# REMDUP r)) => true + ((# r) = (# removeDuplicates r)) => true false false diff --git a/src/interp/database.boot b/src/interp/database.boot index 92938d81..6c7c54c4 100644 --- a/src/interp/database.boot +++ b/src/interp/database.boot @@ -607,7 +607,7 @@ mkAlistOfExplicitCategoryOps target == op is [a] => a keyedSystemError("S2GE0016", ['"mkAlistOfExplicitCategoryOps",'"bad signature"]) - opList:= REMDUP ASSOCLEFT u + opList:= removeDuplicates ASSOCLEFT u [[x,:fn(x,u)] for x in opList] where fn(op,u) == u is [[a,:b],:c] => (a=op => [b,:fn(op,c)]; fn(op,c)) diff --git a/src/interp/define.boot b/src/interp/define.boot index 9c799c1f..8bcdfef1 100644 --- a/src/interp/define.boot +++ b/src/interp/define.boot @@ -568,7 +568,7 @@ compMakeCategoryObject(c,$e) == predicatesFromAttributes: %List -> %List predicatesFromAttributes attrList == - REMDUP [second x for x in attrList] + removeDuplicates [second x for x in attrList] compDefineFunctor(df,m,e,prefix,fal) == @@ -941,7 +941,7 @@ orderByDependency(vl,dl) == dl':= [setDifference(d,newl) for x in vl for d in dl | member(x,vl')] vl:= vl' dl:= dl' - REMDUP nreverse orderedVarList --ordered so ith is indep. of jth if i < j + removeDuplicates nreverse orderedVarList --ordered so ith is indep. of jth if i < j compDefineCapsuleFunction(df is ['DEF,form,signature,specialCases,body], m,$e,$prefix,$formalArgList) == @@ -1057,7 +1057,7 @@ hasSigInTargetCategory(argl,form,opsig,e) == for x in argl for i in 0..] --each element is a declared mode for the variable or nil if none exists potentialSigList:= - REMDUP + removeDuplicates [sig for sig in sigs | fn(sig,opsig,mList)] where fn(sig,opsig,mList) == @@ -1102,7 +1102,7 @@ checkAndDeclare(argl,form,sig,e) == getSignature(op,argModeList,$e) == 1=# (sigl:= - REMDUP + removeDuplicates [sig for [[dc,:sig],[pred,:.]] in (mmList:= get(op,'modemap,$e)) | dc='_$ and rest sig=argModeList and knownInfo pred]) => first sigl @@ -1611,7 +1611,7 @@ mkExplicitCategoryFunction(domainOrPackage,sigList,atList) == ("union"/[fn sig for ["QUOTE",[[.,sig,:.],:.]] in sigList]) where fn sig == [D for D in sig | mustInstantiate D] parameters:= - REMDUP + removeDuplicates ("append"/ [[x for x in sig | IDENTP x and x~='_$] for ["QUOTE",[[.,sig,:.],:.]] in sigList]) diff --git a/src/interp/functor.boot b/src/interp/functor.boot index c0bafcd1..4e747b44 100644 --- a/src/interp/functor.boot +++ b/src/interp/functor.boot @@ -688,7 +688,7 @@ LookUpSigSlots(sig,siglist) == if $insideCategoryPackageIfTrue then sig := substitute('$,second($functorForm),sig) siglist := $lisplibOperationAlist - REMDUP [implem for u in siglist | SigSlotsMatch(sig,first u,implem:=third u) + removeDuplicates [implem for u in siglist | SigSlotsMatch(sig,first u,implem:=third u) and KADDR implem] SigSlotsMatch(sig,pattern,implem) == @@ -821,7 +821,7 @@ ICformat u == atom u => u u is ["has",:.] => compHasFormat u u is ['AND,:l] or u is ['and,:l] => - l:= REMDUP [ICformat v for [v,:l'] in tails l | not member(v,l')] + l:= removeDuplicates [ICformat v for [v,:l'] in tails l | not member(v,l')] -- we could have duplicates after, even if not before LENGTH l=1 => first l l1:= first l @@ -831,7 +831,7 @@ ICformat u == u is ['OR,:l] => (l:= ORreduce l) LENGTH l=1 => ICformat first l - l:= ORreduce REMDUP [ICformat u for u in l] + l:= ORreduce removeDuplicates [ICformat u for u in l] --causes multiple ANDs to be squashed, etc. -- and duplicates that have been built up by tidying (l:= Hasreduce l) where diff --git a/src/interp/guess.boot b/src/interp/guess.boot index 43113eea..21014170 100644 --- a/src/interp/guess.boot +++ b/src/interp/guess.boot @@ -83,7 +83,7 @@ wordsOfString1(s,j) == nil wordKeys s == - REMDUP [UPCASE s.0,:fn(s,1,-1,MAXINDEX s,nil)] where fn(s,i,lastKeyIndex,n,acc) == + removeDuplicates [UPCASE s.0,:fn(s,1,-1,MAXINDEX s,nil)] where fn(s,i,lastKeyIndex,n,acc) == i > n => acc UPPER_-CASE_-P s.i => -- i = lastKeyIndex + 1 => fn(s,i + 1,i,n,[s.i,:rest acc]) @@ -125,7 +125,7 @@ findWords(word,table) == $totalWords $lastWords := nil -wordSort u == REMDUP listSort(function GLESSEQP,u) +wordSort u == removeDuplicates listSort(function GLESSEQP,u) more() == moreWords($lastWord,$lastTable) diff --git a/src/interp/i-coerce.boot b/src/interp/i-coerce.boot index a5842d89..823e6df4 100644 --- a/src/interp/i-coerce.boot +++ b/src/interp/i-coerce.boot @@ -154,7 +154,7 @@ retract2Specialization object == -- coerceInt(object,$Symbol) type is ['Polynomial,D] => val' is [ =1,x,:.] => - vl := REMDUP reverse varsInPoly val' + vl := removeDuplicates reverse varsInPoly val' 1 = #vl => coerceInt(object,['UnivariatePolynomial,x,D]) NIL val' is [ =0,:.] => coerceInt(object, D) @@ -655,8 +655,8 @@ canCoerceByFunction1(m1,m2,fun) == $reportBottomUpFlag:local:= NIL -- have to handle cases where we might have changed from RN to QF I -- make 2 lists of expanded and unexpanded types - l1 := REMDUP [m1,eqType m1] - l2 := REMDUP [m2,eqType m2] + l1 := removeDuplicates [m1,eqType m1] + l2 := removeDuplicates [m2,eqType m2] ans := NIL for t1 in l1 while not ans repeat for t2 in l2 while not ans repeat @@ -1208,11 +1208,11 @@ computeTTTranspositions(t1,t2) == p2' := MSORT p2 p2 = p2' => NIL -- if anything is repeated twice, leave - p2' ~= MSORT REMDUP p2' => NIL + p2' ~= MSORT removeDuplicates p2' => NIL -- create a list of permutations that transform the tower parts -- of t1 into the order they are in in t2 n1 := #tl1 - p2 := LIST2VEC compress(p2,0,# REMDUP tl1) where + p2 := LIST2VEC compress(p2,0,# removeDuplicates tl1) where compress(l,start,len) == start >= len => l member(start,l) => compress(l,start+1,len) diff --git a/src/interp/i-funsel.boot b/src/interp/i-funsel.boot index c7c9c11a..345b67f9 100644 --- a/src/interp/i-funsel.boot +++ b/src/interp/i-funsel.boot @@ -204,7 +204,7 @@ selectMms2(op,tar,args1,args2,$Coerce) == -- any Unions, Mapping or Records a' := nil - a := nreverse REMDUP a + a := nreverse removeDuplicates a for x in a repeat null x => 'iterate x = '(RationalRadicals) => a' := [$RationalNumber,:a'] @@ -220,7 +220,7 @@ selectMms2(op,tar,args1,args2,$Coerce) == x is ['FunctionCalled,name] => (xm := get(name,'mode,$e)) and not isPartialMode xm => a' := [xm,:a'] - a := append(a,REMDUP a') + a := append(a,removeDuplicates a') a := [x for x in a | cons?(x)] -- step 1. see if we have one without coercing @@ -1037,7 +1037,7 @@ selectMmsGen(op,tar,args1,args2) == else args := append(args1,args2) if tar then args := [tar,:args] -- for common aggregates, use under domain also - for a in REMDUP args repeat + for a in removeDuplicates args repeat a => atom a => nil fa := QCAR a diff --git a/src/interp/i-map.boot b/src/interp/i-map.boot index a93883cd..03c15c50 100644 --- a/src/interp/i-map.boot +++ b/src/interp/i-map.boot @@ -151,7 +151,7 @@ addDefMap(['DEF,lhs,mapsig,.,rhs],pred) == for parm in parameters repeat mkLocalVar($mapName,parm) userVariables2 := setDifference(userVariables1,findLocalVars(op,rhs)) userVariables3 := setDifference(userVariables2, parameters) - userVariables4 := REMDUP setDifference (userVariables3, [op]) + userVariables4 := removeDuplicates setDifference (userVariables3, [op]) --figure out the new dependencies for the new map (what it depends on) newDependencies := makeNewDependencies (op, userVariables4) @@ -235,7 +235,7 @@ getUserIdentifiersIn body == cons? op or not (GETL(op,'Nud) or GETL(op,'Led) or GETL(op,'up))=> NCONC(getUserIdentifiersIn op, argIdList) argIdList - REMDUP bodyIdList + removeDuplicates bodyIdList getUserIdentifiersInIterators itl == for x in itl repeat @@ -247,7 +247,7 @@ getUserIdentifiersInIterators itl == varList:= [:getUserIdentifiersIn a,:varList] keyedSystemError("S2GE0016",['"getUserIdentifiersInIterators", '"unknown iterator construct"]) - REMDUP varList + removeDuplicates varList getIteratorIds itl == for x in itl repeat @@ -1067,7 +1067,7 @@ listOfVariables pat == IDENTP pat => (pat='_. => nil ; [pat]) pat is ['_:,var] or pat is ['_=,var] => (var='_. => NIL ; [var]) - cons? pat => REMDUP [:listOfVariables p for p in pat] + cons? pat => removeDuplicates [:listOfVariables p for p in pat] nil getMapBody(op,mapDef) == diff --git a/src/interp/i-resolv.boot b/src/interp/i-resolv.boot index 0af2a733..afc8f07d 100644 --- a/src/interp/i-resolv.boot +++ b/src/interp/i-resolv.boot @@ -148,7 +148,7 @@ resolveTTUnion(t1 is ['Union,:doms],t2) == null (d' := resolveTT(d,t2)) => bad := true ud := [d',:ud] bad => NIL - ['Union,:REMDUP reverse ud] + ['Union,:removeDuplicates reverse ud] ud := nil bad := nil for d in doms2 while not bad repeat @@ -156,7 +156,7 @@ resolveTTUnion(t1 is ['Union,:doms],t2) == null (d' := resolveTTUnion(t1,d)) => bad := true ud := append(ud,rest d') bad => NIL - ['Union,:REMDUP ud] + ['Union,:removeDuplicates ud] resolveTTSpecial(t1,t2) == -- tries to resolve things that would otherwise get mangled in the @@ -413,7 +413,7 @@ getConditionalCategoryOfType(t,conditions,match) == if cons? t then t := first t t in '(Union Mapping Record) => NIL conCat := getConstructorCategoryFromDB t - REMDUP rest getConditionalCategoryOfType1(conCat,conditions,match,[NIL]) + removeDuplicates rest getConditionalCategoryOfType1(conCat,conditions,match,[NIL]) getConditionalCategoryOfType1(cat,conditions,match,seen) == cat is ['Join,:cs] or cat is ['CATEGORY,:cs] => @@ -522,7 +522,7 @@ resolveTMUnion(t, m is ['Union,:ums]) == isTaggedUnion m => resolveTMTaggedUnion(t,m) -- resolves t with a Union type t isnt ['Union,:uts] => - ums := REMDUP spliceTypeListForEmptyMode([t],ums) + ums := removeDuplicates spliceTypeListForEmptyMode([t],ums) ums' := nil success := nil for um in ums repeat @@ -532,14 +532,14 @@ resolveTMUnion(t, m is ['Union,:ums]) == ums' := [um',:ums'] ums' := [um,:ums'] -- remove any duplicate domains that might have been created - m' := ['Union,:REMDUP reverse ums'] + m' := ['Union,:removeDuplicates reverse ums'] success => null CONTAINED('_*_*,m') => m' t = $Integer => NIL resolveTM1($Integer,m') NIL -- t is actually a Union if we got here - ums := REMDUP spliceTypeListForEmptyMode(uts,ums) + ums := removeDuplicates spliceTypeListForEmptyMode(uts,ums) bad := nil doms := nil for ut in uts while not bad repeat @@ -547,7 +547,7 @@ resolveTMUnion(t, m is ['Union,:ums]) == doms := append(rest m',doms) bad := true bad => NIL - ['Union,:REMDUP doms] + ['Union,:removeDuplicates doms] resolveTMTaggedUnion(t, m is ['Union,:ums]) == NIL diff --git a/src/interp/i-spec1.boot b/src/interp/i-spec1.boot index 88a7675b..48cf90fa 100644 --- a/src/interp/i-spec1.boot +++ b/src/interp/i-spec1.boot @@ -536,7 +536,7 @@ upLoopIterSTEP(index,lower,step,upperList) == throwKeyedMsg("S2IS0007",['"upper"]) if utype then types := [utype, :types] else types := [stype, :types] - type := resolveTypeListAny REMDUP types + type := resolveTypeListAny removeDuplicates types put(index,'mode,type,$env) mkLocalVar('"the iterator expression",index) diff --git a/src/interp/i-spec2.boot b/src/interp/i-spec2.boot index 8a8a955e..e5c2bb15 100644 --- a/src/interp/i-spec2.boot +++ b/src/interp/i-spec2.boot @@ -405,7 +405,7 @@ compileIs(val,pattern) == pat is ["=",var] => vars:= [var,:vars] predCode:=["%LET",g:=GENSYM(),["isPatternMatch", getArgValue(val,computedMode val),MKQ removeConstruct pattern]] - for var in REMDUP vars repeat + for var in removeDuplicates vars repeat assignCode:=[["%LET",var,["CDR",["ASSQ",MKQ var,g]]],:assignCode] null $opIsIs => ["COND",[["EQ",predCode,MKQ "failed"],["SEQ",:assignCode,MKQ 'T]]] diff --git a/src/interp/i-syscmd.boot b/src/interp/i-syscmd.boot index e251c5e4..0c0df310 100644 --- a/src/interp/i-syscmd.boot +++ b/src/interp/i-syscmd.boot @@ -350,7 +350,7 @@ clearCmdParts(l is [opt,:vl]) == imacs := getInterpMacroNames() if vl='(all) then vl := ASSOCLEFT CAAR $InteractiveFrame - vl := REMDUP(append(vl, pmacs)) + vl := removeDuplicates(append(vl, pmacs)) $e : local := $InteractiveFrame for x in vl repeat clearDependencies(x,true) @@ -1050,7 +1050,7 @@ displayMacros names == macros := null names => append (imacs, pmacs) names - macros := REMDUP macros + macros := removeDuplicates macros null macros => sayBrightly '" There are no OpenAxiom macros." @@ -1080,7 +1080,7 @@ displayMacros names == NIL getParserMacroNames() == - REMDUP [first mac for mac in getParserMacros()] + removeDuplicates [first mac for mac in getParserMacros()] clearParserMacro(macro) == -- first see if it is one @@ -1150,7 +1150,7 @@ displayProperties(option,l) == [opt,:vl]:= (l or ['properties]) imacs := getInterpMacroNames() pmacs := getParserMacroNames() - macros := REMDUP append(imacs, pmacs) + macros := removeDuplicates append(imacs, pmacs) if vl is ['all] or null vl then vl := MSORT append(getWorkspaceNames(),macros) if $frameMessages then sayKeyedMsg("S2IZ0065",[$interpreterFrameName]) @@ -2500,7 +2500,7 @@ reportOpsFromUnitDirectly unitForm == isRecordOrUnion => sayBrightly '" Records and Unions have no attributes." sayBrightly '"" - attList:= REMDUP MSORT [x for [x,:.] in unit.2] + attList:= removeDuplicates MSORT [x for [x,:.] in unit.2] say2PerLine [formatAttribute x for x in attList] NIL opt = 'operations => @@ -2514,11 +2514,11 @@ reportOpsFromUnitDirectly unitForm == systemErrorHere ["reportOpsFromUnitDirectly",top] [funlist,.]:= FUNCALL(constructorFunction,"$",unitForm, $CategoryFrame) - sigList := REMDUP MSORT + sigList := removeDuplicates MSORT [[[a,b],true,slot c] for [a,b,c] in funlist] where slot c == (atom c => [c,0,1]; c) else - sigList:= REMDUP MSORT getOplistForConstructorForm unitForm + sigList:= removeDuplicates MSORT getOplistForConstructorForm unitForm say2PerLine [formatOperation(x,unit) for x in sigList] if $commentedOps ~= 0 then sayBrightly @@ -2560,7 +2560,7 @@ reportOpsFromLisplib(op,u) == opt = 'attributes => centerAndHighlight('"Attributes",$LINELENGTH,specialChar 'hbar) sayBrightly '"" - attList:= REMDUP MSORT [x for [x,:.] in + attList:= removeDuplicates MSORT [x for [x,:.] in getConstructorAttributesFromDB op] null attList => sayBrightly concat('%b,form2String functorForm,'%d,"has no attributes.",'%l) @@ -2576,7 +2576,7 @@ displayOperationsFromLisplib form == opList:= getConstructorOperationsFromDB name null opList => centerAndHighlight('"No exported operations",$LINELENGTH) - opl:=REMDUP MSORT EQSUBSTLIST(argl,$FormalMapVariableList,opList) + opl:=removeDuplicates MSORT EQSUBSTLIST(argl,$FormalMapVariableList,opList) ops:= nil for x in opl repeat ops := [:ops,:formatOperationAlistEntry(x)] diff --git a/src/interp/mark.boot b/src/interp/mark.boot index ce5c7b3a..6c0c26a2 100644 --- a/src/interp/mark.boot +++ b/src/interp/mark.boot @@ -388,7 +388,7 @@ markChanges(originalDef,T,sig) == markEncodeChanges(code,nil) frees := null $markFreeStack => nil - [['free,:mySort REMDUP $markFreeStack]] + [['free,:mySort removeDuplicates $markFreeStack]] noriginalBody := markSpliceInChanges originalBody nbody := augmentBodyByLoopDecls noriginalBody ndef := ['DEF,form,signature,[nil for x in form],nbody] @@ -870,7 +870,7 @@ markFinish1() == $globalImportStack := delete($categoryNameForDollar,$globalImportStack) $commonImports : local := getCommonImports() globalImports := - reverse orderByContainment REMDUP [:$commonImports,:$globalImportStack] + reverse orderByContainment removeDuplicates [:$commonImports,:$globalImportStack] $finalImports: local := SETDIFFERENCE(globalImports,$globalDeclareStack) $capsuleStack := [mkNewCapsuleItem(freepart,imports,x) for freepart in $freeStack @@ -955,7 +955,7 @@ markRemImportsAndLeadingMacros(leadingMacros,body) == mkNewCapsuleItem(frees,i,x) == [originalDef,:ndef] := x - imports := reverse orderByContainment REMDUP SETDIFFERENCE(i,$finalImports) + imports := reverse orderByContainment removeDuplicates SETDIFFERENCE(i,$finalImports) importPart := [["import",d] for d in imports] nbody := ndef is ["%LET",.,x] => x @@ -1362,7 +1362,7 @@ markGetPaths(x,y) == markPaths(x,y,[nil]) mkCheck() == - for [x, :y] in REMDUP $badStack repeat + for [x, :y] in removeDuplicates $badStack repeat pp '"!!-------------------------------!!" res := mkGetPaths(x, y) oldRes := markPaths(x, y, [nil]) @@ -1376,11 +1376,11 @@ mkCheck() == reverseDown u == [reverse x for x in u] mkCheckRun() == - for [x, :y] in REMDUP $badStack repeat + for [x, :y] in removeDuplicates $badStack repeat pp mkGetPaths(x,y) mkGetPaths(x,y) == - u := REMDUP mkPaths(x,y) => getLocationsOf(u,y,nil) + u := removeDuplicates mkPaths(x,y) => getLocationsOf(u,y,nil) nil mkPaths(x,y) == --x < y; find location s of x in y (initially s=nil) diff --git a/src/interp/nruncomp.boot b/src/interp/nruncomp.boot index 14f694c0..b9fbe98b 100644 --- a/src/interp/nruncomp.boot +++ b/src/interp/nruncomp.boot @@ -438,7 +438,7 @@ buildFunctor($definition is [name,:args],sig,code,$locals,$e) == oldtime:= TEMPUS_-FUGIT() [$catsig,:argsig]:= sig - catvecListMaker:=REMDUP + catvecListMaker:=removeDuplicates [(comp($catsig,$EmptyMode,$e)).expr, :[compCategories first u for u in second $domainShell.4]] condCats:= InvestigateConditions [$catsig,:rest catvecListMaker] @@ -554,7 +554,7 @@ NRTsetVector4(siglist,formlist,condlist) == NRTsetVector4a(sig,form,cond) $lisplibCategoriesExtended:= [$uncondList,:$condList] - code := ['mapConsDB,MKQ reverse REMDUP $uncondList] + code := ['mapConsDB,MKQ reverse removeDuplicates $uncondList] if $condList then localVariable := GENSYM() code := [["%LET",localVariable,code]] @@ -575,7 +575,7 @@ NRTsetVector4Part1(siglist,formlist,condlist) == for sig in reverse siglist for form in reverse formlist for cond in reverse condlist repeat NRTsetVector4a(sig,form,cond) - reducedUncondlist := REMDUP $uncondList + reducedUncondlist := removeDuplicates $uncondList reducedConlist := [[x,:y] for [x,z] in $condList| y := SETDIFFERENCE(z,reducedUncondlist)] revCondlist := reverseCondlist reducedConlist @@ -594,7 +594,7 @@ reverseCondlist cl == NRTsetVector4Part2(uncondList,condList) == $lisplibCategoriesExtended:= [uncondList,:condList] - code := ['mapConsDB,MKQ reverse REMDUP uncondList] + code := ['mapConsDB,MKQ reverse removeDuplicates uncondList] if condList then localVariable := GENSYM() code := [["%LET",localVariable,code]] diff --git a/src/interp/nrunopt.boot b/src/interp/nrunopt.boot index 57833083..ef33f475 100644 --- a/src/interp/nrunopt.boot +++ b/src/interp/nrunopt.boot @@ -394,7 +394,7 @@ orderCatAnc x == nreverse ASSOCLEFT SORTBY('CDR,rest depthAssoc x) depthAssocList u == u := delete('DomainSubstitutionMacro,u) --hack by RDJ 8/90 - REMDUP ("append"/[depthAssoc(y) for y in u]) + removeDuplicates ("append"/[depthAssoc(y) for y in u]) depthAssoc x == y := HGET($depthAssocCache,x) => y diff --git a/src/interp/postpar.boot b/src/interp/postpar.boot index 99ef5eda..770e44cf 100644 --- a/src/interp/postpar.boot +++ b/src/interp/postpar.boot @@ -61,7 +61,7 @@ postTransform y == u displayPreCompilationErrors() == - n:= #($postStack:= REMDUP nreverse $postStack) + n:= #($postStack:= removeDuplicates nreverse $postStack) n=0 => nil errors:= 1<n => '"errors" diff --git a/src/interp/showimp.boot b/src/interp/showimp.boot index d9273326..7dfe9c18 100644 --- a/src/interp/showimp.boot +++ b/src/interp/showimp.boot @@ -115,7 +115,7 @@ getDomainOps D == domname := D.0 conname := first domname $predicateList: local := getConstructorPredicatesFromDB conname - REMDUP listSort(function GLESSEQP,ASSOCLEFT getDomainOpTable(D,nil)) + removeDuplicates listSort(function GLESSEQP,ASSOCLEFT getDomainOpTable(D,nil)) getDomainSigs(D,:option) == domname := D.0 diff --git a/src/interp/topics.boot b/src/interp/topics.boot index ef413b3e..f3959be9 100644 --- a/src/interp/topics.boot +++ b/src/interp/topics.boot @@ -163,7 +163,7 @@ topicCode lst == x if null intersection('(basic extended hidden),u) then u := ['extended,:u] bitIndexList := nil - for x in REMDUP u repeat + for x in removeDuplicates u repeat bitIndexList := [fn x,:bitIndexList] where fn x == k := HGET($topicHash,x) => k HPUT($topicHash,x,$topicIndex := $topicIndex * 2) @@ -214,7 +214,7 @@ topics con == [[HGET($topicHash,key),:key] for key in HKEYS $topicHash] hash := MAKE_-HASHTABLE 'ID tdAdd(con,hash) - for x in REMDUP [CAAR y for y in ancestorsOf(getConstructorForm con,nil)] repeat + for x in removeDuplicates [CAAR y for y in ancestorsOf(getConstructorForm con,nil)] repeat tdAdd(x,hash) for x in HKEYS hash repeat HPUT(hash,x,mySort HGET(hash,x)) tdPrint hash diff --git a/src/interp/wi2.boot b/src/interp/wi2.boot index 32b64c19..f73710de 100644 --- a/src/interp/wi2.boot +++ b/src/interp/wi2.boot @@ -108,7 +108,7 @@ compDefineFunctor1(df, m,$e,$prefix,$formalArgList) == $uncondAlist: local := nil -->>-- next global initialized here, reset by buildFunctor $NRTslot1PredicateList: local := - REMDUP [second x for x in attributeList] + removeDuplicates [second x for x in attributeList] -->>-- next global initialized here, used by NRTgenAttributeAlist (NRUNOPT) $NRTattributeAlist: local := NRTgenInitialAttributeAlist attributeList $NRTslot1Info: local := nil --set in NRTmakeSlot1Info |