aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2008-01-16 23:17:44 +0000
committerdos-reis <gdr@axiomatics.org>2008-01-16 23:17:44 +0000
commit85ba8eb449cf6b7e8c37b989021dfb803427ae5c (patch)
tree021fed79b50829c985392c70da9e144a9ec7d3dc /src
parent71e48772bf2d5d0f12b221b62f851eca77c2ae7d (diff)
downloadopen-axiom-85ba8eb449cf6b7e8c37b989021dfb803427ae5c.tar.gz
Fix SF/1848975
* interp/buildom.boot ($commonCategoryAncestors): New. ($commonCategoryDefaults): Likewise. (Record0): Use it. (Union): Likewise. (Mapping): Likewise. (Enumeration): Likewise. * testsuite/algebra/1848975.input: New.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog11
-rw-r--r--src/interp/buildom.boot17
-rw-r--r--src/testsuite/algebra/1848975.input3
3 files changed, 27 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 4f404627..1d9d9d9a 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,16 @@
2008-01-16 Gabriel Dos Reis <gdr@cs.tamu.edu>
+ Fix SF/1848975
+ * interp/buildom.boot ($commonCategoryAncestors): New.
+ ($commonCategoryDefaults): Likewise.
+ (Record0): Use it.
+ (Union): Likewise.
+ (Mapping): Likewise.
+ (Enumeration): Likewise.
+ * testsuite/algebra/1848975.input: New.
+
+2008-01-16 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
Fix SF/1872564
* interp/compiler.boot (compPretend): Don't check for `new'
compiler semantics.
diff --git a/src/interp/buildom.boot b/src/interp/buildom.boot
index 586251b2..228ef863 100644
--- a/src/interp/buildom.boot
+++ b/src/interp/buildom.boot
@@ -43,6 +43,15 @@ import '"sys-macros"
$noCategoryDomains == '(Domain Mode SubDomain)
$nonLisplibDomains == APPEND($Primitives,$noCategoryDomains)
+++ Category ancestors for Record, Union, Mapping, and Enumeration domains.
+$commonCategoryAncestors ==
+ ['(SetCategory), '(BasicType), '(CoercibleTo (OutputForm))]
+
+++ Default category packages for Record, Union, Mapping and
+++ Enumeration domains.
+$commonCategoryDefaults ==
+ ['(SetCategory_&), '(BasicType_&), NIL]
+
--% Record
-- Want to eventually have the elts and setelts.
-- Record is a macro in BUILDOM LISP. It takes out the colons.
@@ -66,7 +75,7 @@ Record0 args ==
dom.2 := NIL
dom.3 := ["RecordCategory",:QCDR dom.0]
dom.4 :=
- [[ '(SetCategory) ],[ '(SetCategory) ]]
+ [$commonCategoryDefaults, $commonCategoryAncestors]
dom.5 := [CDR a for a in args]
dom.6 := [function RecordEqual, :dom]
dom.7 := [function RecordPrint, :dom]
@@ -131,7 +140,7 @@ Union(:args) ==
dom.3 :=
'(SetCategory)
dom.4 :=
- [[ '(SetCategory) ],[ '(SetCategory) ]]
+ [$commonCategoryDefaults, $commonCategoryAncestors]
dom.5 := args
dom.6 := [function UnionEqual, :dom]
dom.7 := [function UnionPrint, :dom]
@@ -183,7 +192,7 @@ Mapping(:args) ==
dom.3 :=
'(SetCategory)
dom.4 :=
- [[ '(SetCategory) ],[ '(SetCategory) ]]
+ [$commonCategoryDefaults, $commonCategoryAncestors]
dom.5 := args
dom.6 := [function MappingEqual, :dom]
dom.7 := [function MappingPrint, :dom]
@@ -214,7 +223,7 @@ Enumeration(:"args") ==
dom.2 := NIL
dom.3 := ["EnumerationCategory",:QCDR dom.0]
dom.4 :=
- [[ '(SetCategory) ],[ '(SetCategory) ]]
+ [$commonCategoryDefaults, $commonCategoryAncestors]
dom.5 := args
dom.6 := [function EnumEqual, :dom]
dom.7 := [function EnumPrint, :dom]
diff --git a/src/testsuite/algebra/1848975.input b/src/testsuite/algebra/1848975.input
new file mode 100644
index 00000000..ef86b122
--- /dev/null
+++ b/src/testsuite/algebra/1848975.input
@@ -0,0 +1,3 @@
+++ Cotnributed by Luke Wagner
+-- Issue: `Built in' domains should be coercible to OutputForm
+s : List Record(a:INT, b:FLOAT) := []