aboutsummaryrefslogtreecommitdiff
path: root/src/testsuite/interpreter
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2008-01-15 08:50:07 +0000
committerdos-reis <gdr@axiomatics.org>2008-01-15 08:50:07 +0000
commitb4e36d2669e4d86d5e183d279e07079a7d6e26bd (patch)
tree939097e6ca6364393f3cd65f297c5bbd8e4ef4ee /src/testsuite/interpreter
parentc4283c6a980fa9faacc66090e90d6243ae6c03db (diff)
downloadopen-axiom-b4e36d2669e4d86d5e183d279e07079a7d6e26bd.tar.gz
* algebra/syntax.spad (autoCoerce$Syntax): Add overloads.
* interp/compiler.boot (coerceExtraHard): Always coerce by autoCoerce. * testsuite/interpreter/case.spad: Likewise. * testsuite/interpreter/case.input: New.
Diffstat (limited to 'src/testsuite/interpreter')
-rw-r--r--src/testsuite/interpreter/case.input5
-rw-r--r--src/testsuite/interpreter/case.spad10
2 files changed, 15 insertions, 0 deletions
diff --git a/src/testsuite/interpreter/case.input b/src/testsuite/interpreter/case.input
new file mode 100644
index 00000000..085099d4
--- /dev/null
+++ b/src/testsuite/interpreter/case.input
@@ -0,0 +1,5 @@
+++ Contributed by Yixin Cao
+)co "case.spad"
+b:=convert("b")@Symbol
+c:=b::Syntax
+test c
diff --git a/src/testsuite/interpreter/case.spad b/src/testsuite/interpreter/case.spad
new file mode 100644
index 00000000..edbdaadd
--- /dev/null
+++ b/src/testsuite/interpreter/case.spad
@@ -0,0 +1,10 @@
+++ Contibuted by Yixin Cao
+)abbrev domain TD TestDomain
+TestDomain :Public == Private where
+ Public == with
+ test: Syntax -> Boolean
+
+ Private == add
+ test(x) ==
+ if x case Symbol then coerce(x)@Symbol
+ x case Symbol