diff --git a/.hlint.yaml b/.hlint.yaml index b2b2007..a3ca29d 100644 --- a/.hlint.yaml +++ b/.hlint.yaml @@ -959,10 +959,6 @@ , lhs: Data.Text.IO.writeFile, rhs: Universum.writeFile } - warn: { name: "Use 'appendFile' from Universum" , lhs: Data.Text.IO.appendFile, rhs: Universum.appendFile } -- warn: { name: "Use 'interact' from Universum" - , lhs: Data.Text.Lazy.IO.interact, rhs: Universum.interact } -- warn: { name: "Use 'getContents' from Universum" - , lhs: Data.Text.Lazy.IO.getContents, rhs: Universum.getContents } ## Unsafe - warn: { name: "Use 'head' from Universum.Unsafe" @@ -1036,14 +1032,8 @@ ## others -- warn: { name: "liftIO is not needed", lhs: liftIO Universum.getContents, rhs: Universum.getContents - , note: "If you import 'getContents' from Universum, it's already lifted" } - warn: { name: "liftIO is not needed", lhs: liftIO Universum.getLine, rhs: Universum.getLine , note: "If you import 'getLine' from Universum, it's already lifted" } -- warn: { name: "liftIO is not needed", lhs: liftIO (Universum.interact x), rhs: Universum.interact x - , note: "If you import 'interact' from Universum, it's already lifted" } -- warn: { name: "liftIO is not needed", lhs: liftIO (Universum.interact x), rhs: Universum.interact x - , note: "If you import 'interact' from Universum, it's already lifted" } - warn: { name: "liftIO is not needed", lhs: liftIO (Universum.readFile x), rhs: Universum.readFile x , note: "If you import 'readFile' from Universum, it's already lifted" } - warn: { name: "liftIO is not needed", lhs: liftIO (Universum.writeFile x y), rhs: Universum.writeFile x y diff --git a/src/Universum/Lifted/File.hs b/src/Universum/Lifted/File.hs index 239923a..eb5e2d4 100644 --- a/src/Universum/Lifted/File.hs +++ b/src/Universum/Lifted/File.hs @@ -37,6 +37,7 @@ appendFile a b = liftIO (XIO.appendFile a b) getContents :: MonadIO m => m L.Text getContents = liftIO LIO.getContents {-# INLINE getContents #-} +{-# DEPRECATED getContents "This function will be removed in a future version of this package, do not use it." #-} -- | Lifted version of 'Data.Text.getLine'. getLine :: MonadIO m => m Text @@ -47,6 +48,7 @@ getLine = liftIO XIO.getLine interact :: MonadIO m => (L.Text -> L.Text) -> m () interact a = liftIO (LIO.interact a) {-# INLINE interact #-} +{-# DEPRECATED interact "This function will be removed in a future version of this package, do not use it." #-} -- | Lifted version of 'Data.Text.readFile'. readFile :: MonadIO m => FilePath -> m Text