aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2009-01-04 14:08:52 +0000
committerdos-reis <gdr@axiomatics.org>2009-01-04 14:08:52 +0000
commitbd3fb898659b91542e7a3109f36b2f8b17e05a5d (patch)
treeac202d2fc4697c71a3c908f29e14c91327d9f912
parent151f227545f5afa179bd1d0c4b179aa0a83b82f5 (diff)
downloadopen-axiom-bd3fb898659b91542e7a3109f36b2f8b17e05a5d.tar.gz
* interp/daase.lisp (setdatabase): Set superdomain slot too.
* interp/g-util.boot (superType): Handle current domain form. (maximalSuperType): Tidy. (noteSubDomainInfo): Call SETDATABASE.
-rw-r--r--src/ChangeLog7
-rw-r--r--src/interp/daase.lisp2
-rw-r--r--src/interp/g-util.boot4
3 files changed, 11 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 892ccde2..17c7ef0d 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,12 @@
2009-01-04 Gabriel Dos Reis <gdr@cs.tamu.edu>
+ * interp/daase.lisp (setdatabase): Set superdomain slot too.
+ * interp/g-util.boot (superType): Handle current domain form.
+ (maximalSuperType): Tidy.
+ (noteSubDomainInfo): Call SETDATABASE.
+
+2009-01-04 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
* interp/buildom.boot (createEnum): Fix quoting.
* interp/compat.boot (system): Likewise.
* interp/astr.boot (ncEltQ): Fix declaration.
diff --git a/src/interp/daase.lisp b/src/interp/daase.lisp
index 551925ee..29cbf446 100644
--- a/src/interp/daase.lisp
+++ b/src/interp/daase.lisp
@@ -761,6 +761,8 @@
(setf (database-abbreviation struct) value)
(when (symbolp value)
(setf (get value 'abbreviationfor) constructor)))
+ (superdomain
+ (setf (database-superdomain struct) value))
(constructorkind
(setf (database-constructorkind struct) value))))))
diff --git a/src/interp/g-util.boot b/src/interp/g-util.boot
index 6f2961d8..7889e49f 100644
--- a/src/interp/g-util.boot
+++ b/src/interp/g-util.boot
@@ -69,6 +69,7 @@ isSharpVarWithNum x ==
++ If `dom' is a subdomain, return its immediate super-domain.
superType: %Mode -> %Maybe %Mode
superType dom ==
+ dom = "$" => superType $functorForm
dom isnt [ctor,:args] => nil
[super,.] := getSuperDomainFromDB ctor or return nil
sublisFormal(args,super,$AtVariables)
@@ -78,7 +79,6 @@ superType dom ==
++ form `d'.
maximalSuperType: %Mode -> %Mode
maximalSuperType d ==
- atom d => d
d' := superType d => maximalSuperType d'
d
@@ -87,7 +87,7 @@ maximalSuperType d ==
++ predicate `pred'.
noteSubDomainInfo: (%Symbol,%Instantiation,%Form) -> %Thing
noteSubDomainInfo(sub,super,pred) ==
- MAKEPROP(sub,"%SuperDomain",[super,pred])
+ SETDATABASE(sub,"SUPERDOMAIN",[super,pred])
++ Returns non-nil if `d1' is a sub-domain of `d2'. This is the
++ case when `d1' is transitively given by an instance of SubDomain