diff --git a/docs/api/Belt.Map.html b/docs/api/Belt.Map.html index 74de310955..e2eec6aa89 100644 --- a/docs/api/Belt.Map.html +++ b/docs/api/Belt.Map.html @@ -179,7 +179,7 @@

Module Belt.Map

-
 
     module IntCmp = (val IntCmp.comparable ~cmp:(fun (x:int) y -> Pervasives.comapre x y));;
+                    
 
     module IntCmp = (val IntCmp.comparable ~cmp:(fun (x:int) y -> Pervasives.compare x y));;
      let s = make ~id:(module IntCmp)
     
@@ -192,7 +192,7 @@

Module Belt.Map

-
 
      module IntCmp = (val IntCmp.comparable ~cmp:(fun (x:int) y -> Pervasives.comapre x y));;
+                    
 
      module IntCmp = (val IntCmp.comparable ~cmp:(fun (x:int) y -> Pervasives.compare x y));;
       isEmpty (ofArray [|1,"1"|] ~id:(module IntCmp)) = false;;
     
@@ -205,7 +205,7 @@

Module Belt.Map

-
 
      module IntCmp = (val IntCmp.comparable ~cmp:(fun (x:int) y -> Pervasives.comapre x y));;
+                    
 
      module IntCmp = (val IntCmp.comparable ~cmp:(fun (x:int) y -> Pervasives.compare x y));;
       has (ofArray [|1,"1"|] ~id:(module IntCmp)) 1 = true;;
     
@@ -252,7 +252,7 @@

Module Belt.Map

 
      module IntCmp =
-        (val IntCmp.comparableU ~cmp:(fun[@bs] (x:int) y -> Pervasives.comapre x y));;
+        (val IntCmp.comparableU ~cmp:(fun[@bs] (x:int) y -> Pervasives.compare x y));;
 
       let s0 = ofArray ~id:(module IntCmp) [|4,"4";1,"1";2,"2,"3""|];;
       let acc = ref [] ;;
@@ -274,7 +274,7 @@ 

Module Belt.Map

 
      module IntCmp =
-        (val IntCmp.comparableU ~cmp:(fun[@bs] (x:int) y -> Pervasives.comapre x y));;
+        (val IntCmp.comparableU ~cmp:(fun[@bs] (x:int) y -> Pervasives.compare x y));;
 
       let s0 = ofArray ~id:(module IntCmp) [|4,"4";1,"1";2,"2,"3""|];;
       reduce s0 [] (fun acc k v -> (k,v) acc ) = [4,"4";3,"3";2,"2";1,"1"];;
@@ -312,7 +312,7 @@ 

Module Belt.Map

 
      module IntCmp =
-        (val IntCmp.comparableU ~cmp:(fun[@bs] (x:int) y -> Pervasives.comapre x y));;
+        (val IntCmp.comparableU ~cmp:(fun[@bs] (x:int) y -> Pervasives.compare x y));;
       size (ofArray [2,"2"; 2,"1"; 3,"3"] ~id:(module IntCmp)) = 2 ;;
     
@@ -326,7 +326,7 @@

Module Belt.Map

 
      module IntCmp =
-        (val IntCmp.comparableU ~cmp:(fun[@bs] (x:int) y -> Pervasives.comapre x y));;
+        (val IntCmp.comparableU ~cmp:(fun[@bs] (x:int) y -> Pervasives.compare x y));;
       toArray (ofArray [2,"2"; 1,"1"; 3,"3"] ~id:(module IntCmp)) = [1,"1";2,"2";3,"3"]
     
@@ -352,7 +352,7 @@

Module Belt.Map

 
      module IntCmp =
-        (val IntCmp.comparableU ~cmp:(fun[@bs] (x:int) y -> Pervasives.comapre x y));;
+        (val IntCmp.comparableU ~cmp:(fun[@bs] (x:int) y -> Pervasives.compare x y));;
       toArray (ofArray [2,"2"; 1,"1"; 3,"3"] ~id:(module IntCmp)) = [1,"1";2,"2";3,"3"]
     
@@ -366,7 +366,7 @@

Module Belt.Map

 
      module IntCmp =
-        (val IntCmp.comparableU ~cmp:(fun[@bs] (x:int) y -> Pervasives.comapre x y));;
+        (val IntCmp.comparableU ~cmp:(fun[@bs] (x:int) y -> Pervasives.compare x y));;
       keysToArray (ofArray [2,"2"; 1,"1"; 3,"3"] ~id:(module IntCmp)) =
       [|1;2;3|];;
     
@@ -381,7 +381,7 @@

Module Belt.Map

 
      module IntCmp =
-        (val IntCmp.comparableU ~cmp:(fun[@bs] (x:int) y -> Pervasives.comapre x y));;
+        (val IntCmp.comparableU ~cmp:(fun[@bs] (x:int) y -> Pervasives.compare x y));;
       valuesToArray (ofArray [2,"2"; 1,"1"; 3,"3"] ~id:(module IntCmp)) =
       [|"1";"2";"3"|];;
     
@@ -472,7 +472,7 @@

Module Belt.Map

 
      module IntCmp =
-        (val IntCmp.comparableU ~cmp:(fun[@bs] (x:int) y -> Pervasives.comapre x y));;
+        (val IntCmp.comparableU ~cmp:(fun[@bs] (x:int) y -> Pervasives.compare x y));;
       get (ofArray [2,"2"; 1,"1"; 3,"3"] ~id:(module IntCmp)) 2 =
       Some "2";;
       get (ofArray [2,"2"; 1,"1"; 3,"3"] ~id:(module IntCmp)) 2 =
