diff options
Diffstat (limited to 'src/interp')
| -rw-r--r-- | src/interp/define.boot | 9 | ||||
| -rw-r--r-- | src/interp/g-util.boot | 8 |
2 files changed, 14 insertions, 3 deletions
diff --git a/src/interp/define.boot b/src/interp/define.boot index c854eb27..8df914ac 100644 --- a/src/interp/define.boot +++ b/src/interp/define.boot @@ -270,10 +270,15 @@ hasDefaultPackage catname == -- Compute the lookup function (complete or incomplete) --======================================================================= NRTgetLookupFunction(domform,exCategory,addForm,env) == + $why: local := nil domform := applySubst($pairlis,domform) + addForm isnt [.,:.] => + IDENTP addForm and (m := getmode(addForm,env)) ~= nil + and isCategoryForm(m,env) + and extendsCategory(domform,exCategory,applySubst($pairlis,m),env) => + 'lookupIncomplete + 'lookupComplete addForm := applySubst($pairlis,addForm) - $why: local := nil - addForm isnt [.,:.] => 'lookupComplete NRTextendsCategory1(domform,exCategory,getExportCategory addForm,env) => 'lookupIncomplete [u,msg,:v] := $why diff --git a/src/interp/g-util.boot b/src/interp/g-util.boot index f6584a37..dc663fa7 100644 --- a/src/interp/g-util.boot +++ b/src/interp/g-util.boot @@ -94,7 +94,13 @@ homogeneousListToVector(t,l) == ++ tests if x is an identifier beginning with # isSharpVar x == ident? x and stringChar(symbolName x,0) = char "#" - + +++ If `x' is a formal variable, return its numeral position. +++ Otherwise return nil. +formalVarNumber x == + not isSharpVar x => nil + readIntegerIfCan subsString(symbolName x,1) + isSharpVarWithNum x == not isSharpVar x => nil p := symbolName x |
