Skip to content

Commit

Permalink
Update source-conventional.ml.ref
Browse files Browse the repository at this point in the history
  • Loading branch information
Julow committed Sep 5, 2024
1 parent 914bda1 commit ee55c7c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 21 deletions.
6 changes: 3 additions & 3 deletions test/passing/tests/source-conventional.ml.err
Original file line number Diff line number Diff line change
@@ -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
34 changes: 16 additions & 18 deletions test/passing/tests/source-conventional.ml.ref
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand All @@ -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
Expand Down Expand Up @@ -6184,7 +6182,7 @@ end =
M1
;;

fun (x : M1.t) : M2.t -> x
fun (x : M1.t) -> (x : M2.t)

(* fails *)

Expand Down Expand Up @@ -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 =
Expand Down Expand Up @@ -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
Expand All @@ -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"
Expand Down

0 comments on commit ee55c7c

Please sign in to comment.