From b4e36d2669e4d86d5e183d279e07079a7d6e26bd Mon Sep 17 00:00:00 2001 From: dos-reis Date: Tue, 15 Jan 2008 08:50:07 +0000 Subject: * 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. --- src/testsuite/interpreter/case.input | 5 +++++ src/testsuite/interpreter/case.spad | 10 ++++++++++ 2 files changed, 15 insertions(+) create mode 100644 src/testsuite/interpreter/case.input create mode 100644 src/testsuite/interpreter/case.spad (limited to 'src/testsuite') 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 -- cgit v1.2.3