src/Pure/ML-Systems/install_pp_polyml-5.3.ML
author wenzelm
Mon, 09 Nov 2009 21:30:54 +0100
changeset 33538 edf497b5b5d2
parent 31433 12f5f6af3d2d
child 33545 d8903f0002e5
permissions -rw-r--r--
setup for official Poly/ML 5.3.0, which is now the default;

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

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

PolyML.addPrettyPrinter (fn depth => fn pretty => fn x =>
  (case Future.peek x of
    NONE => PolyML.PrettyString "<future>"
  | SOME (Exn.Exn _) => PolyML.PrettyString "<failed>"
  | SOME (Exn.Result y) => pretty (y, depth)));

PolyML.addPrettyPrinter (fn depth => fn pretty => fn x =>
  (case Lazy.peek x of
    NONE => PolyML.PrettyString "<lazy>"
  | SOME (Exn.Exn _) => PolyML.PrettyString "<failed>"
  | SOME (Exn.Result y) => pretty (y, depth)));