From: David Scott Date: Tue, 12 Oct 2010 11:08:46 +0000 (+0100) Subject: CA-44731: Improve types of functions in the gzip module by \eta expansion to work... X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=bd0872832a51da9c210fc0e2636e298f2d13a351;p=xcp%2Fxen-api-libs.git CA-44731: Improve types of functions in the gzip module by \eta expansion to work around the value restriction. Signed-off-by: David Scott --- diff --git a/stdext/gzip.ml b/stdext/gzip.ml index 8182869..b7484a8 100644 --- a/stdext/gzip.ml +++ b/stdext/gzip.ml @@ -75,7 +75,7 @@ let go (mode: zcat_mode) (input: input_type) fd f = ) ) (fun () -> List.iter close !to_close) -let compress = go Compress Active -let decompress = go Decompress Active +let compress fd f = go Compress Active fd f +let decompress fd f = go Decompress Active fd f -let decompress_passive = go Decompress Passive +let decompress_passive fd f = go Decompress Passive fd f diff --git a/stdext/gzip.mli b/stdext/gzip.mli index 9b87d0e..b8613a3 100644 --- a/stdext/gzip.mli +++ b/stdext/gzip.mli @@ -18,7 +18,7 @@ val compress: Unix.file_descr -> (Unix.file_descr -> unit) -> unit (** Runs a decompression process which is fed from a pipe whose entrance is passed to 'f' and whose output is 'ofd' *) -val decompress: Unix.file_descr -> (Unix.file_descr -> unit) -> unit +val decompress: Unix.file_descr -> (Unix.file_descr -> 'a) -> 'a (* Experimental decompressor which is fed from an fd and writes to a pipe *) -val decompress_passive: Unix.file_descr -> (Unix.file_descr -> unit) -> unit +val decompress_passive: Unix.file_descr -> (Unix.file_descr -> 'a) -> 'a