diff options
author | dos-reis <gdr@axiomatics.org> | 2013-06-14 23:39:25 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2013-06-14 23:39:25 +0000 |
commit | c35033aee6d48c9abf251594f7567026d5ef9204 (patch) | |
tree | c0fb10a8e46ea65dd83113fc51a6e4d475ddfcc9 /src/interp/compiler.boot | |
parent | 09c021ae74c560f83d9a491d4e610681828a8028 (diff) | |
download | open-axiom-c35033aee6d48c9abf251594f7567026d5ef9204.tar.gz |
compColon is now smarter about category definitions.
Diffstat (limited to 'src/interp/compiler.boot')
-rw-r--r-- | src/interp/compiler.boot | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/interp/compiler.boot b/src/interp/compiler.boot index 0306d3d6..76aefd3d 100644 --- a/src/interp/compiler.boot +++ b/src/interp/compiler.boot @@ -1675,6 +1675,9 @@ maybeSpliceMode m == (m' := isQuasiquote m) => m' m +categoryInstance? x == + x is [c,:.] and ident? c and categoryConstructor? c + compColon: (%Form,%Mode,%Env) -> %Maybe %Triple compColon([":",f,t],m,e) == db := currentDB e @@ -1683,6 +1686,7 @@ compColon([":",f,t],m,e) == $lhsOfColon: local:= f t:= t isnt [.,:.] and (t':= assoc(t,getDomainsInScope e)) => t' + t = $Category and categoryInstance? f => t isDomainForm(t,e) and not $insideCategoryIfTrue => e := addDomain(db,t,e) t |