on master help sign in
Fix reading of line/column on parse errors

Means :e works after parse errors again. Fixes #996.

commit303e10012ff01958882ed04d1eebae49e4541ce8 authorEdwin Brady <ecb10@st-andrews.ac.uk> dateSun 23 Mar 2014, 13:15 (13 years ago) parent5232002
1 file changed+2−1
src/Idris/Parser.hs+2−1
src/Idris/Parser.hs+2−1
@@ -1115,7 +1115,8 @@ findFC x = let s = show (plain x) in
11151115 case span (/= ':') s of
11161116 (failname, ':':rest) -> case span isDigit rest of
11171117 (line, ':':rest') -> case span isDigit rest' of
1118− (col, ':':msg) -> (FC failname (read line) (read col), msg)
1118+ (col, ':':msg) -> let pos = (read line, read col) in
1119+ (FC failname pos pos, msg)
11191120
11201121-- | A program is a list of declarations, possibly with associated
11211122-- documentation strings.