src/Pure/ML-Systems/install_pp_polyml.ML
author wenzelm
Sun May 31 15:07:03 2009 +0200 (2009-05-31)
changeset 31314 b58d6a33b57f
parent 29564 f8b933a62151
permissions -rw-r--r--
explicit PolyML.install_pp;
     1 (*  Title:      Pure/ML-Systems/install_pp_polyml.ML
     2 
     3 Extra toplevel pretty-printing for Poly/ML.
     4 *)
     5 
     6 PolyML.install_pp
     7   (fn (str, _, _, _) => fn depth => fn (print: 'a * int -> unit) => fn (x: 'a future) =>
     8     (case Future.peek x of
     9       NONE => str "<future>"
    10     | SOME (Exn.Exn _) => str "<failed>"
    11     | SOME (Exn.Result y) => print (y, depth)));
    12 
    13 PolyML.install_pp
    14   (fn (str, _, _, _) => fn depth => fn (print: 'a * int -> unit) => fn (x: 'a lazy) =>
    15     (case Lazy.peek x of
    16       NONE => str "<lazy>"
    17     | SOME (Exn.Exn _) => str "<failed>"
    18     | SOME (Exn.Result y) => print (y, depth)));
    19