]> Joshua Wise's Git repositories - snipe.git/blobdiff - trans/temp.sml
Remove sizes from temps.
[snipe.git] / trans / temp.sml
index 1092dfcc3e64099cc0e47d733da709897f632d43..68de49ca392630b8259d892fa5d374aff3a7a0ff 100644 (file)
@@ -9,29 +9,27 @@ signature TEMP =
 sig
   type temp
 
-  val reset : unit -> unit     (* resets temp numbering *)
-  val new : string -> int -> temp      (* returns a unique new temp *)
-  val name : temp -> string    (* returns the name of a temp *)
-  val size : temp -> int       (* returns the size of a temp *)
+  val reset : unit -> unit           (* resets temp numbering *)
+  val new : string -> temp           (* returns a unique new temp *)
+  val name : temp -> string          (* returns the name of a temp *)
   val compare : temp * temp -> order (* comparison function *)
   val eq : temp * temp -> bool
 end
 
 structure Temp :> TEMP = 
 struct
-  type temp = int * string * int
+  type temp = int * string
 
   local
     val counter = ref 1
   in
     (* warning: calling reset() may jeopardize uniqueness of temps! *)
     fun reset () = ( counter := 1 )
-    fun new str size = (!counter, str, size) before ( counter := !counter + 1 )
+    fun new str = (!counter, str) before ( counter := !counter + 1 )
   end
 
-  fun name (t,s, sz) = "+t" ^ Int.toString t ^ "[" ^ s ^ "]"
-  fun size (t, s, sz) = sz
-  fun compare ((t1,_,_),(t2,_,_)) = Int.compare (t1,t2)
+  fun name (t,s) = "+t" ^ Int.toString t ^ "[" ^ s ^ "]"
+  fun compare ((t1,_),(t2,_)) = Int.compare (t1,t2)
 
-  fun eq ((t1,_,_), (t2,_,_)) = t1 = t2
+  fun eq ((t1,_), (t2,_)) = t1 = t2
 end
This page took 0.022268 seconds and 4 git commands to generate.