[m-dev.] Ye Olde Subtyping Proposal

Fergus Henderson fjh at cs.mu.OZ.AU
Mon Nov 18 16:28:08 AEDT 2002


On 16-Nov-2002, Mark Brown <dougl at cs.mu.OZ.AU> wrote:
> On 09-Feb-2000, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> > While I'm at it, here's an alternative syntax that might (or might not)
> > be better.
> > 
> > Syntax:
> > 
> > 	:- subtype SubType < Type ---> Functors.
> > 
> > Legality Rules:
> > 
> > 	`Functors' is a disjunction of non-variable terms
> > 	whose arguments are types or subtypes.
> 
> We should also allow a with_inst qualifier to be used if the argument is a
> pred or func type, otherwise there is no way to specify the determinism,
> uniqueness of arguments, etc of such a type.  The meaning of a with_inst
> qualified argument is that the subtype information on the LHS is propagated
> into the inst on the RHS in the same "obvious" way that the propagation
> would happen in arguments of pred/func declarations.
> 
> Any objections?

How about using "::" rather than "`with_inst`"?

-- 
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-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