diff --git a/CHANGELOG.md b/CHANGELOG.md index 61db2eb..74e9535 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Revision history for recover-rtti +## 0.5.2 -- 2025-12-16 + +* Support `unordered-containers-0.2.21` (Brandon Chinn, #45) + ## 0.5.1 -- 2025-07-19 * Relax bounds, including support for `QuickCheck-2.16` diff --git a/recover-rtti.cabal b/recover-rtti.cabal index 127431a..5cae49c 100644 --- a/recover-rtti.cabal +++ b/recover-rtti.cabal @@ -1,6 +1,6 @@ cabal-version: 2.4 name: recover-rtti -version: 0.5.1 +version: 0.5.2 synopsis: Recover run-time type information from the GHC heap description: The main function in this package is 'classify', which looks at the GHC heap to recover type information about arbitrary diff --git a/src/Debug/RecoverRTTI/Classify.hs b/src/Debug/RecoverRTTI/Classify.hs index f0310ca..c8d49ea 100644 --- a/src/Debug/RecoverRTTI/Classify.hs +++ b/src/Debug/RecoverRTTI/Classify.hs @@ -1,4 +1,6 @@ {-# LANGUAGE CPP #-} +{-# LANGUAGE MagicHash #-} +{-# LANGUAGE UnboxedTuples #-} {-# OPTIONS_GHC -fno-warn-orphans #-} @@ -358,7 +360,9 @@ classifyHMArray = classifyArrayLike C_HM_Array HashMap.Array.length - (`HashMap.Array.index` 0) + hmHead + where + hmHead a = case HashMap.Array.index# a 0 of (# x #) -> x classifyPrimArray :: Prim.Array a