From 74dec3f606015445eff19f40a3cd0fd4be88492d Mon Sep 17 00:00:00 2001 From: "simonpj@microsoft.com" Date: Fri, 24 Nov 2006 11:08:30 +0000 Subject: [PATCH] Use existing Ord instance on Int, saving code --- compiler/basicTypes/SrcLoc.lhs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/compiler/basicTypes/SrcLoc.lhs b/compiler/basicTypes/SrcLoc.lhs index 52c4717..99ce717 100644 --- a/compiler/basicTypes/SrcLoc.lhs +++ b/compiler/basicTypes/SrcLoc.lhs @@ -133,11 +133,7 @@ cmpSrcLoc (ImportedLoc m1) (ImportedLoc m2) = m1 `compare` m2 cmpSrcLoc (ImportedLoc _) other = LT cmpSrcLoc (SrcLoc s1 l1 c1) (SrcLoc s2 l2 c2) - = (s1 `compare` s2) `thenCmp` (l1 `cmpline` l2) `thenCmp` (c1 `cmpline` c2) - where - l1 `cmpline` l2 | l1 < l2 = LT - | l1 == l2 = EQ - | otherwise = GT + = (s1 `compare` s2) `thenCmp` (l1 `compare` l2) `thenCmp` (c1 `compare` c2) cmpSrcLoc (SrcLoc _ _ _) other = GT instance Outputable SrcLoc where -- 1.7.10.4