Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005445OCamlOCaml generalpublic2011-12-23 16:492011-12-27 08:03
Assigned Togarrigue 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version3.13.0+dev 
Summary0005445: The top level drops all the "fancy" type variables
DescriptionWhen "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 = <fun>
# f;;
- : 'a -> 'a = <fun>

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!
TagsNo tags attached.
Attached Files

- Relationships
child of 0005444closedgarrigue A parent "feature request" for a serie of FR about printing type variables 

-  Notes
garrigue (manager)
2011-12-24 02:17

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).
garrigue (manager)
2011-12-27 08:03

Fixed in typecore, revision 11956

- Issue History
Date Modified Username Field Change
2011-12-23 16:49 pilki New Issue
2011-12-23 17:03 protz Relationship added child of 0005444
2011-12-24 02:15 garrigue Assigned To => garrigue
2011-12-24 02:15 garrigue Status new => assigned
2011-12-24 02:17 garrigue Note Added: 0006526
2011-12-24 02:17 garrigue Status assigned => acknowledged
2011-12-27 08:03 garrigue Note Added: 0006540
2011-12-27 08:03 garrigue Status acknowledged => closed
2011-12-27 08:03 garrigue Resolution open => fixed
2011-12-27 08:03 garrigue Fixed in Version => 3.13.0+dev

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker