Skip to content
Snippets Groups Projects
Commit f9129b03 authored by Simon Marlow's avatar Simon Marlow Committed by Ian Lynagh
Browse files

Fix bug introduced in b2bd63f9

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.
parent c9c33284
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment