aboutsummaryrefslogtreecommitdiff
path: root/lib/data_types/path.ml
diff options
context:
space:
mode:
Diffstat (limited to 'lib/data_types/path.ml')
-rw-r--r--lib/data_types/path.ml15
1 files changed, 15 insertions, 0 deletions
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