nrinaudo / kantan.csv

CSV handling library for Scala
http://nrinaudo.github.io/kantan.csv/
Apache License 2.0
345 stars 36 forks source link

Parsing a cell as a NonEmptyList #327

Open annafernandez opened 2 years ago

annafernandez commented 2 years ago

Hello,

Is it possible to write a decoder for a NonEmptyList in a generic manner? The only way I've managed to do it is defining an encoder per type. Say I have NonEmptyLists of NonNegSeconds and NonNegDouble. Do I need to define an encoder for each or is there a way to do it with type parameters if I have decoders for NonNegDouble and NonNegSeconds in the scope already?

Thanks!