{"action":"created","issue":{"url":"https://api.github.com/repos/purescript/purescript/issues/1704","labels_url":"https://api.github.com/repos/purescript/purescript/issues/1704/labels{/name}","comments_url":"https://api.github.com/repos/purescript/purescript/issues/1704/comments","events_url":"https://api.github.com/repos/purescript/purescript/issues/1704/events","html_url":"https://github.com/purescript/purescript/pull/1704","id":121825262,"number":1704,"title":"Add native Partial constraint","user":{"login":"garyb","id":693642,"avatar_url":"https://avatars.githubusercontent.com/u/693642?v=3","gravatar_id":"","url":"https://api.github.com/users/garyb","html_url":"https://github.com/garyb","followers_url":"https://api.github.com/users/garyb/followers","following_url":"https://api.github.com/users/garyb/following{/other_user}","gists_url":"https://api.github.com/users/garyb/gists{/gist_id}","starred_url":"https://api.github.com/users/garyb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garyb/subscriptions","organizations_url":"https://api.github.com/users/garyb/orgs","repos_url":"https://api.github.com/users/garyb/repos","events_url":"https://api.github.com/users/garyb/events{/privacy}","received_events_url":"https://api.github.com/users/garyb/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/purescript/purescript/labels/needs%20work","name":"needs work","color":"bfd4f2"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-12T01:56:27Z","updated_at":"2015-12-12T19:10:19Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/purescript/purescript/pulls/1704","html_url":"https://github.com/purescript/purescript/pull/1704","diff_url":"https://github.com/purescript/purescript/pull/1704.diff","patch_url":"https://github.com/purescript/purescript/pull/1704.patch"},"body":"Resolves #1694.\r\n\r\n- Hides non-exhaustive pattern warning when applied\r\n- Hides exhaustivity bail-out warning when applied\r\n- Adds a warning for when the `Partial` constraint it used but the function is exhaustive.\r\n- Updated the error to state `Partial` constraints for non-exhaustive patterns will be required from 0.9"},"comment":{"url":"https://api.github.com/repos/purescript/purescript/issues/comments/164176686","html_url":"https://github.com/purescript/purescript/pull/1704#issuecomment-164176686","issue_url":"https://api.github.com/repos/purescript/purescript/issues/1704","id":164176686,"user":{"login":"paf31","id":630306,"avatar_url":"https://avatars.githubusercontent.com/u/630306?v=3","gravatar_id":"","url":"https://api.github.com/users/paf31","html_url":"https://github.com/paf31","followers_url":"https://api.github.com/users/paf31/followers","following_url":"https://api.github.com/users/paf31/following{/other_user}","gists_url":"https://api.github.com/users/paf31/gists{/gist_id}","starred_url":"https://api.github.com/users/paf31/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paf31/subscriptions","organizations_url":"https://api.github.com/users/paf31/orgs","repos_url":"https://api.github.com/users/paf31/repos","events_url":"https://api.github.com/users/paf31/events{/privacy}","received_events_url":"https://api.github.com/users/paf31/received_events","type":"User","site_admin":false},"created_at":"2015-12-12T19:10:18Z","updated_at":"2015-12-12T19:10:18Z","body":"My idea for this was to have the linter insert a function call to a built-in function `__partial :: forall a. Partial => a -> a`, wrapping the case statement. This would force the type checker to look for the `Partial` dictionary during typechecking, or error out.\r\n\r\nThen we'd need the type error to be modified so that we don't lose the nice message.\r\n\r\nThat's why I'd prefer to wait until the constraint machinery is a bit more developed, or for something like programmable type errors, since we could stick the error message string in the constraint itself."}}