Created
April 1, 2014 14:01
-
-
Save pedrofurla/9914570 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import shapeless._ | |
| import shapeless.HList._ | |
| import Report._ | |
| import Chronograph._ | |
| val sample = ReportLine(1,1,Micros) | |
| def toHList = Generic.product[ReportLine].to _ | |
| val sampleH = toHList(sample) | |
| object stringfy extends Poly1 { | |
| implicit def caseLong = at[Long](_.toString) | |
| } | |
| sampleH map stringfy | |
| /* | |
| [error] /Users/pedrofurla/dev/projects/slick/slick-perf/src/main/scala/exec/Chronograph.scala:103: could not find implicit value for parameter mapper: shapeless.ops.hlist.Mapper[exec.shapes.stringfy.type,shapeless.::[Int,shapeless.::[exec.Chronograph.Chronon,shapeless.::[exec.Chronograph.TimeUnit,shapeless.HNil]]]] | |
| [error] sampleH map stringfy | |
| [error] ^ | |
| [error] one error found | |
| */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment