re. github.com/jonsterling/dr, have you considered how error reporting might work with the refiner? Seems like a really neat approach - but just a little worried about providing a nice diagnostics about the surface syntax and supporting error recovery, etc.
Conversation
You’re unable to view this Tweet because this account owner limits who can view their Tweets. Learn more
Idea is that you don't want your type checker to stop at the first error. You'd prefer it if it could continue type checking, giving you more than one error.
4
1
2
I do this in a bit of a bodgy way with an 'error' variant in my ASTs, but you run into issues where error sentinels pop up in type errors if you aren't careful. Leading to the fun of Rusts 'error: expected `type error` found `type error`' back in the day 😂
1
1
I think most of those bugs have been squished though. But yeah, I'd prefer it if it was a bit more thought out - like something like exceptional type theory perhaps?
1
1
But yeah, I'd like to be able to run my programs even if they have type errors in them - I just accept that if I do they'll crash if they run into ill-typed code fragments. But then on a release build I want to be sure all code paths are well-typed.
But yeah, that's going a bit beyond error recovery, but could be part of the same thing I think.
You’re unable to view this Tweet because this account owner limits who can view their Tweets. Learn more
If we have postponing in elaboration, deferred errors come almost for free. The "guarded constants" in Agda could support this with minimal effort. Not sure why it hasn't been implemented.
1
2
Show replies

