From bd3fb898659b91542e7a3109f36b2f8b17e05a5d Mon Sep 17 00:00:00 2001 From: dos-reis Date: Sun, 4 Jan 2009 14:08:52 +0000 Subject: * interp/daase.lisp (setdatabase): Set superdomain slot too. * interp/g-util.boot (superType): Handle current domain form. (maximalSuperType): Tidy. (noteSubDomainInfo): Call SETDATABASE. --- src/interp/daase.lisp | 2 ++ src/interp/g-util.boot | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src/interp') 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 -- cgit v1.2.3