(* TEST * expect *) let f (type t) (x : t) = x [%%expect {| val f : 't -> 't = |}] let g (type t') (x : t') = x let g' (x : ' t') = x [%%expect {| val g : ' t' -> ' t' = val g' : ' t' -> ' t' = |}] let h (type a'bc) (x : a'bc) = x let h' (x : ' a'bc) = x [%%expect {| val h : ' a'bc -> ' a'bc = val h' : ' a'bc -> ' a'bc = |}] let i (type fst snd) (x : fst) (y : snd) = (x, y) [%%expect {| val i : 'fst -> 'snd -> 'fst * 'snd = |}] let j (type fst snd fst' snd') (x : fst) (y : snd) (a : fst') (b : snd') = ((x, y), (a, b)) [%%expect {| val j : 'fst -> 'snd -> 'fst' -> 'snd' -> ('fst * 'snd) * ('fst' * 'snd') = |}] (* Variable names starting with _ are reserved for the compiler. *) let k (type _weak1) (x : _weak1) = x [%%expect {| val k : 'a -> 'a = |}] let l (type _') (x : _') = x [%%expect {| val l : 'a -> 'a = |}]