Is there any way to make forkIO
classy?
import Control.Monad.IO.Class (MonadIO)
import Control.Concurrent (ThreadId)
-- | Is this possible?
forkIO :: MonadIO m => m () -> m ThreadId
forkIO = undefined
I'm trying to call it from within a function using a few mtl
monad class constraints. I'm aware of lifted-base
but I'd rather not have an extra MonadBaseControl IO
constraint bubble up through my program. Solutions and/or suggestions would be appreciated.