Skip to content

Commit 8a483dd

Browse files
committed
Add MonadIO instances for StateT and ReaderT
1 parent fddea49 commit 8a483dd

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)