]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/TypeClass2.scl
(refs #7307) Added features field to SCL module header
[simantics/platform.git] / tests / org.simantics.scl.compiler.tests / src / org / simantics / scl / compiler / tests / scl / TypeClass2.scl
index 5bd09350bdbe15617361fd6ce12b92c908d9bb9f..6afa3a503acfc45e758c8ea6709be9d5c4c9ed96 100644 (file)
@@ -1,28 +1,28 @@
-import "JavaBuiltin" as Java\r
-\r
-(+) = Java.iadd\r
-\r
-class Foo a where\r
-    foo :: a -> Integer\r
-    /*\r
-class (Foo a) => Bar a where\r
-    bar :: a -> Integer\r
-    */\r
-instance Foo Integer where\r
-    foo x = x+1\r
-  /*  \r
-instance Bar Integer where\r
-    bar x = x+2\r
-*/\r
-data X a = X a\r
-\r
-instance (Foo a) => Foo (X a) where\r
-    foo (X a) = foo a\r
-    /*\r
-instance (Bar a) => Bar (X a) where\r
-    bar (X a) = bar a*/\r
-    \r
-main = foo (X (1 :: Integer))\r
-// + bar (X (2 :: Integer))\r
---\r
+import "JavaBuiltin" as Java
+
+(+) = Java.iadd
+
+class Foo a where
+    foo :: a -> Integer
+    /*
+class (Foo a) => Bar a where
+    bar :: a -> Integer
+    */
+instance Foo Integer where
+    foo x = x+1
+  /*  
+instance Bar Integer where
+    bar x = x+2
+*/
+data X a = X a
+
+instance (Foo a) => Foo (X a) where
+    foo (X a) = foo a
+    /*
+instance (Bar a) => Bar (X a) where
+    bar (X a) = bar a*/
+    
+main = foo (X (1 :: Integer))
+// + bar (X (2 :: Integer))
+--
 2
\ No newline at end of file