aboutsummaryrefslogtreecommitdiff
path: root/src/interp/compiler.boot
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2012-02-19 21:53:52 +0000
committerdos-reis <gdr@axiomatics.org>2012-02-19 21:53:52 +0000
commite4d42fad6ae663b5fdae7d6fae8f3aba51575849 (patch)
treed4431e3948efbd4d1974d9180ea2b546dee392ad /src/interp/compiler.boot
parenta1e31762f7c4c0c47295324b1039848150396246 (diff)
downloadopen-axiom-e4d42fad6ae663b5fdae7d6fae8f3aba51575849.tar.gz
* interp/compiler.boot (compBuiltinDomain): Compute the exports
from parentsOfBuiltinInstance. * interp/buildom.boot (parentsOfBuiltinInstance): Tidy.
Diffstat (limited to 'src/interp/compiler.boot')
-rw-r--r--src/interp/compiler.boot8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/interp/compiler.boot b/src/interp/compiler.boot
index 83112679..06c617be 100644
--- a/src/interp/compiler.boot
+++ b/src/interp/compiler.boot
@@ -1,6 +1,6 @@
-- Copyright (c) 1991-2002, The Numerical Algorithms Group Ltd.
-- All rights reserved.
--- Copyright (C) 2007-2011, Gabriel Dos Reis.
+-- Copyright (C) 2007-2012, Gabriel Dos Reis.
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
@@ -2027,8 +2027,12 @@ compBuiltinDomain(form is [functorName,:argl],m,e) ==
fn := property(functorName,"makeFunctionList") or return nil
diagnoseUnknownType(form,e)
[funList,e]:= FUNCALL(fn,form,form,e)
+ exports := [cat for x in parentsOfBuiltinInstance form]
+ where cat() ==
+ x.rest is true => x.first
+ ['IF,x.rest,['ATTRIBUTE,x.first],'%noBranch]
catForm:=
- ["Join",$SetCategory,["CATEGORY","domain",:
+ ["Join",:exports,["CATEGORY","domain",:
[["SIGNATURE",op,sig] for [op,sig,.] in funList | op~="="]]]
--RDJ: for coercion purposes, it necessary to know it's a Set; I'm not
--sure if it uses any of the other signatures(see extendsCategoryForm)