diff options
-rw-r--r-- | src/ChangeLog | 5 | ||||
-rw-r--r-- | src/interp/br-data.boot | 4 | ||||
-rw-r--r-- | src/interp/define.boot | 8 |
3 files changed, 10 insertions, 7 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index bbd3dc1e..58ed0d29 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,10 @@ 2012-02-11 Gabriel Dos Reis <gdr@cs.tamu.edu> + * interp/br-data.boot (ancestorsRecur): Tidy. + * interp/define.boot (compDefineCategory2): Likewise. + +2012-02-11 Gabriel Dos Reis <gdr@cs.tamu.edu> + * interp/br-data.boot (getParentsFor): Move to define.boot. (explodeIfs): Likewise. (getParentsForDomain): Tidy. 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] |