src/Pure/ML-Systems/smlnj-pp-old.ML
author paulson
Wed, 19 Jul 2006 11:55:26 +0200
changeset 20153 6ff5d35749b0
parent 14519 4ca3608fdf4f
permissions -rw-r--r--
Fixed the bugs introduced by the last commit! Output is now *identical* to that produced by the old version, based on a-lists.

(*  Title:      Pure/ML-Systems/smlnj-pp-old.ML
    ID:         $Id$
    Author:     Sebastian Skalberg (TU Muenchen)

Installation of the pretty printer, using SML/NJ's old pretty printer
interface.
*)

fun make_pp path pprint =
  let
    open Compiler.PrettyPrint;

    fun pp pps obj =
      pprint obj
        (add_string pps, begin_block pps INCONSISTENT,
          fn wd => add_break pps (wd, 0), fn () => add_newline pps,
          fn () => end_block pps);
  in
    (path, pp)
  end;