Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Try to recover from effectful code that is annotated as pure (#173)
This puts a try-catch around the bind step in order to try to catch code that is not expected to have effects but does (by throwing). While this is clearly a programming error, it is certainly not implausible that effects creep into FFI code inadvertently for Aff users. This allows us to be defensive in that case and recover, rather than have all asynchronous options quitely not work after. The addition of the try-catch does not seem to have a performance impact (tested on Node v10.15.3). With and without this change, `pulp test` takes ~4.8s to run. There is a discussion around this on #172.
- Loading branch information