Skip to content

Commit

Permalink
Merge pull request #10389 from MercuryTechnologies/wiggles/fix-withfi…
Browse files Browse the repository at this point in the history
…lecontents-comment

Fix `withFileContents` documentation (lazy IO strikes again)
  • Loading branch information
mergify[bot] committed Sep 30, 2024
2 parents 4e194c6 + 76d5f2f commit 6d25218
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Cabal-syntax/src/Distribution/Utils/Generic.hs
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ wrapLine width = wrap 0 []

-- | Gets the contents of a file, but guarantee that it gets closed.
--
-- The file is read lazily but if it is not fully consumed by the action then
-- the remaining input is truncated and the file is closed.
-- The file is read lazily; if it is not fully consumed by the action then an
-- exception is thrown.
withFileContents :: FilePath -> (String -> IO a) -> IO a
withFileContents name action =
withFile
Expand Down

0 comments on commit 6d25218

Please sign in to comment.