aboutsummaryrefslogtreecommitdiff
path: root/src/interp/compiler.boot
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2009-01-11 03:06:06 +0000
committerdos-reis <gdr@axiomatics.org>2009-01-11 03:06:06 +0000
commit7f4d5ba0d11c5c7f5bc106655ffb07f37ed453a0 (patch)
tree16fc67934b5fd41478d4afcf7fdbff90503ed412 /src/interp/compiler.boot
parent3abfe0a7f15ff760fe7c6f95957f705e1301bfc6 (diff)
downloadopen-axiom-7f4d5ba0d11c5c7f5bc106655ffb07f37ed453a0.tar.gz
* interp/compiler.boot (getSuccessEnvironment): Don't specialize
on `has'. (getInverseEnvironment): Likewise. * algebra/equation2.spad.pamphlet (factorAndSplit$Equation): Fix misuses of `has'. * interp/functor.boot (mkTypeForm): Rename from mkDomainConstructor.
Diffstat (limited to 'src/interp/compiler.boot')
-rw-r--r--src/interp/compiler.boot20
1 files changed, 3 insertions, 17 deletions
diff --git a/src/interp/compiler.boot b/src/interp/compiler.boot
index 72baf917..6cf3cc84 100644
--- a/src/interp/compiler.boot
+++ b/src/interp/compiler.boot
@@ -1138,9 +1138,9 @@ compHasFormat (pred is ["has",olda,b]) ==
b is ["ATTRIBUTE",c] => ["HasAttribute",a,["QUOTE",c]]
b is ["SIGNATURE",op,sig] =>
["HasSignature",a,
- mkList [MKQ op,mkList [mkDomainConstructor type for type in sig]]]
- isDomainForm(b,$EmptyEnvironment) => ["EQUAL",a,b]
- ["HasCategory",a,mkDomainConstructor b]
+ mkList [MKQ op,mkList [mkTypeForm type for type in sig]]]
+ isCategoryForm(b,$e) => ["HasCategory",a,mkTypeForm b]
+ stackAndThrow('"Second argument to %1b must be a category, or a signature or an attribute",["has"])
--% IF
@@ -1215,12 +1215,6 @@ compPredicate(p,E) ==
[p',m,getSuccessEnvironment(p,E),getInverseEnvironment(p,E)]
getSuccessEnvironment(a,e) ==
-
- -- the next four lines try to ensure that explicit special-case tests
- -- prevent implicit ones from being generated
- a is ["has",x,m] =>
- IDENTP x and isDomainForm(m,$EmptyEnvironment) => put(x,"specialCase",m,e)
- e
a is ["is",id,m] =>
IDENTP id and isDomainForm(m,$EmptyEnvironment) =>
e:=put(id,"specialCase",m,e)
@@ -1234,14 +1228,6 @@ getSuccessEnvironment(a,e) ==
e
getInverseEnvironment(a,E) ==
- atom a => E
- [op,:argl]:= a
--- the next five lines try to ensure that explicit special-case tests
--- prevent implicit ones from being generated
- op="has" =>
- [x,m]:= argl
- IDENTP x and isDomainForm(m,$EmptyEnvironment) => put(x,"specialCase",m,E)
- E
a is ["case",x,m] and IDENTP x =>
--the next two lines are necessary to get 3-branched Unions to work
-- old-style unions, that is