Skip to content

Fix outdated documentation for wrappedWithRunInIO - #72

Merged
snoyberg merged 2 commits into
fpco:masterfrom
evanrelf:derive-newtype
Apr 22, 2021
Merged

snoyberg merged 2 commits into
fpco:masterfrom
evanrelf:derive-newtype

Conversation

@evanrelf

@evanrelf evanrelf commented Apr 19, 2021 •

Copy link
Copy Markdown
Contributor

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

@snoyberg snoyberg left a comment

Copy link
Copy Markdown
Contributor

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.

2 participants