diff --git a/Trace/Hpc/Mix.hs b/Trace/Hpc/Mix.hs index 8907f17eaa94a59535fba90b158a0bcf8db8da9a..7a05ee54dbf117e4201a2cb85d5cbd3e401eb370 100644 --- a/Trace/Hpc/Mix.hs +++ b/Trace/Hpc/Mix.hs @@ -28,7 +28,7 @@ import System.FilePath -- been introduced in that module, accessed by tick-number position -- in the list -import Trace.Hpc.Util (HpcPos, insideHpcPos, Hash, HpcHash(..), catchIO) +import Trace.Hpc.Util (HpcPos, insideHpcPos, Hash, HpcHash(..), catchIO, readFileUtf8) import Trace.Hpc.Tix -- | 'Mix' is the information about a modules static properties, like @@ -93,7 +93,7 @@ readMix dirNames mod' = do res <- sequence [ (do let mixPath = mixName dirName modName parseError = error ("can not parse " ++ mixPath) parse = fromMaybe parseError . readMaybe - mix <- parse `fmap` readFile mixPath + mix <- parse `fmap` readFileUtf8 mixPath case mod' of Left _ -> return $ Just mix -- Bypass hash check Right tix -> return $ checkHash tix mix mixPath) diff --git a/changelog.md b/changelog.md index 1603bec06b6ad4e84e43082f716f708b7dae5772..1b8647dccb542b49375b6a43adbc3853f4272726 100644 --- a/changelog.md +++ b/changelog.md @@ -1,7 +1,8 @@ # Changelog for [`hpc` package](http://hackage.haskell.org/package/hpc) -## 0.7.0.0 *July 2023* +## 0.7.0.0 *August 2023* + * The function `readMix` no longer uses lazyIO to read `.mix` files, which is consistent with the behaviour of the `readTix` function. * The import of the modules from this package is no longer considered safe, since we use functions from the `System.Directory` module from the `directory` package which is no longer considered safe beginning from version `1.3.8`. * Replace uses of `String` by `FilePath` in functions `readTix`, `writeTix`, `getTixFileName`, `readMix` and `mixCreate`. * Remove support for version of GHC below 8.6