Idents: rename compare to ident_compare
This commit is contained in:
parent
6da5171e6a
commit
3d860c3624
2 changed files with 5 additions and 2 deletions
|
@ -20,7 +20,7 @@ type var_ident = ident
|
|||
|
||||
let num = ref 0
|
||||
|
||||
let compare id1 id2 = compare id1.num id2.num
|
||||
let ident_compare id1 id2 = compare id1.num id2.num
|
||||
let sourcename id = id.source
|
||||
let name id =
|
||||
if id.is_generated then
|
||||
|
@ -35,7 +35,7 @@ let fprint_t ff id = Format.fprintf ff "%s" (name id)
|
|||
|
||||
module M = struct
|
||||
type t = ident
|
||||
let compare = compare
|
||||
let compare = ident_compare
|
||||
let fprint = fprint_t
|
||||
end
|
||||
|
||||
|
|
|
@ -10,6 +10,9 @@ type ident
|
|||
(** Type to be used for local variables *)
|
||||
type var_ident = ident
|
||||
|
||||
(** Comparision on idents with the same properties as [Pervasives.compare] *)
|
||||
val ident_compare : ident -> ident -> int
|
||||
|
||||
(** Get the source name from an identifier*)
|
||||
val sourcename : ident -> string
|
||||
(** Get the full name of an identifier (it is guaranteed to be unique) *)
|
||||
|
|
Loading…
Reference in a new issue