Skip to content

Commit

Permalink
Don't mention ErrorCallWithLocation in later GHC
Browse files Browse the repository at this point in the history
Summary:

Test Plan:
  • Loading branch information
ndmitchell committed Dec 30, 2024
1 parent eb37037 commit fc82eee
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/General/Extra.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{-# LANGUAGE ScopedTypeVariables, ConstraintKinds, GeneralizedNewtypeDeriving, ViewPatterns #-}
{-# OPTIONS_GHC -Wno-x-partial -Wno-unrecognised-warning-flags -Wno-deprecations #-}
-- ErrorCallWithLocation is deprecated in GHC 9.12, need to shift away from it sooner or later
{-# LANGUAGE CPP, ScopedTypeVariables, ConstraintKinds, GeneralizedNewtypeDeriving, ViewPatterns #-}
{-# OPTIONS_GHC -Wno-x-partial -Wno-unrecognised-warning-flags #-}

module General.Extra(
getProcessorCount,
Expand Down Expand Up @@ -288,7 +287,9 @@ parseCallStack = reverse . map trimStart . drop1 . lines

callStackFull = parseCallStack $ prettyCallStack $ popCallStack callStack

#if __GLASGOW_HASKELL__ < 912
callStackFromException (fromException -> Just (ErrorCallWithLocation msg loc)) = (parseCallStack loc, toException $ ErrorCall msg)
#endif
callStackFromException e = ([], e)


Expand Down

0 comments on commit fc82eee

Please sign in to comment.