[m-rev.] for review: smart recompilation

Simon Taylor stayl at cs.mu.OZ.AU
Wed Jun 6 03:10:02 AEST 2001


On 05-Jun-2001, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> On 28-May-2001, Simon Taylor <stayl at cs.mu.OZ.AU> wrote:
> > Index: doc/user_guide.texi
> > --- library/io.m	2001/05/02 14:44:26	1.224
> ...
> > +:- pred io__file_modification_time(string, io__res(time_t),
> > +		io__state, io__state).
> > +:- mode io__file_modification_time(in, out, di, uo) is det.
> > +	% io__file_modification_time(FileName, TimeResult)
> > +	% finds the last modification time of the given file.
> > +	% This predicate will only work on systems which provide
> > +	% the C library function stat(). On other systems the
> > +	% returned result will always be bound to error/1.
> 
> s/C/Posix C/
> 
> The interface with time_t and the documentation there are both overly
> implementation-specific.
> This should return an abstract type, e.g. `file_timestamp'.
>
> The documentation should not require changing if we happen to
> implement it on a non-Posix system (e.g. one that provides `_stat()'
> or `GetFileTimeStamp()' rather than stat()).

Rather than invent another representation for time in the library which
we'll probably end up regretting later, I'll leave this code as it
is for now. I'll move the timestamp code I submitted for inclusion in
time.m into the compiler directory.

I can leave io__file_modification_time out of the library
documentation if you prefer.

Simon.

--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list