[m-dev.] Adding Loops to Mercury
Mark Brown
mark at mercurylang.org
Sun Jan 5 10:52:02 AEDT 2014
Hi,
On Fri, Jan 3, 2014 at 10:49 AM, Peter Schachte <pschachte at gmail.com> wrote:
> As for the semantics, a generalisation of Mercury's 'all' construct that can
> generate output would fit well with Mercury. Here's a paper I wrote a
> decade ago doing this for Prolog. At the time, Fergus Henderson told me
> there was some shortcoming in Mercury's type or mode system that would make
> this difficult to do for Mercury, but I don't remember the specifics.
Mercury's modes can't describe the aliasing in sequence_next/3 that is
used to thread the accumulator values through the loop.
Incidentally, how would you describe the mode of sequence_next/3 in this case?
Cheers,
Mark.
More information about the developers
mailing list