src/Pure/ML-Systems/install_pp_polyml-5.3.ML
changeset 31433 12f5f6af3d2d
parent 31318 133d1cfd6ae7
child 33538 edf497b5b5d2
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/Pure/ML-Systems/install_pp_polyml-5.3.ML	Thu Jun 04 19:15:54 2009 +0200
@@ -0,0 +1,17 @@
+(*  Title:      Pure/ML-Systems/install_pp_polyml-5.3.ML
+
+Extra toplevel pretty-printing for Poly/ML 5.3.
+*)
+
+PolyML.addPrettyPrinter (fn depth => fn pretty => fn x =>
+  (case Future.peek x of
+    NONE => PolyML.PrettyString "<future>"
+  | SOME (Exn.Exn _) => PolyML.PrettyString "<failed>"
+  | SOME (Exn.Result y) => pretty (y, depth)));
+
+PolyML.addPrettyPrinter (fn depth => fn pretty => fn x =>
+  (case Lazy.peek x of
+    NONE => PolyML.PrettyString "<lazy>"
+  | SOME (Exn.Exn _) => PolyML.PrettyString "<failed>"
+  | SOME (Exn.Result y) => pretty (y, depth)));
+