[project @ 2003-05-19 16:48:18 by ross]
[ghc-base.git] / Data / PackedString.hs
index 6ab3e94..de4f392 100644 (file)
@@ -23,7 +23,7 @@ module Data.PackedString (
        packString,  -- :: String -> PackedString
        unpackPS,    -- :: PackedString -> String
 
-#ifdef __GLASGOW_HASKELL__
+#ifndef __NHC__
        -- * I\/O with @PackedString@s  
        hPutPS,      -- :: Handle -> PackedString -> IO ()
        hGetPS,      -- :: Handle -> Int -> IO PackedString
@@ -260,11 +260,10 @@ first_pos_that_satisfies pred ps len n =
 substrPS :: PackedString -> Int -> Int -> PackedString
 substrPS (PS ps) begin end = packString [ ps ! i | i <- [begin..end] ]
 
-#ifdef __GLASGOW_HASKELL__
 -- -----------------------------------------------------------------------------
 -- hPutPS
 
--- | Outputs a 'PackedString' to the specified 'Handle' (GHC only).
+-- | Outputs a 'PackedString' to the specified 'Handle'.
 --
 -- NOTE: the representation of the 'PackedString' in the file is assumed to
 -- be in the ISO-8859-1 encoding.  In other words, only the least signficant
@@ -279,7 +278,7 @@ hPutPS h (PS ps) = do
 -- -----------------------------------------------------------------------------
 -- hGetPS
 
--- | Read a 'PackedString' directly from the specified 'Handle' (GHC only).
+-- | Read a 'PackedString' directly from the specified 'Handle'.
 -- This is far more efficient than reading the characters into a 'String'
 -- and then using 'packString'.  
 --
@@ -291,7 +290,6 @@ hGetPS h i = do
   l <- hGetArray h arr i
   chars <- mapM (\i -> readArray arr i >>= return.chr.fromIntegral) [0..l-1]
   return (packString chars)
-#endif /* __GLASGOW_HASKELL__ */
 
 #else  /* __NHC__ */