src/Pure/ML/install_pp_polyml.ML
author blanchet
Mon, 08 Nov 2010 02:33:48 +0100
changeset 40419 718b44dbd74d
parent 38327 d6afb77b0f6d
child 43761 e72ba84ae58f
permissions -rw-r--r--
make sure the SMT solver runs several iterations by lowering the timeout at each iteration -- yields better results in practice

(*  Title:      Pure/ML/install_pp_polyml.ML
    Author:     Makarius

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

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

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