fpco / unliftio

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

Move withRunInIO into typeclass #13 #14

Closed snoyberg closed 6 years ago

snoyberg commented 6 years ago

Pinging @effectfully

effectfully commented 6 years ago

Perhaps add an INLINE pragma to askUnliftIO.

This is nitpicking, but I'd define withRunInIO in terms of askUnliftIO rather than withUnliftIO, because withUnliftIO is a level of indirection and more importantly someone may later come and redefine withUnliftIO in terms of withRunInIO (which would be a more natural definition) and get a loop in the default implementation of withRunInIO.

snoyberg commented 6 years ago

Good catches, I've implemented those changes, and also added implementations for withRunInIO for the instances present.