{"action":"created","issue":{"url":"https://api.github.com/repos/purescript/purescript/issues/1683","labels_url":"https://api.github.com/repos/purescript/purescript/issues/1683/labels{/name}","comments_url":"https://api.github.com/repos/purescript/purescript/issues/1683/comments","events_url":"https://api.github.com/repos/purescript/purescript/issues/1683/events","html_url":"https://github.com/purescript/purescript/issues/1683","id":119364084,"number":1683,"title":"Better errors when you forget to use \"do\"","user":{"login":"hdgarrood","id":1270186,"avatar_url":"https://avatars.githubusercontent.com/u/1270186?v=3","gravatar_id":"","url":"https://api.github.com/users/hdgarrood","html_url":"https://github.com/hdgarrood","followers_url":"https://api.github.com/users/hdgarrood/followers","following_url":"https://api.github.com/users/hdgarrood/following{/other_user}","gists_url":"https://api.github.com/users/hdgarrood/gists{/gist_id}","starred_url":"https://api.github.com/users/hdgarrood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hdgarrood/subscriptions","organizations_url":"https://api.github.com/users/hdgarrood/orgs","repos_url":"https://api.github.com/users/hdgarrood/repos","events_url":"https://api.github.com/users/hdgarrood/events{/privacy}","received_events_url":"https://api.github.com/users/hdgarrood/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/purescript/purescript/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/purescript/purescript/labels/error-message","name":"error-message","color":"f7c6c7"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/purescript/purescript/milestones/8","html_url":"https://github.com/purescript/purescript/milestones/Ideas","labels_url":"https://api.github.com/repos/purescript/purescript/milestones/8/labels","id":714450,"number":8,"title":"Ideas","description":"Ideas which may or may not be implemented, for discussion.","creator":{"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},"open_issues":61,"closed_issues":38,"state":"open","created_at":"2014-07-08T20:33:33Z","updated_at":"2015-12-14T21:19:36Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2015-11-29T14:59:43Z","updated_at":"2015-12-18T21:25:28Z","closed_at":null,"body":"It would be nice to have some kind of special cases for the parse errors that result from forgetting to add \"do\", because they're not very easy to decode at the moment. For example:\r\n\r\n```purescript\r\nmain =\r\n  x <- foo\r\n  f x\r\n```\r\n\r\nSupposing that `foo x` and `y` both have type `(Monad m) => m unit`, this would be nice to address too, although probably a fair bit harder:\r\n```purescript\r\nmain =\r\n  foo x\r\n  y\r\n```"},"comment":{"url":"https://api.github.com/repos/purescript/purescript/issues/comments/165901000","html_url":"https://github.com/purescript/purescript/issues/1683#issuecomment-165901000","issue_url":"https://api.github.com/repos/purescript/purescript/issues/1683","id":165901000,"user":{"login":"soupi","id":8547573,"avatar_url":"https://avatars.githubusercontent.com/u/8547573?v=3","gravatar_id":"","url":"https://api.github.com/users/soupi","html_url":"https://github.com/soupi","followers_url":"https://api.github.com/users/soupi/followers","following_url":"https://api.github.com/users/soupi/following{/other_user}","gists_url":"https://api.github.com/users/soupi/gists{/gist_id}","starred_url":"https://api.github.com/users/soupi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soupi/subscriptions","organizations_url":"https://api.github.com/users/soupi/orgs","repos_url":"https://api.github.com/users/soupi/repos","events_url":"https://api.github.com/users/soupi/events{/privacy}","received_events_url":"https://api.github.com/users/soupi/received_events","type":"User","site_admin":false},"created_at":"2015-12-18T21:25:28Z","updated_at":"2015-12-18T21:25:28Z","body":"For the second case, this program:\r\n\r\n```purs\r\nmodule Main where\r\n\r\nimport Prelude\r\nimport Control.Monad.Eff\r\nimport Control.Monad.Eff.Console\r\n\r\nmain =\r\n  log \"hello\"\r\n  log \"world\"\r\n  pure unit\r\n\r\n```\r\n\r\nEmits the error message:\r\n\r\n```\r\nError found:\r\nin module Main\r\nat /Users/suppi/code/purescript/bug/src/Main.purs line 8, column 3 - line 10, column 8\r\n\r\n  Could not match type\r\n\r\n    Eff\r\n\r\n  with type\r\n\r\n    Function\r\n\r\n\r\nwhile trying to match type Eff\r\n  with type Function\r\nwhile inferring the type of (log \"hello\") log\r\nin value declaration main\r\n\r\n\r\nSee https://github.com/purescript/purescript/wiki/Error-Code-TypesDoNotUnify for more information,\r\nor to contribute content related to this error.\r\n```\r\n\r\nI'm using the master branch, [this](https://github.com/purescript/purescript/commit/0c87efeff2afa3210726791d68a53078bed52bbe) is the last commit I see on `git log`"}}