[m-users.] Unintelligible compiler message

Volker Wysk post at volker-wysk.de
Tue Mar 12 07:26:42 AEDT 2019


Am Montag, 11. März 2019, 16:05:58 CET schrieb Zoltan Somogyi:
> 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.

This makes it clear. Thanks!

Volker




More information about the users mailing list