Skip to content

Commit fc82eee

Browse files
committed
Don't mention ErrorCallWithLocation in later GHC
Summary: Test Plan:
1 parent eb37037 commit fc82eee

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/General/Extra.hs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
{-# LANGUAGE ScopedTypeVariables, ConstraintKinds, GeneralizedNewtypeDeriving, ViewPatterns #-}
2-
{-# OPTIONS_GHC -Wno-x-partial -Wno-unrecognised-warning-flags -Wno-deprecations #-}
3-
-- ErrorCallWithLocation is deprecated in GHC 9.12, need to shift away from it sooner or later
1+
{-# LANGUAGE CPP, ScopedTypeVariables, ConstraintKinds, GeneralizedNewtypeDeriving, ViewPatterns #-}
2+
{-# OPTIONS_GHC -Wno-x-partial -Wno-unrecognised-warning-flags #-}
43

54
module General.Extra(
65
getProcessorCount,
@@ -288,7 +287,9 @@ parseCallStack = reverse . map trimStart . drop1 . lines
288287

289288
callStackFull = parseCallStack $ prettyCallStack $ popCallStack callStack
290289

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

294295

0 commit comments

Comments
 (0)