src/Pure/ML-Systems/install_pp_polyml-5.3.ML
author wenzelm
Thu, 04 Jun 2009 19:15:54 +0200
changeset 31433 12f5f6af3d2d
parent 31318 src/Pure/ML-Systems/install_pp_polyml-experimental.ML@133d1cfd6ae7
child 33538 edf497b5b5d2
permissions -rw-r--r--
less experimental polyml-5.3;

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

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

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)));