diff options
Diffstat (limited to '')
-rw-r--r-- | src/Identifiers.ml | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/Identifiers.ml b/src/Identifiers.ml index 825b4ad9..31460dcd 100644 --- a/src/Identifiers.ml +++ b/src/Identifiers.ml @@ -176,6 +176,7 @@ type name = string list [@@deriving show, ord] (** A name such as: `std::collections::vector` (which would be represented as [["std"; "collections"; "vector"]]) *) +(* TODO: remove? *) module NameOrderedType : C.OrderedType with type t = name = struct type t = name @@ -190,3 +191,21 @@ end module NameMap = C.MakeMap (NameOrderedType) module NameSet = C.MakeSet (NameOrderedType) + +type module_name = name [@@deriving show, ord] + +type type_name = name [@@deriving show, ord] + +module ImplId = IdGen () + +(** A function name *) +type fun_name = + | Regular of name (** "Regular" function name *) + | Impl of type_name * ImplId.id * string + (** The function comes from an "impl" block. + + As we may have several "impl" blocks for one type, we need to use + a block id to disambiguate the functions (in rustc, this identifier + is called a "disambiguator"). + *) +[@@deriving show, ord] |