From d88331bc55fe1e47ae1405051280778866137bc2 Mon Sep 17 00:00:00 2001 From: Bryan O'Sullivan <bos@serpentine.com> Date: Tue, 15 Dec 2009 01:19:34 +0000 Subject: [PATCH] Tidy up imports. --HG-- extra : convert_revision : 6394779b44acffd1a5dfc35552d979e3b4883774 --- Data/Text/IO.hs | 15 +++++---------- Data/Text/IO/Internal.hs | 16 +++++----------- Data/Text/Lazy/IO.hs | 17 +++++------------ 3 files changed, 15 insertions(+), 33 deletions(-) diff --git a/Data/Text/IO.hs b/Data/Text/IO.hs index e93edf29..91ab044d 100644 --- a/Data/Text/IO.hs +++ b/Data/Text/IO.hs @@ -43,19 +43,14 @@ import Data.Text.Encoding (decodeUtf8, encodeUtf8) import Control.Exception (throw) import Data.IORef (readIORef, writeIORef) import qualified Data.Text as T -import Data.Text.Fusion (stream, unstream) +import Data.Text.Fusion (stream) import Data.Text.Fusion.Internal (Step(..), Stream(..)) -import Data.Text.Fusion.Size (exactSize, maxSize) import Data.Text.IO.Internal (hGetLineWith, readChunk) -import Data.Text.Unsafe (inlinePerformIO) -import Foreign.Storable (peekElemOff) import GHC.IO.Buffer (Buffer(..), BufferState(..), CharBufElem, CharBuffer, - RawCharBuffer, bufferAdjustL, bufferElems, charSize, - emptyBuffer, isEmptyBuffer, newCharBuffer, readCharBuf, - withRawBuffer, writeCharBuf) -import GHC.IO.Handle.Internals (augmentIOError, ioe_EOF, readTextDevice, - wantReadableHandle_, hClose_help, - wantReadableHandle, wantWritableHandle) + RawCharBuffer, emptyBuffer, isEmptyBuffer, newCharBuffer, + writeCharBuf) +import GHC.IO.Handle.Internals (augmentIOError, hClose_help, wantReadableHandle, + wantWritableHandle) import GHC.IO.Handle.Text (commitBuffer') import GHC.IO.Handle.Types (BufferList(..), BufferMode(..), Handle__(..), Newline(..)) diff --git a/Data/Text/IO/Internal.hs b/Data/Text/IO/Internal.hs index 6b680a70..cbad5980 100644 --- a/Data/Text/IO/Internal.hs +++ b/Data/Text/IO/Internal.hs @@ -19,24 +19,18 @@ module Data.Text.IO.Internal ) where #if __GLASGOW_HASKELL__ >= 612 -import Control.Exception (throw) import Data.IORef (readIORef, writeIORef) import Data.Text (Text) -import Data.Text.Fusion (stream, unstream) +import Data.Text.Fusion (unstream) import Data.Text.Fusion.Internal (Step(..), Stream(..)) import Data.Text.Fusion.Size (exactSize, maxSize) import Data.Text.Unsafe (inlinePerformIO) import Foreign.Storable (peekElemOff) -import GHC.IO.Buffer (Buffer(..), BufferState(..), CharBufElem, CharBuffer, - RawCharBuffer, bufferAdjustL, bufferElems, charSize, - emptyBuffer, isEmptyBuffer, newCharBuffer, readCharBuf, +import GHC.IO.Buffer (Buffer(..), CharBuffer, RawCharBuffer, bufferAdjustL, + bufferElems, charSize, isEmptyBuffer, readCharBuf, withRawBuffer, writeCharBuf) -import GHC.IO.Handle.Internals (augmentIOError, ioe_EOF, readTextDevice, - wantReadableHandle_, hClose_help, - wantReadableHandle, wantWritableHandle) -import GHC.IO.Handle.Text (commitBuffer') -import GHC.IO.Handle.Types (BufferList(..), BufferMode(..), Handle__(..), - Newline(..)) +import GHC.IO.Handle.Internals (ioe_EOF, readTextDevice, wantReadableHandle_) +import GHC.IO.Handle.Types (Handle__(..), Newline(..)) import System.IO (Handle) import System.IO.Error (isEOFError) import qualified Data.Text as T diff --git a/Data/Text/Lazy/IO.hs b/Data/Text/Lazy/IO.hs index c132b6c8..9774f2d2 100644 --- a/Data/Text/Lazy/IO.hs +++ b/Data/Text/Lazy/IO.hs @@ -44,20 +44,13 @@ import qualified Data.ByteString.Char8 as S8 import qualified Data.ByteString.Lazy.Char8 as L8 #else import Control.Exception (throw) -import Data.IORef (readIORef, writeIORef) +import Data.IORef (readIORef) import Data.Text.IO.Internal (hGetLineWith, readChunk) -import GHC.IO.Buffer (Buffer(..), BufferState(..), CharBufElem, CharBuffer, - RawCharBuffer, bufferAdjustL, bufferElems, charSize, - emptyBuffer, isEmptyBuffer, newCharBuffer, readCharBuf, - withRawBuffer, writeCharBuf) +import GHC.IO.Buffer (isEmptyBuffer) import GHC.IO.Exception (IOException(..), IOErrorType(..), ioException) -import GHC.IO.Handle.Internals (augmentIOError, ioe_EOF, readTextDevice, - wantReadableHandle_, hClose_help, - wantReadableHandle, wantWritableHandle, - withHandle) -import GHC.IO.Handle.Text (commitBuffer') -import GHC.IO.Handle.Types (BufferList(..), BufferMode(..), Handle__(..), - HandleType(..), Newline(..)) +import GHC.IO.Handle.Internals (augmentIOError, hClose_help, + wantReadableHandle, withHandle) +import GHC.IO.Handle.Types (Handle__(..), HandleType(..)) import System.IO.Error (isEOFError) import System.IO.Unsafe (unsafeInterleaveIO) #endif -- GitLab