Skip to content

Commit

Permalink
hGetContents' is not available in ghc-8.10.7. Try hGetContents from
Browse files Browse the repository at this point in the history
Data.Text.IO
  • Loading branch information
Jimbo4350 committed Nov 19, 2024
1 parent c4e66dc commit dd8b4ec
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cardano-api/gen/Test/Hedgehog/Golden/ErrorMessage.hs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import Data.Algorithm.Diff (PolyDiff (Both), getGroupedDiff)
import Data.Algorithm.DiffOutput (ppDiff)
import Data.Data
import qualified Data.List as List
import qualified Data.Text as Text
import qualified Data.Text.IO as Text
import GHC.Stack (HasCallStack, withFrozenCallStack)
import qualified GHC.Stack as GHC
import qualified System.Directory as IO
Expand Down Expand Up @@ -181,7 +183,7 @@ checkAgainstGoldenFile
checkAgainstGoldenFile goldenFile actualLines = GHC.withFrozenCallStack $ do
referenceLines <- liftIO $ IO.withFile goldenFile IO.ReadMode $ \handle -> do
IO.hSetEncoding handle IO.utf8
List.lines <$> IO.hGetContents' handle
List.lines . Text.unpack <$> Text.hGetContents handle
let difference = getGroupedDiff actualLines referenceLines
case difference of
[] -> pure ()
Expand Down

0 comments on commit dd8b4ec

Please sign in to comment.