| Anonymous | Login | Signup for a new account | 2013-05-25 23:31 CEST | ![]() |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | |||
| 0004488 | OCaml | OCaml documentation | public | 2008-01-23 11:45 | 2012-02-07 15:44 | |||
| Reporter | barnier | |||||||
| Assigned To | ||||||||
| Priority | normal | Severity | minor | Reproducibility | always | |||
| Status | closed | Resolution | fixed | |||||
| Platform | OS | OS Version | ||||||
| Product Version | 3.10.0 | |||||||
| Target Version | Fixed in Version | 3.13.0+dev | ||||||
| Summary | 0004488: Semantic of "include" constructs differs from the documentation specification | |||||||
| Description | In the documentation, it is specified that including: module S = struct type t = int let x = 2 end in another module: struct include S let y = (x + 1 : t) end is equivalent to write: struct type t = int let x = 2 let y = (x + 1 : t) end However it is clearly not the case whenever side-effects are involved as in the following example: barnier@beige:~$ ocaml Objective Caml version 3.10.0 # module M = struct let v = ref 1 end;; module M : sig val v : int ref end # module T = struct include M end;; module T : sig val v : int ref end # M.v := 2;; - : unit = () # T.v;; - : int ref = {contents = 2} I don't know if the bug is in the doc or in the compiler, but if it is the documentation, I would say that include constructs are equivalent to write something like : module T = struct let v = M.v end which is quite different IMHO. Regards -- Nicolas Barnier | |||||||
| Tags | No tags attached. | |||||||
| Attached Files | ||||||||
Notes |
|
|
(0006896) doligez (manager) 2012-02-07 15:44 |
This is clearly done on purpose. The inclusion is semantic rather than textual. Fixed the documentation in trunk [3.13.0] (commit 12139) |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2008-01-23 11:45 | barnier | New Issue | |
| 2008-02-19 15:18 | doligez | Status | new => acknowledged |
| 2012-02-07 15:44 | doligez | Note Added: 0006896 | |
| 2012-02-07 15:44 | doligez | Status | acknowledged => closed |
| 2012-02-07 15:44 | doligez | Resolution | open => fixed |
| 2012-02-07 15:44 | doligez | Category | OCaml general => OCaml documentation |
| 2012-02-07 15:44 | doligez | Fixed in Version | => 3.13.0+dev |
| Copyright © 2000 - 2011 MantisBT Group |