@@ -527,7 +527,7 @@ 

Module Belt.Map

 
      module IntCmp =
-        (val IntCmp.comparableU ~cmp:(fun[@bs] (x:int) y -> Pervasives.comapre x y));;
+        (val IntCmp.comparableU ~cmp:(fun[@bs] (x:int) y -> Pervasives.compare x y));;
       
       let s0 =  (ofArray [2,"2"; 1,"1"; 3,"3"] ~id:(module IntCmp));;
 
@@ -563,7 +563,7 @@ 

Module Belt.Map

 
      module IntCmp =
-        (val IntCmp.comparableU ~cmp:(fun[@bs] (x:int) y -> Pervasives.comapre x y));;
+        (val IntCmp.comparableU ~cmp:(fun[@bs] (x:int) y -> Pervasives.compare x y));;
       
       let s0 =  (ofArray [2,"2"; 1,"1"; 3,"3"] ~id:(module IntCmp));;
 
@@ -723,4 +723,4 @@ 

Module Belt.Map

- \ No newline at end of file + diff --git a/docs/api/Belt.Set.html b/docs/api/Belt.Set.html index 41bfc0560b..0203dd1d9e 100644 --- a/docs/api/Belt.Set.html +++ b/docs/api/Belt.Set.html @@ -176,7 +176,7 @@

Module Belt.Set

-
 
     module IntCmp = (val IntCmp.comparable ~cmp:(fun (x:int) y -> Pervasives.comapre x y))
+                    
 
     module IntCmp = (val IntCmp.comparable ~cmp:(fun (x:int) y -> Pervasives.compare x y))
      let s = make ~id:(module IntCmp)
     
@@ -191,7 +191,7 @@

Module Belt.Set

 
     module IntCmp = (val IntCmp.comparableU
                          ~cmp:(fun[@bs]
-                                (x:int) y -> Pervasives.comapre x y));;
+                                (x:int) y -> Pervasives.compare x y));;
      toArray (ofArray [1;3;2;4] (module IntCmp)) = [1;2;3;4]
       
     
@@ -222,7 +222,7 @@

Module Belt.Set

 
     module IntCmp =
        (val IntCmp.comparableU
            ~cmp:(fun[@bs]
-                  (x:int) y -> Pervasives.comapre x y));;     
+                  (x:int) y -> Pervasives.compare x y));;     
      isEmpty (ofArray [||] ~id:(module IntCmp)) = true;;
      isEmpty (ofArray [|1|] ~id:(module IntCmp)) = true;;  
    
@@ -238,7 +238,7 @@

Module Belt.Set

 
     module IntCmp =
        (val IntCmp.comparableU
            ~cmp:(fun[@bs]
-                  (x:int) y -> Pervasives.comapre x y));;
+                  (x:int) y -> Pervasives.compare x y));;
      let v = ofArray [|1;4;2;5|] ~id:(module IntCmp);;
      has v 3 = false;;
      has v 1 = true;;
@@ -256,7 +256,7 @@ 

Module Belt.Set

 
     module IntCmp =
        (val IntCmp.comparableU
            ~cmp:(fun[@bs]
-                  (x:int) y -> Pervasives.comapre x y));;
+                  (x:int) y -> Pervasives.compare x y));;
      let s0 = make ~id:(module IntCmp);;
      let s1 = add s0 1 ;;
      let s2 = add s1 2;;
@@ -294,7 +294,7 @@ 

Module Belt.Set

 
      module IntCmp =
        (val IntCmp.comparableU
            ~cmp:(fun[@bs]
-                  (x:int) y -> Pervasives.comapre x y));;
+                  (x:int) y -> Pervasives.compare x y));;
       let s0 = ofArray ~id:(module IntCmp) [|2;3;1;4;5|];;
       let s1 = remove s0 1 ;;
       let s2 = remove s1 3 ;;
@@ -331,7 +331,7 @@ 

Module Belt.Set

 
     module IntCmp =
        (val IntCmp.comparableU
            ~cmp:(fun[@bs]
-                  (x:int) y -> Pervasives.comapre x y));;
+                  (x:int) y -> Pervasives.compare x y));;
      let s0 = ofArray ~id:(module IntCmp) [|5;2;3;5;6|]];;
      let s1 = ofArray ~id:(module IntCmp) [|5;2;3;1;5;4;|];;
      toArray (union s0 s1) =  [|1;2;3;4;5;6|]
@@ -349,7 +349,7 @@ 

Module Belt.Set

 
     module IntCmp =
        (val IntCmp.comparableU
            ~cmp:(fun[@bs]
-                  (x:int) y -> Pervasives.comapre x y));;
+                  (x:int) y -> Pervasives.compare x y));;
      let s0 = ofArray ~id:(module IntCmp) [|5;2;3;5;6|]];;
      let s1 = ofArray ~id:(module IntCmp) [|5;2;3;1;5;4;|];;
      toArray (intersect s0 s1) =  [|2;3;5|]
@@ -367,7 +367,7 @@ 

