hi-file-parser 0.1.5.0 → 0.1.6.0
raw patch · 3 files changed
+33/−2 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- ChangeLog.md +10/−0
- hi-file-parser.cabal +1/−1
- src/HiFileParser.hs +22/−1
ChangeLog.md view
@@ -6,6 +6,16 @@ and this project adheres to the [Haskell Package Versioning Policy](https://pvp.haskell.org/). +## 0.1.6.0 - 2023-11-04 + +* Add further support for GHC 9.8 (GHC 9.8.1 onward). See + [#20](https://github.com/commercialhaskell/hi-file-parser/pull/20) + +## 0.1.5.0 - 2023-10-11 + +* Add support for GHC 9.8 (GHC 9.8.1 onward). See + [#17](https://github.com/commercialhaskell/hi-file-parser/pull/17) + ## 0.1.4.0 - 2023-04-28 * Add further support for GHC 9.4 (GHC 9.4.5 onward) and support for GHC 9.6.
hi-file-parser.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack name: hi-file-parser -version: 0.1.5.0 +version: 0.1.6.0 synopsis: Parser for GHC's hi files description: Please see the README on Github at <https://github.com/commercialhaskell/hi-file-parser/blob/master/README.md> category: Development
src/HiFileParser.hs view
@@ -595,7 +595,7 @@ since V9045 $ void getFastString -- usg_unit_id void getFP -- usg_mod_hash void (getMaybe getFP) -- usg_exports - void (getList (getTuple (getWord8 *> getFastString) getFP)) -- usg_entities + void getEntitiesList -- usg_entities void getBool -- usg_safe pure Nothing @@ -620,6 +620,27 @@ pure Nothing _ -> fail $ "Invalid usageType: " <> show usageType + + getEntitiesList :: Get (List (ByteString, ())) + getEntitiesList = getList (getTuple (getNameSpace *> getFastString) getFP) + + -- See `instance Binary NameSpace` in module GHC.Types.Name.Occurrence. We + -- discard the information. + getNameSpace :: Get () + getNameSpace = if version >= V9081 + then do + nameSpaceType <- getWord8 + case nameSpaceType of + 0 -> pure () + 1 -> pure () + 2 -> pure () + 3 -> pure () + -- Unlike the original, we test that the byte we have obtained is + -- valid. + 4 -> do + void getFastString + _ -> fail $ "Invalid NameSpace type: " <> show nameSpaceType + else void getWord8 getInterface :: Get Interface getInterface = do