Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007124OCamltypingpublic2016-01-12 13:152017-02-20 11:38
Reporterdrup 
Assigned Tofrisch 
PrioritynormalSeverityfeatureReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version4.04.0 
Summary0007124: Unused modules are not reported
DescriptionThere is a bunch of warning to report unused top level declarations, but they don't work on whole modules, for example:

foo.ml:
   module F = Format
   let y = 3

foo.mli
   val y : int

compiled with -w +a, no warning is reported. If the first line is replaced with "open Format" or "module F = struct let x = 2 end", then warnings are reported.

This is the case in 4.02.3 and trunk. I'm not sure if it's a bug or a missing feature.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0015250)
frisch (developer)
2016-01-12 23:01

It's a missing feature, not a bug.
(0015251)
frisch (developer)
2016-01-12 23:55

Very quick implementation of this:

https://github.com/alainfrisch/ocaml/tree/unused_module_warning [^]

Needs some testing and cleanup, and perhaps improved support for recursive modules.
(0015252)
frisch (developer)
2016-01-13 00:05

This commit suggests that the warning can be useful:

https://github.com/alainfrisch/ocaml/commit/83867887ceaba0250f848ee4110c1e781fa35e4d [^]
(0017377)
frisch (developer)
2017-02-20 11:38

Fixed by GPR#684 in 4.04.

- Issue History
Date Modified Username Field Change
2016-01-12 13:15 drup New Issue
2016-01-12 23:01 frisch Note Added: 0015250
2016-01-12 23:55 frisch Note Added: 0015251
2016-01-13 00:05 frisch Note Added: 0015252
2016-01-13 00:07 frisch Assigned To => frisch
2016-01-13 00:07 frisch Status new => assigned
2017-02-20 11:38 frisch Note Added: 0017377
2017-02-20 11:38 frisch Status assigned => resolved
2017-02-20 11:38 frisch Fixed in Version => 4.04.0
2017-02-20 11:38 frisch Resolution open => fixed
2017-02-23 16:45 doligez Category OCaml typing => typing


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker