diff --git a/test/passing/tests/source-conventional.ml.err b/test/passing/tests/source-conventional.ml.err index 4dc692a474..0b8847ab9c 100644 --- a/test/passing/tests/source-conventional.ml.err +++ b/test/passing/tests/source-conventional.ml.err @@ -1,6 +1,6 @@ Warning: tests/source.ml:927 exceeds the margin Warning: tests/source.ml:1002 exceeds the margin Warning: tests/source.ml:1225 exceeds the margin -Warning: tests/source.ml:1342 exceeds the margin -Warning: tests/source.ml:6617 exceeds the margin -Warning: tests/source.ml:7075 exceeds the margin +Warning: tests/source.ml:1340 exceeds the margin +Warning: tests/source.ml:6615 exceeds the margin +Warning: tests/source.ml:7073 exceeds the margin diff --git a/test/passing/tests/source-conventional.ml.ref b/test/passing/tests/source-conventional.ml.ref index e0885dd89d..5c6bfdbcf9 100644 --- a/test/passing/tests/source-conventional.ml.ref +++ b/test/passing/tests/source-conventional.ml.ref @@ -1226,12 +1226,10 @@ let ty_list : type a e. (a, e) ty -> (a vlist, e) ty = | `Nil -> ("Nil", None) | `Cons p -> ("Cons", Some (Tdyn (tcons, p)))); sum_cases = [ ("Nil", TCnoarg Thd); ("Cons", TCarg (Ttl Thd, tcons)) ]; sum_inj = - (fun (type c) : - ((noarg -> a * a vlist -> unit, c) ty_sel * c -> a vlist) -> - function - | Thd, Noarg -> `Nil - | Ttl Thd, v -> `Cons v) - (* One can also write the type annotation directly *); + (fun (type c) -> + (function Thd, Noarg -> `Nil | Ttl Thd, v -> `Cons v + : (noarg -> a * a vlist -> unit, c) ty_sel * c -> a vlist)) + (* One can also write the type annotation directly *); }) let v = variantize Enil (ty_list Int) (`Cons (1, `Cons (2, `Nil))) @@ -2714,7 +2712,7 @@ let magic : 'a 'b. 'a -> 'b = type (_, +_) eq = Refl : ('a, 'a) eq let magic : 'a 'b. 'a -> 'b = - fun (type a b) (x : a) -> + fun (type a) (type b) (x : a) -> let bad_proof (type a) = (Refl : (< m : a >, < m : a >) eq :> (< m : a >, < >) eq) in @@ -3845,12 +3843,12 @@ let int_of_sexp _ = 42 let t_of_sexp : 'a. (sexp -> 'a) -> sexp -> 'a t = let _tp_loc = "core_array.ml.t" in - fun _of_a t -> (array_of_sexp _of_a) t + fun _of_a -> fun t -> (array_of_sexp _of_a) t let _ = t_of_sexp let sexp_of_t : 'a. ('a -> sexp) -> 'a t -> sexp = - fun _of_a v -> (sexp_of_array _of_a) v + fun _of_a -> fun v -> (sexp_of_array _of_a) v let _ = sexp_of_t @@ -3898,13 +3896,13 @@ end = struct let t_of_sexp : 'a 'perms. (sexp -> 'a) -> (sexp -> 'perms) -> sexp -> ('a, 'perms) t = let _tp_loc = "core_array.ml.Permissioned.t" in - fun _of_a _of_perms t -> (array_of_sexp _of_a) t + fun _of_a -> fun _of_perms -> fun t -> (array_of_sexp _of_a) t let _ = t_of_sexp let sexp_of_t : 'a 'perms. ('a -> sexp) -> ('perms -> sexp) -> ('a, 'perms) t -> sexp = - fun _of_a _of_perms v -> (sexp_of_array _of_a) v + fun _of_a -> fun _of_perms -> fun v -> (sexp_of_array _of_a) v let _ = sexp_of_t @@ -3917,12 +3915,12 @@ end = struct let t_of_sexp : 'perms. (sexp -> 'perms) -> sexp -> 'perms t = let _tp_loc = "core_array.ml.Permissioned.Int.t" in - fun _of_perms t -> t__of_sexp t + fun _of_perms -> fun t -> t__of_sexp t let _ = t_of_sexp let sexp_of_t : 'perms. ('perms -> sexp) -> 'perms t -> sexp = - fun _of_perms v -> sexp_of_t_ v + fun _of_perms -> fun v -> sexp_of_t_ v let _ = sexp_of_t end @@ -6184,7 +6182,7 @@ end = M1 ;; -fun (x : M1.t) : M2.t -> x +fun (x : M1.t) -> (x : M2.t) (* fails *) @@ -8551,8 +8549,8 @@ class ['a] c () = let f : type a'. a' = assert false let foo : type a' b'. a' -> b' = fun a -> assert false -let foo : type t'. t' = fun (type t') : t' -> assert false -let foo : 't. 't = fun (type t) : t -> assert false +let foo : type t'. t' = fun (type t') -> (assert false : t') +let foo : 't. 't = fun (type t) -> (assert false : t) let foo : type a' b' c' t. a' -> b' -> c' -> t = fun a b c -> assert false let f x = @@ -8654,7 +8652,7 @@ let formula_base x = #&& (x #<= (Expr.int 4)) #&& ((Expr.int 0) #< x) -let _ = call ~f:(fun pair : (a * b) -> pair);; +let _ = call ~f:(fun pair -> (pair : a * b));; f (fun _ -> function @@ -8681,7 +8679,7 @@ let xxxxxx = in { zzzzzzzzzzzzz } -let _ = fun (x : int as 'a) : (int as 'a) -> x +let _ = fun (x : int as 'a) -> (x : int as 'a) let eradicate_meta_class_is_nullsafe = register ~id:"ERADICATE_META_CLASS_IS_NULLSAFE"