2019-08-26 09:17 AEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000320mercuryBugpublic2014-02-21 17:09
Reporterpbone 
Assigned Tojuliensf 
PrioritynormalSeverityminorReproducibilityalways
StatusfeedbackResolutionopen 
Product Version 
Target VersionFixed in Version 
Summary0000320: instantiation states and "unused module import" warnings do not interact properly.
DescriptionA Mercury module containing a module import for some other Mercury module and an instantiation state deceleration for a type in that module but nothing else to do with that module generated an unused module import warning.
Steps To ReproduceCompile the attached module with "mmc -c", it should be warnings-clean but isn't. mmc outputs:

paul@oxygen> mmc -c unused_import_inst_bug.m
unused_import_inst_bug.m:001: In module `unused_import_inst_bug':
unused_import_inst_bug.m:001: warning: module `maybe' is imported in the
unused_import_inst_bug.m:001: interface, but is not used in the interface.
TagsNo tags attached.
Attached Files

-Relationships
+Relationships

-Notes

~0000650

juliensf (administrator)

The underlying problem here is most likely that insts don't have type information associated with them,
so the unused module checker cannot see that the inst maybe_yes refers to the functor yes/1.
(This is a much more general problem, see 0000089 for example -- it's also a language design issue, since
in order to resolve properly we would need to add some mechanism to add type information to insts.)
+Notes

-Issue History
Date Modified Username Field Change
2014-02-19 16:12 pbone New Issue
2014-02-19 16:12 pbone File Added: unused_import_inst_bug.m
2014-02-21 17:08 juliensf Note Added: 0000650
2014-02-21 17:09 juliensf Assigned To => juliensf
2014-02-21 17:09 juliensf Status new => feedback
+Issue History