src/Pure/ML-Systems/install_pp_polyml-experimental.ML
author wenzelm
Sun, 31 May 2009 14:46:44 +0200
changeset 31311 b82e55f51dcc
parent 30714 88bc86d7dec3
child 31318 133d1cfd6ae7
permissions -rw-r--r--
more precise version information;

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

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

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

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