Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix outdated documentation for wrappedWithRunInIO #72

Merged
merged 2 commits into from
Apr 22, 2021
Merged

Fix outdated documentation for wrappedWithRunInIO #72

merged 2 commits into from
Apr 22, 2021

Conversation

evanrelf
Copy link
Contributor

@evanrelf evanrelf commented Apr 19, 2021

Comment that inspired this change: #55 (comment)

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).

Comment that inspired this change:
<#55 (comment)>

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

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)`.
Copy link
Member

@snoyberg snoyberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@snoyberg snoyberg merged commit dc5d6e5 into fpco:master Apr 22, 2021
@evanrelf evanrelf deleted the derive-newtype branch April 22, 2021 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants