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/MLRISC/library/annotations.sig
ViewVC logotype

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 245 - (download) (as text) (annotate)
Sat Apr 17 18:47:12 1999 UTC (20 years, 3 months ago) by monnier
Original Path: sml/branches/SMLNJ/src/MLRISC/library/annotations.sig
File size: 1112 byte(s)
version 110.16
(*
 *  User definable annotations.
 *
 *  Note: annotations will now be used extensively in all part of
 *  the optimizer.
 *
 *  Idea is stolen from Stephen Weeks
 *)

signature ANNOTATIONS =
sig
   
   type annotation  = exn
   type annotations = annotation list

   (*
    * The only predefined annotation is comment, which has no semantics.
    * The user has to generate other annotations using exception
    * declarations, or use the 'new' function below.
    *)
   exception COMMENT of string  

   (*
    * Generate a new annotation
    *)
   val new : unit -> { get : annotations -> 'a option,
                       put : 'a * annotations -> annotations,
                       rmv : annotations -> annotations
                     }

   (*
    * Extract an annotation value from an annotation list 
    *)
   val get : (annotation -> 'a option) -> annotations -> 'a option
   val rmv : (annotation -> bool) -> annotations -> annotations
   val put : annotation * annotations -> annotations

   (*
    * Pretty print an annotation
    *) 
   val toString : annotation -> string

end

(*
 * $Log$
 *) 

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