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
Names are forgotten when instantiating, and here the type of f is instantiated before being generalized again.
The simplest fix would be to provide a special case in type_expression for just typing one identifier (no need to instantiate).
Original bug ID: 5445
Reporter: pilki
Assigned to: @garrigue
Status: closed (set by @garrigue on 2011-12-27T07:03:06Z)
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 "nice" type variables are given for a function, and the function name is then typed in the top level, the type is changed:
<<<
let f (x:'foo) = x;;
val f : 'foo -> 'foo =
f;;
I often use the top level to give me the type of functions, and if one day "Hashtbl.add" is given a "fancy" type, it would be nice to see it that way.
#show_type might be a solution, but it's longer to type!
The text was updated successfully, but these errors were encountered: