Allow users to reverse the error list in GHC/GHCi
austin bgamari thomie
- rGHC499ce291b6ba: Add flag to reverse errors in GHC/GHCi
- Trac Issues
Looks reasonable enough to me.
Instead of sorting the list and then reversing it, you might consider simply flipping the sort comparison,
sortMsgBag dflags = sortBy (maybeFlip $ comparing errMsgSpan) . bagToList where maybeFlip | fromMaybe False (reverseErrors dflags) = flip | otherwise = id