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

SCM Repository

[smlnj] Annotation of /smlnj-lib/branches/rt-transition/PP/src/pp-stream-sig.sml
ViewVC logotype

Annotation of /smlnj-lib/branches/rt-transition/PP/src/pp-stream-sig.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2144 - (view) (download)
Original Path: smlnj-lib/trunk/PP/src/pp-stream-sig.sml

1 : monnier 7 (* pp-stream-sig.sml
2 :     *
3 : jhr 1809 * COPYRIGHT (c) 2005 John Reppy (http://www.cs.uchicago.edu/~jhr)
4 :     * All rights reserved.
5 : monnier 7 *
6 :     * This interface provides a output stream interface to pretty printing.
7 :     *)
8 :    
9 :     signature PP_STREAM =
10 :     sig
11 :     type device
12 :     type stream
13 :    
14 :     type token
15 :     (* tokens are an abstraction of strings (allowing for different
16 :     * widths and style information).
17 :     *)
18 :     type style
19 :    
20 :     datatype indent
21 :     = Abs of int (* indent relative to outer indentation *)
22 :     | Rel of int (* indent relative to start of box *)
23 :    
24 :     val openStream : device -> stream
25 :     val flushStream : stream -> unit
26 :     val closeStream : stream -> unit
27 : jhr 1340 val getDevice : stream -> device
28 : monnier 7
29 :     val openHBox : stream -> unit
30 :     val openVBox : stream -> indent -> unit
31 :     val openHVBox : stream -> indent -> unit
32 :     val openHOVBox : stream -> indent -> unit
33 :     val openBox : stream -> indent -> unit
34 :     val closeBox : stream -> unit
35 :    
36 :     val token : stream -> token -> unit
37 :     val string : stream -> string -> unit
38 :    
39 :     val pushStyle : (stream * style) -> unit
40 :     val popStyle : stream -> unit
41 :    
42 :     val break : stream -> {nsp : int, offset : int} -> unit
43 :     val space : stream -> int -> unit
44 :     (* space n == break{nsp=n, offset=0} *)
45 :     val cut : stream -> unit
46 :     (* cut == break{nsp=0, offset=0} *)
47 :     val newline : stream -> unit
48 :     val nbSpace : stream -> int -> unit
49 :     (* emits a nonbreakable space *)
50 :    
51 : monnier 289 val control : stream -> (device -> unit) -> unit
52 :    
53 : monnier 7 end
54 :    

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