[m-dev.] for review: retry across I/O
Fergus Henderson
fjh at cs.mu.OZ.AU
Tue Dec 5 23:37:38 AEDT 2000
On 07-Nov-2000, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> It's also possible to write predicates that have two io__state
> arguments but both have mode `out'. E.g.
>
> main(IO0, _IO) -->
> nasty_fail(IO0, IO0).
>
> :- mode nasty_fail(in, in) is erroneous.
> nasty_fail(_, _) :- throw("ouch").
...
> It should not be an error to write code which declares an io__state argument
> to have mode `any'. For example, the following should be legal:
>
> main(IO0, _IO) -->
> another_nasty_fail(IO0, IO0).
>
> :- mode another_nasty_fail(in(any), in(any)) is erroneous.
> another_nasty_fail(_, _) :- throw("ouch").
What does your code do with these two test cases now?
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
| of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list