Repository : ssh://darcs.haskell.org//srv/darcs/ghc On branch : ghc-7.2
http://hackage.haskell.org/trac/ghc/changeset/f9129b034f2f9a53b0d501159e0dd218068a9704 >--------------------------------------------------------------- commit f9129b034f2f9a53b0d501159e0dd218068a9704 Author: Simon Marlow <[email protected]> Date: Tue Jun 28 11:42:17 2011 +0100 Fix bug introduced in b2bd63f99d643f6b3eb30bb72bb9ae26d4183252 HPC expects the end column of a span to be one less than the convention used by SrcSpan, and we had lost the "-1", causing various HPC tests to fail. >--------------------------------------------------------------- compiler/deSugar/Coverage.lhs | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/compiler/deSugar/Coverage.lhs b/compiler/deSugar/Coverage.lhs index fbe1ab9..13f1796 100644 --- a/compiler/deSugar/Coverage.lhs +++ b/compiler/deSugar/Coverage.lhs @@ -854,7 +854,12 @@ mkHpcPos pos@(RealSrcSpan s) | isGoodSrcSpan' pos = toHpcPos (srcSpanStartLine s, srcSpanStartCol s, srcSpanEndLine s, - srcSpanEndCol s) + srcSpanEndCol s - 1) + -- the end column of a SrcSpan is one + -- greater than the last column of the + -- span (see SrcLoc), whereas HPC + -- expects to the column range to be + -- inclusive, hence we subtract one above. mkHpcPos _ = panic "bad source span; expected such spans to be filtered out" hpcSrcSpan :: SrcSpan _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
