]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/ExpressionParsing.scl
Fixed all line endings of the repository
[simantics/platform.git] / tests / org.simantics.scl.compiler.tests / src / org / simantics / scl / compiler / tests / scl / ExpressionParsing.scl
index 6719bf935fab62cf14daf1716984e530fb219436..ede200844ca35d21231e027d303b9093ff4f471a 100644 (file)
@@ -1,27 +1,27 @@
-import "Prelude"\r
-\r
-data Exp = Exp String\r
-\r
-expToString :: Exp -> String\r
-expToString (Exp s) = s\r
-\r
-instance Additive Exp where\r
-    zero = Exp "0"\r
-    Exp a + Exp b = Exp ("(" + a + " + " + b + ")")\r
-\r
-instance Ring Exp where\r
-    one = Exp "1"\r
-    neg (Exp a) = Exp ("(-" + a + ")")\r
-    Exp a * Exp b = Exp ("(" + a + " * " + b + ")")\r
-    Exp a - Exp b = Exp ("(" + a + " - " + b + ")")\r
-    fromInteger x = Exp (show x)\r
-    \r
-a = Exp "a"\r
-b = Exp "b"\r
-c = Exp "c"\r
-d = Exp "d"\r
-e = Exp "e"\r
-\r
-main = expToString (a + b*c + d*e)\r
---\r
+import "Prelude"
+
+data Exp = Exp String
+
+expToString :: Exp -> String
+expToString (Exp s) = s
+
+instance Additive Exp where
+    zero = Exp "0"
+    Exp a + Exp b = Exp ("(" + a + " + " + b + ")")
+
+instance Ring Exp where
+    one = Exp "1"
+    neg (Exp a) = Exp ("(-" + a + ")")
+    Exp a * Exp b = Exp ("(" + a + " * " + b + ")")
+    Exp a - Exp b = Exp ("(" + a + " - " + b + ")")
+    fromInteger x = Exp (show x)
+    
+a = Exp "a"
+b = Exp "b"
+c = Exp "c"
+d = Exp "d"
+e = Exp "e"
+
+main = expToString (a + b*c + d*e)
+--
 ((a + (b * c)) + (d * e)) 
\ No newline at end of file