diagnose 1.8.0 → 1.8.1
raw patch · 2 files changed
+3/−2 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
diagnose.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack name: diagnose-version: 1.8.0+version: 1.8.1 synopsis: Beautiful error reporting done easily description: This package provides a simple way of getting beautiful compiler/interpreter errors using a very simple interface for the programmer.
src/Error/Diagnose/Report/Internal.hs view
@@ -36,6 +36,7 @@ import qualified Data.HashMap.Lazy as IntMap import qualified Data.List as List import qualified Data.List.Safe as List+import Data.Ord (Down (Down)) import Error.Diagnose.Position import Prettyprinter (Doc, Pretty (..), align, annotate, colon, hardline, lbracket, rbracket, space, width, (<+>)) import Prettyprinter.Internal (Doc (..))@@ -298,7 +299,7 @@ sortedMarkersPerLine = {- second (List.sortOn (first $ snd . begin)) <$> -} List.sortOn fst (HashMap.toList markersPerLine) - reportFile = maybe (pretty @Position def) (pretty . fst) $ List.safeHead (List.sortOn snd markers)+ reportFile = maybe (pretty @Position def) (pretty . fst) $ List.safeHead (List.sortOn (Down . snd) markers) -- the reported file is the file of the first 'This' marker (only one must be present) allLineNumbers = List.sort $ List.nub $ (fst <$> sortedMarkersPerLine) <> (multilineMarkers >>= \(Position (bl, _) (el, _) _, _) -> [bl .. el])