Skip to content

Commit f04f481

Browse files
authored
Merge pull request #506 from dcastro/diogo/monad-io-instances
Add MonadIO instances for StateT and ReaderT
2 parents fddea49 + 8a483dd commit f04f481

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/Control/Monad/IO/Class/Linear.hs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,9 @@ instance MonadIO Linear.IO where
2424

2525
instance MonadIO RIO where
2626
liftIO = RIO.fromIO
27+
28+
instance (MonadIO m) => MonadIO (Linear.StateT s m) where
29+
liftIO = Linear.lift . liftIO
30+
31+
instance (MonadIO m, Dupable r) => MonadIO (Linear.ReaderT r m) where
32+
liftIO = Linear.lift . liftIO

0 commit comments

Comments
 (0)