]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/ocaml/getter/http_getter_env.ml
- use polymorphic variants for some configuration parameters
[helm.git] / helm / ocaml / getter / http_getter_env.ml
index 3264d6c65c33c546f6acae91acf0a20239627b39..985faee9bd346bde407e179d28fe035971725a32 100644 (file)
@@ -92,8 +92,8 @@ let my_own_url =
 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 ()
@@ -129,7 +129,9 @@ 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 ())))