@@ -168,7 +168,7 @@ let process_file ppf sourcefile =
168
168
Printtyp. signature Format. std_formatter cmi_sign ;
169
169
Format. pp_print_newline Format. std_formatter ()
170
170
| Unknown ->
171
- Ext_arg . bad_arg (" don't know what to do with " ^ sourcefile)
171
+ Bsc_args . bad_arg (" don't know what to do with " ^ sourcefile)
172
172
let usage = " Usage: bsc <options> <files>\n Options are:"
173
173
174
174
let ppf = Format. err_formatter
@@ -184,7 +184,7 @@ let anonymous ~(rev_args : string list) =
184
184
~target: output
185
185
Ppx_entry. rewrite_implementation
186
186
Ppx_entry. rewrite_signature
187
- | _ -> Ext_arg . bad_arg " Wrong format when use -as-ppx"
187
+ | _ -> Bsc_args . bad_arg " Wrong format when use -as-ppx"
188
188
else
189
189
begin
190
190
match rev_args with
@@ -194,7 +194,7 @@ let anonymous ~(rev_args : string list) =
194
194
process_file ppf filename
195
195
| [] -> ()
196
196
| _ ->
197
- Ext_arg . bad_arg " can not handle multiple files"
197
+ Bsc_args . bad_arg " can not handle multiple files"
198
198
end
199
199
200
200
(* * used by -impl -intf *)
@@ -217,7 +217,7 @@ let fmt_file input =
217
217
| Ml | Mli -> `ml
218
218
| Res | Resi -> `res
219
219
| Re | Rei -> `refmt (Filename. concat (Filename. dirname Sys. executable_name) " refmt.exe" )
220
- | _ -> Ext_arg . bad_arg (" don't know what to do with " ^ input) in
220
+ | _ -> Bsc_args . bad_arg (" don't know what to do with " ^ input) in
221
221
output_string stdout (Napkin_multi_printer. print syntax ~input )
222
222
223
223
let set_color_option option =
@@ -242,8 +242,8 @@ let define_variable s =
242
242
match Ext_string. split ~keep_empty: true s '=' with
243
243
| [key; v] ->
244
244
if not (Lexer. define_key_value key v) then
245
- Ext_arg . bad_arg (" illegal definition: " ^ s)
246
- | _ -> Ext_arg . bad_arg (" illegal definition: " ^ s)
245
+ Bsc_args . bad_arg (" illegal definition: " ^ s)
246
+ | _ -> Bsc_args . bad_arg (" illegal definition: " ^ s)
247
247
248
248
let print_standard_library () =
249
249
let (// ) = Filename. concat in
@@ -322,7 +322,7 @@ let buckle_script_flags : (string * Bsc_args.spec * string) array =
322
322
" <module> Opens the module <module> before typing" ;
323
323
324
324
" -bs-jsx" , string_call (fun i ->
325
- (if i <> " 3" then Ext_arg . bad_arg (" Not supported jsx version : " ^ i));
325
+ (if i <> " 3" then Bsc_args . bad_arg (" Not supported jsx version : " ^ i));
326
326
Js_config. jsx_version := 3 ),
327
327
" *internal* Set jsx version" ;
328
328
@@ -532,8 +532,8 @@ let _ : unit =
532
532
~argv: Sys. argv
533
533
buckle_script_flags anonymous ~usage ;
534
534
with
535
- | Ext_arg. Bad_arg msg ->
536
- Format. eprintf " %s" msg ;
535
+ | Bsc_args. Bad msg ->
536
+ Format. eprintf " %s@. " msg ;
537
537
exit 2
538
538
| x ->
539
539
begin
0 commit comments