]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/StringInterpolation2.scl
(refs #7307) Added features field to SCL module header
[simantics/platform.git] / tests / org.simantics.scl.compiler.tests / src / org / simantics / scl / compiler / tests / scl / StringInterpolation2.scl
index 9d219430b9520594f56ee97327d09a09bbeaf009..cccc17472c9d365e76ff76ba9cf9751220c9f52c 100644 (file)
@@ -1,6 +1,9 @@
-stringSum :: String -> Integer\r
-stringSum "(\(a),\(b),\(c))" = a + b + c\r
-\r
-main = stringSum "(1,2,3)"\r
---\r
-6
\ No newline at end of file
+import "Prelude"
+
+main = match "abc123def" with
+      "abc\(x)fed" -> "X\(x)"
+      "cba\(x)def" -> "Y\(x)"
+      "abc\(x)def" -> "Z\(x)"
+      x            -> "W\(x)"
+--
+Z123
\ No newline at end of file