tools/pas2c/PascalUnitSyntaxTree.hs
changeset 10142 adb804cb2638
parent 10129 cd2a64a1f4aa
child 10747 07ade56c3b4a
--- a/tools/pas2c/PascalUnitSyntaxTree.hs	Sun Feb 16 16:56:53 2014 +0400
+++ b/tools/pas2c/PascalUnitSyntaxTree.hs	Sun Feb 16 22:06:55 2014 +0400
@@ -5,20 +5,20 @@
     | Unit Identifier Interface Implementation (Maybe Initialize) (Maybe Finalize)
     | System [TypeVarDeclaration]
     | Redo [TypeVarDeclaration]
-    deriving Show
+    deriving (Show, Eq)
 data Interface = Interface Uses TypesAndVars
-    deriving Show
+    deriving (Show, Eq)
 data Implementation = Implementation Uses TypesAndVars
-    deriving Show
+    deriving (Show, Eq)
 data Identifier = Identifier String BaseType
-    deriving Show
+    deriving (Show, Eq)
 data TypesAndVars = TypesAndVars [TypeVarDeclaration]
-    deriving Show
+    deriving (Show, Eq)
 data TypeVarDeclaration = TypeDeclaration Identifier TypeDecl
     | VarDeclaration Bool Bool ([Identifier], TypeDecl) (Maybe InitExpression)
     | FunctionDeclaration Identifier Bool Bool Bool TypeDecl [TypeVarDeclaration] (Maybe (TypesAndVars, Phrase))
     | OperatorDeclaration String Identifier Bool TypeDecl [TypeVarDeclaration] (Maybe (TypesAndVars, Phrase))
-    deriving Show
+    deriving (Show, Eq)
 data TypeDecl = SimpleType Identifier
     | RangeType Range
     | Sequence [Identifier]
@@ -32,17 +32,17 @@
     | DeriveType InitExpression
     | VoidType
     | VarParamType TypeDecl -- this is a hack
-    deriving Show
+    deriving (Show, Eq)
 data Range = Range Identifier
            | RangeFromTo InitExpression InitExpression
            | RangeInfinite
-    deriving Show
+    deriving (Show, Eq)
 data Initialize = Initialize String
-    deriving Show
+    deriving (Show, Eq)
 data Finalize = Finalize String
-    deriving Show
+    deriving (Show, Eq)
 data Uses = Uses [Identifier]
-    deriving Show
+    deriving (Show, Eq)
 data Phrase = ProcCall Reference [Expression]
         | IfThenElse Expression Phrase (Maybe Phrase)
         | WhileCycle Expression Phrase
@@ -54,7 +54,7 @@
         | Assignment Reference Expression
         | BuiltInFunctionCall [Expression] Reference
         | NOP
-    deriving Show
+    deriving (Show, Eq)
 data Expression = Expression String
     | BuiltInFunCall [Expression] Reference
     | PrefixOp String Expression
@@ -70,7 +70,7 @@
     | Reference Reference
     | SetExpression [Identifier]
     | Null
-    deriving Show
+    deriving (Show, Eq)
 data Reference = ArrayElement [Expression] Reference
     | FunCall [Expression] Reference
     | TypeCast Identifier Expression
@@ -79,7 +79,7 @@
     | RecordField Reference Reference
     | Address Reference
     | RefExpression Expression
-    deriving Show
+    deriving (Show, Eq)
 data InitExpression = InitBinOp String InitExpression InitExpression
     | InitPrefixOp String InitExpression
     | InitReference Identifier
@@ -96,7 +96,7 @@
     | InitNull
     | InitRange Range
     | InitTypeCast Identifier InitExpression
-    deriving Show
+    deriving (Show, Eq)
 
 data BaseType = BTUnknown
     | BTChar
@@ -115,4 +115,4 @@
     | BTVoid
     | BTUnit
     | BTVarParam BaseType
-    deriving Show
+    deriving (Show, Eq)