Module Belt.Set

 
      module IntCmp =
         (val IntCmp.comparableU
             ~cmp:(fun[@bs]
-                   (x:int) y -> Pervasives.comapre x y));;
+                   (x:int) y -> Pervasives.compare x y));;
       let s0 = ofArray ~id:(module IntCmp) [|5;2;3;5;6|]];;
       let s1 = ofArray ~id:(module IntCmp) [|5;2;3;1;5;4;|];;
       toArray (diff s0 s1) = [|6|];;
@@ -386,7 +386,7 @@ 

Module Belt.Set

 
      module IntCmp =
         (val IntCmp.comparableU
             ~cmp:(fun[@bs]
-                   (x:int) y -> Pervasives.comapre x y));;
+                   (x:int) y -> Pervasives.compare x y));;
       let s0 = ofArray ~id:(module IntCmp) [|5;2;3;5;6|]];;
       let s1 = ofArray ~id:(module IntCmp) [|5;2;3;1;5;4;|];;
       let s2 = intersect s0 s1;;
@@ -431,7 +431,7 @@ 

Module Belt.Set

 
      module IntCmp =
         (val IntCmp.comparableU
             ~cmp:(fun[@bs]
-                   (x:int) y -> Pervasives.comapre x y));;
+                   (x:int) y -> Pervasives.compare x y));;
       let s0 = ofArray ~id:(module IntCmp) [|5;2;3;5;6|]];;
       let acc = ref [] ;;
       forEach s0 (fun x -> acc := x !acc);;
@@ -451,7 +451,7 @@ 

Module Belt.Set

 
      module IntCmp =
         (val IntCmp.comparableU
             ~cmp:(fun[@bs]
-                   (x:int) y -> Pervasives.comapre x y));;
+                   (x:int) y -> Pervasives.compare x y));;
       let s0 = ofArray ~id:(module IntCmp) [|5;2;3;5;6|]];;
       reduce s0 [] Bs.List.add = [6;5;3;2];;
     
@@ -514,7 +514,7 @@

Module Belt.Set

 
      module IntCmp =
         (val IntCmp.comparableU
             ~cmp:(fun[@bs]
-                   (x:int) y -> Pervasives.comapre x y));;
+                   (x:int) y -> Pervasives.compare x y));;
       let s0 = ofArray ~id:(module IntCmp) [|5;2;3;5;6|]];;
       size s0 = 4;;
     
@@ -531,7 +531,7 @@

Module Belt.Set

 
      module IntCmp =
         (val IntCmp.comparableU
             ~cmp:(fun[@bs]
-                   (x:int) y -> Pervasives.comapre x y));;
+                   (x:int) y -> Pervasives.compare x y));;
       let s0 = ofArray ~id:(module IntCmp) [|5;2;3;5;6|]];;
       toArray s0 = [|2;3;5;6|];;
     
@@ -675,4 +675,4 @@

Module Belt.Set

- \ No newline at end of file + diff --git a/docs/api/Belt_Map.html b/docs/api/Belt_Map.html index a968f46472..2a1186bf0e 100644 --- a/docs/api/Belt_Map.html +++ b/docs/api/Belt_Map.html @@ -220,7 +220,7 @@

Module Belt_Map

-
 
     module IntCmp = (val IntCmp.comparable ~cmp:(fun (x:int) y -> Pervasives.comapre x y));;
+                    
 
     module IntCmp = (val IntCmp.comparable ~cmp:(fun (x:int) y -> Pervasives.compare x y));;
      let s = make ~id:(module IntCmp)
     
@@ -233,7 +233,7 @@

Module Belt_Map

-
 
      module IntCmp = (val IntCmp.comparable ~cmp:(fun (x:int) y -> Pervasives.comapre x y));;
+                    
 
      module IntCmp = (val IntCmp.comparable ~cmp:(fun (x:int) y -> Pervasives.compare x y));;
       isEmpty (ofArray [|1,"1"|] ~id:(module IntCmp)) = false;;
     
@@ -246,7 +246,7 @@

Module Belt_Map

-
 
      module IntCmp = (val IntCmp.comparable ~cmp:(fun (x:int) y -> Pervasives.comapre x y));;
+                    
 
      module IntCmp = (val IntCmp.comparable ~cmp:(fun (x:int) y -> Pervasives.compare x y));;
       has (ofArray [|1,"1"|] ~id:(module IntCmp)) 1 = true;;
     
@@ -293,7 +293,7 @@

Module Belt_Map

 
      module IntCmp =
-        (val IntCmp.comparableU ~cmp:(fun[@bs] (x:int) y -> Pervasives.comapre x y));;
+        (val IntCmp.comparableU ~cmp:(fun[@bs] (x:int) y -> Pervasives.compare x y));;
 
       let s0 = ofArray ~id:(module IntCmp) [|4,"4";1,"1";2,"2,"3""|];;
       let acc = ref [] ;;
@@ -315,7 +315,7 @@ 

Module Belt_Map

 
      module IntCmp =
-        (val IntCmp.comparableU ~cmp:(fun[@bs] (x:int) y -> Pervasives.comapre x y));;
+        (val IntCmp.comparableU ~cmp:(fun[@bs] (x:int) y -> Pervasives.compare x y));;
 
       let s0 = ofArray ~id:(module IntCmp) [|4,"4";1,"1";2,"2,"3""|];;
       reduce s0 [] (fun acc k v -> (k,v) acc ) = [4,"4";3,"3";2,"2";1,"1"];;
@@ -353,7 +353,7 @@ 

Module Belt_Map

 
      module IntCmp =
