[m-rev.] for review: move string builder stream to standard library

Ian MacLarty maclarty at csse.unimelb.edu.au
Fri Apr 20 11:04:45 AEST 2007


On Thu, Apr 19, 2007 at 05:29:11PM +1000, Peter Wang wrote:
> On 2007-04-19, Ian MacLarty <maclarty at csse.unimelb.edu.au> wrote:
> > For review by anyone.
> > 
> > Estimated hours taken: 0.5
> > Branches: main.
> > 
> > Move the string builder stream from extras to the standard library.
> > 
> > library/string.builder.m:
> > 	Move stream_util.string_builder to string.builder.
> > 
> > 	Use builtin.copy instead of unsafe_promise_unique in the implementation
> > 	of put/4 for the string builder stream.
> > 
> > library/string.m:
> > 	Include string.builder.
> > 
> > tests/hard_coded/Mmakefile:
> > tests/hard_coded/string_builder_test.exp:
> > tests/hard_coded/string_builder_test.m:
> > 	Add a test case.
> 
> > +
> > +string_builder_state_to_string(State) = String :-
> > +    State = string_builder_state(StringList),
> > +    String = string.join_list("", list.reverse(StringList)).
> 
> You can use string.append_list here.
> 
> You also need to add it to the NEWS file.
> 

Done and done.

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