[commit: haddock] master: Fix bug where not all module interfaces were added to source mapping. (5927bfd)

git at git.haskell.org git at git.haskell.org
Wed Jul 8 08:42:58 UTC 2015


Repository : ssh://git@git.haskell.org/haddock

On branch  : master
Link       : http://git.haskell.org/haddock.git/commitdiff/5927bfd4737532e7f1282672a96c2a2cb83c847f

>---------------------------------------------------------------

commit 5927bfd4737532e7f1282672a96c2a2cb83c847f
Author: Łukasz Hanuszczak <lukasz.hanuszczak at gmail.com>
Date:   Sun Jul 5 17:47:34 2015 +0200

    Fix bug where not all module interfaces were added to source mapping.


>---------------------------------------------------------------

5927bfd4737532e7f1282672a96c2a2cb83c847f
 haddock-api/src/Haddock.hs | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/haddock-api/src/Haddock.hs b/haddock-api/src/Haddock.hs
index 5c48d28..d4d8e3e 100644
--- a/haddock-api/src/Haddock.hs
+++ b/haddock-api/src/Haddock.hs
@@ -229,8 +229,10 @@ renderStep dflags flags qual pkgs interfaces = do
   let
     ifaceFiles = map snd pkgs
     installedIfaces = concatMap ifInstalledIfaces ifaceFiles
-    extSrcMap = Map.fromList
-      [ (ifModule ifile, path) | ((_, Just path), ifile) <- pkgs ]
+    extSrcMap = Map.fromList $ do
+      ((_, Just path), ifile) <- pkgs
+      iface <- ifInstalledIfaces ifile
+      return (instMod iface, path)
   render dflags flags qual interfaces installedIfaces extSrcMap
 
 



More information about the ghc-commits mailing list