File tree Expand file tree Collapse file tree 3 files changed +36
-6
lines changed Expand file tree Collapse file tree 3 files changed +36
-6
lines changed Original file line number Diff line number Diff line change @@ -400,7 +400,14 @@ let rec
400
400
Lam_primitive. eq_primitive_approx info1.primitive info2.primitive &&
401
401
eq_approx_list info1.args info2.args
402
402
| _ -> false )
403
- | Lstringswitch _ -> false
403
+ | Lstringswitch (arg , patterns , default ) ->
404
+ begin match l2 with
405
+ | Lstringswitch (arg2 ,patterns2 , default2 ) ->
406
+ eq_approx arg arg2 &&
407
+ eq_option default default2 &&
408
+ Ext_list. for_all2_no_exn patterns patterns2 (fun ((k :string ),v ) (k2 ,v2 ) -> k = k2 && eq_approx v v2)
409
+ | _ -> false
410
+ end
404
411
| Lfunction _
405
412
| Llet (_,_,_,_)
406
413
| Lletrec _
@@ -410,7 +417,10 @@ let rec
410
417
| Lfor (_,_,_,_,_)
411
418
| Lsend _
412
419
-> false
413
-
420
+ and eq_option l1 l2 =
421
+ match l1 with
422
+ | None -> l2 = None
423
+ | Some l1 -> (match l2 with Some l2 -> eq_approx l1 l2 | None -> false )
414
424
and eq_approx_list ls ls1 = Ext_list. for_all2_no_exn ls ls1 eq_approx
415
425
416
426
Original file line number Diff line number Diff line change @@ -96369,7 +96369,14 @@ let rec
96369
96369
Lam_primitive.eq_primitive_approx info1.primitive info2.primitive &&
96370
96370
eq_approx_list info1.args info2.args
96371
96371
| _ -> false)
96372
- | Lstringswitch _ -> false
96372
+ | Lstringswitch (arg, patterns, default) ->
96373
+ begin match l2 with
96374
+ |Lstringswitch(arg2,patterns2, default2) ->
96375
+ eq_approx arg arg2 &&
96376
+ eq_option default default2 &&
96377
+ Ext_list.for_all2_no_exn patterns patterns2 (fun ((k:string),v) (k2,v2) -> k = k2 && eq_approx v v2)
96378
+ | _ -> false
96379
+ end
96373
96380
| Lfunction _
96374
96381
| Llet (_,_,_,_)
96375
96382
| Lletrec _
@@ -96379,7 +96386,10 @@ let rec
96379
96386
| Lfor (_,_,_,_,_)
96380
96387
| Lsend _
96381
96388
-> false
96382
-
96389
+ and eq_option l1 l2 =
96390
+ match l1 with
96391
+ | None -> l2 = None
96392
+ | Some l1 -> (match l2 with Some l2 -> eq_approx l1 l2 | None -> false)
96383
96393
and eq_approx_list ls ls1 = Ext_list.for_all2_no_exn ls ls1 eq_approx
96384
96394
96385
96395
Original file line number Diff line number Diff line change @@ -371865,7 +371865,14 @@ let rec
371865
371865
Lam_primitive.eq_primitive_approx info1.primitive info2.primitive &&
371866
371866
eq_approx_list info1.args info2.args
371867
371867
| _ -> false)
371868
- | Lstringswitch _ -> false
371868
+ | Lstringswitch (arg, patterns, default) ->
371869
+ begin match l2 with
371870
+ |Lstringswitch(arg2,patterns2, default2) ->
371871
+ eq_approx arg arg2 &&
371872
+ eq_option default default2 &&
371873
+ Ext_list.for_all2_no_exn patterns patterns2 (fun ((k:string),v) (k2,v2) -> k = k2 && eq_approx v v2)
371874
+ | _ -> false
371875
+ end
371869
371876
| Lfunction _
371870
371877
| Llet (_,_,_,_)
371871
371878
| Lletrec _
@@ -371875,7 +371882,10 @@ let rec
371875
371882
| Lfor (_,_,_,_,_)
371876
371883
| Lsend _
371877
371884
-> false
371878
-
371885
+ and eq_option l1 l2 =
371886
+ match l1 with
371887
+ | None -> l2 = None
371888
+ | Some l1 -> (match l2 with Some l2 -> eq_approx l1 l2 | None -> false)
371879
371889
and eq_approx_list ls ls1 = Ext_list.for_all2_no_exn ls ls1 eq_approx
371880
371890
371881
371891
You can’t perform that action at this time.
0 commit comments