{"action":"opened","number":89,"pull_request":{"url":"https://api.github.com/repos/sdiehl/write-you-a-haskell/pulls/89","id":86636924,"html_url":"https://github.com/sdiehl/write-you-a-haskell/pull/89","diff_url":"https://github.com/sdiehl/write-you-a-haskell/pull/89.diff","patch_url":"https://github.com/sdiehl/write-you-a-haskell/pull/89.patch","issue_url":"https://api.github.com/repos/sdiehl/write-you-a-haskell/issues/89","number":89,"state":"open","locked":false,"title":"Fix let inference (attempts to fix #72 and #82).","user":{"login":"VitorCBSB","id":2853493,"avatar_url":"https://avatars.githubusercontent.com/u/2853493?v=3","gravatar_id":"","url":"https://api.github.com/users/VitorCBSB","html_url":"https://github.com/VitorCBSB","followers_url":"https://api.github.com/users/VitorCBSB/followers","following_url":"https://api.github.com/users/VitorCBSB/following{/other_user}","gists_url":"https://api.github.com/users/VitorCBSB/gists{/gist_id}","starred_url":"https://api.github.com/users/VitorCBSB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VitorCBSB/subscriptions","organizations_url":"https://api.github.com/users/VitorCBSB/orgs","repos_url":"https://api.github.com/users/VitorCBSB/repos","events_url":"https://api.github.com/users/VitorCBSB/events{/privacy}","received_events_url":"https://api.github.com/users/VitorCBSB/received_events","type":"User","site_admin":false},"body":"Attempts to fix issues #72 and #82 regarding let polymorphism. Inference works correctly for the functions provided in them and they have been added to the test.ml file. Big thanks to @Azure-Vani for the pointer to his implementation as well as providing the algorithm described in TAPL.\r\n\r\nFor this fix, I had to radically change the `infer` function's interface, and alter the Infer monad to being a simple `State` + `Reader` + `Except` instead of `RWS` (the `Writer` part was not being used). This might not be good for readability, but it's the solution I could come up with.\r\n\r\nAdditionally, this is going to need to be reflected in the text, but I'm not confident enough to submit changes to it.","created_at":"2016-09-25T02:04:20Z","updated_at":"2016-09-25T02:04:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/sdiehl/write-you-a-haskell/pulls/89/commits","review_comments_url":"https://api.github.com/repos/sdiehl/write-you-a-haskell/pulls/89/comments","review_comment_url":"https://api.github.com/repos/sdiehl/write-you-a-haskell/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sdiehl/write-you-a-haskell/issues/89/comments","statuses_url":"https://api.github.com/repos/sdiehl/write-you-a-haskell/statuses/f0e0d82a7776f965a32e5d2bb93aae349a6c2b72","head":{"label":"VitorCBSB:master","ref":"master","sha":"f0e0d82a7776f965a32e5d2bb93aae349a6c2b72","user":{"login":"VitorCBSB","id":2853493,"avatar_url":"https://avatars.githubusercontent.com/u/2853493?v=3","gravatar_id":"","url":"https://api.github.com/users/VitorCBSB","html_url":"https://github.com/VitorCBSB","followers_url":"https://api.github.com/users/VitorCBSB/followers","following_url":"https://api.github.com/users/VitorCBSB/following{/other_user}","gists_url":"https://api.github.com/users/VitorCBSB/gists{/gist_id}","starred_url":"https://api.github.com/users/VitorCBSB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VitorCBSB/subscriptions","organizations_url":"https://api.github.com/users/VitorCBSB/orgs","repos_url":"https://api.github.com/users/VitorCBSB/repos","events_url":"https://api.github.com/users/VitorCBSB/events{/privacy}","received_events_url":"https://api.github.com/users/VitorCBSB/received_events","type":"User","site_admin":false},"repo":{"id":62814077,"name":"write-you-a-haskell","full_name":"VitorCBSB/write-you-a-haskell","owner":{"login":"VitorCBSB","id":2853493,"avatar_url":"https://avatars.githubusercontent.com/u/2853493?v=3","gravatar_id":"","url":"https://api.github.com/users/VitorCBSB","html_url":"https://github.com/VitorCBSB","followers_url":"https://api.github.com/users/VitorCBSB/followers","following_url":"https://api.github.com/users/VitorCBSB/following{/other_user}","gists_url":"https://api.github.com/users/VitorCBSB/gists{/gist_id}","starred_url":"https://api.github.com/users/VitorCBSB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VitorCBSB/subscriptions","organizations_url":"https://api.github.com/users/VitorCBSB/orgs","repos_url":"https://api.github.com/users/VitorCBSB/repos","events_url":"https://api.github.com/users/VitorCBSB/events{/privacy}","received_events_url":"https://api.github.com/users/VitorCBSB/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/VitorCBSB/write-you-a-haskell","description":"Building a modern functional compiler from first principles. (http://dev.stephendiehl.com/fun/)","fork":true,"url":"https://api.github.com/repos/VitorCBSB/write-you-a-haskell","forks_url":"https://api.github.com/repos/VitorCBSB/write-you-a-haskell/forks","keys_url":"https://api.github.com/repos/VitorCBSB/write-you-a-haskell/keys{/key_id}","collaborators_url":"https://api.github.com/repos/VitorCBSB/write-you-a-haskell/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/VitorCBSB/write-you-a-haskell/teams","hooks_url":"https://api.github.com/repos/VitorCBSB/write-you-a-haskell/hooks","issue_events_url":"https://api.github.com/repos/VitorCBSB/write-you-a-haskell/issues/events{/number}","events_url":"https://api.github.com/repos/VitorCBSB/write-you-a-haskell/events","assignees_url":"https://api.github.com/repos/VitorCBSB/write-you-a-haskell/assignees{/user}","branches_url":"https://api.github.com/repos/VitorCBSB/write-you-a-haskell/branches{/branch}","tags_url":"https://api.github.com/repos/VitorCBSB/write-you-a-haskell/tags","blobs_url":"https://api.github.com/repos/VitorCBSB/write-you-a-haskell/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/VitorCBSB/write-you-a-haskell/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/VitorCBSB/write-you-a-haskell/git/refs{/sha}","trees_url":"https://api.github.com/repos/VitorCBSB/write-you-a-haskell/git/trees{/sha}","statuses_url":"https://api.github.com/repos/VitorCBSB/write-you-a-haskell/statuses/{sha}","languages_url":"https://api.github.com/repos/VitorCBSB/write-you-a-haskell/languages","stargazers_url":"https://api.github.com/repos/VitorCBSB/write-you-a-haskell/stargazers","contributors_url":"https://api.github.com/repos/VitorCBSB/write-you-a-haskell/contributors","subscribers_url":"https://api.github.com/repos/VitorCBSB/write-you-a-haskell/subscribers","subscription_url":"https://api.github.com/repos/VitorCBSB/write-you-a-haskell/subscription","commits_url":"https://api.github.com/repos/VitorCBSB/write-you-a-haskell/commits{/sha}","git_commits_url":"https://api.github.com/repos/VitorCBSB/write-you-a-haskell/git/commits{/sha}","comments_url":"https://api.github.com/repos/VitorCBSB/write-you-a-haskell/comments{/number}","issue_comment_url":"https://api.github.com/repos/VitorCBSB/write-you-a-haskell/issues/comments{/number}","contents_url":"https://api.github.com/repos/VitorCBSB/write-you-a-haskell/contents/{+path}","compare_url":"https://api.github.com/repos/VitorCBSB/write-you-a-haskell/compare/{base}...{head}","merges_url":"https://api.github.com/repos/VitorCBSB/write-you-a-haskell/merges","archive_url":"https://api.github.com/repos/VitorCBSB/write-you-a-haskell/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/VitorCBSB/write-you-a-haskell/downloads","issues_url":"https://api.github.com/repos/VitorCBSB/write-you-a-haskell/issues{/number}","pulls_url":"https://api.github.com/repos/VitorCBSB/write-you-a-haskell/pulls{/number}","milestones_url":"https://api.github.com/repos/VitorCBSB/write-you-a-haskell/milestones{/number}","notifications_url":"https://api.github.com/repos/VitorCBSB/write-you-a-haskell/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/VitorCBSB/write-you-a-haskell/labels{/name}","releases_url":"https://api.github.com/repos/VitorCBSB/write-you-a-haskell/releases{/id}","deployments_url":"https://api.github.com/repos/VitorCBSB/write-you-a-haskell/deployments","created_at":"2016-07-07T14:39:57Z","updated_at":"2016-07-07T14:39:58Z","pushed_at":"2016-09-25T01:48:36Z","git_url":"git://github.com/VitorCBSB/write-you-a-haskell.git","ssh_url":"git@github.com:VitorCBSB/write-you-a-haskell.git","clone_url":"https://github.com/VitorCBSB/write-you-a-haskell.git","svn_url":"https://github.com/VitorCBSB/write-you-a-haskell","homepage":null,"size":979,"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":"sdiehl:master","ref":"master","sha":"8d6a09c30f4d54d3497b73662f5476d9710c5556","user":{"login":"sdiehl","id":236767,"avatar_url":"https://avatars.githubusercontent.com/u/236767?v=3","gravatar_id":"","url":"https://api.github.com/users/sdiehl","html_url":"https://github.com/sdiehl","followers_url":"https://api.github.com/users/sdiehl/followers","following_url":"https://api.github.com/users/sdiehl/following{/other_user}","gists_url":"https://api.github.com/users/sdiehl/gists{/gist_id}","starred_url":"https://api.github.com/users/sdiehl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sdiehl/subscriptions","organizations_url":"https://api.github.com/users/sdiehl/orgs","repos_url":"https://api.github.com/users/sdiehl/repos","events_url":"https://api.github.com/users/sdiehl/events{/privacy}","received_events_url":"https://api.github.com/users/sdiehl/received_events","type":"User","site_admin":false},"repo":{"id":28814210,"name":"write-you-a-haskell","full_name":"sdiehl/write-you-a-haskell","owner":{"login":"sdiehl","id":236767,"avatar_url":"https://avatars.githubusercontent.com/u/236767?v=3","gravatar_id":"","url":"https://api.github.com/users/sdiehl","html_url":"https://github.com/sdiehl","followers_url":"https://api.github.com/users/sdiehl/followers","following_url":"https://api.github.com/users/sdiehl/following{/other_user}","gists_url":"https://api.github.com/users/sdiehl/gists{/gist_id}","starred_url":"https://api.github.com/users/sdiehl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sdiehl/subscriptions","organizations_url":"https://api.github.com/users/sdiehl/orgs","repos_url":"https://api.github.com/users/sdiehl/repos","events_url":"https://api.github.com/users/sdiehl/events{/privacy}","received_events_url":"https://api.github.com/users/sdiehl/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sdiehl/write-you-a-haskell","description":"Building a modern functional compiler from first principles. (http://dev.stephendiehl.com/fun/)","fork":false,"url":"https://api.github.com/repos/sdiehl/write-you-a-haskell","forks_url":"https://api.github.com/repos/sdiehl/write-you-a-haskell/forks","keys_url":"https://api.github.com/repos/sdiehl/write-you-a-haskell/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sdiehl/write-you-a-haskell/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sdiehl/write-you-a-haskell/teams","hooks_url":"https://api.github.com/repos/sdiehl/write-you-a-haskell/hooks","issue_events_url":"https://api.github.com/repos/sdiehl/write-you-a-haskell/issues/events{/number}","events_url":"https://api.github.com/repos/sdiehl/write-you-a-haskell/events","assignees_url":"https://api.github.com/repos/sdiehl/write-you-a-haskell/assignees{/user}","branches_url":"https://api.github.com/repos/sdiehl/write-you-a-haskell/branches{/branch}","tags_url":"https://api.github.com/repos/sdiehl/write-you-a-haskell/tags","blobs_url":"https://api.github.com/repos/sdiehl/write-you-a-haskell/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sdiehl/write-you-a-haskell/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sdiehl/write-you-a-haskell/git/refs{/sha}","trees_url":"https://api.github.com/repos/sdiehl/write-you-a-haskell/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sdiehl/write-you-a-haskell/statuses/{sha}","languages_url":"https://api.github.com/repos/sdiehl/write-you-a-haskell/languages","stargazers_url":"https://api.github.com/repos/sdiehl/write-you-a-haskell/stargazers","contributors_url":"https://api.github.com/repos/sdiehl/write-you-a-haskell/contributors","subscribers_url":"https://api.github.com/repos/sdiehl/write-you-a-haskell/subscribers","subscription_url":"https://api.github.com/repos/sdiehl/write-you-a-haskell/subscription","commits_url":"https://api.github.com/repos/sdiehl/write-you-a-haskell/commits{/sha}","git_commits_url":"https://api.github.com/repos/sdiehl/write-you-a-haskell/git/commits{/sha}","comments_url":"https://api.github.com/repos/sdiehl/write-you-a-haskell/comments{/number}","issue_comment_url":"https://api.github.com/repos/sdiehl/write-you-a-haskell/issues/comments{/number}","contents_url":"https://api.github.com/repos/sdiehl/write-you-a-haskell/contents/{+path}","compare_url":"https://api.github.com/repos/sdiehl/write-you-a-haskell/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sdiehl/write-you-a-haskell/merges","archive_url":"https://api.github.com/repos/sdiehl/write-you-a-haskell/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sdiehl/write-you-a-haskell/downloads","issues_url":"https://api.github.com/repos/sdiehl/write-you-a-haskell/issues{/number}","pulls_url":"https://api.github.com/repos/sdiehl/write-you-a-haskell/pulls{/number}","milestones_url":"https://api.github.com/repos/sdiehl/write-you-a-haskell/milestones{/number}","notifications_url":"https://api.github.com/repos/sdiehl/write-you-a-haskell/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sdiehl/write-you-a-haskell/labels{/name}","releases_url":"https://api.github.com/repos/sdiehl/write-you-a-haskell/releases{/id}","deployments_url":"https://api.github.com/repos/sdiehl/write-you-a-haskell/deployments","created_at":"2015-01-05T13:44:54Z","updated_at":"2016-09-25T00:44:45Z","pushed_at":"2016-07-24T16:33:08Z","git_url":"git://github.com/sdiehl/write-you-a-haskell.git","ssh_url":"git@github.com:sdiehl/write-you-a-haskell.git","clone_url":"https://github.com/sdiehl/write-you-a-haskell.git","svn_url":"https://github.com/sdiehl/write-you-a-haskell","homepage":null,"size":1118,"stargazers_count":1389,"watchers_count":1389,"language":"Haskell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":106,"mirror_url":null,"open_issues_count":16,"forks":106,"open_issues":16,"watchers":1389,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sdiehl/write-you-a-haskell/pulls/89"},"html":{"href":"https://github.com/sdiehl/write-you-a-haskell/pull/89"},"issue":{"href":"https://api.github.com/repos/sdiehl/write-you-a-haskell/issues/89"},"comments":{"href":"https://api.github.com/repos/sdiehl/write-you-a-haskell/issues/89/comments"},"review_comments":{"href":"https://api.github.com/repos/sdiehl/write-you-a-haskell/pulls/89/comments"},"review_comment":{"href":"https://api.github.com/repos/sdiehl/write-you-a-haskell/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sdiehl/write-you-a-haskell/pulls/89/commits"},"statuses":{"href":"https://api.github.com/repos/sdiehl/write-you-a-haskell/statuses/f0e0d82a7776f965a32e5d2bb93aae349a6c2b72"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":86,"deletions":82,"changed_files":5}}
{"actor":{"display_login":"VitorCBSB"}}