[Ur] error reporting

Gergely Buday gbuday at gmail.com
Wed Nov 2 09:42:48 EDT 2011


Hi,

having the following simple code I get an error:

[gergoe at homeship sandbox]$ cat problem.ur
val foo = 2.0 +
3
[gergoe at homeship sandbox]$ urweb problem
problem.ur:2:0-2:1: Unification failure
Expression:  3
  Have con:  Basis.int
  Need con:  Basis.float
Incompatible constructors
Con 1:  Basis.int
Con 2:  Basis.float

As I see, line numbering starts from 1 and column numbering starts
from 0. Still, I wonder why a one character literal spans two places,
according to the compiler. Is this a bug or a feature? The same is
valid for longer identifiers, the compiler reports a range that is one
longer than it actually is.

- Gergely



More information about the Ur mailing list