src/Pure/ML-Systems/install_pp_polyml.ML
author nipkow
Thu, 24 Sep 2009 17:25:42 +0200
changeset 32676 b1c85a117dec
parent 31314 b58d6a33b57f
permissions -rw-r--r--
record how many "proof"s are solved by s/h

(*  Title:      Pure/ML-Systems/install_pp_polyml.ML

Extra toplevel pretty-printing for Poly/ML.
*)

PolyML.install_pp
  (fn (str, _, _, _) => fn depth => fn (print: 'a * int -> unit) => fn (x: 'a future) =>
    (case Future.peek x of
      NONE => str "<future>"
    | SOME (Exn.Exn _) => str "<failed>"
    | SOME (Exn.Result y) => print (y, depth)));

PolyML.install_pp
  (fn (str, _, _, _) => fn depth => fn (print: 'a * int -> unit) => fn (x: 'a lazy) =>
    (case Lazy.peek x of
      NONE => str "<lazy>"
    | SOME (Exn.Exn _) => str "<failed>"
    | SOME (Exn.Result y) => print (y, depth)));