]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/scl/ExpressionParsing.scl
Merged changes from feature/scl to master.
[simantics/platform.git] / bundles / org.simantics.scl.compiler / tests / org / simantics / scl / compiler / tests / scl / ExpressionParsing.scl
diff --git a/bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/scl/ExpressionParsing.scl b/bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/scl/ExpressionParsing.scl
deleted file mode 100644 (file)
index 6719bf9..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-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
-((a + (b * c)) + (d * e)) 
\ No newline at end of file