]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/scl/Record1.scl
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.scl.compiler / tests / org / simantics / scl / compiler / tests / scl / Record1.scl
diff --git a/bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/scl/Record1.scl b/bundles/org.simantics.scl.compiler/tests/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