Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005607OCamlOCaml documentationpublic2012-05-06 12:572016-12-09 08:40
Assigned Togasche 
PlatformOSOS Version
Product Version 
Target Version4.03.1+devFixed in Version 
Summary0005607: FAQ suggestion: explain the interaction between (relaxed) value restriction and variance annotations
DescriptionUsers, even familiar with the language, mostly do not not about variance annotations, and in particular their interaction with the relaxed value restriction. The problem they observe is that expressions at an abstract type representing a polymorphic data structure do not get generalized as expected.

I think that would be a good addition in the FAQ, in the spirit of "A function obtained through partial application is not polymorphic enough".
Additional InformationThis problem has been discussed twice recently:
- on the caml-list [^]

- on reddit: [^]

My reddit message might be a good basis for a FAQ answer; I hope to receive additional feedback on which wording would be best.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
octachron (developer)
2015-07-21 16:31

On this matter, I think that the relaxed value restriction and weakly polymorphic type should absolutely be described in the reference manual. It makes very little sense that the manual currently does not even mention the value restriction.
gasche (developer)
2015-07-21 16:46

I agree, and would be delighted to give feedback to and eventually merge a pull request: [^]
doligez (administrator)
2016-04-14 16:44

The manual is now in the manual/ subdirectory of [^]

- Issue History
Date Modified Username Field Change
2012-05-06 12:57 gasche New Issue
2012-05-06 12:57 gasche Assigned To => gasche
2012-05-06 12:57 gasche Status new => acknowledged
2012-09-06 16:44 doligez Target Version => 4.00.1+dev
2012-09-21 14:15 doligez Target Version 4.00.1+dev => 4.01.0+dev
2013-08-19 14:43 doligez Target Version 4.01.0+dev => 4.01.1+dev
2014-05-25 20:20 doligez Target Version 4.01.1+dev => 4.02.0+dev
2014-07-16 20:20 doligez Target Version 4.02.0+dev => 4.02.1+dev
2014-09-04 00:25 doligez Target Version 4.02.1+dev => undecided
2015-01-09 22:57 doligez Target Version undecided => 4.02.3+dev
2015-07-21 14:25 doligez Target Version 4.02.3+dev => 4.03.0+dev / +beta1
2015-07-21 16:31 octachron Note Added: 0014227
2015-07-21 16:46 gasche Note Added: 0014228
2016-04-14 16:44 doligez Note Added: 0015744
2016-04-14 16:44 doligez Target Version 4.03.0+dev / +beta1 => 4.03.1+dev
2016-12-09 08:40 shinwell Category Caml web site => OCaml documentation

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker