From 938931c615a6ef1c0dc7eb3ebd12d24b66eb04b5 Mon Sep 17 00:00:00 2001 From: simonmar Date: Tue, 27 Jan 2004 14:41:22 +0000 Subject: [PATCH] [project @ 2004-01-27 14:41:22 by simonmar] error message sorting wibble --- ghc/compiler/main/ErrUtils.lhs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ghc/compiler/main/ErrUtils.lhs b/ghc/compiler/main/ErrUtils.lhs index 9c47296..f5f0b9b 100644 --- a/ghc/compiler/main/ErrUtils.lhs +++ b/ghc/compiler/main/ErrUtils.lhs @@ -30,7 +30,7 @@ import SrcLoc ( srcSpanStart ) import CmdLineOpts ( DynFlags(..), DynFlag(..), dopt, opt_ErrorSpans ) -import List ( replicate ) +import List ( replicate, sortBy ) import System ( ExitCode(..), exitWith ) import IO ( hPutStr, stderr, stdout ) @@ -133,7 +133,7 @@ pprBagOfErrors bag_of_errors sorted_errs = sortLt occ'ed_before bag_ls occ'ed_before err1 err2 = - LT == compare (head (errMsgSpans err1)) (head (errMsgSpans err1)) + LT == compare (head (errMsgSpans err1)) (head (errMsgSpans err2)) pprBagOfWarnings :: Bag WarnMsg -> Pretty.Doc pprBagOfWarnings bag_of_warns = pprBagOfErrors bag_of_warns -- 1.7.10.4