jfecher / ante

A safe, easy systems language
http://antelang.org
MIT License
1.9k stars 80 forks source link

Add a proper error message for unhandled effects #171

Open jfecher opened 11 months ago

jfecher commented 11 months ago

Currently if there are unhandled effects that percolate up to top-level the compiler will fail an assert and panic. To fix this, a proper error message should be issued to inform the user of the unhandled effects (ideally with the original locations of these effects).

See https://github.com/jfecher/ante/blob/master/src/types/typechecker.rs#L1448

E.g.

simple.an:6:1  error: Unhandled effect `Throw Unit`
throw ()