[m-users.] Adding impurity to Mercury code: Backtracking in IO states

Tomas By tomas at basun.net
Mon Jun 29 09:52:57 AEST 2015


On Mon, June 29, 2015 01:43, Paul Bone wrote:
> On Sun, Jun 28, 2015 at 01:32:12PM +0200, Tomas By wrote:
>> On Sun, June 28, 2015 07:34, Left Right wrote:
>> > In particular,
>> > io.write_string needs its third argument to be instantiated as
>> > "unique" (this is a Mercury's way of saying it has to be obtained from
>> > doing some other I/O).
>>
>> I think it is just an historical accident that Mercury only uses unique
>> modes for I/O.
>
> No it's deliberate.


Hmm, yes, but I guess there once was an ambition to use unique modes for
various other data structures also?

(stress on "only" in my comment)

/Tomas





More information about the users mailing list