]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/scl/Sort2.scl
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.scl.compiler / tests / org / simantics / scl / compiler / tests / scl / Sort2.scl
diff --git a/bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/scl/Sort2.scl b/bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/scl/Sort2.scl
new file mode 100644 (file)
index 0000000..8518264
--- /dev/null
@@ -0,0 +1,19 @@
+import "JavaBuiltin" as Java\r
+\r
+importJava "org.simantics.scl.runtime.Lists" where\r
+    sortWith :: (a -> a -> Integer) -> [a] -> [a]\r
+\r
+//@JavaStaticMethod "org.simantics.scl.runtime.Lists.sortWith"\r
+//sortWith :: (a -> a -> Integer) -> [a] -> [a]\r
+\r
+\r
+//sortWith = Java.staticMethod "org.simantics.scl.runtime.Lists.sortWith"\r
+\r
+dumbCompare :: a -> a -> Integer\r
+dumbCompare x y = 0\r
+\r
+dumbSort = sortWith dumbCompare \r
+\r
+main = "Foo"\r
+--\r
+Foo
\ No newline at end of file