From 4b907bfc8e6655a79e10b6d4850b9430c2f65eeb Mon Sep 17 00:00:00 2001 From: alexbiehl Date: Sun, 4 Feb 2018 18:38:33 +0100 Subject: Use withBinaryFile --- haddock-api/src/Haddock/Backends/Xhtml.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'haddock-api') diff --git a/haddock-api/src/Haddock/Backends/Xhtml.hs b/haddock-api/src/Haddock/Backends/Xhtml.hs index 60d3e985..d03cf0ba 100644 --- a/haddock-api/src/Haddock/Backends/Xhtml.hs +++ b/haddock-api/src/Haddock/Backends/Xhtml.hs @@ -355,7 +355,7 @@ ppJsonIndex :: FilePath -> IO () ppJsonIndex odir maybe_source_url maybe_wiki_url unicode qual_opt ifaces = do createDirectoryIfMissing True odir - IO.withFile (joinPath [odir, indexJsonFile]) IO.WriteMode $ \h -> do + IO.withBinaryFile (joinPath [odir, indexJsonFile]) IO.WriteMode $ \h -> do Builder.hPutBuilder h (encodeToBuilder modules) where modules :: Value -- cgit v1.2.3