--- haskell-src-1.0.1.2.orig/Language/Haskell/Syntax.hs	2008-06-19 08:58:01.000000000 -0300
+++ haskell-src-1.0.1.2/Language/Haskell/Syntax.hs	2008-09-27 19:52:50.000000000 -0300
@@ -161,9 +161,9 @@
 data HsModule = HsModule SrcLoc Module (Maybe [HsExportSpec])
                          [HsImportDecl] [HsDecl]
 #ifdef __GLASGOW_HASKELL__
-  deriving (Show,Typeable,Data)
+  deriving (Eq,Ord,Show,Typeable,Data)
 #else
-  deriving (Show)
+  deriving (Eq,Ord,Show)
 #endif
 
 -- | Export specification.
@@ -181,9 +181,9 @@
 	 | HsEModuleContents Module		-- ^ @module M@:
 			-- re-export a module.
 #ifdef __GLASGOW_HASKELL__
-  deriving (Eq,Show,Typeable,Data)
+  deriving (Eq,Ord,Show,Typeable,Data)
 #else
-  deriving (Eq,Show)
+  deriving (Eq,Ord,Show)
 #endif
 
 -- | Import declaration.
@@ -199,9 +199,9 @@
 			-- by @hiding@.
 	}
 #ifdef __GLASGOW_HASKELL__
-  deriving (Eq,Show,Typeable,Data)
+  deriving (Eq,Ord,Show,Typeable,Data)
 #else
-  deriving (Eq,Show)
+  deriving (Eq,Ord,Show)
 #endif
 
 -- | Import specification.
@@ -216,9 +216,9 @@
 			-- a class imported with some of its methods, or
 			-- a datatype imported with some of its constructors.
 #ifdef __GLASGOW_HASKELL__
-  deriving (Eq,Show,Typeable,Data)
+  deriving (Eq,Ord,Show,Typeable,Data)
 #else
-  deriving (Eq,Show)
+  deriving (Eq,Ord,Show)
 #endif
 
 -- | Associativity of an operator.
@@ -227,9 +227,9 @@
 	 | HsAssocLeft	-- ^ left-associative operator (declared with @infixl@).
 	 | HsAssocRight	-- ^ right-associative operator (declared with @infixr@)
 #ifdef __GLASGOW_HASKELL__
-  deriving (Eq,Show,Typeable,Data)
+  deriving (Eq,Ord,Show,Typeable,Data)
 #else
-  deriving (Eq,Show)
+  deriving (Eq,Ord,Show)
 #endif
 
 data HsDecl
@@ -246,18 +246,18 @@
 	 | HsForeignImport SrcLoc String HsSafety String HsName HsType
 	 | HsForeignExport SrcLoc String String HsName HsType
 #ifdef __GLASGOW_HASKELL__
-  deriving (Eq,Show,Typeable,Data)
+  deriving (Eq,Ord,Show,Typeable,Data)
 #else
-  deriving (Eq,Show)
+  deriving (Eq,Ord,Show)
 #endif
 
 -- | Clauses of a function binding.
 data HsMatch
 	 = HsMatch SrcLoc HsName [HsPat] HsRhs {-where-} [HsDecl]
 #ifdef __GLASGOW_HASKELL__
-  deriving (Eq,Show,Typeable,Data)
+  deriving (Eq,Ord,Show,Typeable,Data)
 #else
-  deriving (Eq,Show)
+  deriving (Eq,Ord,Show)
 #endif
 
 -- | Declaration of a data constructor.
@@ -267,9 +267,9 @@
 	 | HsRecDecl SrcLoc HsName [([HsName],HsBangType)]
 				-- ^ record constructor
 #ifdef __GLASGOW_HASKELL__
-  deriving (Eq,Show,Typeable,Data)
+  deriving (Eq,Ord,Show,Typeable,Data)
 #else
-  deriving (Eq,Show)
+  deriving (Eq,Ord,Show)
 #endif
 
 -- | The type of a constructor argument or field, optionally including
@@ -278,9 +278,9 @@
 	 = HsBangedTy   HsType	-- ^ strict component, marked with \"@!@\"
 	 | HsUnBangedTy HsType	-- ^ non-strict component
 #ifdef __GLASGOW_HASKELL__
-  deriving (Eq,Show,Typeable,Data)
+  deriving (Eq,Ord,Show,Typeable,Data)
 #else
-  deriving (Eq,Show)
+  deriving (Eq,Ord,Show)
 #endif
 
 -- | The right hand side of a function or pattern binding.
@@ -289,9 +289,9 @@
 	 | HsGuardedRhss  [HsGuardedRhs]
 				-- ^ guarded right hand side (/gdrhs/)
 #ifdef __GLASGOW_HASKELL__
-  deriving (Eq,Show,Typeable,Data)
+  deriving (Eq,Ord,Show,Typeable,Data)
 #else
-  deriving (Eq,Show)
+  deriving (Eq,Ord,Show)
 #endif
 
 -- | A guarded right hand side @|@ /exp/ @=@ /exp/.
@@ -299,9 +299,9 @@
 data HsGuardedRhs
 	 = HsGuardedRhs SrcLoc HsExp HsExp
 #ifdef __GLASGOW_HASKELL__
-  deriving (Eq,Show,Typeable,Data)
+  deriving (Eq,Ord,Show,Typeable,Data)
 #else
