module-management-0.20.4: Clean up module imports, split and merge modules

Safe HaskellSafe-Inferred
LanguageHaskell98

Language.Haskell.Modules.Util.DryIO

Synopsis

Documentation

class MonadIO m => MonadDryRun m where Source

Methods

dry :: m Bool Source

putDry :: Bool -> m () Source

Instances

dryIO :: MonadDryRun m => IO () -> m () Source

dryIO' :: MonadDryRun m => IO a -> IO a -> m a Source

replaceFile :: MonadDryRun m => (FilePath -> Maybe FilePath) -> FilePath -> String -> m () Source

Replace the file at path with the given text, moving the original to the location returned by passing path to backup. If backup is the identity function you're going to have a bad time.