
Dear list, Is there a good reason that partially applied type synonyms cannot be made instances of classes? - A simple example would be making the identity type 'Id' ("type Id x = x") instance of 'Monad'. This would eliminate the need for some silly occurrences of 'runIdentity', and perhaps narrow the gap between monads and monad transformers. - The reason I complain about this now is a more involved example, where introducing a newtype to work around the restriction is not an option. Well, not as far as I can see now, anyway. Partially applied type synonyms are, in a sense, the anonymous functions at the type level, and one might argue that they deserve the same 'first-class member status' as the lambda at the value level. Kind regards, Arie Peterson

Arie Peterson writes:
Is there a good reason that partially applied type synonyms cannot be made instances of classes?
[...]
Partially applied type synonyms are, in a sense, the anonymous functions at the type level, and one might argue that they deserve the same 'first-class member status' as the lambda at the value level.
According to SPJ, the problem seems to be requiring higher-order unification for this to happen: http://www.haskell.org/pipermail/glasgow-haskell-users/2005-April/008340.htm... Does anyone here know (as SPJ's response is quite a few years old) if there's been made any progress since back then? cheers, hvr

On Mon, Mar 5, 2012 at 06:55, Herbert Valerio Riedel
Arie Peterson writes:
Is there a good reason that partially applied type synonyms cannot be made instances of classes?
http://www.haskell.org/pipermail/glasgow-haskell-users/2005-April/008340.htm...
Does anyone here know (as SPJ's response is quite a few years old) if there's been made any progress since back then?
I'm pretty sure it's just as undecidable now as it was then. -- brandon s allbery allbery.b@gmail.com wandering unix systems administrator (available) (412) 475-9364 vm/sms
participants (3)
-
Arie Peterson
-
Brandon Allbery
-
Herbert Valerio Riedel