]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/scl/FunctionalDependencies2.scl
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.scl.compiler / tests / org / simantics / scl / compiler / tests / scl / FunctionalDependencies2.scl
diff --git a/bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/scl/FunctionalDependencies2.scl b/bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/scl/FunctionalDependencies2.scl
new file mode 100644 (file)
index 0000000..707bb9e
--- /dev/null
@@ -0,0 +1,12 @@
+import "Prelude"\r
+\r
+class Mul a b c | a b -> c where\r
+    mul :: a -> b -> c\r
+\r
+instance Mul Integer Integer Integer where\r
+    mul = (*)\r
+\r
+main :: Integer\r
+main = mul (mul (1 :: Integer) (2 :: Integer)) (3 :: Integer)\r
+--\r
+6
\ No newline at end of file