diff options
author | Mark Lentczner <markl@glyphic.com> | 2010-07-27 21:23:58 +0000 |
---|---|---|
committer | Mark Lentczner <markl@glyphic.com> | 2010-07-27 21:23:58 +0000 |
commit | 99b3a6a3a48e8c29b5dcc55b152bd8e3db1ec384 (patch) | |
tree | d3ebde10e476dccf21c6e0d3e935524f168dbeeb /src/Haddock/Backends/Xhtml.hs | |
parent | b99698a292a1475d1b7c3f49b2a4fccb9994ca7c (diff) |
remove custom version of copyFile in Xhtml.hs
Diffstat (limited to 'src/Haddock/Backends/Xhtml.hs')
-rw-r--r-- | src/Haddock/Backends/Xhtml.hs | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/src/Haddock/Backends/Xhtml.hs b/src/Haddock/Backends/Xhtml.hs index 491ab9eb..c9eaf71b 100644 --- a/src/Haddock/Backends/Xhtml.hs +++ b/src/Haddock/Backends/Xhtml.hs @@ -32,16 +32,13 @@ import Haddock.Utils import Text.XHtml hiding ( name, title, p, quote ) import Haddock.GhcUtils -import Control.Exception ( bracket ) import Control.Monad ( when, unless ) import Control.Monad.Instances ( ) -- for Functor Either a import Data.Char ( toUpper ) import Data.List ( sortBy, groupBy ) import Data.Maybe -import Foreign.Marshal.Alloc ( allocaBytes ) import System.FilePath hiding ( (</>) ) -import System.IO ( IOMode(..), hClose, hGetBuf, hPutBuf, openFile ) -import System.Directory hiding ( copyFile ) +import System.Directory import Data.Map ( Map ) import qualified Data.Map as Map hiding ( Map ) import Data.List ( intercalate ) @@ -94,22 +91,6 @@ ppHtml doctitle maybe_package ifaces odir prologue maybe_contents_url maybe_index_url unicode) visible_ifaces -copyFile :: FilePath -> FilePath -> IO () -copyFile fromFPath toFPath = - (bracket (openFile fromFPath ReadMode) hClose $ \hFrom -> - bracket (openFile toFPath WriteMode) hClose $ \hTo -> - allocaBytes bufferSize $ \buffer -> - copyContents hFrom hTo buffer) - where - bufferSize = 1024 - - copyContents hFrom hTo buffer = do - count <- hGetBuf hFrom buffer bufferSize - when (count > 0) $ do - hPutBuf hTo buffer count - copyContents hFrom hTo buffer - - copyHtmlBits :: FilePath -> FilePath -> Themes -> IO () copyHtmlBits odir libdir themes = do let |