Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] View of /sml/trunk/src/smlnj-lib/PP/devices/textio-pp.sml
ViewVC logotype

View of /sml/trunk/src/smlnj-lib/PP/devices/textio-pp.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 651 - (download) (annotate)
Thu Jun 1 18:34:03 2000 UTC (21 years ago) by monnier
File size: 671 byte(s)
bring revisions from the vendor branch to the trunk
(* textio-pp.sml
 *
 * COPYRIGHT (c) 1999 Bell Labs, Lucent Technologies.
 *
 * A pretty printer with TextIO output; there are no styles and
 * tokens are atoms.
 *)

structure TextIOPP : sig

    include PP_STREAM

    val openOut : {dst : TextIO.outstream, wid : int} -> stream

  end = struct

    structure Tok : PP_TOKEN =
      struct
	type style = unit
	type token = Atom.atom
	val string = Atom.toString
	fun style _ = ()
	fun size s = String.size(Atom.toString s)
      end

    structure PP = PPStreamFn (
      structure Token = Tok
      structure Device = SimpleTextIODev)

    open PP

    fun openOut arg = openStream(SimpleTextIODev.openDev arg)

  end;


root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0