On 09-Jul-1998, Johannes Waldmann <[EMAIL PROTECTED]> wrote:
> data / type / newtype:
>
> i'd like to have these choices
>
> type T1 = record C1 .. | C2 ..
> type T2 = T1
> type T3 = new T2
>
> with T2 identical to T1,
> and T3 being an identical copy of T2 (but different from T2)
> inheriting all its constructors and operations.
What exactly do you mean by inheriting all its operations?
For example, if I have an operation
foo :: T2 -> T2 -> T2
and I have
x2, y2, z2 :: T2
x3, y3, z3 :: T3
then which of the following should be legal?
x2 = foo y2 z2 -- clearly OK
x3 = foo y3 z3 -- presumably fine too?
x3 = foo y2 z2 -- ??
x3 = foo y2 z3 -- ??
x2 = foo y3 z3 -- ??
--
Fergus Henderson <[EMAIL PROTECTED]> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger [EMAIL PROTECTED] | -- the last words of T. S. Garp.