Re synthetics and friends in plugins, yeah that sucks - caused me a
tonne of pain a few years ago (to the point I just gave up), but at
least sbt makes the separation of compiler runs and plugins simpler.
Is the plugin being disabled on console via sbt (or is it no longer an
issue with 10.x)?
> --
> You received this message because you are subscribed to the Google Groups
> "scalaz" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/scalaz/-/bLHs28NBnMgJ.
> To post to this group, send email to sca...@googlegroups.com.
> To unsubscribe from this group, send email to
> scalaz+un...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/scalaz?hl=en.
>
Not sure I follow, I need to watch that presentation again.
Is the motivation for the CoState representation a more efficient
Lens#mod? Person#name can't be both a String and CoState[String,
Person]. Do you mean Person.name?
Might be easiest just to update the sample to get it through to me :)
-jason
I've added the alternative Lens representation here
https://gist.github.com/1090787
I'm on the fence about whether p.name should return Store[String,
Person]. It would break compatibility anyway.
- --
Tony Morris
http://tmorris.net/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk4ksDcACgkQmnpgrYe6r6131QCcDy2PWv+DWVf4KpeuMKDAoCOU
eqwAoMp55Tz7/GEk79ZlysI6w50rRqd1
=+VZq
-----END PGP SIGNATURE-----
Gerolf Seitz has been tinkering with Scalac to autogenerate Lenses for case classes fields.
Cool!
Tony mentioned on IRC that it would be nice to add reflection on the
field names, maybe like:
/** A field of type B contained in an A */
case class Field[A, B](name: String, lens: Lens[A, B], man: Manifest[B])
case class FieldManifest[A](fields: Map[Field[A, _]))
case class Person(name: String, age: Int)
object Person {
implicit def PersonManifest: FieldManifest[Person] = ...
}
Not sure exactly what the use case was, perhap he can elaborate.
-jason
One use-case at the very least, is a pretty-printer (Show).
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Person(age = 7, name = Bob)
--
You received this message because you are subscribed to the Google Groups "scalaz" group.
To post to this group, send email to sca...@googlegroups.com.
To unsubscribe from this group, send email to scalaz+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/scalaz?hl=en.
1) Reflection is unsafe -- better for the compiler to produce it.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
2) Given the Lens, there is no way to recover the field name, even
with reflection.
There is likely to be some overlap with the in-progress scala.reflect.
Another interesting avenue for experimentation performance: what can
we do with @specialized and (scalac) inlining to bring the performance
of Lens based access up to par with direct access?
-jason