src/Pure/ML-Systems/smlnj-pp-old.ML
author wenzelm
Sat, 29 Apr 2006 23:16:46 +0200
changeset 19504 56541f86094a
parent 14519 4ca3608fdf4f
permissions -rw-r--r--
added unconstrainTs;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
14519
4ca3608fdf4f Added support for the newer versions of SML/NJ, which break several of the
skalberg
parents:
diff changeset
     1
(*  Title:      Pure/ML-Systems/smlnj-pp-old.ML
4ca3608fdf4f Added support for the newer versions of SML/NJ, which break several of the
skalberg
parents:
diff changeset
     2
    ID:         $Id$
4ca3608fdf4f Added support for the newer versions of SML/NJ, which break several of the
skalberg
parents:
diff changeset
     3
    Author:     Sebastian Skalberg (TU Muenchen)
4ca3608fdf4f Added support for the newer versions of SML/NJ, which break several of the
skalberg
parents:
diff changeset
     4
4ca3608fdf4f Added support for the newer versions of SML/NJ, which break several of the
skalberg
parents:
diff changeset
     5
Installation of the pretty printer, using SML/NJ's old pretty printer
4ca3608fdf4f Added support for the newer versions of SML/NJ, which break several of the
skalberg
parents:
diff changeset
     6
interface.
4ca3608fdf4f Added support for the newer versions of SML/NJ, which break several of the
skalberg
parents:
diff changeset
     7
*)
4ca3608fdf4f Added support for the newer versions of SML/NJ, which break several of the
skalberg
parents:
diff changeset
     8
4ca3608fdf4f Added support for the newer versions of SML/NJ, which break several of the
skalberg
parents:
diff changeset
     9
fun make_pp path pprint =
4ca3608fdf4f Added support for the newer versions of SML/NJ, which break several of the
skalberg
parents:
diff changeset
    10
  let
4ca3608fdf4f Added support for the newer versions of SML/NJ, which break several of the
skalberg
parents:
diff changeset
    11
    open Compiler.PrettyPrint;
4ca3608fdf4f Added support for the newer versions of SML/NJ, which break several of the
skalberg
parents:
diff changeset
    12
4ca3608fdf4f Added support for the newer versions of SML/NJ, which break several of the
skalberg
parents:
diff changeset
    13
    fun pp pps obj =
4ca3608fdf4f Added support for the newer versions of SML/NJ, which break several of the
skalberg
parents:
diff changeset
    14
      pprint obj
4ca3608fdf4f Added support for the newer versions of SML/NJ, which break several of the
skalberg
parents:
diff changeset
    15
        (add_string pps, begin_block pps INCONSISTENT,
4ca3608fdf4f Added support for the newer versions of SML/NJ, which break several of the
skalberg
parents:
diff changeset
    16
          fn wd => add_break pps (wd, 0), fn () => add_newline pps,
4ca3608fdf4f Added support for the newer versions of SML/NJ, which break several of the
skalberg
parents:
diff changeset
    17
          fn () => end_block pps);
4ca3608fdf4f Added support for the newer versions of SML/NJ, which break several of the
skalberg
parents:
diff changeset
    18
  in
4ca3608fdf4f Added support for the newer versions of SML/NJ, which break several of the
skalberg
parents:
diff changeset
    19
    (path, pp)
4ca3608fdf4f Added support for the newer versions of SML/NJ, which break several of the
skalberg
parents:
diff changeset
    20
  end;