IO-specific sendM synonym
robrix opened this issue · comments
Rob Rix commented
#82 is closed but the issue still crops up: if you are using Lift IO
constraints and are using functions constrained to MonadIO
(e.g. defined in some other library) then you have to add MonadIO
constraints too, because sendM
doesn’t specify that you want m
to be IO
and neither does the function you’re lifting.
Rob Rix commented
I think we still want a sendIO
synonym for sendM
with its type restricted to IO
:
sendIO :: Has (Lift IO) sig m => IO a -> m a
sendIO = sendM
Another alternative I’ve tried is a LiftIO
type which provides both Algebra
& MonadIO
instances, the latter implemented via Has (Lift IO) sig m
, but it’s heavier-weight and is harder to justify including in the library.