src/Pure/ML-Systems/install_pp_polyml.ML
author hoelzl
Wed, 29 Apr 2009 20:19:50 +0200
changeset 31098 73dd67adf90a
parent 29564 f8b933a62151
child 31314 b58d6a33b57f
permissions -rw-r--r--
replaced Ifloat => real_of_float and real, renamed ApproxEq => inequality, uneq => interpret_inequality, uneq' => approx_inequality, Ifloatarith => interpret_floatarith

(*  Title:      Pure/ML-Systems/install_pp_polyml.ML

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

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)));

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)));