ocaml / oloop

Evaluate code through the OCaml toploop for inclusion in educational material.
ISC License
12 stars 5 forks source link

Add information of location of errors and warnings. #11

Closed romildo closed 9 years ago

romildo commented 9 years ago

When the compilation of a phrase results in a warning or an error message, add information of the location where it was detected.

Chris00 commented 9 years ago

Not sure to understand: Oloop.eval_error contains Location.t that indicates precisely that.

romildo commented 9 years ago

I am just trying applications buit with the project, like app.native. It does not report the location of errors.

Chris00 commented 9 years ago

You have to understand that the app is still very much WIP so the output may still change. I did the following. When an error occurs, a sexp representation of the location (if available) is present in the output. You can also use the command line option --msg-with-location to have the location added to the error message. Hope it helps.