diff options
author | dos-reis <gdr@axiomatics.org> | 2011-09-08 17:38:10 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2011-09-08 17:38:10 +0000 |
commit | dc558ba2d56b057f3a81b69ae2238d1cb1a6b7b8 (patch) | |
tree | 9522e5c3518e07bb80d38fca777522f40a448de6 /src/interp | |
parent | 4f6ead3097764627b4ec2963df1f63af12b6e9d8 (diff) | |
download | open-axiom-dc558ba2d56b057f3a81b69ae2238d1cb1a6b7b8.tar.gz |
* interp/c-util.boot (builtinCategoryName?): Move to g-util.boot.
(builtinFunctorName?): Likewise.
(builtinConstructor?): Likewise.
(superType): Exit early if builtin functor or non-domain form.
* algebra/Makefile.in: Flesh out bootstrap dependencies.
Diffstat (limited to 'src/interp')
-rw-r--r-- | src/interp/c-util.boot | 37 | ||||
-rw-r--r-- | src/interp/g-util.boot | 40 |
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) |