[m-dev.] Ye Olde Subtyping Proposal
Mark Brown
dougl at cs.mu.OZ.AU
Sat Nov 16 14:33:52 AEDT 2002
Here's a minor refinement to the second form of the proposal:
On 11-Nov-2002, Mark Brown <dougl at cs.mu.OZ.AU> wrote:
> The full proposal can be found at:
> http://www.cs.mu.oz.au/research/mercury/mailing-lists/mercury-developers/mercury-developers.0002/0093.html
>
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?
Cheers,
Mark.
--------------------------------------------------------------------------
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