src/Pure/ML-Systems/install_pp_polyml-5.3.ML
author wenzelm
Mon, 09 Nov 2009 21:30:54 +0100
changeset 33540 edf497b5b5d2
parent 31437 12f5f6af3d2d
child 33545 d8903f0002e5
permissions -rw-r--r--
setup for official Poly/ML 5.3.0, which is now the default;
     1 (*  Title:      Pure/ML-Systems/install_pp_polyml-5.3.ML
     2 
     3 Extra toplevel pretty-printing for Poly/ML 5.3.0.
     4 *)
     5 
     6 PolyML.addPrettyPrinter (fn depth => fn pretty => fn x =>
     7   (case Future.peek x of
     8     NONE => PolyML.PrettyString "<future>"
     9   | SOME (Exn.Exn _) => PolyML.PrettyString "<failed>"
    10   | SOME (Exn.Result y) => pretty (y, depth)));
    11 
    12 PolyML.addPrettyPrinter (fn depth => fn pretty => fn x =>
    13   (case Lazy.peek x of
    14     NONE => PolyML.PrettyString "<lazy>"
    15   | SOME (Exn.Exn _) => PolyML.PrettyString "<failed>"
    16   | SOME (Exn.Result y) => pretty (y, depth)));
    17