aboutsummaryrefslogtreecommitdiff
path: root/src/interp
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2009-04-19 07:28:29 +0000
committerdos-reis <gdr@axiomatics.org>2009-04-19 07:28:29 +0000
commit2d92ed04add1b6a356318af0196dfc4932b171b3 (patch)
treee41e85eb132d8927b011c1c369a3efdf5a1372d4 /src/interp
parentaf3ebc0d983434f91686d8e2ba7bcb21d5083a30 (diff)
downloadopen-axiom-2d92ed04add1b6a356318af0196dfc4932b171b3.tar.gz
* algebra/mkfunc.spad.pamphlet (tuplify$InputForm): Tidy.
* interp/i-output.boot (parms2String): New. (inputForm2String): Handle anonymous functions.
Diffstat (limited to 'src/interp')
-rw-r--r--src/interp/i-output.boot16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/interp/i-output.boot b/src/interp/i-output.boot
index e804fb2d..41dacca2 100644
--- a/src/interp/i-output.boot
+++ b/src/interp/i-output.boot
@@ -1,6 +1,6 @@
-- Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
-- All rights reserved.
--- Copyright (C) 2007-2008, Gabriel Dos Reis.
+-- Copyright (C) 2007-2009, Gabriel Dos Reis.
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
@@ -2666,6 +2666,17 @@ minusForm2String x ==
x isnt ["-",lhs,rhs] => plusForm2String x
strconc(minusForm2String lhs,'" - ", minusForm2String rhs)
+parms2String x ==
+ null x => "()"
+ IDENTP x => x
+ x is [var] => var
+ if x is ["tuple",:.] then x := rest x
+ paren [parm xs for xs in tails x] where
+ paren l == "strconc"/["(",:l,")"]
+ parm xs ==
+ null rest xs => first xs
+ strconc(first xs, ", ")
+
inputForm2String x ==
atom x => primaryForm2String x
[op,:args] := x
@@ -2680,6 +2691,9 @@ inputForm2String x ==
op = "-" => minusForm2String x
op in '(_@ _:_: pretend) =>
typedForm2String(op, first args, second args)
+ op = "+->" =>
+ strconc(parms2String second x, " ", first x, " ",
+ inputForm2String third x)
callForm2String x
callForm2String x