idris-hackers / idris-vim

Idris mode for vim
221 stars 52 forks source link

Update errorformat to catch errors better #60

Closed lehmacdj closed 7 years ago

lehmacdj commented 7 years ago

The idris syntastic checker did a rather poor job at finding the line number of specific error messages. I improved it but I may not have fixed every possible error message.

Example error message from syntactic quick fix window:

Before:

|| ./dep_fun.idr:16:7: error: expected: "with",
||     argument expression,
||     constraint argument,
||     function right hand side,
||     with pattern
|| sum'' {S k} x = \y => sum'' k (x + y)
||       ^

After:

dep_fun.idr|16 col 7 error| expected: "with", argument expression, constraint argument, function right hand side, with pattern sum'' {S k} x = \y => sum'' k (x + y) ^

I haven't been able to exclude the code line from the error message which it arguably should be. Additional this change makes syntactic correctly correctly recognize the line / column number where the error occurred.

lehmacdj commented 7 years ago

Just to add: although my before looks much nicer, syntastic interprets that error message as 7 separate ones which is also confusing. I fixed this with my patch.

melted commented 7 years ago

Thanks!

@david-christiansen How about giving @lehmacdj commit rights?