[m-dev.] io streams

Michael Day mcda at cat.cs.mu.OZ.AU
Thu Dec 23 11:46:04 AEDT 1999


> What would the result be if performing blocking IO (I remember you
> mentioning this as a consideration) and not all of what was desired to be
> output (for example) was successfully output?

One of the predicates for performing output returns a list of the things
that were not written, so that no error is necessary for non-blocking
operation. Possibly there needs to be more information available regarding
the underlying buffering of the stream, or possibly even a separate
interface for non-blocking streams?

> I'm curious - if these methods are module qualified like this, does this
> mean that I cannot make my own type in a different module, and then make
> it an instance?

No. I module qualify everything purely because all the other library
modules do. I must admit, it gets annoying when specifying long type class
constraints, and will get more annoying if everything ends up hoisted
inside the std module.

> I'd like to see things that let you read in whitespace delimeted words,
> and also whole lines. Being able to chew up any trailing whitespace is
> also handy. (the io library implements this allready)

This operates at a higher level than mere streams, as reimplementing such
functionality for each stream type would not be useful. Currently I've
been concentrating on different kinds of higher level output, I'll post
format.m soon. Haven't yet begun work on input, as many programs roll
their own tokenisers anyway it seems less important. And it's harder :)

> Same here, but for output..

See forthcoming format.m. Thanks for your comments,

Michael

--------------------------------------------------------------------------
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