-let message s = printf "** MatitaC: %s\n" s; flush stdout
-let warn s = eprintf "** MatitaC WARNING: %s\n" s; flush stdout
-let error s = eprintf "** MatitaC ERROR: %s\n" s; flush stderr
-
- (** console which prints on stdout/stderr *)
-class tty_console =
- object (self)
- method clear () = ()
- method echo_message s = message s
- method echo_error s = error s
- (* TODO Zack: this method is similar to omonymous method in console,
- * factorize it in a common super class *)
- method wrap_exn: 'a. (unit -> 'a) -> 'a option =
- fun f ->
- try
- Some (f ())
- with exn ->
- self#echo_error (explain exn);
- None
- method show ?(msg = "") () = assert false; ()
- method choose_uri (uris: string list): string = assert false
- end
-