Le 16/08/2020 à 10:33, Andreas Tille a écrit :
> I've fixed this in Git.  However, when trying to build I get:
> 
> + ocamlfind ocamlc -c -annot -w Z -package batteries -package csv -package 
> xmlm -package gsl -package sqlite3 -package zip -package mcl -thread -I 
> pplacer_src -I json_src -I pam_src -I tests -I common_src -I pdprune_src -I 
> cdd_src -I tests/rppr -I tests/json -I tests/pplacer -I tests/guppy -o 
> pplacer_src/gcat_model.cmo pplacer_src/gcat_model.ml
> File "pplacer_src/gcat_model.ml", line 439, characters 22-73:
> 439 |         (Enum.combine (Array.enum model.site_categories, Array.enum 
> mask)
>                             
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> Error: This expression has type 'a * 'b
>        but an expression was expected of type
>          'weak3 Ppatteries.Enum.t = 'weak3 BatEnum.t
> Command exited with code 2.
> 
> 
> Any hint how to fix this?

I think this is due to a new version of ocaml-batteries.

The attached patch fixes that.


Cheers,

-- 
Stéphane
diff --git a/pplacer_src/gcat_model.ml b/pplacer_src/gcat_model.ml
index 525d354..bd16994 100644
--- a/pplacer_src/gcat_model.ml
+++ b/pplacer_src/gcat_model.ml
@@ -436,7 +436,7 @@ struct
      * invalid and `check` will raise an error. *)
     if Array.length model.site_categories = Array.length mask then begin
       model.site_categories <-
-        (Enum.combine (Array.enum model.site_categories, Array.enum mask)
+        (Enum.combine (Array.enum model.site_categories) (Array.enum mask)
          |> Enum.filter_map (function x, true -> Some x | _, false -> None)
          |> Array.of_enum);
       setup_occupied_rates model
diff --git a/pplacer_src/guppy_cmdobjs.ml b/pplacer_src/guppy_cmdobjs.ml
index 7e04319..44ffc82 100644
--- a/pplacer_src/guppy_cmdobjs.ml
+++ b/pplacer_src/guppy_cmdobjs.ml
@@ -612,7 +612,7 @@ object (self)
 
   method private filter_fal orig_length fal edges =
     List.map (Array.filteri (fun i _ -> IntSet.mem i edges)) fal,
-    Enum.combine (Enum.range 0, IntSet.enum edges) |> IntMap.of_enum,
+    Enum.combine (Enum.range 0) (IntSet.enum edges) |> IntMap.of_enum,
     orig_length
 
   method private filter_rep_edges prl fal =
diff --git a/pplacer_src/guppy_mcl.ml b/pplacer_src/guppy_mcl.ml
index 76538d1..39a03f1 100644
--- a/pplacer_src/guppy_mcl.ml
+++ b/pplacer_src/guppy_mcl.ml
@@ -6,7 +6,7 @@ let of_pql ?inflation criterion pql =
   let pqa = Array.of_list pql in
   let name_map =
     Enum.combine
-      (Array.enum pqa |> Enum.map Pquery.name, Enum.range 0)
+      (Array.enum pqa |> Enum.map Pquery.name) (Enum.range 0)
     |> StringMap.of_enum
   in
   let count = StringMap.cardinal name_map in
diff --git a/pplacer_src/guppy_rarefact.ml b/pplacer_src/guppy_rarefact.ml
index 80f65cb..0d7171f 100644
--- a/pplacer_src/guppy_rarefact.ml
+++ b/pplacer_src/guppy_rarefact.ml
@@ -66,7 +66,6 @@ object (self)
               @ (if is_uniform_mass then [fmt qm] else [""]))
         |> begin
           if fv variance then
-            curry
               Enum.combine
               (Rarefaction.variance_of_placerun criterion ?k_max pr)
             |- Enum.map (fun ((_, uv, rv), sl) -> sl @ [fmt uv; fmt rv])
diff --git a/pplacer_src/pplacer_run.ml b/pplacer_src/pplacer_run.ml
index 65e787d..83f071c 100644
--- a/pplacer_src/pplacer_run.ml
+++ b/pplacer_src/pplacer_run.ml
@@ -85,7 +85,7 @@ let premask ?(discard_nonoverlapped = false) seq_type ref_align query_list =
    * informative column of the reference sequence. *)
   let overlaps_mask s = String.enum s
     |> Enum.map Alignment.informative
-    |> curry Enum.combine (Array.enum ref_mask)
+    |> Enum.combine (Array.enum ref_mask)
     |> Enum.exists (uncurry (&&))
   in
   let query_list = List.filter

Reply via email to