-        (val IntCmp.comparableU ~cmp:(fun[@bs] (x:int) y -> Pervasives.comapre x y));;
+        (val IntCmp.comparableU ~cmp:(fun[@bs] (x:int) y -> Pervasives.compare x y));;
       size (ofArray [2,"2"; 2,"1"; 3,"3"] ~id:(module IntCmp)) = 2 ;;
     
@@ -367,7 +367,7 @@

Module Belt_Map

 
      module IntCmp =
-        (val IntCmp.comparableU ~cmp:(fun[@bs] (x:int) y -> Pervasives.comapre x y));;
+        (val IntCmp.comparableU ~cmp:(fun[@bs] (x:int) y -> Pervasives.compare x y));;
       toArray (ofArray [2,"2"; 1,"1"; 3,"3"] ~id:(module IntCmp)) = [1,"1";2,"2";3,"3"]
     
@@ -393,7 +393,7 @@

Module Belt_Map

 
      module IntCmp =
-        (val IntCmp.comparableU ~cmp:(fun[@bs] (x:int) y -> Pervasives.comapre x y));;
+        (val IntCmp.comparableU ~cmp:(fun[@bs] (x:int) y -> Pervasives.compare x y));;
       toArray (ofArray [2,"2"; 1,"1"; 3,"3"] ~id:(module IntCmp)) = [1,"1";2,"2";3,"3"]
     
@@ -407,7 +407,7 @@

Module Belt_Map

 
      module IntCmp =
-        (val IntCmp.comparableU ~cmp:(fun[@bs] (x:int) y -> Pervasives.comapre x y));;
+        (val IntCmp.comparableU ~cmp:(fun[@bs] (x:int) y -> Pervasives.compare x y));;
       keysToArray (ofArray [2,"2"; 1,"1"; 3,"3"] ~id:(module IntCmp)) =
       [|1;2;3|];;
     
@@ -422,7 +422,7 @@

Module Belt_Map

 
      module IntCmp =
-        (val IntCmp.comparableU ~cmp:(fun[@bs] (x:int) y -> Pervasives.comapre x y));;
+        (val IntCmp.comparableU ~cmp:(fun[@bs] (x:int) y -> Pervasives.compare x y));;
       valuesToArray (ofArray [2,"2"; 1,"1"; 3,"3"] ~id:(module IntCmp)) =
       [|"1";"2";"3"|];;
     
@@ -513,7 +513,7 @@

Module Belt_Map

 
      module IntCmp =
-        (val IntCmp.comparableU ~cmp:(fun[@bs] (x:int) y -> Pervasives.comapre x y));;
+        (val IntCmp.comparableU ~cmp:(fun[@bs] (x:int) y -> Pervasives.compare x y));;
       get (ofArray [2,"2"; 1,"1"; 3,"3"] ~id:(module IntCmp)) 2 =
       Some "2";;
       get (ofArray [2,"2"; 1,"1"; 3,"3"] ~id:(module IntCmp)) 2 =
@@ -568,7 +568,7 @@ 

Module Belt_Map

 
      module IntCmp =
-        (val IntCmp.comparableU ~cmp:(fun[@bs] (x:int) y -> Pervasives.comapre x y));;
+        (val IntCmp.comparableU ~cmp:(fun[@bs] (x:int) y -> Pervasives.compare x y));;
       
       let s0 =  (ofArray [2,"2"; 1,"1"; 3,"3"] ~id:(module IntCmp));;
 
@@ -604,7 +604,7 @@ 

Module Belt_Map

 
      module IntCmp =
-        (val IntCmp.comparableU ~cmp:(fun[@bs] (x:int) y -> Pervasives.comapre x y));;
+        (val IntCmp.comparableU ~cmp:(fun[@bs] (x:int) y -> Pervasives.compare x y));;
       
       let s0 =  (ofArray [2,"2"; 1,"1"; 3,"3"] ~id:(module IntCmp));;
 
@@ -764,4 +764,4 @@ 

Module Belt_Map

- \ No newline at end of file + diff --git a/docs/api/Belt_Set.html b/docs/api/Belt_Set.html index 4cf80d6af0..dea6b8f3ea 100644 --- a/docs/api/Belt_Set.html +++ b/docs/api/Belt_Set.html @@ -217,7 +217,7 @@

Module Belt_Set

-
 
     module IntCmp = (val IntCmp.comparable ~cmp:(fun (x:int) y -> Pervasives.comapre x y))
+                    
 
     module IntCmp = (val IntCmp.comparable ~cmp:(fun (x:int) y -> Pervasives.compare x y))
      let s = make ~id:(module IntCmp)
     
@@ -232,7 +232,7 @@

Module Belt_Set

 
     module IntCmp = (val IntCmp.comparableU
                          ~cmp:(fun[@bs]
-                                (x:int) y -> Pervasives.comapre x y));;
+                                (x:int) y -> Pervasives.compare x y));;
      toArray (ofArray [1;3;2;4] (module IntCmp)) = [1;2;3;4]
       
     
@@ -263,7 +263,7 @@

Module Belt_Set

 
     module IntCmp =
        (val IntCmp.comparableU
            ~cmp:(fun[@bs]
-                  (x:int) y -> Pervasives.comapre x y));;     
+                  (x:int) y -> Pervasives.compare x y));;     
      isEmpty (ofArray [||] ~id:(module IntCmp)) = true;;
      isEmpty (ofArray [|1|] ~id:(module IntCmp)) = true;;  
    
