Sorry if duplicate - I remember it was discussed somewhere, but found nothing in the opened issues, thus this feature request.
To date many various languages perform a simple syntax highlight or colorize their error messages somehow, to make them more readable. While the text part of the message nowadays is clear enough in most of the cases, adding basic syntax highlight for the reported types or lines of code will be beneficial for a quicker understanding of the problem.
Take the following example:

Here the string
(Ppxlib.Location.t * 'a) list -> (Ppxlib.location.t * 'a) list
could be highlighted according to the OCaml syntax
Same with the expected type expression.
Also in the string
Type Ppxlib.Location.t = Warnings.loc is not compatible with type int
both Ppxlib.Location.t = Warnings.loc and int can be of a different color from the rest of the message.
Implementing this will allow to understand the error from the first glance.
Sorry if duplicate - I remember it was discussed somewhere, but found nothing in the opened issues, thus this feature request.
To date many various languages perform a simple syntax highlight or colorize their error messages somehow, to make them more readable. While the text part of the message nowadays is clear enough in most of the cases, adding basic syntax highlight for the reported types or lines of code will be beneficial for a quicker understanding of the problem.
Take the following example:

Here the string
could be highlighted according to the OCaml syntax
Same with the expected type expression.
Also in the string
both
Ppxlib.Location.t = Warnings.locandintcan be of a different color from the rest of the message.Implementing this will allow to understand the error from the first glance.