{"action":"closed","issue":{"url":"https://api.github.com/repos/agda/agda/issues/1955","repository_url":"https://api.github.com/repos/agda/agda","labels_url":"https://api.github.com/repos/agda/agda/issues/1955/labels{/name}","comments_url":"https://api.github.com/repos/agda/agda/issues/1955/comments","events_url":"https://api.github.com/repos/agda/agda/issues/1955/events","html_url":"https://github.com/agda/agda/issues/1955","id":152052185,"number":1955,"title":"false dependency between instance constraints","user":{"login":"davdar","id":618122,"avatar_url":"https://avatars.githubusercontent.com/u/618122?v=3","gravatar_id":"","url":"https://api.github.com/users/davdar","html_url":"https://github.com/davdar","followers_url":"https://api.github.com/users/davdar/followers","following_url":"https://api.github.com/users/davdar/following{/other_user}","gists_url":"https://api.github.com/users/davdar/gists{/gist_id}","starred_url":"https://api.github.com/users/davdar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davdar/subscriptions","organizations_url":"https://api.github.com/users/davdar/orgs","repos_url":"https://api.github.com/users/davdar/repos","events_url":"https://api.github.com/users/davdar/events{/privacy}","received_events_url":"https://api.github.com/users/davdar/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/agda/agda/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/agda/agda/labels/error-reporting","name":"error-reporting","color":"ededed"},{"url":"https://api.github.com/repos/agda/agda/labels/instance","name":"instance","color":"ededed"},{"url":"https://api.github.com/repos/agda/agda/labels/type-checking","name":"type-checking","color":"ededed"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/agda/agda/milestones/16","html_url":"https://github.com/agda/agda/milestones/2.5.2","labels_url":"https://api.github.com/repos/agda/agda/milestones/16/labels","id":1713715,"number":16,"title":"2.5.2","description":null,"creator":{"login":"andreasabel","id":1155218,"avatar_url":"https://avatars.githubusercontent.com/u/1155218?v=3","gravatar_id":"","url":"https://api.github.com/users/andreasabel","html_url":"https://github.com/andreasabel","followers_url":"https://api.github.com/users/andreasabel/followers","following_url":"https://api.github.com/users/andreasabel/following{/other_user}","gists_url":"https://api.github.com/users/andreasabel/gists{/gist_id}","starred_url":"https://api.github.com/users/andreasabel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreasabel/subscriptions","organizations_url":"https://api.github.com/users/andreasabel/orgs","repos_url":"https://api.github.com/users/andreasabel/repos","events_url":"https://api.github.com/users/andreasabel/events{/privacy}","received_events_url":"https://api.github.com/users/andreasabel/received_events","type":"User","site_admin":false},"open_issues":26,"closed_issues":48,"state":"open","created_at":"2016-04-18T13:25:09Z","updated_at":"2016-06-11T06:43:35Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2016-04-30T20:53:03Z","updated_at":"2016-06-11T06:43:35Z","closed_at":"2016-06-11T06:43:35Z","body":"This file doesn't typecheck because there is no instance for `Y unit` (which is commented out). The issue is the error, which reports:\r\n\r\n\"No instance of type Z unit was found in scope.\"\r\n\r\nThis appears to be an off-by-one error in reporting errors when instance resolution fails; the correct error output should identify `Y unit` as the missing instance.\r\n\r\nExtra notes: if the `ZA` constraint on foo is removed, it gets the error message right claiming it failed to find `Y unit`. If the `XA` constraint is removed, it continues to give the incorrect error which mentions `Z unit`.\r\n\r\n```agda\r\nmodule Bug where\r\n\r\ndata unit : Set where tt : unit\r\n\r\nrecord X (A : Set) : Set where field x : A\r\nrecord Y (A : Set) : Set where field y : A\r\nrecord Z (A : Set) : Set where field z : A\r\n\r\ninstance\r\n  X[unit] : X unit\r\n  X[unit] = record { x = tt }\r\n  -- Y[unit] : Y unit\r\n  -- Y[unit] = record { y = tt }\r\n  Z[unit] : Z unit\r\n  Z[unit] = record { z = tt }\r\n\r\nfoo : ∀ (A : Set) {{XA : X A}} {{YA : Y A}} {{ZA : Z A}} → unit\r\nfoo A = tt\r\n\r\nfoo[unit] : unit\r\nfoo[unit] = foo unit\r\n```"}}
{"actor":{"display_login":"UlfNorell"}}