{"action":"opened","number":2056,"pull_request":{"url":"https://api.github.com/repos/fpco/stackage/pulls/2056","id":93439759,"html_url":"https://github.com/fpco/stackage/pull/2056","diff_url":"https://github.com/fpco/stackage/pull/2056.diff","patch_url":"https://github.com/fpco/stackage/pull/2056.patch","issue_url":"https://api.github.com/repos/fpco/stackage/issues/2056","number":2056,"state":"open","locked":false,"title":"Add show-prettyprint","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},"body":"Prettyprint `Show` output\r\n=========================\r\n\r\nOutput of nested data structures by `Show` instances is often very hard to read.\r\nThis package offers a simple function to insert line breaks and indentation into\r\nthat ouput so that the semantics are unchanged, but makes it *much* easier to\r\nread.\r\n\r\nThe package does not rely on a parser for actual Haskell; instead, it merely\r\nreacts on parentheses, commas and the like. This makes it fairly robust even in\r\nthe face of invalid `Show` instances, that may not produce valid Haskell code.\r\n\r\n\r\n\r\n## Examples\r\n\r\n### Artificial\r\n\r\n```haskell\r\nHello Foo (\"(Bar\", Haha) (Baz (A { foo = C, bar = D, qux = (E,\"He)llo World!\",G,\r\n    H,[A,B,c,d,e,Fghi]) } ) (B,C) [Baz A1 B2, (Baz A3 (B4)), (Baz A5 (B6)), (Baz\r\n    (A7) B8)]) (Foo) (Bar) (Baz (A) (B))\r\n\r\n==>\r\n\r\nHello Foo (\"(Bar\",Haha)\r\n          (Baz (A {foo = C\r\n                  ,bar = D\r\n                  ,qux = (E\r\n                         ,\"He)llo World!\"\r\n                         ,G\r\n                         ,H\r\n                         ,[A,B,c,d,e,Fghi])})\r\n               (B,C)\r\n               [Baz A1 B2\r\n               ,(Baz A3 (B4))\r\n               ,(Baz A5 (B6))\r\n               ,(Baz (A7) B8)])\r\n          (Foo)\r\n          (Bar)\r\n          (Baz (A) (B))\r\n```\r\n\r\n### Inspired by a real AST\r\n\r\n```haskell\r\nSet  (fromList [(Name \"A string with (parenthesis\",Ann  (Entry (Quality 1 1)\r\n    (Ann  False) (Ann  (Map [Ann  (Bound (Ann  (Id \"lorem\"))),Ann  (Variable\r\n    (Ann  (Id \"ipsum\")))])))),(Name \"string\",Ann  (Entry (Quality 1 1) (Ann\r\n    True) (Ann  (Internal (Ann  (Reduce (Ann  (Id \"dolor\")) (Ann  (Id \"sit\")))))\r\n    ))),(Name \"Another } here\",Ann  (Entry (Quality 1 1) (Ann  (Or [Ann  (Not\r\n    (Ann  (Is (Ann  Flagged) (Ann  Type) (Ann  (Multi [Ann  (Literal (Ann  One))\r\n    ]))))),Ann  (Is (Ann  Flagged) (Ann  Type) (Ann  (Multi [Ann  (Literal (Ann\r\n    Three))]))),Ann  (Is (Ann  Flagged) (Ann  Type) (Ann  (Multi [Ann  (Literal\r\n    (Ann  Two))])))])) (Ann  (Internal (Ann  (Concat (Ann  (Id \"amet\"))))))))])\r\n\r\n==>\r\n\r\nSet (fromList [(Name \"A string with (parenthesis\"\r\n               ,Ann (Entry (Quality 1 1)\r\n                           (Ann False)\r\n                           (Ann (Map [Ann (Bound (Ann (Id \"lorem\")))\r\n                                     ,Ann (Variable (Ann (Id \"ipsum\")))]))))\r\n              ,(Name \"string\"\r\n               ,Ann (Entry (Quality 1 1)\r\n                           (Ann True)\r\n                           (Ann (Internal (Ann (Reduce (Ann (Id \"dolor\"))\r\n                                                       (Ann (Id \"sit\"))))))))\r\n              ,(Name \"Another } here\"\r\n               ,Ann (Entry (Quality 1 1)\r\n                           (Ann (Or [Ann (Not (Ann (Is (Ann Flagged)\r\n                                                       (Ann Type)\r\n                                                       (Ann (Multi [Ann (Literal (Ann One))])))))\r\n                                    ,Ann (Is (Ann Flagged)\r\n                                             (Ann Type)\r\n                                             (Ann (Multi [Ann (Literal (Ann Three))])))\r\n                                    ,Ann (Is (Ann Flagged)\r\n                                             (Ann Type)\r\n                                             (Ann (Multi [Ann (Literal (Ann Two))])))]))\r\n                           (Ann (Internal (Ann (Concat (Ann (Id \"amet\"))))))))])\r\n```\r\n","created_at":"2016-11-12T13:58:14Z","updated_at":"2016-11-12T13:58:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dbd932abea03e86af56d9d98816264abd796e6b4","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/fpco/stackage/pulls/2056/commits","review_comments_url":"https://api.github.com/repos/fpco/stackage/pulls/2056/comments","review_comment_url":"https://api.github.com/repos/fpco/stackage/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fpco/stackage/issues/2056/comments","statuses_url":"https://api.github.com/repos/fpco/stackage/statuses/e182ab1f783336c74a9660b3ce3ba3c64b11bc88","head":{"label":"quchen:show-prettyprint","ref":"show-prettyprint","sha":"e182ab1f783336c74a9660b3ce3ba3c64b11bc88","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},"repo":{"id":48296968,"name":"stackage","full_name":"quchen/stackage","owner":{"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},"private":false,"html_url":"https://github.com/quchen/stackage","description":"\"Stable Hackage,\" tools for creating a vetted set of packages from Hackage.","fork":true,"url":"https://api.github.com/repos/quchen/stackage","forks_url":"https://api.github.com/repos/quchen/stackage/forks","keys_url":"https://api.github.com/repos/quchen/stackage/keys{/key_id}","collaborators_url":"https://api.github.com/repos/quchen/stackage/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/quchen/stackage/teams","hooks_url":"https://api.github.com/repos/quchen/stackage/hooks","issue_events_url":"https://api.github.com/repos/quchen/stackage/issues/events{/number}","events_url":"https://api.github.com/repos/quchen/stackage/events","assignees_url":"https://api.github.com/repos/quchen/stackage/assignees{/user}","branches_url":"https://api.github.com/repos/quchen/stackage/branches{/branch}","tags_url":"https://api.github.com/repos/quchen/stackage/tags","blobs_url":"https://api.github.com/repos/quchen/stackage/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/quchen/stackage/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/quchen/stackage/git/refs{/sha}","trees_url":"https://api.github.com/repos/quchen/stackage/git/trees{/sha}","statuses_url":"https://api.github.com/repos/quchen/stackage/statuses/{sha}","languages_url":"https://api.github.com/repos/quchen/stackage/languages","stargazers_url":"https://api.github.com/repos/quchen/stackage/stargazers","contributors_url":"https://api.github.com/repos/quchen/stackage/contributors","subscribers_url":"https://api.github.com/repos/quchen/stackage/subscribers","subscription_url":"https://api.github.com/repos/quchen/stackage/subscription","commits_url":"https://api.github.com/repos/quchen/stackage/commits{/sha}","git_commits_url":"https://api.github.com/repos/quchen/stackage/git/commits{/sha}","comments_url":"https://api.github.com/repos/quchen/stackage/comments{/number}","issue_comment_url":"https://api.github.com/repos/quchen/stackage/issues/comments{/number}","contents_url":"https://api.github.com/repos/quchen/stackage/contents/{+path}","compare_url":"https://api.github.com/repos/quchen/stackage/compare/{base}...{head}","merges_url":"https://api.github.com/repos/quchen/stackage/merges","archive_url":"https://api.github.com/repos/quchen/stackage/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/quchen/stackage/downloads","issues_url":"https://api.github.com/repos/quchen/stackage/issues{/number}","pulls_url":"https://api.github.com/repos/quchen/stackage/pulls{/number}","milestones_url":"https://api.github.com/repos/quchen/stackage/milestones{/number}","notifications_url":"https://api.github.com/repos/quchen/stackage/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/quchen/stackage/labels{/name}","releases_url":"https://api.github.com/repos/quchen/stackage/releases{/id}","deployments_url":"https://api.github.com/repos/quchen/stackage/deployments","created_at":"2015-12-19T20:59:52Z","updated_at":"2016-11-12T13:55:19Z","pushed_at":"2016-11-12T13:57:25Z","git_url":"git://github.com/quchen/stackage.git","ssh_url":"git@github.com:quchen/stackage.git","clone_url":"https://github.com/quchen/stackage.git","svn_url":"https://github.com/quchen/stackage","homepage":null,"size":3064,"stargazers_count":0,"watchers_count":0,"language":"Shell","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"fpco:master","ref":"master","sha":"75b299eca52cda562bc83b8d6557965966b980a6","user":{"login":"fpco","id":2163372,"avatar_url":"https://avatars.githubusercontent.com/u/2163372?v=3","gravatar_id":"","url":"https://api.github.com/users/fpco","html_url":"https://github.com/fpco","followers_url":"https://api.github.com/users/fpco/followers","following_url":"https://api.github.com/users/fpco/following{/other_user}","gists_url":"https://api.github.com/users/fpco/gists{/gist_id}","starred_url":"https://api.github.com/users/fpco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fpco/subscriptions","organizations_url":"https://api.github.com/users/fpco/orgs","repos_url":"https://api.github.com/users/fpco/repos","events_url":"https://api.github.com/users/fpco/events{/privacy}","received_events_url":"https://api.github.com/users/fpco/received_events","type":"Organization","site_admin":false},"repo":{"id":6774018,"name":"stackage","full_name":"fpco/stackage","owner":{"login":"fpco","id":2163372,"avatar_url":"https://avatars.githubusercontent.com/u/2163372?v=3","gravatar_id":"","url":"https://api.github.com/users/fpco","html_url":"https://github.com/fpco","followers_url":"https://api.github.com/users/fpco/followers","following_url":"https://api.github.com/users/fpco/following{/other_user}","gists_url":"https://api.github.com/users/fpco/gists{/gist_id}","starred_url":"https://api.github.com/users/fpco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fpco/subscriptions","organizations_url":"https://api.github.com/users/fpco/orgs","repos_url":"https://api.github.com/users/fpco/repos","events_url":"https://api.github.com/users/fpco/events{/privacy}","received_events_url":"https://api.github.com/users/fpco/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fpco/stackage","description":"\"Stable Hackage\": vetted consistent packages from Hackage","fork":false,"url":"https://api.github.com/repos/fpco/stackage","forks_url":"https://api.github.com/repos/fpco/stackage/forks","keys_url":"https://api.github.com/repos/fpco/stackage/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fpco/stackage/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fpco/stackage/teams","hooks_url":"https://api.github.com/repos/fpco/stackage/hooks","issue_events_url":"https://api.github.com/repos/fpco/stackage/issues/events{/number}","events_url":"https://api.github.com/repos/fpco/stackage/events","assignees_url":"https://api.github.com/repos/fpco/stackage/assignees{/user}","branches_url":"https://api.github.com/repos/fpco/stackage/branches{/branch}","tags_url":"https://api.github.com/repos/fpco/stackage/tags","blobs_url":"https://api.github.com/repos/fpco/stackage/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fpco/stackage/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fpco/stackage/git/refs{/sha}","trees_url":"https://api.github.com/repos/fpco/stackage/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fpco/stackage/statuses/{sha}","languages_url":"https://api.github.com/repos/fpco/stackage/languages","stargazers_url":"https://api.github.com/repos/fpco/stackage/stargazers","contributors_url":"https://api.github.com/repos/fpco/stackage/contributors","subscribers_url":"https://api.github.com/repos/fpco/stackage/subscribers","subscription_url":"https://api.github.com/repos/fpco/stackage/subscription","commits_url":"https://api.github.com/repos/fpco/stackage/commits{/sha}","git_commits_url":"https://api.github.com/repos/fpco/stackage/git/commits{/sha}","comments_url":"https://api.github.com/repos/fpco/stackage/comments{/number}","issue_comment_url":"https://api.github.com/repos/fpco/stackage/issues/comments{/number}","contents_url":"https://api.github.com/repos/fpco/stackage/contents/{+path}","compare_url":"https://api.github.com/repos/fpco/stackage/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fpco/stackage/merges","archive_url":"https://api.github.com/repos/fpco/stackage/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fpco/stackage/downloads","issues_url":"https://api.github.com/repos/fpco/stackage/issues{/number}","pulls_url":"https://api.github.com/repos/fpco/stackage/pulls{/number}","milestones_url":"https://api.github.com/repos/fpco/stackage/milestones{/number}","notifications_url":"https://api.github.com/repos/fpco/stackage/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fpco/stackage/labels{/name}","releases_url":"https://api.github.com/repos/fpco/stackage/releases{/id}","deployments_url":"https://api.github.com/repos/fpco/stackage/deployments","created_at":"2012-11-20T07:41:30Z","updated_at":"2016-11-12T01:51:52Z","pushed_at":"2016-11-12T13:58:14Z","git_url":"git://github.com/fpco/stackage.git","ssh_url":"git@github.com:fpco/stackage.git","clone_url":"https://github.com/fpco/stackage.git","svn_url":"https://github.com/fpco/stackage","homepage":"https://www.stackage.org/","size":4567,"stargazers_count":261,"watchers_count":261,"language":"Shell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":433,"mirror_url":null,"open_issues_count":23,"forks":433,"open_issues":23,"watchers":261,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fpco/stackage/pulls/2056"},"html":{"href":"https://github.com/fpco/stackage/pull/2056"},"issue":{"href":"https://api.github.com/repos/fpco/stackage/issues/2056"},"comments":{"href":"https://api.github.com/repos/fpco/stackage/issues/2056/comments"},"review_comments":{"href":"https://api.github.com/repos/fpco/stackage/pulls/2056/comments"},"review_comment":{"href":"https://api.github.com/repos/fpco/stackage/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fpco/stackage/pulls/2056/commits"},"statuses":{"href":"https://api.github.com/repos/fpco/stackage/statuses/e182ab1f783336c74a9660b3ce3ba3c64b11bc88"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":0,"review_comments":0,"commits":2,"additions":3,"deletions":2,"changed_files":1}}
{"actor":{"display_login":"quchen"}}