{"action":"created","issue":{"url":"https://api.github.com/repos/elm-lang/elm-compiler/issues/880","labels_url":"https://api.github.com/repos/elm-lang/elm-compiler/issues/880/labels{/name}","comments_url":"https://api.github.com/repos/elm-lang/elm-compiler/issues/880/comments","events_url":"https://api.github.com/repos/elm-lang/elm-compiler/issues/880/events","html_url":"https://github.com/elm-lang/elm-compiler/issues/880","id":54006634,"number":880,"title":"Type issues between comparable and appendable","user":{"login":"drenninghoff","id":1737566,"avatar_url":"https://avatars.githubusercontent.com/u/1737566?v=3","gravatar_id":"","url":"https://api.github.com/users/drenninghoff","html_url":"https://github.com/drenninghoff","followers_url":"https://api.github.com/users/drenninghoff/followers","following_url":"https://api.github.com/users/drenninghoff/following{/other_user}","gists_url":"https://api.github.com/users/drenninghoff/gists{/gist_id}","starred_url":"https://api.github.com/users/drenninghoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drenninghoff/subscriptions","organizations_url":"https://api.github.com/users/drenninghoff/orgs","repos_url":"https://api.github.com/users/drenninghoff/repos","events_url":"https://api.github.com/users/drenninghoff/events{/privacy}","received_events_url":"https://api.github.com/users/drenninghoff/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-01-11T21:55:28Z","updated_at":"2015-01-12T23:25:28Z","closed_at":null,"body":"The following code doesn't compile, even though it seems to be correct. There has to be some kind if issue when dealing with types that need to be appendable aswell as comparable.\r\n\r\n```\r\nrenameVar : String -> Set String -> String\r\nrenameVar s l = if Set.member s l then renameVar (s ++ \"'\") l else s\r\n```\r\n\r\nit throws the error\r\n\r\n```\r\nType mismatch between the following types on line 2, column 51 to 59:\r\n\r\n       appendable\r\n\r\n       comparable\r\n```"},"comment":{"url":"https://api.github.com/repos/elm-lang/elm-compiler/issues/comments/69667592","html_url":"https://github.com/elm-lang/elm-compiler/issues/880#issuecomment-69667592","issue_url":"https://api.github.com/repos/elm-lang/elm-compiler/issues/880","id":69667592,"user":{"login":"mgold","id":1191970,"avatar_url":"https://avatars.githubusercontent.com/u/1191970?v=3","gravatar_id":"","url":"https://api.github.com/users/mgold","html_url":"https://github.com/mgold","followers_url":"https://api.github.com/users/mgold/followers","following_url":"https://api.github.com/users/mgold/following{/other_user}","gists_url":"https://api.github.com/users/mgold/gists{/gist_id}","starred_url":"https://api.github.com/users/mgold/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgold/subscriptions","organizations_url":"https://api.github.com/users/mgold/orgs","repos_url":"https://api.github.com/users/mgold/repos","events_url":"https://api.github.com/users/mgold/events{/privacy}","received_events_url":"https://api.github.com/users/mgold/received_events","type":"User","site_admin":false},"created_at":"2015-01-12T23:25:28Z","updated_at":"2015-01-12T23:25:28Z","body":"Strings and Lists are both comparable and appendable, and Arrays may be both at some point in the future. So the compiler needs to solve the problem of overlapping constraints. The Haskell-inspired version is `thing : (comparable a, appendable a) => a` but I think we can do better than that."}}