[m-rev.] for review: rewrite of Modes chapter

David Overton dmo at cs.mu.OZ.AU
Sat Feb 22 12:24:22 AEDT 2003


On Thu, Feb 20, 2003 at 12:41:08PM +1100, Mark Brown wrote:
> 
> 	- Require the final inst to be "at least as instantiated as" the
> 	  initial inst.  XXX is this correct?  The thesis draft suggests
> 	  that these are the only allowable transitions, but the compiler
> 	  does actually allow modes such as 'citrus >> ground'.

The compiler doesn't explicitly check for and disallow a predicate with
a mode declaration such as this.  However, when analysing a call to such
a predicate, the final inst from the mode declaration is abstractly
unified with the inst of the argument before the call.  So if someone
declares a mode of `citrus >> ground' the mode is really `citrus >> citrus'.
I.e. the compiler doesn't through away inst information unnecessarily in
such cases.

By disallowing such mode declarations in my thesis, I made it simpler to
describe the mode system without removing any of its expressiveness.
Whether we want to do the same in the compiler (i.e. report an error --
or even just a warning) is another matter.


David
-- 
David Overton                  Uni of Melbourne     +61 3 8344 1354
dmo at cs.mu.oz.au                Monash Uni (Clayton) +61 3 9905 5779
http://www.cs.mu.oz.au/~dmo    Mobile Phone         +61 4 0337 4393
--------------------------------------------------------------------------
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