You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I see the point.
Having new variables appear in type definitions may be confusing.
However "_" is not a real variable name, so this requires some thinking.
Maybe we could have just a special behavior only for type definitions,
as one cannot add a constraint to an unnamed type parameter inside the
definition.
Original bug ID: 5449
Reporter: pilki
Assigned to: @garrigue
Status: closed (set by @garrigue on 2011-12-28T02:24:01Z)
Resolution: fixed
Severity: feature
Fixed in version: 3.13.0+dev
Category: ~DO NOT USE (was: OCaml general)
Child of: #5444
Monitored by: @protz
Bug description
When you define the gadt:
<<<
type 'int eq_int = EqInt : int eq_int
ocamlc -i produces the correct interface
<<<
type 'int eq_int = EqInt : int eq_int
But if you define
<<<
type (_, _) eq = Eq: ('a, 'a) eq
you obtain
<<<
type ('a, 'b) eq = Eq : ('a, 'a) eq
where the _s have been replaced by type variables. The _ should be kept
The text was updated successfully, but these errors were encountered: