Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005607OCamldocumentationpublic2012-05-06 12:572017-03-15 12:32
Reportergasche 
Assigned Tooctachron 
PrioritynormalSeverityfeatureReproducibilityN/A
StatusassignedResolutionopen 
PlatformOSOS Version
Product Version 
Target Version4.06.0+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
  https://sympa-roc.inria.fr/wws/arc/caml-list/2012-05/msg00032.html [^]

- on reddit:
  http://www.reddit.com/r/ocaml/comments/t8g2e/pdf_relaxing_the_value_restriction_by_jacques/c4kf68s [^]

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
related to 0006225acknowledged weak variables '_a should be documented in the manual 

-  Notes
(0014227)
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.
(0014228)
gasche (developer)
2015-07-21 16:46

I agree, and would be delighted to give feedback to and eventually merge a pull request:

  https://github.com/ocaml/ocaml-manual [^]
(0015744)
doligez (administrator)
2016-04-14 16:44

The manual is now in the manual/ subdirectory of http://github.com/ocaml/ocaml [^]
(0017452)
octachron (developer)
2017-02-24 16:06

The new manual chapter proposed in https://github.com/ocaml/ocaml/pull/594 [^] explicits this reliationship.

- 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
2017-02-16 14:01 doligez Target Version 4.03.1+dev => undecided
2017-02-17 17:24 doligez Target Version undecided => 4.06.0+dev
2017-02-23 16:35 doligez Category OCaml documentation => Documentation
2017-02-23 16:44 doligez Category Documentation => documentation
2017-02-24 16:06 octachron Note Added: 0017452
2017-02-24 16:06 octachron Assigned To gasche => octachron
2017-02-24 16:06 octachron Status acknowledged => assigned
2017-03-07 13:48 shinwell Severity text => feature
2017-03-15 12:32 octachron Relationship added related to 0006225


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker