fpco / unliftio

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

Add wrappedWithRunInIO function #32

Closed mbwgh closed 6 years ago

mbwgh commented 6 years ago

Since the MonadUnliftIO class methods aren't terribly intuitive, this combinator should make the common case of writing a pass-through instance a little easier, as discussed in #31.

I tried to make this function work with Data.Coerce.coerce but it didn't really work out on the first try. Since the IdentityT instance doesn't work this way either, I decided to not investigate this further.