aboutsummaryrefslogtreecommitdiff
path: root/src/algebra
diff options
context:
space:
mode:
Diffstat (limited to 'src/algebra')
-rw-r--r--src/algebra/sex.spad.pamphlet1
-rw-r--r--src/algebra/syntax.spad.pamphlet5
2 files changed, 4 insertions, 2 deletions
diff --git a/src/algebra/sex.spad.pamphlet b/src/algebra/sex.spad.pamphlet
index 3e969f92..1175412e 100644
--- a/src/algebra/sex.spad.pamphlet
+++ b/src/algebra/sex.spad.pamphlet
@@ -112,6 +112,7 @@ SExpressionOf(Str, Sym, Int, Flt, Expr): Decl == Body where
coerce(b:%):OutputForm ==
null? b => paren empty()
+ string? b => string(b)::OutputForm
atom? b => coerce(b)$Rep
r := b
while not atom? r repeat r := cdr r
diff --git a/src/algebra/syntax.spad.pamphlet b/src/algebra/syntax.spad.pamphlet
index a649c1f5..e0d71282 100644
--- a/src/algebra/syntax.spad.pamphlet
+++ b/src/algebra/syntax.spad.pamphlet
@@ -129,8 +129,9 @@ Syntax(): Public == Private where
IDENTP(s)$Lisp
coerce(x: %): OutputForm ==
- x case String => outputForm(x : String)
- x pretend OutputForm
+ -- For the moment, print syntax as s-expression.
+ import SExpression
+ (x pretend SExpression)::OutputForm
convert(x: %): SExpression ==
x : SExpression