[Ur] Better compiler errors.
Artyom Shalkhakov
artyom.shalkhakov at gmail.com
Mon Mar 13 23:30:28 EDT 2017
Hello Isaac,
2017-03-14 0:34 GMT+06:00 Isaac Torbett <izacht13 at gmail.com>:
> I think the next goal for Ur/Web should be better error messages by the
> compiler.
>
> The current ones could be moved to a verbose option (-v for instance)
>
> Current, it is very hard to read the errors that are given, unless one
> already knows how the compiler works.
>
> A good example of how bad the error messages can be is a 8000+ line error
> log coming from one line of code. Which yes, I did have. The fix was simply
> parenthesis.
>
I struggled with such a message just yesterday!
> Anyways... that's my lil` rant.
>
> Anyone else have issues reading or even understand the errors? Other than
> slimming them down, how else can they be improved?
>
I guess we could write a utility like this one (shameless plug!), but
we will need some way to visualize the parse tree better:
https://ashalkhakov.github.io/pats-ef/
Paste your error, explore/navigate the parse tree in a (supposedly
comfy) web interface.
Other things coming to mind: have the compiler output some part of the
tree (set a limit on tree depth? e.g. no more than 3 levels deep).
> _______________________________________________
> Ur mailing list
> Ur at impredicative.com
> http://www.impredicative.com/cgi-bin/mailman/listinfo/ur
>
--
Cheers,
Artyom Shalkhakov
More information about the Ur
mailing list