| 6 |
|
|
| 7 |
exception Pattern of string |
exception Pattern of string |
| 8 |
exception NonExhaustive of Types.descr |
exception NonExhaustive of Types.descr |
| 9 |
|
exception MultipleLabel of Types.label |
| 10 |
exception Constraint of Types.descr * Types.descr * string |
exception Constraint of Types.descr * Types.descr * string |
| 11 |
exception ShouldHave of Types.descr * string |
exception ShouldHave of Types.descr * string |
| 12 |
exception WrongLabel of Types.descr * Types.label |
exception WrongLabel of Types.descr * Types.label |
| 335 |
| RecordLitt r -> |
| RecordLitt r -> |
| 336 |
(* XXX TODO: check that no label appears twice *) |
(* XXX TODO: check that no label appears twice *) |
| 337 |
let fv = ref Fv.empty in |
let fv = ref Fv.empty in |
| 338 |
|
let labs = ref [] in |
| 339 |
let r = List.map |
let r = List.map |
| 340 |
(fun (l,e) -> |
(fun (l,e) -> |
| 341 |
let (fv2,e) = expr e in |
let (fv2,e) = expr e in |
| 342 |
|
if (List.mem l !labs) then |
| 343 |
|
raise_loc loc (MultipleLabel l); |
| 344 |
|
labs := l :: !labs; |
| 345 |
fv := Fv.union !fv fv2; |
fv := Fv.union !fv fv2; |
| 346 |
(l,e) |
(l,e) |
| 347 |
) r in |
) r in |