milessabin/shapeless — pull request #104 by alexarchambault (2014-06-22 13:22:59+00:00)
Title: Changes in ToArray implementation

This PR makes more use cases of calling .toArray on an HList compile (see the added tests).

It changes the current ToArray implicits so that they look similar to my proposed implementation of ToList implicits (https://github.com/milessabin/shapeless/pull/103). In order to make the implementation as concise as ToList, I had to add a variance annotation on the Lub type, and make some slight changes to the apply method's signature. I also removed the unused type variance annotation on L.

This implementation of toArray looks more concise and clean to me. (Only 2 implicits instead of 4, a ClassTag is required only for the Lub and only so when .toArray is called, ...)