Proxy and new-typeable

Roman Cheplyaka roma at
Fri Apr 19 09:15:37 CEST 2013

* Shachaf Ben-Kiki <shachaf at> [2013-04-19 00:06:10-0700]
> Bah, I hadn't thought of kind polymorphism. That's a problem -- though
> is it a problem for any use of Typeable in base?

Yes — the plan is to make Typeable itself kind-polymorphic (instead of
Typeable1, Typeable2, ...). For that you need a kind-polymorphic proxy.

> For the second point, at least the type of typeRep would be pretty
> self-documenting, because it would be polymorphic in the "proxy" type,
> not mention Maybe explicitly. Maybe you mean that use sites perhaps
> wouldn't be? The situation wouldn't really be different from how
> typeOf is used currently. But maybe that's not a good benchmark. Oh
> well.

I was referring to user-written functions which disambugate the types by
taking proxies as arguments. They may take several arguments, and it may
not be obvious that some of them are just proxies. So even if Maybe
would be a good fit for typeOf, it's a poor substitute for Proxy in
general. (But I see now that you were only concerned with base.)


More information about the Libraries mailing list