No description provided.
#15 - Add lenses to first and second element of HList
#15 - Attempt to use Generic and HListNthLensAux to generate lenses
Any one knows how can I get an implicit of Generic.Aux[S, L] when S is a case class and L and HList?
@milessabin If you have a min, your help will be great :)
@julien-truffaut I think it's something like this:
def toHList[A <: Product](a: A)(implicit g: Generic[A]): g.Repr = g.to(a)
def fromHList[A <: Product, H <: HList](a: H)(implicit g: Generic.Aux[A, H]): A = g.from(a)
#15 - Made generic lenses work using Generic but need to call Generi…
@puffnfresh Thanks, I managed to create a method that generates a lens toward any element of a case class (mainly taken from shapeless lens) but I still need to use Generic.product on the case class to generate an implicit https://github.com/julien-truffaut/Monocle/blob/hlist-lens/examples/src/main/scala/monocle/HListExample.scala#L26
I also found another problem, overloading compose seems to cause an issue with complex lenses (see line 34).
#15 - Separate HList from Generic and add some doc
Added lenses for HList and for any class that have an HList representation.
There are some issues between type inference and overloaded compose method, so I had to create an alias to compose which is restricted to lens composition.