From 871b8aecc4cf32d03185a14a76ab625d109735af Mon Sep 17 00:00:00 2001 From: Ryan Scott <rscott@galois.com> Date: Fri, 19 Aug 2022 09:14:39 -0400 Subject: [PATCH] Patch ghc-debug-commmon to work around ghc/ghc-debug#10 This is a simplistic, CPP-based workaround that doesn't change the API of `ghc-debug-common`. For a more thorough fix that does change the API, see ghc/ghc-debug!11. --- patches/ghc-debug-common-0.2.1.0.patch | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/patches/ghc-debug-common-0.2.1.0.patch b/patches/ghc-debug-common-0.2.1.0.patch index a57af1d2..5e6518a2 100644 --- a/patches/ghc-debug-common-0.2.1.0.patch +++ b/patches/ghc-debug-common-0.2.1.0.patch @@ -1,5 +1,5 @@ diff --git a/src/GHC/Debug/Decode/Convert.hs b/src/GHC/Debug/Decode/Convert.hs -index 5df6523..c2311e9 100644 +index 5df6523..e6048b6 100644 --- a/src/GHC/Debug/Decode/Convert.hs +++ b/src/GHC/Debug/Decode/Convert.hs @@ -1,3 +1,4 @@ @@ -7,7 +7,20 @@ index 5df6523..c2311e9 100644 {- Convert a GenClosure to a DebugClosure -} module GHC.Debug.Decode.Convert where -@@ -40,10 +41,14 @@ convertClosure itb g = +@@ -27,7 +28,11 @@ convertClosure itb g = + GHC.MVarClosure _ a2 a3 a4 -> MVarClosure itb a2 a3 a4 + GHC.MutVarClosure _ a2 -> MutVarClosure itb a2 + GHC.BlockingQueueClosure _ a2 a3 a4 a5 -> BlockingQueueClosure itb a2 a3 a4 a5 +- GHC.TSOClosure _ a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 a16 -> TSOClosure itb a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 a16 ++ GHC.TSOClosure _ a2 a3 a4 a5 a6 a7 ++#if __GLASGOW_HASKELL__ >= 905 ++ _ ++#endif ++ a8 a9 a10 a11 a12 a13 a14 a15 a16 -> TSOClosure itb a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 a16 + -- GHC.StackClosure _ a2 a3 a4 a5 -> StackClosure itb a2 a3 a4 (a2, (StackPtr a5)) + {- + GHC.IntClosure a1 a2 -> IntClosure a1 a2 +@@ -40,10 +45,14 @@ convertClosure itb g = -} GHC.OtherClosure _ a2 a3 -> OtherClosure itb a2 a3 GHC.WeakClosure _ a2 a3 a4 a5 a6 -> -- GitLab