[commit: packages/Win32] ghc-head: Use throwIO instead of throw for correctness (5ccf179)

git at git.haskell.org git at git.haskell.org
Tue Mar 18 10:16:27 UTC 2014


Repository : ssh://git@git.haskell.org/Win32

On branch  : ghc-head
Link       : http://git.haskell.org/packages/Win32.git/commitdiff/5ccf17927b873835bf980436ffa7ee100586de1e

>---------------------------------------------------------------

commit 5ccf17927b873835bf980436ffa7ee100586de1e
Author: Bryan O'Sullivan <bos at serpentine.com>
Date:   Tue Feb 4 22:25:12 2014 -0800

    Use throwIO instead of throw for correctness


>---------------------------------------------------------------

5ccf17927b873835bf980436ffa7ee100586de1e
 System/Win32/Types.hs |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/System/Win32/Types.hs b/System/Win32/Types.hs
index 359e42f..68a4ff1 100755
--- a/System/Win32/Types.hs
+++ b/System/Win32/Types.hs
@@ -20,7 +20,7 @@ module System.Win32.Types
 	, nullPtr
 	) where
 
-import Control.Exception (throw)
+import Control.Exception (throwIO)
 import Data.Bits (shiftL, shiftR, (.|.), (.&.))
 import Data.Char (isSpace)
 import Data.Int (Int32, Int64)
@@ -242,7 +242,7 @@ failWith fn_name err_code = do
   let msg' = reverse $ dropWhile isSpace $ reverse msg -- drop trailing \n
       ioerror = errnoToIOError fn_name errno Nothing Nothing
                   `ioeSetErrorString` msg'
-  throw ioerror
+  throwIO ioerror
 
 
 foreign import ccall unsafe "maperrno" -- in base/cbits/Win32Utils.c



More information about the ghc-commits mailing list