diff options
author | David Waern <david.waern@gmail.com> | 2010-05-13 20:05:50 +0000 |
---|---|---|
committer | David Waern <david.waern@gmail.com> | 2010-05-13 20:05:50 +0000 |
commit | 94335867d636db9ad6c111705283ec10c9ee1167 (patch) | |
tree | 37352d4abe829bb848cf5a8cf538c135024d587e /src/Haddock/Backends/Html.hs | |
parent | 9dc3aeef7388cb962a2d021d9e119c586fc18068 (diff) |
Get rid of H.Utils.pathJoin and use System.FilePath.joinPath instead
Diffstat (limited to 'src/Haddock/Backends/Html.hs')
-rw-r--r-- | src/Haddock/Backends/Html.hs | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/Haddock/Backends/Html.hs b/src/Haddock/Backends/Html.hs index 3a334475..09d9fc5e 100644 --- a/src/Haddock/Backends/Html.hs +++ b/src/Haddock/Backends/Html.hs @@ -37,6 +37,7 @@ import Data.Maybe import Foreign.Marshal.Alloc ( allocaBytes ) import System.IO ( IOMode(..), hClose, hGetBuf, hPutBuf, openFile ) import System.Directory hiding ( copyFile ) +import System.FilePath hiding ( (</>) ) import Data.Map ( Map ) import qualified Data.Map as Map hiding ( Map ) import Data.Function @@ -138,13 +139,13 @@ copyFile fromFPath toFPath = copyHtmlBits :: FilePath -> FilePath -> Maybe FilePath -> IO () copyHtmlBits odir libdir maybe_css = do let - libhtmldir = pathJoin [libdir, "html"] + libhtmldir = joinPath [libdir, "html"] css_file = case maybe_css of - Nothing -> pathJoin [libhtmldir, cssFile] + Nothing -> joinPath [libhtmldir, cssFile] Just f -> f - css_destination = pathJoin [odir, cssFile] + css_destination = joinPath [odir, cssFile] copyLibFile f = do - copyFile (pathJoin [libhtmldir, f]) (pathJoin [odir, f]) + copyFile (joinPath [libhtmldir, f]) (joinPath [odir, f]) copyFile css_file css_destination mapM_ copyLibFile [ iconFile, plusFile, minusFile, jsFile, framesFile ] @@ -327,7 +328,7 @@ ppHtmlContents odir doctitle footer ) createDirectoryIfMissing True odir - writeFile (pathJoin [odir, contentsHtmlFile]) (renderHtml html) + writeFile (joinPath [odir, contentsHtmlFile]) (renderHtml html) -- XXX: think of a better place for this? ppHtmlContentsFrame odir doctitle ifaces @@ -445,7 +446,7 @@ ppHtmlContentsFrame odir doctitle ifaces = do body << vanillaTable << Html.p << ( foldr (+++) noHtml (map (+++br) mods)) createDirectoryIfMissing True odir - writeFile (pathJoin [odir, frameIndexHtmlFile]) (renderHtml html) + writeFile (joinPath [odir, frameIndexHtmlFile]) (renderHtml html) -- --------------------------------------------------------------------------- -- Generate the index @@ -477,7 +478,7 @@ ppHtmlIndex odir doctitle maybe_package maybe_html_help_format when split_indices $ mapM_ (do_sub_index index) initialChars - writeFile (pathJoin [odir, indexHtmlFile]) (renderHtml html) + writeFile (joinPath [odir, indexHtmlFile]) (renderHtml html) -- Generate index and contents page for Html Help if requested case maybe_html_help_format of @@ -528,7 +529,7 @@ ppHtmlIndex odir doctitle maybe_package maybe_html_help_format do_sub_index this_ix c = unless (null index_part) $ - writeFile (pathJoin [odir, subIndexHtmlFile c]) (renderHtml html) + writeFile (joinPath [odir, subIndexHtmlFile c]) (renderHtml html) where html = header (documentCharacterEncoding +++ thetitle (toHtml (doctitle ++ " (Index)")) +++ @@ -625,7 +626,7 @@ ppHtmlModule odir doctitle footer ) createDirectoryIfMissing True odir - writeFile (pathJoin [odir, moduleHtmlFile mdl]) (renderHtml html) + writeFile (joinPath [odir, moduleHtmlFile mdl]) (renderHtml html) ppHtmlModuleMiniSynopsis odir doctitle iface unicode ppHtmlModuleMiniSynopsis :: FilePath -> String -> Interface -> Bool -> IO () @@ -642,7 +643,7 @@ ppHtmlModuleMiniSynopsis odir _doctitle iface unicode = do << toHtml (moduleString mdl)) +++ miniSynopsis mdl iface unicode) createDirectoryIfMissing True odir - writeFile (pathJoin [odir, "mini_" ++ moduleHtmlFile mdl]) (renderHtml html) + writeFile (joinPath [odir, "mini_" ++ moduleHtmlFile mdl]) (renderHtml html) ifaceToHtml :: SourceURLs -> WikiURLs -> Interface -> Bool -> HtmlTable ifaceToHtml maybe_source_url maybe_wiki_url iface unicode |