aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfigure18
-rw-r--r--configure.ac2
-rw-r--r--configure.ac.pamphlet2
-rw-r--r--src/ChangeLog10
-rw-r--r--src/algebra/aggcat.spad.pamphlet2
-rw-r--r--src/algebra/strap/BOOLEAN.lsp10
-rw-r--r--src/algebra/strap/LIST.lsp10
-rw-r--r--src/algebra/strap/VECTOR.lsp11
-rw-r--r--src/interp/compiler.boot13
9 files changed, 47 insertions, 31 deletions
diff --git a/configure b/configure
index 2c5c68fe..005eeb1b 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.60 for OpenAxiom 1.3.0-2009-04-20.
+# Generated by GNU Autoconf 2.60 for OpenAxiom 1.3.0-2009-04-23.
#
# Report bugs to <open-axiom-bugs@lists.sf.net>.
#
@@ -713,8 +713,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='OpenAxiom'
PACKAGE_TARNAME='openaxiom'
-PACKAGE_VERSION='1.3.0-2009-04-20'
-PACKAGE_STRING='OpenAxiom 1.3.0-2009-04-20'
+PACKAGE_VERSION='1.3.0-2009-04-23'
+PACKAGE_STRING='OpenAxiom 1.3.0-2009-04-23'
PACKAGE_BUGREPORT='open-axiom-bugs@lists.sf.net'
ac_unique_file="src/Makefile.pamphlet"
@@ -1406,7 +1406,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures OpenAxiom 1.3.0-2009-04-20 to adapt to many kinds of systems.
+\`configure' configures OpenAxiom 1.3.0-2009-04-23 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1476,7 +1476,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of OpenAxiom 1.3.0-2009-04-20:";;
+ short | recursive ) echo "Configuration of OpenAxiom 1.3.0-2009-04-23:";;
esac
cat <<\_ACEOF
@@ -1580,7 +1580,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-OpenAxiom configure 1.3.0-2009-04-20
+OpenAxiom configure 1.3.0-2009-04-23
generated by GNU Autoconf 2.60
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1594,7 +1594,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by OpenAxiom $as_me 1.3.0-2009-04-20, which was
+It was created by OpenAxiom $as_me 1.3.0-2009-04-23, which was
generated by GNU Autoconf 2.60. Invocation command line was
$ $0 $@
@@ -26808,7 +26808,7 @@ exec 6>&1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by OpenAxiom $as_me 1.3.0-2009-04-20, which was
+This file was extended by OpenAxiom $as_me 1.3.0-2009-04-23, which was
generated by GNU Autoconf 2.60. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -26857,7 +26857,7 @@ Report bugs to <bug-autoconf@gnu.org>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-OpenAxiom config.status 1.3.0-2009-04-20
+OpenAxiom config.status 1.3.0-2009-04-23
configured by $0, generated by GNU Autoconf 2.60,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff --git a/configure.ac b/configure.ac
index c2c962d3..94ea1ed4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,6 @@
sinclude(config/open-axiom.m4)
sinclude(config/aclocal.m4)
-AC_INIT([OpenAxiom], [1.3.0-2009-04-20],
+AC_INIT([OpenAxiom], [1.3.0-2009-04-23],
[open-axiom-bugs@lists.sf.net])
AC_CONFIG_AUX_DIR(config)
diff --git a/configure.ac.pamphlet b/configure.ac.pamphlet
index 3d293b4a..234706ab 100644
--- a/configure.ac.pamphlet
+++ b/configure.ac.pamphlet
@@ -1131,7 +1131,7 @@ information:
<<Autoconf init>>=
sinclude(config/open-axiom.m4)
sinclude(config/aclocal.m4)
-AC_INIT([OpenAxiom], [1.3.0-2009-04-20],
+AC_INIT([OpenAxiom], [1.3.0-2009-04-23],
[open-axiom-bugs@lists.sf.net])
@
diff --git a/src/ChangeLog b/src/ChangeLog
index 6f839da9..30faef3d 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,13 @@
+2009-04-23 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
+ * interp/compiler.boot ($IOFormDomains): New.
+ (compAtom): Allow implicit coercion to IO forms for values of
+ fundamental types.
+ (compSymbol): Likewise.
+ (compQuote): Likewise.
+ * algebra/aggcat.spad.pamphlet (coerce$BinaryRecursiveAggregate):
+ Don't hard code empty bracket.
+
2009-04-22 Gabriel Dos Reis <gdr@cs.tamu.edu>
* interp/sys-constants.boot ($SystemInlinableConstructorNames):
diff --git a/src/algebra/aggcat.spad.pamphlet b/src/algebra/aggcat.spad.pamphlet
index 86d91cba..8e941ff8 100644
--- a/src/algebra/aggcat.spad.pamphlet
+++ b/src/algebra/aggcat.spad.pamphlet
@@ -1326,7 +1326,7 @@ BinaryRecursiveAggregate(S:Type):Category == RecursiveAggregate S with
if S has CoercibleTo(OutputForm) then
coerce(t:%): OutputForm ==
- empty? t => "[]"::OutputForm
+ empty? t => bracket(empty()$OutputForm)
v := value(t):: OutputForm
empty? left t =>
empty? right t => v
diff --git a/src/algebra/strap/BOOLEAN.lsp b/src/algebra/strap/BOOLEAN.lsp
index 9241d5a1..2ca05a21 100644
--- a/src/algebra/strap/BOOLEAN.lsp
+++ b/src/algebra/strap/BOOLEAN.lsp
@@ -201,8 +201,8 @@
|BOOLEAN;size;Nni;18| (|Integer|) (8 . |even?|)
(|PositiveInteger|) |BOOLEAN;index;Pi$;19| (13 . |One|)
|BOOLEAN;lookup;$Pi;20| (17 . |random|)
- |BOOLEAN;random;$;21| (|Symbol|) (|InputForm|)
- (21 . |convert|) |BOOLEAN;convert;$If;22| (|OutputForm|)
+ |BOOLEAN;random;$;21| (|OutputForm|) (|InputForm|)
+ (21 . |convert|) |BOOLEAN;convert;$If;22| (|Symbol|)
(26 . |outputForm|) |BOOLEAN;coerce;$Of;23| (|String|)
(|SingleInteger|))
'#(~= 31 ~ 37 |xor| 42 |true| 48 |test| 52 |size| 57 |random|
@@ -219,10 +219,10 @@
(|PropositionalLogic|) (|Finite|)
(|Logic|) (|SetCategory|)
(|ConvertibleTo| 36) (|BasicType|)
- (|CoercibleTo| 39))
+ (|CoercibleTo| 35))
(|makeByteWordVec2| 43
'(0 10 0 11 0 10 0 12 1 27 10 0 28 0 29
- 0 31 0 27 0 33 1 36 0 35 37 1 39 0 35
+ 0 31 0 27 0 33 1 36 0 35 37 1 35 0 39
40 2 0 10 0 0 1 1 0 0 0 13 2 0 0 0 0
18 0 0 0 7 1 0 0 0 6 0 0 25 26 0 0 0
34 2 0 0 0 0 16 1 0 0 0 9 2 0 0 0 0
@@ -230,7 +230,7 @@
0 0 1 2 0 0 0 0 1 1 0 29 0 32 1 0 42
0 1 1 0 0 29 30 2 0 0 0 0 22 1 0 43 0
1 0 0 0 8 2 0 0 0 0 23 1 0 36 0 38 1
- 0 39 0 41 2 0 0 0 0 14 2 0 0 0 0 17 2
+ 0 35 0 41 2 0 0 0 0 14 2 0 0 0 0 17 2
0 10 0 0 1 2 0 10 0 0 1 2 0 10 0 0 21
2 0 10 0 0 1 2 0 10 0 0 24 2 0 0 0 0
15)))))
diff --git a/src/algebra/strap/LIST.lsp b/src/algebra/strap/LIST.lsp
index d446ced6..6eda32ee 100644
--- a/src/algebra/strap/LIST.lsp
+++ b/src/algebra/strap/LIST.lsp
@@ -203,7 +203,7 @@
(PROGN
(LETT |dv$1| (|devaluate| |#1|) . #0=(|List|))
(LETT |dv$| (LIST '|List| |dv$1|) . #0#)
- (LETT $ (|newShell| 70) . #0#)
+ (LETT $ (|newShell| 69) . #0#)
(|setShellEntry| $ 0 |dv$|)
(|setShellEntry| $ 3
(LETT |pv$|
@@ -287,14 +287,14 @@
(97 . |removeDuplicates|) (102 . |setUnion|)
(108 . |empty|) (112 . |empty?|) (117 . |member?|)
(123 . |setIntersection|) (129 . |elt|) (135 . |concat|)
- (141 . |setDifference|) (|Symbol|) (|InputForm|)
+ (141 . |setDifference|) (|OutputForm|) (|InputForm|)
(147 . |convert|) (152 . |convert|) (|List| 45)
(157 . |concat|) (|List| $) (163 . |convert|)
(168 . |convert|) (|Mapping| 6 6 6) (|NonNegativeInteger|)
(|List| 6) (|Equation| 6) (|List| 56) (|Mapping| 10 6)
(|Mapping| 10 6 6) (|UniversalSegment| 7) '"last" '"rest"
- '"first" '"value" (|Mapping| 6 6) (|OutputForm|)
- (|SingleInteger|) (|List| 7) (|Union| 6 '"failed"))
+ '"first" '"value" (|Mapping| 6 6) (|SingleInteger|)
+ (|List| 7) (|Union| 6 '"failed"))
'#(|setUnion| 173 |setIntersection| 179 |setDifference| 185
|rest| 191 |removeDuplicates| 196 |null| 201 |nil| 206
|member?| 210 |first| 216 |empty?| 221 |empty| 226 |elt|
@@ -325,7 +325,7 @@
(|OrderedSet|) (|Aggregate|)
(|EltableAggregate| 7 6) (|Evalable| 6)
(|SetCategory|) (|Type|) (|Eltable| 7 6)
- (|InnerEvalable| 6 6) (|CoercibleTo| 66)
+ (|InnerEvalable| 6 6) (|CoercibleTo| 44)
(|ConvertibleTo| 45) (|BasicType|)
(|OpenMath|))
(|makeByteWordVec2| 52
diff --git a/src/algebra/strap/VECTOR.lsp b/src/algebra/strap/VECTOR.lsp
index 50609410..c9db05ae 100644
--- a/src/algebra/strap/VECTOR.lsp
+++ b/src/algebra/strap/VECTOR.lsp
@@ -40,7 +40,7 @@
(PROGN
(LETT |dv$1| (|devaluate| |#1|) . #0=(|Vector|))
(LETT |dv$| (LIST '|Vector| |dv$1|) . #0#)
- (LETT $ (|newShell| 36) . #0#)
+ (LETT $ (|newShell| 35) . #0#)
(|setShellEntry| $ 0 |dv$|)
(|setShellEntry| $ 3
(LETT |pv$|
@@ -96,15 +96,14 @@
(MAKEPROP '|Vector| '|infovec|
(LIST '#(NIL NIL NIL NIL NIL (|IndexedVector| 6 (NRTEVAL 1))
(|local| |#1|) (|Integer|) (0 . |One|) (|List| 6)
- (4 . |construct|) |VECTOR;vector;L$;1| (|Symbol|)
+ (4 . |construct|) |VECTOR;vector;L$;1| (|OutputForm|)
(|InputForm|) (9 . |convert|) (14 . |parts|)
(19 . |convert|) (|List| $) (24 . |convert|)
(29 . |convert|) (|Mapping| 6 6 6) (|Boolean|)
(|NonNegativeInteger|) (|Equation| 6) (|List| 23)
(|Mapping| 21 6) (|Mapping| 21 6 6) (|UniversalSegment| 7)
- (|Void|) (|Mapping| 6 6) (|OutputForm|) (|Matrix| 6)
- (|SingleInteger|) (|String|) (|Union| 6 '"failed")
- (|List| 7))
+ (|Void|) (|Mapping| 6 6) (|Matrix| 6) (|SingleInteger|)
+ (|String|) (|Union| 6 '"failed") (|List| 7))
'#(|vector| 34 |parts| 39 |convert| 44 |construct| 49)
'((|shallowlyMutable| . 0) (|finiteAggregate| . 0))
(CONS (|makeByteWordVec2| 5
@@ -127,7 +126,7 @@
(|OrderedSet|) (|Aggregate|)
(|EltableAggregate| 7 6) (|Evalable| 6)
(|SetCategory|) (|Type|) (|Eltable| 7 6)
- (|InnerEvalable| 6 6) (|CoercibleTo| 30)
+ (|InnerEvalable| 6 6) (|CoercibleTo| 12)
(|ConvertibleTo| 13) (|BasicType|))
(|makeByteWordVec2| 19
'(0 7 0 8 1 0 0 9 10 1 13 0 12 14 1 0 9
diff --git a/src/interp/compiler.boot b/src/interp/compiler.boot
index 1217d63c..82b8567d 100644
--- a/src/interp/compiler.boot
+++ b/src/interp/compiler.boot
@@ -88,9 +88,15 @@ applyMapping: (%Form,%Mode,%Env,%List) -> %Maybe %Triple
$coreDiagnosticFunctions ==
'(error userError systemError)
+$IOFormDomains ==
+ [$InputForm,$OutputForm,$Syntax]
+
++ list of functions to compile
$compileOnlyCertainItems := []
+
+--%
+
compTopLevel: (%Form,%Mode,%Env) -> %Maybe %Triple
compTopLevel(x,m,e) ==
-- signals that target is derived from lhs-- see NRTmakeSlot1Info
@@ -399,7 +405,7 @@ compAtom(x,m,e) ==
convert(T,m)
t:=
isSymbol x => compSymbol(x,m,e) or return nil
- m = $OutputForm and primitiveType x => [x,m,e]
+ member(m,$IOFormDomains) and primitiveType x => [x,m,e]
STRINGP x => [x,x,e]
[x,primitiveType x or return nil,e]
convert(t,m)
@@ -430,7 +436,8 @@ compSymbol(s,m,e) ==
[s,m',e] --s is a declared argument
MEMQ(s,$FormalMapVariableList) =>
stackMessage('"no mode found for %1b",[s])
- m = $OutputForm or m = $Symbol => [['QUOTE,s],m,e]
+ member(m,$IOFormDomains) or member(m,[$Identifier,$Symbol]) =>
+ [['QUOTE,s],m,e]
not isFunction(s,e) => errorRef s
++ Return true if `m' is the most recent unique type case assumption
@@ -957,7 +964,7 @@ compQuote(expr,m,e) ==
expr is ["QUOTE",x] and IDENTP x =>
-- Ideally, Identifier should be the default type. However, for
-- historical reasons we cannot afford that luxury yet.
- m = $Identifier => [expr,$Identifier,e]
+ m = $Identifier or member(m,$IOFormDomains) => [expr,m,e]
convert([expr,$Symbol,e],m)
stackAndThrow('"%1b is not a literal symbol.",[x])