[m-dev.] Ye Olde Subtyping Proposal

David Overton dmo at cs.mu.OZ.AU
Mon Nov 18 17:10:48 AEDT 2002


On Mon, Nov 18, 2002 at 04:48:08PM +1100, Ralph Becket wrote:
> Fergus Henderson, Monday, 18 November 2002:
> > 
> > I agree that abstract subtypes would be useful, but supporting them would
> > mean that the proposal was no longer just syntactic sugar, but instead added
> > a major new feature.  This would require substantial changes to mode analysis
> > to implement.  I'm not opposed to doing that in the long term, but in the
> > short term I think it would be better to support subtypes without abstract
> > subtypes.
> 
> Why would it require major changes (forgive me if I'm a bit slow... it's one
> of those days)?

If I've read the proposal correctly, one way of implementing this is to
allow "subinst" constraints to be placed on abstract insts, in much the
same way we can now constrain inst variables.  The abstract subtype
would then be transformed into an abstract inst with the appropriate
"subinst" constraint.

The concept sounds fairly simple, but would probably require a fair bit
of work to implement.


David
-- 
David Overton                  Uni of Melbourne     +61 3 8344 9159
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-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