From 80e53e21c3d0f18791ca5a4905217c1f89aa90f1 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Wed, 7 Sep 2011 11:39:32 +0000 Subject: * 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. --- src/interp/c-util.boot | 6 ++++-- src/interp/define.boot | 5 +++-- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'src/interp') 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) -- cgit v1.2.3