Type synonyms revisited

J. Han hjh@best.com
Tue, 6 Jan 1998 22:08:00 -0800 (PST)



On Wed, 7 Jan 1998, Erik Zuurbier wrote:
[big snip]
> 
> That is simple. That brings down the word synonym to what the word actually
> means: a different word for exactly the same thing. I cannot immagine that
> language developers have never thought of this. A synonym type would be
> reduced to a syntactic issue. What do we lose that way?
> 
[...]
> 
> Now you have two instances for the type (Int, Int)! Of course this should
> be illegal. But IMHO type synonyms are not the language construct to
> introduce new abstract datatype. It is mainly for humans to write and read
> the source code.
[...]
> 
> So far the summary. So say we just do not import StdTuple, and we would
> regard type synonyms as just a syntactical construct, a shorthand for a
> type signature, not a type definition by itself that can differ from the
> type it is a synonym for in the set of functions that are defined for
> it,... the question remains: what do we lose if we do that?

Please enlighten me: how is your "type synomym" different from, say,
typedef in C?  

best,
	J.

> 
> I have the impression that Haskell has both kinds of synonyms.
> 
> Regards Erik Zuurbier
> 
> 
>