src/Pure/ML-Systems/smlnj-pp-new.ML
author haftmann
Mon, 02 Oct 2006 23:00:49 +0200
changeset 20833 4fcf8ddb54f5
parent 14519 4ca3608fdf4f
permissions -rw-r--r--
improved serialization for arbitrary
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-new.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 new 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
        (string pps, openHOVBox pps o Rel,
4ca3608fdf4f Added support for the newer versions of SML/NJ, which break several of the
skalberg
parents:
diff changeset
    16
          fn wd => break pps {nsp=wd, offset=0}, fn () => newline pps,
4ca3608fdf4f Added support for the newer versions of SML/NJ, which break several of the
skalberg
parents:
diff changeset
    17
          fn () => closeBox 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;