Remove debugging code accidentally left in
[ghc-base.git] / GHC / IO / Device.hs
index ab91bc0..ec1bde8 100644 (file)
@@ -1,5 +1,4 @@
 {-# OPTIONS_GHC -XNoImplicitPrelude -XBangPatterns #-}
-{-# OPTIONS_HADDOCK hide #-}
 -----------------------------------------------------------------------------
 -- |
 -- Module      :  GHC.IO.Device
@@ -21,6 +20,7 @@ module GHC.IO.Device (
     SeekMode(..)
   ) where  
 
+#ifdef __GLASGOW_HASKELL__
 import GHC.Base
 import GHC.Word
 import GHC.Arr
@@ -32,6 +32,13 @@ import Data.Maybe
 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
@@ -77,7 +84,7 @@ class IODevice a where
   isSeekable :: a -> IO Bool
   isSeekable _ = return False
 
-  -- | seek to the specified positing in the data.
+  -- | seek to the specified position in the data.
   seek :: a -> SeekMode -> Integer -> IO ()
   seek _ _ _ = ioe_unsupportedOperation
 
@@ -135,7 +142,7 @@ data IODeviceType
 -- -----------------------------------------------------------------------------
 -- SeekMode type
 
--- | A mode that determines the effect of 'hSeek' @hdl mode i@, as follows:
+-- | A mode that determines the effect of 'hSeek' @hdl mode i@.
 data SeekMode
   = AbsoluteSeek        -- ^ the position of @hdl@ is set to @i@.
   | RelativeSeek        -- ^ the position of @hdl@ is set to offset @i@