[m-rev.] for review: add string builder stream to extras
Ian MacLarty
maclarty at csse.unimelb.edu.au
Mon Dec 4 17:13:29 AEDT 2006
On Mon, Nov 27, 2006 at 04:17:24PM +1100, Julien Fischer wrote:
> >Index: stream/stream_util.string_builder.m
> >===================================================================
> >+
> >+:- instance stream.writer(string_builder_stream, string,
> >string_builder_state)
> >+ where [
> >+ ( put(_, String, !State) :-
> >+ !.State = string_builder_state(StringList0),
> >+ %
> >+ % The string builder will never clobber the string. Also we
> >+ % know that nothing else can clobber the string since it isn't
> >unique.
>
> s/since/although/?
>
No, since. I'm trying to argue that it's okay to lie to the compiler
here. Does my argument make sense?
> >+ % Therefore the inst cast below is okay, even though it is a lie.
> >+ %
> >+ StringList = [unsafe_promise_unique(String) | StringList0],
> >+ !:State = string_builder_state(StringList)
> >+ )
> >+].
I've followed all your other suggestions.
Ian.
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to: mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions: mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------
More information about the reviews
mailing list