Skip to content

Commit 952082a

Browse files
committed
Refine version for resourcet
1 parent d73a4f9 commit 952082a

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

library/Neovim/Context/Internal.hs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ newtype Neovim env a = Neovim
5656
{ unNeovim :: ResourceT (ReaderT (Config env) IO) a }
5757

5858
deriving (Functor, Applicative, Monad, MonadIO
59-
, MonadThrow, MonadResource)
59+
, MonadThrow)
6060

6161

6262
-- | User facing instance declaration for the reader state.
@@ -68,8 +68,9 @@ instance MonadReader env (Neovim env) where
6868
(r { customConfig = f (customConfig r)})
6969

7070

71+
instance MonadResource (Neovim env) where
72+
liftResourceT m = Neovim $ liftResourceT m
7173

72-
-- newtype UnliftIO m = UnliftIO { unliftIO :: forall a. m a -> IO a }
7374

7475
instance MonadUnliftIO (Neovim env) where
7576
askUnliftIO = Neovim . withUnliftIO $ \x ->

nvim-hs.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ library
115115
, time-locale-compat
116116
, megaparsec
117117
, process
118-
, resourcet >= 1.1.10
118+
, resourcet >= 1.1.11
119119
, setenv >= 0.1.1.3
120120
, stm
121121
, streaming-commons

test-suite/Neovim/EmbeddedRPCSpec.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import Control.Concurrent
1818
import Control.Concurrent.STM
1919
import Control.Monad.Reader (runReaderT)
2020
import Control.Monad.State (runStateT)
21-
import Control.Monad.Trans.Resource (runResourceT)
2221
import qualified Data.Map as Map
2322
import System.Directory
2423
import System.Exit (ExitCode (..))

0 commit comments

Comments
 (0)