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 /sml/trunk/src/smlnj-lib/PP/src/pp-desc-sig.sml
ViewVC logotype

Annotation of /sml/trunk/src/smlnj-lib/PP/src/pp-desc-sig.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 7 - (view) (download)

1 : monnier 7 (* pp-desc-sig.sml
2 :     *
3 :     * COPYRIGHT (c) 1997 Bell Labs, Lucent Technologies.
4 :     *
5 :     * This interface provides a declarative way to specify pretty-printing.
6 :     *)
7 :    
8 :     signature PP_DESC =
9 :     sig
10 :     type box
11 :    
12 :     type token
13 :     (* tokens are an abstraction of strings (allowing for different
14 :     * widths and style information).
15 :     *)
16 :     type style
17 :    
18 :     datatype indent
19 :     = Abs of int (* indent relative to outer indentation *)
20 :     | Rel of int (* indent relative to start of box *)
21 :    
22 :     val hBox : box list -> box
23 :     val vBox : (indent * box list) -> box
24 :     val hvBox : (indent * box list) -> box
25 :     val hovBox : (indent * box list) -> box
26 :     val box : (indent * box list) -> box
27 :    
28 :     val token : token -> box
29 :     val string : string -> box
30 :    
31 :     val style : (style * box list) -> box
32 :    
33 :     val break : {nsp : int, offset : int} -> box
34 :     val space : int -> box
35 :     (* space n == break{nsp=n, offset=0} *)
36 :     val cut : box
37 :     (* cut == break{nsp=0, offset=0} *)
38 :     val newline : box
39 :    
40 :     val onNewline : box -> box
41 :     (* the box is emitted iff it is preceeded by a newline *)
42 :    
43 :     end
44 :    

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