{"action":"created","issue":{"url":"https://api.github.com/repos/cchalmers/plots/issues/12","repository_url":"https://api.github.com/repos/cchalmers/plots","labels_url":"https://api.github.com/repos/cchalmers/plots/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/cchalmers/plots/issues/12/comments","events_url":"https://api.github.com/repos/cchalmers/plots/issues/12/events","html_url":"https://github.com/cchalmers/plots/pull/12","id":148535507,"number":12,"title":"Simplify lens-generating code?","user":{"login":"sid-kap","id":6425077,"avatar_url":"https://avatars.githubusercontent.com/u/6425077?v=3","gravatar_id":"","url":"https://api.github.com/users/sid-kap","html_url":"https://github.com/sid-kap","followers_url":"https://api.github.com/users/sid-kap/followers","following_url":"https://api.github.com/users/sid-kap/following{/other_user}","gists_url":"https://api.github.com/users/sid-kap/gists{/gist_id}","starred_url":"https://api.github.com/users/sid-kap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sid-kap/subscriptions","organizations_url":"https://api.github.com/users/sid-kap/orgs","repos_url":"https://api.github.com/users/sid-kap/repos","events_url":"https://api.github.com/users/sid-kap/events{/privacy}","received_events_url":"https://api.github.com/users/sid-kap/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-15T02:15:33Z","updated_at":"2016-04-15T09:47:38Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/cchalmers/plots/pulls/12","html_url":"https://github.com/cchalmers/plots/pull/12","diff_url":"https://github.com/cchalmers/plots/pull/12.diff","patch_url":"https://github.com/cchalmers/plots/pull/12.patch"},"body":"Hopefully this will provide some context to my comments in #11? I know that overall, I didn't decrease the lines of code by much, but at least there is now less manual defining of lenses. Not sure if it's an improvement overall, but I thought I'd share it anyways."},"comment":{"url":"https://api.github.com/repos/cchalmers/plots/issues/comments/210392922","html_url":"https://github.com/cchalmers/plots/pull/12#issuecomment-210392922","issue_url":"https://api.github.com/repos/cchalmers/plots/issues/12","id":210392922,"user":{"login":"cchalmers","id":1354887,"avatar_url":"https://avatars.githubusercontent.com/u/1354887?v=3","gravatar_id":"","url":"https://api.github.com/users/cchalmers","html_url":"https://github.com/cchalmers","followers_url":"https://api.github.com/users/cchalmers/followers","following_url":"https://api.github.com/users/cchalmers/following{/other_user}","gists_url":"https://api.github.com/users/cchalmers/gists{/gist_id}","starred_url":"https://api.github.com/users/cchalmers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cchalmers/subscriptions","organizations_url":"https://api.github.com/users/cchalmers/orgs","repos_url":"https://api.github.com/users/cchalmers/repos","events_url":"https://api.github.com/users/cchalmers/events{/privacy}","received_events_url":"https://api.github.com/users/cchalmers/received_events","type":"User","site_admin":false},"created_at":"2016-04-15T09:47:38Z","updated_at":"2016-04-15T09:47:38Z","body":"First of all I'm willing to use the `BackendType` type family instead of functional dependencies on `b`. I actually used to have this (da90227) but removed it, I think this was because the GSoC student got confused by it (probably because my `B` name conflicted with the backend type alias). Also it's just another type family to deal with. My real hope is to get rid of the `b` type in diagrams, it really makes anything build on top of diagrams more difficult.\r\n\r\nI've avoided `makeClassy` for a few reasons:\r\n- Doesn't support the more flexible `LensLike' f` scheme I've used\r\n- Doesn't allow adding haddock comments to class functions\r\n- Uses TH (see below)\r\n\r\nNow `makeLenses` doesn't necessary suffer the first two points, but it still uses TH which I try to avoid for in big projects:\r\n- Slows down things like ghc-mod and compile times\r\n- TH splits up the file between splices so you can't use defined in later segments (I ran into this problem when I used to use TH, you can usually find a way around it but it's annoying).\r\n\r\nThat said, `makeLenesFor` could be used on things like `GridLines` and `PlotStyle`. I like how it automatically combines multiple fields into traversals (didn't know it could do that). But the overall code isn't much less  and there's more function names to deal with so I'm still leaning away from using it.\r\n"}}