{"action":"created","comment":{"url":"https://api.github.com/repos/haskell/cabal/pulls/comments/72876411","id":72876411,"diff_hunk":"@@ -0,0 +1,64 @@\n+-- | Module containing small types\n+module Distribution.Parsec.Types.Common (\n+    -- * Diagnostics\n+    PError (..),\n+    PWarning (..),\n+    showPWarning,\n+    -- * Field parser\n+    FieldParser (..),\n+    -- * Position\n+    Position (..),\n+    incPos,\n+    retPos,\n+    showPos,\n+    ) where\n+\n+import Prelude ()\n+import Distribution.Compat.Prelude\n+\n+import System.FilePath (normalise)\n+\n+import qualified Data.ByteString as BS\n+import qualified Text.Parsec as Parsec\n+\n+data PError = PError Position String\n+    deriving (Show)\n+data PWarning = PWarning Position String\n+    deriving (Show)\n+\n+ -- TODO: showPerror, remove Show instan\n+ --\n+showPWarning :: FilePath -> PWarning -> String\n+showPWarning fpath (PWarning pos msg) =\n+  normalise fpath ++ \": \" ++ show pos ++ msg\n+\n+-------------------------------------------------------------------------------\n+-- Field parser\n+-------------------------------------------------------------------------------\n+\n+data FieldParser a","path":"Cabal/Distribution/Parsec/Types/Common.hs","position":39,"original_position":39,"commit_id":"a1068b79acea0f52324f70c3f8db1fb67eb27603","original_commit_id":"a1068b79acea0f52324f70c3f8db1fb67eb27603","user":{"login":"phadej","id":51087,"avatar_url":"https://avatars.githubusercontent.com/u/51087?v=3","gravatar_id":"","url":"https://api.github.com/users/phadej","html_url":"https://github.com/phadej","followers_url":"https://api.github.com/users/phadej/followers","following_url":"https://api.github.com/users/phadej/following{/other_user}","gists_url":"https://api.github.com/users/phadej/gists{/gist_id}","starred_url":"https://api.github.com/users/phadej/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phadej/subscriptions","organizations_url":"https://api.github.com/users/phadej/orgs","repos_url":"https://api.github.com/users/phadej/repos","events_url":"https://api.github.com/users/phadej/events{/privacy}","received_events_url":"https://api.github.com/users/phadej/received_events","type":"User","site_admin":false},"body":"Would something like:\r\n> `FieldParser` is a variant of  `Stream s Identity Char => Parsec s [PWarning] a` restricted to either ByteString (ascii) or String (utf8) streams\r\n\r\ndo?","created_at":"2016-07-30T00:01:40Z","updated_at":"2016-07-30T00:01:40Z","html_url":"https://github.com/haskell/cabal/pull/3602#discussion_r72876411","pull_request_url":"https://api.github.com/repos/haskell/cabal/pulls/3602","_links":{"self":{"href":"https://api.github.com/repos/haskell/cabal/pulls/comments/72876411"},"html":{"href":"https://github.com/haskell/cabal/pull/3602#discussion_r72876411"},"pull_request":{"href":"https://api.github.com/repos/haskell/cabal/pulls/3602"}}},"pull_request":{"url":"https://api.github.com/repos/haskell/cabal/pulls/3602","id":78572388,"html_url":"https://github.com/haskell/cabal/pull/3602","diff_url":"https://github.com/haskell/cabal/pull/3602.diff","patch_url":"https://github.com/haskell/cabal/pull/3602.patch","issue_url":"https://api.github.com/repos/haskell/cabal/issues/3602","number":3602,"state":"open","locked":false,"title":"WIP: Parsec parser","user":{"login":"phadej","id":51087,"avatar_url":"https://avatars.githubusercontent.com/u/51087?v=3","gravatar_id":"","url":"https://api.github.com/users/phadej","html_url":"https://github.com/phadej","followers_url":"https://api.github.com/users/phadej/followers","following_url":"https://api.github.com/users/phadej/following{/other_user}","gists_url":"https://api.github.com/users/phadej/gists{/gist_id}","starred_url":"https://api.github.com/users/phadej/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phadej/subscriptions","organizations_url":"https://api.github.com/users/phadej/orgs","repos_url":"https://api.github.com/users/phadej/repos","events_url":"https://api.github.com/users/phadej/events{/privacy}","received_events_url":"https://api.github.com/users/phadej/received_events","type":"User","site_admin":false},"body":"types are in places, values are `undefined`.\r\n\r\nTODO (not exhaustive):\r\n- [ ] test for tab warning\r\n- [ ] test for bom warning","created_at":"2016-07-23T13:37:21Z","updated_at":"2016-07-30T00:01:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"45e0d4a865fb5a159688743d07263c6eadfb2867","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/haskell/cabal/pulls/3602/commits","review_comments_url":"https://api.github.com/repos/haskell/cabal/pulls/3602/comments","review_comment_url":"https://api.github.com/repos/haskell/cabal/pulls/comments{/number}","comments_url":"https://api.github.com/repos/haskell/cabal/issues/3602/comments","statuses_url":"https://api.github.com/repos/haskell/cabal/statuses/a1068b79acea0f52324f70c3f8db1fb67eb27603","head":{"label":"phadej:parsec-parser","ref":"parsec-parser","sha":"a1068b79acea0f52324f70c3f8db1fb67eb27603","user":{"login":"phadej","id":51087,"avatar_url":"https://avatars.githubusercontent.com/u/51087?v=3","gravatar_id":"","url":"https://api.github.com/users/phadej","html_url":"https://github.com/phadej","followers_url":"https://api.github.com/users/phadej/followers","following_url":"https://api.github.com/users/phadej/following{/other_user}","gists_url":"https://api.github.com/users/phadej/gists{/gist_id}","starred_url":"https://api.github.com/users/phadej/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phadej/subscriptions","organizations_url":"https://api.github.com/users/phadej/orgs","repos_url":"https://api.github.com/users/phadej/repos","events_url":"https://api.github.com/users/phadej/events{/privacy}","received_events_url":"https://api.github.com/users/phadej/received_events","type":"User","site_admin":false},"repo":{"id":36499666,"name":"cabal","full_name":"phadej/cabal","owner":{"login":"phadej","id":51087,"avatar_url":"https://avatars.githubusercontent.com/u/51087?v=3","gravatar_id":"","url":"https://api.github.com/users/phadej","html_url":"https://github.com/phadej","followers_url":"https://api.github.com/users/phadej/followers","following_url":"https://api.github.com/users/phadej/following{/other_user}","gists_url":"https://api.github.com/users/phadej/gists{/gist_id}","starred_url":"https://api.github.com/users/phadej/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phadej/subscriptions","organizations_url":"https://api.github.com/users/phadej/orgs","repos_url":"https://api.github.com/users/phadej/repos","events_url":"https://api.github.com/users/phadej/events{/privacy}","received_events_url":"https://api.github.com/users/phadej/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/phadej/cabal","description":"Official upstream development repository for Cabal and cabal-install","fork":true,"url":"https://api.github.com/repos/phadej/cabal","forks_url":"https://api.github.com/repos/phadej/cabal/forks","keys_url":"https://api.github.com/repos/phadej/cabal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/phadej/cabal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/phadej/cabal/teams","hooks_url":"https://api.github.com/repos/phadej/cabal/hooks","issue_events_url":"https://api.github.com/repos/phadej/cabal/issues/events{/number}","events_url":"https://api.github.com/repos/phadej/cabal/events","assignees_url":"https://api.github.com/repos/phadej/cabal/assignees{/user}","branches_url":"https://api.github.com/repos/phadej/cabal/branches{/branch}","tags_url":"https://api.github.com/repos/phadej/cabal/tags","blobs_url":"https://api.github.com/repos/phadej/cabal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/phadej/cabal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/phadej/cabal/git/refs{/sha}","trees_url":"https://api.github.com/repos/phadej/cabal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/phadej/cabal/statuses/{sha}","languages_url":"https://api.github.com/repos/phadej/cabal/languages","stargazers_url":"https://api.github.com/repos/phadej/cabal/stargazers","contributors_url":"https://api.github.com/repos/phadej/cabal/contributors","subscribers_url":"https://api.github.com/repos/phadej/cabal/subscribers","subscription_url":"https://api.github.com/repos/phadej/cabal/subscription","commits_url":"https://api.github.com/repos/phadej/cabal/commits{/sha}","git_commits_url":"https://api.github.com/repos/phadej/cabal/git/commits{/sha}","comments_url":"https://api.github.com/repos/phadej/cabal/comments{/number}","issue_comment_url":"https://api.github.com/repos/phadej/cabal/issues/comments{/number}","contents_url":"https://api.github.com/repos/phadej/cabal/contents/{+path}","compare_url":"https://api.github.com/repos/phadej/cabal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/phadej/cabal/merges","archive_url":"https://api.github.com/repos/phadej/cabal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/phadej/cabal/downloads","issues_url":"https://api.github.com/repos/phadej/cabal/issues{/number}","pulls_url":"https://api.github.com/repos/phadej/cabal/pulls{/number}","milestones_url":"https://api.github.com/repos/phadej/cabal/milestones{/number}","notifications_url":"https://api.github.com/repos/phadej/cabal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/phadej/cabal/labels{/name}","releases_url":"https://api.github.com/repos/phadej/cabal/releases{/id}","deployments_url":"https://api.github.com/repos/phadej/cabal/deployments","created_at":"2015-05-29T11:15:23Z","updated_at":"2016-07-04T19:43:01Z","pushed_at":"2016-07-29T22:48:44Z","git_url":"git://github.com/phadej/cabal.git","ssh_url":"git@github.com:phadej/cabal.git","clone_url":"https://github.com/phadej/cabal.git","svn_url":"https://github.com/phadej/cabal","homepage":"http://haskell.org/cabal","size":21898,"stargazers_count":0,"watchers_count":0,"language":"Haskell","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":"haskell:master","ref":"master","sha":"9fea99deafdc8944053a290e8c417e357f8093e5","user":{"login":"haskell","id":450574,"avatar_url":"https://avatars.githubusercontent.com/u/450574?v=3","gravatar_id":"","url":"https://api.github.com/users/haskell","html_url":"https://github.com/haskell","followers_url":"https://api.github.com/users/haskell/followers","following_url":"https://api.github.com/users/haskell/following{/other_user}","gists_url":"https://api.github.com/users/haskell/gists{/gist_id}","starred_url":"https://api.github.com/users/haskell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haskell/subscriptions","organizations_url":"https://api.github.com/users/haskell/orgs","repos_url":"https://api.github.com/users/haskell/repos","events_url":"https://api.github.com/users/haskell/events{/privacy}","received_events_url":"https://api.github.com/users/haskell/received_events","type":"Organization","site_admin":false},"repo":{"id":3728161,"name":"cabal","full_name":"haskell/cabal","owner":{"login":"haskell","id":450574,"avatar_url":"https://avatars.githubusercontent.com/u/450574?v=3","gravatar_id":"","url":"https://api.github.com/users/haskell","html_url":"https://github.com/haskell","followers_url":"https://api.github.com/users/haskell/followers","following_url":"https://api.github.com/users/haskell/following{/other_user}","gists_url":"https://api.github.com/users/haskell/gists{/gist_id}","starred_url":"https://api.github.com/users/haskell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haskell/subscriptions","organizations_url":"https://api.github.com/users/haskell/orgs","repos_url":"https://api.github.com/users/haskell/repos","events_url":"https://api.github.com/users/haskell/events{/privacy}","received_events_url":"https://api.github.com/users/haskell/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/haskell/cabal","description":"Official upstream development repository for Cabal and cabal-install","fork":false,"url":"https://api.github.com/repos/haskell/cabal","forks_url":"https://api.github.com/repos/haskell/cabal/forks","keys_url":"https://api.github.com/repos/haskell/cabal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/haskell/cabal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/haskell/cabal/teams","hooks_url":"https://api.github.com/repos/haskell/cabal/hooks","issue_events_url":"https://api.github.com/repos/haskell/cabal/issues/events{/number}","events_url":"https://api.github.com/repos/haskell/cabal/events","assignees_url":"https://api.github.com/repos/haskell/cabal/assignees{/user}","branches_url":"https://api.github.com/repos/haskell/cabal/branches{/branch}","tags_url":"https://api.github.com/repos/haskell/cabal/tags","blobs_url":"https://api.github.com/repos/haskell/cabal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/haskell/cabal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/haskell/cabal/git/refs{/sha}","trees_url":"https://api.github.com/repos/haskell/cabal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/haskell/cabal/statuses/{sha}","languages_url":"https://api.github.com/repos/haskell/cabal/languages","stargazers_url":"https://api.github.com/repos/haskell/cabal/stargazers","contributors_url":"https://api.github.com/repos/haskell/cabal/contributors","subscribers_url":"https://api.github.com/repos/haskell/cabal/subscribers","subscription_url":"https://api.github.com/repos/haskell/cabal/subscription","commits_url":"https://api.github.com/repos/haskell/cabal/commits{/sha}","git_commits_url":"https://api.github.com/repos/haskell/cabal/git/commits{/sha}","comments_url":"https://api.github.com/repos/haskell/cabal/comments{/number}","issue_comment_url":"https://api.github.com/repos/haskell/cabal/issues/comments{/number}","contents_url":"https://api.github.com/repos/haskell/cabal/contents/{+path}","compare_url":"https://api.github.com/repos/haskell/cabal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/haskell/cabal/merges","archive_url":"https://api.github.com/repos/haskell/cabal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/haskell/cabal/downloads","issues_url":"https://api.github.com/repos/haskell/cabal/issues{/number}","pulls_url":"https://api.github.com/repos/haskell/cabal/pulls{/number}","milestones_url":"https://api.github.com/repos/haskell/cabal/milestones{/number}","notifications_url":"https://api.github.com/repos/haskell/cabal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/haskell/cabal/labels{/name}","releases_url":"https://api.github.com/repos/haskell/cabal/releases{/id}","deployments_url":"https://api.github.com/repos/haskell/cabal/deployments","created_at":"2012-03-15T12:53:38Z","updated_at":"2016-07-25T00:08:03Z","pushed_at":"2016-07-29T22:48:44Z","git_url":"git://github.com/haskell/cabal.git","ssh_url":"git@github.com:haskell/cabal.git","clone_url":"https://github.com/haskell/cabal.git","svn_url":"https://github.com/haskell/cabal","homepage":"http://haskell.org/cabal","size":31138,"stargazers_count":623,"watchers_count":623,"language":"Haskell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":329,"mirror_url":null,"open_issues_count":742,"forks":329,"open_issues":742,"watchers":623,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/haskell/cabal/pulls/3602"},"html":{"href":"https://github.com/haskell/cabal/pull/3602"},"issue":{"href":"https://api.github.com/repos/haskell/cabal/issues/3602"},"comments":{"href":"https://api.github.com/repos/haskell/cabal/issues/3602/comments"},"review_comments":{"href":"https://api.github.com/repos/haskell/cabal/pulls/3602/comments"},"review_comment":{"href":"https://api.github.com/repos/haskell/cabal/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/haskell/cabal/pulls/3602/commits"},"statuses":{"href":"https://api.github.com/repos/haskell/cabal/statuses/a1068b79acea0f52324f70c3f8db1fb67eb27603"}}}}
{"actor":{"display_login":"phadej"}}