summaryrefslogtreecommitdiff
path: root/src/Names.ml
diff options
context:
space:
mode:
Diffstat (limited to 'src/Names.ml')
-rw-r--r--src/Names.ml7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Names.ml b/src/Names.ml
index a8e6be59..41177c37 100644
--- a/src/Names.ml
+++ b/src/Names.ml
@@ -53,3 +53,10 @@ type module_name = name [@@deriving show, ord]
type type_name = name [@@deriving show, ord]
type fun_name = name [@@deriving show, ord]
+
+(** Filter the disambiguators equal to 0 in a name *)
+let filter_disambiguators_zero (n : name) : name =
+ let pred (pe : path_elem) : bool =
+ match pe with Ident _ -> true | Disambiguator d -> d <> Disambiguator.zero
+ in
+ List.filter pred n