Skip to content

Commit

Permalink
[serokell#179] Remove 'interact' and 'getContents'
Browse files Browse the repository at this point in the history
  • Loading branch information
rockbmb committed Aug 7, 2018
1 parent b0cff00 commit f9ad326
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
10 changes: 0 additions & 10 deletions .hlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions src/Universum/Lifted/File.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit f9ad326

Please sign in to comment.