[m-dev.] for review: add types to MLDS statements

Fergus Henderson fjh at cs.mu.OZ.AU
Mon Mar 27 21:07:14 AEST 2000


On 27-Mar-2000, Tyson Dowd <trd at cs.mu.OZ.AU> wrote:
> On 26-Feb-2000, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> > Apart from that, this change looks fine.
> > But I'd like to see a diff or relative diff
> > for the change to make `cast' an mlds__unary_op
> > rather than an mlds__stmt.
> 
> I've finally got around to cleaning this diff up again.
> 
> A relative diff is below (generated somewhat manually).
> Below that I've attached the entire change for later reference.

>  :- type mlds__unary_op
>  	--->	box(mlds__type)
>  	;	unbox(mlds__type)
> +	;	cast(mlds__type)
>  	;	std_unop(builtin_ops__unary_op).

You should consider also including the source type,
not just the destination type, in a `cast' mlds__unary_op.
This is not needed for the C back-end, but it might be needed
for compiling to other target languages.

Apart from that, this looks fine.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list