Simon Jakobi pushed to branch wip/sjakobi/T22637 at Glasgow Haskell Compiler / GHC Commits: dfc907fa by Simon Jakobi at 2026-03-19T17:48:33+01:00 Fix build - - - - - 2 changed files: - compiler/GHC/Driver/Errors.hs - compiler/GHC/Types/Error.hs Changes: ===================================== compiler/GHC/Driver/Errors.hs ===================================== @@ -16,6 +16,7 @@ import GHC.Utils.Error import GHC.Utils.Outputable import GHC.Utils.Logger import Data.List.NonEmpty (NonEmpty(..)) +import Data.Maybe (fromMaybe) reportError :: Logger -> NamePprCtx -> DiagOpts -> SrcSpan -> SDoc -> IO () reportError logger nameContext opts span doc = do ===================================== compiler/GHC/Types/Error.hs ===================================== @@ -109,7 +109,7 @@ import Data.Bifunctor import Data.Foldable import Data.List.NonEmpty ( NonEmpty (..) ) import qualified Data.List.NonEmpty as NE -import Data.List ( intercalate, sortBy ) +import Data.List ( intercalate, sort ) import Data.Maybe ( mapMaybe, maybeToList ) import Data.Typeable ( Typeable ) import Numeric.Natural ( Natural ) @@ -804,7 +804,7 @@ getCaretDiagnostics msg_class spans = vcat <$> traverse (getSingleCaretDiagnostic msg_class) (dedupSortedRealSpans spans) where dedupSortedRealSpans :: NonEmpty SrcSpan -> [RealSrcSpan] - dedupSortedRealSpans = go Nothing . sortBy leftmost_smallest . mapMaybe srcSpanToRealSrcSpan . NE.toList + dedupSortedRealSpans = go Nothing . sort . mapMaybe srcSpanToRealSrcSpan . NE.toList where go _ [] = [] go prev (span:rest) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/dfc907fa2aea935b99a1519973ca1a28... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/dfc907fa2aea935b99a1519973ca1a28... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Simon Jakobi (@sjakobi2)