aboutsummaryrefslogtreecommitdiff
path: root/src/algebra/syntax.spad.pamphlet
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2008-01-21 22:28:36 +0000
committerdos-reis <gdr@axiomatics.org>2008-01-21 22:28:36 +0000
commita2de2f06e723208d905a5a98cb4e9016951319a1 (patch)
tree164f00c727a3d0b715bcddaf5538a661dc7eda80 /src/algebra/syntax.spad.pamphlet
parentc7b1a28f3a9155c73d243ab85dd8ccfbb697c78a (diff)
downloadopen-axiom-a2de2f06e723208d905a5a98cb4e9016951319a1.tar.gz
* algebra/syntax.spad.pamphlet (Syntax): Assert a member of
SetCategory. Implement equality. * algebra/Makefile.pamphlet (axiom_algebra_layer_0): Move BASTYPE.o from layer 3 to here. Move SYNTAX.o from here to layer 1. (axiom_algebra_layer_1): Move CTROCALL.o to layer 2. * share/algebra: Update database.
Diffstat (limited to 'src/algebra/syntax.spad.pamphlet')
-rw-r--r--src/algebra/syntax.spad.pamphlet8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/algebra/syntax.spad.pamphlet b/src/algebra/syntax.spad.pamphlet
index 4b3ce07f..bf95adcc 100644
--- a/src/algebra/syntax.spad.pamphlet
+++ b/src/algebra/syntax.spad.pamphlet
@@ -23,11 +23,12 @@
++ and strings. This domain differs from InputForm in that it represents
++ any entity from a Spad program, not just expressions.
++ Related Constructors: Boolean, Integer, Float, symbol, String, SExpression.
-++ See Also: SExpression.
+++ See Also: SExpression, SetCategory
+++ The equality supported by this domain is structural.
++ Fixme: Provide direct support for boolean values, arbritrary
++ precision float point values.
Syntax(): Public == Private where
- Public ==> Join(UnionType, CoercibleTo(OutputForm)) with
+ Public ==> Join(UnionType, SetCategory) with
convert: % -> SExpression
++ convert(s) returns the s-expression representation of a syntax.
@@ -117,6 +118,9 @@ Syntax(): Public == Private where
per(x: SExpression): % ==
x pretend %
+ x = y ==
+ EQUAL(x,y)$Lisp @ Boolean
+
s case Integer ==
integer? rep s