
On Sat, Oct 4, 2014 at 5:57 AM, Nicola Gigante
However, it generates lenses, which at this time I don’t use in my little project. I'll learn to use them well sooner or later, I promise! In the meantime, is there some module out there than provides a template haskell function that do the same thing but generating simple accessor functions instead of lenses?
Anything that does this creates lenses. That does not mean that they all create Control.Lens, though; a lens is a general abstraction, not a trademark. The simplest version, focused solely on this use case, is probably the fclabels package. Note that the reason they do what you need is that they are lenses. Simple accessors will conflict as you described. fclabels is still useful if you're only interested in lenses for record field accessors, though, since the full lens package is rather heavyweight in that case --- and as a bonus, you'll be getting a head start on the more general concept, without getting dropped into the deep end of the pool. -- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net