@@ -279,7 +279,7 @@

Module Belt_Set

 
     module IntCmp =
        (val IntCmp.comparableU
            ~cmp:(fun[@bs]
-                  (x:int) y -> Pervasives.comapre x y));;
+                  (x:int) y -> Pervasives.compare x y));;
      let v = ofArray [|1;4;2;5|] ~id:(module IntCmp);;
      has v 3 = false;;
      has v 1 = true;;
@@ -297,7 +297,7 @@ 

Module Belt_Set

 
     module IntCmp =
        (val IntCmp.comparableU
            ~cmp:(fun[@bs]
-                  (x:int) y -> Pervasives.comapre x y));;
+                  (x:int) y -> Pervasives.compare x y));;
      let s0 = make ~id:(module IntCmp);;
      let s1 = add s0 1 ;;
      let s2 = add s1 2;;
@@ -335,7 +335,7 @@ 

Module Belt_Set

 
      module IntCmp =
        (val IntCmp.comparableU
            ~cmp:(fun[@bs]
-                  (x:int) y -> Pervasives.comapre x y));;
+                  (x:int) y -> Pervasives.compare x y));;
       let s0 = ofArray ~id:(module IntCmp) [|2;3;1;4;5|];;
       let s1 = remove s0 1 ;;
       let s2 = remove s1 3 ;;
@@ -372,7 +372,7 @@ 

Module Belt_Set

 
     module IntCmp =
        (val IntCmp.comparableU
            ~cmp:(fun[@bs]
-                  (x:int) y -> Pervasives.comapre x y));;
+                  (x:int) y -> Pervasives.compare x y));;
      let s0 = ofArray ~id:(module IntCmp) [|5;2;3;5;6|]];;
      let s1 = ofArray ~id:(module IntCmp) [|5;2;3;1;5;4;|];;
      toArray (union s0 s1) =  [|1;2;3;4;5;6|]
@@ -390,7 +390,7 @@ 

Module Belt_Set

 
     module IntCmp =
        (val IntCmp.comparableU
            ~cmp:(fun[@bs]
-                  (x:int) y -> Pervasives.comapre x y));;
+                  (x:int) y -> Pervasives.compare x y));;
      let s0 = ofArray ~id:(module IntCmp) [|5;2;3;5;6|]];;
      let s1 = ofArray ~id:(module IntCmp) [|5;2;3;1;5;4;|];;
      toArray (intersect s0 s1) =  [|2;3;5|]
@@ -408,7 +408,7 @@ 

Module Belt_Set

 
      module IntCmp =
         (val IntCmp.comparableU
             ~cmp:(fun[@bs]
-                   (x:int) y -> Pervasives.comapre x y));;
+                   (x:int) y -> Pervasives.compare x y));;
       let s0 = ofArray ~id:(module IntCmp) [|5;2;3;5;6|]];;
       let s1 = ofArray ~id:(module IntCmp) [|5;2;3;1;5;4;|];;
       toArray (diff s0 s1) = [|6|];;
@@ -427,7 +427,7 @@ 

Module Belt_Set

 
      module IntCmp =
         (val IntCmp.comparableU
             ~cmp:(fun[@bs]
-                   (x:int) y -> Pervasives.comapre x y));;
+                   (x:int) y -> Pervasives.compare x y));;
       let s0 = ofArray ~id:(module IntCmp) [|5;2;3;5;6|]];;
       let s1 = ofArray ~id:(module IntCmp) [|5;2;3;1;5;4;|];;
       let s2 = intersect s0 s1;;
@@ -472,7 +472,7 @@ 

Module Belt_Set

 
      module IntCmp =
         (val IntCmp.comparableU
             ~cmp:(fun[@bs]
-                   (x:int) y -> Pervasives.comapre x y));;
+                   (x:int) y -> Pervasives.compare x y));;
       let s0 = ofArray ~id:(module IntCmp) [|5;2;3;5;6|]];;
       let acc = ref [] ;;
       forEach s0 (fun x -> acc := x !acc);;
@@ -492,7 +492,7 @@ 

Module Belt_Set

 
      module IntCmp =
         (val IntCmp.comparableU
             ~cmp:(fun[@bs]
-                   (x:int) y -> Pervasives.comapre x y));;
+                   (x:int) y -> Pervasives.compare x y));;
       let s0 = ofArray ~id:(module IntCmp) [|5;2;3;5;6|]];;
       reduce s0 [] Bs.List.add = [6;5;3;2];;
     
@@ -555,7 +555,7 @@

Module Belt_Set

 
      module IntCmp =
         (val IntCmp.comparableU
             ~cmp:(fun[@bs]
-                   (x:int) y -> Pervasives.comapre x y));;
+                   (x:int) y -> Pervasives.compare x y));;
       let s0 = ofArray ~id:(module IntCmp) [|5;2;3;5;6|]];;
       size s0 = 4;;
     
@@ -572,7 +572,7 @@

Module Belt_Set

 
      module IntCmp =
         (val IntCmp.comparableU
             ~cmp:(fun[@bs]
-                   (x:int) y -> Pervasives.comapre x y));;
+                   (x:int) y -> Pervasives.compare x y));;
       let s0 = ofArray ~id:(module IntCmp) [|5;2;3;5;6|]];;
       toArray s0 = [|2;3;5;6|];;
     
