{"action":"created","comment":{"url":"https://api.github.com/repos/idris-lang/Idris-dev/pulls/comments/153905298","pull_request_review_id":79984199,"id":153905298,"diff_hunk":"@@ -30,7 +31,8 @@ Record ::=\n     DocComment Accessibility? 'record' FnName TypeSig 'where' OpenBlock Constructor KeepTerminator CloseBlock;\n -}\n record :: SyntaxInfo -> IdrisParser PDecl\n-record syn = do (doc, paramDocs, acc, opts) <- P.try (do\n+record syn = (<?> \"record type declaration\") . appExtent $ do","path":"src/Idris/Parser/Data.hs","position":15,"original_position":15,"commit_id":"d2c6ffa894cf181ac53edcc6c5f19bd46d610be6","original_commit_id":"d2c6ffa894cf181ac53edcc6c5f19bd46d610be6","user":{"login":"ahmadsalim","id":1647846,"avatar_url":"https://avatars0.githubusercontent.com/u/1647846?v=4","gravatar_id":"","url":"https://api.github.com/users/ahmadsalim","html_url":"https://github.com/ahmadsalim","followers_url":"https://api.github.com/users/ahmadsalim/followers","following_url":"https://api.github.com/users/ahmadsalim/following{/other_user}","gists_url":"https://api.github.com/users/ahmadsalim/gists{/gist_id}","starred_url":"https://api.github.com/users/ahmadsalim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahmadsalim/subscriptions","organizations_url":"https://api.github.com/users/ahmadsalim/orgs","repos_url":"https://api.github.com/users/ahmadsalim/repos","events_url":"https://api.github.com/users/ahmadsalim/events{/privacy}","received_events_url":"https://api.github.com/users/ahmadsalim/received_events","type":"User","site_admin":false},"body":"This looks a bit funky, is there any reason why this is not added afterwards?","created_at":"2017-11-29T20:24:39Z","updated_at":"2017-11-29T20:47:43Z","html_url":"https://github.com/idris-lang/Idris-dev/pull/4210#discussion_r153905298","pull_request_url":"https://api.github.com/repos/idris-lang/Idris-dev/pulls/4210","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/idris-lang/Idris-dev/pulls/comments/153905298"},"html":{"href":"https://github.com/idris-lang/Idris-dev/pull/4210#discussion_r153905298"},"pull_request":{"href":"https://api.github.com/repos/idris-lang/Idris-dev/pulls/4210"}}},"pull_request":{"url":"https://api.github.com/repos/idris-lang/Idris-dev/pulls/4210","id":153995461,"html_url":"https://github.com/idris-lang/Idris-dev/pull/4210","diff_url":"https://github.com/idris-lang/Idris-dev/pull/4210.diff","patch_url":"https://github.com/idris-lang/Idris-dev/pull/4210.patch","issue_url":"https://api.github.com/repos/idris-lang/Idris-dev/issues/4210","number":4210,"state":"open","locked":false,"title":"Improve error message locations","user":{"login":"eraserhd","id":147284,"avatar_url":"https://avatars0.githubusercontent.com/u/147284?v=4","gravatar_id":"","url":"https://api.github.com/users/eraserhd","html_url":"https://github.com/eraserhd","followers_url":"https://api.github.com/users/eraserhd/followers","following_url":"https://api.github.com/users/eraserhd/following{/other_user}","gists_url":"https://api.github.com/users/eraserhd/gists{/gist_id}","starred_url":"https://api.github.com/users/eraserhd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eraserhd/subscriptions","organizations_url":"https://api.github.com/users/eraserhd/orgs","repos_url":"https://api.github.com/users/eraserhd/repos","events_url":"https://api.github.com/users/eraserhd/events{/privacy}","received_events_url":"https://api.github.com/users/eraserhd/received_events","type":"User","site_admin":false},"body":"Closes #1594\r\n\r\nThis PR uses the strict `WriterT` transformer over our parser stack with a\r\nmonoid over `FC` and what used to be `spanFC` to compute the span of\r\nnon-terminal parsers from the spans of `trackExtent`-wrapped parsers.\r\n\r\nThe net result is that the locations reported for errors and warnings is\r\nmuch improved.  Most errors now report the extent of the error, rather than a\r\npoint roughly preceeding it (or after it, sometimes).  There are still cases\r\nwhere FCs are recomputed as a point after parsing--I didn't fix these, to cut\r\nthe scope of this PR--though all file locations produced during parsing use\r\nthe new, spanning parsing combinators.\r\n\r\nSorry about the size of this PR :( . \r\n\r\nI would start reading at `Idris.Parser.Stack`, then `Idris.Parser.Helpers`.\r\n\r\nOverview:\r\n* \\*FC and non-\\*FC parsers (e.g. `tokenFC` and `token`, `charLiteralFC` and\r\n  `charLiteral`, etc.) have been elided and the `FC` suffix removed.  Any\r\n  parser can be asked to report it's FC using the `extent` or `withExtent`\r\n  combinators.\r\n* Extents reported for errors end at the last character of the token, rather\r\n  than on the following character.\r\n* Now that all parsers can be queried for their spans, highlighting is\r\n  done with the `highlight` parser combinator, e.g.\r\n  ``highlight AnnQuasiquote (symbol \"`{{\" ...)``.  These can be nested.\r\n* Totality checking, in its current design, reports the extent of the first\r\n  equation.  This is a bit more misleading now that the span is computed\r\n  correctly, since it could look like it's trying to indicate which clause is\r\n  non-total.  We should fix this (hopefully as a separate PR.)\r\n* The span of clauses is actually the span of the right-hand side, and so this\r\n  is reported when there is an error on the right-hand side or the left-hand\r\n  side.  We should also fix this (hopefully as a separate PR.)\r\n* There's probably cases where, owning to the improved granularity, we will now\r\n  notice errors were reported with FCs from the wrong object.\r\n* I haven't tested an IDE-mode client yet.  They may need to be patched if they\r\n  are manually excluding the last character of tokens.  Highlighting appears to\r\n  work fine without changes, though.\r\n","created_at":"2017-11-21T20:39:19Z","updated_at":"2017-11-29T20:47:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d362958cdddc5975116b0d4b4fdc6b410b7fe5b0","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/idris-lang/Idris-dev/pulls/4210/commits","review_comments_url":"https://api.github.com/repos/idris-lang/Idris-dev/pulls/4210/comments","review_comment_url":"https://api.github.com/repos/idris-lang/Idris-dev/pulls/comments{/number}","comments_url":"https://api.github.com/repos/idris-lang/Idris-dev/issues/4210/comments","statuses_url":"https://api.github.com/repos/idris-lang/Idris-dev/statuses/d2c6ffa894cf181ac53edcc6c5f19bd46d610be6","head":{"label":"eraserhd:1594_fc","ref":"1594_fc","sha":"d2c6ffa894cf181ac53edcc6c5f19bd46d610be6","user":{"login":"eraserhd","id":147284,"avatar_url":"https://avatars0.githubusercontent.com/u/147284?v=4","gravatar_id":"","url":"https://api.github.com/users/eraserhd","html_url":"https://github.com/eraserhd","followers_url":"https://api.github.com/users/eraserhd/followers","following_url":"https://api.github.com/users/eraserhd/following{/other_user}","gists_url":"https://api.github.com/users/eraserhd/gists{/gist_id}","starred_url":"https://api.github.com/users/eraserhd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eraserhd/subscriptions","organizations_url":"https://api.github.com/users/eraserhd/orgs","repos_url":"https://api.github.com/users/eraserhd/repos","events_url":"https://api.github.com/users/eraserhd/events{/privacy}","received_events_url":"https://api.github.com/users/eraserhd/received_events","type":"User","site_admin":false},"repo":{"id":97469341,"name":"Idris-dev","full_name":"eraserhd/Idris-dev","owner":{"login":"eraserhd","id":147284,"avatar_url":"https://avatars0.githubusercontent.com/u/147284?v=4","gravatar_id":"","url":"https://api.github.com/users/eraserhd","html_url":"https://github.com/eraserhd","followers_url":"https://api.github.com/users/eraserhd/followers","following_url":"https://api.github.com/users/eraserhd/following{/other_user}","gists_url":"https://api.github.com/users/eraserhd/gists{/gist_id}","starred_url":"https://api.github.com/users/eraserhd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eraserhd/subscriptions","organizations_url":"https://api.github.com/users/eraserhd/orgs","repos_url":"https://api.github.com/users/eraserhd/repos","events_url":"https://api.github.com/users/eraserhd/events{/privacy}","received_events_url":"https://api.github.com/users/eraserhd/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/eraserhd/Idris-dev","description":"A Dependently Typed Functional Programming Language","fork":true,"url":"https://api.github.com/repos/eraserhd/Idris-dev","forks_url":"https://api.github.com/repos/eraserhd/Idris-dev/forks","keys_url":"https://api.github.com/repos/eraserhd/Idris-dev/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eraserhd/Idris-dev/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eraserhd/Idris-dev/teams","hooks_url":"https://api.github.com/repos/eraserhd/Idris-dev/hooks","issue_events_url":"https://api.github.com/repos/eraserhd/Idris-dev/issues/events{/number}","events_url":"https://api.github.com/repos/eraserhd/Idris-dev/events","assignees_url":"https://api.github.com/repos/eraserhd/Idris-dev/assignees{/user}","branches_url":"https://api.github.com/repos/eraserhd/Idris-dev/branches{/branch}","tags_url":"https://api.github.com/repos/eraserhd/Idris-dev/tags","blobs_url":"https://api.github.com/repos/eraserhd/Idris-dev/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eraserhd/Idris-dev/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eraserhd/Idris-dev/git/refs{/sha}","trees_url":"https://api.github.com/repos/eraserhd/Idris-dev/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eraserhd/Idris-dev/statuses/{sha}","languages_url":"https://api.github.com/repos/eraserhd/Idris-dev/languages","stargazers_url":"https://api.github.com/repos/eraserhd/Idris-dev/stargazers","contributors_url":"https://api.github.com/repos/eraserhd/Idris-dev/contributors","subscribers_url":"https://api.github.com/repos/eraserhd/Idris-dev/subscribers","subscription_url":"https://api.github.com/repos/eraserhd/Idris-dev/subscription","commits_url":"https://api.github.com/repos/eraserhd/Idris-dev/commits{/sha}","git_commits_url":"https://api.github.com/repos/eraserhd/Idris-dev/git/commits{/sha}","comments_url":"https://api.github.com/repos/eraserhd/Idris-dev/comments{/number}","issue_comment_url":"https://api.github.com/repos/eraserhd/Idris-dev/issues/comments{/number}","contents_url":"https://api.github.com/repos/eraserhd/Idris-dev/contents/{+path}","compare_url":"https://api.github.com/repos/eraserhd/Idris-dev/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eraserhd/Idris-dev/merges","archive_url":"https://api.github.com/repos/eraserhd/Idris-dev/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eraserhd/Idris-dev/downloads","issues_url":"https://api.github.com/repos/eraserhd/Idris-dev/issues{/number}","pulls_url":"https://api.github.com/repos/eraserhd/Idris-dev/pulls{/number}","milestones_url":"https://api.github.com/repos/eraserhd/Idris-dev/milestones{/number}","notifications_url":"https://api.github.com/repos/eraserhd/Idris-dev/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eraserhd/Idris-dev/labels{/name}","releases_url":"https://api.github.com/repos/eraserhd/Idris-dev/releases{/id}","deployments_url":"https://api.github.com/repos/eraserhd/Idris-dev/deployments","created_at":"2017-07-17T11:35:34Z","updated_at":"2017-07-17T11:35:38Z","pushed_at":"2017-11-22T17:12:46Z","git_url":"git://github.com/eraserhd/Idris-dev.git","ssh_url":"git@github.com:eraserhd/Idris-dev.git","clone_url":"https://github.com/eraserhd/Idris-dev.git","svn_url":"https://github.com/eraserhd/Idris-dev","homepage":"http://idris-lang.org","size":35059,"stargazers_count":0,"watchers_count":0,"language":"Haskell","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"idris-lang:master","ref":"master","sha":"f8509e4dab7f2a2b4d86e19bf11e1b86dfc3a24c","user":{"login":"idris-lang","id":5552910,"avatar_url":"https://avatars1.githubusercontent.com/u/5552910?v=4","gravatar_id":"","url":"https://api.github.com/users/idris-lang","html_url":"https://github.com/idris-lang","followers_url":"https://api.github.com/users/idris-lang/followers","following_url":"https://api.github.com/users/idris-lang/following{/other_user}","gists_url":"https://api.github.com/users/idris-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/idris-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/idris-lang/subscriptions","organizations_url":"https://api.github.com/users/idris-lang/orgs","repos_url":"https://api.github.com/users/idris-lang/repos","events_url":"https://api.github.com/users/idris-lang/events{/privacy}","received_events_url":"https://api.github.com/users/idris-lang/received_events","type":"Organization","site_admin":false},"repo":{"id":2386778,"name":"Idris-dev","full_name":"idris-lang/Idris-dev","owner":{"login":"idris-lang","id":5552910,"avatar_url":"https://avatars1.githubusercontent.com/u/5552910?v=4","gravatar_id":"","url":"https://api.github.com/users/idris-lang","html_url":"https://github.com/idris-lang","followers_url":"https://api.github.com/users/idris-lang/followers","following_url":"https://api.github.com/users/idris-lang/following{/other_user}","gists_url":"https://api.github.com/users/idris-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/idris-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/idris-lang/subscriptions","organizations_url":"https://api.github.com/users/idris-lang/orgs","repos_url":"https://api.github.com/users/idris-lang/repos","events_url":"https://api.github.com/users/idris-lang/events{/privacy}","received_events_url":"https://api.github.com/users/idris-lang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/idris-lang/Idris-dev","description":"A Dependently Typed Functional Programming Language","fork":false,"url":"https://api.github.com/repos/idris-lang/Idris-dev","forks_url":"https://api.github.com/repos/idris-lang/Idris-dev/forks","keys_url":"https://api.github.com/repos/idris-lang/Idris-dev/keys{/key_id}","collaborators_url":"https://api.github.com/repos/idris-lang/Idris-dev/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/idris-lang/Idris-dev/teams","hooks_url":"https://api.github.com/repos/idris-lang/Idris-dev/hooks","issue_events_url":"https://api.github.com/repos/idris-lang/Idris-dev/issues/events{/number}","events_url":"https://api.github.com/repos/idris-lang/Idris-dev/events","assignees_url":"https://api.github.com/repos/idris-lang/Idris-dev/assignees{/user}","branches_url":"https://api.github.com/repos/idris-lang/Idris-dev/branches{/branch}","tags_url":"https://api.github.com/repos/idris-lang/Idris-dev/tags","blobs_url":"https://api.github.com/repos/idris-lang/Idris-dev/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/idris-lang/Idris-dev/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/idris-lang/Idris-dev/git/refs{/sha}","trees_url":"https://api.github.com/repos/idris-lang/Idris-dev/git/trees{/sha}","statuses_url":"https://api.github.com/repos/idris-lang/Idris-dev/statuses/{sha}","languages_url":"https://api.github.com/repos/idris-lang/Idris-dev/languages","stargazers_url":"https://api.github.com/repos/idris-lang/Idris-dev/stargazers","contributors_url":"https://api.github.com/repos/idris-lang/Idris-dev/contributors","subscribers_url":"https://api.github.com/repos/idris-lang/Idris-dev/subscribers","subscription_url":"https://api.github.com/repos/idris-lang/Idris-dev/subscription","commits_url":"https://api.github.com/repos/idris-lang/Idris-dev/commits{/sha}","git_commits_url":"https://api.github.com/repos/idris-lang/Idris-dev/git/commits{/sha}","comments_url":"https://api.github.com/repos/idris-lang/Idris-dev/comments{/number}","issue_comment_url":"https://api.github.com/repos/idris-lang/Idris-dev/issues/comments{/number}","contents_url":"https://api.github.com/repos/idris-lang/Idris-dev/contents/{+path}","compare_url":"https://api.github.com/repos/idris-lang/Idris-dev/compare/{base}...{head}","merges_url":"https://api.github.com/repos/idris-lang/Idris-dev/merges","archive_url":"https://api.github.com/repos/idris-lang/Idris-dev/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/idris-lang/Idris-dev/downloads","issues_url":"https://api.github.com/repos/idris-lang/Idris-dev/issues{/number}","pulls_url":"https://api.github.com/repos/idris-lang/Idris-dev/pulls{/number}","milestones_url":"https://api.github.com/repos/idris-lang/Idris-dev/milestones{/number}","notifications_url":"https://api.github.com/repos/idris-lang/Idris-dev/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/idris-lang/Idris-dev/labels{/name}","releases_url":"https://api.github.com/repos/idris-lang/Idris-dev/releases{/id}","deployments_url":"https://api.github.com/repos/idris-lang/Idris-dev/deployments","created_at":"2011-09-14T16:55:49Z","updated_at":"2017-11-29T16:56:45Z","pushed_at":"2017-11-28T11:49:30Z","git_url":"git://github.com/idris-lang/Idris-dev.git","ssh_url":"git@github.com:idris-lang/Idris-dev.git","clone_url":"https://github.com/idris-lang/Idris-dev.git","svn_url":"https://github.com/idris-lang/Idris-dev","homepage":"http://idris-lang.org","size":34940,"stargazers_count":2166,"watchers_count":2166,"language":"Haskell","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":518,"mirror_url":null,"archived":false,"open_issues_count":474,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":518,"open_issues":474,"watchers":2166,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/idris-lang/Idris-dev/pulls/4210"},"html":{"href":"https://github.com/idris-lang/Idris-dev/pull/4210"},"issue":{"href":"https://api.github.com/repos/idris-lang/Idris-dev/issues/4210"},"comments":{"href":"https://api.github.com/repos/idris-lang/Idris-dev/issues/4210/comments"},"review_comments":{"href":"https://api.github.com/repos/idris-lang/Idris-dev/pulls/4210/comments"},"review_comment":{"href":"https://api.github.com/repos/idris-lang/Idris-dev/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/idris-lang/Idris-dev/pulls/4210/commits"},"statuses":{"href":"https://api.github.com/repos/idris-lang/Idris-dev/statuses/d2c6ffa894cf181ac53edcc6c5f19bd46d610be6"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"ahmadsalim"}}