From 6b377719c10d5ab3343fd5221f99a4a21008e25a Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Thu, 14 Mar 2024 08:26:58 +0100 Subject: Initial commit --- lib/data_types/path.ml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 lib/data_types/path.ml (limited to 'lib/data_types/path.ml') diff --git a/lib/data_types/path.ml b/lib/data_types/path.ml new file mode 100644 index 0000000..6684b5a --- /dev/null +++ b/lib/data_types/path.ml @@ -0,0 +1,15 @@ +type column = int [@@deriving ord] + +type t = { + alias : string option; + (* External file to load, when the information is missing, load in + the current file *) + column : column; +} +[@@deriving ord] + +let repr { alias; column } = + let column_text = ImportCSV.Csv.column_to_string column in + match alias with + | None -> ":" ^ column_text + | Some value -> ":" ^ value ^ "." ^ column_text -- cgit v1.2.3