Skip to content

Commit

Permalink
Restore BC compatibility for rewriteFile, fixes #4981
Browse files Browse the repository at this point in the history
Signed-off-by: Edward Z. Yang <ezyang@fb.com>
  • Loading branch information
ezyang committed Jan 4, 2018
1 parent e824882 commit a3e1833
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Cabal/Distribution/Simple/Utils.hs
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ module Distribution.Simple.Utils (
-- * reading and writing files safely
withFileContents,
writeFileAtomic,
rewriteFile,
rewriteFileV,

-- * Unicode
Expand Down Expand Up @@ -1437,6 +1438,10 @@ withTempDirectoryEx _verbosity opts targetDir template f = withFrozenCallStack $
-----------------------------------
-- Safely reading and writing files

{-# DEPRECATED rewriteFile "Use rewriteFileV so that Verbosity is respected" #-}
rewriteFile :: FilePath -> String -> IO ()
rewriteFile = rewriteFileV normal

-- | Write a file but only if it would have new content. If we would be writing
-- the same as the existing content then leave the file as is so that we do not
-- update the file's modification time.
Expand Down

0 comments on commit a3e1833

Please sign in to comment.