[m-dev.] Ye Olde Subtyping Proposal

Ralph Becket rafe at cs.mu.OZ.AU
Tue Nov 12 09:26:25 AEDT 2002


It's not clear to me what would happen in this situation:

:- type abc       ---> a ; b ; c.
:- type ab < abc  ---> a ; b.
:- type really_ab ---> really_ab(ab).

:- pred p(T::in, T::out) is det.

p(X, Y) :- X = Y.

Now, is the following goal legal or not:

	p(X `with_type` really_ab, Y `with_type` really_ab)

really_ab is not a subtype of anything, yet its parameter is.
Therefore, really_ab values are strict subinsts of ground, but
not actually ground.

If the above is a legal goal, can you explain to me again how
we verify this?

Cheers,

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