[m-users.] How to avoid warning about highly ambiguous overloading
Mark Brown
mark at mercurylang.org
Tue Jul 19 19:36:18 AEST 2016
Hi Dirk,
On Tue, Jul 19, 2016 at 6:39 PM, Dirk Ziegemeyer <dirk at ziegemeyer.de> wrote:
> Hi,
>
> I create several emtpy maps with the function map.init/0 and mercury warns me about highly ambiguous overloading.
Note that this can occur as a consequence of other errors, so it can
help to fix any other errors first before tackling the ambiguous
overloading.
>
> Can I use explicit type qualification to tell Mercury that I mean the function map.init/0 instead of the predicate map.init/1?
Yes. If you want map.init to mean the function which returns, say,
map(a, b), then write
map.init : map(a, b)
Mark
More information about the users
mailing list