[m-users.] Unintelligible compiler message
Zoltan Somogyi
zoltan.somogyi at runbox.com
Tue Mar 12 02:05:58 AEDT 2019
On Mon, 11 Mar 2019 15:58:28 +0100, Volker Wysk <post at volker-wysk.de> wrote:
> OK. So the three arguments of list.map have the insts free, unique and free.
> And there is no mode of list.map for these insts, hence the error. But why is
> the first one free? I passed string.to_char_list as the first argument.
> Shouldn't it be ground?
The problem is that string.to_char_list has more than one mode,
and the compiler does not know which one you want. The second
error message told you this. This problem is why it cannot figure out
exactly what the first argument of list.map should be.
The solution is to pass an explicitly moded lambda expression
as the first argument of list.map.
Zoltan.
More information about the users
mailing list