Added Ord instances for all simple types (all no-argument constructors) in the AST module

This commit is contained in:
Neil Brown 2008-01-28 15:22:58 +00:00
parent 7a30a2ceb5
commit 0f085b8d81

View File

@ -164,7 +164,7 @@ data ConversionMode =
DefaultConversion DefaultConversion
| Round | Round
| Trunc | Trunc
deriving (Show, Eq, Typeable, Data) deriving (Show, Eq, Ord, Typeable, Data)
-- | A subscript that can be applied to a variable or an expression. -- | A subscript that can be applied to a variable or an expression.
data Subscript = data Subscript =
@ -276,7 +276,7 @@ data MonadicOp =
| MonadicMinus | MonadicMinus
| MonadicBitNot | MonadicBitNot
| MonadicNot | MonadicNot
deriving (Show, Eq, Typeable, Data) deriving (Show, Eq, Ord, Typeable, Data)
-- | A dyadic (binary) operator. -- | A dyadic (binary) operator.
data DyadicOp = data DyadicOp =
@ -287,7 +287,7 @@ data DyadicOp =
| And | Or | And | Or
| Eq | NotEq | Less | More | LessEq | MoreEq | Eq | NotEq | Less | More | LessEq | MoreEq
| After | After
deriving (Show, Eq, Typeable, Data) deriving (Show, Eq, Ord, Typeable, Data)
-- | An item in an input. -- | An item in an input.
data InputItem = data InputItem =
@ -327,7 +327,7 @@ data Choice = Choice Meta Expression Process
data WaitMode = data WaitMode =
WaitFor WaitFor
| WaitUntil | WaitUntil
deriving (Show, Eq, Typeable, Data) deriving (Show, Eq, Ord, Typeable, Data)
-- | A guard in an @ALT@. -- | A guard in an @ALT@.
data Alternative = data Alternative =
@ -400,7 +400,7 @@ data AbbrevMode =
| Abbrev | Abbrev
-- | An abbreviation by value. -- | An abbreviation by value.
| ValAbbrev | ValAbbrev
deriving (Show, Eq, Typeable, Data) deriving (Show, Eq, Ord, Typeable, Data)
-- | Anything that introduces a new name. -- | Anything that introduces a new name.
data Specification = data Specification =
@ -445,7 +445,7 @@ data SpecType =
-- This indicates whether a function is inlined by the compiler. -- This indicates whether a function is inlined by the compiler.
data SpecMode = data SpecMode =
PlainSpec | InlineSpec PlainSpec | InlineSpec
deriving (Show, Eq, Typeable, Data) deriving (Show, Eq, Ord, Typeable, Data)
-- | Formal parameters for @PROC@s and @FUNCTION@s. -- | Formal parameters for @PROC@s and @FUNCTION@s.
data Formal = data Formal =
@ -473,7 +473,7 @@ data ParMode =
-- 'Processor' instances inside this indicate which processor each parallel -- 'Processor' instances inside this indicate which processor each parallel
-- process runs on. -- process runs on.
| PlacedPar | PlacedPar
deriving (Show, Eq, Typeable, Data) deriving (Show, Eq, Ord, Typeable, Data)
-- | A process. -- | A process.
data Process = data Process =