aboutsummaryrefslogtreecommitdiff
path: root/src/interp/i-funsel.boot
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2009-08-14 10:48:09 +0000
committerdos-reis <gdr@axiomatics.org>2009-08-14 10:48:09 +0000
commitd2afe2366c2c592327cd0eb6593a3536a6eff54d (patch)
tree11438ab261e17b8ccdd1f91ba83bb3b93032ec5e /src/interp/i-funsel.boot
parent9bcc210fb444e41fc45e6ccd9ef2be197337d3e8 (diff)
downloadopen-axiom-d2afe2366c2c592327cd0eb6593a3536a6eff54d.tar.gz
* boot/tokens.boot: Retire "^=". Introduce "~=".
* boot/ast.boot: Use "~=" instead of "^=". * boot/includer.boot: Likewise. * boot/translator.boot: Likewise. * interp/as.boot: Likewise. * interp/bc-misc.boot: Likewise. * interp/bc-solve.boot: Likewise. * interp/bc-util.boot: Likewise. * interp/br-con.boot: Likewise. * interp/br-data.boot: Likewise. * interp/br-op1.boot: Likewise. * interp/br-op2.boot: Likewise. * interp/br-prof.boot: Likewise. * interp/br-saturn.boot: Likewise. * interp/br-search.boot: Likewise. * interp/br-util.boot: Likewise. * interp/c-doc.boot: Likewise. * interp/c-util.boot: Likewise. * interp/category.boot: Likewise. * interp/cattable.boot: Likewise. * interp/clam.boot: Likewise. * interp/clammed.boot: Likewise. * interp/compiler.boot: Likewise. * interp/database.boot: Likewise. * interp/define.boot: Likewise. * interp/format.boot: Likewise. * interp/fortcall.boot: Likewise. * interp/functor.boot: Likewise. * interp/g-cndata.boot: Likewise. * interp/g-opt.boot: Likewise. * interp/g-timer.boot: Likewise. * interp/g-util.boot: Likewise. * interp/guess.boot: Likewise. * interp/ht-root.boot: Likewise. * interp/ht-util.boot: Likewise. * interp/htsetvar.boot: Likewise. * interp/i-analy.boot: Likewise. * interp/i-code.boot: Likewise. * interp/i-coerce.boot: Likewise. * interp/i-coerfn.boot: Likewise. * interp/i-eval.boot: Likewise. * interp/i-funsel.boot: Likewise. * interp/i-intern.boot: Likewise. * interp/i-map.boot: Likewise. * interp/i-output.boot: Likewise. * interp/i-resolv.boot: Likewise. * interp/i-spec1.boot: Likewise. * interp/i-spec2.boot: Likewise. * interp/i-syscmd.boot: Likewise. * interp/i-toplev.boot: Likewise. * interp/i-util.boot: Likewise. * interp/int-top.boot: Likewise. * interp/interop.boot: Likewise. * interp/intfile.boot: Likewise. * interp/lisplib.boot: Likewise. * interp/macex.boot: Likewise. * interp/mark.boot: Likewise. * interp/match.boot: Likewise. * interp/modemap.boot: Likewise. * interp/msg.boot: Likewise. * interp/msgdb.boot: Likewise. * interp/newfort.boot: Likewise. * interp/nruncomp.boot: Likewise. * interp/nrunfast.boot: Likewise. * interp/nrungo.boot: Likewise. * interp/nrunopt.boot: Likewise. * interp/parse.boot: Likewise. * interp/pathname.boot: Likewise. * interp/pf2atree.boot: Likewise. * interp/pf2sex.boot: Likewise. * interp/postpar.boot: Likewise. * interp/profile.boot: Likewise. * interp/pspad1.boot: Likewise. * interp/pspad2.boot: Likewise. * interp/record.boot: Likewise. * interp/scan.boot: Likewise. * interp/setvars.boot: Likewise. * interp/simpbool.boot: Likewise. * interp/slam.boot: Likewise. * interp/topics.boot: Likewise. * interp/trace.boot: Likewise. * interp/wi1.boot: Likewise. * interp/wi2.boot: Likewise. * interp/word.boot: Likewise.
Diffstat (limited to 'src/interp/i-funsel.boot')
-rw-r--r--src/interp/i-funsel.boot62
1 files changed, 31 insertions, 31 deletions
diff --git a/src/interp/i-funsel.boot b/src/interp/i-funsel.boot
index 89942903..719142de 100644
--- a/src/interp/i-funsel.boot
+++ b/src/interp/i-funsel.boot
@@ -192,7 +192,7 @@ selectMms2(op,tar,args1,args2,$Coerce) ==
-- for typically homogeneous functions, throw in resolve too
if op in '(_= _+ _* _- ) then
r := resolveTypeList a
- if r ^= nil then a := cons(r,a)
+ if r ~= nil then a := cons(r,a)
if tar and not isPartialMode tar then
if xx := underDomainOf(tar) then a := cons(xx,a)
@@ -476,7 +476,7 @@ getOpArgTypes(opname, args) ==
l := getOpArgTypes1(opname, args)
[f(a,opname) for a in l] where
f(x,op) ==
- x is ['FunctionCalled,g] and op ^= 'name =>
+ x is ['FunctionCalled,g] and op ~= 'name =>
m := get(g,'mode,$e) =>
m is ['Mapping,:.] => m
x
@@ -575,7 +575,7 @@ getLocalMms(name,types,tar) ==
-- check format and destructure
dcSig isnt [dc,result,:args] => NIL
-- make number of args is correct
- #types ^= #args => NIL
+ #types ~= #args => NIL
-- check for equal or subsumed arguments
subsume := (not $useIntegerSubdomain) or (tar = result) or
get(name,'recursive,$e)
@@ -609,7 +609,7 @@ mmCost0(name, sig,cond,tar,args1,args2) ==
-- try to favor homogeneous multiplication
---if name = "*" and 2 = #sigArgs and first sigArgs ^= first rest sigArgs then n := n + 1
+--if name = "*" and 2 = #sigArgs and first sigArgs ~= first rest sigArgs then n := n + 1
-- because of obscure problem in evalMm, sometimes we will have extra
-- modemaps with the wrong number of arguments if we want to the one
@@ -718,7 +718,7 @@ findCommonSigInDomain(opName,dom,nargs) ==
nargs = #CAR mm =>
null vec => vec := LIST2VEC CAR mm
for i in 0.. for x in CAR mm repeat
- if vec.i and vec.i ^= x then vec.i := NIL
+ if vec.i and vec.i ~= x then vec.i := NIL
VEC2LIST vec
findUniqueOpInDomain(op,opName,dom) ==
@@ -781,15 +781,15 @@ findFunctionInDomain(op,dc,tar,args1,args2,$Coerce,$SubDom) ==
-- When domains no longer have to have Set, the hard coded 6 and 7
-- should go.
op = '_= =>
- #args1 ^= 2 or args1.0 ^= dc or args1.1 ^= dc => NIL
- tar and tar ^= $Boolean => NIL
+ #args1 ~= 2 or args1.0 ~= dc or args1.1 ~= dc => NIL
+ tar and tar ~= $Boolean => NIL
[[[dc, $Boolean, dc, dc], [$Boolean,'$,'$], [NIL, NIL]]]
op = 'coerce =>
- #args1 ^= 1
+ #args1 ~= 1
dcName='Enumeration and (args1.0=$Symbol or tar=dc)=>
[[[dc, dc, $Symbol], ['$,$Symbol], [NIL, NIL]]]
- args1.0 ^= dc => NIL
- tar and tar ^= $Expression => NIL
+ args1.0 ~= dc => NIL
+ tar and tar ~= $Expression => NIL
[[[dc, $Expression, dc], [$Expression,'$], [NIL, NIL]]]
member(dcName,'(Record Union)) =>
findFunctionInCategory(op,dc,tar,args1,args2,$Coerce,$SubDom)
@@ -829,7 +829,7 @@ allOrMatchingMms(mms,args1,tar,dc) ==
for mm in mms repeat
[sig,:.] := mm
[res,:args] := MSUBSTQ(dc,"$",sig)
- args ^= args1 => nil
+ args ~= args1 => nil
x := CONS(mm,x)
if x then x
else mms
@@ -892,7 +892,7 @@ findFunctionInCategory(op,dc,tar,args1,args2,$Coerce,$SubDom) ==
impls := cons([b,nil,true,d],impls)
impls := cons([b,d,true,d],impls)
impls := NREVERSE impls
- if maxargs ^= -1 then
+ if maxargs ~= -1 then
SL:= NIL
for i in 1..maxargs repeat
impls := SUBSTQ(GENSYM(),INTERNL('"#",STRINGIMAGE i),impls)
@@ -916,7 +916,7 @@ matchMmCond(cond) ==
cond is ['OR,:conds] or cond is ['or,:conds] =>
or/[matchMmCond c for c in conds]
cond is ['has,dom,x] =>
- hasCaty(dom,x,NIL) ^= 'failed
+ hasCaty(dom,x,NIL) ~= 'failed
cond is ['not,cond1] => not matchMmCond cond1
keyedSystemError("S2GE0016",
['"matchMmCond",'"unknown form of condition"])
@@ -1006,7 +1006,7 @@ filterModemapsFromPackages(mms, names, op) ==
isTowerWithSubdomain(towerType,elem) ==
not PAIRP towerType => NIL
dt := deconstructT towerType
- 2 ^= #dt => NIL
+ 2 ~= #dt => NIL
s := underDomainOf(towerType)
isEqualOrSubDomain(s,elem) and constructM(first dt,[elem])
@@ -1112,7 +1112,7 @@ selectMmsGen(op,tar,args1,args2) ==
NIL
[c,t,:a] := sig
if a then matchTypes(a,args1,args2)
- $Subst ^= 'failed =>
+ $Subst ~= 'failed =>
mmS := nconc(evalMm(op,tar,sig,mmC),mmS)
mmS
@@ -1145,7 +1145,7 @@ evalMm(op,tar,sig,mmC) ==
mS:= NIL
for st in evalMmStack mmC repeat
SL:= evalMmCond(op,sig,st)
- SL ^= 'failed =>
+ SL ~= 'failed =>
SL := fixUpTypeArgs SL
sig:= [subCopy(deepSubCopy(x,SL),$Subst) for x in sig]
not containsVars sig =>
@@ -1251,7 +1251,7 @@ coerceTypeArgs(t1, t2, SL) ==
-- if the type t has type-valued arguments, coerce them to the new types,
-- if needed.
t1 isnt [con1, :args1] or t2 isnt [con2, :args2] => t2
- con1 ^= con2 => t2
+ con1 ~= con2 => t2
coSig := rest getDualSignatureFromDB first t1
and/coSig => t2
csub1 := constructSubst t1
@@ -1362,15 +1362,15 @@ evalMmCat1(mmC is ['ofCategory,d,c],op, SL) ==
-- If c is not Set, Ring or Field then the more general mechanism
dom := defaultTypeForCategory(c, SL)
null dom =>
- op ^= 'coerce => 'failed -- evalMmCatLastChance(d,c,SL)
+ op ~= 'coerce => 'failed -- evalMmCatLastChance(d,c,SL)
null (p := ASSQ(d,$Subst)) =>
dom =>
NSL := [CONS(d,dom)]
- op ^= 'coerce => 'failed -- evalMmCatLastChance(d,c,SL)
+ op ~= 'coerce => 'failed -- evalMmCatLastChance(d,c,SL)
if containsVars dom then dom := resolveTM(CDR p, dom)
$Coerce and canCoerce(CDR p, dom) =>
NSL := [CONS(d,dom)]
- op ^= 'coerce => 'failed -- evalMmCatLastChance(d,c,SL)
+ op ~= 'coerce => 'failed -- evalMmCatLastChance(d,c,SL)
NSL
hasCate(dom,cat,SL) ==
@@ -1378,14 +1378,14 @@ hasCate(dom,cat,SL) ==
-- augments substitution SL or returns 'failed
dom = $EmptyMode => NIL
isPatternVar dom =>
- (p:= ASSQ(dom,SL)) and ((NSL := hasCate(CDR p,cat,SL)) ^= 'failed) =>
+ (p:= ASSQ(dom,SL)) and ((NSL := hasCate(CDR p,cat,SL)) ~= 'failed) =>
NSL
(p:= ASSQ(dom,$Subst)) or (p := ASSQ(dom, SL)) =>
-- S:= hasCate(CDR p,cat,augmentSub(CAR p,CDR p,copy SL))
S:= hasCate1(CDR p,cat,SL, dom)
not (S='failed) => S
hasCateSpecial(dom,CDR p,cat,SL)
- if SL ^= 'failed then $hope:= 'T
+ if SL ~= 'failed then $hope:= 'T
'failed
SL1 := [[v,:d] for [v,:d] in SL | not containsVariables d]
if SL1 then cat := subCopy(cat, SL1)
@@ -1478,7 +1478,7 @@ hasCaty(d,cat,SL) ==
hasSig(d,foo,subCopy(sig,constructSubst d),SL)
cat is ['ATTRIBUTE,a] => hasAtt(d,subCopy(a,constructSubst d),SL)
cat is ["Join",:.] =>
- for c in rest cat while SL ^= "failed" repeat
+ for c in rest cat while SL ~= "failed" repeat
SL := hasCaty(d,c,SL)
SL
x:= hasCat(opOf d,opOf cat) =>
@@ -1578,7 +1578,7 @@ hasSigOr(orCls, S0, SL) ==
hasSigAnd(andCls, S0, SL)
keyedSystemError("S2GE0016",
['"hasSigOr",'"unexpected condition for signature"])
- if SA ^= 'failed then found := true
+ if SA ~= 'failed then found := true
SA
hasSig(dom,foo,sig,SL) ==
@@ -1625,9 +1625,9 @@ hasAtt(dom,att,SL) ==
hasCatExpression(cond,SL) ==
cond is ["OR",:l] =>
- or/[(y:=hasCatExpression(x,SL)) ^= 'failed for x in l] => y
+ or/[(y:=hasCatExpression(x,SL)) ~= 'failed for x in l] => y
cond is ["AND",:l] =>
- and/[(SL:= hasCatExpression(x,SL)) ^= 'failed for x in l] => SL
+ and/[(SL:= hasCatExpression(x,SL)) ~= 'failed for x in l] => SL
cond is ["has",a,b] => hasCate(a,b,SL)
keyedSystemError("S2GE0016",
['"hasSig",'"unexpected condition for attribute"])
@@ -1671,15 +1671,15 @@ unifyStructVar(v,s,SL) ==
else if canCoerce(ns1, ns0) then s3 := s0
else s3 := nil
s3 =>
- if (s3 ^= s0) then SL := augmentSub(v,s3,SL)
- if (s3 ^= s1) and isPatternVar(s) then SL := augmentSub(s,s3,SL)
+ if (s3 ~= s0) then SL := augmentSub(v,s3,SL)
+ if (s3 ~= s1) and isPatternVar(s) then SL := augmentSub(s,s3,SL)
SL
'failed
$domPvar =>
s3 := resolveTT(s0,s1)
s3 =>
- if (s3 ^= s0) then SL := augmentSub(v,s3,SL)
- if (s3 ^= s1) and isPatternVar(s) then SL := augmentSub(s,s3,SL)
+ if (s3 ~= s0) then SL := augmentSub(v,s3,SL)
+ if (s3 ~= s1) and isPatternVar(s) then SL := augmentSub(s,s3,SL)
SL
'failed
-- isSubDomain(s,s0) => augmentSub(v,s0,SL)
@@ -1696,7 +1696,7 @@ ofCategory(dom,cat) ==
$hope:local := NIL
IDENTP dom => NIL
cat is ['Join,:cats] => and/[ofCategory(dom,c) for c in cats]
- (hasCaty(dom,cat,NIL) ^= 'failed)
+ (hasCaty(dom,cat,NIL) ~= 'failed)
printMms(mmS) ==
-- mmS a list of modemap signatures