src/Pure/ML-Systems/install_pp_polyml-5.3.ML
author haftmann
Wed, 21 Oct 2009 08:14:38 +0200
changeset 33038 8f9594c31de4
parent 31433 12f5f6af3d2d
child 33538 edf497b5b5d2
permissions -rw-r--r--
dropped redundant gen_ prefix

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