@@ -716,4 +716,4 @@

Module Belt_Set

- \ No newline at end of file + diff --git a/jscomp/others/belt_Map.mli b/jscomp/others/belt_Map.mli index ff4a054aae..bd09da8d55 100644 --- a/jscomp/others/belt_Map.mli +++ b/jscomp/others/belt_Map.mli @@ -122,7 +122,7 @@ val make: id:('k, 'id) id -> ('k, 'a, 'id) t (** [make ~id] @example {[ - module IntCmp = (val IntCmp.comparable ~cmp:(fun (x:int) y -> Pervasives.comapre x y));; + module IntCmp = (val IntCmp.comparable ~cmp:(fun (x:int) y -> Pervasives.compare x y));; let s = make ~id:(module IntCmp) ]} @@ -132,7 +132,7 @@ val make: id:('k, 'id) id -> ('k, 'a, 'id) t val isEmpty: _ t -> bool (** [isEmpty s0] @example {[ - module IntCmp = (val IntCmp.comparable ~cmp:(fun (x:int) y -> Pervasives.comapre x y));; + module IntCmp = (val IntCmp.comparable ~cmp:(fun (x:int) y -> Pervasives.compare x y));; isEmpty (ofArray [|1,"1"|] ~id:(module IntCmp)) = false;; ]} *) @@ -141,7 +141,7 @@ val has: ('k, 'a, 'id) t -> 'k -> bool (** [has s k] @example {[ - module IntCmp = (val IntCmp.comparable ~cmp:(fun (x:int) y -> Pervasives.comapre x y));; + module IntCmp = (val IntCmp.comparable ~cmp:(fun (x:int) y -> Pervasives.compare x y));; has (ofArray [|1,"1"|] ~id:(module IntCmp)) 1 = true;; ]} *) @@ -187,7 +187,7 @@ val forEach: ('k, 'a, 'id) t -> ('k -> 'a -> unit) -> unit @example {[ module IntCmp = - (val IntCmp.comparableU ~cmp:(fun[\@bs] (x:int) y -> Pervasives.comapre x y));; + (val IntCmp.comparableU ~cmp:(fun[\@bs] (x:int) y -> Pervasives.compare x y));; let s0 = ofArray ~id:(module IntCmp) [|4,"4";1,"1";2,"2,"3""|];; let acc = ref [] ;; @@ -205,7 +205,7 @@ val reduce: ('k, 'a, 'id) t -> 'acc -> ('acc -> 'k -> 'a -> 'acc) -> 'acc @example {[ module IntCmp = - (val IntCmp.comparableU ~cmp:(fun[\@bs] (x:int) y -> Pervasives.comapre x y));; + (val IntCmp.comparableU ~cmp:(fun[\@bs] (x:int) y -> Pervasives.compare x y));; let s0 = ofArray ~id:(module IntCmp) [|4,"4";1,"1";2,"2,"3""|];; reduce s0 [] (fun acc k v -> (k,v) acc ) = [4,"4";3,"3";2,"2";1,"1"];; @@ -227,7 +227,7 @@ val size: ('k, 'a, 'id) t -> int @example {[ module IntCmp = - (val IntCmp.comparableU ~cmp:(fun[\@bs] (x:int) y -> Pervasives.comapre x y));; + (val IntCmp.comparableU ~cmp:(fun[\@bs] (x:int) y -> Pervasives.compare x y));; size (ofArray [2,"2"; 2,"1"; 3,"3"] ~id:(module IntCmp)) = 2 ;; ]} *) @@ -236,7 +236,7 @@ val toArray: ('k, 'a, 'id) t -> ('k * 'a) array @example {[ module IntCmp = - (val IntCmp.comparableU ~cmp:(fun[\@bs] (x:int) y -> Pervasives.comapre x y));; + (val IntCmp.comparableU ~cmp:(fun[\@bs] (x:int) y -> Pervasives.compare x y));; toArray (ofArray [2,"2"; 1,"1"; 3,"3"] ~id:(module IntCmp)) = [1,"1";2,"2";3,"3"] ]} @@ -251,7 +251,7 @@ val ofArray: ('k * 'a) array -> id:('k,'id) id -> ('k,'a,'id) t (** [ofArray kvs ~id] @example {[ module IntCmp = - (val IntCmp.comparableU ~cmp:(fun[\@bs] (x:int) y -> Pervasives.comapre x y));; + (val IntCmp.comparableU ~cmp:(fun[\@bs] (x:int) y -> Pervasives.compare x y));; toArray (ofArray [2,"2"; 1,"1"; 3,"3"] ~id:(module IntCmp)) = [1,"1";2,"2";3,"3"] ]} *) @@ -260,7 +260,7 @@ val keysToArray: ('k, 'a, 'id) t -> 'k array @example {[ module IntCmp = - (val IntCmp.comparableU ~cmp:(fun[\@bs] (x:int) y -> Pervasives.comapre x y));; + (val IntCmp.comparableU ~cmp:(fun[\@bs] (x:int) y -> Pervasives.compare x y));; keysToArray (ofArray [2,"2"; 1,"1"; 3,"3"] ~id:(module IntCmp)) = [|1;2;3|];; ]} @@ -270,7 +270,7 @@ val valuesToArray: ('k, 'a, 'id) t -> 'a array @example {[ module IntCmp = - (val IntCmp.comparableU ~cmp:(fun[\@bs] (x:int) y -> Pervasives.comapre x y));; + (val IntCmp.comparableU ~cmp:(fun[\@bs] (x:int) y -> Pervasives.compare x y));; valuesToArray (ofArray [2,"2"; 1,"1"; 3,"3"] ~id:(module IntCmp)) = [|"1";"2";"3"|];; ]} @@ -315,7 +315,7 @@ val get: ('k, 'a, 'id) t -> 'k -> 'a option @example {[ module IntCmp = - (val IntCmp.comparableU ~cmp:(fun[\@bs] (x:int) y -> Pervasives.comapre x y));; + (val IntCmp.comparableU ~cmp:(fun[\@bs] (x:int) y -> Pervasives.compare x y));; get (ofArray [2,"2"; 1,"1"; 3,"3"] ~id:(module IntCmp)) 2 = Some "2";; get (ofArray [2,"2"; 1,"1"; 3,"3"] ~id:(module IntCmp)) 2 = @@ -352,7 +352,7 @@ val remove: ('k, 'a, 'id) t -> 'k -> ('k, 'a, 'id) t @example {[ module IntCmp = - (val IntCmp.comparableU ~cmp:(fun[\@bs] (x:int) y -> Pervasives.comapre x y));; + (val IntCmp.comparableU ~cmp:(fun[\@bs] (x:int) y -> Pervasives.compare x y));; let s0 = (ofArray [2,"2"; 1,"1"; 3,"3"] ~id:(module IntCmp));; @@ -380,7 +380,7 @@ val set: @example {[ module IntCmp = - (val IntCmp.comparableU ~cmp:(fun[\@bs] (x:int) y -> Pervasives.comapre x y));; + (val IntCmp.comparableU ~cmp:(fun[\@bs] (x:int) y -> Pervasives.compare x y));; let s0 = (ofArray [2,"2"; 1,"1"; 3,"3"] ~id:(module IntCmp));; diff --git a/jscomp/others/belt_Set.mli b/jscomp/others/belt_Set.mli index f16c112ad0..1c86796dab 100644 --- a/jscomp/others/belt_Set.mli +++ b/jscomp/others/belt_Set.mli @@ -108,7 +108,7 @@ val make: id:('elt, 'id) id -> ('elt, 'id) t (** [make ~id] @example {[ - module IntCmp = (val IntCmp.comparable ~cmp:(fun (x:int) y -> Pervasives.comapre x y)) + module IntCmp = (val IntCmp.comparable ~cmp:(fun (x:int) y -> Pervasives.compare x y)) let s = make ~id:(module IntCmp) ]} @@ -121,7 +121,7 @@ val ofArray: 'k array -> id:('k, 'id) id -> ('k, 'id) t @example{[ module IntCmp = (val IntCmp.comparableU ~cmp:(fun[\@bs] - (x:int) y -> Pervasives.comapre x y));; + (x:int) y -> Pervasives.compare x y));; toArray (ofArray [1;3;2;4] (module IntCmp)) = [1;2;3;4] ]} @@ -143,7 +143,7 @@ val isEmpty: _ t -> bool module IntCmp = (val IntCmp.comparableU ~cmp:(fun[\@bs] - (x:int) y -> Pervasives.comapre x y));; + (x:int) y -> Pervasives.compare x y));; isEmpty (ofArray [||] ~id:(module IntCmp)) = true;; isEmpty (ofArray [|1|] ~id:(module IntCmp)) = true;; ]} @@ -154,7 +154,7 @@ val has: ('elt, 'id) t -> 'elt -> bool module IntCmp = (val IntCmp.comparableU ~cmp:(fun[\@bs] - (x:int) y -> Pervasives.comapre x y));; + (x:int) y -> Pervasives.compare x y));; let v = ofArray [|1;4;2;5|] ~id:(module IntCmp);; has v 3 = false;; has v 1 = true;; @@ -169,7 +169,7 @@ val add: module IntCmp = (val IntCmp.comparableU ~cmp:(fun[\@bs] - (x:int) y -> Pervasives.comapre x y));; + (x:int) y -> Pervasives.compare x y));; let s0 = make ~id:(module IntCmp);; let s1 = add s0 1 ;; let s2 = add s1 2;; @@ -197,7 +197,7 @@ val remove: ('elt, 'id) t -> 'elt -> ('elt, 'id) t module IntCmp = (val IntCmp.comparableU ~cmp:(fun[\@bs] - (x:int) y -> Pervasives.comapre x y));; + (x:int) y -> Pervasives.compare x y));; let s0 = ofArray ~id:(module IntCmp) [|2;3;1;4;5|];; let s1 = remove s0 1 ;; let s2 = remove s1 3 ;; @@ -226,7 +226,7 @@ val union: ('elt, 'id) t -> ('elt, 'id) t -> ('elt, 'id) t module IntCmp = (val IntCmp.comparableU ~cmp:(fun[\@bs] - (x:int) y -> Pervasives.comapre x y));; + (x:int) y -> Pervasives.compare x y));; let s0 = ofArray ~id:(module IntCmp) [|5;2;3;5;6|]];; let s1 = ofArray ~id:(module IntCmp) [|5;2;3;1;5;4;|];; toArray (union s0 s1) = [|1;2;3;4;5;6|] @@ -239,7 +239,7 @@ val intersect: ('elt, 'id) t -> ('elt, 'id) t -> ('elt, 'id) t module IntCmp = (val IntCmp.comparableU ~cmp:(fun[\@bs] - (x:int) y -> Pervasives.comapre x y));; + (x:int) y -> Pervasives.compare x y));; let s0 = ofArray ~id:(module IntCmp) [|5;2;3;5;6|]];; let s1 = ofArray ~id:(module IntCmp) [|5;2;3;1;5;4;|];; toArray (intersect s0 s1) = [|2;3;5|] @@ -252,7 +252,7 @@ val diff: ('elt, 'id) t -> ('elt, 'id) t -> ('elt, 'id) t module IntCmp = (val IntCmp.comparableU ~cmp:(fun[\@bs] - (x:int) y -> Pervasives.comapre x y));; + (x:int) y -> Pervasives.compare x y));; let s0 = ofArray ~id:(module IntCmp) [|5;2;3;5;6|]];; let s1 = ofArray ~id:(module IntCmp) [|5;2;3;1;5;4;|];; toArray (diff s0 s1) = [|6|];; @@ -267,7 +267,7 @@ val subset: ('elt, 'id) t -> ('elt, 'id) t -> bool module IntCmp = (val IntCmp.comparableU ~cmp:(fun[\@bs] - (x:int) y -> Pervasives.comapre x y));; + (x:int) y -> Pervasives.compare x y));; let s0 = ofArray ~id:(module IntCmp) [|5;2;3;5;6|]];; let s1 = ofArray ~id:(module IntCmp) [|5;2;3;1;5;4;|];; let s2 = intersect s0 s1;; @@ -299,7 +299,7 @@ val forEach: ('elt, 'id) t -> ('elt -> unit ) -> unit module IntCmp = (val IntCmp.comparableU ~cmp:(fun[\@bs] - (x:int) y -> Pervasives.comapre x y));; + (x:int) y -> Pervasives.compare x y));; let s0 = ofArray ~id:(module IntCmp) [|5;2;3;5;6|]];; let acc = ref [] ;; forEach s0 (fun x -> acc := x !acc);; @@ -315,7 +315,7 @@ val reduce: ('elt, 'id) t -> 'a -> ('a -> 'elt -> 'a ) -> 'a module IntCmp = (val IntCmp.comparableU ~cmp:(fun[\@bs] - (x:int) y -> Pervasives.comapre x y));; + (x:int) y -> Pervasives.compare x y));; let s0 = ofArray ~id:(module IntCmp) [|5;2;3;5;6|]];; reduce s0 [] Bs.List.add = [6;5;3;2];; ]} @@ -351,7 +351,7 @@ val size: ('elt, 'id) t -> int module IntCmp = (val IntCmp.comparableU ~cmp:(fun[\@bs] - (x:int) y -> Pervasives.comapre x y));; + (x:int) y -> Pervasives.compare x y));; let s0 = ofArray ~id:(module IntCmp) [|5;2;3;5;6|]];; size s0 = 4;; ]} @@ -363,7 +363,7 @@ val toArray: ('elt, 'id) t -> 'elt array module IntCmp = (val IntCmp.comparableU ~cmp:(fun[\@bs] - (x:int) y -> Pervasives.comapre x y));; + (x:int) y -> Pervasives.compare x y));; let s0 = ofArray ~id:(module IntCmp) [|5;2;3;5;6|]];; toArray s0 = [|2;3;5;6|];; ]}*) diff --git a/jscomp/test/defunctor_make_test.js b/jscomp/test/defunctor_make_test.js index 7f41087d2e..0cd83df579 100644 --- a/jscomp/test/defunctor_make_test.js +++ b/jscomp/test/defunctor_make_test.js @@ -3,7 +3,7 @@ var Caml_primitive = require("../../lib/js/caml_primitive.js"); var Caml_builtin_exceptions = require("../../lib/js/caml_builtin_exceptions.js"); -function getComapre(x) { +function getcompare(x) { return x; } @@ -13,7 +13,7 @@ function Make(M) { } var Comparable = /* module */[ - /* getComapre */getComapre, + /* getcompare */getcompare, /* Make */Make ]; diff --git a/jscomp/test/defunctor_make_test.ml b/jscomp/test/defunctor_make_test.ml index 94ce06f2d2..e618ab1eaa 100644 --- a/jscomp/test/defunctor_make_test.ml +++ b/jscomp/test/defunctor_make_test.ml @@ -2,7 +2,7 @@ module Comparable : sig type 'a comparator - val getComapre : 'a comparator -> ('a -> 'a -> int [@bs]) + val getcompare : 'a comparator -> ('a -> 'a -> int [@bs]) module type C = sig type id type key @@ -16,7 +16,7 @@ module Comparable : sig C with type key = M. key end = struct type 'a comparator = ('a -> 'a -> int [@bs]) - let getComapre : 'a comparator -> ('a -> 'a -> int [@bs]) = fun x -> x + let getcompare : 'a comparator -> ('a -> 'a -> int [@bs]) = fun x -> x module type C = sig type id type key @@ -100,7 +100,7 @@ type ('k,'v, 'id) t1 = let add (type k) (type v) (type id) x data (v : (k,v, id) t1) = let module X = (val v.compare) in {compare = v.compare ; - data = add x data (Comparable.getComapre X.compare ) v.data;} + data = add x data (Comparable.getcompare X.compare ) v.data;} let empty (v : _ Comparable.compare) = {compare = v; data = Empty }