{"action":"closed","number":144,"pull_request":{"url":"https://api.github.com/repos/exercism/xhaskell/pulls/144","id":72985160,"html_url":"https://github.com/exercism/xhaskell/pull/144","diff_url":"https://github.com/exercism/xhaskell/pull/144.diff","patch_url":"https://github.com/exercism/xhaskell/pull/144.patch","issue_url":"https://api.github.com/repos/exercism/xhaskell/issues/144","number":144,"state":"closed","locked":false,"title":"Add -fno-warn-type-defaults to supress unwanted warnings.","user":{"login":"rbasso","id":16487165,"avatar_url":"https://avatars.githubusercontent.com/u/16487165?v=3","gravatar_id":"","url":"https://api.github.com/users/rbasso","html_url":"https://github.com/rbasso","followers_url":"https://api.github.com/users/rbasso/followers","following_url":"https://api.github.com/users/rbasso/following{/other_user}","gists_url":"https://api.github.com/users/rbasso/gists{/gist_id}","starred_url":"https://api.github.com/users/rbasso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rbasso/subscriptions","organizations_url":"https://api.github.com/users/rbasso/orgs","repos_url":"https://api.github.com/users/rbasso/repos","events_url":"https://api.github.com/users/rbasso/events{/privacy}","received_events_url":"https://api.github.com/users/rbasso/received_events","type":"User","site_admin":false},"body":"In some problems, like `leap`, the test module doesn't declare explicitly some numeric types, allowing solutions with multiple types:\r\n\r\n```haskell\r\nisLeapYear :: Int     -> Bool\r\nisLeapYear :: Integer -> Bool\r\n```\r\n\r\nThis is desirable, but has the unintended effect of displaying the warning...\r\n\r\n```\r\nDefaulting the following constraint(s) to type `Integer` arising from the use of `isLeapYear` at leap_test.hs ... arising from the literal 1996 ...\r\n```\r\n\r\n... when compiling `leap_test.hs` with polymorphic solutions:\r\n\r\n```haskell\r\nisLeapYear :: Integral a => a -> Bool\r\n```\r\n\r\nIt's important to suppress this warning so we don't misguide newcomers in thinking that there is something wrong with their code, when the problem is in the test module. Also, using the most general type is actually encouraged in Haskell.\r\n\r\nIt's desirable to have test modules that compile silently. This would benefit users and automated tests, that could be compiled with `-Wall -Werror`.\r\n\r\nAffected problems:\r\n- grains\r\n- hamming\r\n- leap\r\n- pascals-triangle\r\n- scrabble-score\r\n- sieve\r\n- sum-of-multiples\r\n\r\n**Proposed solution**: Add `{-# OPTIONS_GHC -fno-warn-type-defaults #-}` to the affected modules.\r\n\r\nCloses #143 ","created_at":"2016-06-08T04:28:47Z","updated_at":"2016-06-17T17:45:33Z","closed_at":"2016-06-17T17:45:33Z","merged_at":"2016-06-17T17:45:33Z","merge_commit_sha":"2bca31761063f0b686ddef650070135d0ecf1623","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/exercism/xhaskell/pulls/144/commits","review_comments_url":"https://api.github.com/repos/exercism/xhaskell/pulls/144/comments","review_comment_url":"https://api.github.com/repos/exercism/xhaskell/pulls/comments{/number}","comments_url":"https://api.github.com/repos/exercism/xhaskell/issues/144/comments","statuses_url":"https://api.github.com/repos/exercism/xhaskell/statuses/dc3e4d2fb8d3ddc9d018b36e935e28170bfb3ea9","head":{"label":"rbasso:fno-warn-type-defaults","ref":"fno-warn-type-defaults","sha":"dc3e4d2fb8d3ddc9d018b36e935e28170bfb3ea9","user":{"login":"rbasso","id":16487165,"avatar_url":"https://avatars.githubusercontent.com/u/16487165?v=3","gravatar_id":"","url":"https://api.github.com/users/rbasso","html_url":"https://github.com/rbasso","followers_url":"https://api.github.com/users/rbasso/followers","following_url":"https://api.github.com/users/rbasso/following{/other_user}","gists_url":"https://api.github.com/users/rbasso/gists{/gist_id}","starred_url":"https://api.github.com/users/rbasso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rbasso/subscriptions","organizations_url":"https://api.github.com/users/rbasso/orgs","repos_url":"https://api.github.com/users/rbasso/repos","events_url":"https://api.github.com/users/rbasso/events{/privacy}","received_events_url":"https://api.github.com/users/rbasso/received_events","type":"User","site_admin":false},"repo":{"id":60667007,"name":"xhaskell","full_name":"rbasso/xhaskell","owner":{"login":"rbasso","id":16487165,"avatar_url":"https://avatars.githubusercontent.com/u/16487165?v=3","gravatar_id":"","url":"https://api.github.com/users/rbasso","html_url":"https://github.com/rbasso","followers_url":"https://api.github.com/users/rbasso/followers","following_url":"https://api.github.com/users/rbasso/following{/other_user}","gists_url":"https://api.github.com/users/rbasso/gists{/gist_id}","starred_url":"https://api.github.com/users/rbasso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rbasso/subscriptions","organizations_url":"https://api.github.com/users/rbasso/orgs","repos_url":"https://api.github.com/users/rbasso/repos","events_url":"https://api.github.com/users/rbasso/events{/privacy}","received_events_url":"https://api.github.com/users/rbasso/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rbasso/xhaskell","description":"Exercism Exercises in Haskell","fork":true,"url":"https://api.github.com/repos/rbasso/xhaskell","forks_url":"https://api.github.com/repos/rbasso/xhaskell/forks","keys_url":"https://api.github.com/repos/rbasso/xhaskell/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rbasso/xhaskell/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rbasso/xhaskell/teams","hooks_url":"https://api.github.com/repos/rbasso/xhaskell/hooks","issue_events_url":"https://api.github.com/repos/rbasso/xhaskell/issues/events{/number}","events_url":"https://api.github.com/repos/rbasso/xhaskell/events","assignees_url":"https://api.github.com/repos/rbasso/xhaskell/assignees{/user}","branches_url":"https://api.github.com/repos/rbasso/xhaskell/branches{/branch}","tags_url":"https://api.github.com/repos/rbasso/xhaskell/tags","blobs_url":"https://api.github.com/repos/rbasso/xhaskell/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rbasso/xhaskell/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rbasso/xhaskell/git/refs{/sha}","trees_url":"https://api.github.com/repos/rbasso/xhaskell/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rbasso/xhaskell/statuses/{sha}","languages_url":"https://api.github.com/repos/rbasso/xhaskell/languages","stargazers_url":"https://api.github.com/repos/rbasso/xhaskell/stargazers","contributors_url":"https://api.github.com/repos/rbasso/xhaskell/contributors","subscribers_url":"https://api.github.com/repos/rbasso/xhaskell/subscribers","subscription_url":"https://api.github.com/repos/rbasso/xhaskell/subscription","commits_url":"https://api.github.com/repos/rbasso/xhaskell/commits{/sha}","git_commits_url":"https://api.github.com/repos/rbasso/xhaskell/git/commits{/sha}","comments_url":"https://api.github.com/repos/rbasso/xhaskell/comments{/number}","issue_comment_url":"https://api.github.com/repos/rbasso/xhaskell/issues/comments{/number}","contents_url":"https://api.github.com/repos/rbasso/xhaskell/contents/{+path}","compare_url":"https://api.github.com/repos/rbasso/xhaskell/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rbasso/xhaskell/merges","archive_url":"https://api.github.com/repos/rbasso/xhaskell/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rbasso/xhaskell/downloads","issues_url":"https://api.github.com/repos/rbasso/xhaskell/issues{/number}","pulls_url":"https://api.github.com/repos/rbasso/xhaskell/pulls{/number}","milestones_url":"https://api.github.com/repos/rbasso/xhaskell/milestones{/number}","notifications_url":"https://api.github.com/repos/rbasso/xhaskell/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rbasso/xhaskell/labels{/name}","releases_url":"https://api.github.com/repos/rbasso/xhaskell/releases{/id}","deployments_url":"https://api.github.com/repos/rbasso/xhaskell/deployments","created_at":"2016-06-08T03:58:39Z","updated_at":"2016-06-08T03:58:40Z","pushed_at":"2016-06-17T16:37:18Z","git_url":"git://github.com/rbasso/xhaskell.git","ssh_url":"git@github.com:rbasso/xhaskell.git","clone_url":"https://github.com/rbasso/xhaskell.git","svn_url":"https://github.com/rbasso/xhaskell","homepage":null,"size":267,"stargazers_count":0,"watchers_count":0,"language":"Haskell","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"exercism:master","ref":"master","sha":"8eabd659eb4d18e0c77d60832262ddef47cb6b3f","user":{"login":"exercism","id":5624255,"avatar_url":"https://avatars.githubusercontent.com/u/5624255?v=3","gravatar_id":"","url":"https://api.github.com/users/exercism","html_url":"https://github.com/exercism","followers_url":"https://api.github.com/users/exercism/followers","following_url":"https://api.github.com/users/exercism/following{/other_user}","gists_url":"https://api.github.com/users/exercism/gists{/gist_id}","starred_url":"https://api.github.com/users/exercism/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/exercism/subscriptions","organizations_url":"https://api.github.com/users/exercism/orgs","repos_url":"https://api.github.com/users/exercism/repos","events_url":"https://api.github.com/users/exercism/events{/privacy}","received_events_url":"https://api.github.com/users/exercism/received_events","type":"Organization","site_admin":false},"repo":{"id":17273391,"name":"xhaskell","full_name":"exercism/xhaskell","owner":{"login":"exercism","id":5624255,"avatar_url":"https://avatars.githubusercontent.com/u/5624255?v=3","gravatar_id":"","url":"https://api.github.com/users/exercism","html_url":"https://github.com/exercism","followers_url":"https://api.github.com/users/exercism/followers","following_url":"https://api.github.com/users/exercism/following{/other_user}","gists_url":"https://api.github.com/users/exercism/gists{/gist_id}","starred_url":"https://api.github.com/users/exercism/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/exercism/subscriptions","organizations_url":"https://api.github.com/users/exercism/orgs","repos_url":"https://api.github.com/users/exercism/repos","events_url":"https://api.github.com/users/exercism/events{/privacy}","received_events_url":"https://api.github.com/users/exercism/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/exercism/xhaskell","description":"Exercism Exercises in Haskell","fork":false,"url":"https://api.github.com/repos/exercism/xhaskell","forks_url":"https://api.github.com/repos/exercism/xhaskell/forks","keys_url":"https://api.github.com/repos/exercism/xhaskell/keys{/key_id}","collaborators_url":"https://api.github.com/repos/exercism/xhaskell/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/exercism/xhaskell/teams","hooks_url":"https://api.github.com/repos/exercism/xhaskell/hooks","issue_events_url":"https://api.github.com/repos/exercism/xhaskell/issues/events{/number}","events_url":"https://api.github.com/repos/exercism/xhaskell/events","assignees_url":"https://api.github.com/repos/exercism/xhaskell/assignees{/user}","branches_url":"https://api.github.com/repos/exercism/xhaskell/branches{/branch}","tags_url":"https://api.github.com/repos/exercism/xhaskell/tags","blobs_url":"https://api.github.com/repos/exercism/xhaskell/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/exercism/xhaskell/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/exercism/xhaskell/git/refs{/sha}","trees_url":"https://api.github.com/repos/exercism/xhaskell/git/trees{/sha}","statuses_url":"https://api.github.com/repos/exercism/xhaskell/statuses/{sha}","languages_url":"https://api.github.com/repos/exercism/xhaskell/languages","stargazers_url":"https://api.github.com/repos/exercism/xhaskell/stargazers","contributors_url":"https://api.github.com/repos/exercism/xhaskell/contributors","subscribers_url":"https://api.github.com/repos/exercism/xhaskell/subscribers","subscription_url":"https://api.github.com/repos/exercism/xhaskell/subscription","commits_url":"https://api.github.com/repos/exercism/xhaskell/commits{/sha}","git_commits_url":"https://api.github.com/repos/exercism/xhaskell/git/commits{/sha}","comments_url":"https://api.github.com/repos/exercism/xhaskell/comments{/number}","issue_comment_url":"https://api.github.com/repos/exercism/xhaskell/issues/comments{/number}","contents_url":"https://api.github.com/repos/exercism/xhaskell/contents/{+path}","compare_url":"https://api.github.com/repos/exercism/xhaskell/compare/{base}...{head}","merges_url":"https://api.github.com/repos/exercism/xhaskell/merges","archive_url":"https://api.github.com/repos/exercism/xhaskell/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/exercism/xhaskell/downloads","issues_url":"https://api.github.com/repos/exercism/xhaskell/issues{/number}","pulls_url":"https://api.github.com/repos/exercism/xhaskell/pulls{/number}","milestones_url":"https://api.github.com/repos/exercism/xhaskell/milestones{/number}","notifications_url":"https://api.github.com/repos/exercism/xhaskell/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/exercism/xhaskell/labels{/name}","releases_url":"https://api.github.com/repos/exercism/xhaskell/releases{/id}","deployments_url":"https://api.github.com/repos/exercism/xhaskell/deployments","created_at":"2014-02-28T02:59:12Z","updated_at":"2016-06-17T03:08:10Z","pushed_at":"2016-06-17T17:45:33Z","git_url":"git://github.com/exercism/xhaskell.git","ssh_url":"git@github.com:exercism/xhaskell.git","clone_url":"https://github.com/exercism/xhaskell.git","svn_url":"https://github.com/exercism/xhaskell","homepage":null,"size":24163,"stargazers_count":53,"watchers_count":53,"language":"Haskell","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":33,"mirror_url":null,"open_issues_count":24,"forks":33,"open_issues":24,"watchers":53,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/exercism/xhaskell/pulls/144"},"html":{"href":"https://github.com/exercism/xhaskell/pull/144"},"issue":{"href":"https://api.github.com/repos/exercism/xhaskell/issues/144"},"comments":{"href":"https://api.github.com/repos/exercism/xhaskell/issues/144/comments"},"review_comments":{"href":"https://api.github.com/repos/exercism/xhaskell/pulls/144/comments"},"review_comment":{"href":"https://api.github.com/repos/exercism/xhaskell/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/exercism/xhaskell/pulls/144/commits"},"statuses":{"href":"https://api.github.com/repos/exercism/xhaskell/statuses/dc3e4d2fb8d3ddc9d018b36e935e28170bfb3ea9"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"rbasso","id":16487165,"avatar_url":"https://avatars.githubusercontent.com/u/16487165?v=3","gravatar_id":"","url":"https://api.github.com/users/rbasso","html_url":"https://github.com/rbasso","followers_url":"https://api.github.com/users/rbasso/followers","following_url":"https://api.github.com/users/rbasso/following{/other_user}","gists_url":"https://api.github.com/users/rbasso/gists{/gist_id}","starred_url":"https://api.github.com/users/rbasso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rbasso/subscriptions","organizations_url":"https://api.github.com/users/rbasso/orgs","repos_url":"https://api.github.com/users/rbasso/repos","events_url":"https://api.github.com/users/rbasso/events{/privacy}","received_events_url":"https://api.github.com/users/rbasso/received_events","type":"User","site_admin":false},"comments":3,"review_comments":0,"commits":1,"additions":15,"deletions":1,"changed_files":7}}
{"actor":{"display_login":"rbasso"}}