diff options
Diffstat (limited to 'src/interp')
-rw-r--r-- | src/interp/c-util.boot | 4 | ||||
-rw-r--r-- | src/interp/define.boot | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/interp/c-util.boot b/src/interp/c-util.boot index 8a305c37..b16d52ef 100644 --- a/src/interp/c-util.boot +++ b/src/interp/c-util.boot @@ -740,7 +740,9 @@ extendsCategoryForm(domain,form,form') == -- if we are compiling the category `form', then we should look at -- the body as provided in the current definition, not a version -- possibly compiled previously that may have changed. - form = $functorForm => + -- FIXME: should not we go all the way down and implement + -- polynormic recursion? + domain = "$" and form = $definition => extendsCategoryForm(domain, $currentCategoryBody, form') isCategoryForm(form,$EmptyEnvironment) => --Constructs the associated vector diff --git a/src/interp/define.boot b/src/interp/define.boot index 70ce8656..d0a14673 100644 --- a/src/interp/define.boot +++ b/src/interp/define.boot @@ -461,7 +461,9 @@ compDefineCategory2(form,signature,specialCases,body,m,e, $form: local := nil $op: local := nil $extraParms: local := nil - --Set in DomainSubstitutionFunction, used further down + -- Remember the body for checking the current instantiation. + $currentCategoryBody : local := body + --Set in DomainSubstitutionFunction, used further down -- 1.1 augment e to add declaration $: <form> [$op,:argl] := $definition e:= addBinding("$",[['mode,:$definition]],e) @@ -478,7 +480,7 @@ compDefineCategory2(form,signature,specialCases,body,m,e, $functorForm:= $form:= [$op,:sargl] $formalArgList:= [:sargl,:$formalArgList] aList:= [[a,:sa] for a in argl for sa in sargl] - $currentCategoryBody : local := formalBody:= SUBLIS(aList,body) + formalBody:= SUBLIS(aList,body) signature' := SUBLIS(aList,signature') --Begin lines for category default definitions $functionStats: local:= [0,0] |