mirror of
https://github.com/github/semantic.git
synced 2024-12-26 00:12:29 +03:00
🔥 the Carrier instance.
This commit is contained in:
parent
81d1a1117e
commit
742db3d17e
@ -62,9 +62,6 @@ newtype ControlIOC m a = ControlIOC { runControlIO :: m a }
|
||||
instance MonadUnliftIO m => MonadUnliftIO (ControlIOC m) where
|
||||
withRunInIO inner = ControlIOC $ withRunInIO $ \ go -> inner (go . runControlIO)
|
||||
|
||||
instance Carrier sig m => Carrier sig (ControlIOC m) where
|
||||
eff op = ControlIOC (eff (handleCoercible op))
|
||||
|
||||
instance MonadUnliftIO m => MonadException (ControlIOC m) where
|
||||
controlIO f = withRunInIO (\ runInIO -> f (RunIO (fmap pure . runInIO)) >>= runInIO)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user