diff options
author | Malte Voos <git@mal.tc> | 2024-06-23 01:36:48 +0200 |
---|---|---|
committer | Malte Voos <git@mal.tc> | 2024-06-23 01:36:48 +0200 |
commit | 8d40541003736d5319ec981278338e8c8c66daf6 (patch) | |
tree | e595d0055af42b6a9d84e504befbe114a8cef5e2 /lib/Ident.ml | |
parent | 36762e83887b6f917df46c5e40a11d53b697209d (diff) | |
download | toytt-8d40541003736d5319ec981278338e8c8c66daf6.tar.gz toytt-8d40541003736d5319ec981278338e8c8c66daf6.zip |
keep track of bound names everywhere to be able to output names instead of de bruijn indices
Diffstat (limited to 'lib/Ident.ml')
-rw-r--r-- | lib/Ident.ml | 9 |
1 files changed, 9 insertions, 0 deletions
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 |