[m-rev.] diff: fix io__command_line_arguments in il grade

Fergus Henderson fjh at cs.mu.OZ.AU
Fri Nov 29 01:17:10 AEDT 2002


On 28-Nov-2002, Peter Ross <pro at missioncriticalit.com> wrote:
> +++ runtime/mercury_mcpp.h	28 Nov 2002 11:14:57 -0000
> @@ -219,6 +219,13 @@
>  // Note that this is very dependent on the data representation chosen
>  // by the compiler.
>  
> +#ifdef MR_HIGHLEVEL_DATA
> +#define MR_list_nil(List)					\
> +	List = mercury::list::mercury_code::ML_empty_list(NULL)
> +
> +#define MR_list_cons(List, Head, Tail)				\
> +	List = mercury::list::mercury_code::ML_cons(NULL, Head, Tail)
> +#else
>  #define MR_list_cons(List, Head, Tail)				\
>      	do {							\
>  		MR_Word _tmp;					\

The #defines here inside the #ifdef should be intended two spaces.

> +++ library/list.m	28 Nov 2002 11:14:59 -0000
> +:- func empty_list = list(T).
> +:- pragma export(empty_list = out, "ML_empty_list").
> +empty_list = [].
> +
> +:- func cons(T, list(T)) = list(T).
> +:- pragma export((cons(in, in) = (out)), "ML_cons").
> +cons(H, T) = [H | T].

A comment saying why they are exported with `pragma export'
might be helpful here.

Otherwise that change looks fine.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
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