-
Notifications
You must be signed in to change notification settings - Fork 530
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
Problem finding implicits for HNil.type #78
Comments
Note that the |
Sorry it's taken me so long to get respond on this ... I think this is unfortunate, but ultimately the correct behaviour: what you're observing is the compiler distinguishing between the type I'm open to other suggestions, but for now I think I would classify this as not a bug, but a candidate for improved documentation. PRs in that vein would be very welcome. |
No problem. The The If I'm not mistaken there is no need for the existence of |
Could you give those ideas a try and send a PR my way? |
I did not realize that compiling the library is so CPU intensive. Anyway, there seems to be a problem in the compiler. When I move the Part of this can be fixed by changing package shapeless
package syntax Into package shapeless.syntax
import shapeless._ On changing the My knowledge about the library is too limited to determine if this is actually caused by a wrong definition in the tests (brought up by having correct compiler behavior) or a bug in the compiler. It feels that the compiler is at least not consistent in handing stuff in packages v.s. package objects. Adding |
Do you have a branch I could take a look at? |
I'm sorry for the late reaction. Because it didn't work I removed the code. |
OK, thanks ... I'm going to close this issue for now. Feel free to reopen if you'd like to pursue it further. |
For quite some time I had a problem using maps and folds. I finally figured out it was because it could not find implicits that involve
Int.type
.Causes the following error:
Changing the call of
map
to the following solves the problem:Another workaround is to define an implicit for
HNil.type
:It's very hard to notice this error because most implicits involving
HList
depend on theHNil
implicits.Not sure how this would be fixed. The result of a fold on an
HNil
becomes useless:The above code gives the following error:
It can be solved by calling
foldRight
like this:The text was updated successfully, but these errors were encountered: