src/Tools/Metis/src/Sharing.sig
changeset 39347 50dec19e682b
parent 39346 d837998f1e60
child 39348 6f9c9899f99f
equal deleted inserted replaced
39346:d837998f1e60 39347:50dec19e682b
     1 (* ========================================================================= *)
       
     2 (* PRESERVING SHARING OF ML VALUES                                           *)
       
     3 (* Copyright (c) 2005-2006 Joe Hurd, distributed under the BSD License *)
       
     4 (* ========================================================================= *)
       
     5 
       
     6 signature Sharing =
       
     7 sig
       
     8 
       
     9 (* ------------------------------------------------------------------------- *)
       
    10 (* Pointer equality.                                                         *)
       
    11 (* ------------------------------------------------------------------------- *)
       
    12 
       
    13 val pointerEqual : 'a * 'a -> bool
       
    14 
       
    15 (* ------------------------------------------------------------------------- *)
       
    16 (* List operations.                                                          *)
       
    17 (* ------------------------------------------------------------------------- *)
       
    18 
       
    19 val map : ('a -> 'a) -> 'a list -> 'a list
       
    20 
       
    21 val updateNth : int * 'a -> 'a list -> 'a list
       
    22 
       
    23 val setify : ''a list -> ''a list
       
    24 
       
    25 (* ------------------------------------------------------------------------- *)
       
    26 (* Function caching.                                                         *)
       
    27 (* ------------------------------------------------------------------------- *)
       
    28 
       
    29 val cache : ('a * 'a -> order) -> ('a -> 'b) -> 'a -> 'b
       
    30 
       
    31 (* ------------------------------------------------------------------------- *)
       
    32 (* Hash consing.                                                             *)
       
    33 (* ------------------------------------------------------------------------- *)
       
    34 
       
    35 val hashCons : ('a * 'a -> order) -> 'a -> 'a
       
    36 
       
    37 end