src/Pure/ML-Systems/install_pp_polyml.ML
author wenzelm
Thu, 23 Oct 2008 14:22:16 +0200
changeset 28673 d746a8c12c43
parent 28672 0baf1d9c6780
child 28975 ec120dc11e8b
permissions -rw-r--r--
renamed structure Susp to Lazy, and Susp.delay to Lazy.lazy;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
28557
6a661aeff564 extra Poly/ML toplevel pretty printing in ML-Systems/install_pp_polyml.ML;
wenzelm
parents:
diff changeset
     1
(*  Title:      Pure/ML-Systems/install_pp_polyml.ML
6a661aeff564 extra Poly/ML toplevel pretty printing in ML-Systems/install_pp_polyml.ML;
wenzelm
parents:
diff changeset
     2
    ID:         $Id$
6a661aeff564 extra Poly/ML toplevel pretty printing in ML-Systems/install_pp_polyml.ML;
wenzelm
parents:
diff changeset
     3
6a661aeff564 extra Poly/ML toplevel pretty printing in ML-Systems/install_pp_polyml.ML;
wenzelm
parents:
diff changeset
     4
Extra toplevel pretty-printing for Poly/ML.
6a661aeff564 extra Poly/ML toplevel pretty printing in ML-Systems/install_pp_polyml.ML;
wenzelm
parents:
diff changeset
     5
*)
6a661aeff564 extra Poly/ML toplevel pretty printing in ML-Systems/install_pp_polyml.ML;
wenzelm
parents:
diff changeset
     6
6a661aeff564 extra Poly/ML toplevel pretty printing in ML-Systems/install_pp_polyml.ML;
wenzelm
parents:
diff changeset
     7
install_pp (fn (str, _, _, _) => fn depth => fn (print: 'a * int -> unit) => fn (x: 'a Future.T) =>
6a661aeff564 extra Poly/ML toplevel pretty printing in ML-Systems/install_pp_polyml.ML;
wenzelm
parents:
diff changeset
     8
  (case Future.peek x of
6a661aeff564 extra Poly/ML toplevel pretty printing in ML-Systems/install_pp_polyml.ML;
wenzelm
parents:
diff changeset
     9
    NONE => str "<future>"
28570
81d97311c057 tuned output;
wenzelm
parents: 28557
diff changeset
    10
  | SOME (Exn.Exn _) => str "<failed>"
28557
6a661aeff564 extra Poly/ML toplevel pretty printing in ML-Systems/install_pp_polyml.ML;
wenzelm
parents:
diff changeset
    11
  | SOME (Exn.Result y) => print (y, depth)));
6a661aeff564 extra Poly/ML toplevel pretty printing in ML-Systems/install_pp_polyml.ML;
wenzelm
parents:
diff changeset
    12
28673
d746a8c12c43 renamed structure Susp to Lazy, and Susp.delay to Lazy.lazy;
wenzelm
parents: 28672
diff changeset
    13
install_pp (fn (str, _, _, _) => fn depth => fn (print: 'a * int -> unit) => fn (x: 'a Lazy.T) =>
d746a8c12c43 renamed structure Susp to Lazy, and Susp.delay to Lazy.lazy;
wenzelm
parents: 28672
diff changeset
    14
  (case Lazy.peek x of
d746a8c12c43 renamed structure Susp to Lazy, and Susp.delay to Lazy.lazy;
wenzelm
parents: 28672
diff changeset
    15
    NONE => str "<lazy>"
28672
0baf1d9c6780 adapted Susp.peek;
wenzelm
parents: 28570
diff changeset
    16
  | SOME (Exn.Exn _) => str "<failed>"
0baf1d9c6780 adapted Susp.peek;
wenzelm
parents: 28570
diff changeset
    17
  | SOME (Exn.Result y) => print (y, depth)));
0baf1d9c6780 adapted Susp.peek;
wenzelm
parents: 28570
diff changeset
    18