{"action":"created","issue":{"url":"https://api.github.com/repos/haskell/rfcs/issues/7","repository_url":"https://api.github.com/repos/haskell/rfcs","labels_url":"https://api.github.com/repos/haskell/rfcs/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/haskell/rfcs/issues/7/comments","events_url":"https://api.github.com/repos/haskell/rfcs/issues/7/events","html_url":"https://github.com/haskell/rfcs/pull/7","id":170205549,"number":7,"title":"Add BangPatterns","user":{"login":"quchen","id":3020161,"avatar_url":"https://avatars.githubusercontent.com/u/3020161?v=3","gravatar_id":"","url":"https://api.github.com/users/quchen","html_url":"https://github.com/quchen","followers_url":"https://api.github.com/users/quchen/followers","following_url":"https://api.github.com/users/quchen/following{/other_user}","gists_url":"https://api.github.com/users/quchen/gists{/gist_id}","starred_url":"https://api.github.com/users/quchen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quchen/subscriptions","organizations_url":"https://api.github.com/users/quchen/orgs","repos_url":"https://api.github.com/users/quchen/repos","events_url":"https://api.github.com/users/quchen/events{/privacy}","received_events_url":"https://api.github.com/users/quchen/received_events","type":"User","site_admin":false},"labels":[{"id":412925644,"url":"https://api.github.com/repos/haskell/rfcs/labels/::%20Syntax","name":":: Syntax","color":"bfdadc","default":false},{"id":423686283,"url":"https://api.github.com/repos/haskell/rfcs/labels/B%20-%20Minor%20breakage","name":"B - Minor breakage","color":"fee7e1","default":false},{"id":412925622,"url":"https://api.github.com/repos/haskell/rfcs/labels/GHC%20extension","name":"GHC extension","color":"c2e0c6","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":24,"created_at":"2016-08-09T16:02:36Z","updated_at":"2016-11-02T04:53:53Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/haskell/rfcs/pulls/7","html_url":"https://github.com/haskell/rfcs/pull/7","diff_url":"https://github.com/haskell/rfcs/pull/7.diff","patch_url":"https://github.com/haskell/rfcs/pull/7.patch"},"body":"Rendered version: https://github.com/quchen/rfcs/blob/bang-patterns/texts/0000-bang-patterns.rst\n"},"comment":{"url":"https://api.github.com/repos/haskell/rfcs/issues/comments/257772346","html_url":"https://github.com/haskell/rfcs/pull/7#issuecomment-257772346","issue_url":"https://api.github.com/repos/haskell/rfcs/issues/7","id":257772346,"user":{"login":"wrengr","id":2998727,"avatar_url":"https://avatars.githubusercontent.com/u/2998727?v=3","gravatar_id":"","url":"https://api.github.com/users/wrengr","html_url":"https://github.com/wrengr","followers_url":"https://api.github.com/users/wrengr/followers","following_url":"https://api.github.com/users/wrengr/following{/other_user}","gists_url":"https://api.github.com/users/wrengr/gists{/gist_id}","starred_url":"https://api.github.com/users/wrengr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wrengr/subscriptions","organizations_url":"https://api.github.com/users/wrengr/orgs","repos_url":"https://api.github.com/users/wrengr/repos","events_url":"https://api.github.com/users/wrengr/events{/privacy}","received_events_url":"https://api.github.com/users/wrengr/received_events","type":"User","site_admin":false},"created_at":"2016-11-02T04:53:53Z","updated_at":"2016-11-02T04:53:53Z","body":"> I think we should certainly standardize bang patterns on function arguments, with the proviso that they can only be applied to variable patterns, as this is the only situation where they make sense.\r\n\r\nAt the very least, I think this is something we can all agree on? Are there any outstanding issues about committing to this part of the proposal (and leaving the strict-binding discussion for another time)? If not, @quchen did you want to revise the pr or should I?\r\n\r\nOne issue which came up at ICFP but hasn't been discussed here —and which isn't necessarily a \"problem\" but which I think should be explicitly discussed in the report— is how to handle partial application, especially vis a vis bang patterns on the arguments to data constructors. That is, given a data type `data T a b = D !a b` one might be led to believe that forcing `(D a)` will force `a`, when in fact (in GHC) the forcing of banged arguments to data constructors only occurs once the constructor is fully saturated. Similar issues arise with partially applied functions, though one might be less inclined to expect the partial application to force anything there. Personally, my main concerns here are: (a) that data constructors and non-constructor functions behave the same in terms of when the forcing happens (which they currently do in GHC), and (b) that the report is clear about what is expected here.\r\n\r\n> If we do go ahead with strict bindings, and a different notation, I think the annotation should be on the actual binding, not the let or where keyword, as it is quite likely that some bindings would be strict, and others not, and it would be nice to mix these in a single declaration block.\r\n\r\n+1."}}
{"actor":{"display_login":"wrengr"}}