TypeFamilies vs. FunctionalDependencies & type-level recursion

José Pedro Magalhães jpm at cs.uu.nl
Tue Jun 21 10:01:26 CEST 2011

Hi Oleg,

On Tue, Jun 21, 2011 at 09:35, <oleg at okmij.org> wrote:

> I have implemented type-level TYPEREP (along with a small library for
> higher-order functional programming at the type level).  Overlapping
> instances may indeed be avoided. The library does not use functional
> dependencies either.
>        http://okmij.org/ftp/Haskell/TTypeable/

At a first glance, I think your TYPEOF encodes less information about types
than the new generics Rep. By "less" I mean that one could get that
information from Rep (which is derived automatically).

Our generics do not, however, encode a type-level natural per type. This
greatly simplifies type-level type equality. But I am still doubtful of the
runtime performance of your code; also, the need to define a duplicate of
the class (MonadState' in your example) bloats the code significantly.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-prime/attachments/20110621/4b32d7eb/attachment.htm>

More information about the Haskell-prime mailing list