From 1c0f4d17ca8698516021db3fe69b18632307b196 Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Fri, 20 Mar 2009 15:17:15 +0000 Subject: [PATCH] Changed the RecordType item to support multiple attributes (including mobility) --- data/AST.hs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/data/AST.hs b/data/AST.hs index 7bfd0ac..07d822d 100644 --- a/data/AST.hs +++ b/data/AST.hs @@ -460,6 +460,12 @@ data Specification = Specification Meta Name SpecType deriving (Show, Eq, Typeable, Data) +data RecordAttr = RecordAttr + { packedRecord :: Bool + , mobileRecord :: Bool + } + deriving (Show, Eq, Typeable, Data) + -- | The type of a 'Specification'. data SpecType = -- | Set placement for an existing variable. @@ -475,9 +481,8 @@ data SpecType = -- | Declare a user data type. | DataType Meta Type -- | Declare a new record type. - -- The 'Bool' indicates whether the record is @PACKED@. -- The list is the fields of the record. - | RecordType Meta Bool [(Name, Type)] + | RecordType Meta RecordAttr [(Name, Type)] -- | Declare a simple protocol. -- The list contains the types of the items. | Protocol Meta [Type]