summaryrefslogtreecommitdiff
path: root/src/Names.ml
diff options
context:
space:
mode:
authorSon Ho2022-03-04 13:15:16 +0100
committerSon Ho2022-03-04 13:15:16 +0100
commit3ecca99a25369fecf990d922e6ccbaa31f71190a (patch)
tree1c87f1c678a06456662e22a375e6144abfe6a99d /src/Names.ml
parent69042fd599c2a965b9bc9d3eadc0acff314367a6 (diff)
Make minor modifications to the variable names generation
Diffstat (limited to '')
-rw-r--r--src/Names.ml5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Names.ml b/src/Names.ml
index 41177c37..5785d06f 100644
--- a/src/Names.ml
+++ b/src/Names.ml
@@ -60,3 +60,8 @@ let filter_disambiguators_zero (n : name) : name =
match pe with Ident _ -> true | Disambiguator d -> d <> Disambiguator.zero
in
List.filter pred n
+
+let as_ident (pe : path_elem) : string =
+ match pe with
+ | Ident s -> s
+ | Disambiguator _ -> raise (Failure "Improper variant")