Commit 91d25cf9 authored by Ian Lynagh's avatar Ian Lynagh

Fix HPC column numbers, following the column number changes in GHC

parent c2792423
......@@ -742,9 +742,9 @@ mkHpcPos pos
start = srcSpanStart pos
end = srcSpanEnd pos
hpcPos = toHpcPos ( srcLocLine start
, srcLocCol start + 1
, srcLocCol start
, srcLocLine end
, srcLocCol end
, srcLocCol end - 1
)
hpcSrcSpan :: SrcSpan
......
......@@ -11,11 +11,11 @@ data Token
deriving (Eq,Show)
initLexer :: String -> [Token]
initLexer str = [ t | (_,_,t) <- lexer str 1 0 ]
initLexer str = [ t | (_,_,t) <- lexer str 1 1 ]
lexer :: String -> Int -> Int -> [(Int,Int,Token)]
lexer (c:cs) line column
| c == '\n' = lexer cs (succ line) 0
| c == '\n' = lexer cs (succ line) 1
| c == '\"' = lexerSTR cs line (succ column)
| c == '[' = lexerCAT cs "" line (succ column)
| c `elem` "{};-:"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment