fpco / unliftio

The MonadUnliftIO typeclass for unlifting monads to IO
Other
151 stars 51 forks source link

Fix outdated documentation for `wrappedWithRunInIO` #72

Closed evanrelf closed 3 years ago

evanrelf commented 3 years ago

Comment that inspired this change: https://github.com/fpco/unliftio/issues/55#issuecomment-815945362

Previously, you were unable to derive MonadUnliftIO using the newtype strategy because askUnliftIO was a method of the typeclass (related issue).

The wrappedWithRunInIO function is provided to help write instances of MonadUnliftIO for newtypes.

In unliftio-core 0.2.0.0 and later, askUnliftIO was moved out of the MonadUnliftIO typeclass. This makes wrappedWithRunInIO irrelevant.

This change deprecates that function, and updates the documentation to clarify that you can now write deriving newtype (MonadUnliftIO).