1
0
forked from GitHub/gf-core

added testcase for pattern matching on runtime variables

This commit is contained in:
krasimir
2009-07-22 09:53:39 +00:00
parent 4f21b57a86
commit 3473f0d274
3 changed files with 15 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
abstract strMatch = {
cat S ;
fun f : S -> S ;
z : S ;
}

View File

@@ -0,0 +1,2 @@
i testsuite/compiler/check/strMatch/strMatch.gf
l f z

View File

@@ -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} ;
}