{"action":"created","issue":{"url":"https://api.github.com/repos/elm-lang/elm-compiler/issues/882","labels_url":"https://api.github.com/repos/elm-lang/elm-compiler/issues/882/labels{/name}","comments_url":"https://api.github.com/repos/elm-lang/elm-compiler/issues/882/comments","events_url":"https://api.github.com/repos/elm-lang/elm-compiler/issues/882/events","html_url":"https://github.com/elm-lang/elm-compiler/issues/882","id":54964234,"number":882,"title":"Confusing compiler error distant from actual error","user":{"login":"danmane","id":1400023,"avatar_url":"https://avatars.githubusercontent.com/u/1400023?v=3","gravatar_id":"","url":"https://api.github.com/users/danmane","html_url":"https://github.com/danmane","followers_url":"https://api.github.com/users/danmane/followers","following_url":"https://api.github.com/users/danmane/following{/other_user}","gists_url":"https://api.github.com/users/danmane/gists{/gist_id}","starred_url":"https://api.github.com/users/danmane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danmane/subscriptions","organizations_url":"https://api.github.com/users/danmane/orgs","repos_url":"https://api.github.com/users/danmane/repos","events_url":"https://api.github.com/users/danmane/events{/privacy}","received_events_url":"https://api.github.com/users/danmane/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-21T01:09:51Z","updated_at":"2015-08-05T23:45:53Z","closed_at":"2015-08-05T23:45:53Z","body":"Suppose you have code like this:\r\n```\r\n1|  function a1 a2 = if \r\n2|    | a1 == a2 -> Nothing \r\n3|    | otherwise -> let x1 = somethingValid1\r\n4|                       x2 = List.map (/= a2) somethingValid2 \r\n5|                   in  somethingValid3 \r\n```\r\n\r\nThere is a mistake in line 4, where `(\\= a2)` should be `((\\=) a2)`. However, the compiler spits out a warning for line 3 that the `|` is unexpected; expecting whitespace or end of input. It gives no hint that the error is actually on line 4 and makes this syntax error difficult to debug. "},"comment":{"url":"https://api.github.com/repos/elm-lang/elm-compiler/issues/comments/128185155","html_url":"https://github.com/elm-lang/elm-compiler/issues/882#issuecomment-128185155","issue_url":"https://api.github.com/repos/elm-lang/elm-compiler/issues/882","id":128185155,"user":{"login":"evancz","id":1658058,"avatar_url":"https://avatars.githubusercontent.com/u/1658058?v=3","gravatar_id":"","url":"https://api.github.com/users/evancz","html_url":"https://github.com/evancz","followers_url":"https://api.github.com/users/evancz/followers","following_url":"https://api.github.com/users/evancz/following{/other_user}","gists_url":"https://api.github.com/users/evancz/gists{/gist_id}","starred_url":"https://api.github.com/users/evancz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evancz/subscriptions","organizations_url":"https://api.github.com/users/evancz/orgs","repos_url":"https://api.github.com/users/evancz/repos","events_url":"https://api.github.com/users/evancz/events{/privacy}","received_events_url":"https://api.github.com/users/evancz/received_events","type":"User","site_admin":false},"created_at":"2015-08-05T23:45:53Z","updated_at":"2015-08-05T23:45:53Z","body":"Thanks for reporting this! Do you mind migrating it to https://github.com/evancz/error-message-catalog/issues ? We are using that repo to log all of the crappy error messages so we can find patterns and fix a bunch at once!"}}