anchor.diff:      let code_of_term t =
           let f, tms = strip_comb t
           // Choice.get is safe to use here
  +        // OPTIMIZE : Use pattern-matching here instead of 'length' -- it's faster because length is O(n).
           if not(is_const f && fst(Choice.get <| dest_const f) = "ASCII") || not(length tms = 8) then
               failwith "code_of_term"
           else
  
positive.code: (* whether an identifier is symbolic.                                        *)
  (* ------------------------------------------------------------------------- *)
  
  // unparse_as_binder: Stops the quotation parser from treating a name as a binder.
  // parse_as_binder: Makes the quotation parser treat a name as a binder.
  // parses_as_binder: Tests if a string has binder status in the parser.
  // binders: Lists the binders.
  let unparse_as_binder, parse_as_binder, parses_as_binder, binders = 
      let binder_list = ref([] : string list)
      (fun n -> binder_list := subtract (!binder_list) [n]), (fun n -> binder_list := union (!binder_list) [n]), 
      (fun n -> mem n (!binder_list)), (fun () -> !binder_list)
  
  // unparse_as_prefix: Removes prefix status for an identifier.
  // parse_as_prefix: Gives an identifier prefix status.
  // is_prefix: Tests if an identifier has prefix status.
  // prefixes: Certain identifiers 'c' have prefix status, meaning that combinations of the form 'c f x' will
  //           be parsed as 'c (f x)' rather than the usual '(c f) x'. The call 'prefixes()' returns the list
  //           of all such identifiers.
  let unparse_as_prefix, parse_as_prefix, is_prefix, prefixes = 
      let prefix_list = ref([] : string list)
      (fun n -> prefix_list := subtract (!prefix_list) [n]), (fun n -> prefix_list := union (!prefix_list) [n]), 
      (fun n -> mem n (!prefix_list)), (fun () -> !prefix_list)
  
  // unparse_as_infix: Removes string from the list of infix operators.
  // parse_as_infix: Adds identifier to list of infixes, with given precedence and associativity.
  // get_infix_status: Get the precedence and associativity of an infix operator.
  // infixes: Lists the infixes currently recognized by the parser.
  let unparse_as_infix, parse_as_infix, get_infix_status, infixes = 
      let cmp (s, (x, a)) (t, (y, b)) = x < y || x = y && a > b || x = y && a = b && s < t
      let infix_list = ref([] : (string * (int * string)) list)
      (fun n -> infix_list := filter (((<>) n) << fst) (!infix_list)), 
      (fun (n, d) -> infix_list := sort cmp ((n, d) :: (filter (((<>) n) << fst) (!infix_list)))), 
      (fun n -> assoc n !infix_list),
      (fun () -> !infix_list)
  
  (* ------------------------------------------------------------------------- *)
  (* Interface mapping.                                                        *)
  (* ------------------------------------------------------------------------- *)
  
  /// List of active interface mappings.
  let the_interface = ref([] : (string * (string * hol_type)) list)
  
  /// List of overload skeletons for all overloadable identifiers.
  let the_overload_skeletons = ref([] : (string * hol_type) list)
  
  open FSharp.Compatibility.OCaml.Format
  
  
negative.code: /// Prints a theorem to formatter.
  let pp_print_thm fmt th = 
      let asl, tm = dest_thm th
      if not <| List.isEmpty asl then
          if !print_all_thm then
              pp_print_term fmt (hd asl)
              do_list (fun x ->
                  pp_print_string fmt ","
                  pp_print_space fmt ()
                  pp_print_term fmt x) (tl asl)
          else
              pp_print_string fmt "..."
          pp_print_space fmt ()
      
      pp_open_hbox fmt ()
      pp_print_string fmt "|- "
      pp_print_term fmt tm
      pp_close_box fmt ()
  
  (* ------------------------------------------------------------------------- *)
  (* Print on standard output.                                                 *)
  