#4380: Use throwIO instead of throw in an IO context
---------------------------------+------------------------------------------
Reporter: basvandijk | Owner:
Type: bug | Status: new
Priority: normal | Component: libraries/base
Version: 6.12.3 | Keywords:
Testcase: | Blockedby:
Os: Unknown/Multiple | Blocking:
Architecture: Unknown/Multiple | Failure: None/Unknown
---------------------------------+------------------------------------------
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 [http://thread.gmane.org/gmane.comp.lang.haskell.libraries/13851
thread] on the libraries list.
Some simple benchmarks in the thread also showed that `throwIO` is faster
than `throw`.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4380>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs