Also affects GHC.IO.Device, which is not very GHC-specific at all.
SeekMode(..)
) where
+#ifdef __GLASGOW_HASKELL__
import GHC.Base
import GHC.Word
import GHC.Arr
import GHC.Num
import GHC.IO
import {-# SOURCE #-} GHC.IO.Exception ( unsupportedOperation )
+#endif
+#ifdef __NHC__
+import Foreign
+import Ix
+import Control.Exception.Base
+unsupportedOperation = userError "unsupported operation"
+#endif
-- | A low-level I/O provider where the data is bytes in memory.
class RawIO a where
Data Debug Control Control/Monad System System/IO System/Console \
Text Text/Html Text/Show Text/ParserCombinators Text/Regex \
Foreign Foreign/Marshal Foreign/C NHC Unsafe System/Posix \
- Control/Exception
+ Control/Exception GHC GHC/IO
SRCS = \
Data/Bits.hs Data/Bool.hs Data/Char.hs Data/Complex.hs \
Text/ParserCombinators/ReadP.hs Data/Version.hs \
Unsafe/Coerce.hs \
WCsubst.c dirUtils.c \
+ GHC/IO/Device.hs \
System/Posix/Types.hs System/Posix/Internals.hs \
# Data/String.hs
import Hugs.Prelude (IOException(..), IOErrorType(..))
import Hugs.IO (IOMode(..))
#elif __NHC__
+import GHC.IO.Device -- yes, I know, but its portable, really!
import System.IO
import Control.Exception
import DIOError
#define CONST_O_BINARY 0
#define READDIR_ERRNO_EOF 0
+#define INLINE /* to avoid inlining... */