{"action":"created","issue":{"url":"https://api.github.com/repos/pcapriotti/optparse-applicative/issues/125","labels_url":"https://api.github.com/repos/pcapriotti/optparse-applicative/issues/125/labels{/name}","comments_url":"https://api.github.com/repos/pcapriotti/optparse-applicative/issues/125/comments","events_url":"https://api.github.com/repos/pcapriotti/optparse-applicative/issues/125/events","html_url":"https://github.com/pcapriotti/optparse-applicative/pull/125","id":56858882,"number":125,"title":"Remove PaserM","user":{"login":"larskuhtz","id":1369810,"avatar_url":"https://avatars.githubusercontent.com/u/1369810?v=3","gravatar_id":"","url":"https://api.github.com/users/larskuhtz","html_url":"https://github.com/larskuhtz","followers_url":"https://api.github.com/users/larskuhtz/followers","following_url":"https://api.github.com/users/larskuhtz/following{/other_user}","gists_url":"https://api.github.com/users/larskuhtz/gists{/gist_id}","starred_url":"https://api.github.com/users/larskuhtz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larskuhtz/subscriptions","organizations_url":"https://api.github.com/users/larskuhtz/orgs","repos_url":"https://api.github.com/users/larskuhtz/repos","events_url":"https://api.github.com/users/larskuhtz/events{/privacy}","received_events_url":"https://api.github.com/users/larskuhtz/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-02-06T19:49:10Z","updated_at":"2015-02-07T11:59:57Z","closed_at":"2015-02-07T11:59:57Z","pull_request":{"url":"https://api.github.com/repos/pcapriotti/optparse-applicative/pulls/125","html_url":"https://github.com/pcapriotti/optparse-applicative/pull/125","diff_url":"https://github.com/pcapriotti/optparse-applicative/pull/125.diff","patch_url":"https://github.com/pcapriotti/optparse-applicative/pull/125.patch"},"body":"I don't expect this PR to be merged upstream. The main motivation for PR is to understand the reason for the existence of `PaserM` and `BindP`.\r\n\r\nI understand that there may be situations where it is convenient to have monadic bind when writing parsers. However, having used optparse-applicative a lot in many projects, I never encountered a situation where I actually ended up using `PaserM`.\r\n\r\nI find that the current code in `Options.Applicative.Types` is difficult to understand due to the circular (and as it seems to me redundant) dependency between `PaserM` and the `Alternative` instance of `Parser`. Also it feels like `MultP` shouldn't be needed in the presence of `BindP`.\r\n\r\nThis PR completely removes `ParserM` and `fromM`, `oneM`, `manyM`, `someM`. So it's an API change that may break existing code. But even with `ParserM`, I wonder why it is used in the implementation of `Alternative` for `Parser`, and why `BindP` and `MultP` are kept both."},"comment":{"url":"https://api.github.com/repos/pcapriotti/optparse-applicative/issues/comments/73361441","html_url":"https://github.com/pcapriotti/optparse-applicative/pull/125#issuecomment-73361441","issue_url":"https://api.github.com/repos/pcapriotti/optparse-applicative/issues/125","id":73361441,"user":{"login":"pcapriotti","id":2141,"avatar_url":"https://avatars.githubusercontent.com/u/2141?v=3","gravatar_id":"","url":"https://api.github.com/users/pcapriotti","html_url":"https://github.com/pcapriotti","followers_url":"https://api.github.com/users/pcapriotti/followers","following_url":"https://api.github.com/users/pcapriotti/following{/other_user}","gists_url":"https://api.github.com/users/pcapriotti/gists{/gist_id}","starred_url":"https://api.github.com/users/pcapriotti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pcapriotti/subscriptions","organizations_url":"https://api.github.com/users/pcapriotti/orgs","repos_url":"https://api.github.com/users/pcapriotti/repos","events_url":"https://api.github.com/users/pcapriotti/events{/privacy}","received_events_url":"https://api.github.com/users/pcapriotti/received_events","type":"User","site_admin":false},"created_at":"2015-02-07T11:59:57Z","updated_at":"2015-02-07T11:59:57Z","body":"Yeah, the `BindP` stuff is there to make `many` and `some` work. I know that the documentation says that every implementation must be equal to the default one, but that cannot possibly be achieved in this case. But I don't want to define separate functions `many'` and `some'`, so I think this is a necessary evil.\r\n\r\nSee also the discussion [here](http://www.reddit.com/r/haskell/comments/2j8bvl/laws_of_some_and_many/)."}}