let cache_mode =
lazy
(match String.lowercase (Helm_registry.get "getter.cache_mode") with
- | "normal" -> Enc_normal
- | "gz" -> Enc_gzipped
+ | "normal" -> `Normal
+ | "gz" -> `Gzipped
| mode -> failwith ("Invalid cache mode: " ^ mode))
let reload () = reload_servers ()
(Lazy.force dtd_dir) (Lazy.force servers_file) (Lazy.force host)
(Lazy.force port) (Lazy.force my_own_url)
(Lazy.force dtd_base_url)
- (match Lazy.force cache_mode with Enc_normal -> "Normal" | Enc_gzipped -> "GZipped")
+ (match Lazy.force cache_mode with
+ | `Normal -> "Normal"
+ | `Gzipped -> "GZipped")
(String.concat "\n\t" (* (position * server) list *)
(List.map (fun (pos, server) -> sprintf "%3d: %s" pos server)
(servers ())))
exception Cache_failure of string
exception Dtd_not_found of string (* dtd's url *)
-type encoding = Enc_normal | Enc_gzipped
-type answer_format = Fmt_text | Fmt_xml
+type encoding = [ `Normal | `Gzipped ]
+type answer_format = [ `Text | `Xml ]
type ls_flag = No | Yes | Ann
type ls_object =
{