on master help sign in
Fix reading of line/column on parse errors
303e100Edwin Brady
src/Idris/Parser.hs+2−1
@@ -1115,7 +1115,8 @@ findFC x = let s = show (plain x) in
1115 case span (/= ':') s of
1115 case span (/= ':') s of
1116 (failname, ':':rest) -> case span isDigit rest of
1116 (failname, ':':rest) -> case span isDigit rest of
1117 (line, ':':rest') -> case span isDigit rest' of
1117 (line, ':':rest') -> case span isDigit rest' of
1118+ (col, ':':msg) -> let pos = (read line, read col) in
1118− (col, ':':msg) -> (FC failname (read line) (read col), msg)
1119+ (FC failname pos pos, msg)
1119
1120
1120-- | A program is a list of declarations, possibly with associated
1121-- | A program is a list of declarations, possibly with associated
1121-- documentation strings.
1122-- documentation strings.