Mercury Bugs - mercury
View Issue Details
0000167mercuryBugpublic2010-11-04 17:402010-11-04 17:40
Reportermgiuca 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusnewResolutionopen 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000167: bimap.init could be uo
DescriptionThe mode of bimap.init is:
:- func bimap.init = bimap(K, V).
:- pred bimap.init(bimap(K, V)::out) is det.

Note that the mode of map.init is:
:- pred map.init(map(_, _)::uo) is det.
:- func map.init = (map(K, V)::uo) is det.

For consistency, bimap.init's mode could be upgraded to uo, which shouldn't cause any problems:
:- func bimap.init = (bimap(K, V)::uo) is det.
:- pred bimap.init(bimap(K, V)::uo) is det.

(I've tried it and it compiles fine, as does code which depends on it.)

This would be useful for programs trying to use uniqueness where possible.
TagsNo tags attached.
Attached Files

There are no notes attached to this issue.

Issue History
2010-11-04 17:40mgiucaNew Issue