Source file nav.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
(*****************************************************************************)
(*                                                                           *)
(*  Copyright (C) 2024 Yves Ndiaye                                           *)
(*                                                                           *)
(* This Source Code Form is subject to the terms of the Mozilla Public       *)
(* License, v. 2.0. If a copy of the MPL was not distributed with this       *)
(* file, You can obtain one at https://mozilla.org/MPL/2.0/.                 *)
(*                                                                           *)
(*****************************************************************************)

type point = {
  id : string;
  play_order : int;
  title : string;
  src : string;
  htmlref : string option;
}

type map = point list

let compare_play_order lhs rhs = Int.compare lhs.play_order rhs.play_order

(* let to_string t =
   Printf.sprintf "id = %s\nplay_order = %u\ntitle = %s\nsrc = %s\nhtmlref = %s"
     t.id t.play_order t.title t.src
     (Option.value ~default:"(none)" t.htmlref) *)