File tree 2 files changed +10
-8
lines changed
2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -111,17 +111,19 @@ let parse_exn (speclist : t) anonfun errmsg =
111
111
incr current;
112
112
| Int f when ! current + 1 < l ->
113
113
let arg = argv.(! current + 1 ) in
114
- begin try f (int_of_string arg)
115
- with Failure "int_of_string" ->
116
- raise (Stop (Wrong (s, arg, " an integer" )))
114
+ begin match int_of_string arg with
115
+ | i -> f i
116
+ | exception _
117
+ ->
118
+ raise (Stop (Wrong (s, arg, " an integer" )))
117
119
end ;
118
120
incr current;
119
121
| Set_int r when ! current + 1 < l ->
120
122
let arg = argv.(! current + 1 ) in
121
- begin try r := (int_of_string arg)
122
- with Failure "int_of_string" ->
123
- raise (Stop (Wrong (s, arg, " an integer" )))
124
- end ;
123
+ r := (try int_of_string arg
124
+ with _ ->
125
+ raise (Stop (Wrong (s, arg, " an integer" )))
126
+ ) ;
125
127
incr current;
126
128
| _ -> raise (Stop (Missing s))
127
129
in
Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ let interface_mliast ppf fname outputprefix =
99
99
100
100
let get_lambda = fun
101
101
#if OCAML_VERSION =~ ">4.03.0" then
102
- {code = lambda }
102
+ {Lambda. code = lambda }
103
103
#else
104
104
lambda
105
105
#end -> lambda
You can’t perform that action at this time.
0 commit comments