{"action":"created","issue":{"url":"https://api.github.com/repos/osa1/ghc/issues/1","labels_url":"https://api.github.com/repos/osa1/ghc/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/osa1/ghc/issues/1/comments","events_url":"https://api.github.com/repos/osa1/ghc/issues/1/events","html_url":"https://github.com/osa1/ghc/pull/1","id":129488012,"number":1,"title":"Add -funbox-strict-sums","user":{"login":"RyanGlScott","id":2364661,"avatar_url":"https://avatars.githubusercontent.com/u/2364661?v=3","gravatar_id":"","url":"https://api.github.com/users/RyanGlScott","html_url":"https://github.com/RyanGlScott","followers_url":"https://api.github.com/users/RyanGlScott/followers","following_url":"https://api.github.com/users/RyanGlScott/following{/other_user}","gists_url":"https://api.github.com/users/RyanGlScott/gists{/gist_id}","starred_url":"https://api.github.com/users/RyanGlScott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RyanGlScott/subscriptions","organizations_url":"https://api.github.com/users/RyanGlScott/orgs","repos_url":"https://api.github.com/users/RyanGlScott/repos","events_url":"https://api.github.com/users/RyanGlScott/events{/privacy}","received_events_url":"https://api.github.com/users/RyanGlScott/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-28T15:44:47Z","updated_at":"2016-01-28T18:59:59Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/osa1/ghc/pulls/1","html_url":"https://github.com/osa1/ghc/pull/1","diff_url":"https://github.com/osa1/ghc/pull/1.diff","patch_url":"https://github.com/osa1/ghc/pull/1.patch"},"body":"I tested this by compiling the following program:\r\n\r\n```haskell\r\n{-# LANGUAGE BangPatterns #-}\r\n{-# LANGUAGE DeriveGeneric #-}\r\n{-# OPTIONS_GHC -O2 -ddump-deriv #-}\r\nmodule Example where\r\n\r\nimport GHC.Generics\r\n\r\ndata MyEither a b = MyLeft a | MyRight b\r\n\r\ndata T = MkT !(MyEither Int Int) !(MyEither Int Int)\r\n  deriving Generic\r\n```\r\n\r\nwith and without `-funbox-strict-sums`, and the output of `-ddump-deriv` confirms that it's `T` is `DecidedStrict` and `DecidedUnpack`, respectively.\r\n\r\nPlease check that there isn't some other place where unboxed sums can sneak through with `-O2` on."},"comment":{"url":"https://api.github.com/repos/osa1/ghc/issues/comments/176340573","html_url":"https://github.com/osa1/ghc/pull/1#issuecomment-176340573","issue_url":"https://api.github.com/repos/osa1/ghc/issues/1","id":176340573,"user":{"login":"osa1","id":448274,"avatar_url":"https://avatars.githubusercontent.com/u/448274?v=3","gravatar_id":"","url":"https://api.github.com/users/osa1","html_url":"https://github.com/osa1","followers_url":"https://api.github.com/users/osa1/followers","following_url":"https://api.github.com/users/osa1/following{/other_user}","gists_url":"https://api.github.com/users/osa1/gists{/gist_id}","starred_url":"https://api.github.com/users/osa1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/osa1/subscriptions","organizations_url":"https://api.github.com/users/osa1/orgs","repos_url":"https://api.github.com/users/osa1/repos","events_url":"https://api.github.com/users/osa1/events{/privacy}","received_events_url":"https://api.github.com/users/osa1/received_events","type":"User","site_admin":false},"created_at":"2016-01-28T18:59:59Z","updated_at":"2016-01-28T18:59:59Z","body":"This looks good to me. We actually need some more flags for setting the automatic unboxing threshold to be able to say things like \"automatically unpack sum types only if the size is lesser than this threashold\" etc. @rrnewton @tibbe what other flags do we need here?\r\n\r\nWhen @rrnewton posts his notes we can also take a look, IIRC we discussed this at the meeting briefly."}}