{"action":"created","issue":{"url":"https://api.github.com/repos/ekmett/ersatz/issues/10","labels_url":"https://api.github.com/repos/ekmett/ersatz/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/ekmett/ersatz/issues/10/comments","events_url":"https://api.github.com/repos/ekmett/ersatz/issues/10/events","html_url":"https://github.com/ekmett/ersatz/issues/10","id":60045402,"number":10,"title":"Consider a more powerful 'decode'","user":{"login":"ekmett","id":304657,"avatar_url":"https://avatars.githubusercontent.com/u/304657?v=3","gravatar_id":"","url":"https://api.github.com/users/ekmett","html_url":"https://github.com/ekmett","followers_url":"https://api.github.com/users/ekmett/followers","following_url":"https://api.github.com/users/ekmett/following{/other_user}","gists_url":"https://api.github.com/users/ekmett/gists{/gist_id}","starred_url":"https://api.github.com/users/ekmett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ekmett/subscriptions","organizations_url":"https://api.github.com/users/ekmett/orgs","repos_url":"https://api.github.com/users/ekmett/repos","events_url":"https://api.github.com/users/ekmett/events{/privacy}","received_events_url":"https://api.github.com/users/ekmett/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-06T01:28:49Z","updated_at":"2015-03-06T03:09:45Z","closed_at":"2015-03-06T03:09:07Z","body":"We currently use\r\n\r\n```haskell\r\ndecode :: Codec a => Solution -> a -> Maybe (Decoded a)\r\n```\r\n\r\nbut we could upgrade it to\r\n\r\n```haskell\r\ndecode :: (Alternative f, Codec a) => Solution -> a -> f (Decoded a)\r\n```\r\n\r\nThen we'd get the current definition from `f = Maybe`, but the `[]` instance could enumerate solutions, while other `Alternative` instances could might more intelligently."},"comment":{"url":"https://api.github.com/repos/ekmett/ersatz/issues/comments/77499364","html_url":"https://github.com/ekmett/ersatz/issues/10#issuecomment-77499364","issue_url":"https://api.github.com/repos/ekmett/ersatz/issues/10","id":77499364,"user":{"login":"glguy","id":12164,"avatar_url":"https://avatars.githubusercontent.com/u/12164?v=3","gravatar_id":"","url":"https://api.github.com/users/glguy","html_url":"https://github.com/glguy","followers_url":"https://api.github.com/users/glguy/followers","following_url":"https://api.github.com/users/glguy/following{/other_user}","gists_url":"https://api.github.com/users/glguy/gists{/gist_id}","starred_url":"https://api.github.com/users/glguy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glguy/subscriptions","organizations_url":"https://api.github.com/users/glguy/orgs","repos_url":"https://api.github.com/users/glguy/repos","events_url":"https://api.github.com/users/glguy/events{/privacy}","received_events_url":"https://api.github.com/users/glguy/received_events","type":"User","site_admin":false},"created_at":"2015-03-06T03:09:45Z","updated_at":"2015-03-06T03:09:45Z","body":"I imagine we wouldn't be able to enumerate all solutions, but only those that explore possible choices for the unconstrained bits. There might be other solutions that are not compatible with the particular choices made by the prover"}}