Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006587OCamltypingpublic2014-09-29 09:102017-03-16 01:22
Reporterjcf 
Assigned Togarrigue 
PrioritynormalSeverityfeatureReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version4.02.0+beta1 / +rc1 
Target VersionundecidedFixed in Version4.06.0+dev 
Summary0006587: #show_module prints types incorrectly
DescriptionWith the code below, the OCaml toplevel prints

  module M : sig type in_channel val f : in_channel -> in_channel end

that is, it prints the two types M.in_channel and Pervasives.in_channel the same way. (I found this while playing with camlzip, which has a module containing a type called in_channel.)
Steps To Reproducemodule M = struct
    type in_channel
    let f (c: Pervasives.in_channel) : in_channel = assert false
  end;;

#show_module M;;
TagsNo tags attached.
Attached Files

- Relationships
child of 0004791acknowledged ocamlc -i produces incorrect result 

-  Notes
(0012253)
garrigue (manager)
2014-09-29 15:58

The problem is specific to Pervasives: omitting the prefix is hard-wired in Printtyp.
Note that this is not specific to #show_module: this is just the behavior of the standard printer.
(0017678)
octachron (developer)
2017-03-15 20:03

I have proposed a patch in https://github.com/ocaml/ocaml/pull/1109 [^] to only perform this Pervasives prefix elision when it is unambiguous in the current printing environment.
(0017683)
garrigue (manager)
2017-03-16 01:22

Merge GPR#1109 after light edit, in commit 929b99b.
Thanks for the code.

- Issue History
Date Modified Username Field Change
2014-09-29 09:10 jcf New Issue
2014-09-29 15:58 garrigue Note Added: 0012253
2014-09-29 15:58 garrigue Assigned To => garrigue
2014-09-29 15:58 garrigue Status new => confirmed
2014-10-04 10:05 doligez Target Version => 4.02.2+dev / +rc1
2015-02-24 22:29 doligez Target Version 4.02.2+dev / +rc1 => 4.02.3+dev
2015-07-10 18:05 doligez Target Version 4.02.3+dev => 4.03.0+dev / +beta1
2016-04-12 14:54 doligez Target Version 4.03.0+dev / +beta1 => 4.03.1+dev
2016-12-07 18:55 shinwell Category OCaml general => OCaml typing
2017-02-16 14:00 doligez Target Version 4.03.1+dev => undecided
2017-02-23 16:45 doligez Category OCaml typing => typing
2017-03-14 11:27 garrigue Relationship added child of 0004791
2017-03-14 11:27 garrigue Severity minor => feature
2017-03-15 20:03 octachron Note Added: 0017678
2017-03-16 01:22 garrigue Note Added: 0017683
2017-03-16 01:22 garrigue Status confirmed => resolved
2017-03-16 01:22 garrigue Fixed in Version => 4.06.0+dev
2017-03-16 01:22 garrigue Resolution open => fixed


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker