aboutsummaryrefslogtreecommitdiff
path: root/src/algebra/outform.spad.pamphlet
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2011-02-27 14:00:46 +0000
committerdos-reis <gdr@axiomatics.org>2011-02-27 14:00:46 +0000
commitb38be75faf9e735aaa0baae8ff0118c897128656 (patch)
tree9716fd8b6cd1763c3a975c6c8f8f633c7fefdf21 /src/algebra/outform.spad.pamphlet
parente8ca9eab6dee408a68683147e9df2f0c81c4354e (diff)
downloadopen-axiom-b38be75faf9e735aaa0baae8ff0118c897128656.tar.gz
* algebra/outform.spad.pamphlet (OutputForm) [infix?]: Rewrite.
Diffstat (limited to 'src/algebra/outform.spad.pamphlet')
-rw-r--r--src/algebra/outform.spad.pamphlet16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/algebra/outform.spad.pamphlet b/src/algebra/outform.spad.pamphlet
index 20828ef5..40e09272 100644
--- a/src/algebra/outform.spad.pamphlet
+++ b/src/algebra/outform.spad.pamphlet
@@ -476,7 +476,12 @@ OutputForm(): SetCategory with
== add
import NumberFormats
- import %equal: (%,%) -> Boolean from Foreign Builtin
+ import %peq: (%,%) -> Boolean from Foreign Builtin
+ import %equal: (%,%) -> Boolean from Foreign Builtin
+ import %string?: % -> Boolean from Foreign Builtin
+ import %ident?: % -> Boolean from Foreign Builtin
+ import %nil: % from Foreign Builtin
+ import %property: (%,Identifier) -> % from Foreign Builtin
-- Todo:
-- program forms, greek letters
@@ -503,7 +508,7 @@ OutputForm(): SetCategory with
nn:NonNegativeInteger
sform(s: String): % == s pretend %
- eform(e: Symbol): % == e pretend %
+ eform(e: Identifier): % == e pretend %
iform(i: Integer): % == i pretend %
bless(x: List %): % == x pretend %
@@ -519,7 +524,6 @@ OutputForm(): SetCategory with
outputForm(f:DoubleFloat) ==
-- ??? this really should be rendered in as a sequence of
-- ??? OutputForm bytecodes, not hardcoded here.
- -- ??? FORMAT(NIL$Lisp,format,f)$Lisp
DFLOAT_-FORMAT_-GENERAL(f)$Lisp
outputForm s ==
@@ -619,10 +623,10 @@ OutputForm(): SetCategory with
infix? a ==
e:$ :=
- IDENTP$Lisp a => a
- STRINGP$Lisp a => INTERN$Lisp a
+ %ident? a => a
+ %string? a => INTERN$Lisp a
return false
- if %property(e,'INFIXOP)$Foreign(Builtin) then true else false
+ not %peq(%property(e,'INFIXOP),%nil)
elt(a, l) ==
cons(a, l)