From 8d40541003736d5319ec981278338e8c8c66daf6 Mon Sep 17 00:00:00 2001 From: Malte Voos Date: Sun, 23 Jun 2024 01:36:48 +0200 Subject: keep track of bound names everywhere to be able to output names instead of de bruijn indices --- lib/Ident.ml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 lib/Ident.ml (limited to 'lib/Ident.ml') diff --git a/lib/Ident.ml b/lib/Ident.ml new file mode 100644 index 0000000..81c6575 --- /dev/null +++ b/lib/Ident.ml @@ -0,0 +1,9 @@ +type t = Yuujinchou.Trie.path + +type local = string option + +let to_local : t -> local option = function + | name :: [] -> Some (Some name) + | _ -> None + +let pp = Fmt.list ~sep:(Fmt.const Fmt.char '.') Fmt.string -- cgit 1.4.1