2 Feb
2006
2 Feb
'06
8:53 p.m.
Mads Lindstrøm wrote:
"You cannot, for example, write:
type P a = [[a]] instance Monad P where ...
This design decision is independent of all the others, and easily reversed, but it makes sense to me."
It's not clear to me how this can be reversed. Wouldn't reversing this mean introducing "type lambda", and doesn't that raise all kinds of nasty issues (like having to type-annotate function applications)?
If I have:
data LongAndUglyName a = ... type ShortAndTellingName a = LongAndUglyName a
It seems to make sensible to:
instance Foo ShortAndTellingName
You can do this instead: type ShortAndTellingName = LongAndUglyName -- Ashley Yakeley