milessabin/shapeless — pull request #150 by alexarchambault (2014-06-28 16:34:44+00:00)
Title: Fixes/changes in Unify implementation

This PR adds tests to the unify method of HLists - some of them failing, and changes the current Unifier implicits so that all these tests pass.

As already discussed in https://github.com/milessabin/shapeless/pull/105 which this PR supersedes, it converts the HList to a Sized of the same length (which finds the Lub), and converts back the Sized to an HList. So internally, the HList is converted to List, before being converted again to an HList.

This implementation may be enhanced so that it doesn't use this intermediate representation anymore. In the mean time, it should make unify more robust.

The tests added for HLists should also be added to tuples. I may do that in the coming days.