Replace record projection function with lenses
问题 Almost every time I make a record, I find myself adding makeLenses ''Record (from lens) immediately afterwards, and I never end up actually using the projection functions that the record gives me. In fact, looking at what makeLenses produces (with the GHC -ddump-splices flag), it looks like not even it uses those projection functions, except to choose a name for the lenses it produces. Is there some way, either through TemplateHaskell , or through a preprocessor, or frankly any other magic,