aboutsummaryrefslogtreecommitdiff
path: root/src/interp
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2011-09-07 11:39:32 +0000
committerdos-reis <gdr@axiomatics.org>2011-09-07 11:39:32 +0000
commit80e53e21c3d0f18791ca5a4905217c1f89aa90f1 (patch)
tree3578ecdcb3be868ba98bd1bb0eac9ee19c411494 /src/interp
parent69f3bfa6c96a350b086ca9f21a7f55dabb7cf30f (diff)
downloadopen-axiom-80e53e21c3d0f18791ca5a4905217c1f89aa90f1.tar.gz
* interp/define.boot (compDefineFunctor1): Augment the envionment
with current instantiation. * interp/c-util.boot (isSubset): Accept values of current instantiation as values of the current domain.
Diffstat (limited to 'src/interp')
-rw-r--r--src/interp/c-util.boot6
-rw-r--r--src/interp/define.boot5
2 files changed, 7 insertions, 4 deletions
diff --git a/src/interp/c-util.boot b/src/interp/c-util.boot
index ad681ddc..f835a531 100644
--- a/src/interp/c-util.boot
+++ b/src/interp/c-util.boot
@@ -798,10 +798,12 @@ isSubset(x,y,e) ==
y = $Type => true
-- When using the old style definition, the current domain
-- is considered a subset of its representation domain
- x = "$" and y = "Rep" => $useRepresentationHack
+ x is '$ and y is 'Rep => $useRepresentationHack
-- Expand domain representation form
- x = "Rep" and not $useRepresentationHack =>
+ x is 'Rep and not $useRepresentationHack =>
isSubset(getRepresentation e,y,e)
+ -- x is '$ and get(x,'%domain,e) = y => true
+ y is '$ and get(y,'%domain,e) = x => true
-- Or, if x has the Subsets property set by SubsetCategory.
pred := LASSOC(opOf x,get(opOf y,"Subsets",e)) => pred
-- Or, they are related by subdomain chain.
diff --git a/src/interp/define.boot b/src/interp/define.boot
index 381756c3..958f8101 100644
--- a/src/interp/define.boot
+++ b/src/interp/define.boot
@@ -1370,9 +1370,10 @@ compDefineFunctor1(df is ['DEF,form,signature,nils,body],
$functionLocations: local := nil --locations of defined functions in source
-- generate slots for arguments first, then for $NRTaddForm in compAdd
for x in argl repeat NRTgetLocalIndex x
- [.,.,$e]:= compMakeDeclaration("$",target,$e)
+ [.,.,$e] := compMakeDeclaration("$",target,$e)
if not $insideCategoryPackageIfTrue then
- $e:= augModemapsFromCategory('_$,'_$,target,$e)
+ $e := augModemapsFromCategory('_$,'_$,target,$e)
+ $e := put('$,'%domain,form,$e)
$signature:= signature'
parSignature:= applySubst($pairlis,signature')
parForm:= applySubst($pairlis,form)