{"comment":{"url":"https://api.github.com/repos/wemrysi/quasar/comments/14571610","html_url":"https://github.com/wemrysi/quasar/commit/995ca02379af94943dd571ed062c604aaf759093#commitcomment-14571610","id":14571610,"user":{"login":"sellout","id":33031,"avatar_url":"https://avatars.githubusercontent.com/u/33031?v=3","gravatar_id":"","url":"https://api.github.com/users/sellout","html_url":"https://github.com/sellout","followers_url":"https://api.github.com/users/sellout/followers","following_url":"https://api.github.com/users/sellout/following{/other_user}","gists_url":"https://api.github.com/users/sellout/gists{/gist_id}","starred_url":"https://api.github.com/users/sellout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sellout/subscriptions","organizations_url":"https://api.github.com/users/sellout/orgs","repos_url":"https://api.github.com/users/sellout/repos","events_url":"https://api.github.com/users/sellout/events{/privacy}","received_events_url":"https://api.github.com/users/sellout/received_events","type":"User","site_admin":false},"position":101,"line":87,"path":"core/src/main/scala/quasar/EnvironmentError.scala","commit_id":"995ca02379af94943dd571ed062c604aaf759093","created_at":"2015-11-23T20:37:00Z","updated_at":"2015-11-23T20:37:00Z","body":"Ah, sorry – I meant to link to the library, but then got distracted: http://hackage.haskell.org/package/total-1.0.4/docs/Lens-Family-Total.html – but it seems like it’s too weak/hacky to work for us.\r\n\r\nSo … (once I finish 😭 about sum types again) I feel like the best option is\r\n\r\n1. case classes in the usual place (not in `object Case`), with private constructors, so we can pattern match exhaustively,\r\n2. `val` “constructors” as you’ve added here, but I guess they’ll need to be named lowercase, and\r\n3. and then the prisms, which … need another naming convention?\r\n\r\nAt least it’s no more code than is already here, but still: 😭\r\n\r\nAlso, I don’t think it has to be fixed in this PR, but we do have to come to _some_ consensus about sum types."}}