diff options
| author | krasimir <krasimir@chalmers.se> | 2009-07-22 09:53:39 +0000 |
|---|---|---|
| committer | krasimir <krasimir@chalmers.se> | 2009-07-22 09:53:39 +0000 |
| commit | 3473f0d274fdeaa2a29bfeebacc63a6f5aaaaf9d (patch) | |
| tree | aabcc3064ca846706bfbd7ab7ad4119d3fc27262 /testsuite/compiler/check/strMatch | |
| parent | 4f21b57a862793f32dcc4ad639bfac2329ce94a9 (diff) | |
added testcase for pattern matching on runtime variables
Diffstat (limited to 'testsuite/compiler/check/strMatch')
| -rw-r--r-- | testsuite/compiler/check/strMatch/strMatch.gf | 5 | ||||
| -rw-r--r-- | testsuite/compiler/check/strMatch/strMatch.gfs | 2 | ||||
| -rw-r--r-- | testsuite/compiler/check/strMatch/strMatchCnc.gf | 8 |
3 files changed, 15 insertions, 0 deletions
diff --git a/testsuite/compiler/check/strMatch/strMatch.gf b/testsuite/compiler/check/strMatch/strMatch.gf new file mode 100644 index 000000000..c1d2bc4b9 --- /dev/null +++ b/testsuite/compiler/check/strMatch/strMatch.gf @@ -0,0 +1,5 @@ +abstract strMatch = {
+ cat S ;
+ fun f : S -> S ;
+ z : S ;
+}
\ No newline at end of file diff --git a/testsuite/compiler/check/strMatch/strMatch.gfs b/testsuite/compiler/check/strMatch/strMatch.gfs new file mode 100644 index 000000000..8f039c1de --- /dev/null +++ b/testsuite/compiler/check/strMatch/strMatch.gfs @@ -0,0 +1,2 @@ +i testsuite/compiler/check/strMatch/strMatch.gf
+l f z
\ No newline at end of file diff --git a/testsuite/compiler/check/strMatch/strMatchCnc.gf b/testsuite/compiler/check/strMatch/strMatchCnc.gf new file mode 100644 index 000000000..c1a21b4af --- /dev/null +++ b/testsuite/compiler/check/strMatch/strMatchCnc.gf @@ -0,0 +1,8 @@ +concrete strMatchCnc of strMatch = open Prelude in {
+ lincat S = {s : Str; b : Bool} ;
+ lin f x = case x.s of {
+ "" => {s="empty"; b=False} ;
+ _ => x
+ } ;
+ lin z = {s=""; b=False} ;
+}
\ No newline at end of file |
