[m-users.] Adding impurity to Mercury code: Backtracking in IO states
Julien Fischer
jfischer at opturion.com
Mon Jun 29 11:13:47 AEST 2015
Hi,
On Mon, 29 Jun 2015, Paul Bone wrote:
> On Mon, Jun 29, 2015 at 01:52:57AM +0200, Tomas By wrote:
>> 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)
>
> Ah yes, on that count you are correct, and I sew what you meant earlier.
Uniqueness is also used for the store/1 type.
Cheers,
Julien.
More information about the users
mailing list