-
Notifications
You must be signed in to change notification settings - Fork 10
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
Get rid of := :>
#2
Comments
I just remembered the problem I ran into when I tried that before: "find" :>: Get[User]
// desugared
val x$1 = "find"
Get[User].:>:(mkWitness[x$1.type](x$1.asInstanceOf[x$1.type])) Here Shapeless cannot find a Get[User].:>:("find")
// desugared
Get[User].:>:(mkWitness[String("find")]("find")) will work which isn't a solution. We have to keep |
That's interesting. I wish I had the time to look further into this case and try to make it work. |
I tried it for a while but stopped eventually as I also just have very limited time and this is more of a minor / cosmetic issue. Maybe you find some time in the future to have a look, find a solution for it and open a PR :). And thanks for your interest in this project. |
I will keep that issue open until both of us agree that we cannot find a proper solution :) |
I had to use some initial empty state to guarantee that
"path"
is translated into aWitness
. Why? Because an extension ofString
usingimplicit class
was not able to derive aWitness
, as Scala/Shapeless is not able to proof that the given String is a literal/singleton.Another way could be to change the associativity (
:>:
instead of:>
) and createGetCons
,PutCons
, ... as initial states with an emptyHList
type. Thus, we should be able to write:The text was updated successfully, but these errors were encountered: