@@ -42,27 +42,27 @@ let occurs_var var u =
42
42
Uvar v -> v = var
43
43
| Uconst cst -> false
44
44
| Udirect_apply (lbl , args ) -> List. exists occurs args
45
- | Ugeneric_apply (funct , args ) -> occurs funct or List. exists occurs args
45
+ | Ugeneric_apply (funct , args ) -> occurs funct || List. exists occurs args
46
46
| Uclosure (fundecls , clos ) -> List. exists occurs clos
47
47
| Uoffset (u , ofs ) -> occurs u
48
- | Ulet (id , def , body ) -> occurs def or occurs body
48
+ | Ulet (id , def , body ) -> occurs def || occurs body
49
49
| Uletrec (decls , body ) ->
50
- List. exists (fun (id , u ) -> occurs u) decls or occurs body
50
+ List. exists (fun (id , u ) -> occurs u) decls || occurs body
51
51
| Uprim (p , args ) -> List. exists occurs args
52
52
| Uswitch (arg , s ) ->
53
- occurs arg or occurs_array s.us_cases_consts
54
- or occurs_array s.us_cases_blocks
53
+ occurs arg || occurs_array s.us_cases_consts
54
+ || occurs_array s.us_cases_blocks
55
55
| Ustaticfail (_ , args ) -> List. exists occurs args
56
- | Ucatch (_ , _ , body , hdlr ) -> occurs body or occurs hdlr
57
- | Utrywith (body , exn , hdlr ) -> occurs body or occurs hdlr
56
+ | Ucatch (_ , _ , body , hdlr ) -> occurs body || occurs hdlr
57
+ | Utrywith (body , exn , hdlr ) -> occurs body || occurs hdlr
58
58
| Uifthenelse (cond , ifso , ifnot ) ->
59
- occurs cond or occurs ifso or occurs ifnot
60
- | Usequence (u1 , u2 ) -> occurs u1 or occurs u2
61
- | Uwhile (cond , body ) -> occurs cond or occurs body
62
- | Ufor (id , lo , hi , dir , body ) -> occurs lo or occurs hi or occurs body
63
- | Uassign (id , u ) -> id = var or occurs u
59
+ occurs cond || occurs ifso || occurs ifnot
60
+ | Usequence (u1 , u2 ) -> occurs u1 || occurs u2
61
+ | Uwhile (cond , body ) -> occurs cond || occurs body
62
+ | Ufor (id , lo , hi , dir , body ) -> occurs lo || occurs hi || occurs body
63
+ | Uassign (id , u ) -> id = var || occurs u
64
64
| Usend (met , obj , args ) ->
65
- occurs met or occurs obj or List. exists occurs args
65
+ occurs met || occurs obj || List. exists occurs args
66
66
and occurs_array a =
67
67
try
68
68
for i = 0 to Array. length a - 1 do
0 commit comments