-  deriving (Eq,Show)
+  deriving (Eq,Ord,Show)
 #endif
 
 -- | Safety level for invoking a foreign entity
@@ -319,9 +319,9 @@
 data HsQualType
 	 = HsQualType HsContext HsType
 #ifdef __GLASGOW_HASKELL__
-  deriving (Eq,Show,Typeable,Data)
+  deriving (Eq,Ord,Show,Typeable,Data)
 #else
-  deriving (Eq,Show)
+  deriving (Eq,Ord,Show)
 #endif
 
 -- | Haskell types and type constructors.
@@ -332,9 +332,9 @@
 	 | HsTyVar   HsName		-- ^ type variable
 	 | HsTyCon   HsQName		-- ^ named type or type constructor
 #ifdef __GLASGOW_HASKELL__
-  deriving (Eq,Show,Typeable,Data)
+  deriving (Eq,Ord,Show,Typeable,Data)
 #else
-  deriving (Eq,Show)
+  deriving (Eq,Ord,Show)
 #endif
 
 type HsContext = [HsAsst]
@@ -359,9 +359,9 @@
 	| HsFloatPrim	Rational	-- ^ GHC unboxed float literal
 	| HsDoublePrim	Rational	-- ^ GHC unboxed double literal
 #ifdef __GLASGOW_HASKELL__
-  deriving (Eq,Show,Typeable,Data)
+  deriving (Eq,Ord,Show,Typeable,Data)
 #else
-  deriving (Eq,Show)
+  deriving (Eq,Ord,Show)
 #endif
 
 -- | Haskell expressions.
@@ -419,9 +419,9 @@
 	| HsWildCard			-- ^ patterns only
 	| HsIrrPat HsExp		-- ^ patterns only
 #ifdef __GLASGOW_HASKELL__
-  deriving (Eq,Show,Typeable,Data)
+  deriving (Eq,Ord,Show,Typeable,Data)
 #else
-  deriving (Eq,Show)
+  deriving (Eq,Ord,Show)
 #endif
 
 -- | A pattern, to be matched against a value.
@@ -441,18 +441,18 @@
 	| HsPWildCard			-- ^ wildcard pattern (@_@)
 	| HsPIrrPat HsPat		-- ^ irrefutable pattern (@~@)
 #ifdef __GLASGOW_HASKELL__
-  deriving (Eq,Show,Typeable,Data)
+  deriving (Eq,Ord,Show,Typeable,Data)
 #else
-  deriving (Eq,Show)
+  deriving (Eq,Ord,Show)
 #endif
 
 -- | An /fpat/ in a labeled record pattern.
 data HsPatField
 	= HsPFieldPat HsQName HsPat
 #ifdef __GLASGOW_HASKELL__
-  deriving (Eq,Show,Typeable,Data)
+  deriving (Eq,Ord,Show,Typeable,Data)
 #else
-  deriving (Eq,Show)
+  deriving (Eq,Ord,Show)
 #endif
 
 -- | This type represents both /stmt/ in a @do@-expression,
@@ -465,36 +465,36 @@
 				-- in a list comprehension, a guard expression
 	| HsLetStmt [HsDecl]	-- ^ local bindings
 #ifdef __GLASGOW_HASKELL__
-  deriving (Eq,Show,Typeable,Data)
+  deriving (Eq,Ord,Show,Typeable,Data)
 #else
-  deriving (Eq,Show)
+  deriving (Eq,Ord,Show)
 #endif
 
 -- | An /fbind/ in a labeled record construction or update expression.
 data HsFieldUpdate
 	= HsFieldUpdate HsQName HsExp
 #ifdef __GLASGOW_HASKELL__
-  deriving (Eq,Show,Typeable,Data)
+  deriving (Eq,Ord,Show,Typeable,Data)
 #else
-  deriving (Eq,Show)
+  deriving (Eq,Ord,Show)
 #endif
 
 -- | An /alt/ in a @case@ expression.
 data HsAlt
 	= HsAlt SrcLoc HsPat HsGuardedAlts [HsDecl]
 #ifdef __GLASGOW_HASKELL__
-  deriving (Eq,Show,Typeable,Data)
+  deriving (Eq,Ord,Show,Typeable,Data)
 #else
-  deriving (Eq,Show)
+  deriving (Eq,Ord,Show)
 #endif
 
 data HsGuardedAlts
 	= HsUnGuardedAlt HsExp		-- ^ @->@ /exp/
 	| HsGuardedAlts  [HsGuardedAlt]	-- ^ /gdpat/
 #ifdef __GLASGOW_HASKELL__
-  deriving (Eq,Show,Typeable,Data)
+  deriving (Eq,Ord,Show,Typeable,Data)
 #else
-  deriving (Eq,Show)
+  deriving (Eq,Ord,Show)
 #endif
 
 -- | A guarded alternative @|@ /exp/ @->@ /exp/.
@@ -502,9 +502,9 @@
 data HsGuardedAlt
 	= HsGuardedAlt SrcLoc HsExp HsExp
 #ifdef __GLASGOW_HASKELL__
-  deriving (Eq,Show,Typeable,Data)
+  deriving (Eq,Ord,Show,Typeable,Data)
 #else
-  deriving (Eq,Show)
+  deriving (Eq,Ord,Show)
 #endif
 
 -----------------------------------------------------------------------------
