From 5d227bcd0055d02e1d49a3dcd27e80a756923d5b Mon Sep 17 00:00:00 2001 From: Malte Voos Date: Sun, 23 Jun 2024 23:31:59 +0200 Subject: split code into smaller libraries and make a better repl --- src/ident/Ident.ml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 src/ident/Ident.ml (limited to 'src/ident/Ident.ml') diff --git a/src/ident/Ident.ml b/src/ident/Ident.ml new file mode 100644 index 0000000..81c6575 --- /dev/null +++ b/src/ident/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