{"action":"closed","issue":{"url":"https://api.github.com/repos/emilaxelsson/syntactic/issues/20","labels_url":"https://api.github.com/repos/emilaxelsson/syntactic/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/emilaxelsson/syntactic/issues/20/comments","events_url":"https://api.github.com/repos/emilaxelsson/syntactic/issues/20/events","html_url":"https://github.com/emilaxelsson/syntactic/issues/20","id":52143274,"number":20,"title":"Default instances for EvalEnv","user":{"login":"crockeea","id":4899463,"avatar_url":"https://avatars.githubusercontent.com/u/4899463?v=3","gravatar_id":"","url":"https://api.github.com/users/crockeea","html_url":"https://github.com/crockeea","followers_url":"https://api.github.com/users/crockeea/followers","following_url":"https://api.github.com/users/crockeea/following{/other_user}","gists_url":"https://api.github.com/users/crockeea/gists{/gist_id}","starred_url":"https://api.github.com/users/crockeea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crockeea/subscriptions","organizations_url":"https://api.github.com/users/crockeea/orgs","repos_url":"https://api.github.com/users/crockeea/repos","events_url":"https://api.github.com/users/crockeea/events{/privacy}","received_events_url":"https://api.github.com/users/crockeea/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2014-12-16T17:38:27Z","updated_at":"2015-01-08T13:45:40Z","closed_at":"2015-01-08T13:45:40Z","body":"I see [in the docs](http://hackage.haskell.org/package/syntactic-2.0/docs/Data-Syntactic-Interpretation.html#v:equalDefault) that there is support for default instances of several classes, but I don't know of any way to avoid writing manual `EvalEnv` instances.\r\n\r\nFor every domain `Dom`, my instances look like:\r\n\r\n```\r\ndata Dom a where\r\n  A :: i -> Dom (Full a)\r\n  B :: Dom (Full a)\r\n  ...\r\n\r\ninstance EvalEnv Dom env where\r\n  compileSym p x@(A _) = compileSymDefault p x\r\n  compileSym p x@B = compileSymDefault p x\r\n  ...\r\n```\r\n\r\nIt'd be very convenient to not have to write this boilerplate for every domain."}}