@@ -703,14 +703,16 @@ module Get = {
703
703
switch (typ_type. type_kind) {
704
704
| Types . Type_record (labels , _ ) => {
705
705
labels |> List . iter(({Types . ld_id: {stamp, name: lname}, ld_type, ld_loc}) => {
706
- addStamp(stamp, lname, ld_loc, Attribute (ld_type, name, typ_type), docs);
707
- addLocation(ld_loc, {Types . desc: Types . Tnil , level: 0 , id: 0 }, IsDefinition (stamp));
706
+ let shortLoc = Utils . clampLocation(ld_loc, String . length(lname));
707
+ addStamp(stamp, lname, shortLoc, Attribute (ld_type, name, typ_type), docs);
708
+ addLocation(shortLoc, {Types . desc: Types . Tnil , level: 0 , id: 0 }, IsDefinition (stamp));
708
709
})
709
710
}
710
711
| Types . Type_variant (constructors ) => {
711
712
constructors |> List . iter(({Types . cd_id: {stamp, name: cname}, cd_loc} as cd) => {
712
- addStamp(stamp, cname, cd_loc, Constructor (cd, name, typ_type), docs);
713
- addLocation(cd_loc, {Types . desc: Types . Tnil , level: 0 , id: 0 }, IsDefinition (stamp));
713
+ let shortLoc = Utils . clampLocation(cd_loc, String . length(cname));
714
+ addStamp(stamp, cname, shortLoc, Constructor (cd, name, typ_type), docs);
715
+ addLocation(shortLoc, {Types . desc: Types . Tnil , level: 0 , id: 0 }, IsDefinition (stamp));
714
716
})
715
717
716
718
}
0 commit comments