src/Pure/ML-Systems/install_pp_polyml.ML
author wenzelm
Tue, 14 Oct 2008 16:01:36 +0200
changeset 28592 824f8390aaa2
parent 28570 81d97311c057
child 28672 0baf1d9c6780
permissions -rw-r--r--
renamed AtpThread to AtpWrapper;

(*  Title:      Pure/ML-Systems/install_pp_polyml.ML
    ID:         $Id$

Extra toplevel pretty-printing for Poly/ML.
*)

install_pp (fn (str, _, _, _) => fn depth => fn (print: 'a * int -> unit) => fn (x: 'a Future.T) =>
  (case Future.peek x of
    NONE => str "<future>"
  | SOME (Exn.Exn _) => str "<failed>"
  | SOME (Exn.Result y) => print (y, depth)));

install_pp (fn (str, _, _, _) => fn depth => fn (print: 'a * int -> unit) => fn (x: 'a Susp.T) =>
  (case Susp.peek x of
    NONE => str "<delayed>"
  | SOME y => print (y, depth)));