aboutsummaryrefslogtreecommitdiff
path: root/src/interp
diff options
context:
space:
mode:
Diffstat (limited to 'src/interp')
-rw-r--r--src/interp/c-util.boot37
-rw-r--r--src/interp/g-util.boot40
2 files changed, 40 insertions, 37 deletions
diff --git a/src/interp/c-util.boot b/src/interp/c-util.boot
index 75a8ec60..62defa25 100644
--- a/src/interp/c-util.boot
+++ b/src/interp/c-util.boot
@@ -132,43 +132,6 @@ macro domainData d ==
domainRef(d,4)
--%
-
-++ List of category constructors that do not have entries in the
-++ constructor database. So, they are mostly recognized by their names.
-$CategoryNames ==
- '(CATEGORY _
- RecordCategory _
- Join _
- EnumerationCategory _
- SubsetCategory _
- UnionCategory _
- MappingCategory)
-
-macro builtinCategoryName? x ==
- symbolMember?(x,$CategoryNames)
-
-++ List of domain constructors that do not have entries in the constructor
-++ database. So, they are mostly recognized by their names.
-++ See also $CategoryNames.
-$DomainNames ==
- '(Mapping _
- SubDomain _
- Union _
- Record _
- Enumeration)
-
-macro builtinFunctorName? x ==
- symbolMember?(x,$DomainNames)
-
-++ The collection of builtin category names and builtin domain names.
-$BuiltinConstructorNames ==
- [:$CategoryNames,:$DomainNames]
-
-++ Return true if the symbol `s' designates a builtin constructor.
-macro builtinConstructor? s ==
- symbolMember?(s,$BuiltinConstructorNames)
-
---%
$SetCategory ==
'(SetCategory)
diff --git a/src/interp/g-util.boot b/src/interp/g-util.boot
index 6b76c32e..67d2efb2 100644
--- a/src/interp/g-util.boot
+++ b/src/interp/g-util.boot
@@ -46,6 +46,43 @@ module g_-util where
isDefaultPackageName: %Symbol -> %Boolean
makeDefaultPackageName: %String -> %Symbol
+--%
+
+++ List of category constructors that do not have entries in the
+++ constructor database. So, they are mostly recognized by their names.
+$CategoryNames ==
+ '(CATEGORY _
+ RecordCategory _
+ Join _
+ EnumerationCategory _
+ SubsetCategory _
+ UnionCategory _
+ MappingCategory)
+
+macro builtinCategoryName? x ==
+ symbolMember?(x,$CategoryNames)
+
+++ List of domain constructors that do not have entries in the constructor
+++ database. So, they are mostly recognized by their names.
+++ See also $CategoryNames.
+$DomainNames ==
+ '(Mapping _
+ SubDomain _
+ Union _
+ Record _
+ Enumeration)
+
+macro builtinFunctorName? x ==
+ symbolMember?(x,$DomainNames)
+
+++ The collection of builtin category names and builtin domain names.
+$BuiltinConstructorNames ==
+ [:$CategoryNames,:$DomainNames]
+
+++ Return true if the symbol `s' designates a builtin constructor.
+macro builtinConstructor? s ==
+ symbolMember?(s,$BuiltinConstructorNames)
+
--%
$AbstractionOperator ==
@@ -119,9 +156,12 @@ superType: %Mode -> %Maybe %Mode
superType dom ==
dom = "$" => superType $functorForm
dom isnt [ctor,:args] => nil
+ builtinConstructor? ctor => nil
[super,.] :=
db := constructorDB ctor or return nil
dbBeingDefined? db => dbSuperDomain db or return nil
+ dbConstructorKind db is 'domain or return nil
+ --dbSuperDomain loadDBIfNecessary db or return nil
getSuperDomainFromDB ctor or return nil
sublisFormal(args,super,$AtVariables)