X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FbasicTypes%2FSrcLoc.lhs;h=e028c1267696554047816469e012be63b6bdcad3;hb=55710e16202e985f8e4f910a09dfc2d0298ca255;hp=2dc6c48415c17a7d54eb8cd8c540ea2b5da3bb0a;hpb=8eb5a108434cbe0af52650444a2fac9d55d2a491;p=ghc-hetmet.git diff --git a/compiler/basicTypes/SrcLoc.lhs b/compiler/basicTypes/SrcLoc.lhs index 2dc6c48..e028c12 100644 --- a/compiler/basicTypes/SrcLoc.lhs +++ b/compiler/basicTypes/SrcLoc.lhs @@ -1,11 +1,6 @@ % -% (c) The University of Glasgow, 1992-2003 +% (c) The University of Glasgow, 1992-2006 % -%************************************************************************ -%* * -\section[SrcLoc]{The @SrcLoc@ type} -%* * -%************************************************************************ \begin{code} module SrcLoc ( @@ -35,14 +30,16 @@ module SrcLoc ( -- These are dubious exports, because they crash on some inputs, -- used only in Lexer.x where we are sure what the Span looks like - srcSpanFile, srcSpanEndLine, srcSpanEndCol, + srcSpanFile, + srcSpanStartLine, srcSpanEndLine, + srcSpanStartCol, srcSpanEndCol, Located(..), getLoc, unLoc, noLoc, eqLocated, cmpLocated, combineLocs, addCLoc ) where #include "HsVersions.h" -import Util ( thenCmp ) +import Util import Outputable import FastString \end{code} @@ -138,11 +135,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