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 /smlnj-lib/trunk/PP/devices/ansi-term-pp.sml
ViewVC logotype

View of /smlnj-lib/trunk/PP/devices/ansi-term-pp.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2144 - (download) (annotate)
Thu Nov 2 16:23:11 2006 UTC (13 years, 11 months ago) by blume
File size: 931 byte(s)
moved smlnj-lib to toplevel
(* ansi-term-pp.sml
 *
 * COPYRIGHT (c) 2005 John Reppy (http://www.cs.uchicago.edu/~jhr)
 * All rights reserved.
 *)

structure ANSITermPP : sig

    structure Tok : sig
	include PP_TOKEN
	  where type style = ANSITermDev.style
	val token : (ANSITermDev.style * string) -> token
      end

    include PP_STREAM
      where type device = ANSITermDev.device
      where type style = ANSITermDev.style
      where type token = Tok.token

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

  end = struct

    structure Tok =
      struct
	type style = ANSITermDev.style
	datatype token = Tok of (style * string)
	fun string (Tok(sty, s)) = s
	fun style (Tok(sty, s)) = sty
	fun size (Tok(sty, s)) = String.size s
	val token = Tok
      end

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

    open PP

    fun openOut arg = openStream(ANSITermDev.openDev arg)

  end

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