From dc558ba2d56b057f3a81b69ae2238d1cb1a6b7b8 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Thu, 8 Sep 2011 17:38:10 +0000 Subject: * 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. --- src/interp/c-util.boot | 37 ------------------------------------- src/interp/g-util.boot | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 37 deletions(-) (limited to 'src/interp') 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 @@ -131,43 +131,6 @@ macro domainPredicates d == 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) -- cgit v1.2.3