These are chat archives for nrinaudo/kantan.csv

6th
Apr 2017
Andrew Roberts
@aroberts
Apr 06 2017 17:58
am I missing something here? why can’t I use a case class’s apply as an argument to ordered?
  case class Thing(s: String, i: Int)
  object Thing {
    // does not compile
    implicit val decodeThing: RowDecoder[Thing] = RowDecoder.ordered(Thing.apply)
  }
Nicolas Rinaudo
@nrinaudo
Apr 06 2017 20:34
@aroberts Yeah I've not quite worked out why yet, but case class apply methods don't get eta-expanded as they should here
you need to turn them into functions explicitly:
case class Thing(s: String, i: Int)
object Thing {
  // does  compile
  implicit val decodeThing: RowDecoder[Thing] = RowDecoder.ordered(Thing.apply _)
}