rawterm_pp : ('a -> 'b) -> 'a -> 'b
When an interactive session begins, HOL links all of the pretty-printing functions to a backend value stored in a reference, Parse.current_backend. Of course, this reference can be changed as a user desires. A call to rawterm_pp f function wraps a call to Lib.with_flag, setting the current backend to be the raw terminal value for the duration of the f’s application to its (first) argument.
> ppstring pp_term ``p /\ q``; val it = "\^[[0;1;34mp\^[[0m /\\ \^[[0;1;34mq\^[[0m": string
> rawterm_pp (ppstring pp_term) ``p /\ q``; val it = "p /\\ q": string