From fc82eee7982cc54db8907892cd688bcd73d11d1e Mon Sep 17 00:00:00 2001 From: Neil Mitchell Date: Mon, 30 Dec 2024 13:19:38 +0000 Subject: [PATCH] Don't mention ErrorCallWithLocation in later GHC Summary: Test Plan: --- src/General/Extra.hs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/General/Extra.hs b/src/General/Extra.hs index da30d44b..39b548a1 100644 --- a/src/General/Extra.hs +++ b/src/General/Extra.hs @@ -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, @@ -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)