Index: ubuntu/utils/haddock/src/Haddock/Backends/Html.hs
===================================================================
--- ubuntu.orig/utils/haddock/src/Haddock/Backends/Html.hs	2011-01-13 10:50:13.160635225 +0000
+++ ubuntu/utils/haddock/src/Haddock/Backends/Html.hs	2011-01-13 10:50:17.230951978 +0000
@@ -1860,7 +1860,7 @@
           case maybe_wiki_url of
             Nothing  -> Html.emptyTable
             Just url -> tda [theclass "declbut"] <<
-                          let url' = spliceURL (Just fname) (Just mdl)
+                          let url' = spliceURL (Just fname) mdl
                                                (Just n) (Just loc) url
                            in anchor ! [href url'] << toHtml "Comments"
   
@@ -1870,8 +1870,9 @@
         -- the module defining the type family, which is wrong.
         origMod = nameModule n
 
-        -- Name must be documented, otherwise we wouldn't get here
-        Documented n mdl = name
+        (n,mdl) = case name of
+                    Documented n' mdl' -> (n', Just mdl')
+                    Undocumented n' -> (n', Nothing)
 
         fname = unpackFS (srcSpanFile loc)
 
