
On 12/02/2012, at 01:44, John Meacham wrote:
I am not so sure, adding type applications to the language seems fairly radical and will change many aspects of the language. Something like Proxy that can be expressed in relatively vanilla haskell and some handy desugarings is much more attractive to me.
With type apllications you end up with odd cases you need to figure out, like forall a b. (a,b) and forall b a. (a,b) meaning different things maybe depending on the details of the impementation.... Also, it meshes with a core language based on type applications, like system F or jhc's PTS. However, it seems quite plausible that there are other ways of writing haskell compilers. Not that i am opposed to them, I just think they are way overkill for this situation and any solution based on them will be ghc-bound for a long time probably.
Type application doesn't necessarily have to tied to the forall syntax. You already suggest {:: T} as a shortcut for (Proxy :: Proxy T). Now suppose {T} is a shortcut for the type Proxy T and you could write: class Typeable t where typeRep :: {t} -> TypeRep ... typeRep {::Int} ... But now you don't need Proxy at all, although it's a perfectly valid desugaring. I'm not necessarily suggesting the syntax above, just trying to point out that type application syntax might be bound to a specific type abstraction syntax. Roman