[m-dev.] Adding Loops to Mercury

Julien Fischer jfischer at opturion.com
Fri Jan 10 16:21:44 AEDT 2014


Hi Peter,

On Thu, 9 Jan 2014, Peter Schachte wrote:

> On 08/01/14 23:58, Mark Brown wrote:
>
>> Currently in Mercury I can define an instance for foldable(map(K, V),
>> pair(K, V)), but not foldable(list(T), T) or foldable(set(T), T).
>
> That's weird.  I can't see why the former would be workable if the
> latter two are not.

Because the latter two instances are not currently valid Mercury.
Mercury currently requires that arguments in instance heads "must be
either a type with no arguments, or a polymorphic type whose arguments
are all type variables".

Cheers,
Julien.



More information about the developers mailing list