]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/Record1.scl
Automatic execution of SCL tests in Maven
[simantics/platform.git] / tests / org.simantics.scl.compiler.tests / src / org / simantics / scl / compiler / tests / scl / Record1.scl
diff --git a/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/Record1.scl b/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/Record1.scl
new file mode 100644 (file)
index 0000000..fcfbf6a
--- /dev/null
@@ -0,0 +1,9 @@
+import "Prelude"\r
+\r
+data XYS = XYS { x :: Double, y :: Double, s :: String }\r
+\r
+len XYS {x = x, y = y} = sqrt (x*x + y*y)\r
+\r
+main = len (XYS { x = 4, y = 3, s = "Hello world!" })\r
+-- \r
+5.0
\ No newline at end of file