[mercury-users] design of stream library
Michael Day
mcda at students.cs.mu.oz.au
Tue Sep 5 19:22:06 AEDT 2000
> but the exception may come not be thrown inside a stream predicate.
> For example
>
> ( { List = [X | _] } ->
> write_char(X)
> ;
> throw("empty list")
> )
Ah now I remember. This is the same problem you experience when throwing
exceptions and using io.states, presumably why there exists a try_io as
well as just plain try. As streams are little bundles of io.state, it
would seem that a generalisation of the try_io mechanism would be
necessary for them to interact gracefully with exceptions.
Michael
--------------------------------------------------------------------------
mercury-users mailing list
post: mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the users
mailing list