[m-rev.] Added unsafe_promise_unique/1 func

Simon Taylor stayl at cs.mu.OZ.AU
Tue Dec 18 18:43:02 AEDT 2001


On 18-Dec-2001, Ralph Becket <rafe at cs.mu.OZ.AU> wrote:
> For review by anybody.
> 
> Estimated hours taken: 0.1
> Branches: main
> 
> library/builtin.m:
> 	Added func version of unsafe_promise_unique.
> 
> NEWS:
> 	Mentioned the new addition.
> 
> Index: NEWS
> ===================================================================
> @@ -3,6 +3,9 @@
>  
>  Changes to the Mercury language:
>  
> +* The built-in pred unsafe_promise_unique/2 now has an analagous func,
> +  unsafe_promise_unique/1.

That's a change to the library, not the language.

`builtin__unsafe_promise_unique' should be added to the existing item:

	* We've added function versions of `ops__init_op_table'
	  and `ops__max_priority'.

> Index: builtin.m
> ===================================================================
> @@ -126,6 +126,11 @@
>  :- pred unsafe_promise_unique(T, T).
>  :- mode unsafe_promise_unique(in, uo) is det.
>  
> +% Func version of unsafe_promise_unique/2.
> +
> +:- func unsafe_promise_unique(T) = T.
> +:- mode unsafe_promise_unique(in) = uo is det.

I'd suggest removing the comment. It doesn't really add anything. 

There should also be a test case.

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