{"action":"created","issue":{"url":"https://api.github.com/repos/purescript/purescript/issues/1022","labels_url":"https://api.github.com/repos/purescript/purescript/issues/1022/labels{/name}","comments_url":"https://api.github.com/repos/purescript/purescript/issues/1022/comments","events_url":"https://api.github.com/repos/purescript/purescript/issues/1022/events","html_url":"https://github.com/purescript/purescript/issues/1022","id":66026219,"number":1022,"title":"fail to inference the most general type?","user":{"login":"Javran","id":1096354,"avatar_url":"https://avatars.githubusercontent.com/u/1096354?v=3","gravatar_id":"","url":"https://api.github.com/users/Javran","html_url":"https://github.com/Javran","followers_url":"https://api.github.com/users/Javran/followers","following_url":"https://api.github.com/users/Javran/following{/other_user}","gists_url":"https://api.github.com/users/Javran/gists{/gist_id}","starred_url":"https://api.github.com/users/Javran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Javran/subscriptions","organizations_url":"https://api.github.com/users/Javran/orgs","repos_url":"https://api.github.com/users/Javran/repos","events_url":"https://api.github.com/users/Javran/events{/privacy}","received_events_url":"https://api.github.com/users/Javran/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-02T22:47:36Z","updated_at":"2015-04-02T22:49:25Z","closed_at":null,"body":"Without explicit type signature, the following code failed to type check:\r\n\r\n```purescript\r\nmodule TyTests where\r\n\r\ntestTyInf :: [String]\r\ntestTyInf = [ f \"\", f 1 ]\r\n  where\r\n    -- f :: forall a. (Show a) => a -> String\r\n    f x = show x\r\n    -- however the following definition works fine\r\n    -- f = show\r\n\r\ntestTyInf1 :: [String]\r\ntestTyInf1 = \r\n  let f x = show x \r\n      -- f = show\r\n  in [f \"\", f 1 ]\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/purescript/purescript/issues/comments/89067997","html_url":"https://github.com/purescript/purescript/issues/1022#issuecomment-89067997","issue_url":"https://api.github.com/repos/purescript/purescript/issues/1022","id":89067997,"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-04-02T22:49:25Z","updated_at":"2015-04-02T22:49:25Z","body":"Yes, PureScript doesn't infer general types with constraints yet:\r\n\r\nhttps://github.com/purescript/purescript/wiki/Differences-from-Haskell#type-classes-and-type-inference"}}