aboutsummaryrefslogtreecommitdiff
path: root/src/algebra/any.spad.pamphlet
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2010-06-25 13:02:32 +0000
committerdos-reis <gdr@axiomatics.org>2010-06-25 13:02:32 +0000
commit59676ddc602b874061a8acc941f7bb19cd6041f5 (patch)
tree7dfd6316057ba8189605c227f082a55b7643e128 /src/algebra/any.spad.pamphlet
parent094e16ae834eaf254a85781d759e0399a9269fb1 (diff)
downloadopen-axiom-59676ddc602b874061a8acc941f7bb19cd6041f5.tar.gz
* interp/g-opt.boot: Rename %eq to %peq for pointer comparaison.
* interp/g-util.boot: Expand it. * algebra/aggcat.spad.pamphlet: Cleanup. * algebra/any.spad.pamphlet: Likewise. * algebra/boolean.spad.pamphlet: Likewise. * algebra/data.spad.pamphlet: Likewise. * algebra/domain.spad.pamphlet: Likewise. * algebra/files.spad.pamphlet: Likewise. * algebra/laurent.spad.pamphlet: Likewise. * algebra/list.spad.pamphlet: Likewise. * algebra/mappkg.spad.pamphlet: Likewise. * algebra/ore.spad.pamphlet: Likewise. * algebra/padic.spad.pamphlet: Likewise. * algebra/pattern.spad.pamphlet: Likewise. * algebra/sex.spad.pamphlet: Likewise. * algebra/stream.spad.pamphlet: Likewise. * algebra/string.spad.pamphlet: Likewise. * algebra/syntax.spad.pamphlet: Likewise. * algebra/table.spad.pamphlet: Likewise.
Diffstat (limited to 'src/algebra/any.spad.pamphlet')
-rw-r--r--src/algebra/any.spad.pamphlet16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/algebra/any.spad.pamphlet b/src/algebra/any.spad.pamphlet
index 758b47f6..60aa47e9 100644
--- a/src/algebra/any.spad.pamphlet
+++ b/src/algebra/any.spad.pamphlet
@@ -33,7 +33,7 @@ import OutputForm
None():SetCategory == add
coerce(none:%):OutputForm == "NONE" :: OutputForm
- x:% = y:% == EQ(x,y)$Lisp
+ x:% = y:% == %peq(x,y)$Foreign(Builtin)
@
@@ -53,7 +53,7 @@ RuntimeValue(): Type with
++ \spad{eq(x,y)} holds if both values \spad{x} and \spad{y}
++ resides at the same address in memory.
== add
- eq(x,y) == EQ(x,y)$Foreign(Builtin)
+ eq(x,y) == %peq(x,y)$Foreign(Builtin)
@
@@ -84,9 +84,11 @@ Maybe(T: CoercibleTo OutputForm): Public == Private where
nothing: %
++ \spad{nothing} represents failure or absence of value.
Private == add
- nothing == %nothing$Lisp
+ import %nothing: % from Foreign Builtin
+ import %peq: (%,%) -> Boolean from Foreign Builtin
+ nothing == %nothing
just x == x : %
- x case nothing == EQ(x,%nothing$Lisp)$Lisp
+ x case nothing == %peq(x,%nothing)
x case T == not(x case nothing)
autoCoerce x == x : T
coerce(x: T): % == just x
@@ -181,7 +183,7 @@ Any(): SetCategory with
x = y ==
case (x,y) is
(x': exist(S: BasicType) . S, y': S) => x' = y'
- otherwise => EQ(x,y)$Foreign(Builtin)
+ otherwise => %peq(x,y)$Foreign(Builtin)
coerce(x):OutputForm ==
case x is
@@ -296,7 +298,7 @@ Property(): Public == Private where
v := value x
val :=
null? v => false::OutputForm
- EQ(v,'T)$Lisp => true::OutputForm
+ %peq(v,'T)$Foreign(Builtin) => true::OutputForm
v::OutputForm
bracket(infix(outputForm '_=_>, name(x)::OutputForm,
@@ -371,7 +373,7 @@ Contour(): Public == Private where
findBinding(n,c) ==
for b in bindings c repeat
- EQ(n, name b)$Lisp => return just b
+ %peq(n, name b)$Foreign(Builtin) => return just b
nothing
push(b,c) ==