aboutsummaryrefslogtreecommitdiff
path: root/src/interp
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2012-02-12 02:35:56 +0000
committerdos-reis <gdr@axiomatics.org>2012-02-12 02:35:56 +0000
commit5cb04b284e293bef0f20ba16b173ca7d7f5f8dba (patch)
tree45a44128e58ffc602feb012581b7e57edcbed733 /src/interp
parent781631cd9f14832777f85bb33e49cccba1365abd (diff)
downloadopen-axiom-5cb04b284e293bef0f20ba16b173ca7d7f5f8dba.tar.gz
* interp/br-data.boot (ancestorsRecur): Tidy.
* interp/define.boot (compDefineCategory2): Likewise.
Diffstat (limited to 'src/interp')
-rw-r--r--src/interp/br-data.boot4
-rw-r--r--src/interp/define.boot8
2 files changed, 5 insertions, 7 deletions
diff --git a/src/interp/br-data.boot b/src/interp/br-data.boot
index ab28dc08..8d87ac04 100644
--- a/src/interp/br-data.boot
+++ b/src/interp/br-data.boot
@@ -589,9 +589,7 @@ ancestorsRecur(conform,domform,pred,firstTime?) == --called by ancestorsOf
parents :=
firstTime? => dbPrincipals constructorDB op
parentsOf op
- originalConform :=
- firstTime? and ($insideCategoryIfTrue or $insideFunctorIfTrue) => $form
- getConstructorForm op
+ originalConform := getConstructorForm op
if conform ~= originalConform then
parents := applySubst(pairList(originalConform.args,conform.args),parents)
for [newform,:p] in parents repeat
diff --git a/src/interp/define.boot b/src/interp/define.boot
index 1303e141..0d3df568 100644
--- a/src/interp/define.boot
+++ b/src/interp/define.boot
@@ -1095,19 +1095,19 @@ compDefineCategory2(form,signature,body,m,e,$formalArgList) ==
dbFormalSubst(db) := pairList(form.args,$TriangleVariableList)
dbInstanceCache(db) := true
deduceImplicitParameters(db,e)
- e:= addBinding("$",[['mode,:$definition]],e)
+ e:= addBinding("$",[['mode,:form]],e)
-- 2. obtain signature
signature':=
[signature.target,
- :[getArgumentModeOrMoan(a,$definition,e) for a in form.args]]
+ :[getArgumentModeOrMoan(a,form,e) for a in form.args]]
e := giveFormalParametersValues(form.args,e)
dbDualSignature(db) :=
[true,:[isCategoryForm(t,e) for t in signature'.source]]
-- 3. replace arguments by $1,..., substitute into body,
-- and introduce declarations into environment
- sargl:= take(# form.args, $TriangleVariableList)
+ sargl := take(# form.args, $TriangleVariableList)
$functorForm:= $form:= [$op,:sargl]
$formalArgList:= [:sargl,:$formalArgList]
formalBody := dbSubstituteFormals(db,body)
@@ -1152,7 +1152,7 @@ compDefineCategory2(form,signature,body,m,e,$formalArgList) ==
dbConstructorModemap(db) :=
[[parForm,:parSignature],[buildConstructorCondition db,$op]]
dbPrincipals(db) := getParentsFor(db,$FormalMapVariableList)
- dbAncestors(db) := computeAncestorsOf($form,nil)
+ dbAncestors(db) := computeAncestorsOf(form,nil)
dbModemaps(db) := modemapsFromCategory(db,[op',:sargl],formalBody,signature')
dbCompilerData(db) := nil
[fun,$Category,e]