Toward better syntax errors
Dan Aloni
dan at kernelim.com
Tue Apr 7 20:33:42 UTC 2015
Hello,
Forwarded here is a link to a blog post I authored about improving
GHC's syntax errors:
http://blog.aloni.org/posts/toward-better-ghc-syntax-errors/
In fact, this came about after I started using Happy more extensively,
and at one point thought that GHC could benefit too
The gist of it, is that it was relatively easy to reach an improvement
such as follows (notice 'possible tokens' below):
input:
--
test i = case i of 2
main = return ()
output:
--
example1.hs:2:1: parse error (possibly incorrect indentation or mismatched brackets), possible tokens: '|' '->'
It spawned a more extensive discussion regarding type errors here:
https://www.reddit.com/r/haskell/comments/31m7pc/toward_better_ghc_syntax_errors/
Following to that, it was suggested that a further discussion in the GHC
dev mailing list can continue about this direction (syntax errors,
type errors and whatnot).
--
Dan Aloni
More information about the ghc-devs
mailing list