From 0f4e8b298014d9db2cb3ebdb167f3a9d9ca1a3f3 Mon Sep 17 00:00:00 2001 From: joe Date: Sat, 18 Nov 2017 22:43:39 -0500 Subject: Removed redundant MonadIO constraint from thread instrumentation. --- src/Control/Concurrent/Lifted/Instrument.hs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/Control/Concurrent/Lifted/Instrument.hs b/src/Control/Concurrent/Lifted/Instrument.hs index 41814d98..5b3237cc 100644 --- a/src/Control/Concurrent/Lifted/Instrument.hs +++ b/src/Control/Concurrent/Lifted/Instrument.hs @@ -47,16 +47,15 @@ forkIO :: IO () -> IO ThreadId forkIO = fork {-# INLINE forkIO #-} -forkOS :: (MonadBaseControl IO m, MonadIO m) => m () -> m ThreadId +forkOS :: MonadBaseControl IO m => m () -> m ThreadId forkOS = instrumented Raw.forkOS {-# INLINE forkOS #-} -fork :: (MonadBaseControl IO m, MonadIO m) => m () -> m ThreadId +fork :: MonadBaseControl IO m => m () -> m ThreadId fork = instrumented Raw.fork {-# INLINE fork #-} -instrumented :: ( MonadBaseControl IO m - , MonadIO m) => +instrumented :: MonadBaseControl IO m => (m () -> m ThreadId) -> m () -> m ThreadId instrumented rawFork action = do t <- rawFork $ do @@ -66,7 +65,7 @@ instrumented rawFork action = do (return ()) $ do catch action $ \e -> case fromException e of Just ThreadKilled -> return () - Nothing -> liftIO $ do + Nothing -> liftBase $ do g <- takeMVar globals let l = concat [ show e , " (" -- cgit v1.2.3