diff options
Diffstat (limited to 'otherlibs/labltk/browser')
-rw-r--r-- | otherlibs/labltk/browser/searchpos.ml | 6 | ||||
-rw-r--r-- | otherlibs/labltk/browser/typecheck.ml | 23 | ||||
-rw-r--r-- | otherlibs/labltk/browser/viewer.ml | 2 |
3 files changed, 18 insertions, 13 deletions
diff --git a/otherlibs/labltk/browser/searchpos.ml b/otherlibs/labltk/browser/searchpos.ml index 5aa58e814..321deecee 100644 --- a/otherlibs/labltk/browser/searchpos.ml +++ b/otherlibs/labltk/browser/searchpos.ml @@ -326,7 +326,7 @@ let rec view_signature ?:title ?:path ?(:env = !start_env) sign = tl, tw, finish in Format.set_max_boxes 100; - Printtyp.signature sign; + Printtyp.signature Format.std_formatter sign; finish (); Lexical.init_tags tw; Lexical.tag tw; @@ -466,10 +466,12 @@ and view_decl_menu lid :kind :env :parent = if kind = `Type then Printtyp.type_declaration (ident_of_path path default:"t") + Format.std_formatter (find_type path env) else Printtyp.modtype_declaration (ident_of_path path default:"S") + Format.std_formatter (find_modtype path env); Format.close_box (); Format.print_flush (); Format.set_formatter_output_functions out:fo flush:ff; @@ -560,7 +562,7 @@ let view_type_menu kind :env :parent = Format.open_hbox (); Printtyp.reset (); Printtyp.mark_loops ty; - Printtyp.type_expr ty; + Printtyp.type_expr Format.std_formatter ty; Format.close_box (); Format.print_flush (); Format.set_formatter_output_functions out:fo flush:ff; Format.set_margin margin; diff --git a/otherlibs/labltk/browser/typecheck.ml b/otherlibs/labltk/browser/typecheck.ml index ee49c7743..c3666c8da 100644 --- a/otherlibs/labltk/browser/typecheck.ml +++ b/otherlibs/labltk/browser/typecheck.ml @@ -61,30 +61,33 @@ let f txt = error_messages := et :: !error_messages; let s, e = match exn with Lexer.Error (err, s, e) -> - Lexer.report_error err; s,e + Lexer.report_error Format.err_formatter err; s,e | Syntaxerr.Error err -> - Syntaxerr.report_error err; + Syntaxerr.report_error Format.err_formatter err; let l = match err with Syntaxerr.Unclosed(l,_,_,_) -> l | Syntaxerr.Other l -> l in l.loc_start, l.loc_end | Typecore.Error (l,err) -> - Typecore.report_error err; l.loc_start, l.loc_end + Typecore.report_error Format.err_formatter err; + l.loc_start, l.loc_end | Typeclass.Error (l,err) -> - Typeclass.report_error err; l.loc_start, l.loc_end + Typeclass.report_error Format.err_formatter err; + l.loc_start, l.loc_end | Typedecl.Error (l, err) -> - Typedecl.report_error err; l.loc_start, l.loc_end + Typedecl.report_error Format.err_formatter err; + l.loc_start, l.loc_end | Typemod.Error (l,err) -> - Typemod.report_error err; l.loc_start, l.loc_end + Typemod.report_error Format.err_formatter err; l.loc_start, l.loc_end | Typetexp.Error (l,err) -> - Typetexp.report_error err; l.loc_start, l.loc_end + Typetexp.report_error Format.err_formatter err; l.loc_start, l.loc_end | Includemod.Error errl -> - Includemod.report_error errl; 0, 0 + Includemod.report_error Format.err_formatter errl; 0, 0 | Env.Error err -> - Env.report_error err; 0, 0 + Env.report_error Format.err_formatter err; 0, 0 | Ctype.Tags(l, l') -> - Format.printf "In this program,@ variant constructors@ `%s and `%s@ have same hash value." l l'; 0, 0 + Format.printf "In this program,@ variant constructors@ `%s and `%s@ have same hash value.@." l l'; 0, 0 | _ -> assert false in end_message (); diff --git a/otherlibs/labltk/browser/viewer.ml b/otherlibs/labltk/browser/viewer.ml index bebd908c7..e5943f096 100644 --- a/otherlibs/labltk/browser/viewer.ml +++ b/otherlibs/labltk/browser/viewer.ml @@ -212,7 +212,7 @@ let view_defined modlid :env = with Not_found -> () | Env.Error err -> let tl, tw, finish = Jg_message.formatted title:"Error!" () in - Env.report_error err; + Env.report_error Format.std_formatter err; finish () let close_all_views () = |