Constraining asynchronous actions to IO