aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2008-05-17 17:47:04 +0000
committerdos-reis <gdr@axiomatics.org>2008-05-17 17:47:04 +0000
commit12c08d022465104b0a0366689700bab191857aac (patch)
treeb035112a195815c8ff29e22254e2fbdd0f604b2b /src
parent431f54e5bfc6267719e18c4a4b183bc29d30125f (diff)
downloadopen-axiom-12c08d022465104b0a0366689700bab191857aac.tar.gz
* interp/format.boot (form2String1): Handle PAREN.
* interp/g-cndata.boot (condUnabbrev): Handle homogeneous varargs for constructors taking tuples. * interp/i-resolv.boot: Revolve domains and categories.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog7
-rw-r--r--src/interp/format.boot14
-rw-r--r--src/interp/g-cndata.boot7
-rw-r--r--src/interp/i-resolv.boot2
4 files changed, 24 insertions, 6 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 42358c16..9d80866f 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,10 @@
+2008-05-17 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
+ * interp/format.boot (form2String1): Handle PAREN.
+ * interp/g-cndata.boot (condUnabbrev): Handle homogeneous varargs
+ for constructors taking tuples.
+ * interp/i-resolv.boot: Revolve domains and categories.
+
2008-05-16 Gabriel Dos Reis <gdr@cs.tamu.edu>
Fix AW/420
diff --git a/src/interp/format.boot b/src/interp/format.boot
index d1e6e4df..9550ebd5 100644
--- a/src/interp/format.boot
+++ b/src/interp/format.boot
@@ -1,6 +1,6 @@
--- Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
+-- Copyright (c) 1991-2002, The Numerical Algorithms Group Ltd.
-- All rights reserved.
--- Copyright (C) 2007, Gabriel Dos Reis.
+-- Copyright (C) 2007-2008, Gabriel Dos Reis.
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
@@ -15,7 +15,7 @@
-- the documentation and/or other materials provided with the
-- distribution.
--
--- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
+-- - Neither the name of The Numerical Algorithms Group Ltd. nor the
-- names of its contributors may be used to endorse or promote products
-- derived from this software without specific prior written permission.
--
@@ -424,6 +424,9 @@ form2String1 u ==
op = 'BRACKET =>
argl' := form2String1 first argl
["[",:(atom argl' => [argl']; argl'),"]"]
+ op = 'PAREN =>
+ argl' := form2String1 first argl
+ ["(",:(atom argl' => [argl']; argl'),")"]
op = "SIGNATURE" =>
[operation,sig] := argl
concat(operation,'": ",formatSignature sig)
@@ -626,8 +629,9 @@ application2String(op,argl, linkInfo) ==
(op' := isInternalFunctionName(op)) => op'
app2StringWrap(formWrapId op, linkInfo)
1=#argl =>
- first argl is ["<",:.] => concat(op,first argl)
- concat(app2StringWrap(formWrapId op, linkInfo)," ",first argl)
+ arg := first argl
+ arg is ["<",:.] or arg is ["(",:.] => concat(op,arg)
+ concat(app2StringWrap(formWrapId op, linkInfo)," ",arg)
--op in '(UP SM) =>
-- newop:= (op = "UP" => "P";"M")
-- concat(newop,concat(lbrkSch(),argl.0,rbrkSch(),argl.1))
diff --git a/src/interp/g-cndata.boot b/src/interp/g-cndata.boot
index 285dc570..2477c18f 100644
--- a/src/interp/g-cndata.boot
+++ b/src/interp/g-cndata.boot
@@ -232,9 +232,14 @@ condAbbrev(arglist,argtypes) ==
res
condUnabbrev(op,arglist,argtypes,modeIfTrue) ==
- #arglist ^= #argtypes =>
+ #arglist ^= #argtypes and argtypes isnt [["Tuple",t]] =>
throwKeyedMsg("S2IL0014",[op,plural(#argtypes,'"argument"),
bright(#arglist)])
+ -- fix up argument list for unary constructor taking tuples.
+ t ^= nil =>
+ categoryForm? t =>
+ [["tuple",:[unabbrev1(arg,modeIfTrue) for arg in arglist]]]
+ [["tuple",:arglist]]
[newArg for arg in arglist for type in argtypes] where newArg() ==
categoryForm?(type) => unabbrev1(arg,modeIfTrue)
arg
diff --git a/src/interp/i-resolv.boot b/src/interp/i-resolv.boot
index 7b8acc7f..1038901c 100644
--- a/src/interp/i-resolv.boot
+++ b/src/interp/i-resolv.boot
@@ -244,6 +244,8 @@ resolveTTSpecial(t1,t2) ==
dom' := resolveTT(dom, t2)
null dom' => nil
['Segment, dom']
+ member(t1,[$Domain,$Category]) and t2 = $Type => t2
+ t1 = $Domain and t2 = $Category => $Type
nil
resolveTTCC(t1,t2) ==