diff options
Diffstat (limited to 'src/Names.ml')
-rw-r--r-- | src/Names.ml | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Names.ml b/src/Names.ml index a57f9aa1..1308eccc 100644 --- a/src/Names.ml +++ b/src/Names.ml @@ -72,3 +72,11 @@ let as_ident (pe : path_elem) : string = match pe with | Ident s -> s | Disambiguator _ -> raise (Failure "Improper variant") + +let path_elem_to_string (pe : path_elem) : string = + match pe with + | Ident s -> s + | Disambiguator d -> "{" ^ Disambiguator.to_string d ^ "}" + +let name_to_string (name : name) : string = + String.concat "::" (List.map path_elem_to_string name) |