[I send it to [EMAIL PROTECTED] because it's more appropriate]

> And I think it's a good idea to allow type synomyms!! After all that's
> what they are made for: to abbreviate type expression or to give an
> indication what the type is used for.

I think, that this isn't sufficient. There are two reasons to use type synonyms:
 1. to abbreviate type expressions (as you pointed out)
 2. to document the code e.g. 'type SizeType = Int'

> If type synomyms are not allowed  in instance declarations I am forced to _copy_
> the RHS of the type synomnym which I consider bad style.

For the first kind it should be allowed in instance declarations, I completely
agree with you!
The second kind of type synonyms are concealed newtype declarations which one
uses to avoid the somehow ugly data constructor of the newtype.

I was surprised when I read this restriction in the report, but now I think
(experience!) that it may be confusing in teaching Haskell, because one who is
not familiar with Haskell don't identify e.g. SizeType and Int!
Well at the other side, avoiding a rule is good, too.

I think, it would lead to ambiguities and other problems to leave the data
constructor of a newtype decl out, otherwise it could be solution?

Martin Stein


Reply via email to