tools/pas2c/PascalUnitSyntaxTree.hs
changeset 13887 5988e73080a3
parent 10747 07ade56c3b4a
--- a/tools/pas2c/PascalUnitSyntaxTree.hs	Sat Oct 13 18:32:41 2018 +0200
+++ b/tools/pas2c/PascalUnitSyntaxTree.hs	Sat Oct 13 22:38:51 2018 +0200
@@ -5,20 +5,20 @@
     | Unit Identifier Interface Implementation (Maybe Initialize) (Maybe Finalize)
     | System [TypeVarDeclaration]
     | Redo [TypeVarDeclaration]
-    deriving (Show, Eq)
+    deriving (Show, Read, Eq)
 data Interface = Interface Uses TypesAndVars
-    deriving (Show, Eq)
+    deriving (Show, Read, Eq)
 data Implementation = Implementation Uses TypesAndVars
-    deriving (Show, Eq)
+    deriving (Show, Read, Eq)
 data Identifier = Identifier String BaseType
-    deriving (Show, Eq)
+    deriving (Show, Read, Eq)
 data TypesAndVars = TypesAndVars [TypeVarDeclaration]
-    deriving (Show, Eq)
+    deriving (Show, Read, 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, Eq)
+    deriving (Show, Read, Eq)
 data TypeDecl = SimpleType Identifier
     | RangeType Range
     | Sequence [Identifier]
@@ -32,17 +32,17 @@
     | DeriveType InitExpression
     | VoidType
     | VarParamType TypeDecl -- this is a hack
-    deriving (Show, Eq)
+    deriving (Show, Read, Eq)
 data Range = Range Identifier
            | RangeFromTo InitExpression InitExpression
            | RangeInfinite
-    deriving (Show, Eq)
+    deriving (Show, Read, Eq)
 data Initialize = Initialize String
-    deriving (Show, Eq)
+    deriving (Show, Read, Eq)
 data Finalize = Finalize String
-    deriving (Show, Eq)
+    deriving (Show, Read, Eq)
 data Uses = Uses [Identifier]
-    deriving (Show, Eq)
+    deriving (Show, Read, 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, Eq)
+    deriving (Show, Read, Eq)
 data Expression = Expression String
     | BuiltInFunCall [Expression] Reference
     | PrefixOp String Expression
@@ -70,7 +70,7 @@
     | Reference Reference
     | SetExpression [Identifier]
     | Null
-    deriving (Show, Eq)
+    deriving (Show, Read, 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, Eq)
+    deriving (Show, Read, Eq)
 data InitExpression = InitBinOp String InitExpression InitExpression
     | InitPrefixOp String InitExpression
     | InitReference Identifier
@@ -97,7 +97,7 @@
     | InitNull
     | InitRange Range
     | InitTypeCast Identifier InitExpression
-    deriving (Show, Eq)
+    deriving (Show, Read, Eq)
 
 data BaseType = BTUnknown
     | BTChar
@@ -116,4 +116,4 @@
     | BTVoid
     | BTUnit
     | BTVarParam BaseType
-    deriving (Show, Eq)
+    deriving (Show, Read, Eq)