]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/FunctionalDependencies1.scl
Automatic execution of SCL tests in Maven
[simantics/platform.git] / tests / org.simantics.scl.compiler.tests / src / org / simantics / scl / compiler / tests / scl / FunctionalDependencies1.scl
diff --git a/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/FunctionalDependencies1.scl b/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/FunctionalDependencies1.scl
new file mode 100644 (file)
index 0000000..203de1d
--- /dev/null
@@ -0,0 +1,11 @@
+import "Prelude"\r
+\r
+class Container c a b | c -> a, c -> b where\r
+    get :: c -> a -> b\r
+\r
+instance Container [a] Integer a where\r
+    get = (!)\r
+\r
+main = get [1,2,3,4,5] 3\r
+--\r
+4
\ No newline at end of file