Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006225OCamlOCaml documentationpublic2013-11-05 00:002014-07-16 17:20
ReporterDYNO_doxa 
Assigned To 
PrioritylowSeverityminorReproducibilityN/A
StatusacknowledgedResolutionopen 
Platformi386OSXPOS VersionSP3
Product Version4.01.0 
Target Version4.02.1+devFixed in Version 
Summary0006225: weak variables '_a should be documented in the manual
DescriptionDefining

  let new_array = Array.make 7

returns a surprising type

  '_a -> '_a array

that is not documented in the manual.
Steps To Reproducecompile and see:

module Days = struct
    let newArrayOf = Array.make 7
end
Tagsjunior_job
Attached Files

- Relationships

-  Notes
(0010586)
yallop (developer)
2013-11-05 00:58

The function receives a weakly polymoprhic type, which is the expected behaviour:

   module Days : sig val newArrayOf : '_a -> '_a array end

See the FAQ entries:

   The type of this expression contains type variables that cannot be generalized
   http://caml.inria.fr/resources/doc/faq/core.en.html#weak-type-variables [^]

   A function obtained through partial application is not polymorphic enough
   http://caml.inria.fr/resources/doc/faq/core.en.html#eta-expansion [^]
(0010587)
DYNO_doxa (reporter)
2013-11-05 01:13

no mention of "weakly polymoprhic [!] type" in the manual, though
(0010588)
gasche (developer)
2013-11-05 10:05

This is a documentation issue (I thought there were documented outside the fact, but couldn't find the reference again). I updated the PR to reflect that this is not a bug.

- Issue History
Date Modified Username Field Change
2013-11-05 00:00 DYNO_doxa New Issue
2013-11-05 00:58 yallop Note Added: 0010586
2013-11-05 01:13 DYNO_doxa Note Added: 0010587
2013-11-05 10:05 gasche Priority normal => low
2013-11-05 10:05 gasche Severity minor => trivial
2013-11-05 10:05 gasche Reproducibility always => N/A
2013-11-05 10:05 gasche Status new => acknowledged
2013-11-05 10:05 gasche Category OCaml standard library => OCaml documentation
2013-11-05 10:05 gasche Summary wrong signature for Array.make => weak variables '_a should be documented in the manual
2013-11-05 10:05 gasche Description Updated View Revisions
2013-11-05 10:05 gasche Note Added: 0010588
2014-02-19 16:40 doligez Severity trivial => minor
2014-06-19 17:56 gasche Tag Attached: junior_job
2014-07-16 17:20 doligez Target Version => 4.02.0+dev
2014-07-16 17:20 doligez Target Version 4.02.0+dev => 4.02.1+dev


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker