Use throwIO instead of throw in an IO context
Some functions in base use throw
where the type of the expression is IO
. I think they should be using throwIO
since it guarantees ordering with respect to other IO actions.
See the thread on the libraries list.
Some simple benchmarks in the thread also showed that throwIO
is faster than throw
.
Trac metadata
Trac field | Value |
---|---|
Version | 6.12.3 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | libraries/base |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |