Skip to content
Snippets Groups Projects
Commit 2be01a45 authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Avoid using IOError internals

parent 40fd4f02
No related branches found
No related tags found
No related merge requests found
...@@ -32,6 +32,7 @@ module Data.Array.IO ( ...@@ -32,6 +32,7 @@ module Data.Array.IO (
import Data.Array.Base import Data.Array.Base
import Data.Array.IO.Internals import Data.Array.IO.Internals
import Data.Array.MArray import Data.Array.MArray
import System.IO.Error
#ifdef __GLASGOW_HASKELL__ #ifdef __GLASGOW_HASKELL__
import Foreign import Foreign
...@@ -45,7 +46,6 @@ import GHC.Handle ...@@ -45,7 +46,6 @@ import GHC.Handle
import Data.Char import Data.Char
import Data.Word ( Word8 ) import Data.Word ( Word8 )
import System.IO import System.IO
import System.IO.Error
#endif #endif
#ifdef __GLASGOW_HASKELL__ #ifdef __GLASGOW_HASKELL__
...@@ -154,10 +154,9 @@ foreign import ccall unsafe "__hscore_memcpy_src_off" ...@@ -154,10 +154,9 @@ foreign import ccall unsafe "__hscore_memcpy_src_off"
illegalBufferSize :: Handle -> String -> Int -> IO a illegalBufferSize :: Handle -> String -> Int -> IO a
illegalBufferSize handle fn sz = illegalBufferSize handle fn sz =
ioException (IOError (Just handle) ioException (ioeSetErrorString
InvalidArgument fn (mkIOError InvalidArgument fn (Just handle) Nothing)
("illegal buffer size " ++ showsPrec 9 (sz::Int) []) ("illegal buffer size " ++ showsPrec 9 (sz::Int) []))
Nothing)
#else /* !__GLASGOW_HASKELL__ */ #else /* !__GLASGOW_HASKELL__ */
hGetArray :: Handle -> IOUArray Int Word8 -> Int -> IO Int hGetArray :: Handle -> IOUArray Int Word8 -> Int -> IO Int
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment