{"action":"created","comment":{"url":"https://api.github.com/repos/links-lang/links/pulls/comments/196963491","pull_request_review_id":130613082,"id":196963491,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5Njk2MzQ5MQ==","diff_hunk":"@@ -1628,18 +1628,41 @@ let rec close_pattern_type : pattern list -> Types.datatype -> Types.datatype =\n        (* TODO: expand applications? *)\n       | `Application _ -> t\n \n-let unify ~pos ~(handle:Gripers.griper) ((_,ltype as t1), (_,rtype as t2)) =\n-  try\n-    Utils.unify (ltype, rtype)\n-  with\n-      Unify.Failure error ->\n-        begin\n-          match error with\n-            | `Msg s ->\n-                Debug.print (\"Unification error: \"^s)\n-            | _ -> ()\n-        end;\n-        handle ~pos ~t1 ~t2 ~error\n+type unifyResult = UnifySuccess | UnifyFailure of (Unify.error * SourceCode.pos)\n+\n+let raiseUnify ~(handle:Gripers.griper) ~pos error t1 t2 =","path":"core/typeSugar.ml","position":18,"original_position":18,"commit_id":"76fdab33d205c7161e4ba903cf15f9c180a59899","original_commit_id":"76fdab33d205c7161e4ba903cf15f9c180a59899","user":{"login":"dhil","id":1827113,"node_id":"MDQ6VXNlcjE4MjcxMTM=","avatar_url":"https://avatars1.githubusercontent.com/u/1827113?v=4","gravatar_id":"","url":"https://api.github.com/users/dhil","html_url":"https://github.com/dhil","followers_url":"https://api.github.com/users/dhil/followers","following_url":"https://api.github.com/users/dhil/following{/other_user}","gists_url":"https://api.github.com/users/dhil/gists{/gist_id}","starred_url":"https://api.github.com/users/dhil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhil/subscriptions","organizations_url":"https://api.github.com/users/dhil/orgs","repos_url":"https://api.github.com/users/dhil/repos","events_url":"https://api.github.com/users/dhil/events{/privacy}","received_events_url":"https://api.github.com/users/dhil/received_events","type":"User","site_admin":false},"body":"**Disclaimer** the following is nitpick. Throughout the code base we predominantly use shake case for function names and type names, although, some modules do use camel case. In spirit of converging to a consistent coding style throughout the code base, I suppose `raiseUnify` should be `raise_unify`.","created_at":"2018-06-20T22:35:50Z","updated_at":"2018-06-20T22:37:42Z","html_url":"https://github.com/links-lang/links/pull/346#discussion_r196963491","pull_request_url":"https://api.github.com/repos/links-lang/links/pulls/346","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/links-lang/links/pulls/comments/196963491"},"html":{"href":"https://github.com/links-lang/links/pull/346#discussion_r196963491"},"pull_request":{"href":"https://api.github.com/repos/links-lang/links/pulls/346"}}},"pull_request":{"url":"https://api.github.com/repos/links-lang/links/pulls/346","id":195185959,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk1MTg1OTU5","html_url":"https://github.com/links-lang/links/pull/346","diff_url":"https://github.com/links-lang/links/pull/346.diff","patch_url":"https://github.com/links-lang/links/pull/346.patch","issue_url":"https://api.github.com/repos/links-lang/links/issues/346","number":346,"state":"open","locked":false,"title":"More lazy unification errors","user":{"login":"jstolarek","id":1597921,"node_id":"MDQ6VXNlcjE1OTc5MjE=","avatar_url":"https://avatars1.githubusercontent.com/u/1597921?v=4","gravatar_id":"","url":"https://api.github.com/users/jstolarek","html_url":"https://github.com/jstolarek","followers_url":"https://api.github.com/users/jstolarek/followers","following_url":"https://api.github.com/users/jstolarek/following{/other_user}","gists_url":"https://api.github.com/users/jstolarek/gists{/gist_id}","starred_url":"https://api.github.com/users/jstolarek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jstolarek/subscriptions","organizations_url":"https://api.github.com/users/jstolarek/orgs","repos_url":"https://api.github.com/users/jstolarek/repos","events_url":"https://api.github.com/users/jstolarek/events{/privacy}","received_events_url":"https://api.github.com/users/jstolarek/received_events","type":"User","site_admin":false},"body":"This patch makes error message generation more lazy. What works:\r\n\r\n * `fun_apply` griper is called only once when reporting incorrect function type. Thus error message is only generated once, when we know it will be displayed to the user\r\n\r\nWhat doesn't:\r\n\r\n  * if I comment out first two lines of `build_tyvar_names` in `types.ml`, which are the lines responsible for resetting variable name counter, I can easily see that some variable names are being generated even though they are not displayed to the user. This can be witnessed by variable names in error message starting from letters like `k` and not `a`. Is this expected behaviour? Are we generating some variable names for internal use only? If not, then this patch requires further work to determine why this happens. I suspect this might be taking place outside of `typeSugar.ml` module.\r\n\r\nThis is intended to fix #85.","created_at":"2018-06-15T14:09:37Z","updated_at":"2018-06-20T22:37:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5edc82859ffdfa24f6d8bc0b3c22cdefae68b376","assignee":{"login":"jstolarek","id":1597921,"node_id":"MDQ6VXNlcjE1OTc5MjE=","avatar_url":"https://avatars1.githubusercontent.com/u/1597921?v=4","gravatar_id":"","url":"https://api.github.com/users/jstolarek","html_url":"https://github.com/jstolarek","followers_url":"https://api.github.com/users/jstolarek/followers","following_url":"https://api.github.com/users/jstolarek/following{/other_user}","gists_url":"https://api.github.com/users/jstolarek/gists{/gist_id}","starred_url":"https://api.github.com/users/jstolarek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jstolarek/subscriptions","organizations_url":"https://api.github.com/users/jstolarek/orgs","repos_url":"https://api.github.com/users/jstolarek/repos","events_url":"https://api.github.com/users/jstolarek/events{/privacy}","received_events_url":"https://api.github.com/users/jstolarek/received_events","type":"User","site_admin":false},"assignees":[{"login":"jstolarek","id":1597921,"node_id":"MDQ6VXNlcjE1OTc5MjE=","avatar_url":"https://avatars1.githubusercontent.com/u/1597921?v=4","gravatar_id":"","url":"https://api.github.com/users/jstolarek","html_url":"https://github.com/jstolarek","followers_url":"https://api.github.com/users/jstolarek/followers","following_url":"https://api.github.com/users/jstolarek/following{/other_user}","gists_url":"https://api.github.com/users/jstolarek/gists{/gist_id}","starred_url":"https://api.github.com/users/jstolarek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jstolarek/subscriptions","organizations_url":"https://api.github.com/users/jstolarek/orgs","repos_url":"https://api.github.com/users/jstolarek/repos","events_url":"https://api.github.com/users/jstolarek/events{/privacy}","received_events_url":"https://api.github.com/users/jstolarek/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"slindley","id":1950723,"node_id":"MDQ6VXNlcjE5NTA3MjM=","avatar_url":"https://avatars3.githubusercontent.com/u/1950723?v=4","gravatar_id":"","url":"https://api.github.com/users/slindley","html_url":"https://github.com/slindley","followers_url":"https://api.github.com/users/slindley/followers","following_url":"https://api.github.com/users/slindley/following{/other_user}","gists_url":"https://api.github.com/users/slindley/gists{/gist_id}","starred_url":"https://api.github.com/users/slindley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slindley/subscriptions","organizations_url":"https://api.github.com/users/slindley/orgs","repos_url":"https://api.github.com/users/slindley/repos","events_url":"https://api.github.com/users/slindley/events{/privacy}","received_events_url":"https://api.github.com/users/slindley/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":76852010,"node_id":"MDU6TGFiZWw3Njg1MjAxMA==","url":"https://api.github.com/repos/links-lang/links/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"milestone":null,"commits_url":"https://api.github.com/repos/links-lang/links/pulls/346/commits","review_comments_url":"https://api.github.com/repos/links-lang/links/pulls/346/comments","review_comment_url":"https://api.github.com/repos/links-lang/links/pulls/comments{/number}","comments_url":"https://api.github.com/repos/links-lang/links/issues/346/comments","statuses_url":"https://api.github.com/repos/links-lang/links/statuses/76fdab33d205c7161e4ba903cf15f9c180a59899","head":{"label":"links-lang:js-T85-lazy-unification-errors","ref":"js-T85-lazy-unification-errors","sha":"76fdab33d205c7161e4ba903cf15f9c180a59899","user":{"login":"links-lang","id":9572894,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk1NzI4OTQ=","avatar_url":"https://avatars1.githubusercontent.com/u/9572894?v=4","gravatar_id":"","url":"https://api.github.com/users/links-lang","html_url":"https://github.com/links-lang","followers_url":"https://api.github.com/users/links-lang/followers","following_url":"https://api.github.com/users/links-lang/following{/other_user}","gists_url":"https://api.github.com/users/links-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/links-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/links-lang/subscriptions","organizations_url":"https://api.github.com/users/links-lang/orgs","repos_url":"https://api.github.com/users/links-lang/repos","events_url":"https://api.github.com/users/links-lang/events{/privacy}","received_events_url":"https://api.github.com/users/links-lang/received_events","type":"Organization","site_admin":false},"repo":{"id":16219137,"node_id":"MDEwOlJlcG9zaXRvcnkxNjIxOTEzNw==","name":"links","full_name":"links-lang/links","owner":{"login":"links-lang","id":9572894,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk1NzI4OTQ=","avatar_url":"https://avatars1.githubusercontent.com/u/9572894?v=4","gravatar_id":"","url":"https://api.github.com/users/links-lang","html_url":"https://github.com/links-lang","followers_url":"https://api.github.com/users/links-lang/followers","following_url":"https://api.github.com/users/links-lang/following{/other_user}","gists_url":"https://api.github.com/users/links-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/links-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/links-lang/subscriptions","organizations_url":"https://api.github.com/users/links-lang/orgs","repos_url":"https://api.github.com/users/links-lang/repos","events_url":"https://api.github.com/users/links-lang/events{/privacy}","received_events_url":"https://api.github.com/users/links-lang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/links-lang/links","description":"Links","fork":false,"url":"https://api.github.com/repos/links-lang/links","forks_url":"https://api.github.com/repos/links-lang/links/forks","keys_url":"https://api.github.com/repos/links-lang/links/keys{/key_id}","collaborators_url":"https://api.github.com/repos/links-lang/links/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/links-lang/links/teams","hooks_url":"https://api.github.com/repos/links-lang/links/hooks","issue_events_url":"https://api.github.com/repos/links-lang/links/issues/events{/number}","events_url":"https://api.github.com/repos/links-lang/links/events","assignees_url":"https://api.github.com/repos/links-lang/links/assignees{/user}","branches_url":"https://api.github.com/repos/links-lang/links/branches{/branch}","tags_url":"https://api.github.com/repos/links-lang/links/tags","blobs_url":"https://api.github.com/repos/links-lang/links/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/links-lang/links/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/links-lang/links/git/refs{/sha}","trees_url":"https://api.github.com/repos/links-lang/links/git/trees{/sha}","statuses_url":"https://api.github.com/repos/links-lang/links/statuses/{sha}","languages_url":"https://api.github.com/repos/links-lang/links/languages","stargazers_url":"https://api.github.com/repos/links-lang/links/stargazers","contributors_url":"https://api.github.com/repos/links-lang/links/contributors","subscribers_url":"https://api.github.com/repos/links-lang/links/subscribers","subscription_url":"https://api.github.com/repos/links-lang/links/subscription","commits_url":"https://api.github.com/repos/links-lang/links/commits{/sha}","git_commits_url":"https://api.github.com/repos/links-lang/links/git/commits{/sha}","comments_url":"https://api.github.com/repos/links-lang/links/comments{/number}","issue_comment_url":"https://api.github.com/repos/links-lang/links/issues/comments{/number}","contents_url":"https://api.github.com/repos/links-lang/links/contents/{+path}","compare_url":"https://api.github.com/repos/links-lang/links/compare/{base}...{head}","merges_url":"https://api.github.com/repos/links-lang/links/merges","archive_url":"https://api.github.com/repos/links-lang/links/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/links-lang/links/downloads","issues_url":"https://api.github.com/repos/links-lang/links/issues{/number}","pulls_url":"https://api.github.com/repos/links-lang/links/pulls{/number}","milestones_url":"https://api.github.com/repos/links-lang/links/milestones{/number}","notifications_url":"https://api.github.com/repos/links-lang/links/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/links-lang/links/labels{/name}","releases_url":"https://api.github.com/repos/links-lang/links/releases{/id}","deployments_url":"https://api.github.com/repos/links-lang/links/deployments","created_at":"2014-01-24T22:40:35Z","updated_at":"2018-06-20T17:57:43Z","pushed_at":"2018-06-20T22:24:20Z","git_url":"git://github.com/links-lang/links.git","ssh_url":"git@github.com:links-lang/links.git","clone_url":"https://github.com/links-lang/links.git","svn_url":"https://github.com/links-lang/links","homepage":null,"size":22101,"stargazers_count":85,"watchers_count":85,"language":"OCaml","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":16,"mirror_url":null,"archived":false,"open_issues_count":78,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":16,"open_issues":78,"watchers":85,"default_branch":"master"}},"base":{"label":"links-lang:master","ref":"master","sha":"3740cb1750877dcbe49d2b763e36540614bf2ee4","user":{"login":"links-lang","id":9572894,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk1NzI4OTQ=","avatar_url":"https://avatars1.githubusercontent.com/u/9572894?v=4","gravatar_id":"","url":"https://api.github.com/users/links-lang","html_url":"https://github.com/links-lang","followers_url":"https://api.github.com/users/links-lang/followers","following_url":"https://api.github.com/users/links-lang/following{/other_user}","gists_url":"https://api.github.com/users/links-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/links-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/links-lang/subscriptions","organizations_url":"https://api.github.com/users/links-lang/orgs","repos_url":"https://api.github.com/users/links-lang/repos","events_url":"https://api.github.com/users/links-lang/events{/privacy}","received_events_url":"https://api.github.com/users/links-lang/received_events","type":"Organization","site_admin":false},"repo":{"id":16219137,"node_id":"MDEwOlJlcG9zaXRvcnkxNjIxOTEzNw==","name":"links","full_name":"links-lang/links","owner":{"login":"links-lang","id":9572894,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk1NzI4OTQ=","avatar_url":"https://avatars1.githubusercontent.com/u/9572894?v=4","gravatar_id":"","url":"https://api.github.com/users/links-lang","html_url":"https://github.com/links-lang","followers_url":"https://api.github.com/users/links-lang/followers","following_url":"https://api.github.com/users/links-lang/following{/other_user}","gists_url":"https://api.github.com/users/links-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/links-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/links-lang/subscriptions","organizations_url":"https://api.github.com/users/links-lang/orgs","repos_url":"https://api.github.com/users/links-lang/repos","events_url":"https://api.github.com/users/links-lang/events{/privacy}","received_events_url":"https://api.github.com/users/links-lang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/links-lang/links","description":"Links","fork":false,"url":"https://api.github.com/repos/links-lang/links","forks_url":"https://api.github.com/repos/links-lang/links/forks","keys_url":"https://api.github.com/repos/links-lang/links/keys{/key_id}","collaborators_url":"https://api.github.com/repos/links-lang/links/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/links-lang/links/teams","hooks_url":"https://api.github.com/repos/links-lang/links/hooks","issue_events_url":"https://api.github.com/repos/links-lang/links/issues/events{/number}","events_url":"https://api.github.com/repos/links-lang/links/events","assignees_url":"https://api.github.com/repos/links-lang/links/assignees{/user}","branches_url":"https://api.github.com/repos/links-lang/links/branches{/branch}","tags_url":"https://api.github.com/repos/links-lang/links/tags","blobs_url":"https://api.github.com/repos/links-lang/links/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/links-lang/links/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/links-lang/links/git/refs{/sha}","trees_url":"https://api.github.com/repos/links-lang/links/git/trees{/sha}","statuses_url":"https://api.github.com/repos/links-lang/links/statuses/{sha}","languages_url":"https://api.github.com/repos/links-lang/links/languages","stargazers_url":"https://api.github.com/repos/links-lang/links/stargazers","contributors_url":"https://api.github.com/repos/links-lang/links/contributors","subscribers_url":"https://api.github.com/repos/links-lang/links/subscribers","subscription_url":"https://api.github.com/repos/links-lang/links/subscription","commits_url":"https://api.github.com/repos/links-lang/links/commits{/sha}","git_commits_url":"https://api.github.com/repos/links-lang/links/git/commits{/sha}","comments_url":"https://api.github.com/repos/links-lang/links/comments{/number}","issue_comment_url":"https://api.github.com/repos/links-lang/links/issues/comments{/number}","contents_url":"https://api.github.com/repos/links-lang/links/contents/{+path}","compare_url":"https://api.github.com/repos/links-lang/links/compare/{base}...{head}","merges_url":"https://api.github.com/repos/links-lang/links/merges","archive_url":"https://api.github.com/repos/links-lang/links/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/links-lang/links/downloads","issues_url":"https://api.github.com/repos/links-lang/links/issues{/number}","pulls_url":"https://api.github.com/repos/links-lang/links/pulls{/number}","milestones_url":"https://api.github.com/repos/links-lang/links/milestones{/number}","notifications_url":"https://api.github.com/repos/links-lang/links/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/links-lang/links/labels{/name}","releases_url":"https://api.github.com/repos/links-lang/links/releases{/id}","deployments_url":"https://api.github.com/repos/links-lang/links/deployments","created_at":"2014-01-24T22:40:35Z","updated_at":"2018-06-20T17:57:43Z","pushed_at":"2018-06-20T22:24:20Z","git_url":"git://github.com/links-lang/links.git","ssh_url":"git@github.com:links-lang/links.git","clone_url":"https://github.com/links-lang/links.git","svn_url":"https://github.com/links-lang/links","homepage":null,"size":22101,"stargazers_count":85,"watchers_count":85,"language":"OCaml","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":16,"mirror_url":null,"archived":false,"open_issues_count":78,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":16,"open_issues":78,"watchers":85,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/links-lang/links/pulls/346"},"html":{"href":"https://github.com/links-lang/links/pull/346"},"issue":{"href":"https://api.github.com/repos/links-lang/links/issues/346"},"comments":{"href":"https://api.github.com/repos/links-lang/links/issues/346/comments"},"review_comments":{"href":"https://api.github.com/repos/links-lang/links/pulls/346/comments"},"review_comment":{"href":"https://api.github.com/repos/links-lang/links/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/links-lang/links/pulls/346/commits"},"statuses":{"href":"https://api.github.com/repos/links-lang/links/statuses/76fdab33d205c7161e4ba903cf15f9c180a59899"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"dhil"}}