src/Pure/ML-Systems/install_pp_polyml-5.3.ML
changeset 31433 12f5f6af3d2d
parent 31318 133d1cfd6ae7
child 33538 edf497b5b5d2
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/Pure/ML-Systems/install_pp_polyml-5.3.ML	Thu Jun 04 19:15:54 2009 +0200
     1.3 @@ -0,0 +1,17 @@
     1.4 +(*  Title:      Pure/ML-Systems/install_pp_polyml-5.3.ML
     1.5 +
     1.6 +Extra toplevel pretty-printing for Poly/ML 5.3.
     1.7 +*)
     1.8 +
     1.9 +PolyML.addPrettyPrinter (fn depth => fn pretty => fn x =>
    1.10 +  (case Future.peek x of
    1.11 +    NONE => PolyML.PrettyString "<future>"
    1.12 +  | SOME (Exn.Exn _) => PolyML.PrettyString "<failed>"
    1.13 +  | SOME (Exn.Result y) => pretty (y, depth)));
    1.14 +
    1.15 +PolyML.addPrettyPrinter (fn depth => fn pretty => fn x =>
    1.16 +  (case Lazy.peek x of
    1.17 +    NONE => PolyML.PrettyString "<lazy>"
    1.18 +  | SOME (Exn.Exn _) => PolyML.PrettyString "<failed>"
    1.19 +  | SOME (Exn.Result y) => pretty (y, depth)));
    1.20 +