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

SCM Repository

[smlnj] Diff of /sml/trunk/src/MLRISC/library/annotations.sig
ViewVC logotype

Diff of /sml/trunk/src/MLRISC/library/annotations.sig

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

sml/branches/SMLNJ/src/MLRISC/library/annotations.sig revision 411, Fri Sep 3 00:25:03 1999 UTC sml/trunk/src/MLRISC/library/annotations.sig revision 470, Wed Nov 10 22:42:52 1999 UTC
# Line 12  Line 12 
12  signature ANNOTATIONS =  signature ANNOTATIONS =
13  sig  sig
14    
15     type annotation  = exn     type annotation
16     type annotations = annotation list     type annotations = annotation list
17       type propList = annotations
18    
19     (*     exception NoProperty
20      * Generate a new annotation  
21      *)     type 'a property =
22     val new : unit -> { get : annotations -> 'a option,          { get      : annotations -> 'a option,
23                         put : 'a * annotations -> annotations,            peek     : annotation  -> 'a option,
24                         rmv : annotations -> annotations            lookup   : annotations -> 'a,
25              contains : annotations -> bool,
26              set      : 'a * annotations -> annotations,
27              rmv      : annotations -> annotations,
28              create   : 'a -> annotation
29                       }                       }
30       type flag = unit property
31    
32     (*     (*
33      * Extract an annotation value from an annotation list      * Generate a new annotation.
34        * Client should provide a pretty printing function.
35      *)      *)
36     val get : (annotation -> 'a option) -> annotations -> 'a option     val new : ('a -> string) option -> 'a property
37     val rmv : (annotation -> bool) -> annotations -> annotations     val newFlag : string -> flag
    val put : annotation * annotations -> annotations  
38    
39     (*     (*
40      * Pretty print an annotation      * Pretty print an annotation
41      *)      *)
42     val toString : annotation -> string     val toString : annotation -> string
43    
    (*  
     * Register new a pretty printer.  
     * The pretty printer should raises an exception (any) if it cannot  
     * handle the annotation given.  
     *)  
    val attachPrettyPrinter : (annotation -> string) -> unit  
   
44  end  end

Legend:
Removed from v.411  
changed lines
  Added in v.470

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