From abfd98262dc5b9c2b0e2c9a85fb828854e0afecd Mon Sep 17 00:00:00 2001
From: simonmar <unknown>
Date: Mon, 27 Jun 2005 14:46:40 +0000
Subject: [haddock @ 2005-06-27 14:46:40 by simonmar] name hierarchical HTML
 files as A-B-C.html instead of A.B.C.html.  The old way confused Apache
 because the extensions are sometimes interpreted as having special meanings.

---
 src/HaddockUtil.hs | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/HaddockUtil.hs b/src/HaddockUtil.hs
index ef02596f..96dc7a0b 100644
--- a/src/HaddockUtil.hs
+++ b/src/HaddockUtil.hs
@@ -385,8 +385,10 @@ isPathSeparator ch =
 moduleHtmlFile :: String -> FilePath
 moduleHtmlFile mdl =
   case Map.lookup (Module mdl) html_xrefs of
-    Nothing  -> mdl ++ ".html"
-    Just fp0 -> pathJoin [fp0, mdl ++ ".html"]
+    Nothing  -> mdl' ++ ".html"
+    Just fp0 -> pathJoin [fp0, mdl' ++ ".html"]
+  where
+   mdl' = map (\c -> if c == '.' then '-' else c) mdl
 
 nameHtmlRef :: String -> HsName -> String	
 nameHtmlRef mdl str = moduleHtmlFile mdl ++ '#':escapeStr (hsAnchorNameStr str)
-- 
cgit v1.2.3