[commit: haddock] master: Fix span matcher bug causing wrong items being hyperlinked. (7d43b8a)

git at git.haskell.org git at git.haskell.org
Wed Jul 8 08:39:30 UTC 2015


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

On branch  : master
Link       : http://git.haskell.org/haddock.git/commitdiff/7d43b8a8c9538692beb91a4c3a485e82b40559ab

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

commit 7d43b8a8c9538692beb91a4c3a485e82b40559ab
Author: Łukasz Hanuszczak <lukasz.hanuszczak at gmail.com>
Date:   Sat Jun 6 22:37:28 2015 +0200

    Fix span matcher bug causing wrong items being hyperlinked.


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

7d43b8a8c9538692beb91a4c3a485e82b40559ab
 haddock-api/src/Haddock/Backends/Hyperlinker/Ast.hs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/haddock-api/src/Haddock/Backends/Hyperlinker/Ast.hs b/haddock-api/src/Haddock/Backends/Hyperlinker/Ast.hs
index 031ddd5..7d88b7f 100644
--- a/haddock-api/src/Haddock/Backends/Hyperlinker/Ast.hs
+++ b/haddock-api/src/Haddock/Backends/Hyperlinker/Ast.hs
@@ -48,5 +48,5 @@ matches tspan (GHC.RealSrcSpan aspan)
     rs = (posRow . spStart) tspan == GHC.srcSpanStartLine aspan
     cs = (posCol . spStart) tspan == GHC.srcSpanStartCol aspan
     re = (posRow . spEnd) tspan == GHC.srcSpanEndLine aspan
-    ce = (posCol . spEnd) tspan == GHC.srcSpanStartLine aspan
+    ce = (posCol . spEnd) tspan == GHC.srcSpanEndCol aspan
 matches _ _ = False



More information about the ghc-commits mailing list