|
|
@ -73,8 +73,6 @@ let pp ext fmt typestate =
|
|
|
|
pp_map typestate.map;
|
|
|
|
pp_map typestate.map;
|
|
|
|
ext.pp fmt typestate.extension
|
|
|
|
ext.pp fmt typestate.extension
|
|
|
|
|
|
|
|
|
|
|
|
exception JoinFail
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let type_join typ1 typ2 =
|
|
|
|
let type_join typ1 typ2 =
|
|
|
|
if PatternMatch.type_is_object typ1 then typ2 else typ1
|
|
|
|
if PatternMatch.type_is_object typ1 then typ2 else typ1
|
|
|
|
let locs_join locs1 locs2 =
|
|
|
|
let locs_join locs1 locs2 =
|
|
|
@ -117,12 +115,11 @@ let map_join m1 m2 =
|
|
|
|
(t1, ta1', locs1) in
|
|
|
|
(t1, ta1', locs1) in
|
|
|
|
tjoined := M.add exp1 range1' !tjoined in
|
|
|
|
tjoined := M.add exp1 range1' !tjoined in
|
|
|
|
if m1 == m2 then m1
|
|
|
|
if m1 == m2 then m1
|
|
|
|
else
|
|
|
|
else (
|
|
|
|
try
|
|
|
|
M.iter extend_lhs m2;
|
|
|
|
M.iter extend_lhs m2;
|
|
|
|
M.iter missing_rhs m1;
|
|
|
|
M.iter missing_rhs m1;
|
|
|
|
!tjoined
|
|
|
|
!tjoined
|
|
|
|
)
|
|
|
|
with JoinFail -> m1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let join ext t1 t2 =
|
|
|
|
let join ext t1 t2 =
|
|
|
|
{
|
|
|
|
{
|
|
|
|