-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implicit value for evidence parameter errors #41
Comments
There are a few issues with this code. The first one, the one that causes compilation to fail, is that You have various ways of doing that - have it as an implicit parameters of the methods that call Sort that out, and you code compiles. You could also replace I think you could also replace most of Unless I'm mistaken, there is nothing that needs to be fixed in kantan.csv, what you complain about is expected and normal. I'll close this issue - issues are meant for bugs and improvements, and your problem is neither, it's a request for help. If you feel I didn't sufficiently address your problem, you're quite welcome on the gitter channel where we can go through this a bit interactively. |
I'm sure you're right. I need to get up to speed on implicits before I can digest this. |
It's really not as complicated as you might fear, and it's certainly worth learning (obviously not just for kantan.csv). If you're struggling, ping me on gitter and I'll try to make the time for a useful introduction on the matter. |
Appreciate it. I'm plowing through some stuff right now, avoiding the temptation to try and link it directly to my immediate need. Besides, my work around (simply implement within the case classes I need to [de]serialize) deals with all the scoping issues--I suspect they're scoping issues--I was having, so I can learn at a somewhat leisurely pace. If I run into trouble, I'll take you up on your kind offer. |
Fair enough. I just get a bit bothered by the fact that you're using kantan.csv in a way that forces you to write encoding / decoding code - the whole purpose of it is that you mostly should not, I hate writing such code. So, quickly then. Kantan.csv relies heavily on a pattern known as type classes. It boils down to implicits and knowing how they're resolved: if you have a type This is how, say, There are various ways to provide an implicit def parse(line : String, sep : Char = ',', header : Boolean = false)(implicit dt: RowDecoder[T]): Option[T]
|
That works, though don't know enough about context to understand why yet. I'll keep studying. |
Probably a way to handle this, but getting implicit errors when attempting to use kantan
asCsvReader
andasCsvWriter
against generics. I suspect this is either a limitation or there is some niceness I can try with implicits to move forward, but right now my solution is to simply leave the trait methods unimplemented and do so in the implementing case classes.If anyone has a better way of doing this, I'm all ears.
Code follows errors.
Errors
Code
The text was updated successfully, but these errors were encountered: