Closed mrBliss closed 5 years ago
@stevana Thanks for the quick merge!
However, I was expecting some resistance, to be honest :slightly_smiling_face:, as this change might break things for existing users. More concretely, users that use a custom monad m
for their StateMachine
previously had to provide an instance of MonadBaseControl IO m
, but after this change they will have to provide an instance of MonadUnliftIO m
instead. What is your opinion on this?
I think this library still doesn't have that many users (especially affected by this change), and so I'd rather break and improve things than be stuck with bad decisions. (If anyone who's reading this is affected, please let us know).
We should add this to the change log and make a major version bump next release though.
Replace
MonadBaseControl IO m
withMonadUnliftIO m
. Reasoning: see the documentation forunliftio
.Replace
liftBaseWith (const ..)
withliftIO ..
. This means that theseMonadBaseControl IO m
constraints can be simplified toMonadIO m
constraints.Remove manual
liftIO
s where possible by using lifted functions fromunliftio
.Replace the uses of lifted functions from
lifted-async
by the corresponding lifted variants fromunliftio
.Replace the uses of functions from
stm
by the corresponding lifted variants fromunliftio
.