Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005444OCaml~DO NOT USE (was: OCaml general)public2011-12-23 16:442012-09-25 20:07
Assigned Togarrigue 
PlatformallOSallOS Versionall
Product Version 
Target VersionFixed in Version 
Summary0005444: A parent "feature request" for a serie of FR about printing type variables
DescriptionThis feature request is used as a parent for a serie of feature requests (or maybe just comments) about the printing of type variable.

In the trunk, when you type
let f (x:'foo) = x
the inferred type is now 'foo -> 'foo

But this still suffers a certain number of limitations that are reported in subsequent request

(Disclaimer: I talked a bit about that over email with Jacques Garrigue, and I know that some of this "features" are not worth the time. I still report them here for futur references)
TagsNo tags attached.
Attached Files

- Relationships
parent of 0005445closedgarrigue The top level drops all the "fancy" type variables 
parent of 0005446closedgarrigue The type variables given in a type definition are not used for inference 
parent of 0005447closedgarrigue Named type variable in a function are not used for the type inferrence of other function 
parent of 0005448closedgarrigue Fancy named type variables are not used in typing error 
parent of 0005449closedgarrigue In GADT's, _ type variables are replaced with 'a, 'b, etc 
parent of 0005450closedgarrigue The name of types introduced by (type foo) are not used for the inferred type variables 

-  Notes
garrigue (manager)
2011-12-24 04:20

Thank you for making it look like I'm doing lots of work :-)
But maybe you didn't need to split to such detail.
Basically all the behaviors you describe come from the fact variable names are not inherited upon instantiation.
In some cases (single identifier at toplevel and (type u) notation) I agree there is a problem, but in other cases I'm basically not convinced that inheriting names would not be that helpful (and would have to be done with care).

To be precise, the main goal of named type variables was to make error reports clearer: if you have written a variable name, either in an expression or a type definition, it should be used when reporting errors inside that expression or type definition. If you find a case where it is not used, then this is a bug.
garrigue (manager)
2011-12-28 03:25

All children are resolved.
Do not close for future reference.

- Issue History
Date Modified Username Field Change
2011-12-23 16:44 pilki New Issue
2011-12-23 17:03 protz Relationship added parent of 0005445
2011-12-23 17:04 protz Relationship added parent of 0005446
2011-12-23 17:16 protz Relationship added parent of 0005447
2011-12-23 17:16 protz Relationship added parent of 0005448
2011-12-23 17:16 protz Relationship added parent of 0005449
2011-12-23 17:26 protz Relationship added parent of 0005450
2011-12-24 02:31 garrigue Assigned To => garrigue
2011-12-24 02:31 garrigue Status new => assigned
2011-12-24 04:20 garrigue Note Added: 0006532
2011-12-24 04:20 garrigue Status assigned => acknowledged
2011-12-28 03:25 garrigue Note Added: 0006544
2011-12-28 03:25 garrigue Status acknowledged => resolved
2011-12-28 03:25 garrigue Resolution open => fixed
2012-09-25 20:07 xleroy Status resolved => closed
2017-02-23 16:36 doligez Category OCaml general => -OCaml general
2017-03-03 17:55 doligez Category -OCaml general => -(deprecated) general
2017-03-03 18:01 doligez Category -(deprecated) general => ~deprecated (was: OCaml general)
2017-03-06 17:04 doligez Category ~deprecated (was: OCaml general) => ~DO NOT USE (was: OCaml general)

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker