Debian Codegraph @

vendor/opam/src/core/opamSWHID.ml

raw
1 (**************************************************************************)
2 (* *)
3 (* Copyright 2022 OCamlPro *)
4 (* *)
5 (* All rights reserved. This file is distributed under the terms of the *)
6 (* GNU Lesser General Public License version 2.1, with the special *)
7 (* exception on linking described in the file LICENSE. *)
8 (* *)
9 (**************************************************************************)
10
11 type t = unit
12
13 let compare _a _b = 1
14 let equal _a _b = false
15
16 let of_string_opt _s = None
17
18 let of_string s =
19 match of_string_opt s with
20 | None -> invalid_arg "OpamSWHSWH_ID.of_string"
21 | Some i -> i
22
23 let to_string _ = ""
24
25 let to_json s = `String (to_string s)
26 let of_json = function
27 | `String s -> of_string_opt s
28 | _ -> None
29
30 let hash _ = ""
31
32 module O = struct
33 type nonrec t = t
34 let to_string = to_string
35 let to_json = to_json
36 let of_json = of_json
37 let compare = compare
38 end
39
40 module Set = OpamStd.Set.Make(O)
41 module Map = OpamStd.Map.Make(O)
42
43
44 (** Url handling *)
45
46 let is_valid _url = false
47
48 let of_url _url = None
49
50 let to_url _swh = failwith "stubbed out"
51
52 let compute _dir = None