Thanks for pointing to that ticket.  At first after reading through it, I thought my mistake was not using tail call recursion.  But I updated the type families and they actually ran slower!

I've gone ahead and reported a bug: http://ghc.haskell.org/trac/ghc/ticket/8095


On Fri, Jul 26, 2013 at 1:31 PM, Jan Stolarek <jan.stolarek@p.lodz.pl> wrote:
I don't know much about type families, but I recall this:
http://ghc.haskell.org/trac/ghc/ticket/5321

The bug is marked as fixed, but perhaps behaviour you observed shows that there are other cases
where constraqint solver is slow. I'd consider reporting this as GHC bug.

Janek